From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5F6EC433E0 for ; Thu, 14 Jan 2021 21:07:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 56A6523A3B for ; Thu, 14 Jan 2021 21:07:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 56A6523A3B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d3PlFBIJzx8/gpRJPB0/Tpf9MX6t7h907vs9K5gnqz4=; b=Gg0e71W1Ryov/ZKx55bAuLlrw AnwNCE11CpMPVTgSk/L+uFAYbQ3wY6QPxkv0dtTemr/ZlxxefABfb3e+Bu3qoD6RXpEpKQndNuEJR IKeDZ5aynbFnIRb+naU8VMeeZs7BC15asUBqOQ4d8eaPJkFSrzoM01X5t/E4o0S6B9y7W+GL1W7LI c25rn/lV2OIV0C5yoepNJ9jTorH+EArM0nU170ZHbenWXUvBGdDOycpXDfFXgNuoD7iFGgGhbk6o7 8fQTYFrcdNh0s0YOBHQU4GqpN+2cDXyxdSwPnGbTw0AQGIgkJzr8DkdUi3wQAviCrAAKpNvsgU+dU WA4h7uvig==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l09ol-0003Di-I0; Thu, 14 Jan 2021 21:06:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l09oj-0003DE-TT for linux-arm-kernel@lists.infradead.org; Thu, 14 Jan 2021 21:06:06 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D99823A01; Thu, 14 Jan 2021 21:06:04 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l09of-007bU8-GL; Thu, 14 Jan 2021 21:06:02 +0000 Date: Thu, 14 Jan 2021 21:06:00 +0000 Message-ID: <87turjjkjr.wl-maz@kernel.org> From: Marc Zyngier To: Samuel Holland Subject: Re: [PATCH v4 03/10] irqchip/sun6i-r: Use a stacked irqchip driver In-Reply-To: <20210112055950.21209-4-samuel@sholland.org> References: <20210112055950.21209-1-samuel@sholland.org> <20210112055950.21209-4-samuel@sholland.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: samuel@sholland.org, tglx@linutronix.de, robh+dt@kernel.org, mripard@kernel.org, wens@csie.org, jernej.skrabec@siol.net, megous@megous.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210114_160606_037713_37F48462 X-CRM114-Status: GOOD ( 16.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , devicetree@vger.kernel.org, Jernej Skrabec , linux-kernel@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , Rob Herring , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Samuel, On 2021-01-12 05:59, Samuel Holland wrote: [...] > +static void sun6i_r_intc_ack_nmi(void) > +{ > + writel(SUN6I_NMI_BIT, base + SUN6I_IRQ_PENDING(0)); writel_relaxed() > +} > + > +static void sun6i_r_intc_nmi_ack(struct irq_data *data) > +{ > + if (irqd_get_trigger_type(data) & IRQ_TYPE_EDGE_BOTH) > + sun6i_r_intc_ack_nmi(); > + else > + data->chip_data = SUN6I_NMI_NEEDS_ACK; > +} > + > +static void sun6i_r_intc_nmi_eoi(struct irq_data *data) > +{ > + /* For oneshot IRQs, delay the ack until the IRQ is unmasked. */ > + if (data->chip_data == SUN6I_NMI_NEEDS_ACK && !irqd_irq_masked(data)) > { > + sun6i_r_intc_ack_nmi(); > + data->chip_data = 0; nit: NULL rather than 0? [...] > +static struct irq_chip sun6i_r_intc_nmi_chip = { > + .name = "sun6i-r-intc", > + .irq_ack = sun6i_r_intc_nmi_ack, > + .irq_mask = irq_chip_mask_parent, > + .irq_unmask = sun6i_r_intc_nmi_unmask, > + .irq_eoi = sun6i_r_intc_nmi_eoi, > + .irq_set_affinity = irq_chip_set_affinity_parent, > + .irq_set_type = sun6i_r_intc_nmi_set_type, > + .irq_set_irqchip_state = sun6i_r_intc_nmi_set_irqchip_state, You probably also want to wire irq_get_irqchip_state(), while you're at it. Otherwise, looks pretty good now. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel