* __bad_udelay in network driver breaks build @ 2010-10-18 11:52 Andi Kleen 2010-10-25 20:05 ` David Miller 0 siblings, 1 reply; 6+ messages in thread From: Andi Kleen @ 2010-10-18 11:52 UTC (permalink / raw) To: netdev Current Linus master x86-64 allyesconfig fails with drivers/built-in.o: In function `tms380tr_chipset_init': tms380tr.c:(.text+0x10f02de): undefined reference to `__bad_udelay' tms380tr.c:(.text+0x10f03ab): undefined reference to `__bad_udelay' tms380tr.c:(.text+0x10f0400): undefined reference to `__bad_udelay' tms380tr.c:(.text+0x10f07b2): undefined reference to `__bad_udelay' tms380tr.c:(.text+0x10f08ed): undefined reference to `__bad_udelay' make[2]: *** [.tmp_vmlinux1] Error 1 -Andi -- ak@linux.intel.com -- Speaking for myself only. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __bad_udelay in network driver breaks build 2010-10-18 11:52 __bad_udelay in network driver breaks build Andi Kleen @ 2010-10-25 20:05 ` David Miller 2010-10-25 22:10 ` Andi Kleen 0 siblings, 1 reply; 6+ messages in thread From: David Miller @ 2010-10-25 20:05 UTC (permalink / raw) To: andi; +Cc: netdev From: Andi Kleen <andi@firstfloor.org> Date: Mon, 18 Oct 2010 13:52:30 +0200 > > Current Linus master x86-64 allyesconfig fails with > > drivers/built-in.o: In function `tms380tr_chipset_init': > tms380tr.c:(.text+0x10f02de): undefined reference to `__bad_udelay' > tms380tr.c:(.text+0x10f03ab): undefined reference to `__bad_udelay' > tms380tr.c:(.text+0x10f0400): undefined reference to `__bad_udelay' > tms380tr.c:(.text+0x10f07b2): undefined reference to `__bad_udelay' > tms380tr.c:(.text+0x10f08ed): undefined reference to `__bad_udelay' > make[2]: *** [.tmp_vmlinux1] Error 1 Let me know if this fixes things: -------------------- tms380tr: Use mdelay() in tms380tr_wait(). This driver tries to do up to half-second udelay() calls, which overflows on x86-64. Reported-by: Andi Kleen <andi@firstfloor.org> Signed-off-by: David S. Miller <davem@davemloft.net> --- drivers/net/tokenring/tms380tr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index 663b886..7930203 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c @@ -1220,7 +1220,7 @@ void tms380tr_wait(unsigned long time) tmp = schedule_timeout_interruptible(tmp); } while(time_after(tmp, jiffies)); #else - udelay(time); + mdelay(time / 1000); #endif } -- 1.7.3.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: __bad_udelay in network driver breaks build 2010-10-25 20:05 ` David Miller @ 2010-10-25 22:10 ` Andi Kleen 2010-10-25 23:48 ` David Miller 2010-10-26 17:34 ` Duyck, Alexander H 0 siblings, 2 replies; 6+ messages in thread From: Andi Kleen @ 2010-10-25 22:10 UTC (permalink / raw) To: David Miller; +Cc: andi, netdev, jeffrey.t.kirsher, alexander.h.duyck On Mon, Oct 25, 2010 at 01:05:13PM -0700, David Miller wrote: > From: Andi Kleen <andi@firstfloor.org> > Date: Mon, 18 Oct 2010 13:52:30 +0200 > > > > > Current Linus master x86-64 allyesconfig fails with > > > > drivers/built-in.o: In function `tms380tr_chipset_init': > > tms380tr.c:(.text+0x10f02de): undefined reference to `__bad_udelay' > > tms380tr.c:(.text+0x10f03ab): undefined reference to `__bad_udelay' > > tms380tr.c:(.text+0x10f0400): undefined reference to `__bad_udelay' > > tms380tr.c:(.text+0x10f07b2): undefined reference to `__bad_udelay' > > tms380tr.c:(.text+0x10f08ed): undefined reference to `__bad_udelay' > > make[2]: *** [.tmp_vmlinux1] Error 1 > > Let me know if this fixes things: Fixes that problem, but now I get (with Linus' latest again and a gcc 4.6 snapshot) In file included from /home/lsrc/git/linux-2.6/drivers/net/igbvf/ethtool.c:36:0: /home/lsrc/git/linux-2.6/drivers/net/igbvf/igbvf.h:129:15: error: duplicate member 'page' make[5]: *** [drivers/net/igbvf/ethtool.o] Error 1 make[4]: *** [drivers/net/igbvf] Error 2 struct igbvf_buffer { dma_addr_t dma; struct sk_buff *skb; union { /* Tx */ struct { unsigned long time_stamp; u16 length; u16 next_to_watch; u16 mapped_as_page; }; /* Rx */ struct { struct page *page; <--------------- No 1 u64 page_dma; unsigned int page_offset; }; }; struct page *page; <------------ No 2 }; Hmm conflict of a member with a transparent union. Maybe older gccs didn't catch that. But it looks very broken Alexander, can you sort out which "page" member should be used where? And there's another problem in SCSI which I'll report separately. -Andi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: __bad_udelay in network driver breaks build 2010-10-25 22:10 ` Andi Kleen @ 2010-10-25 23:48 ` David Miller 2010-10-26 17:34 ` Duyck, Alexander H 1 sibling, 0 replies; 6+ messages in thread From: David Miller @ 2010-10-25 23:48 UTC (permalink / raw) To: andi; +Cc: netdev, jeffrey.t.kirsher, alexander.h.duyck From: Andi Kleen <andi@firstfloor.org> Date: Tue, 26 Oct 2010 00:10:42 +0200 > In file included from /home/lsrc/git/linux-2.6/drivers/net/igbvf/ethtool.c:36:0: > /home/lsrc/git/linux-2.6/drivers/net/igbvf/igbvf.h:129:15: error: duplicate member 'page' > make[5]: *** [drivers/net/igbvf/ethtool.o] Error 1 > make[4]: *** [drivers/net/igbvf] Error 2 Oh that's fun :-) Intel folks please take a look. ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: __bad_udelay in network driver breaks build 2010-10-25 22:10 ` Andi Kleen 2010-10-25 23:48 ` David Miller @ 2010-10-26 17:34 ` Duyck, Alexander H 2010-10-26 17:36 ` Rose, Gregory V 1 sibling, 1 reply; 6+ messages in thread From: Duyck, Alexander H @ 2010-10-26 17:34 UTC (permalink / raw) To: Andi Kleen, David Miller Cc: netdev@vger.kernel.org, Kirsher, Jeffrey T, Rose, Gregory V >-----Original Message----- >From: Andi Kleen [mailto:andi@firstfloor.org] >Sent: Monday, October 25, 2010 3:11 PM >To: David Miller >Cc: andi@firstfloor.org; netdev@vger.kernel.org; Kirsher, Jeffrey T; >Duyck, Alexander H >Subject: Re: __bad_udelay in network driver breaks build > >On Mon, Oct 25, 2010 at 01:05:13PM -0700, David Miller wrote: >> From: Andi Kleen <andi@firstfloor.org> >> Date: Mon, 18 Oct 2010 13:52:30 +0200 >> >> > >> > Current Linus master x86-64 allyesconfig fails with >> > >> > drivers/built-in.o: In function `tms380tr_chipset_init': >> > tms380tr.c:(.text+0x10f02de): undefined reference to >`__bad_udelay' >> > tms380tr.c:(.text+0x10f03ab): undefined reference to >`__bad_udelay' >> > tms380tr.c:(.text+0x10f0400): undefined reference to >`__bad_udelay' >> > tms380tr.c:(.text+0x10f07b2): undefined reference to >`__bad_udelay' >> > tms380tr.c:(.text+0x10f08ed): undefined reference to >`__bad_udelay' >> > make[2]: *** [.tmp_vmlinux1] Error 1 >> >> Let me know if this fixes things: > >Fixes that problem, but now I get (with Linus' latest again and a gcc >4.6 >snapshot) > >In file included from /home/lsrc/git/linux- >2.6/drivers/net/igbvf/ethtool.c:36:0: >/home/lsrc/git/linux-2.6/drivers/net/igbvf/igbvf.h:129:15: error: >duplicate member 'page' >make[5]: *** [drivers/net/igbvf/ethtool.o] Error 1 >make[4]: *** [drivers/net/igbvf] Error 2 > >struct igbvf_buffer { > dma_addr_t dma; > struct sk_buff *skb; > union { > /* Tx */ > struct { > unsigned long time_stamp; > u16 length; > u16 next_to_watch; > u16 mapped_as_page; > }; > /* Rx */ > struct { > struct page *page; <--------------- No 1 > u64 page_dma; > unsigned int page_offset; > }; > }; > struct page *page; <------------ No 2 >}; > >Hmm conflict of a member with a transparent union. >Maybe older gccs didn't catch that. But it looks very broken > >Alexander, can you sort out which "page" member should be used where? > >And there's another problem in SCSI which I'll report separately. > >-Andi Yeah, I'm pretty sure the 2nd page pointer shouldn't be there. We will look into correcting that. Thanks, Alex ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: __bad_udelay in network driver breaks build 2010-10-26 17:34 ` Duyck, Alexander H @ 2010-10-26 17:36 ` Rose, Gregory V 0 siblings, 0 replies; 6+ messages in thread From: Rose, Gregory V @ 2010-10-26 17:36 UTC (permalink / raw) To: Duyck, Alexander H, Andi Kleen, David Miller Cc: netdev@vger.kernel.org, Kirsher, Jeffrey T > -----Original Message----- > From: Duyck, Alexander H > Sent: Tuesday, October 26, 2010 10:35 AM > To: Andi Kleen; David Miller > Cc: netdev@vger.kernel.org; Kirsher, Jeffrey T; Rose, Gregory V > Subject: RE: __bad_udelay in network driver breaks build > > >-----Original Message----- > >From: Andi Kleen [mailto:andi@firstfloor.org] > >Sent: Monday, October 25, 2010 3:11 PM > >To: David Miller > >Cc: andi@firstfloor.org; netdev@vger.kernel.org; Kirsher, Jeffrey T; > >Duyck, Alexander H > >Subject: Re: __bad_udelay in network driver breaks build > > > >On Mon, Oct 25, 2010 at 01:05:13PM -0700, David Miller wrote: > >> From: Andi Kleen <andi@firstfloor.org> > >> Date: Mon, 18 Oct 2010 13:52:30 +0200 > >> > >> > > >> > Current Linus master x86-64 allyesconfig fails with > >> > > >> > drivers/built-in.o: In function `tms380tr_chipset_init': > >> > tms380tr.c:(.text+0x10f02de): undefined reference to > >`__bad_udelay' > >> > tms380tr.c:(.text+0x10f03ab): undefined reference to > >`__bad_udelay' > >> > tms380tr.c:(.text+0x10f0400): undefined reference to > >`__bad_udelay' > >> > tms380tr.c:(.text+0x10f07b2): undefined reference to > >`__bad_udelay' > >> > tms380tr.c:(.text+0x10f08ed): undefined reference to > >`__bad_udelay' > >> > make[2]: *** [.tmp_vmlinux1] Error 1 > >> > >> Let me know if this fixes things: > > > >Fixes that problem, but now I get (with Linus' latest again and a gcc > >4.6 > >snapshot) > > > >In file included from /home/lsrc/git/linux- > >2.6/drivers/net/igbvf/ethtool.c:36:0: > >/home/lsrc/git/linux-2.6/drivers/net/igbvf/igbvf.h:129:15: error: > >duplicate member 'page' > >make[5]: *** [drivers/net/igbvf/ethtool.o] Error 1 > >make[4]: *** [drivers/net/igbvf] Error 2 > > > >struct igbvf_buffer { > > dma_addr_t dma; > > struct sk_buff *skb; > > union { > > /* Tx */ > > struct { > > unsigned long time_stamp; > > u16 length; > > u16 next_to_watch; > > u16 mapped_as_page; > > }; > > /* Rx */ > > struct { > > struct page *page; <--------------- No 1 > > u64 page_dma; > > unsigned int page_offset; > > }; > > }; > > struct page *page; <------------ No 2 > >}; > > > >Hmm conflict of a member with a transparent union. > >Maybe older gccs didn't catch that. But it looks very broken > > > >Alexander, can you sort out which "page" member should be used where? > > > >And there's another problem in SCSI which I'll report separately. > > > >-Andi > > Yeah, I'm pretty sure the 2nd page pointer shouldn't be there. We will > look into correcting that. > > Thanks, > > Alex I'll post a patch to correct this directly. Thanks, - Greg ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-26 17:36 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-10-18 11:52 __bad_udelay in network driver breaks build Andi Kleen 2010-10-25 20:05 ` David Miller 2010-10-25 22:10 ` Andi Kleen 2010-10-25 23:48 ` David Miller 2010-10-26 17:34 ` Duyck, Alexander H 2010-10-26 17:36 ` Rose, Gregory V
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).