public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: 2.6.7-bk: asm/setup.h and linux/init.h
Date: Sat, 26 Jun 2004 15:35:11 +0100	[thread overview]
Message-ID: <20040626153511.A30532@flint.arm.linux.org.uk> (raw)

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

             reply	other threads:[~2004-06-26 14:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26 14:35 Russell King [this message]
2004-06-26 16:05 ` 2.6.7-bk: asm/setup.h and linux/init.h 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040626153511.A30532@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox