linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ath5k: bad udelay call, build failure on ARM
@ 2008-08-25 11:57 Martin Michlmayr
  2008-08-25 19:08 ` John W. Linville
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Michlmayr @ 2008-08-25 11:57 UTC (permalink / raw)
  To: ath5k-devel, linux-wireless

ath5k fails to build on ARM with:

__bad_udelay is specifically designed on ARM to fail when udelay is
called in a bad way.  arch/arm/include/asm/delay.h has this to say
about __bad_udelay:

/*
 * This function intentionally does not exist; if you see references to
 * it, it means that you're calling udelay() with an out of range value.
 *
 * With currently imposed limits, this means that we support a max delay
 * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
 */
extern void __bad_udelay(void);

Can you check why your driver is calling udelay() with a value > 2000?

-- 
Martin Michlmayr
http://www.cyrius.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ath5k: bad udelay call, build failure on ARM
  2008-08-25 11:57 ath5k: bad udelay call, build failure on ARM Martin Michlmayr
@ 2008-08-25 19:08 ` John W. Linville
  2008-08-25 19:36   ` [ath5k-devel] " Nick Kossifidis
  2008-08-26  5:05   ` Martin Michlmayr
  0 siblings, 2 replies; 6+ messages in thread
From: John W. Linville @ 2008-08-25 19:08 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: ath5k-devel, linux-wireless

On Mon, Aug 25, 2008 at 02:57:15PM +0300, Martin Michlmayr wrote:
> ath5k fails to build on ARM with:
> 
> __bad_udelay is specifically designed on ARM to fail when udelay is
> called in a bad way.  arch/arm/include/asm/delay.h has this to say
> about __bad_udelay:
> 
> /*
>  * This function intentionally does not exist; if you see references to
>  * it, it means that you're calling udelay() with an out of range value.
>  *
>  * With currently imposed limits, this means that we support a max delay
>  * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
>  */
> extern void __bad_udelay(void);
> 
> Can you check why your driver is calling udelay() with a value > 2000?

There are "udelay(2300)" calls in phy.c and hw.c.  How important is
that exact number?  Could those be replaced by mdelay(3) instead?

Of course, looking in include/linux/delay.h, mdelay(3) may still
translate to __bad_udelay on arm.  It would be nice if the ARM guys
and delay.h could at least agree on the maximum value allowed to be
passed to udelay...

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ath5k-devel] ath5k: bad udelay call, build failure on ARM
  2008-08-25 19:08 ` John W. Linville
@ 2008-08-25 19:36   ` Nick Kossifidis
  2008-09-10  9:36     ` Martin Michlmayr
  2008-08-26  5:05   ` Martin Michlmayr
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Kossifidis @ 2008-08-25 19:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: Martin Michlmayr, ath5k-devel, linux-wireless

2008/8/25 John W. Linville <linville@tuxdriver.com>:
> On Mon, Aug 25, 2008 at 02:57:15PM +0300, Martin Michlmayr wrote:
>> ath5k fails to build on ARM with:
>>
>> __bad_udelay is specifically designed on ARM to fail when udelay is
>> called in a bad way.  arch/arm/include/asm/delay.h has this to say
>> about __bad_udelay:
>>
>> /*
>>  * This function intentionally does not exist; if you see references to
>>  * it, it means that you're calling udelay() with an out of range value.
>>  *
>>  * With currently imposed limits, this means that we support a max delay
>>  * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
>>  */
>> extern void __bad_udelay(void);
>>
>> Can you check why your driver is calling udelay() with a value > 2000?
>
> There are "udelay(2300)" calls in phy.c and hw.c.  How important is
> that exact number?  Could those be replaced by mdelay(3) instead?
>
> Of course, looking in include/linux/delay.h, mdelay(3) may still
> translate to __bad_udelay on arm.  It would be nice if the ARM guys
> and delay.h could at least agree on the maximum value allowed to be
> passed to udelay...
>
> John

