[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120302120410.27cea21c@jbarnes-desktop>
Date: Fri, 2 Mar 2012 12:04:10 -0800
From: Jesse Barnes <jbarnes@...tuousgeek.org>
To: Myron Stowe <myron.stowe@...hat.com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/PCI: add spinlock held check to
'pcibios_fwaddrmap_lookup()'
On Fri, 02 Mar 2012 12:45:01 -0700
Myron Stowe <myron.stowe@...hat.com> wrote:
> 'pcibios_fwaddrmap_lookup()' is used to maintain FW-assigned BIOS BAR
> values for reinstatement when normal resource assignment attempts
> fail and must be called with the 'pcibios_fwaddrmap_lock' spinlock
> held.
>
> This patch adds a WARN_ON notification if the spinlock is not currently
> held by the caller.
>
> Signed-off-by: Myron Stowe <myron.stowe@...hat.com>
> ---
>
> arch/x86/pci/i386.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
> index 33e6a0b..831971e 100644
> --- a/arch/x86/pci/i386.c
> +++ b/arch/x86/pci/i386.c
> @@ -57,6 +57,8 @@ static struct pcibios_fwaddrmap *pcibios_fwaddrmap_lookup(struct pci_dev *dev)
> {
> struct pcibios_fwaddrmap *map;
>
> + WARN_ON(!spin_is_locked(&pcibios_fwaddrmap_lock));
> +
> list_for_each_entry(map, &pcibios_fwaddrmappings, list)
> if (map->dev == dev)
> return map;
>
>
Applied, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists