Aw: Re: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2021-02-02 Thread Frank Wunderlich
Hi, is there any new state? kernel test robot reports the following problem (i do not see it when compiling for my arm/arm64 devices): ARCH=i386 drivers/pci/probe.c: In function 'pci_register_host_bridge': >> drivers/pci/probe.c:930:39: error: 'struct device' has no member named >> 'msi_domai

Aw: Re: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2021-01-03 Thread Frank Wunderlich
Hi, 5.11-rc1 is also affected, here is the relevant part of trace from my bananapi-r2: [5.792659] mtk-pcie 1a14.pcie: PCI host bridge to bus :00 [5.798879] pci_bus :00: root bus resource [bus 00-ff] [5.804412] pci_bus :00: root bus resource [io 0x-0x] (bus a

Aw: Re: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-21 Thread Frank Wunderlich
Hi, any new state here? last fix works, but i have not seen it approved by anyone for merge or sent as separate Patch regards Frank

Re: Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-06 Thread Marc Zyngier
On 2020-11-05 23:00, Thomas Gleixner wrote: On Thu, Nov 05 2020 at 09:20, Marc Zyngier wrote: On 2020-11-04 23:14, Thomas Gleixner wrote: /* Resource alignment requirements */ resource_size_t (*align_resource)(struct pci_dev *dev, If that's the direction of travel, we also nee

Re: Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-05 Thread Thomas Gleixner
On Thu, Nov 05 2020 at 09:20, Marc Zyngier wrote: > On 2020-11-04 23:14, Thomas Gleixner wrote: >> /* Resource alignment requirements */ >> resource_size_t (*align_resource)(struct pci_dev *dev, > > If that's the direction of travel, we also need something like this > for configuration wh

Aw: Re: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-05 Thread Frank Wunderlich
Marc's Patch based on thomas' last one also seems to work well for r2, again no warning, PCI and AHCI (connected to pcie bus) working regards Frank

Re: Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-05 Thread Marc Zyngier
On 2020-11-04 23:14, Thomas Gleixner wrote: [...] TBH, that's butt ugly. So after staring long enough into the PCI code I came up with a way to transport that information to the probe code. That allows a particular device to say 'I can't do MSI' and at the same time keeps the warning machinery

Re: Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-04 Thread Thomas Gleixner
Frank, On Wed, Nov 04 2020 at 17:49, Frank Wunderlich wrote: >> Von: "Thomas Gleixner" >> Any architecture which selects PCI_MSI_ARCH_FALLBACKS and does not have >> irqdomain support runs into: >> >> if (!d) >> bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI; >> >> which in turn makes pc

Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-04 Thread Frank Wunderlich
> Gesendet: Dienstag, 03. November 2020 um 11:16 Uhr > Von: "Thomas Gleixner" > Any architecture which selects PCI_MSI_ARCH_FALLBACKS and does not have > irqdomain support runs into: > > if (!d) > bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI; > > which in turn makes pci_msi_support

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-03 Thread Thomas Gleixner
On Tue, Nov 03 2020 at 11:41, Marc Zyngier wrote: > On 2020-11-03 10:31, Thomas Gleixner wrote: > We can do that, although I worried that it isn't 100% reliable: > > pci_host_probe() ends up calling pci_add_device(), and will start > probing devices if the endpoint drivers have already registered >

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-03 Thread Marc Zyngier
On 2020-11-03 10:31, Thomas Gleixner wrote: On Tue, Nov 03 2020 at 09:54, Marc Zyngier wrote: On 2020-11-02 22:18, Thomas Gleixner wrote: So we really need some other solution and removing the warning is not an option. If MSI is enabled then we want to get a warning when a PCI device has no MSI

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-03 Thread Thomas Gleixner
On Tue, Nov 03 2020 at 09:54, Marc Zyngier wrote: > On 2020-11-02 22:18, Thomas Gleixner wrote: >> So we really need some other solution and removing the warning is not >> an option. If MSI is enabled then we want to get a warning when a PCI >> device has no MSI domain associated. Explicitly expre

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-03 Thread Marc Zyngier
On 2020-11-03 10:16, Thomas Gleixner wrote: On Tue, Nov 03 2020 at 09:54, Marc Zyngier wrote: On 2020-11-02 22:18, Thomas Gleixner wrote: On Mon, Nov 02 2020 at 17:16, Thomas Gleixner wrote: On Mon, Nov 02 2020 at 11:30, Marc Zyngier wrote: --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-03 Thread Thomas Gleixner
On Tue, Nov 03 2020 at 09:54, Marc Zyngier wrote: > On 2020-11-02 22:18, Thomas Gleixner wrote: >> On Mon, Nov 02 2020 at 17:16, Thomas Gleixner wrote: >>> On Mon, Nov 02 2020 at 11:30, Marc Zyngier wrote: --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -871,6 +871,8 @@ static

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-03 Thread Marc Zyngier
On 2020-11-02 22:18, Thomas Gleixner wrote: On Mon, Nov 02 2020 at 17:16, Thomas Gleixner wrote: On Mon, Nov 02 2020 at 11:30, Marc Zyngier wrote: --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -871,6 +871,8 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus) d =

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-02 Thread Thomas Gleixner
On Mon, Nov 02 2020 at 17:16, Thomas Gleixner wrote: > On Mon, Nov 02 2020 at 11:30, Marc Zyngier wrote: >> --- a/drivers/pci/probe.c >> +++ b/drivers/pci/probe.c >> @@ -871,6 +871,8 @@ static void pci_set_bus_msi_domain(struct pci_bus >> *bus) >> d = pci_host_bridge_msi_domain(b); >>

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-02 Thread Thomas Gleixner
On Mon, Nov 02 2020 at 11:30, Marc Zyngier wrote: > On 2020-11-01 22:27, Thomas Gleixner wrote: > The following patch makes it work for me (GICv3 guest without an ITS)by > checking for the presence of an MSI domain at the point where we > actually > perform this association, and before starting to

Aw: Re: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-02 Thread Frank Wunderlich
> Gesendet: Montag, 02. November 2020 um 14:58 Uhr > Von: "Marc Zyngier" > diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c > index d15c881e2e7e..5bb1306162c7 100644 > --- a/drivers/pci/pci-sysfs.c > +++ b/drivers/pci/pci-sysfs.c > @@ -387,10 +387,20 @@ static ssize_t msi_bus_store(

Re: Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-02 Thread Marc Zyngier
On 2020-11-02 11:56, Frank Wunderlich wrote: looks good on bananapi-r2, no warning, pcie-card and hdd recognized Thanks for giving it a shot. Still needs a bit of tweaking, as I expect it to break configurations that select CONFIG_PCI_MSI_ARCH_FALLBACKS (we have to assume that MSIs can be handl

Aw: Re: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-02 Thread Frank Wunderlich
looks good on bananapi-r2, no warning, pcie-card and hdd recognized regards Frank > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > index 4289030b0fff..bb363eb103a2 100644 > --- a/drivers/pci/probe.c > +++ b/drivers/pci/probe.c > @@ -871,6 +871,8 @@ static void pci_set_bus_msi_domain(st

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-02 Thread Marc Zyngier
On 2020-11-01 22:27, Thomas Gleixner wrote: On Sun, Nov 01 2020 at 21:47, Marc Zyngier wrote: On Sun, 01 Nov 2020 18:27:13 +, Frank Wunderlich wrote: Thinking of it a bit more, I think this is the wrong solution. PCI MSIs are optional, and not a requirement. I can trivially spin a VM with

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Thomas Gleixner
On Sun, Nov 01 2020 at 21:47, Marc Zyngier wrote: > On Sun, 01 Nov 2020 18:27:13 +, > Frank Wunderlich wrote: > Thinking of it a bit more, I think this is the wrong solution. > > PCI MSIs are optional, and not a requirement. I can trivially spin a > VM with PCI devices and yet no MSI capabilit

Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Marc Zyngier
On Sun, 01 Nov 2020 18:27:13 +, Frank Wunderlich wrote: > > > Gesendet: Sonntag, 01. November 2020 um 18:54 Uhr > > Von: "Ryder Lee" > > > Yea, mt7623 (mtk_pcie_soc_v1) does not support MSI, so that's a way to > > handle it. > > > > @Frank, could you help to test it? > > > > Ryder > > comp

Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Frank Wunderlich
> Gesendet: Sonntag, 01. November 2020 um 18:54 Uhr > Von: "Ryder Lee" > Yea, mt7623 (mtk_pcie_soc_v1) does not support MSI, so that's a way to > handle it. > > @Frank, could you help to test it? > > Ryder compiles clean for mt7623/armhf and mt7622/aarch64 so far at least bananapi-r2/mt7623 boo

Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Ryder Lee
On Sun, 2020-11-01 at 11:43 +, Marc Zyngier wrote: > On Sun, 01 Nov 2020 09:25:04 +, > Frank Wunderlich wrote: > > > > Am 31. Oktober 2020 22:49:14 MEZ schrieb Thomas Gleixner > > : > > > > >That's not a fix. It's just supressing the warning. > > > > Ok sorry > > > > >So it needs to b

Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Frank Wunderlich
> Gesendet: Sonntag, 01. November 2020 um 12:43 Uhr > Von: "Marc Zyngier" > On Sun, 01 Nov 2020 09:25:04 +, > Frank Wunderlich wrote: > > It looks like for mt7623 there is no msi domain setup (done via > > mtk_pcie_setup_irq callback + mtk_pcie_init_irq_domain) in mtk pcie > > driver. > >

Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Marc Zyngier
On Sun, 01 Nov 2020 09:25:04 +, Frank Wunderlich wrote: > > Am 31. Oktober 2020 22:49:14 MEZ schrieb Thomas Gleixner : > > >That's not a fix. It's just supressing the warning. > > Ok sorry > > >So it needs to be figured out why the domain association is not there. > > It looks like for mt

Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Thomas Gleixner
On Sun, Nov 01 2020 at 10:25, Frank Wunderlich wrote: > Am 31. Oktober 2020 22:49:14 MEZ schrieb Thomas Gleixner : > >>So it needs to be figured out why the domain association is not there. > > It looks like for mt7623 there is no msi domain setup (done via > mtk_pcie_setup_irq callback + mtk_pcie_

Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-11-01 Thread Frank Wunderlich
Am 31. Oktober 2020 22:49:14 MEZ schrieb Thomas Gleixner : >That's not a fix. It's just supressing the warning. Ok sorry >So it needs to be figured out why the domain association is not there. It looks like for mt7623 there is no msi domain setup (done via mtk_pcie_setup_irq callback + mtk_pci

Re: [PATCH] pci: mediatek: fix warning in msi.h

2020-10-31 Thread Thomas Gleixner
Frank, On Sat, Oct 31 2020 at 15:03, Frank Wunderlich wrote: > From: Frank Wunderlich > > 5.10 shows these warnings on bootup while enabling pcie > at least on bananapi-r2: > > [6.161730] WARNING: CPU: 2 PID: 73 at include/linux/msi.h:213 > pci_msi_setup_ > msi_irqs.constprop.0+0x78/0x80 > .

[PATCH] pci: mediatek: fix warning in msi.h

2020-10-31 Thread Frank Wunderlich
From: Frank Wunderlich 5.10 shows these warnings on bootup while enabling pcie at least on bananapi-r2: [6.161730] WARNING: CPU: 2 PID: 73 at include/linux/msi.h:213 pci_msi_setup_ msi_irqs.constprop.0+0x78/0x80 [6.724607] WARNING: CPU: 2 PID: 73 at include/linux/msi.h:219 free_msi_