Re: [PATCH] x86/setup: do not include kexec_handover.h from asm/setup.h

From: Borislav Petkov

Date: Thu Jul 02 2026 - 20:12:01 EST


On Thu, Jul 02, 2026 at 10:31:11PM +0300, Mike Rapoport wrote:
> The examples there are really x86 specific.
> KHO needs decompressor to recognise 'struct kho_scratch' that's defined in
> include/linux/kexec_handover.h

That struct is huuuge :-P

struct kho_scratch {
phys_addr_t addr;
phys_addr_t size;
};

> I see there's a duplicated 'struct efi_unaccepted_memory' for decompressor
> needs, should KHO do the same for 'struct kho_scratch'?

You could. But it would go out of sync perhaps.

You could also try a

include/asm-generic/kho.h

and put only really generic, basic gunk there and include it everywhere.

HTH.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette