Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp436328iof; Mon, 6 Jun 2022 06:23:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrHrJ2S1r67q17eNgLCxfq/cJyO52gIKv6RxNFlSaXQC0tWlV6d9eiqcTGxjgLPBh34/0z X-Received: by 2002:a17:90b:380f:b0:1e3:3de5:d60e with SMTP id mq15-20020a17090b380f00b001e33de5d60emr26221934pjb.211.1654521827709; Mon, 06 Jun 2022 06:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654521827; cv=none; d=google.com; s=arc-20160816; b=uKQlOiT4KhA2uLkqJB/zWKzbG4ksLau/R/8AniDv4epUwbXYqHSgIEIqKCi/LK/V9g W7QC5kRAbHRw+fD024eWghUVP0vd251P0Yy7xJpKC4GREPbnDzhi9KL7Q5nmzsRK/edB lh6/dNMJK8qTLr/CM/cJN0HsRjEN+NsZ3mdc8UX/Rzmgk0E1+BZWBWf7nz4uAu+0otek rVTk3/GK9lU6EASYaWtnH76bHfwkVCSuVN5CguMdVXNPErJZruucbkn+/WCovh2Cm1DH f8KBWiQin153RvNGSQp9q1/8U85Bb4UJaZz7ewo224ALDYOSbP6sVT+SBI6ecgfcQ05S aVmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=m8pCPBCV6OUdRZhqdjPtIJM0rABEZpLc2rY+GDh4gBM=; b=Vb6PW8LXsHUUstxb6biuNE0nLi1KjLNXz2sFm8kNHTkk+mgT9g1yBisU8Z5SE+KkzJ UudI6Q3ive+bD7NJw+UKTFqLKlQfOTssCzCFln+9uDUivweGmX9Z35I2MTpE1rm8tale ZmrftayG7ohSfA4c4DoTqMaPMPnBmeAH9wP9/5DORbJzu//0QFLGBHoBqWqnhJDJ9AWv ljXo4Cg1cHzXtKLiAWRpcIatOGv3wtMGX0QHUwHX10DcpvGPVVT3Jw5gtMDQV4LB9nJm V7CXL4KcIqSZJ3rWn+DwIwXzKJSWIHizW18PMAIwammwb2/oNKRY6XlsROzh42V0sKKu gXRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YZHN5+ZG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n9-20020a170903110900b00167839e8126si3589066plh.590.2022.06.06.06.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 06:23:47 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YZHN5+ZG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 41C821BE9D; Mon, 6 Jun 2022 06:14:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238622AbiFFNOh (ORCPT + 99 others); Mon, 6 Jun 2022 09:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238623AbiFFNOb (ORCPT ); Mon, 6 Jun 2022 09:14:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB481AD81; Mon, 6 Jun 2022 06:14:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 28EEE6122B; Mon, 6 Jun 2022 13:14:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B4D5C34115; Mon, 6 Jun 2022 13:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654521254; bh=YDX4NNlOVpqDCWCFK0MqZGOJ//FD8OgInNrhbDMDRqc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YZHN5+ZGwp6uasf+gER256E64FyixZ8PUrwizVGOgvJvGpU2xeNHI40K4fdEBG58I fFg2tqQnfNhKqhI+j/47ZsK4JZMYVZdb3xas9xFas1a7Eh7oLj5F4R7QggFus7Y+29 ocvKdTbDa+ZcvQCEj+KqZKoyxMv+R50hhKI+QwUmACNxLmwzkYyrwOgIc9JIo2N8cB 5+DRYMMuzrfc4rMWw4sgE1mjbeipPPkRVtjJe3OXuclQR6semuYsTfB4NHqNekHmkR MTTseK7TD+RQaGbgmrZ1OFWnAWCEhd0MRt3Sf/3UuDvnL9Sv7Xe9dpZAhQgCZrP6hO 6bRSdf2xU5V1w== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nyCYe-00FuK3-5c; Mon, 06 Jun 2022 14:14:12 +0100 Date: Mon, 06 Jun 2022 14:14:11 +0100 Message-ID: <87sfoi3pek.wl-maz@kernel.org> From: Marc Zyngier To: Dragan Mladjenovic Cc: Thomas Bogendoerfer , Chao-ying Fu , Daniel Lezcano , Geert Uytterhoeven , Greg Ungerer , Hauke Mehrtens , Ilya Lipnitskiy , Jiaxun Yang , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Paul Burton , Peter Zijlstra , Serge Semin , Thomas Gleixner , Tiezhu Yang , Dragan Mladjenovic Subject: Re: [PATCH v2 11/12] MIPS: Report cluster in /proc/cpuinfo In-Reply-To: <20220525121030.16054-12-Dragan.Mladjenovic@syrmia.com> References: <20220525121030.16054-1-Dragan.Mladjenovic@syrmia.com> <20220525121030.16054-12-Dragan.Mladjenovic@syrmia.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: Dragan.Mladjenovic@syrmia.com, tsbogend@alpha.franken.de, cfu@wavecomp.com, daniel.lezcano@linaro.org, geert@linux-m68k.org, gerg@kernel.org, hauke@hauke-m.de, ilya.lipnitskiy@gmail.com, jiaxun.yang@flygoat.com, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, paulburton@kernel.org, peterz@infradead.org, fancer.lancer@gmail.com, tglx@linutronix.de, yangtiezhu@loongson.cn, dragan.mladjenovic@syrmia.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 May 2022 13:10:29 +0100, Dragan Mladjenovic wrote: > > From: Paul Burton > > When >= CM3.5 output cluster number. > > Signed-off-by: Paul Burton > Signed-off-by: Dragan Mladjenovic > > diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c > index bb43bf850314..a66e7705315d 100644 > --- a/arch/mips/kernel/proc.c > +++ b/arch/mips/kernel/proc.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -282,6 +283,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) > seq_printf(m, "kscratch registers\t: %d\n", > hweight8(cpu_data[n].kscratch_mask)); > seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package); > + if (mips_cm_revision() >= CM_REV_CM3_5) > + seq_printf(m, "cluster\t\t\t: %d\n", cpu_cluster(&cpu_data[n])); > seq_printf(m, "core\t\t\t: %d\n", cpu_core(&cpu_data[n])); > > #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_CPU_MIPSR6) This will break userspace. Please don't do that. M. -- Without deviation from the norm, progress is not possible.