From: Willy Tarreau <w@1wt.eu>
To: Michael Buesch <mb@bu3sch.de>
Cc: Jukka Partanen <jspartanen@gmail.com>,
kkeil@suse.de, linux-kernel@vger.kernel.org,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 2.4.32] Fix AVM C4 ISDN card init problems with newer CPUs
Date: Fri, 4 Aug 2006 14:21:55 +0200 [thread overview]
Message-ID: <20060804122155.GA25727@1wt.eu> (raw)
In-Reply-To: <200608041239.13260.mb@bu3sch.de>
On Fri, Aug 04, 2006 at 12:39:12PM +0200, Michael Buesch wrote:
> On Friday 04 August 2006 08:56, Willy Tarreau wrote:
> > On Thu, Aug 03, 2006 at 06:56:15PM +0100, Alan Cox wrote:
> > > Ar Iau, 2006-08-03 am 19:53 +0300, ysgrifennodd Jukka Partanen:
> > > > AVM C4 ISDN NIC: Add three memory barriers, taken from 2.6.7,
> > > > (they are there in 2.6.17.7 too), to fix module initialization
> > > > problems appearing with at least some newer Celerons and
> > > > Pentium III.
> > >
> > > Should be using cpu_relax() I think. Its a polled busy loop so you want
> > > other CPU threads to run if possible.
> >
> > You mean like this ? Here's the patch for 2.6, I'll queue the same for 2.4
> > if it's alright.
> >
> > > Alan
> >
> > Regards,
> > Willy
> >
> > From 512d12bd7ce9c0a15dfd91a6f7c2970c92b3abdd Mon Sep 17 00:00:00 2001
> > From: Willy Tarreau <w@1wt.eu>
> > Date: Fri, 4 Aug 2006 08:50:10 +0200
> > Subject: [PATCH] AVM C4 ISDN card : use cpu_relax() in busy loops
> >
> > As suggested by Alan, use cpu_relax() in 3 busy loops : "It's a
> > polled busy loop so you want other CPU threads to run if possible".
> >
> > Signed-off-by: Willy Tarreau <w@1wt.eu>
> > ---
> > drivers/isdn/hardware/avm/c4.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
> > index f7253b2..aee278e 100644
> > --- a/drivers/isdn/hardware/avm/c4.c
> > +++ b/drivers/isdn/hardware/avm/c4.c
> > @@ -22,6 +22,7 @@ #include <linux/capi.h>
> > #include <linux/kernelcapi.h>
> > #include <linux/init.h>
> > #include <asm/io.h>
> > +#include <asm/processor.h>
> > #include <asm/uaccess.h>
> > #include <linux/netdevice.h>
> > #include <linux/isdn/capicmd.h>
> > @@ -150,6 +151,7 @@ static inline int wait_for_doorbell(avmc
> > if (!time_before(jiffies, stop))
> > return -1;
> > mb();
> > + cpu_relax();
>
> cpu_relax() implies a memory barrier.
OK fine. Reading from various asm-xxx/processor.h files, I was not sure about this.
I will repost it fixed and queue it for next 2.4 too.
> Greetings Michael.
Thanks,
Willy
next prev parent reply other threads:[~2006-08-04 12:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 16:53 [PATCH 2.4.32] Fix AVM C4 ISDN card init problems with newer CPUs Jukka Partanen
2006-08-03 17:31 ` Karsten Keil
2006-08-04 10:00 ` Alan Cox
2006-08-03 17:56 ` Alan Cox
2006-08-04 5:08 ` Willy Tarreau
2006-08-04 6:56 ` Willy Tarreau
2006-08-04 10:39 ` Michael Buesch
2006-08-04 12:21 ` Willy Tarreau [this message]
2006-08-04 20:14 ` Willy Tarreau
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=20060804122155.GA25727@1wt.eu \
--to=w@1wt.eu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jspartanen@gmail.com \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@bu3sch.de \
/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