Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4415329pxv; Tue, 29 Jun 2021 06:35:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmKUry8P+ulXsp5XFEgmhR8js5CZ9GMY19Jx+Up1UomOH/XPIAML7FIhlSSV7szPFtklD5 X-Received: by 2002:a17:906:3402:: with SMTP id c2mr29915896ejb.213.1624973756450; Tue, 29 Jun 2021 06:35:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624973756; cv=none; d=google.com; s=arc-20160816; b=vWz5clNhIHGQ7SACo29ll+DLLgVSAK2MYZLxy7hq+HAFzvkDblRrkqX4qxpA7QsewB wqM2MR5mDywDlJdZ+pUl5eVzIH15O8AaW22dT2Vsm5ZFE7mTEseclP+7vurEwRiP3PFi q0YeSJXMk39j3co08wCzuVsrgKghGsMPyufuwEiOsW884MXU+w03uPteYDxwAW9GZjve sukXuXBlrA4rEfBZlDsyPfqz+N5HKCRyizDC0EFtGFW0bIg03Gyreo3NcpSN6Bch9vMT LigOw+kcl4gpmd8z+HY9ynWXW2BBnwI4beaP6sYZZWawJ5iEWtqxUefphnDJGbpUj7Id v32w== 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; bh=Tc8RMAwgOegy3MbMYti/2eq6mB+oO5kcs0jFheVc2QU=; b=ndid2OpPmLgHE4kTL+1dSTRdOmr884KTPGOQ2Y+yGgQ00F69S2HGIlVR7yc7AUhod+ aX/rg5z9L0W1zmt6YqzFLXmSQDCQUyKoxLiwx1JgLzu4sjLhnDeqeZlcphqJuWcxvrfK pULhI+It0qS9flwupuqw7EJooFR8b/qc6tIrGYLcx4p6SrIZ32fRjnW5X9oRQfL4Hvi6 WqQvqKkAa9hNLzac308BjEkxpd2WSiWCNMcCgKGsEnuSDA26BvyAbPBMAEaW/b6fRRxB ZPh5ziWXv++nJ3MaKY+w6hC178sf6vwr0mtNcQVJKcS3lmus4+Cr1BxUJhnXWiiwrnFx andw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z19si17390413edd.256.2021.06.29.06.35.32; Tue, 29 Jun 2021 06:35:56 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233893AbhF2Mxa (ORCPT + 99 others); Tue, 29 Jun 2021 08:53:30 -0400 Received: from foss.arm.com ([217.140.110.172]:50386 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233079AbhF2MxR (ORCPT ); Tue, 29 Jun 2021 08:53:17 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 28EAD11FB; Tue, 29 Jun 2021 05:50:50 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 288633F718; Tue, 29 Jun 2021 05:50:49 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marc Zyngier , Thomas Gleixner , Lorenzo Pieralisi , Vincenzo Frascino Subject: [PATCH v3 03/13] genirq: Employ ack_irq() and eoi_irq() where relevant Date: Tue, 29 Jun 2021 13:50:00 +0100 Message-Id: <20210629125010.458872-4-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210629125010.458872-1-valentin.schneider@arm.com> References: <20210629125010.458872-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This can easily be coccinelle'd to replace all existing chip->irq_{ack, eoi} callsites, however not all callsites benefit from this replacement: fasteoi flow handlers for instance only deal with an ->irq_eoi() callback. Instead, only patch callsites that can benefit from the added functionality. Signed-off-by: Valentin Schneider --- kernel/irq/chip.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 793dbd8307b9..4d3bde55c5d9 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -429,10 +429,12 @@ static inline void mask_ack_irq(struct irq_desc *desc) if (desc->irq_data.chip->irq_mask_ack) { desc->irq_data.chip->irq_mask_ack(&desc->irq_data); irq_state_set_masked(desc); + if (desc->irq_data.chip->flags & IRQCHIP_AUTOMASKS_FLOW) + irq_state_set_flow_masked(desc); } else { mask_irq(desc); if (desc->irq_data.chip->irq_ack) - desc->irq_data.chip->irq_ack(&desc->irq_data); + ack_irq(desc); } } @@ -463,7 +465,7 @@ void unmask_threaded_irq(struct irq_desc *desc) struct irq_chip *chip = desc->irq_data.chip; if (chip->flags & IRQCHIP_EOI_THREADED) - chip->irq_eoi(&desc->irq_data); + eoi_irq(desc); unmask_irq(desc); } @@ -680,7 +682,7 @@ EXPORT_SYMBOL_GPL(handle_level_irq); static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip) { if (!(desc->istate & IRQS_ONESHOT)) { - chip->irq_eoi(&desc->irq_data); + eoi_irq(desc); return; } /* @@ -691,10 +693,10 @@ static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip) */ if (!irqd_irq_disabled(&desc->irq_data) && irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) { - chip->irq_eoi(&desc->irq_data); + eoi_irq(desc); unmask_irq(desc); } else if (!(chip->flags & IRQCHIP_EOI_THREADED)) { - chip->irq_eoi(&desc->irq_data); + eoi_irq(desc); } } -- 2.25.1