Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp12023155pxu; Fri, 1 Jan 2021 06:29:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrZWh97/QwfZLEYjJYbobqcjRByKBK9pPaXgE4v/BELKfQQ86esUIvXBYv37tkmxZ49xGh X-Received: by 2002:a17:906:7a46:: with SMTP id i6mr55414259ejo.257.1609511376744; Fri, 01 Jan 2021 06:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609511376; cv=none; d=google.com; s=arc-20160816; b=0tr2YCdvbQuB0Vd3HRPoHHj8C+6vpQazlLvm1wSjxaBHoPKEgy39YxxzFnGixG10wz h3Kh1V2BlVqba+vtnpdhEHYTabFolMsjkxPJaZJgnPnmr5/YZdXnr3MTB27tLUFa6uYN m1FmSki2Vj8YURyowx7qvdhN0k/X9mYTdqRdUY+t2hBH5RsOEcgXQTGGNVEmrkHfGDI0 76gcx1yKqC6tMTVtXL+rzJKDGrh3QcsubcgseEzSBn0oFIzBOL/moVkamvOY0JGlQMvI iN5yKgZDyHGEVu+LhHMCduFOVJqS6WLdz7jW1X9850H0IYh97NhaDYAv65ABTMQsIVR7 8C8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=HyHivnsBbkfRvParCxl0oj59VPPCGT+qinyAE+MHX4c=; b=H/dkZ9hFbGPnNf4rhZWY9k31nIApfe/LeB+0PGWqMzQkg4YLGSCMEUe2aUWDue7f4i wrnPiGeUfA23PykV+Xg3QM8SoxETBMf/ZP6UqCDymnIvFN3Z2F1a0657G2JcAAncdJLp APRdJYM8BIQoB87nLd+0F6HIFOSey1r0x3EhHMgONMnlPlDFy7UgqoJLCLzEJZ187Wz+ shi0617AlhkKuL7T+1YKfFmw0VU+rwKcTWpDj4ovmaeD1EqtmqW0s1LsYPXc7dujJgwM B6j5piqnEV3ox0wqRUZeLyd7b0qDm+Tnl+s2FTZf24nswrGutlp8lRr0zFhmKkt7U5/G 9KgA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du16si21807063ejc.287.2021.01.01.06.29.12; Fri, 01 Jan 2021 06:29:36 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbhAAO2z (ORCPT + 99 others); Fri, 1 Jan 2021 09:28:55 -0500 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:34285 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726747AbhAAO2z (ORCPT ); Fri, 1 Jan 2021 09:28:55 -0500 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1kvLPL-001lj7-Nx; Fri, 01 Jan 2021 15:27:59 +0100 Received: from p5b13a2ad.dip0.t-ipconnect.de ([91.19.162.173] helo=[192.168.178.139]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1kvLPK-003G3u-Un; Fri, 01 Jan 2021 15:27:59 +0100 Subject: Re: [patch 02/19] sh: Get rid of nmi_count() To: Thomas Gleixner , LKML Cc: Peter Zijlstra , Frederic Weisbecker , Paul McKenney , Sebastian Andrzej Siewior , Arnd Bergmann , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Jeff Dike , Richard Weinberger , Anton Ivanov , linux-um@lists.infradead.org, Russell King , Marc Zyngier , Valentin Schneider , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon References: <20201113140207.499353218@linutronix.de> <20201113141732.844232404@linutronix.de> From: John Paul Adrian Glaubitz Message-ID: Date: Fri, 1 Jan 2021 15:27:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20201113141732.844232404@linutronix.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 91.19.162.173 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Thomas! On 11/13/20 3:02 PM, Thomas Gleixner wrote: > nmi_count() is a historical leftover and SH is the only user. Replace it > with regular per cpu accessors. > > Signed-off-by: Thomas Gleixner > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: linux-sh@vger.kernel.org > --- > arch/sh/kernel/irq.c | 2 +- > arch/sh/kernel/traps.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > --- a/arch/sh/kernel/irq.c > +++ b/arch/sh/kernel/irq.c > @@ -44,7 +44,7 @@ int arch_show_interrupts(struct seq_file > > seq_printf(p, "%*s: ", prec, "NMI"); > for_each_online_cpu(j) > - seq_printf(p, "%10u ", nmi_count(j)); > + seq_printf(p, "%10u ", per_cpu(irq_stat.__nmi_count, j); > seq_printf(p, " Non-maskable interrupts\n"); > > seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count)); > --- a/arch/sh/kernel/traps.c > +++ b/arch/sh/kernel/traps.c > @@ -186,7 +186,7 @@ BUILD_TRAP_HANDLER(nmi) > arch_ftrace_nmi_enter(); > > nmi_enter(); > - nmi_count(cpu)++; > + this_cpu_inc(irq_stat.__nmi_count); > > switch (notify_die(DIE_NMI, "NMI", regs, 0, vec & 0xff, SIGINT)) { > case NOTIFY_OK: > Just booted my SH7785LCR board with a kernel based on Linus' latest tree and can confirm that this change does not cause any regressions. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913