From: Helge Deller <deller@gmx.de>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: linux-parisc@vger.kernel.org
Subject: Re: [PATCH, RFC] fix parisc runtime hangs wrt pa_tlb_lock
Date: Sat, 23 May 2009 21:34:37 +0200 [thread overview]
Message-ID: <4A184FCD.90903@gmx.de> (raw)
In-Reply-To: <20090523153430.A246E4FB4@hiauly1.hia.nrc.ca>
John David Anglin wrote:
>>> -#define purge_tlb_start(x) spin_lock(&pa_tlb_lock)
>>> -#define purge_tlb_end(x) spin_unlock(&pa_tlb_lock)
>>> +#define purge_tlb_start(x) do { unsigned long flags; spin_lock_irqsave(&pa_tlb_lock, flags)
>>> +#define purge_tlb_end(x) spin_unlock_irqrestore(&pa_tlb_lock, flags); } while (0)
>> To my taste, the handling of the "flags" variable is ugly and potentially
>> error prone.
>>
>> I think it would be better to add another argument to the macros, and declare
>> the variable flags in the routines that use the macros (as is done for the
>> current users of spin_lock_irqsave macro).
>
> Actually, the 'x' argument could be used for this.
I mentioned in my original mail that this is not the final version:
> The patch below is just a hack. It will need a cleanup and is just to open
> discussions here on the list.
But instead of cleaning it up right now, I would be very much interested if
this patch fixes the kernel stalls you see as well?
If it does, then I agree that we should add a "flags" argument to purge_tlb_xxx() functions, e.g.
- purge_tlb_start(lock, flags)
- purge_tlb_end(lock, flags)
Helge
next prev parent reply other threads:[~2009-05-23 19:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 20:13 [PATCH, RFC] fix parisc runtime hangs wrt pa_tlb_lock Helge Deller
2009-05-23 15:26 ` John David Anglin
2009-05-23 15:34 ` John David Anglin
2009-05-23 19:34 ` Helge Deller [this message]
2009-05-23 20:03 ` John David Anglin
2009-05-23 21:53 ` John David Anglin
2009-05-28 1:50 ` John David Anglin
2009-06-06 21:25 ` Helge Deller
2009-06-14 22:05 ` Helge Deller
2009-06-14 23:20 ` John David Anglin
2009-06-16 20:51 ` [PATCH] " Helge Deller
2009-06-17 2:55 ` Kyle McMartin
2009-06-17 7:26 ` Helge Deller
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=4A184FCD.90903@gmx.de \
--to=deller@gmx.de \
--cc=dave@hiauly1.hia.nrc.ca \
--cc=linux-parisc@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