All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Marc Zyngier <maz@kernel.org>
Cc: Frank Wunderlich <frank-w@public-files.de>,
	Ryder Lee <ryder.lee@mediatek.com>,
	linux-mediatek@lists.infradead.org,
	Frank Wunderlich <linux@fw-web.de>,
	linux-kernel@vger.kernel.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h
Date: Tue, 03 Nov 2020 11:31:17 +0100	[thread overview]
Message-ID: <87k0v27mve.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <901c5eb8bbaa3fe53ddc8f65917e48ef@kernel.org>

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 expressing the PCIE
>> brigde misfeature of not supporting MSI is way better than silently
>> returning an error code which is swallowed anyway.
>
> I don't disagree here, though the PCI_MSI_ARCH_FALLBACKS mechanism
> makes it more difficult to establish.

Only for the few leftovers which implement msi_controller, i.e.

drivers/pci/controller/pci-hyperv.c
drivers/pci/controller/pci-tegra.c
drivers/pci/controller/pcie-rcar-host.c
drivers/pci/controller/pcie-xilinx.c

The architectures which select PCI_MSI_ARCH_FALLBACKS are:

arch/ia64/Kconfig:      select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/mips/Kconfig:      select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/powerpc/Kconfig:   select PCI_MSI_ARCH_FALLBACKS           if PCI_MSI
arch/s390/Kconfig:      select PCI_MSI_ARCH_FALLBACKS   if PCI_MSI
arch/sparc/Kconfig:     select PCI_MSI_ARCH_FALLBACKS if PCI_MSI

implement arch_setup_msi_irq() which makes it magically work :)

>> Whatever the preferred way is via flags at host probe time or flagging
>> it post probe I don't care much as long as it is consistent.
>
> Host probe time is going to require some changes in the core PCI api,
> as everything that checks for a MSI domain is based on the pci_bus
> structure, which is only allocated much later.

Yeah, it's nasty. One possible solution is to add flags or a callback to
pci_ops, but it's not pretty either.

I think we should go with the 'mark it after pci_host_probe()' hack for
5.10-rc. The real fix will be larger and go into 5.11.

Thoughts?

Thanks,

        tglx


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Gleixner <tglx@linutronix.de>
To: Marc Zyngier <maz@kernel.org>
Cc: Ryder Lee <ryder.lee@mediatek.com>,
	Frank Wunderlich <frank-w@public-files.de>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Frank Wunderlich <linux@fw-web.de>
Subject: Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h
Date: Tue, 03 Nov 2020 11:31:17 +0100	[thread overview]
Message-ID: <87k0v27mve.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <901c5eb8bbaa3fe53ddc8f65917e48ef@kernel.org>

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 expressing the PCIE
>> brigde misfeature of not supporting MSI is way better than silently
>> returning an error code which is swallowed anyway.
>
> I don't disagree here, though the PCI_MSI_ARCH_FALLBACKS mechanism
> makes it more difficult to establish.

Only for the few leftovers which implement msi_controller, i.e.

drivers/pci/controller/pci-hyperv.c
drivers/pci/controller/pci-tegra.c
drivers/pci/controller/pcie-rcar-host.c
drivers/pci/controller/pcie-xilinx.c

The architectures which select PCI_MSI_ARCH_FALLBACKS are:

arch/ia64/Kconfig:      select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/mips/Kconfig:      select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/powerpc/Kconfig:   select PCI_MSI_ARCH_FALLBACKS           if PCI_MSI
arch/s390/Kconfig:      select PCI_MSI_ARCH_FALLBACKS   if PCI_MSI
arch/sparc/Kconfig:     select PCI_MSI_ARCH_FALLBACKS if PCI_MSI

implement arch_setup_msi_irq() which makes it magically work :)

>> Whatever the preferred way is via flags at host probe time or flagging
>> it post probe I don't care much as long as it is consistent.
>
> Host probe time is going to require some changes in the core PCI api,
> as everything that checks for a MSI domain is based on the pci_bus
> structure, which is only allocated much later.

Yeah, it's nasty. One possible solution is to add flags or a callback to
pci_ops, but it's not pretty either.

I think we should go with the 'mark it after pci_host_probe()' hack for
5.10-rc. The real fix will be larger and go into 5.11.

Thoughts?

Thanks,

        tglx


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

  parent reply	other threads:[~2020-11-03 10:31 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 14:03 [PATCH] pci: mediatek: fix warning in msi.h Frank Wunderlich
2020-10-31 14:03 ` Frank Wunderlich
2020-10-31 21:49 ` Thomas Gleixner
2020-10-31 21:49   ` Thomas Gleixner
2020-11-01  9:25   ` Frank Wunderlich
2020-11-01  9:25     ` Frank Wunderlich
2020-11-01 11:17     ` Thomas Gleixner
2020-11-01 11:17       ` Thomas Gleixner
2020-11-01 11:43     ` Marc Zyngier
2020-11-01 11:43       ` Marc Zyngier
2020-11-01 15:58       ` Aw: " Frank Wunderlich
2020-11-01 15:58         ` Frank Wunderlich
2020-11-01 17:54       ` Ryder Lee
2020-11-01 17:54         ` Ryder Lee
2020-11-01 18:27         ` Aw: " Frank Wunderlich
2020-11-01 18:27           ` Frank Wunderlich
2020-11-01 21:47           ` Marc Zyngier
2020-11-01 21:47             ` Marc Zyngier
2020-11-01 22:27             ` Thomas Gleixner
2020-11-01 22:27               ` Thomas Gleixner
2020-11-02 11:30               ` Marc Zyngier
2020-11-02 11:30                 ` Marc Zyngier
2020-11-02 11:56                 ` Aw: " Frank Wunderlich
2020-11-02 11:56                   ` Frank Wunderlich
2020-11-02 13:58                   ` Marc Zyngier
2020-11-02 13:58                     ` Marc Zyngier
2020-11-02 14:27                     ` Aw: " Frank Wunderlich
2020-11-02 14:27                       ` Frank Wunderlich
2020-11-02 16:16                 ` Aw: " Thomas Gleixner
2020-11-02 16:16                   ` Thomas Gleixner
2020-11-02 22:18                   ` Thomas Gleixner
2020-11-02 22:18                     ` Thomas Gleixner
2020-11-03  9:54                     ` Marc Zyngier
2020-11-03  9:54                       ` Marc Zyngier
2020-11-03 10:16                       ` Thomas Gleixner
2020-11-03 10:16                         ` Thomas Gleixner
2020-11-03 10:29                         ` Marc Zyngier
2020-11-03 10:29                           ` Marc Zyngier
2020-11-04 16:49                         ` Aw: " Frank Wunderlich
2020-11-04 16:49                           ` Frank Wunderlich
2020-11-04 23:14                           ` Thomas Gleixner
2020-11-04 23:14                             ` Thomas Gleixner
2020-11-05  9:20                             ` Marc Zyngier
2020-11-05  9:20                               ` Marc Zyngier
2020-11-05 13:59                               ` Aw: " Frank Wunderlich
2020-11-05 13:59                                 ` Frank Wunderlich
2020-11-05 23:00                               ` Aw: " Thomas Gleixner
2020-11-05 23:00                                 ` Thomas Gleixner
2020-11-06  9:43                                 ` Marc Zyngier
2020-11-06  9:43                                   ` Marc Zyngier
2020-11-21 16:12                                   ` Aw: " Frank Wunderlich
2020-11-21 16:12                                     ` Frank Wunderlich
2021-01-03 13:08                                     ` Frank Wunderlich
2021-01-03 13:08                                       ` Frank Wunderlich
2021-02-02 16:21                                   ` Frank Wunderlich
2021-02-02 16:21                                     ` Frank Wunderlich
2020-11-03 10:31                       ` Thomas Gleixner [this message]
2020-11-03 10:31                         ` Aw: " Thomas Gleixner
2020-11-03 11:41                         ` Marc Zyngier
2020-11-03 11:41                           ` Marc Zyngier
2020-11-03 14:23                           ` Thomas Gleixner
2020-11-03 14:23                             ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k0v27mve.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bhelgaas@google.com \
    --cc=frank-w@public-files.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@fw-web.de \
    --cc=matthias.bgg@gmail.com \
    --cc=maz@kernel.org \
    --cc=ryder.lee@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.