From patchwork Fri Nov 8 16:11:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Wang <00107082@163.com> X-Patchwork-Id: 2008633 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=jKmNit+p; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=y1ss=sd=vger.kernel.org=sparclinux+bounces-2617-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XlP8g5qJmz1xyS for ; Sat, 9 Nov 2024 03:12:03 +1100 (AEDT) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4XlP8d1Gn8z4wcs for ; Sat, 9 Nov 2024 03:12:01 +1100 (AEDT) Received: by gandalf.ozlabs.org (Postfix) id 4XlP8d1DLyz4x8f; Sat, 9 Nov 2024 03:12:01 +1100 (AEDT) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; arc=pass smtp.remote-ip="2604:1380:45e3:2400::1" arc.chain=subspace.kernel.org ARC-Seal: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1731082318; cv=pass; b=ZkIWDkiL4Cp5Ff7krDlVyOU24ii1wavv1peWpThXCumLUbdG2CJso03/LwAmyDJCghVLhnoEOwy979qhHztCAxWtE3qa6yJsSQk1MmHQLWGJWQaTLWpDNVoyM9lA6GSfs+ZZFSDINCkWC0W+IIzxdzipZ3CqntBT6gvn4VhgNMII7w/66oOxq9bzpwWPL2j8LoF6TfC+2Z0SxBmQAcJmPZuVMOcx9ReOjedgTwAe1bQNqbT02io4uA5rG7CiWYa6CiaMmdvPlZGAMi87FBIIUAGjvfHXWX+Sebbrzz65Zk55ZetVj+BpdzlogLwUJneEwTkVJhnl/yjzKsmKqefR9Q== ARC-Message-Signature: i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1731082318; c=relaxed/relaxed; bh=aqtSp0oZdp/eJUvBGh7/YcUJhKmFpySwvw5FIpjT3NQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=MQipFzyvo3Zf77pPqxL5LaGsNBq46IGpWGjwM7vEfHhNUbYu2jUiMaMOnj+xOWqnhhiFmj2G8nmxNTrHegd/CgFeUlVxPTDwktDlRjWPJMdEyLpL2ju+ZYhCLYM1WAsbYsByVzMxj+IqT/NRBhZQBP0wyxGftbsGyGRE/GrgZ9km29cvhmu8O0bW16LpxyCI95C/AWFIM3G14B1AVXG7Yzp/OzMrUqYjZ3V84SK3v+o9Lsl7Ttufr16WM5wHq7UMWxh78dYEvCpGypkLijXY7dyyXFhHF7AoR/z+u71ojTaYm7vSjjLytp1TsRYm+fucQR11CxqByEM983/iTQ3Vsg== ARC-Authentication-Results: i=2; gandalf.ozlabs.org; dmarc=pass (p=none dis=none) header.from=163.com; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=jKmNit+p; dkim-atps=neutral; spf=pass (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-2617-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: gandalf.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256 header.s=s110527 header.b=jKmNit+p; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=sparclinux+bounces-2617-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4XlP8Y6dR5z4wcs for ; Sat, 9 Nov 2024 03:11:57 +1100 (AEDT) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 198EB282343 for ; Fri, 8 Nov 2024 16:11:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 490FC1BD9E2; Fri, 8 Nov 2024 16:11:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="jKmNit+p" X-Original-To: sparclinux@vger.kernel.org Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.3]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 242031BD9DB; Fri, 8 Nov 2024 16:11:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.3 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731082316; cv=none; b=G+SToUlVO+gqgDrhJ6KEOG6odg50AT9xjs2z4dTIKTVc0vYVPvzHuMZWYKopp39J5NU2XDRrySj61REoG0lyJCEBtfkKVePi+qFJ8+3CoDoXAbgEz4ebSxiX/lPmO2rZauZyxAPv0FYaLiea/aN+uWtVvoMVsUWBmiUu/PaPx1o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731082316; c=relaxed/simple; bh=BL67pvH4j3efH+UVI+51SW7Xb2U0qpRD+nOVyfz+CBA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=MIXULk05Du+j8IpRYs0bvT2Ifxy6O962c6+TQOtcIH4gys+7h6X6wbrnmSV3+45UpH1WkaFIz2LueRnMbEm3TBOMKNvq2hxjF/RhwODtK6D6NetcEiUU7KSQkYynlC97cXnNKSX97L05NZJebWEpbGpmaG9inS+WptzZog1nxcc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=jKmNit+p; arc=none smtp.client-ip=117.135.210.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=aqtSp 0oZdp/eJUvBGh7/YcUJhKmFpySwvw5FIpjT3NQ=; b=jKmNit+p/5bg3suPIXrr1 XWX3Nd0LR7EIwgU8CLitlVGs/OH5+CNv9GX/wQ19tqx9/4KtM4MKgS6pJpYFmjt5 D1SHIz+NmhhYCkZtWl+P7/XruZxaw6RhHwgtzSSa9q9B44W3KRJ9Rvz3H2q8Pg9H iXWPKKz3giSYB+Wl5/qboc= Received: from localhost.localdomain (unknown [111.35.191.191]) by gzga-smtp-mtada-g0-1 (Coremail) with SMTP id _____wDnNzUsOC5n1UvUAg--.59311S4; Sat, 09 Nov 2024 00:11:31 +0800 (CST) From: David Wang <00107082@163.com> To: davem@davemloft.net, andreas@gaisler.com Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, David Wang <00107082@163.com> Subject: [PATCH 03/13] sparc/irq: use seq_put_decimal_ull_width() for decimal values Date: Sat, 9 Nov 2024 00:11:23 +0800 Message-Id: <20241108161123.9637-1-00107082@163.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: sparclinux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _____wDnNzUsOC5n1UvUAg--.59311S4 X-Coremail-Antispam: 1Uf129KBjvJXoW7CF1xAFWDCr1rCw4DCFy3Arb_yoW8Zr1xpa 95CFZ7Xw4xZr1jgryxJa4xZrn8tFn0yryagwn5W3yrG3WDGrykXr1S9r1Iqr1IgryxXr4a gF90gayUKa4UCw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRa9aDUUUUU= X-CM-SenderInfo: qqqrilqqysqiywtou0bp/1tbiMwaRqmcuKsHRRwABs7 X-Spam-Status: No, score=-3.2 required=5.0 tests=ARC_SIGNED,ARC_VALID, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on gandalf.ozlabs.org Performance improvement for reading /proc/interrupts on arch sparc Signed-off-by: David Wang <00107082@163.com> --- arch/sparc/kernel/irq_32.c | 12 ++++++------ arch/sparc/kernel/irq_64.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index 8605dd710f3c..5210991429d5 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c @@ -199,18 +199,18 @@ int arch_show_interrupts(struct seq_file *p, int prec) int j; #ifdef CONFIG_SMP - seq_printf(p, "RES: "); + seq_printf(p, "RES:"); for_each_online_cpu(j) - seq_printf(p, "%10u ", cpu_data(j).irq_resched_count); + seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_resched_count, 10); seq_printf(p, " IPI rescheduling interrupts\n"); - seq_printf(p, "CAL: "); + seq_printf(p, "CAL:"); for_each_online_cpu(j) - seq_printf(p, "%10u ", cpu_data(j).irq_call_count); + seq_put_decimal_ull_width(p, " ", cpu_data(j).irq_call_count, 10); seq_printf(p, " IPI function call interrupts\n"); #endif - seq_printf(p, "NMI: "); + seq_printf(p, "NMI:"); for_each_online_cpu(j) - seq_printf(p, "%10u ", cpu_data(j).counter); + seq_put_decimal_ull_width(p, " ", cpu_data(j).counter, 10); seq_printf(p, " Non-maskable interrupts\n"); return 0; } diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 01ee800efde3..9ab6e79b617b 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c @@ -304,9 +304,9 @@ int arch_show_interrupts(struct seq_file *p, int prec) { int j; - seq_printf(p, "NMI: "); + seq_printf(p, "NMI:"); for_each_online_cpu(j) - seq_printf(p, "%10u ", cpu_data(j).__nmi_count); + seq_put_decimal_ull_width(p, " ", cpu_data(j).__nmi_count, 10); seq_printf(p, " Non-maskable interrupts\n"); return 0; }