linux-mips
[Top] [All Lists]

Re: [PATCH v2] Loongson: Lemote-2F: Fixup of _rdmsr and _wrmsr

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH v2] Loongson: Lemote-2F: Fixup of _rdmsr and _wrmsr
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Thu, 11 Mar 2010 11:25:26 +0800
Cc: linux-mips@linux-mips.org, David Daney <ddaney@caviumnetworks.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:organization:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=MtZfKkdDa1tHbl1XPVKTr+Qj+Qz4oZXFnPa1e35nhPw=; b=MI+tFtiPHoqaT5h80750Bp7ey/Z3kI0JViwM06CpjR6LKbP3tik3rGK0cxVHEKPzbH oevtVHVkq1ZOkqoNUcbeNnFMO9jtBOKyQ/3lEfzTeuthb5Q+2X7SNbKkM8j1a3524AOc 6127JV+ZJhH+EaGAJXFoZKKolBfxIxGvhE0qc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=oZZRQjs+oyGoL5iMfEG/HJwt5yuMPAeiGsm+pDeZFnkXtYk5BzI/LqtWD5iwDXwbIn Sz04EprycB+iGcnf6TrKfQ97D7UVBAr5cZfkZqDazcPPW3+x7bwur8I81CPMYOP5mjgJ ZRPUqGyXBiZhkPl14xs2NLcAy0UB/Z0L0k1yw=
In-reply-to: <5c63967ed3f891da1f6bc1fc78c272d0407d5d25.1268276186.git.wuzhangjin@gmail.com>
Organization: DSLab, Lanzhou University, China
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <5c63967ed3f891da1f6bc1fc78c272d0407d5d25.1268276186.git.wuzhangjin@gmail.com>
Reply-to: wuzhangjin@gmail.com
Sender: linux-mips-bounce@linux-mips.org
On Thu, 2010-03-11 at 10:57 +0800, Wu Zhangjin wrote:
> From: Wu Zhangjin <wuzhangjin@gmail.com>
> 
> Changes from the old version:
>   o Using raw spinlock instead of spinlock as suggested by David Daney.
[...]
> --- a/arch/mips/pci/ops-loongson2.c
> +++ b/arch/mips/pci/ops-loongson2.c
> @@ -180,15 +180,21 @@ struct pci_ops loongson_pci_ops = {
>  };
>  
>  #ifdef CONFIG_CS5536
> +DEFINE_RAW_SPINLOCK(msr_lock);
> +
>  void _rdmsr(u32 msr, u32 *hi, u32 *lo)
>  {
>       struct pci_bus bus = {
>               .number = PCI_BUS_CS5536
>       };
>       u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0);
> +     unsigned long flags;
> +
> +     spin_lock_irqsave(&msr_lock, flags);

Please ignore this patch for the operations should be raw_ too.

Regards,
        Wu Zhangjin


<Prev in Thread] Current Thread [Next in Thread>