public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.7-bk: asm/setup.h and linux/init.h
@ 2004-06-26 14:35 Russell King
  2004-06-26 16:05 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Russell King @ 2004-06-26 14:35 UTC (permalink / raw)
  To: Linux Kernel List, Andrew Morton, Linus Torvalds, Rusty Russell

Hi,

I notice that recent changes resulted in asm/setup.h being included by
linux/init.h, for the saved_command_line change:

@@ -66,6 +67,9 @@

 extern initcall_t __con_initcall_start, __con_initcall_end;
 extern initcall_t __security_initcall_start, __security_initcall_end;
+
+/* Defined in init/main.c */
+extern char saved_command_line[COMMAND_LINE_SIZE];
 #endif

 #ifndef MODULE

Unfortunately, this causes problems on ARM, because asm/setup.h on
ARM needs things like linux/types.h, which I'd rather not include
here since:

1. it means that we'll be at odds with what other architectures include
   (and therefore will hide a missing linux/types.h include when
   developing on ARM.)
2. linux/init.h is included by the majority of the kernel, and I'd
   rather not have asm/setup.h added to the dependency of every single
   kernel source file.

Is there a reason why we can't delete asm/setup.h from linux/init.h
and change that declaration to:

+extern char saved_command_line[];

?

IOW, like this (which works fine on ARM):

===== include/linux/init.h 1.32 vs edited =====
--- 1.32/include/linux/init.h	Thu Jun 24 09:55:46 2004
+++ edited/include/linux/init.h	Sat Jun 26 12:50:09 2004
@@ -3,7 +3,6 @@
 
 #include <linux/config.h>
 #include <linux/compiler.h>
-#include <asm/setup.h>
 
 /* These macros are used to mark some functions or 
  * initialized data (doesn't apply to uninitialized data)
@@ -69,7 +68,7 @@
 extern initcall_t __security_initcall_start, __security_initcall_end;
 
 /* Defined in init/main.c */
-extern char saved_command_line[COMMAND_LINE_SIZE];
+extern char saved_command_line[];
 #endif
   
 #ifndef MODULE
===== init/main.c 1.148 vs edited =====
--- 1.148/init/main.c	Thu Jun 24 09:55:46 2004
+++ edited/init/main.c	Sat Jun 26 12:51:27 2004
@@ -47,6 +47,7 @@
 
 #include <asm/io.h>
 #include <asm/bugs.h>
+#include <asm/setup.h>
 
 /*
  * This is one of the first .c files built. Error out early


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-06-26 23:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-26 14:35 2.6.7-bk: asm/setup.h and linux/init.h Russell King
2004-06-26 16:05 ` Linus Torvalds
2004-06-26 16:49   ` Russell King
2004-06-26 23:24     ` Paul Jackson
2004-06-26 23:34       ` Rusty Russell
2004-06-26 23:56         ` Paul Jackson
2004-06-26 23:30     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox