X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Finit.h;h=56ec4c62eee066d6886ec2f0bfe96fa273368785;hb=9462544fdfe06c1d0d535876fedb4b886c861c73;hp=dbbdbd1bec7768137cbcb4564d404561a9846733;hpb=972d45fb43f0f0793fa275c4a22998106760cd61;p=powerpc.git diff --git a/include/linux/init.h b/include/linux/init.h index dbbdbd1bec..56ec4c62ee 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -45,6 +45,19 @@ #define __exitdata __attribute__ ((__section__(".exit.data"))) #define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit"))) +/* modpost check for section mismatches during the kernel build. + * A section mismatch happens when there are references from a + * code or data section to an init section (both code or data). + * The init sections are (for most archs) discarded by the kernel + * when early init has completed so all such references are potential bugs. + * For exit sections the same issue exists. + * The following markers are used for the cases where the reference to + * the init/exit section (code or data) is valid and will teach modpost + * not to issue a warning. + * The markers follow same syntax rules as __init / __initdata. */ +#define __init_refok noinline __attribute__ ((__section__ (".text.init.refok"))) +#define __initdata_refok __attribute__ ((__section__ (".data.init.refok"))) + #ifdef MODULE #define __exit __attribute__ ((__section__(".exit.text"))) #else @@ -52,14 +65,9 @@ #endif /* For assembly routines */ -#ifdef CONFIG_HOTPLUG_CPU -#define __INIT .section ".text","ax" -#define __INITDATA .section ".data","aw" -#else #define __INIT .section ".init.text","ax" -#define __INITDATA .section ".init.data","aw" -#endif #define __FINIT .previous +#define __INITDATA .section ".init.data","aw" #ifndef __ASSEMBLY__ /* @@ -77,7 +85,8 @@ extern char *saved_command_line; extern unsigned int reset_devices; /* used by init/main.c */ -extern void setup_arch(char **); +void setup_arch(char **); +void prepare_namespace(void); #endif