Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp428118iog; Thu, 30 Jun 2022 03:37:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tEatvV33XkZMJTHkuCLI2sXmyLKhVOfrEfyUu3IkamYX2GnMWp1oIIWTY4k9mU0J1/Ve4l X-Received: by 2002:a63:4081:0:b0:405:4f9:e802 with SMTP id n123-20020a634081000000b0040504f9e802mr7137197pga.211.1656585431968; Thu, 30 Jun 2022 03:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656585431; cv=none; d=google.com; s=arc-20160816; b=ZkIZQ18O5fcBvd0vGPjHu63//MzNKuPC4e3nt6GdwR4K6Li3ewVkpEbfr4dzTGT9Qe MU+mqQan77IzqQRz35fa/FvpsEfImt/TKjVfciyCaukLeFk/cT2ePq9nSSrxu/MLMe+u iI8Yds7syWWs+qFOXLdhwarjkCpZjsoyUeEFku7hD4Na1sIYl94CiupH1fRnu2c2lEsO WNZYoAVniTd+QgMTxQTKPNelO5MJZRbSPLuE51keMKUnvK9hpbwkzLJuiiCXECSJ3dQ9 At5OIlx1I5YA4CGu/hOPeZ+2TxtFCgdtEEgHim1MOgiTAyyK5RtkNATjjOTA0hDx5hfr 8Icg== 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 :feedback-id:dkim-signature:dkim-signature; bh=RRJIdrAZofAfNPH9Ms80aUvsjV2YDmaSvFUGEVQFoI0=; b=S4jYTccUJjf4bDlXKJ+D33I9hxqm/s55tgQEWG0No0J9ZRaVdetrk6NR5VGkFhZpJm vFX0zbSTqIXXi1UKGjC7rBmUE/QdgSPsumUNMQwrXLliDtcKKqayAIZ+zGDxVtX2piSY EG0gjSRsfPkfgktTDJYXV85r15o3Oo1lo+467xpmw8IC9k+Rj1f7H2qn4l7sJ6M/AwPE 1E0WE2XfM+TZQQntDCXE66LOq9uoHxY6rg8p+Jwqti27p5kBjGiaokbzPBc+SD7lMBo3 ASeuadMFfTCQ0meMVnyCTV1/g4UhjlKMFo6YU7Kzydrrw0uJZ1YnrO6rTMGQ4Si4+s92 pueg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=MhFhECyT; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=FwLCNgj8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a67-20020a636646000000b00408ab3d13a5si22568969pgc.788.2022.06.30.03.37.00; Thu, 30 Jun 2022 03:37:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=MhFhECyT; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=FwLCNgj8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234696AbiF3KDI (ORCPT + 99 others); Thu, 30 Jun 2022 06:03:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234246AbiF3KCu (ORCPT ); Thu, 30 Jun 2022 06:02:50 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A51743EE1; Thu, 30 Jun 2022 03:02:50 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6C45A5C0249; Thu, 30 Jun 2022 06:02:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 30 Jun 2022 06:02:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1656583369; x=1656669769; bh=RR JIdrAZofAfNPH9Ms80aUvsjV2YDmaSvFUGEVQFoI0=; b=MhFhECyTKDc6fKbJX8 v6K6uLvYAy+WPV7z5+cM+mF8ZKDQM3KM2+HUCpdUHt+HclhTQ5oKXsZsOZXNuZhi 3kJwOy+02A2YkQ22uf9Z6GhhAZF704H1vVjBCtQRB6jKatfiRJzLwMvaklox6UXp HukRMi4OSb3uWFxcR4nDRVEOuQLr4/azJ97y01o6ygZySkylznH9xqpYByUqQFVB Vb0zdLjOHygWjXBqT/x8zwtddAFUOB/oa7xVpvteBiXZLJRHbLqMlhdZZXJKJZtO OylRD++UrLbbXL5DOgct6zw4XliK9Un604lX9f7dVSJxfd/0nVGjFF9bt+MXPTrO 0HoQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1656583369; x=1656669769; bh=RRJIdrAZofAfN PH9Ms80aUvsjV2YDmaSvFUGEVQFoI0=; b=FwLCNgj8ef0QZbrz4RcGVYTl5wm2i FAT+kHCegEvqrgMI3bDELH/vSfe1yP/e+pNcWku4RrDk3/aVBDALQm9q0bY6hMty 5xH2PxDGuhX1M6PIs+J1ueBBf6reRnVImHwotMYTIrajVzlFwbL4rNJYxGoXLUp4 mC2bB7Og/GZX2hTMIK0yeEkGY5ZdZKheSYa30uS1z6NR4AFB5KA0hQ51sy7gqm/N C51+r48vP6nb7Qwsz2Rneft9HVyyPlAQiisvfs6SOSMmWq6o6/FyTm5odu1TwU8T o9TC8xmN2NSsOAUKizn+CM3yLOI1wxbcXjzXVm30A4uHbNSU4REDkxlmQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehuddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Jun 2022 06:02:48 -0400 (EDT) From: Samuel Holland To: Lad Prabhakar , Prabhakar , Marc Zyngier , Sagar Kadam , Paul Walmsley , Palmer Dabbelt Cc: Guo Ren , Thomas Gleixner , Geert Uytterhoeven , linux-renesas-soc@vger.kernel.org, Biju Das , Samuel Holland , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v3 4/4] irqchip/sifive-plic: Fix T-HEAD PLIC edge trigger handling Date: Thu, 30 Jun 2022 05:02:41 -0500 Message-Id: <20220630100241.35233-5-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220630100241.35233-1-samuel@sholland.org> References: <20220630100241.35233-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The T-HEAD PLIC ignores additional edges seen while an edge-triggered interrupt is being handled. Because of this behavior, the driver needs to complete edge-triggered interrupts in the .irq_ack callback before handling them, instead of in the .irq_eoi callback afterward. Otherwise, it could miss some interrupts. Reviewed-by: Lad Prabhakar Signed-off-by: Samuel Holland --- Changes in v3: - Rebased on top of the RZ/Five patches drivers/irqchip/irq-sifive-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index 90e44367bee9..b3a36dca7f1b 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -474,7 +474,6 @@ static int __init plic_init(struct device_node *node, IRQCHIP_DECLARE(sifive_plic, "sifive,plic-1.0.0", plic_init); IRQCHIP_DECLARE(riscv_plic0, "riscv,plic0", plic_init); /* for legacy systems */ -IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_init); /* for firmware driver */ static int __init plic_edge_init(struct device_node *node, struct device_node *parent) @@ -483,3 +482,4 @@ static int __init plic_edge_init(struct device_node *node, } IRQCHIP_DECLARE(andestech_nceplic100, "andestech,nceplic100", plic_edge_init); +IRQCHIP_DECLARE(thead_c900_plic, "thead,c900-plic", plic_edge_init); -- 2.35.1