I want to use something (header file, struct, function or macro) that is declared / defined under arch/XXX/asm/include
(in my case, PAGE_TABLE
) in a kernel module.
Is it possible to know if that thing is present on all architectures?
Phrased differently: what exactly is the arch-portable API that the kernel exposes to kernel space under asm/
?
I could find .
or grep -r
into the kernel tree, but is there a better way to know that for every new architecture that comes out, that thing must be defined for the architecture to be supported? After all, even if something is furnished on all existing architectures, who guarantees that it is not just a coincidence that they all furnish those things, but that they are not mandatory?
Taking headers for example, in recent source snapshots, x86
contains acpi.h
, but arm
does not, but all architectures seem to have page.h
. So how can I know that I can use #include <asm/page.h>
but not acpi.h
? page.h
on the other hand, is expected to have an implementation on all archs since include/linux/
uses it in several points, and include/linux
is meant to be portable to all architectures (please confirm this point).