From patchwork Sat Mar 11 01:24:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanmay Shah X-Patchwork-Id: 13170597 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 5A597C6FD1F for ; Sat, 11 Mar 2023 01:25:54 +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=k1V4CJoXL4cNNDZVifMheA2KxD+lYde0raM7p02kCuQ=; b=bO3fc4K0exk9Tg 2B+dmxAxk5IhIPyY4rnNZCWdMftORbUeaVkR+8r6LGOpSDloaatiLyZWrJFUuohbl74aW8d5jYlDB k+PXoqfPWqZNFbKOm602+xPU+0yRLWnA+UNLOQ/MFVDvQUZ9GrKsYLoTXxeBxMC1Wme2yhXjh8Igo Fx9cQG1mI/7hVBB2QRI9ZGw8kNxM13VmySPbo8Q1gUvK8rMuJcqShOwlIaXv15/WeDCj6JTuFp8fe yFFI9chA9cshsruRVvaxfaMMOEs9yK2hOJZdkZTGLExuNvb0upMHjRALfrbAdaBCJ+fDGrAWGSaco TThSt8KBWONr9FzWSTzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1panyf-00Gslb-Rc; Sat, 11 Mar 2023 01:24:54 +0000 Received: from mail-mw2nam12on20619.outbound.protection.outlook.com ([2a01:111:f400:fe5a::619] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1panyM-00GsiD-7G for linux-arm-kernel@lists.infradead.org; Sat, 11 Mar 2023 01:24:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jUUYSd2YOEPS1kDy1ELlJHPcgndjQLwteJ39snU8311i39VNp87WxdX9f0W8BirL19sP5SYujNHki+DNqrMiM8mxveYhw/HM6J7fgzBrHnMXLUisFb21/ymwn8ubN1Oms2EVT+lq5L9VFhbXmswzEhiQyQpfVmyudigeeNK2XV0Qf/aq1HH02n/GoH6P/RMjFShDtryBHc21GdMJRUAIvDaLL3Dg5KZ/iI4wRCffSvBZnUw2e0Wgwiv3WyB3wfEIyPw5318PZCY2vrdJVFto/FU0RKy5b1WeoRTing0SOTvUnipjuM8qA4fNFVE+n5M6CHYZnvBZOTPK8cddYstyDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V6jNyKKEMKq2JsmiF1UbknBMFik55x77fbABVtgVr8A=; b=WC6dneXsc4eYpdQDqns0xlcoQEA86Z1AuvWfJk9g2xfZAq1MdhQXXIdecSEXMvZz20cWVdVGb1bMhcqoAeKI2YDRM9+/Dn1a74/wE42z2gCXWBvWrkEdgaPBtvddg1lDwBLeXHWgibESwQoiiQJS1yUul2DQbMPgiMUHIQX/T9ZXAXKAP93JfrLje+oFBW+hfONb82isuRJO6Xd8aqyFLaAC7lxu1oR8kbD+aZP5xaLWrgebNhdEu6RKp+m4Dc30CjVrAycvw0knVkZ2DSbF184acTjVpzbKJrm+bdrZGuXXoScjY+LZzGQTQmCuBOPC/ErHEgKbNiQX0qU8xPat8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=V6jNyKKEMKq2JsmiF1UbknBMFik55x77fbABVtgVr8A=; b=427pFTT+7LCOTizruVv0lvwqXGQGTTCa26l92LzP072gLgkeo0xhj0fyRNolPbrAmupA4d1GseQoYn1tcvwbIfTSax2ZNCAKu19hhLnGVvnDFaCkzpGHe4Gs0xfhYOed0G5WvyNpGcBJN8PHas7UWSHcj0qbQoOJMyqyxwFxsC4= Received: from DM6PR07CA0131.namprd07.prod.outlook.com (2603:10b6:5:330::19) by CY8PR12MB8194.namprd12.prod.outlook.com (2603:10b6:930:76::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.20; Sat, 11 Mar 2023 01:24:29 +0000 Received: from DM6NAM11FT031.eop-nam11.prod.protection.outlook.com (2603:10b6:5:330:cafe::47) by DM6PR07CA0131.outlook.office365.com (2603:10b6:5:330::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.20 via Frontend Transport; Sat, 11 Mar 2023 01:24:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DM6NAM11FT031.mail.protection.outlook.com (10.13.172.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.20 via Frontend Transport; Sat, 11 Mar 2023 01:24:29 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 10 Mar 2023 19:24:28 -0600 Received: from xsjtanmays50.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 10 Mar 2023 19:24:27 -0600 From: Tanmay Shah To: , , , , , CC: , , , Tanmay Shah Subject: [PATCH v5 2/5] mailbox: zynqmp: fix IPI isr handling Date: Fri, 10 Mar 2023 17:24:05 -0800 Message-ID: <20230311012407.1292118-3-tanmay.shah@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230311012407.1292118-1-tanmay.shah@amd.com> References: <20230311012407.1292118-1-tanmay.shah@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT031:EE_|CY8PR12MB8194:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e6fb445-9e98-46d8-0dd2-08db21cf5c2d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mHzJwgLGY766Lp56Y5rNKSTgbuQ+KI0FZcbX/P+zL5cvpMuA0qa3dzBBo0vHTwiRu5yGbBaY4RSkT5nZFXSW//TU/M5z6R1nwDEIxeGR/i17ISYSiHwAkC0co2br7pETOZe9LhK6d9iDf/XrMnnpfnq2AnnTXIcop1nARzki914/kthIsZ5ZtnAGuV6AsxV/4uXogHNa3usy0NxbVZzsxccTwfNS57B1i5lasz1Ow/zGsS/earQqDq4N8SyFekmdX99WGqz8ulmgsomGmYGWN+TK9YxZk43gBAs0YZmncCBDOYaz5n3g5E3zHIm9qTyJUqaOxKD/uvqlZ+Yw4nW129Kt4uXPFrDidfbdHspYF1NVwHekKTOk8UAP3LUFtvLh2PmzonXuYyBK+hvTcjKCLUEFTm91I623h9kef1uzhvMM2l71C9lOZlXMsSOLL8N2Muro+8zkt+hdYL7SVxFmSEgaXy3gG4I9ipUZOkjTiZ0dfaMVbzFbHK8PwXYpu/73Z2zCKG18ONZlX5HezLL+GaZHlBx394+Y0iI02HAj4qTlp6FY3pRiBeQQMiQAgX245CmJ8qD39Fuc6ENAll/xcY1tuvlvVSCUVlStCXpidc0Ge43PuK4utGNJBF9Ru9nTohaGppyyUuonNXeUS45RwVR4jJ1Q4Kaw80GOhVAb5w4K1kT3BoJYbVHMF9S6sG27q9fdxBrpITgEI9mjMlKJ/l+2Q0qRJ5zGMWG2kpm5TQg= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(136003)(346002)(376002)(396003)(39860400002)(451199018)(46966006)(36840700001)(40470700004)(36756003)(83380400001)(426003)(47076005)(82740400003)(6666004)(36860700001)(26005)(1076003)(186003)(2616005)(336012)(40460700003)(8936002)(41300700001)(86362001)(70586007)(8676002)(70206006)(4326008)(2906002)(44832011)(5660300002)(15650500001)(356005)(81166007)(316002)(110136005)(40480700001)(478600001)(6636002)(54906003)(82310400005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2023 01:24:29.0679 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e6fb445-9e98-46d8-0dd2-08db21cf5c2d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT031.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8194 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_172434_362179_FC69AFF8 X-CRM114-Status: GOOD ( 11.67 ) 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 Multiple IPI channels are mapped to same interrupt handler. Current isr implementation handles only one channel per isr. Fix this behavior by checking isr status bit of all child mailbox nodes. Fixes: 4981b82ba2ff ("mailbox: ZynqMP IPI mailbox controller") Signed-off-by: Tanmay Shah Acked-by: Michal Simek --- drivers/mailbox/zynqmp-ipi-mailbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c index ae47fbac38d2..d097f45b0e5f 100644 --- a/drivers/mailbox/zynqmp-ipi-mailbox.c +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c @@ -152,7 +152,7 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data) struct zynqmp_ipi_message *msg; u64 arg0, arg3; struct arm_smccc_res res; - int ret, i; + int ret, i, status = IRQ_NONE; (void)irq; arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY; @@ -170,11 +170,11 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data) memcpy_fromio(msg->data, mchan->req_buf, msg->len); mbox_chan_received_data(chan, (void *)msg); - return IRQ_HANDLED; + status = IRQ_HANDLED; } } } - return IRQ_NONE; + return status; } /**