Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1791353pxk; Tue, 1 Sep 2020 07:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPgYimkvvaQJKwdhFQ0vsytgoHHV8XgGW+IMZSwkyrweFXFyS5BvDfOlwut78Oh+VHAmEf X-Received: by 2002:a17:906:95d1:: with SMTP id n17mr1895775ejy.324.1598972166706; Tue, 01 Sep 2020 07:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598972166; cv=none; d=google.com; s=arc-20160816; b=glYh3chIVchWvUC7+FE+U2XMBcucwz9yjUZbPtaNnkw3fqghwuVJfR+0T9urchPshQ dvUCMHjfZw128aoxrOpLGZzeWBJ/bpfjVi9HFs7ezzZsl+jsSWVR4aABxH8SSlSn/9W4 jh4ID48hpEPtBY1FJO2WVYIOMgAtq38rt/RpD/krBcgFFQ/or7gqGcypWXSW5GHno1UF ma9Tx+P74yXHO5Dt/R0iYR2oqaWgKG4P12BvimB9joyeH2/ZvJTep2j4Vbvxn8JmhPax qcg30GuC6H3+B/c9t3oSXiEWsAOyR+CJrd5rNLyXsO5jise4B+ZDVSQm3vG+abTJ++Bv aWqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GCul+i+eIXvPPBw3a+3nR5X0S4gsyT6ViNcNDK+oSdk=; b=M53JdzChGxx5agi9+jv1HsxyH9ukTuFkKwh2gEpU918O80SstBbJvYdDZjefVRf0GA iF8wOMz/840ChpyJ1hCjxFaH1ypYeoebxV4cUv/hHhKyc9kSwJ7BhgwmMPOBZcP0CWFk /ISSCSJR+UVr9DLNdBLCNTiSCj1GFyql6f1kq+tPF0ntN4nq3pboo0+zmO3NI8OsYjDv CSkYcrkpTCXUIqja7hCT957KX6nUp687l+Jkx+rYmR9FMwlwsCDRQslbjQY7DZGjpfsy oYHOLX+2zmRYUDHWt/IMGwxWbu95yZTW+f0TMHxsHHXNy9V1T0zZmubEI1AUWWWgG9CM QxJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rps4GY9g; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e10si790539ejk.32.2020.09.01.07.55.43; Tue, 01 Sep 2020 07:56:06 -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=@kernel.org header.s=default header.b=rps4GY9g; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728299AbgIAOw7 (ORCPT + 99 others); Tue, 1 Sep 2020 10:52:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:36478 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728344AbgIAOux (ORCPT ); Tue, 1 Sep 2020 10:50:53 -0400 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 88456206FA; Tue, 1 Sep 2020 14:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598971852; bh=BPdT+vTAX6b+20pGNGQv/OEbZaMm0piOs8VCTI0srpA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rps4GY9gN8fybFalh9c5lnWMZwkkH1zuRtJ60pzcQjJkkonglUCe1QwZdD9BUYRm6 4fZWMCDJErlewG6JspDzoutVDNeyYxnmYlnPn7YxEcAg2Q8iQWu6V0aKCJnLXnZttU 2cJESJLIJcPE+LXy1UQQ8uLCI4MBKli5pMCBUIvc= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kD7Vf-008IQP-5D; Tue, 01 Sep 2020 15:43:43 +0100 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Will Deacon , Catalin Marinas , Russell King , Thomas Gleixner , Jason Cooper , Sumit Garg , Valentin Schneider , Florian Fainelli , Gregory Clement , Andrew Lunn , Saravana Kannan , kernel-team@android.com, Valentin Schneider Subject: [PATCH v3 16/16] ARM: Remove custom IRQ stat accounting Date: Tue, 1 Sep 2020 15:43:24 +0100 Message-Id: <20200901144324.1071694-17-maz@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200901144324.1071694-1-maz@kernel.org> References: <20200901144324.1071694-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will@kernel.org, catalin.marinas@arm.com, linux@arm.linux.org.uk, tglx@linutronix.de, jason@lakedaemon.net, sumit.garg@linaro.org, Valentin.Schneider@arm.com, f.fainelli@gmail.com, gregory.clement@bootlin.com, andrew@lunn.ch, saravanak@google.com, kernel-team@android.com, valentin.schneider@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's switch the arm code to the core accounting, which already does everything we need. Reviewed-by: Valentin Schneider Signed-off-by: Marc Zyngier --- arch/arm/include/asm/hardirq.h | 17 ----------------- arch/arm/kernel/smp.c | 20 ++++---------------- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 7a88f160b1fb..b95848ed2bc7 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h @@ -6,29 +6,12 @@ #include #include -/* number of IPIS _not_ including IPI_CPU_BACKTRACE */ -#define NR_IPI 7 - typedef struct { unsigned int __softirq_pending; -#ifdef CONFIG_SMP - unsigned int ipi_irqs[NR_IPI]; -#endif } ____cacheline_aligned irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ -#define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++ -#define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member) - -#ifdef CONFIG_SMP -u64 smp_irq_stat_cpu(unsigned int cpu); -#else -#define smp_irq_stat_cpu(cpu) 0 -#endif - -#define arch_irq_stat_cpu smp_irq_stat_cpu - #define __ARCH_IRQ_EXIT_IRQS_DISABLED 1 #endif /* __ASM_HARDIRQ_H */ diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index d51e64955a26..aead847ac8b9 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -65,6 +65,7 @@ enum ipi_msg_type { IPI_CPU_STOP, IPI_IRQ_WORK, IPI_COMPLETION, + NR_IPI, /* * CPU_BACKTRACE is special and not included in NR_IPI * or tracable with trace_ipi_* @@ -529,27 +530,16 @@ void show_ipi_list(struct seq_file *p, int prec) unsigned int cpu, i; for (i = 0; i < NR_IPI; i++) { + unsigned int irq = irq_desc_get_irq(ipi_desc[i]); seq_printf(p, "%*s%u: ", prec - 1, "IPI", i); for_each_online_cpu(cpu) - seq_printf(p, "%10u ", - __get_irq_stat(cpu, ipi_irqs[i])); + seq_printf(p, "%10u ", kstat_irqs_cpu(irq, cpu)); seq_printf(p, " %s\n", ipi_types[i]); } } -u64 smp_irq_stat_cpu(unsigned int cpu) -{ - u64 sum = 0; - int i; - - for (i = 0; i < NR_IPI; i++) - sum += __get_irq_stat(cpu, ipi_irqs[i]); - - return sum; -} - void arch_send_call_function_ipi_mask(const struct cpumask *mask) { smp_cross_call(mask, IPI_CALL_FUNC); @@ -630,10 +620,8 @@ static void do_handle_IPI(int ipinr) { unsigned int cpu = smp_processor_id(); - if ((unsigned)ipinr < NR_IPI) { + if ((unsigned)ipinr < NR_IPI) trace_ipi_entry_rcuidle(ipi_types[ipinr]); - __inc_irq_stat(cpu, ipi_irqs[ipinr]); - } switch (ipinr) { case IPI_WAKEUP: -- 2.27.0