All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, pali@kernel.org,
	"Marek Behún" <kabel@kernel.org>
Subject: [PATCH 5.17 07/19] PCI: aardvark: Refactor unmasking summary MSI interrupt
Date: Wed,  4 May 2022 18:58:40 +0200	[thread overview]
Message-ID: <20220504165852.30089-8-kabel@kernel.org> (raw)
In-Reply-To: <20220504165852.30089-1-kabel@kernel.org>

From: Pali Rohár <pali@kernel.org>

commit 4689c0916320f112a8a33f2689d3addc3262f02c upstream.

Refactor the masking of ISR0/1 Sources and unmasking of summary MSI interrupt
so that it corresponds to the comments:
- first mask all ISR0/1
- then unmask all MSIs
- then unmask summary MSI interrupt

Link: https://lore.kernel.org/r/20220110015018.26359-10-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/pci/controller/pci-aardvark.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c
index 2c2259d1af5e..2ac5a0cba247 100644
--- a/drivers/pci/controller/pci-aardvark.c
+++ b/drivers/pci/controller/pci-aardvark.c
@@ -571,15 +571,17 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
 	advk_writel(pcie, PCIE_IRQ_ALL_MASK, HOST_CTRL_INT_STATUS_REG);
 
 	/* Disable All ISR0/1 Sources */
-	reg = PCIE_ISR0_ALL_MASK;
-	reg &= ~PCIE_ISR0_MSI_INT_PENDING;
-	advk_writel(pcie, reg, PCIE_ISR0_MASK_REG);
-
+	advk_writel(pcie, PCIE_ISR0_ALL_MASK, PCIE_ISR0_MASK_REG);
 	advk_writel(pcie, PCIE_ISR1_ALL_MASK, PCIE_ISR1_MASK_REG);
 
 	/* Unmask all MSIs */
 	advk_writel(pcie, ~(u32)PCIE_MSI_ALL_MASK, PCIE_MSI_MASK_REG);
 
+	/* Unmask summary MSI interrupt */
+	reg = advk_readl(pcie, PCIE_ISR0_MASK_REG);
+	reg &= ~PCIE_ISR0_MSI_INT_PENDING;
+	advk_writel(pcie, reg, PCIE_ISR0_MASK_REG);
+
 	/* Enable summary interrupt for GIC SPI source */
 	reg = PCIE_IRQ_ALL_MASK & (~PCIE_IRQ_ENABLE_INTS_MASK);
 	advk_writel(pcie, reg, HOST_CTRL_INT_MASK_REG);
-- 
2.35.1


  parent reply	other threads:[~2022-05-04 17:17 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 16:58 [PATCH 5.17 00/19] PCIe Aardvark controller backports for 5.17 Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 01/19] PCI: aardvark: Replace custom PCIE_CORE_INT_* macros with PCI_INTERRUPT_* Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 02/19] PCI: aardvark: Rewrite IRQ code to chained IRQ handler Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 03/19] PCI: aardvark: Check return value of generic_handle_domain_irq() when processing INTx IRQ Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 04/19] PCI: aardvark: Make MSI irq_chip structures static driver structures Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 05/19] PCI: aardvark: Make msi_domain_info structure a static driver structure Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 06/19] PCI: aardvark: Use dev_fwnode() instead of of_node_to_fwnode(dev->of_node) Marek Behún
2022-05-04 16:58 ` Marek Behún [this message]
2022-05-04 16:58 ` [PATCH 5.17 08/19] PCI: aardvark: Add support for masking MSI interrupts Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 09/19] PCI: aardvark: Fix setting MSI address Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 10/19] PCI: aardvark: Enable MSI-X support Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 11/19] PCI: aardvark: Add support for ERR interrupt on emulated bridge Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 12/19] PCI: aardvark: Optimize writing PCI_EXP_RTCTL_PMEIE and PCI_EXP_RTSTA_PME " Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 13/19] PCI: aardvark: Add support for PME interrupts Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 14/19] PCI: aardvark: Fix support for PME requester on emulated bridge Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 15/19] PCI: aardvark: Use separate INTA interrupt for emulated root bridge Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 16/19] PCI: aardvark: Remove irq_mask_ack() callback for INTx interrupts Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 17/19] PCI: aardvark: Don't mask irq when mapping Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 18/19] PCI: aardvark: Drop __maybe_unused from advk_pcie_disable_phy() Marek Behún
2022-05-04 16:58 ` [PATCH 5.17 19/19] PCI: aardvark: Update comment about link going down after link-up Marek Behún
2022-05-10 11:57 ` [PATCH 5.17 00/19] PCIe Aardvark controller backports for 5.17 Greg Kroah-Hartman

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=20220504165852.30089-8-kabel@kernel.org \
    --to=kabel@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=pali@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.