<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/search.c, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-02-24T07:38:01Z</updated>
<entry>
<title>PCI: Fix pci_add_dma_alias() bitmask size</title>
<updated>2020-02-24T07:38:01Z</updated>
<author>
<name>James Sewart</name>
</author>
<published>2019-12-10T21:51:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f4037adfa4110297532628e008cc83c25553bf2'/>
<id>urn:sha1:1f4037adfa4110297532628e008cc83c25553bf2</id>
<content type='text'>
[ Upstream commit f8bf2aeb651b3460a4b36fd7ba1ba1d31777d35c ]

The number of possible devfns is 256, but pci_add_dma_alias() allocated a
bitmap of size 255.  Fix this off-by-one error.

This fixes commits 338c3149a221 ("PCI: Add support for multiple DMA
aliases") and c6635792737b ("PCI: Allocate dma_alias_mask with
bitmap_zalloc()"), but I doubt it was possible to see a problem because
it takes 4 64-bit longs (or 8 32-bit longs) to hold 255 bits, and
bitmap_zalloc() doesn't save the 255-bit size anywhere.

[bhelgaas: commit log, move #define to drivers/pci/pci.h, include loop
limit fix from Qian Cai:
https://lore.kernel.org/r/20191218170004.5297-1-cai@lca.pw]
Signed-off-by: James Sewart &lt;jamessewart@arista.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: Unexport pci_bus_sem</title>
<updated>2019-07-23T23:32:50Z</updated>
<author>
<name>Kelsey Skunberg</name>
</author>
<published>2019-07-18T03:29:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70a658073726ae79cf9747b651f577d1fdf45c3a'/>
<id>urn:sha1:70a658073726ae79cf9747b651f577d1fdf45c3a</id>
<content type='text'>
pci_bus_sem is not used by a loadable kernel module and does not need to be
exported.

It was exported by ce29ca3ea407 ("PCI: acpiphp: remove all functions in
slot, even without ACPI _EJx"), which added a use of pci_bus_sem in
acpiphp, which could be built as a module at that time.  But since
6037a803b05e ("PCI: acpiphp: Convert acpiphp to be builtin only, not
modular"), it can no longer be built as a module.

Link: https://lore.kernel.org/r/20190718032951.40188-1-skunberg.kelsey@gmail.com
Signed-off-by: Kelsey Skunberg &lt;skunberg.kelsey@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>bus_find_device: Unify the match callback with class_find_device</title>
<updated>2019-06-24T03:22:31Z</updated>
<author>
<name>Suzuki K Poulose</name>
</author>
<published>2019-06-14T17:53:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=418e3ea157efb0eb2c6dd412a8d5f052477c7f5a'/>
<id>urn:sha1:418e3ea157efb0eb2c6dd412a8d5f052477c7f5a</id>
<content type='text'>
There is an arbitrary difference between the prototypes of
bus_find_device() and class_find_device() preventing their callers
from passing the same pair of data and match() arguments to both of
them, which is the const qualifier used in the prototype of
class_find_device().  If that qualifier is also used in the
bus_find_device() prototype, it will be possible to pass the same
match() callback function to both bus_find_device() and
class_find_device(), which will allow some optimizations to be made in
order to avoid code duplication going forward.  Also with that, constify
the "data" parameter as it is passed as a const to the match function.

For this reason, change the prototype of bus_find_device() to match
the prototype of class_find_device() and adjust its callers to use the
const qualifier in accordance with the new prototype of it.

Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Andreas Noever &lt;andreas.noever@gmail.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Corey Minyard &lt;minyard@acm.org&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: David Kershner &lt;david.kershner@unisys.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Felipe Balbi &lt;balbi@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Cc: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Cc: Harald Freudenberger &lt;freude@linux.ibm.com&gt;
Cc: Hartmut Knaack &lt;knaack.h@gmx.de&gt;
Cc: Heiko Stuebner &lt;heiko@sntech.de&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Jonathan Cameron &lt;jic23@kernel.org&gt;
Cc: "James E.J. Bottomley" &lt;jejb@linux.ibm.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Cc: Michael Jamet &lt;michael.jamet@intel.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Cc: Sebastian Ott &lt;sebott@linux.ibm.com&gt;
Cc: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Cc: Yehezkel Bernat &lt;YehezkelShB@gmail.com&gt;
Cc: rafael@kernel.org
Acked-by: Corey Minyard &lt;minyard@acm.org&gt;
Acked-by: David Kershner &lt;david.kershner@unisys.com&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Acked-by: Wolfram Sang &lt;wsa@the-dreams.de&gt; # for the I2C parts
Acked-by: Rob Herring &lt;robh@kernel.org&gt;
Signed-off-by: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: Add pci_dev_id() helper</title>
<updated>2019-04-29T21:12:05Z</updated>
<author>
<name>Heiner Kallweit</name>
</author>
<published>2019-04-24T19:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e544bac8267f65a0bf06aed1bde9964da4812ed'/>
<id>urn:sha1:4e544bac8267f65a0bf06aed1bde9964da4812ed</id>
<content type='text'>
In several places in the kernel we find PCI_DEVID used like this:

  PCI_DEVID(dev-&gt;bus-&gt;number, dev-&gt;devfn)

Add a "pci_dev_id(struct pci_dev *dev)" helper to simplify callers.

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Tidy comments</title>
<updated>2018-03-19T19:20:43Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2018-03-09T22:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df62ab5e0f75608919df7442654b0fab78246b7b'/>
<id>urn:sha1:df62ab5e0f75608919df7442654b0fab78246b7b</id>
<content type='text'>
Remove pointless comments that tell us the file name, remove blank line
comments, follow multi-line comment conventions.  No functional change
intended.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Add SPDX GPL-2.0 when no license was specified</title>
<updated>2018-01-26T17:45:16Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2018-01-26T17:45:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7328c8f48d1895b3fec98b0b319cfb856b4c4fa1'/>
<id>urn:sha1:7328c8f48d1895b3fec98b0b319cfb856b4c4fa1</id>
<content type='text'>
b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to
files with no license") added SPDX GPL-2.0 to several PCI files that
previously contained no license information.

Add SPDX GPL-2.0 to all other PCI files that did not contain any license
information and hence were under the default GPL version 2 license of the
kernel.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;</content>
</entry>
<entry>
<title>PCI: Add device flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT</title>
<updated>2017-04-13T23:49:50Z</updated>
<author>
<name>Jayachandran C</name>
</author>
<published>2017-04-13T20:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ffff885832101543c002cef7abcab0fd27a9aee1'/>
<id>urn:sha1:ffff885832101543c002cef7abcab0fd27a9aee1</id>
<content type='text'>
Add a new quirk flag PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT to limit the DMA alias
search to go no further than the bridge where the IOMMU unit is attached.

The flag will be used to indicate a bridge device which forwards the
address translation requests to the IOMMU, i.e., where the interrupt and
DMA requests leave the PCIe hierarchy and go into the system blocks.

Usually this happens at the PCI RC, so this flag is not needed.  But on
systems where there are bridges that introduce aliases above the IOMMU,
this flag prevents pci_for_each_dma_alias() from generating aliases that
the IOMMU will never see.

The function pci_for_each_dma_alias() is updated to stop when it see a
bridge with this flag set.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=195447
Signed-off-by: Jayachandran C &lt;jnair@caviumnetworks.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;</content>
</entry>
<entry>
<title>PCI: Add support for multiple DMA aliases</title>
<updated>2016-04-11T19:34:32Z</updated>
<author>
<name>Jacek Lawrynowicz</name>
</author>
<published>2016-03-03T14:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=338c3149a221527e202ee26b1e35f76c965bb6c0'/>
<id>urn:sha1:338c3149a221527e202ee26b1e35f76c965bb6c0</id>
<content type='text'>
Solve IOMMU support issues with PCIe non-transparent bridges that use
Requester ID look-up tables (RID-LUT), e.g., the PEX8733.

The NTB connects devices in two independent PCI domains.  Devices separated
by the NTB are not able to discover each other.  A PCI packet being
forwared from one domain to another has to have its RID modified so it
appears on correct bus and completions are forwarded back to the original
domain through the NTB.  The RID is translated using a preprogrammed table
(LUT) and the PCI packet propagates upstream away from the NTB.  If the
destination system has IOMMU enabled, the packet will be discarded because
the new RID is unknown to the IOMMU.  Adding a DMA alias for the new RID
allows IOMMU to properly recognize the packet.

Each device behind the NTB has a unique RID assigned in the RID-LUT.  The
current DMA alias implementation supports only a single alias, so it's not
possible to support mutiple devices behind the NTB when IOMMU is enabled.

Enable all possible aliases on a given bus (256) that are stored in a
bitset.  Alias devfn is directly translated to a bit number.  The bitset is
not allocated for devices that have no need for DMA aliases.

More details can be found in the following article:
http://www.plxtech.com/files/pdf/technical/expresslane/RTC_Enabling%20MulitHostSystemDesigns.pdf

Signed-off-by: Jacek Lawrynowicz &lt;jacek.lawrynowicz@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Acked-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Acked-by: Joerg Roedel &lt;jroedel@suse.de&gt;</content>
</entry>
<entry>
<title>PCI: Delete unnecessary NULL pointer checks</title>
<updated>2014-11-11T04:02:17Z</updated>
<author>
<name>Markus Elfring</name>
</author>
<published>2014-11-11T04:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff0387c3777f2438bad2088abe442c9f231b0be4'/>
<id>urn:sha1:ff0387c3777f2438bad2088abe442c9f231b0be4</id>
<content type='text'>
The functions pci_dev_put(), pci_pme_wakeup_bus(), and put_device() return
immediately if their argument is NULL.  Thus the test before the call is
not needed.

Remove these unnecessary tests.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
<entry>
<title>PCI: Remove unused pci_find_upstream_pcie_bridge()</title>
<updated>2014-09-22T20:46:13Z</updated>
<author>
<name>Alex Williamson</name>
</author>
<published>2014-09-22T20:46:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bee3f304435a9c8c70b135083e23516872a17c98'/>
<id>urn:sha1:bee3f304435a9c8c70b135083e23516872a17c98</id>
<content type='text'>
pci_find_upstream_pcie_bridge() is unused, so remove it.

Signed-off-by: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
</entry>
</feed>
