lkml.org 
[lkml]   [2021]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[patch 04/37] PCI/MSI: Use lock from msi_device_data
    Date
    Remove the register lock from struct device and use the one in
    struct msi_device_data.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    ---
    drivers/base/core.c | 1 -
    drivers/pci/msi/msi.c | 2 +-
    include/linux/device.h | 2 --
    3 files changed, 1 insertion(+), 4 deletions(-)

    --- a/drivers/base/core.c
    +++ b/drivers/base/core.c
    @@ -2875,7 +2875,6 @@ void device_initialize(struct device *de
    device_pm_init(dev);
    set_dev_node(dev, NUMA_NO_NODE);
    #ifdef CONFIG_GENERIC_MSI_IRQ
    - raw_spin_lock_init(&dev->msi_lock);
    INIT_LIST_HEAD(&dev->msi_list);
    #endif
    INIT_LIST_HEAD(&dev->links.consumers);
    --- a/drivers/pci/msi/msi.c
    +++ b/drivers/pci/msi/msi.c
    @@ -18,7 +18,7 @@ int pci_msi_ignore_mask;

    static noinline void pci_msi_update_mask(struct msi_desc *desc, u32 clear, u32 set)
    {
    - raw_spinlock_t *lock = &desc->dev->msi_lock;
    + raw_spinlock_t *lock = &desc->dev->msi.data->lock;
    unsigned long flags;

    if (!desc->pci.msi_attrib.can_mask)
    --- a/include/linux/device.h
    +++ b/include/linux/device.h
    @@ -422,7 +422,6 @@ struct dev_msi_info {
    * @em_pd: device's energy model performance domain
    * @pins: For device pin management.
    * See Documentation/driver-api/pin-control.rst for details.
    - * @msi_lock: Lock to protect MSI mask cache and mask register
    * @msi_list: Hosts MSI descriptors
    * @numa_node: NUMA node this device is close to.
    * @dma_ops: DMA mapping operations for this device.
    @@ -520,7 +519,6 @@ struct device {
    #endif
    struct dev_msi_info msi;
    #ifdef CONFIG_GENERIC_MSI_IRQ
    - raw_spinlock_t msi_lock;
    struct list_head msi_list;
    #endif
    #ifdef CONFIG_DMA_OPS
    \
     
     \ /
      Last update: 2021-11-27 02:26    [W:3.211 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site