From patchwork Wed Sep 15 17:58:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexei Lozovsky X-Patchwork-Id: 12497071 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=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 70313C433F5 for ; Wed, 15 Sep 2021 17:59:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E9C2610E9 for ; Wed, 15 Sep 2021 17:59:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231603AbhIOSAk (ORCPT ); Wed, 15 Sep 2021 14:00:40 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35609 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbhIOSAX (ORCPT ); Wed, 15 Sep 2021 14:00:23 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DAD975C019A; Wed, 15 Sep 2021 13:59:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 15 Sep 2021 13:59:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ilammy.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=YQEHYcfXa0InC iKZOyZgJDVQhRISp2oHQfGAKjcBvrA=; b=LPcEHsYlAu4TQyIlgUy2g/SJsVdOA q4ew38Zc0znF7UeZ8lbtUnPxRXyA1txj3HLYW24N4Da8WwRSKfeCkB6hNOf3gluN HP3KC1LMjyAVksiMB4RwJ+TNzsxPHCHI8W5HRbJXb+2X30HH3gn2+SLATcYzj/92 eKMpbfFk3au+XEtZNSsONbWIjG7LlV8CeWtVIaz6GhG251BZhXNAeVDI0ifzQEDk +gtDXgydnE1xum8qfTpsl+10Jdp3JmHcorMjKlp+GSBkQJHW7VPWlAYVBKtAJawm A7IHzOhCKIVG0URDsip+hzg9Um/m/BZ1Ca2/xDZh1Ahi2361Q6SOr/V/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=YQEHYcfXa0InCiKZOyZgJDVQhRISp2oHQfGAKjcBvrA=; b=uljrsX+D 2L+fjXtFOxxq/NXGfTZCIodMbNw0ZecLfKEiAJg9NUeeLp7KcX0/gOKQ1YUL++j/ V0AnOQUnfy6aDEDBno3JJ6ueg4le0g/EkqT6YiyvJ0DuYvgX8xfSPrq3UIrd5NeD Cpu0nB2e4AGzStCISDfIrCuQVkn65P8qTd9sWRyov1OYGnu6IgmXCymqxy80AOmG rfLReZR6/vs7Iqs5+HrwFjeDoVta+1xaWBpJW/vDFmYO/FnjHYZw6GbzA49Q4A6f /vAV25hQZOCYZStyDRZVMQO3qC5bxn0Y4Zb9kudR/VTUy0PpXxnaechyLtqmu/cM fe+7tBnLEKTk0w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehuddgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomheptehlvgig vghiucfnohiiohhvshhkhicuoehmvgesihhlrghmmhihrdhnvghtqeenucggtffrrghtth gvrhhnpeetueejheekjeeuveeihefgueehleelgefgheefffefkeejudeujeejuefgteeu keenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehmvg esihhlrghmmhihrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Sep 2021 13:59:02 -0400 (EDT) From: Alexei Lozovsky To: Thomas Gleixner Cc: Alexey Dobriyan , Christoph Lameter , LKML , linux-fsdevel@vger.kernel.org Subject: [PATCH v2 05/12] powerpc/irq: Use unsigned long for IRQ counter sum Date: Thu, 16 Sep 2021 02:58:41 +0900 Message-Id: <20210915175848.162260-6-me@ilammy.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210915175848.162260-1-me@ilammy.net> References: <20210911034808.24252-1-me@ilammy.net> <20210915175848.162260-1-me@ilammy.net> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Now that all individual counters consistently use unsigned long, use the same type for their sum. This ensures correct handling of wrap-around (which is more important for 32-bit PowerPC at this point). Signed-off-by: Alexei Lozovsky --- arch/powerpc/include/asm/hardirq.h | 2 +- arch/powerpc/kernel/irq.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h index efc5391f84fb..4d3a7d66c299 100644 --- a/arch/powerpc/include/asm/hardirq.h +++ b/arch/powerpc/include/asm/hardirq.h @@ -32,7 +32,7 @@ static inline void ack_bad_irq(unsigned int irq) printk(KERN_CRIT "unexpected IRQ trap at vector %02x\n", irq); } -extern u64 arch_irq_stat_cpu(unsigned int cpu); +extern unsigned long arch_irq_stat_cpu(unsigned int cpu); #define arch_irq_stat_cpu arch_irq_stat_cpu #endif /* _ASM_POWERPC_HARDIRQ_H */ diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 9f39de114a0e..1a0a161ee38b 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -645,9 +645,9 @@ int arch_show_interrupts(struct seq_file *p, int prec) /* * /proc/stat helpers */ -u64 arch_irq_stat_cpu(unsigned int cpu) +unsigned long arch_irq_stat_cpu(unsigned int cpu) { - u64 sum = READ_ONCE(per_cpu(irq_stat, cpu).timer_irqs_event); + unsigned long sum = READ_ONCE(per_cpu(irq_stat, cpu).timer_irqs_event); sum += READ_ONCE(per_cpu(irq_stat, cpu).broadcast_irqs_event); sum += READ_ONCE(per_cpu(irq_stat, cpu).pmu_irqs);