Re: [PATCH v6.4-rc5-rt4] rt: vmd: make cfg_lock a raw spinlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2023-06-08 21:20:04 [-0300], Luis Claudio R. Goncalves wrote:
> Sebastian, Steven,
> 
> I don't know if this is the best solution for the problem, but surely the
> simplest one. If this patch makes sense, it could probably go upstream as
> the changes only affect RT.

Lockdep should complain, too because the locking order here is
raw_spinlock_t -> spinlock_t. 

Instead of making the lock raw, I would argue to remove the lock an safe
a few cycles. The lock is only used by vmd_pci_read() and
vmd_pci_write(). Both functions are invoked by pci_bus_read_config_*()
or pci_bus_write_config_*() and both acquire pci_lock first. Therefore
the lock does not add any benefit because vmd_pci_read() vs
vmd_pci_write() is already serialized.

If you make the patch feel free to reuse the wording above.

>From a quick look,
   drivers/pci/controller/pci-tegra.c
   drivers/pci/controller/pcie-rcar-host.c

could use some care ;)

Sebastian



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux