Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3507181rwb; Sat, 3 Dec 2022 06:07:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf5eR7OzrQwCAMlBaHveItloaLi3W3/MZG3VdSQo1YDVKGXS42ZlhEmfcOChMJjPE+MthugM X-Received: by 2002:a17:906:f281:b0:7ae:3b9e:1d8a with SMTP id gu1-20020a170906f28100b007ae3b9e1d8amr60755694ejb.581.1670076419830; Sat, 03 Dec 2022 06:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670076419; cv=none; d=google.com; s=arc-20160816; b=S6lPUX0S53rdiNLiVb+sJyhUaxANfV1DRXcdy1lof0jXzzKZY/NF4AFoNoCOB3YPGT BJGH94vhcnQconv3+/hz0Xoza5TrQsODlW5+5JyWXNQxwNbG9DVrV1TESzR3tJmTx/k5 jW0P1Szsp7FajBOvQwcJyCAgQNYLHe27LPqqBT+77UjBhhOTN5ji68uCMh6g7Jss1S1i di6j24mZ+4oSs9BxwBvbsFWHRcPEulTnThaO71WGahMUhYJd9SpxtZjSIsamRlQZTFxQ BWW9B5W6iSK6qZMnODbsHOZwgmX8KfhZ91O9J0RPXa8PPu+HMyQ6VWhLdXnktZK4Qrvf pwgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=qZkgwkZJvqZBPbYMkACcK55pY/kE8+kACxCCBdNWe1g=; b=XVC2j7IHFT9f1TBO93oFlzVDw8+74vr2kKQIxeKqDPw/Wt1p2QzdqmjebWzeVVHYN0 tbjAmuALCyQ9lUUHtUSq/CPaCZXQ7IqF5tUjMY3b/hivboDbYTgU7oqi/2UNv25XJRBC XkDP15GSz1rhSZ1KOIC0M/iUww7UR4JXUCPq5Tsx9rGaBm+yEuHvwCD2kUURVcCsg9hX IHTbNHo05wK3n1unxEB6lMtibnkrPfxn3rXlTBpXvofBb9lvuy5lbeDRNuGvfj7t8wJC rZywTGFSN9wTLUweUTisxFtcAOBiWDSbssFwmJhij5qS5wPFWB9/hM/hv3dS1C9/b/1z FDUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u23-20020a170906125700b0078dc3cb8b48si6495124eja.625.2022.12.03.06.06.39; Sat, 03 Dec 2022 06:06:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229767AbiLCNy1 (ORCPT + 82 others); Sat, 3 Dec 2022 08:54:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbiLCNyW (ORCPT ); Sat, 3 Dec 2022 08:54:22 -0500 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70D05193EE for ; Sat, 3 Dec 2022 05:54:19 -0800 (PST) Received: from loongson.cn (unknown [113.200.148.30]) by gateway (Coremail) with SMTP id _____8Bx1vAJVYtjDPsCAA--.6924S3; Sat, 03 Dec 2022 21:54:18 +0800 (CST) Received: from linux.localdomain (unknown [113.200.148.30]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxZ1cIVYtjkBMlAA--.8238S2; Sat, 03 Dec 2022 21:54:16 +0800 (CST) From: Tiezhu Yang To: Huacai Chen , WANG Xuerui Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] LoongArch: Make lscpu show "Model name" and "CPU family" Date: Sat, 3 Dec 2022 21:54:16 +0800 Message-Id: <1670075656-4754-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf8CxZ1cIVYtjkBMlAA--.8238S2 X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7uF4fZrWrZr4rtrW7Xr43KFg_yoW8Ar1DpF W3CF4UJw4DGwn8J3yxta48uw4Y9Fn8J3W2van3GrW3C3WUXr4kXw10vw4xXF4Y9r1fKw4r ZFZYgF15KFyUJaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU b7AYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l e2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44I27wAqx4xG64xvF2 IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4U McvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x0EwIxGrwCFx2 IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v2 6r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67 AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IY s7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr 0_GrUvcSsGvfC2KfnxnUUI43ZEXa7IU8czVUUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham 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 When update the latest kernel on LoongArch, and then use lscpu command to show cpuinfo, we can not see "Model name" and "CPU family", this is because there are no matched patterns in /proc/cpuinfo, use small letter of "Model Name" and "CPU Family" in show_cpuinfo() to fix it. Here is the related code of lscpu: static const struct cpuinfo_pattern type_patterns[] = { ... DEF_PAT_CPUTYPE( "cpu family", PAT_FAMILY, family), ... DEF_PAT_CPUTYPE( "model name", PAT_MODEL_NAME, modelname), ... }; Link: https://github.com/util-linux/util-linux/blob/master/sys-utils/lscpu-cputype.c Fixes: 7153c3cbb5b9 ("LoongArch: Add misc common routines") Signed-off-by: Tiezhu Yang --- arch/loongarch/kernel/proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/loongarch/kernel/proc.c b/arch/loongarch/kernel/proc.c index 5c67cc4..eafd1cf 100644 --- a/arch/loongarch/kernel/proc.c +++ b/arch/loongarch/kernel/proc.c @@ -49,8 +49,8 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "processor\t\t: %ld\n", n); seq_printf(m, "package\t\t\t: %d\n", cpu_data[n].package); seq_printf(m, "core\t\t\t: %d\n", cpu_data[n].core); - seq_printf(m, "CPU Family\t\t: %s\n", __cpu_family[n]); - seq_printf(m, "Model Name\t\t: %s\n", __cpu_full_name[n]); + seq_printf(m, "cpu family\t\t: %s\n", __cpu_family[n]); + seq_printf(m, "model name\t\t: %s\n", __cpu_full_name[n]); seq_printf(m, "CPU Revision\t\t: 0x%02x\n", version); seq_printf(m, "FPU Revision\t\t: 0x%02x\n", fp_version); seq_printf(m, "CPU MHz\t\t\t: %llu.%02llu\n", -- 2.1.0