Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp72176pxb; Thu, 12 Aug 2021 11:02:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZztTJvZa/PqlbibWaEhADDh8QExA9RRZ8qVbGGetQXIAzBFNhrDAW45yyMpXHISdI1Oow X-Received: by 2002:a17:906:f20c:: with SMTP id gt12mr4840521ejb.90.1628791346356; Thu, 12 Aug 2021 11:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628791346; cv=none; d=google.com; s=arc-20160816; b=X7XO/s+R4pAvBogQ4zVm9bT579aZqWIamWdP2UB6G02LG/cBxSibvy9j6LD+0U6Lrt R1uDfBgWUwYe1rhE1KktbROOYhezoZ9XSy9Onf1R46PnNT2hDHEYiP5Kj5pNGHHQ/MfZ St155TXfkPFhwlCfvqlenfgmB9Zj4xBfO5IYNsnKptNxdQd8t65a+ayYCWQd5wtHXoob KsPo6/duAjLxEa86R81zTmXKGlBJA5TV094HeZcGpmKCgOhq7LfKzAVr+ItiKVKxZ/Rv ieT+LSpvEGTehyDaL933hJ1gu+KTxAEfiz6Ie0m5FUxO7i2E+J3P1wSWVeeEB42twyoE uteg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=8pwB2KnSjjWDJmxUmIR83odCw/lepEZ/3G0mZcNtzKY=; b=MXMk83rVnAFTXB+Kmivd30+YrqK+KDrB1eBB9VVaHHIJdXunuHxPshSLVBFmYGCdqA 1oyY+AQktEKaBS5l1t/NhW+3YqLzMt9sXETtoIP6GVFjCDmlLEr7cQIh5ZAauvMkt1iQ 7WSDL2SIn3rPzEvKEECfKfEQoIoaSk5RfHttG2KQ/iQKCo8kWXk0ACvvyVQME8YssRBP rcXg4f0+/0BIIrXFdbDBdcrK+Q3nTr4OcJ0Da7X46n9VFRdVcW0Y+aJJphy3HVmUWfkn NpC5wfEJgAUUPQ+a+pdvPgdg7D3XKLGTqOIEqXxjMbyOoQOnhKdatWhAlIXZyR+Sx/Cu 1EwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=V2gBzp4n; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si1252108edy.119.2021.08.12.11.02.01; Thu, 12 Aug 2021 11:02:26 -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=@linutronix.de header.s=2020 header.b=V2gBzp4n; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238495AbhHLPOE (ORCPT + 99 others); Thu, 12 Aug 2021 11:14:04 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:59138 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237934AbhHLPNa (ORCPT ); Thu, 12 Aug 2021 11:13:30 -0400 Date: Thu, 12 Aug 2021 15:13:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628781184; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8pwB2KnSjjWDJmxUmIR83odCw/lepEZ/3G0mZcNtzKY=; b=V2gBzp4nBplyXGyYFz/9wonmQrV+SipNDLZvLV+Zgp1sU5rqSZM/kkz53Yd8Yi/Li538TD KRFRVJOcl1aWLXiqfFFcCkvu9Nxz7n2q+xPu+OW6C9388aAGWf9A1rWLsTTFgF6XBP8gsH hxaOwESS6LNGlkabBPFNWesJlyUIu+nCdy0Y9zY8ctct97KNNgq2AFmVt/1rT5CmEmBRBb LeGVDjx/A+fC/5+JKH+zuaFLxU/fY4BS8T7JhxHZ+QOGQztPI4sV7OLFQqP0p02E9jC2xq rRtisOmRjbV+QAMOlIdzX9kHUV42IbxFdYppc5Rbqj579jlLl4nbqupLWhGXiA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628781184; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8pwB2KnSjjWDJmxUmIR83odCw/lepEZ/3G0mZcNtzKY=; b=nRplYVjZ/Ccodb0XxbQb8wuceuuPLV76fKdAlFRM/oJgNYazPoiJ1Ow8CjIuvjgEXYTVO/ /gOm8smnazn33VAQ== From: "irqchip-bot for Valentin Schneider" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] genirq: Define ack_irq() and eoi_irq() helpers Cc: Valentin Schneider , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20210629125010.458872-3-valentin.schneider@arm.com> References: <20210629125010.458872-3-valentin.schneider@arm.com> MIME-Version: 1.0 Message-ID: <162878118397.395.14906983715913631744.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 635e4fd40660d189e1a83973ddd663abf7bbc849 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/635e4fd40660d189e1a83973ddd663abf7bbc849 Author: Valentin Schneider AuthorDate: Tue, 29 Jun 2021 13:49:59 +01:00 Committer: Marc Zyngier CommitterDate: Thu, 12 Aug 2021 15:48:19 +01:00 genirq: Define ack_irq() and eoi_irq() helpers The newly-added IRQCHIP_AUTOMASKS_FLOW flag requires some additional bookkeeping around chip->{irq_ack, irq_eoi}() calls. Define wrappers around those chip callbacks to drive the IRQD_IRQ_FLOW_MASKED state of an IRQ when the chip has the IRQCHIP_AUTOMASKS_FLOW flag. Signed-off-by: Valentin Schneider Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210629125010.458872-3-valentin.schneider@arm.com --- kernel/irq/chip.c | 16 ++++++++++++++++ kernel/irq/internals.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 21a21ba..793dbd8 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -408,6 +408,22 @@ void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu) cpumask_clear_cpu(cpu, desc->percpu_enabled); } +void ack_irq(struct irq_desc *desc) +{ + desc->irq_data.chip->irq_ack(&desc->irq_data); + + if (desc->irq_data.chip->flags & IRQCHIP_AUTOMASKS_FLOW) + irq_state_set_flow_masked(desc); +} + +void eoi_irq(struct irq_desc *desc) +{ + desc->irq_data.chip->irq_eoi(&desc->irq_data); + + if (desc->irq_data.chip->flags & IRQCHIP_AUTOMASKS_FLOW) + irq_state_clr_flow_masked(desc); +} + static inline void mask_ack_irq(struct irq_desc *desc) { if (desc->irq_data.chip->irq_mask_ack) { diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index b6c1cce..6d6a621 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h @@ -87,6 +87,8 @@ extern void irq_enable(struct irq_desc *desc); extern void irq_disable(struct irq_desc *desc); extern void irq_percpu_enable(struct irq_desc *desc, unsigned int cpu); extern void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu); +extern void ack_irq(struct irq_desc *desc); +extern void eoi_irq(struct irq_desc *desc); extern void mask_irq(struct irq_desc *desc); extern void unmask_irq(struct irq_desc *desc); extern void unmask_threaded_irq(struct irq_desc *desc);