* Re: 2.6.16-mm1 [not found] ` <6bffcb0e0603230631r5e6cc3d3p@mail.gmail.com> @ 2006-03-23 14:49 ` Russell King 2006-03-23 16:11 ` 2.6.16-mm1 Michal Piotrowski 2006-03-24 11:28 ` 2.6.16-mm1 Roman Zippel 0 siblings, 2 replies; 5+ messages in thread From: Russell King @ 2006-03-23 14:49 UTC (permalink / raw) To: Michal Piotrowski, Roman Zippel; +Cc: Andrew Morton, linux-kernel, linux-serial On Thu, Mar 23, 2006 at 03:31:45PM +0100, Michal Piotrowski wrote: > Hi, > > On 23/03/06, Andrew Morton <akpm@osdl.org> wrote: > > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16/2.6.16-mm1/ > > > > Something went wrong with serial code. > > make > [..] > CC init/version.o > LD init/built-in.o > LD .tmp_vmlinux1 > drivers/built-in.o: In function > `serial_pnp_probe':/usr/src/linux-mm/drivers/serial/8250_pnp.c:435: > undefined reference to `serial8250_register_port' > drivers/built-in.o: In function > `serial_pnp_remove':/usr/src/linux-mm/drivers/serial/8250_pnp.c:447: > undefined reference to `serial8250_unregister_port' > drivers/built-in.o: In function > `pciserial_suspend_ports':/usr/src/linux-mm/drivers/serial/8250_pci.c:1690: > undefined reference to `serial8250_suspend_port' > drivers/built-in.o: In function > `pciserial_resume_ports':/usr/src/linux-mm/drivers/serial/8250_pci.c:1706: > undefined reference to `serial8250_resume_port' > drivers/built-in.o: In function > `pciserial_remove_ports':/usr/src/linux-mm/drivers/serial/8250_pci.c:1665: > undefined reference to `serial8250_unregister_port' > drivers/built-in.o: In function > `pciserial_init_ports':/usr/src/linux-mm/drivers/serial/8250_pci.c:1640: > undefined reference to `serial8250_register_port' > make[1]: *** [.tmp_vmlinux1] B??d 1 > make: *** [_all] B??d 2 > > Here is config http://www.stardust.webpages.pl/files/mm/2.6.16-mm1/mm-config CONFIG_SERIAL_8250=m CONFIG_SERIAL_8250_PCI=y CONFIG_SERIAL_8250_PNP=y That's an illegal configuration. +config SERIAL_8250_PCI + tristate "8250/16550 PCI device support" if EMBEDDED + depends on SERIAL_8250 && PCI + default y if SERIAL_8250 is 'm' there's no way that SERIAL_8250_PCI should be 'y'. Maybe it's a bug in kconfig - seems like it. Let's try some experiments: config SYM_Y bool default y config SYM_M tristate default m config SYM_D tristate 'SYM_D' depends on SYM_M && SYM_Y With this I'm offered: SYM_D (SYM_D) [N/m] (NEW) so Kconfig thinks the only legal values for SYM_D are 'n' and 'm', and the default is 'n'. If I add a default line to SYM_D thusly: config SYM_D tristate 'SYM_D' depends on SYM_M && SYM_Y default y I'm now offered: SYM_D (SYM_D) [M/n] (NEW) Okay, so the default is now 'm', but the legal values are still only 'n' and 'm'. I can only select 'm' or 'n', and this is what I end up with in the config file. Now, if I remove the prompt text: config SYM_D tristate depends on SYM_M && SYM_Y default y and hey presto, suddenly 'y' becomes a legal value. CONFIG_SYM_Y=y CONFIG_SYM_M=m CONFIG_SYM_D=y So it would seem to be a Kconfig bug. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.6.16-mm1 2006-03-23 14:49 ` 2.6.16-mm1 Russell King @ 2006-03-23 16:11 ` Michal Piotrowski 2006-03-24 11:28 ` 2.6.16-mm1 Roman Zippel 1 sibling, 0 replies; 5+ messages in thread From: Michal Piotrowski @ 2006-03-23 16:11 UTC (permalink / raw) To: Michal Piotrowski, Roman Zippel, Andrew Morton, linux-kernel, linux-serial Hi Russell, On 23/03/06, Russell King <rmk+lkml@arm.linux.org.uk> wrote: > CONFIG_SERIAL_8250=m > CONFIG_SERIAL_8250_PCI=y > CONFIG_SERIAL_8250_PNP=y > > That's an illegal configuration. > [snip] > > So it would seem to be a Kconfig bug. Thanks for explanation of the problem Everything is ok, when I state CONFIG_SERIAL_8250=y in kernel config. Regards, Michal -- Michal K. K. Piotrowski LTG - Linux Testers Group (http://www.stardust.webpages.pl/ltg/wiki/) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.6.16-mm1 2006-03-23 14:49 ` 2.6.16-mm1 Russell King 2006-03-23 16:11 ` 2.6.16-mm1 Michal Piotrowski @ 2006-03-24 11:28 ` Roman Zippel 2006-03-24 19:59 ` 2.6.16-mm1 Russell King 1 sibling, 1 reply; 5+ messages in thread From: Roman Zippel @ 2006-03-24 11:28 UTC (permalink / raw) To: Russell King; +Cc: Michal Piotrowski, Andrew Morton, linux-kernel, linux-serial Hi, On Thu, 23 Mar 2006, Russell King wrote: > Okay, so the default is now 'm', but the legal values are still only 'n' > and 'm'. I can only select 'm' or 'n', and this is what I end up with in > the config file. Now, if I remove the prompt text: > > config SYM_D > tristate > depends on SYM_M && SYM_Y > default y > > and hey presto, suddenly 'y' becomes a legal value. > > CONFIG_SYM_Y=y > CONFIG_SYM_M=m > CONFIG_SYM_D=y > > So it would seem to be a Kconfig bug. No, it's not a bug, that's really the correct behaviour. It has its roots in the cml1 converter, where statements like this: if [ "$CONFIG_FOO" = "y" ]; then define_tristate CONFIG_BAR y fi would become: config BAR default y depends on FOO=y The basic idea is that the dependency only enables the default and the default sets the symbol to whatever you want. I thought about the other behaviour, but at that time the if syntax or select didn't exists yet, so it really wasn't a problem yet and I decided to keep it closer to cml1 instead. In the meantime the Kconfig syntax has grown and this is not the first time this has come up. I'm not completely opposed against changing the behaviour, but I don't want to do it just for fun either. It would require at least to grep through the current Kconfig rules to check whether something depends on the current behaviour. As alternative you can change the default to "SYM_M" (basically repeating the dependency without the booleans). bye, Roman ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.6.16-mm1 2006-03-24 11:28 ` 2.6.16-mm1 Roman Zippel @ 2006-03-24 19:59 ` Russell King 2006-03-28 9:18 ` 2.6.16-mm1 Roman Zippel 0 siblings, 1 reply; 5+ messages in thread From: Russell King @ 2006-03-24 19:59 UTC (permalink / raw) To: Roman Zippel; +Cc: Michal Piotrowski, Andrew Morton, linux-kernel, linux-serial On Fri, Mar 24, 2006 at 12:28:27PM +0100, Roman Zippel wrote: > Hi, > > On Thu, 23 Mar 2006, Russell King wrote: > > > Okay, so the default is now 'm', but the legal values are still only 'n' > > and 'm'. I can only select 'm' or 'n', and this is what I end up with in > > the config file. Now, if I remove the prompt text: > > > > config SYM_D > > tristate > > depends on SYM_M && SYM_Y > > default y > > > > and hey presto, suddenly 'y' becomes a legal value. > > > > CONFIG_SYM_Y=y > > CONFIG_SYM_M=m > > CONFIG_SYM_D=y > > > > So it would seem to be a Kconfig bug. > > No, it's not a bug, that's really the correct behaviour. It has its roots > in the cml1 converter, where statements like this: > > if [ "$CONFIG_FOO" = "y" ]; then > define_tristate CONFIG_BAR y > fi > > would become: > > config BAR > default y > depends on FOO=y Okay, so going to the exact problem case, the behaviour we require is: SERIAL_8250 PCI EMBEDDED gives SERIAL_8250_PCI n X X n X n X n m y n m y y n y m y y user selects 'm' or 'n' y y y user selects 'y', 'm' or 'n' the correct way to tell Kconfig to give us that is: +config SERIAL_8250_PCI + tristate "8250/16550 PCI device support" if EMBEDDED + depends on SERIAL_8250 && PCI + default SERIAL_8250 + help + This builds standard PCI serial support. You may be able to + disable this feature if you only need legacy serial support. + Saves about 9K. ? -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 2.6.16-mm1 2006-03-24 19:59 ` 2.6.16-mm1 Russell King @ 2006-03-28 9:18 ` Roman Zippel 0 siblings, 0 replies; 5+ messages in thread From: Roman Zippel @ 2006-03-28 9:18 UTC (permalink / raw) To: Russell King; +Cc: Michal Piotrowski, Andrew Morton, linux-kernel, linux-serial Hi, On Fri, 24 Mar 2006, Russell King wrote: > the correct way to tell Kconfig to give us that is: > > +config SERIAL_8250_PCI > + tristate "8250/16550 PCI device support" if EMBEDDED > + depends on SERIAL_8250 && PCI > + default SERIAL_8250 > + help > + This builds standard PCI serial support. You may be able to > + disable this feature if you only need legacy serial support. > + Saves about 9K. > > ? Yes, this should do it. bye, Roman ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-03-28 9:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20060323014046.2ca1d9df.akpm@osdl.org>
[not found] ` <6bffcb0e0603230631r5e6cc3d3p@mail.gmail.com>
2006-03-23 14:49 ` 2.6.16-mm1 Russell King
2006-03-23 16:11 ` 2.6.16-mm1 Michal Piotrowski
2006-03-24 11:28 ` 2.6.16-mm1 Roman Zippel
2006-03-24 19:59 ` 2.6.16-mm1 Russell King
2006-03-28 9:18 ` 2.6.16-mm1 Roman Zippel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox