We're now putting 24-byte structures into .init.setup via __setup. But x86_64's compiler is emitting a `.align 16' in there, so they end up on 32-byte boundaries and do_early_param()'s pointer arithmetic goes wrong. Fix that up by forcing the compiler to align these structures to sizeof(long). Signed-off-by: Andrew Morton --- 25-akpm/include/linux/init.h | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff -puN include/linux/init.h~x86_64-setup-section-alignment-fix include/linux/init.h --- 25/include/linux/init.h~x86_64-setup-section-alignment-fix 2004-06-28 20:21:04.833179256 -0700 +++ 25-akpm/include/linux/init.h 2004-06-28 20:25:01.201245848 -0700 @@ -113,12 +113,18 @@ struct obs_kernel_param { int early; }; -/* Only for really core code. See moduleparam.h for the normal way. */ +/* + * Only for really core code. See moduleparam.h for the normal way. + * + * Force the alignment so the compiler doesn't space elements of the + * obs_kernel_param "array" too far apart in .init.setup. + */ #define __setup_param(str, unique_id, fn, early) \ static char __setup_str_##unique_id[] __initdata = str; \ static struct obs_kernel_param __setup_##unique_id \ - __attribute_used__ \ - __attribute__((__section__(".init.setup"))) \ + __attribute_used__ \ + __attribute__((__section__(".init.setup"))) \ + __attribute__((aligned((sizeof(long))))) \ = { __setup_str_##unique_id, fn, early } #define __setup_null_param(str, unique_id) \ _