mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Yijing Wang <wangyijing@huawei.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [PATCH part1 v5 5/7] PCI: Add pci_dummy_ops to isolate pci device temporarily
Date: Mon, 10 Feb 2014 07:56:39 +0100	[thread overview]
Message-ID: <1392015399.21271.9.camel@linux-fkkt.site> (raw)
In-Reply-To: <1392005051-54508-6-git-send-email-wangyijing@huawei.com>

On Mon, 2014-02-10 at 12:04 +0800, Yijing Wang wrote:

> +static DEFINE_SPINLOCK(pci_freeze_lock);

The lock is used only here.

> +/**
> + * pci_bus_freeze_device - freeze pci bus to access pci device
> + * @bus: the pci bus to freeze
> + *
> + * Replace pci bus ops by pci_dummy_ops, protect system from
> + * accessing pci devices.
> + */
> +void pci_bus_freeze_device(struct pci_bus *bus)
> +{
> +	struct pci_ops *ops;
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&pci_freeze_lock, flags);
> +	ops = pci_bus_set_ops(bus, &pci_dummy_ops);
> +	bus->save_ops = ops;
> +	spin_unlock_irqrestore(&pci_freeze_lock, flags);

Against what exactly are you locking here?

	Regards
		Oliver



  reply	other threads:[~2014-02-10  7:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10  4:04 [PATCH part1 v5 0/7] Introduce PCIe Device Serial Number capability support Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 1/7] PCI: rework pci_find_next_ext_capability() Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 2/7] PCI: introduce pci_bus_find_ext_capability() Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 3/7] PCI: Add support for Device Serial Number capability Yijing Wang
2014-02-10 10:21   ` Oliver Neukum
2014-02-11  1:55     ` Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 4/7] PCI: Introduce pci_serial_number_changed() Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 5/7] PCI: Add pci_dummy_ops to isolate pci device temporarily Yijing Wang
2014-02-10  6:56   ` Oliver Neukum [this message]
2014-02-10  7:59     ` Yijing Wang
2014-02-10 10:07       ` Oliver Neukum
2014-02-11  1:49         ` Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 6/7] PCI: Check pci device serial number when scan device Yijing Wang
2014-02-10  4:04 ` [PATCH part1 v5 7/7] PCI: pciehp: Don't enable/disable slot on resume unless status changed Yijing Wang

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=1392015399.21271.9.camel@linux-fkkt.site \
    --to=oneukum@suse.de \
    --cc=bhelgaas@google.com \
    --cc=guohanjun@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=wangyijing@huawei.com \
    /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

all inboxes | Powered by JetHome®