From patchwork Mon Jan 10 01:50:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12708111 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B96D0C433EF for ; Mon, 10 Jan 2022 01:54:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FGVB6OIRh+Mvp+fZ4JTZzk6fGn+WhbjIZUtyKF3syZo=; b=40h0Y0KCXF5qoL H2kU7rFRQPnpgSuYH248XcAuaJJQNRroRZPlgXewDc6VeRDAH4BkPJ3JZ0kxdsuz8faPlz6osJ/S5 nwPIN4GkaD3fOWYZSYZ2hyQKMbGzSurl/65S5M1GxtpDXQ3AV4d41REvqaz2TGoIXPL+bXJ8FnLwx uEFn0MmAISHaSUTOuen6olr3olbZ8K8S08sbtM/i4E1mlTS9nxeUz4F4tNMKMXOSK/uVIVUeoHIhT MMZPWFTp/uqibMnhlMgRRrM7rDQOjvPzwz5W9dSWXyW+Wqs9upPeWcX8ah2fR/mcFz92ZKOjq0ERz S6jI9RzG2lzmqOILoYcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6jrp-008n7v-QM; Mon, 10 Jan 2022 01:53:02 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n6jpb-008lgE-4A for linux-arm-kernel@lists.infradead.org; Mon, 10 Jan 2022 01:50:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91FF660F65; Mon, 10 Jan 2022 01:50:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C837CC36AF3; Mon, 10 Jan 2022 01:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641779442; bh=1DzngoVZSCcB/mtRN5uh88VwrGSyUDw/nE5Vqb3y1pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IjKLSoXxb1cBde3xaTFIEoLrpW5ptA/oC9dMhixrOcO6hK7dAlIxzN2yRReKUqySn MDT1u4FBbvMA3CBdwhTkmduwf9OytYf645+HKLLbNe9iQoKIzr33xdNDD/Ax9bGncL vzMGUhNuE1Unct4q+NiJhzVUxj1LWPi0EZ95VXkOjxxajJF0MrRvIvLgCu3Tz8unaD bVl6NlroUBKDGdHFbn5k7YaJw65mmQRXXjNwUJ4DO4EuShIBpBVJyJq/q32LW95aSd AwVWU6ho/ibMECyMVf+Zc15r4k6ExlWf5MZwyhw1IPkaRIio0R4+wjgwJGq9NEY5Bg NLG6bacPqSl4g== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Marc Zyngier , Lorenzo Pieralisi , Bjorn Helgaas Cc: pali@kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v2 09/23] PCI: aardvark: Refactor unmasking summary MSI interrupt Date: Mon, 10 Jan 2022 02:50:04 +0100 Message-Id: <20220110015018.26359-10-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220110015018.26359-1-kabel@kernel.org> References: <20220110015018.26359-1-kabel@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220109_175043_243452_FE61D019 X-CRM114-Status: GOOD ( 12.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Pali Rohár 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 Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- 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 3f7515814167..9d2462f076c1 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -572,15 +572,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);