Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1229443ybb; Wed, 8 Apr 2020 20:12:30 -0700 (PDT) X-Google-Smtp-Source: APiQypJx0+JOiQHgs+Xrn4IJe2iPXYKpuh1L9Qf4kFPdYTM7brHtOYwIbejnlCbP7WMbSpzZHFgW X-Received: by 2002:a9d:19ca:: with SMTP id k68mr8301799otk.232.1586401949980; Wed, 08 Apr 2020 20:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586401949; cv=none; d=google.com; s=arc-20160816; b=pviqAoaVvGHK7Hk4TPMF1gSJZ074dPJv3XJv5Ndkl8V2vzO5WID+yq3//3Yxqg2CpY E6DHiq036XNLzdNCQR9iWUGsbeSB+k1T0L7RVB8m35Vvp/RKCN8HGvCpz3+FHiyHt9p7 jiL3R8nbU9iuzHF7CrsjUPHAXca0nb3maekgyKlnSpWiK5B/TzImdgomNhvZZKNivvTD aI+k7MGMu31rDClhsW3lq6W58ut7BWS872yLml3z+fDaZU1E4d37Ey9K0JTsvzHk/R8U CN3BvitrjjT8QRbJYgUgslF7YXa7bAJu2ET/IT9IvkyT5yiwYJ8rQX/l8IZ6DkG8NEGY SeXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=tOqM75/B/8J73IN6YP7LL2SB+xFYlYNkWp2nhksRy78=; b=RfWgxDpJhoGglkmUjA/XSpNO0MEAqVrTOHzd6XI0+4tEX/W1TLB7XEmkjyVnhY40d+ fq5Ycegrq8JLKZNw4pse9d5Nw4GCm4oxIYt4L8ErUJMqK2jGzEnTloBC+RQaFt+vApPp SxbZQEwHvr5AzhjLIBVYBhA6SzwKU3MLA64UYnJ11pFjXYVzJVpZtvIYmpHGXYSXCzUG UBsUdnjOoPCA8QtXh9hWsB05rqQnE2MnHC9mMUsSeelaQD92wxsiLL2gDZ391JfhwEre ZT/tjc3YVoXQ4Gt0duFoCznoVmX7mOdUcUNMfpxhBDHAGnFaDNTLU7lzitFF7Qkmqu88 CMqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m185si2877364oib.102.2020.04.08.20.12.13; Wed, 08 Apr 2020 20:12:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726571AbgDIDKx (ORCPT + 99 others); Wed, 8 Apr 2020 23:10:53 -0400 Received: from mail.loongson.cn ([114.242.206.163]:41078 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726521AbgDIDKx (ORCPT ); Wed, 8 Apr 2020 23:10:53 -0400 Received: from linux.localdomain (unknown [113.200.148.30]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dx794mko5etI0lAA--.30S2; Thu, 09 Apr 2020 11:10:32 +0800 (CST) From: Tiezhu Yang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li Subject: [PATCH] MIPS: Limit check_bugs32() under CONFIG_32BIT Date: Thu, 9 Apr 2020 11:10:29 +0800 Message-Id: <1586401829-22242-1-git-send-email-yangtiezhu@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9Dx794mko5etI0lAA--.30S2 X-Coremail-Antispam: 1UD129KBjvJXoW7ArW8Jr48tr13tr43WryxGrg_yoW8GFy3pF sFyw4kJr4UuFyDAa9Yyr1kWryYqr1kGr45KrW0gFWDAF15XF4UGFn3Kr45Jrn7ZryfKa4r uF9aqr1ftF4Iyw7anT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUkG14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26r4j6ryUM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4j 6F4UM28EF7xvwVC2z280aVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr 1j6F4UJwAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv 7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE14v_ Gr4l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxV WUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI 7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r 1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWrJr0_WFyUJwCI42IY6I8E87Iv67AKxVWUJVW8 JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvjDU0xZFpf9x0JU2FALUUU UU= X-CM-SenderInfo: p1dqw3xlh2x3gn0dqz5rrqw2lrqou0/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no need to build and call check_bugs32() under CONFIG_64BIT, just limit it under CONFIG_32BIT. Signed-off-by: Tiezhu Yang --- arch/mips/include/asm/bugs.h | 4 +++- arch/mips/kernel/cpu-probe.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h index d72dc6e..5f8d2bf 100644 --- a/arch/mips/include/asm/bugs.h +++ b/arch/mips/include/asm/bugs.h @@ -35,7 +35,9 @@ static inline void check_bugs(void) unsigned int cpu = smp_processor_id(); cpu_data[cpu].udelay_val = loops_per_jiffy; - check_bugs32(); + + if (IS_ENABLED(CONFIG_32BIT)) + check_bugs32(); if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64)) check_bugs64(); diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index f21a230..85d7273 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -461,6 +461,7 @@ static inline void cpu_set_mt_per_tc_perf(struct cpuinfo_mips *c) c->options |= MIPS_CPU_MT_PER_TC_PERF_COUNTERS; } +#ifdef CONFIG_32BIT static inline void check_errata(void) { struct cpuinfo_mips *c = ¤t_cpu_data; @@ -484,6 +485,7 @@ void __init check_bugs32(void) { check_errata(); } +#endif /* CONFIG_32BIT */ /* * Probe whether cpu has config register by trying to play with -- 2.1.0