On Wed, 26 Oct 2011, Konrad Rzepecki wrote: > Hi > > Kernel bugzilla is still offline, so I must write bug report here. That's okay. > On two my computers, newest 3.1 kernel won't compile (link to be more > specific). Both problems are different but it seems to be related. Both > occurs in usb subsystem and are connected with "__bad_udelay". > > Machine 1: > uname -a: Linux www 3.0.0-Slackware #1 SMP Mon Jul 25 15:26:21 CEST 2011 > i686 prescott i386 GNU/Linux > gcc --version: gcc (GCC) 3.4.6 > ld -v: GNU ld version 2.15.92.0.2 20040927 > > error: > CC init/version.o > LD init/built-in.o > LD .tmp_vmlinux1 > drivers/built-in.o(.devinit.text+0xed31): In function > `quirk_usb_disable_ehci': > : undefined reference to `__bad_udelay' > make: *** [.tmp_vmlinux1] Błąd 1 > > > Machine 2: > uname -a: Linux ns 3.0.0-Slackware #2 SMP Mon Jul 25 14:56:10 CEST 2011 > x86_64 x86_64 x86_64 GNU/Linux > gcc --version: gcc (GCC) 3.4.6 > ld -v: GNU ld version 2.16.92 20060416 > > error: > CC init/version.o > LD init/built-in.o > LD .tmp_vmlinux1 > drivers/built-in.o: In function `quirk_usb_early_handoff': > pci-quirks.c:(.devinit.text+0x7976): undefined reference to `__bad_udelay' > make: *** [.tmp_vmlinux1] Błąd 1 __bad_delay is always supposed to generate link errors -- take a look at include/asm-generic/delay.h. The real question is why your compiler created a reference to __bad_delay in the first place. My system has no trouble building a 3.1 kernel: gcc --version: gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4) > I use '2' config to compile kernel on slackware-current64 - it build > without problem. > > I also try to compile kernel on '2' with "defconfig", it also build > without problem. > > > It seems error exists only with older toolchain (however still > supported) when usb support is compile in kernel. > > > If you need I can provide detailed info (configs, other tool versions, etc). > > When really necessary I can bisect to found exactly commit that cause > this problem. However this will be very inconvenient to do this on those > systems, so i want to avoid it, if not really needed. The code is pretty easy to understand. __bad_udelay is used to generate an error whenever the delay would be 20000 us or longer. But the delay in quirk_usb_early_handoff() is only 100 us, so there's no reason for an error. Probably the old compiler, even though it may nominally still be supported, doesn't generate correct code here. Since this is a compiler problem, you ought to report it on a more appropriate mailing list. I'm not sure which list would be best, but you can always use LKML. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html