Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-04-09 Thread Bjorn Helgaas
[+to Rafael] On Mon, Apr 08, 2024 at 06:42:31AM +, Chen, Jiqian wrote: > Hi Bjorn, > It has been almost two months since we received your reply last time. > This series are blocking on this patch, since there are patches on Xen and > Qemu side depending on it. > Do you still have any

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-02-12 Thread Bjorn Helgaas
On Mon, Feb 12, 2024 at 10:13:28AM +0100, Roger Pau Monné wrote: > On Fri, Feb 09, 2024 at 03:05:49PM -0600, Bjorn Helgaas wrote: > > On Thu, Feb 01, 2024 at 09:39:49AM +0100, Roger Pau Monné wrote: > > > On Wed, Jan 31, 2024 at 01:00:14PM -0600, Bjorn Helgaas wrote: > >

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-02-09 Thread Bjorn Helgaas
On Thu, Feb 01, 2024 at 09:39:49AM +0100, Roger Pau Monné wrote: > On Wed, Jan 31, 2024 at 01:00:14PM -0600, Bjorn Helgaas wrote: > > On Wed, Jan 31, 2024 at 09:58:19AM +0100, Roger Pau Monné wrote: > > > On Tue, Jan 30, 2024 at 02:44:03PM -0600, Bjorn Helgaas wrote: > >

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-01-31 Thread Bjorn Helgaas
On Wed, Jan 31, 2024 at 09:58:19AM +0100, Roger Pau Monné wrote: > On Tue, Jan 30, 2024 at 02:44:03PM -0600, Bjorn Helgaas wrote: > > On Tue, Jan 30, 2024 at 10:07:36AM +0100, Roger Pau Monné wrote: > > > On Mon, Jan 29, 2024 at 04:01:13PM -0600, Bjorn Helgaas wrote: > >

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-01-30 Thread Bjorn Helgaas
On Tue, Jan 30, 2024 at 10:07:36AM +0100, Roger Pau Monné wrote: > On Mon, Jan 29, 2024 at 04:01:13PM -0600, Bjorn Helgaas wrote: > > On Thu, Jan 25, 2024 at 07:17:24AM +, Chen, Jiqian wrote: > > > On 2024/1/24 00:02, Bjorn Helgaas wrote: > > > > On Tue, Jan 23,

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-01-29 Thread Bjorn Helgaas
On Thu, Jan 25, 2024 at 07:17:24AM +, Chen, Jiqian wrote: > On 2024/1/24 00:02, Bjorn Helgaas wrote: > > On Tue, Jan 23, 2024 at 10:13:52AM +, Chen, Jiqian wrote: > >> On 2024/1/23 07:37, Bjorn Helgaas wrote: > >>> On Fri, Jan 05, 2024 at 02:22

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-01-23 Thread Bjorn Helgaas
On Tue, Jan 23, 2024 at 10:13:52AM +, Chen, Jiqian wrote: > On 2024/1/23 07:37, Bjorn Helgaas wrote: > > On Fri, Jan 05, 2024 at 02:22:17PM +0800, Jiqian Chen wrote: > >> There is a need for some scenarios to use gsi sysfs. > >> For example, when xen p

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-01-22 Thread Bjorn Helgaas
On Fri, Jan 05, 2024 at 02:22:17PM +0800, Jiqian Chen wrote: > There is a need for some scenarios to use gsi sysfs. > For example, when xen passthrough a device to dumU, it will > use gsi to map pirq, but currently userspace can't get gsi > number. > So, add gsi sysfs for that and for other

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-31 Thread Bjorn Helgaas
On Wed, May 31, 2023 at 08:48:35PM +0200, Jonas Gorski wrote: > ... > Looking at the code I understand where coverity is coming from: > > #define __pci_dev_for_each_res0(dev, res, ...) \ >for (unsigned int __b = 0; \ >

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-30 Thread Bjorn Helgaas
On Fri, May 12, 2023 at 02:48:51PM -0500, Bjorn Helgaas wrote: > On Fri, May 12, 2023 at 01:56:29PM +0300, Andy Shevchenko wrote: > > On Tue, May 09, 2023 at 01:21:22PM -0500, Bjorn Helgaas wrote: > > > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > >

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-12 Thread Bjorn Helgaas
On Fri, May 12, 2023 at 01:56:29PM +0300, Andy Shevchenko wrote: > On Tue, May 09, 2023 at 01:21:22PM -0500, Bjorn Helgaas wrote: > > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > > > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > &g

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-05-09 Thread Bjorn Helgaas
On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > Provide two new helper macros to iterate over PCI device resources and > > convert users. > Applied 2-7 to pci/resource for v6.4, tha

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-04-05 Thread Bjorn Helgaas
On Wed, Apr 05, 2023 at 11:28:27AM +0300, Andy Shevchenko wrote: > On Tue, Apr 04, 2023 at 11:11:01AM -0500, Bjorn Helgaas wrote: > > On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > > > Provide two new helper macros to iterate over PCI device resources and &

