Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2287804iof; Wed, 8 Jun 2022 01:29:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYWRsVp+Hnoh7y/4+OF39Y9xSGB9NzIDOzj1/3bCHpr7/i3QnKgz4OokZ8traRQOPRKGRZ X-Received: by 2002:a63:4844:0:b0:3fc:c299:a7a4 with SMTP id x4-20020a634844000000b003fcc299a7a4mr28856637pgk.510.1654676998098; Wed, 08 Jun 2022 01:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654676998; cv=none; d=google.com; s=arc-20160816; b=EijK4B9WAfOh254Tt3egt8g1cIKa7PI011SWk7XiCGXm6E3tpBPSTMISZX563dlhSq HdKtmL86BoBXJsNwYZTYquDrosmIJ+QPzVFUHPLXWFwnghL0QygIXkZ9tHaHOqHn3F5e eqHRKIsWv5e6m+1Cv1c3f4K4puML8etWIyMLelJa+37odcEK6GlPTVO1XhMwj/w0+LNw hIpRDEd80WsIWiwzRrEAoGzW7GD5O/7NKoPvnfHgXnUqs1yc+GBTmFXFEsAd0cxGQUla sm0KbfrVCq0vwXPb6LYtPs/RbdPzkKbMfilsSx8Jtv9EXALhBJPoANk9UpXn7amc2VFt 7m4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=ie1VBpDc60mNPyKhPTfEMsPzeVNv6xxlIjutSd/3wxk=; b=QGElAJs9CC2dReV2wwxo7XVCYc7StIkRuvG6Rw4WbxmBmMDqbP246A603riYxu19S8 hRqjNY56AV0SFw4jPKJlqW/V5lPBXyDkO0hB4T8XLrD5PF4Safj/uWYZ+JI0iXptQ+Vu bISEOIdLDrECrcfOvtyyc9nteKRLWYMLxN2EOntvjCNRE701i144YpA4hyQJ+CyOqBC9 WbyN+7RDKlSGE9LuHv6s3ar2vAP5Swf3lTC6JB7E9j7I2HKPBUy+K88siEm753RcATgG 5zdOgdHAcWFX+07s+6qHGLQAqNOR4NfS+lJkeeydHV1N00P12mT46xxQ2kSPDwATAGIm foGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm3 header.b=J8mQBcAX; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="kXfZqI/U"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t5-20020a17090340c500b0016139eb0114si23553501pld.346.2022.06.08.01.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:29:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm3 header.b=J8mQBcAX; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="kXfZqI/U"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89CF31E2886; Wed, 8 Jun 2022 00:58:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379518AbiFGVKN (ORCPT + 99 others); Tue, 7 Jun 2022 17:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359588AbiFGUMQ (ORCPT ); Tue, 7 Jun 2022 16:12:16 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13AC2396BA; Tue, 7 Jun 2022 11:27:40 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C19CE5C00E0; Tue, 7 Jun 2022 14:27:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 07 Jun 2022 14:27:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1654626459; x= 1654712859; bh=ie1VBpDc60mNPyKhPTfEMsPzeVNv6xxlIjutSd/3wxk=; b=J 8mQBcAXvI2l0rIAtmrCwCQ6uidHm9+7l1mbxzaWA16v8+mvBtUB/Tqibs4l4iGTH zr5Hpa9NoZohYtwM7gBFwI8L4RRD0DsMNAlrSP9osm3o70k8L7KtbSdgZPYqyGIg +n7V8tuKJhTPCktZhpNAMLjoGqsW4CTycp4Fc77HTn3wEx5iogMJXRhtaxUdr3TW 3V3hSPlogNirpnrZzFiin1zUjY5cAxETwtv6hByYrzZ15zVa3xggXaEq6SCUeKsQ cVoGhHbbzTyxVe1IxfTXIlBbzNZO4n/dIeEqjICzclrF8bEcci8SOTHUu9wDog4J vuDr7CN7iM/JP406J8Lrg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1654626459; x= 1654712859; bh=ie1VBpDc60mNPyKhPTfEMsPzeVNv6xxlIjutSd/3wxk=; b=k XfZqI/UMtKkFJGhhpkg2gLlB56uW8wdx1tuj7LWZRl9rHNSTle1o299/ZRsPSXXJ ERmZmkX7mc3m/629vqpXSye1MbjWMsnCPx5xuvnx7T0qGSdx7cageVlbIaG7dPki DtqnfCzwlqtX9vMiLgh0WCcfiwcMhLCZiKR6IPe0QjbCc1ekBnDLIrQtr5yJjQCa Ps/As+c0cIbB9dxKaahs1RMVXPrs4NVIwK1UCbpXPhbkv9LdT5z4l4rmsePvm+rf A5U/LWGzXaE8CUE8pfcj5nTaKDYkvUu/uAs4Zz+VY0ItSnZNwKmpYirbVzDVMmAV EJrSbemszC3CJvQMMb9lw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddthedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpeduhfekvedvtdeukeeffefgteelgfeugeeuledttdeijeeg ieehvefghefgvdefgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jun 2022 14:27:37 -0400 (EDT) Message-ID: Date: Tue, 7 Jun 2022 19:27:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 11/12] MIPS: Report cluster in /proc/cpuinfo Content-Language: en-GB To: Marc Zyngier , Dragan Mladjenovic Cc: Thomas Bogendoerfer , Chao-ying Fu , Daniel Lezcano , Geert Uytterhoeven , Greg Ungerer , Hauke Mehrtens , Ilya Lipnitskiy , linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Paul Burton , Peter Zijlstra , Serge Semin , Thomas Gleixner , Tiezhu Yang References: <20220525121030.16054-1-Dragan.Mladjenovic@syrmia.com> <20220525121030.16054-12-Dragan.Mladjenovic@syrmia.com> <87sfoi3pek.wl-maz@kernel.org> From: Jiaxun Yang In-Reply-To: <87sfoi3pek.wl-maz@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 在 2022/6/6 14:14, Marc Zyngier 写道: > 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. Hmm, userspace always parse cpuinfo line by line so I guess it won't be a problem if we add a new line here. We accumulated some new additions to cpuinfo in past years and there was never a single complain for that. Though I don't like the idea of using CM version to switch on the cluster display.... Thanks - Jiaxun > > M. >