<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/setup-res.c, branch linux-6.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-07-14T20:04:18Z</updated>
<entry>
<title>PCI/IOV: Allow IOV resources to be resized in pci_resize_resource()</title>
<updated>2025-07-14T20:04:18Z</updated>
<author>
<name>Michał Winiarski</name>
</author>
<published>2025-07-02T09:35:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e200f4f7eab52bb7affcd92bf079958326c154d5'/>
<id>urn:sha1:e200f4f7eab52bb7affcd92bf079958326c154d5</id>
<content type='text'>
Similar to regular resizable BARs, VF BARs can also be resized.

The capability layout is the same as PCI_EXT_CAP_ID_REBAR, which means we
can reuse most of the implementation, the only difference being resource
size calculation (which is multiplied by total VFs) and memory decoding
(which is controlled by a separate VF MSE field in SR-IOV cap).

Extend the pci_resize_resource() function to accept IOV resources.

See PCIe r6.2, sec 7.8.7.

Signed-off-by: Michał Winiarski &lt;michal.winiarski@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://patch.msgid.link/20250702093522.518099-4-michal.winiarski@intel.com
</content>
</entry>
<entry>
<title>PCI: Do not claim to release resource falsely</title>
<updated>2025-03-07T17:26:19Z</updated>
<author>
<name>Ilpo Järvinen</name>
</author>
<published>2025-03-07T14:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4cb29386ffc1d12885e412232adf361c77a93ac'/>
<id>urn:sha1:e4cb29386ffc1d12885e412232adf361c77a93ac</id>
<content type='text'>
pci_release_resource() will print "... releasing" regardless of the
resource being assigned or not. Move the print after the res-&gt;parent check
to avoid claiming the kernel would be releasing an unassigned resource.

Likely, none of the current callers pass a resource that is unassigned so
this change is mostly to correct the non-sensical order than to remove
errorneous printouts.

Link: https://lore.kernel.org/r/20250307140922.5776-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Extend enable to check for any optional resource</title>
<updated>2025-02-18T21:40:54Z</updated>
<author>
<name>Ilpo Järvinen</name>
</author>
<published>2024-12-16T17:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9caf4ea2fd022e3febb8f70421b7f87e9788852e'/>
<id>urn:sha1:9caf4ea2fd022e3febb8f70421b7f87e9788852e</id>
<content type='text'>
pci_enable_resources() checks if device's io and mem resources are all
assigned and disallows enable if any resource failed to assign (*) but
makes an exception for the case of disabled extension ROM. There are other
optional resources, however.

Add pci_resource_is_optional() and use it instead of
pci_resource_is_disabled_rom() to cover also IOV resources that are also
optional as per pbus_size_mem().

As there will be more users of pci_resource_is_optional() inside
setup-bus.c in changes coming up after this one, the function is placed
there.

(*) In practice, resource fitting code calls reset_resource() for any
resource it fails to assign which clears resource's -&gt;flags causing
pci_enable_resources() to never detect failed resource assignments.
This seems undesirable internal logic inconsistency, effectively
reset_resource() prevents pci_enable_resources() from functioning as
intended. This is one step of many that will be needed towards removing
reset_resource().

Link: https://lore.kernel.org/r/20241216175632.4175-20-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Xiaochun Lee &lt;lixc17@lenovo.com&gt;
</content>
</entry>
<entry>
<title>PCI: Remove incorrect comment from pci_reassign_resource()</title>
<updated>2025-02-18T21:40:54Z</updated>
<author>
<name>Ilpo Järvinen</name>
</author>
<published>2024-12-16T17:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8098ad8fb2e80dcb92920da795455d30ed5e292'/>
<id>urn:sha1:c8098ad8fb2e80dcb92920da795455d30ed5e292</id>
<content type='text'>
Commit a4ac9fea016f ("PCI : Calculate right add_size") removed including
min_align into new_size in pci_reassign_resource() which is the correct
thing to do. However, it also added a snakeoil comment that the resource
would already be aligned with min_align which is incorrect.

A resource that is assigned earlier is aligned with the old alignment, NOT
with the new requested alignment (min_align) until later deep within the
reassignment callchain. Thus, remove the incorrect comment.

Link: https://lore.kernel.org/r/20241216175632.4175-18-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Tested-by: Xiaochun Lee &lt;lixc17@lenovo.com&gt;
Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI: Add pci_resource_is_iov() to identify IOV resources</title>
<updated>2025-02-18T21:40:52Z</updated>
<author>
<name>Michał Winiarski</name>
</author>
<published>2024-12-16T17:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbd384389eac296de9d2088dac0617911361b2f4'/>
<id>urn:sha1:cbd384389eac296de9d2088dac0617911361b2f4</id>
<content type='text'>
There are multiple places where special handling is required for IOV
resources.

Extract the identification of IOV resources to pci_resource_is_iov() and
drop a few ifdefs.

Link: https://lore.kernel.org/r/20241216175632.4175-9-ilpo.jarvinen@linux.intel.com
Signed-off-by: Michał Winiarski &lt;michal.winiarski@intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Tested-by: Xiaochun Lee &lt;lixc17@lenovo.com&gt;
</content>
</entry>
<entry>
<title>PCI: Cleanup dev-&gt;resource + resno to use pci_resource_n()</title>
<updated>2025-02-14T20:39:31Z</updated>
<author>
<name>Ilpo Järvinen</name>
</author>
<published>2025-02-07T16:23:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=addb30c5bd2755770e617e68bdcc0bf2a21770fa'/>
<id>urn:sha1:addb30c5bd2755770e617e68bdcc0bf2a21770fa</id>
<content type='text'>
Replace pointer arithmetic in finding the correct resource entry with the
pci_resource_n() helper.

Link: https://lore.kernel.org/r/20250207162301.2842-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Use resource_set_{range,size}() helpers</title>
<updated>2024-10-10T22:44:57Z</updated>
<author>
<name>Ilpo Järvinen</name>
</author>
<published>2024-06-14T10:06:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=783602c920e90023e6d38274d40e32979787d130'/>
<id>urn:sha1:783602c920e90023e6d38274d40e32979787d130</id>
<content type='text'>
Convert open-coded resource size calculations to use
resource_set_{range,size}() helpers.

While at it, use SZ_* for size parameter where appropriate which makes the
intent of code more obvious.

Also, cast sizes to resource_size_t, not u64.

Link: https://lore.kernel.org/r/20240614100606.15830-3-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>PCI: Use resource names in PCI log messages</title>
<updated>2023-12-15T23:28:42Z</updated>
<author>
<name>Puranjay Mohan</name>
</author>
<published>2021-11-06T11:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc4e6f21c3f844ebc1c52b6920b8ec5dfc73f4e8'/>
<id>urn:sha1:dc4e6f21c3f844ebc1c52b6920b8ec5dfc73f4e8</id>
<content type='text'>
Use the pci_resource_name() to get the name of the resource and use it
while printing log messages.

[bhelgaas: rename to match struct resource * names, also use names in other
BAR messages]
Link: https://lore.kernel.org/r/20211106112606.192563-3-puranjay12@gmail.com
Signed-off-by: Puranjay Mohan &lt;puranjay12@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: Fix printk field formatting</title>
<updated>2023-08-25T13:15:08Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2021-01-15T23:18:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62008578b73f16e274070a232b939ba5933bb8ba'/>
<id>urn:sha1:62008578b73f16e274070a232b939ba5933bb8ba</id>
<content type='text'>
Previously we used "%#08x" to print a 32-bit value.  This fills an
8-character field with "0x...", but of course many 32-bit values require a
10-character field "0x12345678" for this format.  Fix the formats to avoid
confusion.

Link: https://lore.kernel.org/r/20230824193712.542167-5-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>PCI: Introduce pci_dev_for_each_resource()</title>
<updated>2023-04-04T15:43:52Z</updated>
<author>
<name>Mika Westerberg</name>
</author>
<published>2023-03-30T16:24:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=09cc900632400079619e9154604fd299c2cc9a5a'/>
<id>urn:sha1:09cc900632400079619e9154604fd299c2cc9a5a</id>
<content type='text'>
Instead of open-coding it everywhere introduce a tiny helper that can be
used to iterate over each resource of a PCI device, and convert the most
obvious users into it.

While at it drop doubled empty line before pdev_sort_resources().

No functional changes intended.

Suggested-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230330162434.35055-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Krzysztof Wilczyński &lt;kw@linux.com&gt;
</content>
</entry>
</feed>