Re: [PATCH v8 5/7] PCI: Allow pci_bus_for_each_resource() to take less arguments

2023-04-05 Thread Bjorn Helgaas
On Wed, Apr 05, 2023 at 02:50:47PM +0300, Andy Shevchenko wrote: > On Thu, Mar 30, 2023 at 07:24:32PM +0300, Andy Shevchenko wrote: > > Refactor pci_bus_for_each_resource() in the same way as it's done in > > pci_dev_for_each_resource() case. This will allow to hide iterator > > inside the loop,

Re: [PATCH v8 0/7] Add pci_dev_for_each_resource() helper and update users

2023-04-04 Thread Bjorn Helgaas
On Thu, Mar 30, 2023 at 07:24:27PM +0300, Andy Shevchenko wrote: > Provide two new helper macros to iterate over PCI device resources and > convert users. > > Looking at it, refactor existing pci_bus_for_each_resource() and convert > users accordingly. > > Note, the amount of lines grew due to

Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-23 Thread Bjorn Helgaas
On Thu, Mar 23, 2023 at 04:30:01PM +0200, Andy Shevchenko wrote: > On Wed, Mar 22, 2023 at 02:28:04PM -0500, Bjorn Helgaas wrote: > > On Mon, Mar 20, 2023 at 03:16:30PM +0200, Andy Shevchenko wrote: > ... > > > > + pci_dev_for_each_resource_p(dev, r) { > > >

Re: [PATCH v6 2/4] PCI: Split pci_bus_for_each_resource_p() out of pci_bus_for_each_resource()

2023-03-22 Thread Bjorn Helgaas
On Mon, Mar 20, 2023 at 03:16:31PM +0200, Andy Shevchenko wrote: > ... > -#define pci_bus_for_each_resource(bus, res, i) > \ > - for (i = 0; \ > - (res = pci_bus_resource_n(bus, i)) || i <

Re: [PATCH v6 1/4] PCI: Introduce pci_dev_for_each_resource()

2023-03-22 Thread Bjorn Helgaas
Hi Andy and Mika, I really like the improvements here. They make the code read much better. On Mon, Mar 20, 2023 at 03:16:30PM +0200, Andy Shevchenko wrote: > From: Mika Westerberg > ... > static void fixup_winbond_82c105(struct pci_dev* dev) > { > - int i; > + struct resource *r; >

Re: [PATCH] xen-pcifront: Handle missed Connected state

2022-09-02 Thread Bjorn Helgaas
The conventional style for subject (from "git log --oneline") is: xen/pcifront: Handle ... On Mon, Aug 29, 2022 at 11:15:36AM -0400, Jason Andryuk wrote: > An HVM guest with linux stubdom and 2 PCI devices failed to start as "stubdom" might be handy shorthand in the Xen world, but I think it

Re: [PATCH v2] PCI/MSI: Correct use of can_mask in msi_add_msi_desc()

2022-08-26 Thread Bjorn Helgaas
On Mon, Feb 14, 2022 at 11:07:47AM +0100, Josef Johansson wrote: > From: Josef Johansson > > PCI/MSI: Correct use of can_mask in msi_add_msi_desc() > > Commit 71020a3c0dff4 ("PCI/MSI: Use msi_add_msi_desc()") modifies > the logic of checking msi_attrib.can_mask, without any reason. > >

Re: [PATCH v2] PCI/MSI: Correct use of can_mask in msi_add_msi_desc()

2022-08-05 Thread Bjorn Helgaas
On Fri, Aug 05, 2022 at 09:10:41AM -0300, Jason Gunthorpe wrote: > On Fri, Aug 05, 2022 at 12:03:15PM +0200, Josef Johansson wrote: > > On 2/14/22 11:07, Josef Johansson wrote: > > > From: Josef Johansson > > > > > > PCI/MSI: Correct use of can_mask in msi_add_msi_desc() > > > Commit

Re: [PATCH] PCI/MSI: msix_setup_msi_descs: Restore logic for msi_attrib.can_mask

2022-02-11 Thread Bjorn Helgaas
On Fri, Feb 11, 2022 at 01:10:22AM +0100, Josef Johansson wrote: > On 2/11/22 00:55, Bjorn Helgaas wrote: > > On Sat, Jan 22, 2022 at 02:10:01AM +0100, Josef Johansson wrote: > >> From: Josef Johansson > >> > >> PCI/MSI: msix_setup_msi_descs: Restore logic for

Re: [PATCH] PCI/MSI: msix_setup_msi_descs: Restore logic for msi_attrib.can_mask

2022-02-10 Thread Bjorn Helgaas
[+cc Jason, since you reviewed the original commit] On Sat, Jan 22, 2022 at 02:10:01AM +0100, Josef Johansson wrote: > From: Josef Johansson > > PCI/MSI: msix_setup_msi_descs: Restore logic for msi_attrib.can_mask Please match the form and style of previous subject lines (in particular, omit

Re: [patch V2 19/31] PCI: hv: Rework MSI handling

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:51:33PM +0100, Thomas Gleixner wrote: > Replace the about to vanish iterators and make use of the filtering. Take > the descriptor lock around the iterators. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/contr

Re: [patch V2 10/31] PCI/MSI: Use msi_on_each_desc()

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:51:18PM +0100, Thomas Gleixner wrote: > Use the new iterator functions which pave the way for dynamically extending > MSI-X vectors. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c |4 ++--

Re: [patch V2 09/31] PCI/MSI: Let core code free MSI descriptors

2021-12-07 Thread Bjorn Helgaas
leixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c |3 ++- > drivers/pci/msi/legacy.c|1 + > drivers/pci/msi/msi.c | 14 -- > 3 files changed, 3 insertions(+), 15 deletions(-) > > --- a/drivers/pci/msi/irqdomain.c > +++ b/drivers

Re: [patch V2 08/31] PCI/MSI: Use msi_add_msi_desc()

2021-12-07 Thread Bjorn Helgaas
leixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c | 122 > -- > 1 file changed, 59 insertions(+), 63 deletions(-) > > --- a/drivers/pci/msi/msi.c > +++ b/drivers/pci/msi/msi.c > @@ -340,45 +340,51 @@ v

Re: [patch V2 15/23] PCI/MSI: Move code into a separate directory

2021-12-07 Thread Bjorn Helgaas
nthorpe Acked-by: Bjorn Helgaas > --- > Documentation/driver-api/pci/pci.rst |2 > drivers/pci/Makefile |3 > drivers/pci/msi.c| 1532 > --- > drivers/pci/msi/Makefile

Re: [patch V2 07/31] PCI/MSI: Protect MSI operations

2021-12-07 Thread Bjorn Helgaas
reverse lock ordering vs. CPU hotplug lock as some callers of the PCI/MSI > allocation interfaces already hold it. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c |4 - > drivers/pci/msi/msi.c | 120 >

Re: [patch V2 16/23] PCI/MSI: Split out CONFIG_PCI_MSI independent part

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:49PM +0100, Thomas Gleixner wrote: > These functions are required even when CONFIG_PCI_MSI is not set. Move them > to their own file. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked

Re: [patch V2 22/23] genirq/msi: Handle PCI/MSI allocation fail in core code

2021-12-07 Thread Bjorn Helgaas
oss > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas# PCI > --- > drivers/pci/msi/irqdomain.c | 13 - > include/linux/msi.h |5 + > kernel/irq/msi.c| 29 + > 3 files changed, 26 insertions(+), 21 de

Re: [patch V2 28/36] PCI/MSI: Use __msi_get_virq() in pci_get_vector()

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:39:41PM +0100, Thomas Gleixner wrote: > Use msi_get_vector() and handle the return value to be compatible. > > No functional change intended. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: Handle the INTx case direc

Re: [patch V2 25/36] PCI/MSI: Provide MSI_FLAG_MSIX_CONTIGUOUS

2021-12-07 Thread Bjorn Helgaas
Thomas Gleixner > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c | 16 ++-- > include/linux/msi.h |2 ++ > 2 files changed, 16 insertions(+), 2 deletions(-) > > --- a/driv

Re: [patch V2 19/36] PCI/MSI: Store properties in device::msi::data

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:39:26PM +0100, Thomas Gleixner wrote: > Store the properties which are interesting for various places so the MSI > descriptor fiddling can be removed. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: Use the setter function &g

Re: [patch V2 17/36] PCI/MSI: Use msi_desc::msi_index

2021-12-07 Thread Bjorn Helgaas
pecific storage for no value. > > Signed-off-by: Thomas Gleixner > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > arch/powerpc/platforms/pseries/msi.c |4 ++-- > arch/x86/pci/xen.c |2 +- > driv

Re: [patch V2 08/36] PCI/MSI: Let the irq code handle sysfs groups

2021-12-07 Thread Bjorn Helgaas
y: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c |2 +- > drivers/pci/msi/legacy.c|6 +- > drivers/pci/msi/msi.c | 23 --- > include/linux/pci.h |1 - > 4 files changed, 6 insertions(+), 26 del

Re: [patch V2 03/36] PCI/MSI: Allocate MSI device data on first use

2021-12-07 Thread Bjorn Helgaas
Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c | 20 +++- > 1 file changed, 15 insertions(+), 5 deletions(-) > > --- a/drivers/pci/msi/msi.c > +++ b/drivers/pci/msi/msi.c > @@ -889,10 +889,12 @@ static int __pci_enable_msi_range(struc

Re: [patch V2 23/23] PCI/MSI: Move descriptor counting on allocation fail to the legacy code

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:28:00PM +0100, Thomas Gleixner wrote: > The irqdomain code already returns the information. Move the loop to the > legacy code. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas

Re: [patch V2 21/23] PCI/MSI: Make pci_msi_domain_check_cap() static

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:57PM +0100, Thomas Gleixner wrote: > No users outside of that file. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/irqdomain.c |5 +++-- &

Re: [patch V2 20/23] PCI/MSI: Move msi_lock to struct pci_dev

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:56PM +0100, Thomas Gleixner wrote: > It's only required for PCI/MSI. So no point in having it in every struct > device. > > Signed-off-by: Thomas Gleixner Acked-by: Bjorn Helgaas > --- > V2: New patch > --- > drivers/base/core.c|

Re: [patch V2 19/23] PCI/MSI: Sanitize MSIX table map handling

2021-12-07 Thread Bjorn Helgaas
esciptors/descriptors/ > Store the mapping in struct pci_dev and free it after freeing the MSI-X > descriptors. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/msi.c | 18

Re: [patch V2 18/23] PCI/MSI: Split out irqdomain code

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:52PM +0100, Thomas Gleixner wrote: > Move the irqdomain specific code into it's own file. s/it's/its/ > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi/

Re: [patch V2 17/23] PCI/MSI: Split out !IRQDOMAIN code

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:51PM +0100, Thomas Gleixner wrote: > Split out the non irqdomain code into its own file. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > V2: Add proper includes

Re: [patch V2 14/23] PCI/MSI: Make msix_update_entries() smarter

2021-12-07 Thread Bjorn Helgaas
Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/drivers/pci/msi.c > +++ b/drivers/pci/msi.c > @@ -642,8 +642,8 @@ static void msix_update_entries(struct p > { > struct msi_de

Re: [patch V2 13/23] PCI/MSI: Cleanup include zoo

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:44PM +0100, Thomas Gleixner wrote: > Get rid of the pile of unneeded includes which accumulated over time. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas Nice, thanks! >

Re: [patch V2 12/23] PCI/MSI: Make arch_restore_msi_irqs() less horrible.

2021-12-07 Thread Bjorn Helgaas
-by: Juergen Gross > Reviewed-by: Jason Gunthorpe > Cc: x...@kernel.org > Cc: xen-devel@lists.xenproject.org > Cc: Christian Borntraeger > Cc: Heiko Carstens Acked-by: Bjorn Helgaas# PCI > --- > arch/s390/pci/pci_irq.c |4 +- > arch/x86/include/a

Re: [patch V2 08/23] PCI/sysfs: Use pci_irq_vector()

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:36PM +0100, Thomas Gleixner wrote: > instead of fiddling with msi descriptors. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas s/msi/MSI/ above if you have a chance. Nice

Re: [patch V2 07/23] PCI/MSI: Remove msi_desc_to_pci_sysdata()

2021-12-07 Thread Bjorn Helgaas
On Mon, Dec 06, 2021 at 11:27:34PM +0100, Thomas Gleixner wrote: > Last user is gone long ago. > > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > drivers/pci/msi.c |8 > in

Re: [patch V2 06/23] PCI/MSI: Make pci_msi_domain_write_msg() static

2021-12-07 Thread Bjorn Helgaas
Gunthorpe Acked-by: Bjorn Helgaas# PCI > --- > drivers/irqchip/irq-gic-v2m.c|1 - > drivers/irqchip/irq-gic-v3-its-pci-msi.c |1 - > drivers/irqchip/irq-gic-v3-mbi.c |1 - > drivers/pci/msi.c|2 +- > include/linux/msi.

Re: [patch V2 02/23] PCI/MSI: Fix pci_irq_vector()/pci_irq_get_affinity()

2021-12-07 Thread Bjorn Helgaas
I: Provide sensible IRQ vector alloc/free routines") > Signed-off-by: Thomas Gleixner > Tested-by: Juergen Gross > Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas > --- > V2: Fix typo in subject - Jason > --- > drivers/pci/msi.c | 26 ++---

Re: [PATCH] PCI/MSI: Re-add checks for skip masking MSI-X on Xen PV

2021-10-19 Thread Bjorn Helgaas
On Tue, Oct 19, 2021 at 10:15:05PM +0200, Josef Johansson wrote: > On 10/19/21 21:57, Bjorn Helgaas wrote: > > On Mon, Oct 18, 2021 at 08:22:32AM +0200, Josef Johansson wrote: > I'll make an effort to do a better commit log. Thanks for reviewing the > entry! > > What is the

Re: [PATCH] PCI/MSI: Re-add checks for skip masking MSI-X on Xen PV

2021-10-19 Thread Bjorn Helgaas
[+cc Marc] On Mon, Oct 18, 2021 at 08:22:32AM +0200, Josef Johansson wrote: > From: Josef Johansson > > > PCI/MSI: Re-add checks for skip masking MSI-X on Xen PV > > 'commit fcacdfbef5a1 ("PCI/MSI: Provide a new set of mask and unmask > functions")' introduced functions

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-15 Thread Bjorn Helgaas
On Wed, Oct 13, 2021 at 04:23:09PM +0300, Andy Shevchenko wrote: > On Wed, Oct 13, 2021 at 06:33:56AM -0500, Bjorn Helgaas wrote: > > On Wed, Oct 13, 2021 at 12:26:42PM +0300, Andy Shevchenko wrote: > > > On Wed, Oct 13, 2021 at 2:33 AM Bjorn Helgaas wrote: > > > >

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-13 Thread Bjorn Helgaas
On Wed, Oct 13, 2021 at 12:26:42PM +0300, Andy Shevchenko wrote: > On Wed, Oct 13, 2021 at 2:33 AM Bjorn Helgaas wrote: > > On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote: > > > I split some of the bigger patches apart so they only touched one > > drive

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-13 Thread Bjorn Helgaas
On Wed, Oct 13, 2021 at 10:51:31AM +0200, Uwe Kleine-König wrote: > On Tue, Oct 12, 2021 at 06:32:12PM -0500, Bjorn Helgaas wrote: > > On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote: > > > Hello, > > > > > > this is v6 of the quest to drop the

Re: [PATCH v6 00/11] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-10-12 Thread Bjorn Helgaas
On Mon, Oct 04, 2021 at 02:59:24PM +0200, Uwe Kleine-König wrote: > Hello, > > this is v6 of the quest to drop the "driver" member from struct pci_dev > which tracks the same data (apart from a constant offset) as dev.driver. I like this a lot and applied it to pci/driver for v5.16, thanks! I

Re: [PATCH v2 2/4] PCI: only build xen-pcifront in PV-enabled environments

2021-09-17 Thread Bjorn Helgaas
resent, > XEN_PV con only be set when X86 is also enabled. In general an > architecture supporting Xen PV (and PCI) would want to have this driver > built. s/con only/can only/ > Signed-off-by: Jan Beulich > Reviewed-by: Stefano Stabellini Acked-by: Bjorn Helgaas

Re: [PATCH 10/12] xen-pcifront: this module is PV-only

2021-09-07 Thread Bjorn Helgaas
On Tue, Sep 07, 2021 at 06:14:16PM +0200, Jan Beulich wrote: > On 07.09.2021 17:30, Bjorn Helgaas wrote: > > Update subject to follow conventions (use "git log --oneline > > drivers/pci/Kconfig"). Should say what this patch does. > > I can change that; I don't

Re: [PATCH 10/12] xen-pcifront: this module is PV-only

2021-09-07 Thread Bjorn Helgaas
Update subject to follow conventions (use "git log --oneline drivers/pci/Kconfig"). Should say what this patch does. Commit log below should also say what this patch does. Currently it's part of the rationale for the change, but doesn't say what the patch does. On Tue, Sep 07, 2021 at

Re: [PATCH v2] xen/pcifront: Removed unnecessary __ref annotation

2021-08-30 Thread Bjorn Helgaas
On Mon, Aug 30, 2021 at 10:14:26PM +0200, Sergio Miguéns Iglesias wrote: > Thanks again for you answers! > I am lerning a lot from your replys and I really appreciate it. Should I > make a v3 patch and split that one into 2 different patches or would it > be confusing? > > I don't want to take

Re: [PATCH v2] xen/pcifront: Removed unnecessary __ref annotation

2021-08-30 Thread Bjorn Helgaas
On Mon, Aug 30, 2021 at 07:53:05PM +0200, Sergio Miguéns Iglesias wrote: > An unnecessary "__ref" annotation was removed from the > "drivers/pci/xen_pcifront.c" file. The function where the annotation > was used was "pcifront_backend_changed()", which does not call any > functions annotated as

Re: [PATCH v2] PCI/MSI: Skip masking MSI-X on Xen PV

2021-08-26 Thread Bjorn Helgaas
000e] > local_pci_probe+0x42/0x80 > (...) > > There is pci_msi_ignore_mask variable for bypassing MSI(-X) masking on Xen > PV, but msix_mask_all() missed checking it. Add the check there too. > > Fixes: 7d5ec3d36123 ("PCI/MSI: Mask all unused MSI-X entries"

Re: [PATCH] PCI/MSI: skip masking MSI on Xen PV

2021-08-26 Thread Bjorn Helgaas
On Thu, Aug 26, 2021 at 06:36:49PM +0200, Marek Marczykowski-Górecki wrote: > On Thu, Aug 26, 2021 at 09:55:32AM -0500, Bjorn Helgaas wrote: > > If/when you repost this, please run "git log --oneline > > drivers/pci/msi.c" and follow the convention of capitali

Re: [PATCH] PCI/MSI: skip masking MSI on Xen PV

2021-08-26 Thread Bjorn Helgaas
If/when you repost this, please run "git log --oneline drivers/pci/msi.c" and follow the convention of capitalizing the subject line. Also, I think this patch refers specifically to MSI-X, not MSI, so please update the subject line and the "masking MSI" below to reflect that. On Thu, Aug 26,

Re: [PATCH] PCI: Fix general code style

2021-08-25 Thread Bjorn Helgaas
On Thu, Aug 05, 2021 at 12:28:32AM +0200, Sergio Miguéns Iglesias wrote: > The code style for most files was fixed. This means that blank lines > were added when needed (normally after variable declarations), spaces > before tabs were removed, some code alignment issues were solved, block >

Re: [PATCH v2 0/6] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-08-09 Thread Bjorn Helgaas
On Sat, Aug 07, 2021 at 11:26:45AM +0200, Uwe Kleine-König wrote: > On Fri, Aug 06, 2021 at 04:24:52PM -0500, Bjorn Helgaas wrote: > > On Fri, Aug 06, 2021 at 08:46:23AM +0200, Uwe Kleine-König wrote: > > > On Thu, Aug 05, 2021 at 06:42:34PM -0500, Bjorn Helgaas wrote: > >

Re: [PATCH v2 0/6] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-08-06 Thread Bjorn Helgaas
On Fri, Aug 06, 2021 at 08:46:23AM +0200, Uwe Kleine-König wrote: > On Thu, Aug 05, 2021 at 06:42:34PM -0500, Bjorn Helgaas wrote: > > I looked at all the bus_type.probe() methods, it looks like pci_dev is > > not the only offender here. At least the following also have a dri

Re: [PATCH v2 0/6] PCI: Drop duplicated tracking of a pci_dev's bound driver

2021-08-05 Thread Bjorn Helgaas
On Tue, Aug 03, 2021 at 12:01:44PM +0200, Uwe Kleine-König wrote: > Hello, > > changes since v1 > (https://lore.kernel.org/linux-pci/20210729203740.1377045-1-u.kleine-koe...@pengutronix.de): > > - New patch to simplify drivers/pci/xen-pcifront.c, spotted and > suggested by Boris Ostrovsky > -

[PATCH] xen-blkfront: Fix 'physical' typos

2021-01-26 Thread Bjorn Helgaas
From: Bjorn Helgaas Fix misspelling of "physical". Signed-off-by: Bjorn Helgaas --- drivers/block/xen-blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 5265975b3fba..876db9fcf

Re: [PATCH -next] xen: Fix a previous prototype warning in xen.c

2020-09-28 Thread Bjorn Helgaas
On Thu, Sep 24, 2020 at 10:36:16PM +0800, Li Heng wrote: > Fix the warning: > arch/x86/pci/xen.c:423:13: warning: > no previous prototype for ‘xen_msi_init’ [-Wmissing-prototypes] > > Reported-by: Hulk Robot > Signed-off-by: Li Heng Applied to pci/misc for v5.10, thanks! > --- >

Re: [PCI] 3233e41d3e: WARNING:at_drivers/pci/pci.c:#pci_reset_hotplug_slot

2020-09-09 Thread Bjorn Helgaas
On Thu, Jul 23, 2020 at 11:51:52AM +0200, Lukas Wunner wrote: > On Thu, Jul 23, 2020 at 05:13:06PM +0800, kernel test robot wrote: > > FYI, we noticed the following commit (built with gcc-9): > [...] > > commit: 3233e41d3e8ebcd44e92da47ffed97fd49b84278 ("[PATCH] PCI: pciehp: Fix > > AB-BA

Re: [patch V2 34/46] PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable

2020-08-27 Thread Bjorn Helgaas
[+cc Rob, cover https://lore.kernel.org/r/20200826111628.794979...@linutronix.de/ this https://lore.kernel.org/r/20200826112333.992429...@linutronix.de/] On Wed, Aug 26, 2020 at 01:17:02PM +0200, Thomas Gleixner wrote: > From: Thomas Gleixner > > The arch_.*_msi_irq[s] fallbacks are compiled

Re: [patch RFC 34/38] x86/msi: Let pci_msi_prepare() handle non-PCI MSI

2020-08-25 Thread Bjorn Helgaas
On Tue, Aug 25, 2020 at 11:30:41PM +0200, Thomas Gleixner wrote: > On Tue, Aug 25 2020 at 15:24, Bjorn Helgaas wrote: > > On Fri, Aug 21, 2020 at 02:24:58AM +0200, Thomas Gleixner wrote: > >> Rename it to x86_msi_prepare() and handle the allocation type setup > >> d

Re: [patch RFC 30/38] PCI/MSI: Allow to disable arch fallbacks

2020-08-25 Thread Bjorn Helgaas
On Tue, Aug 25, 2020 at 11:28:30PM +0200, Thomas Gleixner wrote: > On Tue, Aug 25 2020 at 15:07, Bjorn Helgaas wrote: > >> + * The arch hooks to setup up msi irqs. Default functions are implemented > >> + * as weak symbols so that they /can/ be overriden by archit

Re: [patch RFC 34/38] x86/msi: Let pci_msi_prepare() handle non-PCI MSI

2020-08-25 Thread Bjorn Helgaas
On Fri, Aug 21, 2020 at 02:24:58AM +0200, Thomas Gleixner wrote: > Rename it to x86_msi_prepare() and handle the allocation type setup > depending on the device type. I see what you're doing, but the subject reads a little strangely ("pci_msi_prepare() handling non-PCI" stuff) since it doesn't

Re: [patch RFC 17/38] x86/pci: Reducde #ifdeffery in PCI init code

2020-08-25 Thread Bjorn Helgaas
e #ifdeffery to the header file where it is > not in the way. > > Signed-off-by: Thomas Gleixner > Cc: linux-...@vger.kernel.org Nice cleanup, thanks. Glad to get rid of the useless initializer, too. Acked-by: Bjorn Helgaas > --- > arch/x86/include/asm/pci_x86.h | 11

Re: [patch RFC 21/38] PCI: MSI: Provide pci_dev_has_special_msi_domain() helper

2020-08-25 Thread Bjorn Helgaas
gt; override in irq remapping. > > Signed-off-by: Thomas Gleixner > Cc: Bjorn Helgaas > Cc: linux-...@vger.kernel.org Acked-by: Bjorn Helgaas s|PCI: MSI:|PCI/MSI:| in the subject if feasible. > --- > drivers/pci/msi.c | 22 ++ > include/linux/msi.

Re: [patch RFC 30/38] PCI/MSI: Allow to disable arch fallbacks

2020-08-25 Thread Bjorn Helgaas
On Fri, Aug 21, 2020 at 02:24:54AM +0200, Thomas Gleixner wrote: > If an architecture does not require the MSI setup/teardown fallback > functions, then allow them to be replaced by stub functions which emit a > warning. > > Signed-off-by: Thomas Gleixner > Cc: Bjorn He

Re: [patch RFC 20/38] PCI: vmd: Mark VMD irqdomain with DOMAIN_BUS_VMD_MSI

2020-08-25 Thread Bjorn Helgaas
pt remapping. > > Override the default bus token. > > Signed-off-by: Thomas Gleixner > Cc: Bjorn Helgaas > Cc: Lorenzo Pieralisi > Cc: Jonathan Derrick > Cc: linux-...@vger.kernel.org Acked-by: Bjorn Helgaas > --- > drivers/pci/controller/vmd.c |

Re: [patch RFC 13/38] PCI: MSI: Rework pci_msi_domain_calc_hwirq()

2020-08-25 Thread Bjorn Helgaas
ot; here in the commit log, but nice cleanup and: Acked-by: Bjorn Helgaas Minor comments below. > Signed-off-by: Thomas Gleixner > Cc: linux-...@vger.kernel.org > --- > arch/x86/kernel/apic/msi.c |2 +- > drivers/pci/msi.c | 13 ++--- > include/linux/m

Re: [RFC PATCH 00/35] Move all PCIBIOS* definitions into arch/x86

2020-07-13 Thread Bjorn Helgaas
On Mon, Jul 13, 2020 at 02:22:12PM +0200, Saheed O. Bolarinwa wrote: > This goal of these series is to move the definition of *all* PCIBIOS* from > include/linux/pci.h to arch/x86 and limit their use within there. > All other tree specific definition will be left for intact. Maybe they can > be

Re: [PATCH] xen/pci: remove redundant assignment to variable irq

2020-06-30 Thread Bjorn Helgaas
[+cc Juergen, Boris] On Thu, Apr 09, 2020 at 12:41:18PM +0100, Colin King wrote: > From: Colin Ian King > > The variable irq is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. > >

Re: [PATCH 1/2] xen-pciback: Use dev_printk() when possible

2020-05-27 Thread Bjorn Helgaas
On Wed, May 27, 2020 at 03:34:26PM -0700, Boris Ostrovsky wrote: > On 5/27/20 1:43 PM, Bjorn Helgaas wrote: > > @@ -155,8 +157,8 @@ int xen_pcibk_config_read(struct pci_dev *dev, int > > offset, int size, > > u32 value = 0, tmp_val; > > > >

[PATCH 1/2] xen-pciback: Use dev_printk() when possible

2020-05-27 Thread Bjorn Helgaas
From: Bjorn Helgaas Use dev_printk() when possible to include device and driver information in the conventional format. Add "#define dev_fmt" when needed to preserve DRV_NAME or KBUILD_MODNAME in messages. No functional change intended. Signed-off-by: Bjorn Helgaas --- drive

[PATCH 2/2] xenbus: Use dev_printk() when possible

2020-05-27 Thread Bjorn Helgaas
From: Bjorn Helgaas Use dev_printk() when possible to include device and driver information in the conventional format. Add "#define dev_fmt" to preserve KBUILD_MODNAME in messages. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/xen/xenbus/xenbus_pr

[PATCH 0/2] xen: Use dev_printk() when possible

2020-05-27 Thread Bjorn Helgaas
From: Bjorn Helgaas Use dev_printk() when possible to include device and driver information in the conventional format. Bjorn Helgaas (2): xen-pciback: Use dev_printk() when possible xenbus: Use dev_printk() when possible drivers/xen/xen-pciback/conf_space.c| 16 + drivers

Re: [PATCH] x86/xen: drop an unused parameter gsi_override

2020-05-21 Thread Bjorn Helgaas
On Tue, Apr 28, 2020 at 03:36:40PM +, Wei Liu wrote: > All callers within the same file pass in -1 (no override). > > Signed-off-by: Wei Liu Applied to pci/virtualization for v5.8, thanks! I don't see anything else in linux-next that touches this file, but if somebody wants to merge this

Re: [Xen-devel] [PATCH v2 1/1] treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively

2019-03-25 Thread Bjorn Helgaas
cked-by: Mike Rapoport (for mm/memblock.c) > Acked-by: Rafael J. Wysocki Acked-by: Bjorn Helgaas (for drivers/pci) Thanks a lot for cleaning this up. This has been annoying for a long time. ___ Xen-devel mailing list Xen-devel@lists.xenpro

Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs

2019-03-20 Thread Bjorn Helgaas
On Wed, Mar 20, 2019 at 01:27:15PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > This patch fixes the following warnings: > > drivers/pci/proc.c: In function ‘proc_bus_pci_ioctl’: >

Re: [Xen-devel] [PATCH] PCI: Mark expected switch fall-throughs

2019-03-20 Thread Bjorn Helgaas
On Wed, Mar 20, 2019 at 01:27:15PM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. Does this fix all the remaining cases in drivers/pci? I'd like to fix them all at once. What's the best way to

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-15 Thread Bjorn Helgaas
[+cc Russell, Sinan, Herbert, Srikanth, Derek, Satanand, Felix, Raghu] On Fri, Dec 15, 2017 at 09:48:02AM -0600, Govinda Tatti wrote: > On 12/13/2017 3:24 PM, Bjorn Helgaas wrote: > >On Wed, Dec 13, 2017 at 02:46:57PM -0600, Govinda Tatti wrote: > >>>>>>-static bo

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-13 Thread Bjorn Helgaas
[+cc Christoph] On Wed, Dec 13, 2017 at 02:46:57PM -0600, Govinda Tatti wrote: > > -static bool pcie_has_flr(struct pci_dev *dev) > +bool pcie_has_flr(struct pci_dev *dev) > { > u32 cap; > @@ -3882,6 +3882,7 @@ static bool pcie_has_flr(struct pci_dev *dev) >

Re: [Xen-devel] [PATCH V3 1/2] Drivers/PCI: Export pcie_has_flr() interface

2017-12-08 Thread Bjorn Helgaas
On Thu, Dec 07, 2017 at 05:21:44PM -0500, Govinda Tatti wrote: > This patch exports pcie_has_flr() and it is being used by Xen pciback > driver to reset (flr/slot/bus) PCI devices based on 'reset' SysFS > attribute. > > Signed-off-by: Govinda Tatti > --- > v3: -New > >