+ 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?
>>
>> I want to use this spin lock to serialize freeze dev
On Mon, 2014-02-10 at 15:59 +0800, Yijing Wang wrote:
> Hi Oliver,
>Thanks for your review and comments!
>
> >> +static DEFINE_SPINLOCK(pci_freeze_lock);
> >
> > The lock is used only here.
>
> Also be used in pci_bus_unfreeze_device();
Sorry, I meant only in this patch.
>
> >
> >> +/**
Hi Oliver,
Thanks for your review and comments!
>> +static DEFINE_SPINLOCK(pci_freeze_lock);
>
> The lock is used only here.
Also be used in pci_bus_unfreeze_device();
>
>> +/**
>> + * pci_bus_freeze_device - freeze pci bus to access pci device
>> + * @bus: the pci bus to freeze
>> + *
>> +
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 syste
Pci_dummy_ops does nothing when we use it to read/write
pci_device. So we can isolate pci device by replace its
bus pci_ops by pci_dummy_ops. This is preparation for
the later patch.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c | 54 +++
in
5 matches
Mail list logo