* [PATCH] init/main.c
@ 2001-07-21 16:51 Stefan Becker
2001-07-21 17:05 ` Alexander Griesser
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Stefan Becker @ 2001-07-21 16:51 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
Hi!
The following patch against 2.4.6-ac5 does
(a) a small cleanup to profile_setup()
(b) wraps certain root_dev_names[] into #ifdefs.
I hope I found the correct CONFIG_BLK_* variables
Compiles and boots here, but I don't have any RAID-controllers ;-)
Greetings from Aachen,
Stefan
--- linux-2.4.6-ac5/init/main.c Sat Jul 21 18:34:15 2001
+++ linux/init/main.c Sat Jul 21 18:36:38 2001
@@ -138,8 +138,9 @@
static int __init profile_setup(char *str)
{
- int par;
- if (get_option(&str,&par)) prof_shift = par;
+ int par;
+ if (get_option(&str,&par))
+ prof_shift = par;
return 1;
}
@@ -280,6 +281,7 @@
{ "xpram30", (XPRAM_MAJOR << MINORBITS) + 30 },
{ "xpram31", (XPRAM_MAJOR << MINORBITS) + 31 },
#endif
+#ifdef CONFIG_BLK_DEV_DAC960
{ "rd/c0d0p",0x3000 },
{ "rd/c0d1p",0x3008 },
{ "rd/c0d2p",0x3010 },
@@ -296,6 +298,8 @@
{ "rd/c0d13p",0x3068 },
{ "rd/c0d14p",0x3070 },
{ "rd/c0d15p",0x3078 },
+#endif
+#ifdef CONFIG_BLK_CPQ_DA
{ "ida/c0d0p",0x4800 },
{ "ida/c0d1p",0x4810 },
{ "ida/c0d2p",0x4820 },
@@ -312,6 +316,8 @@
{ "ida/c0d13p",0x48D0 },
{ "ida/c0d14p",0x48E0 },
{ "ida/c0d15p",0x48F0 },
+#endif
+#ifdef CONFIG_BLK_CPQ_CISS_DA
{ "cciss/c0d0p",0x6800 },
{ "cciss/c0d1p",0x6810 },
{ "cciss/c0d2p",0x6820 },
@@ -328,6 +334,8 @@
{ "cciss/c0d13p",0x68D0 },
{ "cciss/c0d14p",0x68E0 },
{ "cciss/c0d15p",0x68F0 },
+#endif
+#ifdef CONFIG_BLK_DEV_ATARAID
{ "ataraid/d0p",0x7200 },
{ "ataraid/d1p",0x7210 },
{ "ataraid/d2p",0x7220 },
@@ -344,6 +352,7 @@
{ "ataraid/d13p",0x72D0 },
{ "ataraid/d14p",0x72E0 },
{ "ataraid/d15p",0x72F0 },
+#endif
{ "mtdblock", 0x1f00 },
{ "nftla", 0x5d00 },
{ "nftlb", 0x5d10 },
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] init/main.c
2001-07-21 16:51 [PATCH] init/main.c Stefan Becker
@ 2001-07-21 17:05 ` Alexander Griesser
2001-07-21 17:36 ` Robert Love
2001-07-21 21:39 ` Andrzej Krzysztofowicz
2 siblings, 0 replies; 6+ messages in thread
From: Alexander Griesser @ 2001-07-21 17:05 UTC (permalink / raw)
To: Stefan Becker; +Cc: Alan Cox, linux-kernel
On Sat, Jul 21, 2001 at 06:51:07PM +0200, you wrote:
> The following patch against 2.4.6-ac5 does
> - int par;
> - if (get_option(&str,&par)) prof_shift = par;
> + int par;
> + if (get_option(&str,&par))
> + prof_shift = par;
> return 1;
This is already done in 2.4.7.
regards, alexx
--
| .-. | Alexander Griesser <tuxx@aon.at> -=- ICQ:63180135 | .''`. |
| /v\ | http://www.tuxx-home.at -=- Linux Version 2.4.7 | : :' : |
| /( )\ | FAQ zu at.linux: http://alfie.ist.org/LinuxFAQ | `. `' |
| ^^ ^^ `---------------------------------------------------´ `- |
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] init/main.c
2001-07-21 16:51 [PATCH] init/main.c Stefan Becker
2001-07-21 17:05 ` Alexander Griesser
@ 2001-07-21 17:36 ` Robert Love
2001-07-21 21:39 ` Andrzej Krzysztofowicz
2 siblings, 0 replies; 6+ messages in thread
From: Robert Love @ 2001-07-21 17:36 UTC (permalink / raw)
To: Stefan Becker; +Cc: linux-kernel
On 21 Jul 2001 18:51:07 +0200, Stefan Becker wrote:
> static int __init profile_setup(char *str)
> {
> - int par;
> - if (get_option(&str,&par)) prof_shift = par;
> + int par;
> + if (get_option(&str,&par))
> + prof_shift = par;
> return 1;
> }
I wrote a similar patch awhile back and submitted it, to no avail. So,
this is good -- but 2.4.7 already has this fix merged.
--
Robert M. Love
rml at ufl.edu
rml at tech9.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] init/main.c
2001-07-21 16:51 [PATCH] init/main.c Stefan Becker
2001-07-21 17:05 ` Alexander Griesser
2001-07-21 17:36 ` Robert Love
@ 2001-07-21 21:39 ` Andrzej Krzysztofowicz
2001-07-22 3:58 ` Stefan Becker
2 siblings, 1 reply; 6+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-07-21 21:39 UTC (permalink / raw)
To: Stefan Becker; +Cc: Alan Cox, kufel!vger.kernel.org!linux-kernel
Hi,
What do you aim at doing this changes ?
> The following patch against 2.4.6-ac5 does
[...]
> (b) wraps certain root_dev_names[] into #ifdefs.
> I hope I found the correct CONFIG_BLK_* variables
[...]
> #endif
> +#ifdef CONFIG_BLK_DEV_DAC960
> { "rd/c0d0p",0x3000 },
> { "rd/c0d1p",0x3008 },
> { "rd/c0d2p",0x3010 },
> @@ -296,6 +298,8 @@
> { "rd/c0d13p",0x3068 },
> { "rd/c0d14p",0x3070 },
> { "rd/c0d15p",0x3078 },
> +#endif
> +#ifdef CONFIG_BLK_CPQ_DA
... etc.
AFAIR, the above (and similar) #ifdefs were intentionally removed as they
break using root=... kernel parameters for apropriate drivers loaded as
module from initrd. In these cases there are 3 solutions:
1. Use numeric values (not convenient)
2. #if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE)
This is ugly (main kernel depends on too many module settings).
Also, Linux (Alan too ?) hate too many unnecessary
3. Remove all #ifdefs here. (prefered as this is init code...)
Alan, please DON'T apply this patch.
Andrzej
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] init/main.c
2001-07-21 21:39 ` Andrzej Krzysztofowicz
@ 2001-07-22 3:58 ` Stefan Becker
2001-07-22 4:05 ` Keith Owens
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Becker @ 2001-07-22 3:58 UTC (permalink / raw)
To: linux-kernel
Hi!
Andrzej Krzysztofowicz wrote:
[...]
> AFAIR, the above (and similar) #ifdefs were intentionally removed as
they
> break using root=... kernel parameters for apropriate drivers loaded as
> module from initrd. In these cases there are 3 solutions:
[...]
Sorry, but I thought that even if a driver is built as a module the
corresponding CONFIG_* symbol is defined. I don't see the difference to
#if defined(CONFIG_ARCH_S390) as my system is i386 and doesn't need RAID
block devices.
Sorry for the disturbance, it was my first try to improve the linux
kernel and it was wrong. ;-)
Greetings,
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] init/main.c
2001-07-22 3:58 ` Stefan Becker
@ 2001-07-22 4:05 ` Keith Owens
0 siblings, 0 replies; 6+ messages in thread
From: Keith Owens @ 2001-07-22 4:05 UTC (permalink / raw)
To: Stefan Becker; +Cc: linux-kernel
On Sun, 22 Jul 2001 05:58:15 +0200 (CEST),
Stefan Becker <stefan@oph.rwth-aachen.de> wrote:
>Sorry, but I thought that even if a driver is built as a module the
>corresponding CONFIG_* symbol is defined.
CONFIG_foo= CONFIG_foo CONFIG_foo_MODULE
n undef undef
y 1 undef
m undef 1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-07-22 4:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-21 16:51 [PATCH] init/main.c Stefan Becker
2001-07-21 17:05 ` Alexander Griesser
2001-07-21 17:36 ` Robert Love
2001-07-21 21:39 ` Andrzej Krzysztofowicz
2001-07-22 3:58 ` Stefan Becker
2001-07-22 4:05 ` Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox