Commit Graph

13 Commits

Author SHA1 Message Date
Myron Stowe 731c73da76 PCI: altera-msi: Silence 'set affinity failed' warning
JIRA: https://issues.redhat.com/browse/RHEL-67693
Upstream Status: 114ca2969f1e4d4f3b6920a4824f11b0a9cf708a

commit 114ca2969f1e4d4f3b6920a4824f11b0a9cf708a
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
Date:   Tue Jul 23 15:27:03 2024 +0200

    PCI: altera-msi: Silence 'set affinity failed' warning

    Use MSI_FLAG_NO_AFFINITY, which keeps .irq_set_affinity() unset and allows
    migrate_one_irq() to exit right away, without warnings like this:

      IRQ...: set affinity failed(-22)

    Remove the .irq_set_affinity() implementation that is no longer needed.

    Link: https://lore.kernel.org/r/20240723132958.41320-4-marek.vasut+renesas@mailbox.org
    Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
    [bhelgaas: commit log]
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Acked-by: Thomas Gleixner <tglx@linutronix.de>

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2025-02-18 09:48:09 -07:00
Myron Stowe 807fca8e7a PCI: controller: Add missing MODULE_DESCRIPTION() macros
JIRA: https://issues.redhat.com/browse/RHEL-59033
Upstream Status: 142a41da39d1467b7ff7dad64fc421249d06565d

Conflict(s):
  RHEL does not have the following files, thus their respective patch
  hunk was skipped:
    drivers/pci/controller/pcie-apple.c


commit 142a41da39d1467b7ff7dad64fc421249d06565d
Author: Jeff Johnson <quic_jjohnson@quicinc.com>
Date:   Wed Jun 26 10:07:01 2024 -0700

    PCI: controller: Add missing MODULE_DESCRIPTION() macros

    When ARCH=x86, make allmodconfig && make W=1 C=1 reports:

      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/dwc/pci-exynos.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pci-host-generic.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-altera.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-altera-msi.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-mediatek.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-mediatek-gen3.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/vmd.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-apple.o
      WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pci/controller/pcie-mt7621.o

    Add the missing MODULE_DESCRIPTION() macro.

    [kwilczynski: update MODULE_DESCRIPTION() text, commit log]
    Link: https://lore.kernel.org/linux-pci/20240626-md-drivers-pci-controller-v2-1-94c811db7a51@quicinc.com
    Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
    Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Acked-by: Nirmal Patel <nirmal.patel@linux.intel.com>
    Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> # MT7621

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2024-10-05 10:59:20 -06:00
Myron Stowe 54874bb0c0 PCI: altera-msi: Convert to platform remove callback returning void
JIRA: https://issues.redhat.com/browse/RHEL-2570
Upstream Status: 60d03f70455c7704cb76737ff947b75391934954

commit 60d03f70455c7704cb76737ff947b75391934954
Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date:   Tue Mar 21 20:31:56 2023 +0100

    PCI: altera-msi: Convert to platform remove callback returning void

    The .remove() callback for a platform driver returns an int which makes
    many driver authors wrongly assume it's possible to do error handling by
    returning an error code. However the value returned is (mostly) ignored
    and this typically results in resource leaks. To improve here there is a
    quest to make the remove callback return void. In the first step of this
    quest all drivers are converted to .remove_new() which already returns
    void.

    Trivially convert this driver from always returning zero in the remove
    callback to the void returning variant.

    Link: https://lore.kernel.org/linux-pci/20230321193208.366561-4-u.kleine-koenig@pengutronix.de
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2023-09-19 13:32:23 -06:00
Myron Stowe fed96fd48d PCI: Remove unnecessary <linux/of_irq.h> includes
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2166398
Upstream Status: 277004d7a4a348de185fb4149ff29a651e994ff4

commit 277004d7a4a348de185fb4149ff29a651e994ff4
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Mon Oct 31 10:39:54 2022 -0500

    PCI: Remove unnecessary <linux/of_irq.h> includes

    Many host controller drivers #include <linux/of_irq.h> even though they
    don't need it.  Remove the unnecessary #includes.

    Link: https://lore.kernel.org/r/20221031153954.1163623-6-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Acked-by: Roy Zang <roy.zang@nxp.com>

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2023-03-07 18:02:03 -07:00
Myron Stowe 58f6d00cb2 PCI: altera-msi: Include <linux/irqdomain.h> explicitly
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2166398
Upstream Status: 8c50cd059c5cd974da4285af17adf0e38905b25b

commit 8c50cd059c5cd974da4285af17adf0e38905b25b
Author: Bjorn Helgaas <bhelgaas@google.com>
Date:   Mon Oct 31 10:39:50 2022 -0500

    PCI: altera-msi: Include <linux/irqdomain.h> explicitly

    pcie-altera-msi.c uses irq_domain_add_linear() and related interfaces, so
    it needs <linux/irqdomain.h> but doesn't include it directly; it relies on
    the fact that <linux/of_irq.h> includes it.

    But pcie-altera-msi.c *doesn't* need <linux/of_irq.h> itself.  Include
    <linux/irqdomain.h> directly to remove this implicit dependency so a future
    patch can drop <linux/of_irq.h>.

    Link: https://lore.kernel.org/r/20221031153954.1163623-2-helgaas@kernel.org
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2023-03-07 18:02:03 -07:00
Myron Stowe cc06255630 PCI: Bulk conversion to generic_handle_domain_irq()
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2045254
Upstream Status: d21faba11693c10072ce3b96b696445175f49be2

commit d21faba11693c10072ce3b96b696445175f49be2
Author: Marc Zyngier <maz@kernel.org>
Date:   Mon Aug 2 17:26:19 2021 +0100

    PCI: Bulk conversion to generic_handle_domain_irq()

    Wherever possible, replace constructs that match either
    generic_handle_irq(irq_find_mapping()) or
    generic_handle_irq(irq_linear_revmap()) to a single call to
    generic_handle_domain_irq().

    Link: https://lore.kernel.org/r/20210802162630.2219813-4-maz@kernel.org
    Signed-off-by: Marc Zyngier <maz@kernel.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>

Signed-off-by: Myron Stowe <mstowe@redhat.com>
2022-03-03 20:43:32 -07:00
Chen Hui b1160a06e0 PCI: altera-msi: Remove redundant dev_err call in altera_msi_probe()
There is a error message within devm_ioremap_resource()
already, so remove the dev_err() call to avoid redundant
error message.

Link: https://lore.kernel.org/r/20210409075748.226141-1-clare.chenhui@huawei.com
Signed-off-by: Chen Hui <clare.chenhui@huawei.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
2021-04-14 17:45:11 +01:00
Martin Kaiser 3f0ea2360e PCI: altera-msi: Remove IRQ handler and data in one go
Call irq_set_chained_handler_and_data() to clear the chained handler
and the handler's data under irq_desc->lock.

See also 2cf5a03cb2 ("PCI/keystone: Fix race in installing chained
IRQ handler").

Link: https://lore.kernel.org/r/20210115212435.19940-1-martin@kaiser.cx
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2021-01-18 15:48:06 +00:00
Bjorn Helgaas 6f119ec8d9 Merge branch 'pci/irq-error'
- Remove redundant logging for platform_get_irq() errors (Krzysztof
  Wilczyński)

* pci/irq-error:
  PCI: Remove dev_err() when handing an error from platform_get_irq()
2020-08-05 18:24:22 -05:00
Krzysztof Wilczyński caecb05c80 PCI: Remove dev_err() when handing an error from platform_get_irq()
There is no need to call the dev_err() function directly to print a
custom message when handling an error from either the platform_get_irq() or
platform_get_irq_byname() functions as both are going to display an
appropriate error message in case of a failure.

This change is as per suggestions from Coccinelle, e.g.,

  drivers/pci/controller/dwc/pcie-armada8k.c:252:2-9: line 252 is
  redundant because platform_get_irq() already prints an error

[bhelgaas: squashed into one commit]
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20200802142601.1635926-2-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-3-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-4-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-5-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-6-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-7-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-8-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-9-kw@linux.com
Link: https://lore.kernel.org/r/20200802142601.1635926-10-kw@linux.com
Link: https://lore.kernel.org/r/20200803071040.1663662-1-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com> # altera
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> # dwc
2020-08-03 09:26:03 -05:00
Dejin Zheng e2dcd20b16 PCI: controller: Convert to devm_platform_ioremap_resource_byname()
Use devm_platform_ioremap_resource_byname() to simplify the code,
since it calls respectively platform_get_resource_byname() and
devm_ioremap_resource().

Link: https://lore.kernel.org/r/20200602171601.17630-1-zhengdejin5@gmail.com
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
2020-07-10 11:50:23 +01:00
Ley Foon Tan c7ddfd3514 PCI: altera-msi: Allow building as module
Altera MSI IP is a soft IP and is only available after
an FPGA image (with design containing it) is programmed.

Make driver modulable to support use case FPGA image is programmed the
after kernel has booted, so that the driver can be loaded upon request.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
2019-05-30 15:34:54 +01:00
Shawn Lin 6e0832fa43 PCI: Collect all native drivers under drivers/pci/controller/
Native PCI drivers for root complex devices were originally all in
drivers/pci/host/.  Some of these devices can also be operated in endpoint
mode.  Drivers for endpoint mode didn't seem to fit in the "host"
directory, so we put both the root complex and endpoint drivers in
per-device directories, e.g., drivers/pci/dwc/, drivers/pci/cadence/, etc.

These per-device directories contain trivial Kconfig and Makefiles and
clutter drivers/pci/.  Make a new drivers/pci/controllers/ directory and
collect all the device-specific drivers there.

No functional change intended.

Link: https://lkml.kernel.org/r/1520304202-232891-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2018-06-08 07:50:11 -05:00