Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1472168pxy; Thu, 6 May 2021 08:38:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwD4wyo6pLuBwW9pTg4PuMAMIsDX1oIQOuIG9xal6gKX0UFe1wOGWBSdbe5KT5M38/vGoqk X-Received: by 2002:a63:ed17:: with SMTP id d23mr4929567pgi.107.1620315491558; Thu, 06 May 2021 08:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620315491; cv=none; d=google.com; s=arc-20160816; b=kVSZr2A6CDDl0pyeCd1Mqm0ZhjkvvbJIMTScCBdcXSIuHHTAqU/RJ7wcFUQoA2O99f 7pEyeG4vsw4Zgz+LzUi5yx1cXPaiFoxW46RQzo06bI1zWBvxjnDzlxezInkij/fY62OI 7WywkXKjtMGJdldORgTgXj946eNOkguJdQKAbrSvlWdPCFqYKhSH0kCrhFs1zrg0/03J Je3PRJnIyyxfxRidPyL86JzMPamaVuiMdinaZdpSdpQZNtvf3HEC9NaU1BMBp0MWD5ti wnlNfspugSz4Fvx7RS095ac2q9/ZJ5Tep12JnEwebWtK/AtizvzMXbHIZBcxIILNHTSN y0JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RGBE12MjbTz6qgUS0Xh2ISOBDy/eUXLR/yLc38jRxNk=; b=l07C6PgkDR1y9nZ1X2sv7912iEUQBQI5fnmbdO7Oi/BXv3QZpYbHaSuFiuJLEth4tj XA1EOIhHWonMCpZNq7MsNTrtqseLdkNIX0ESpyVHNXi12qkepPTb23dzLGcuVpWr/lA/ JnCkDzB+BZRy9eK6OXUIZ737OpOCXQGcrhTpV1h6d/nfN9TGiKeJngdQiX32JyutcHKy He2QqIBshl1M2uexOeCq/0Iw/Q/iOYoaHTg0sQE0TRjmK2h+FDmVxfIWbmI3CdB7a9s9 9zPmPVEIezek998lfMkaKD0nJIIvr4IWqG26NyoMUZj42uNWWLccyI4zrGWfxzNUgcx4 OGAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WU2IKx3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si3249170plt.179.2021.05.06.08.37.58; Thu, 06 May 2021 08:38:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WU2IKx3l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235461AbhEFPgt (ORCPT + 99 others); Thu, 6 May 2021 11:36:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:45970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235506AbhEFPds (ORCPT ); Thu, 6 May 2021 11:33:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD95361432; Thu, 6 May 2021 15:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620315169; bh=KvLt43DnzadPpOqnRUdrwzI2CtNEyAwAsOi6GeKBWRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WU2IKx3lHHR8r6UTGjfQHnZIfj7luYJDfEbfeuvSbQdMku7iYZMM/+feR26Wp2Nox W8Q0rAK3DLiHWr6Kf17dKe10z4NuezdTK16Cz4d2ij3I8M+B/VsL+UE31ZJ+UyyJax AQxL5VjaYeB9TYdmSWvSHxa6UpyBjZxSYv8HiW465hYI8dltXgWQGE2fLViAJtVC+N Fym7Uq+SYDhtbzhL7MGy+PUXdNoLOOZBn/4asHNb4YG3o+H/Wr8+lA3pK4Eh07ejz4 IU5EcWTCI4XKJvwbdOZTVEEPka3J0AesHrqv9agNAG3yfdla8W0R+kr+2l/KlLd3Bb qGTCqi1NeK8BQ== Received: by pali.im (Postfix) id 1D0971250; Thu, 6 May 2021 17:32:47 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Lorenzo Pieralisi , Thomas Petazzoni , Rob Herring , Bjorn Helgaas Cc: Russell King , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Remi Pommarel , Xogium , Tomasz Maciej Nowak , Marc Zyngier , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/42] PCI: aardvark: Do not touch status bits of masked interrupts in interrupt handler Date: Thu, 6 May 2021 17:31:22 +0200 Message-Id: <20210506153153.30454-12-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210506153153.30454-1-pali@kernel.org> References: <20210506153153.30454-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is incorrect to clear status bits of masked interrupts. The aardvark driver clears all status interrupt bits when no unmasked status bit was set. When some unmasked bit was set then masked bits were not cleared. Fix this so that masked bits are never cleared. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Cc: stable@vger.kernel.org --- drivers/pci/controller/pci-aardvark.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index cd4b427d7692..362faddae935 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -1090,11 +1090,8 @@ static void advk_pcie_handle_int(struct advk_pcie *pcie) isr1_mask = advk_readl(pcie, PCIE_ISR1_MASK_REG); isr1_status = isr1_val & ((~isr1_mask) & PCIE_ISR1_ALL_MASK); - if (!isr0_status && !isr1_status) { - advk_writel(pcie, isr0_val, PCIE_ISR0_REG); - advk_writel(pcie, isr1_val, PCIE_ISR1_REG); + if (!isr0_status && !isr1_status) return; - } /* Process MSI interrupts */ if (isr0_status & PCIE_ISR0_MSI_INT_PENDING) -- 2.20.1