From: David Miller <davem@davemloft.net>
To: andi@firstfloor.org
Cc: netdev@vger.kernel.org
Subject: Re: __bad_udelay in network driver breaks build
Date: Mon, 25 Oct 2010 13:05:13 -0700 (PDT) [thread overview]
Message-ID: <20101025.130513.102558756.davem@davemloft.net> (raw)
In-Reply-To: <20101018115230.GA27565@basil.fritz.box>
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
next prev parent reply other threads:[~2010-10-25 20:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-18 11:52 __bad_udelay in network driver breaks build Andi Kleen
2010-10-25 20:05 ` David Miller [this message]
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
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=20101025.130513.102558756.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=andi@firstfloor.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).