Thread (43 messages) 43 messages, 11 authors, 2024-10-14

Re: [RFC PATCH 01/13] PCI: Prepare removing devres from pci_intx()

From: Damien Le Moal <dlemoal@kernel.org>
Date: 2024-10-09 09:10:48
Also in: kvm, linux-ide, linux-input, linux-pci, linux-sound, linux-staging, linux-wireless, lkml, xen-devel

On 10/9/24 17:35, Philipp Stanner wrote:
pci_intx() is a hybrid function which sometimes performs devres
operations, depending on whether pcim_enable_device() has been used to
enable the pci_dev. This sometimes-managed nature of the function is
problematic. Notably, it causes the function to allocate under some
circumstances which makes it unusable from interrupt context.

To, ultimately, remove the hybrid nature from pci_intx(), it is first
necessary to provide an always-managed and a never-managed version
of that function. Then, all callers of pci_intx() can be ported to the
version they need, depending whether they use pci_enable_device() or
pcim_enable_device().

An always-managed function exists, namely pcim_intx(), for which
__pcim_intx(), a never-managed version of pci_intx() had been
s/had/has ? Not sure about this, English is not my first language :)
implemented.

Make __pcim_intx() a public function under the name
pci_intx_unmanaged(). Make pcim_intx() a public function.

Signed-off-by: Philipp Stanner <redacted>
Regardless of the above nit, looks OK to me.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>

-- 
Damien Le Moal
Western Digital Research
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help