Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Wu Zhangjin <wuzhangjin@gmail.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH] Loongson: Lemote-2F: Fixup of _rdmsr and _wrmsr
Date: Thu, 11 Mar 2010 09:15:41 +0800	[thread overview]
Message-ID: <1268270141.12056.7.camel@falcon> (raw)
In-Reply-To: <4B98369F.2060907@caviumnetworks.com>

On Wed, 2010-03-10 at 16:17 -0800, David Daney wrote:
> On 03/10/2010 07:41 AM, Wu Zhangjin wrote:
> > From: Wu Zhangjin<wuzhangjin@gmail.com>
> >
> > The _rdmsr, _wrmsr operation must be atomic to ensure the accessing to msr
> > address is what we want.
> >
> > Without this patch, in some cases, the reboot operation(fs2f_reboot) defined in
> > arch/mips/loongson/lemote-2f/reset.c may fail for it called _rdmsr, _wrmsr but
> > may be interrupted/preempted by the other related operations and make the
> > _rdmsr get the wrong value or make the _wrmsr write a wrong value to an
> > unexpected target.
> >
> > Signed-off-by: Wu Zhangjin<wuzhangjin@gmail.com>
> > ---
> >   arch/mips/pci/ops-loongson2.c |    9 +++++++++
> >   1 files changed, 9 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/mips/pci/ops-loongson2.c b/arch/mips/pci/ops-loongson2.c
> > index 2bb4057..1f93dfb 100644
> > --- a/arch/mips/pci/ops-loongson2.c
> > +++ b/arch/mips/pci/ops-loongson2.c
> > @@ -180,15 +180,20 @@ struct pci_ops loongson_pci_ops = {
> >   };
> >
> >   #ifdef CONFIG_CS5536
> > +DEFINE_SPINLOCK(msr_lock);
> 
> 
> Should this be DEFINE_RAW_SPINLOCK instead?
> 

It should be, thanks!

Regards,
	Wu Zhangjin

      reply	other threads:[~2010-03-11  1:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 15:41 [PATCH] Loongson: Lemote-2F: Fixup of _rdmsr and _wrmsr Wu Zhangjin
2010-03-11  0:17 ` David Daney
2010-03-11  1:15   ` Wu Zhangjin [this message]

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=1268270141.12056.7.camel@falcon \
    --to=wuzhangjin@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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