Sorry for that i just haven't tested 5210 code much (these are older
chips that need more delay). I'll do some tests asap and tweak this
value to be in range.



-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ath5k: bad udelay call, build failure on ARM
  2008-08-25 19:08 ` John W. Linville
  2008-08-25 19:36   ` [ath5k-devel] " Nick Kossifidis
@ 2008-08-26  5:05   ` Martin Michlmayr
  1 sibling, 0 replies; 6+ messages in thread
From: Martin Michlmayr @ 2008-08-26  5:05 UTC (permalink / raw)
  To: John W. Linville; +Cc: ath5k-devel, linux-wireless

* John W. Linville <linville@tuxdriver.com> [2008-08-25 15:08]:
> There are "udelay(2300)" calls in phy.c and hw.c.  How important is
> that exact number?  Could those be replaced by mdelay(3) instead?
> 
> Of course, looking in include/linux/delay.h, mdelay(3) may still
> translate to __bad_udelay on arm.

mdelay(3) compiles on ARM, so replacing the udelay(2300) with
mdelay(3) might be an option. (I don't have the hardware to test
though.)
-- 
Martin Michlmayr
http://www.cyrius.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ath5k-devel] ath5k: bad udelay call, build failure on ARM
  2008-08-25 19:36   ` [ath5k-devel] " Nick Kossifidis
@ 2008-09-10  9:36     ` Martin Michlmayr
  2008-09-11 14:20       ` Nick Kossifidis
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Michlmayr @ 2008-09-10  9:36 UTC (permalink / raw)
  To: Nick Kossifidis; +Cc: John W. Linville, ath5k-devel, linux-wireless

* Nick Kossifidis <mickflemm@gmail.com> [2008-08-25 22:36]:
> > There are "udelay(2300)" calls in phy.c and hw.c.  How important is
> > that exact number?  Could those be replaced by mdelay(3) instead?
> >
> > Of course, looking in include/linux/delay.h, mdelay(3) may still
> > translate to __bad_udelay on arm.  It would be nice if the ARM guys
> > and delay.h could at least agree on the maximum value allowed to be
> > passed to udelay...
> >
> > John
> 
> Sorry for that i just haven't tested 5210 code much (these are older
> chips that need more delay). I'll do some tests asap and tweak this
> value to be in range.

Did you have a chance to do these tests yet?
-- 
Martin Michlmayr
http://www.cyrius.com/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ath5k-devel] ath5k: bad udelay call, build failure on ARM
  2008-09-10  9:36     ` Martin Michlmayr
@ 2008-09-11 14:20       ` Nick Kossifidis
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Kossifidis @ 2008-09-11 14:20 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: John W. Linville, ath5k-devel, linux-wireless

2008/9/10 Martin Michlmayr <tbm@cyrius.com>:
> * Nick Kossifidis <mickflemm@gmail.com> [2008-08-25 22:36]:
>> > There are "udelay(2300)" calls in phy.c and hw.c.  How important is
>> > that exact number?  Could those be replaced by mdelay(3) instead?
>> >
>> > Of course, looking in include/linux/delay.h, mdelay(3) may still
>> > translate to __bad_udelay on arm.  It would be nice if the ARM guys
>> > and delay.h could at least agree on the maximum value allowed to be
>> > passed to udelay...
>> >
>> > John
>>
>> Sorry for that i just haven't tested 5210 code much (these are older
>> chips that need more delay). I'll do some tests asap and tweak this
>> value to be in range.
>
> Did you have a chance to do these tests yet?

Next week i hope, sorry for the delay ;-(



-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-11 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-25 11:57 ath5k: bad udelay call, build failure on ARM Martin Michlmayr
2008-08-25 19:08 ` John W. Linville
2008-08-25 19:36   ` [ath5k-devel] " Nick Kossifidis
2008-09-10  9:36     ` Martin Michlmayr
2008-09-11 14:20       ` Nick Kossifidis
2008-08-26  5:05   ` Martin Michlmayr

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).