From patchwork Fri Jun 16 09:24:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 108982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1197610vqr; Fri, 16 Jun 2023 02:31:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4WlB5OJPHkFx4C/MxomCqRko2wXdC/VvwJEvS2YXxJujMnkJeYwGJecsF8tKYOiiJDMOhZ X-Received: by 2002:a05:6808:1311:b0:39b:f548:3f6 with SMTP id y17-20020a056808131100b0039bf54803f6mr1934807oiv.13.1686907863951; Fri, 16 Jun 2023 02:31:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686907863; cv=none; d=google.com; s=arc-20160816; b=rQ74WFzjHg8xm818aEmCVVkz52CEVJXSqUoBAoUmDjacmJPb+lyMp+7a3tFDEbTlS5 3oGOQeI9UIIJvawiHFfEOs3KgK2OK43UOVVZGW7oDF34YvTPuq0ZXY/mdSeXwfQAndvP n9U4gD3pU4LoFsqc2s37NMt+U6/nr916vGBK4SROzV4cmu03FZpqCXMmKX9ora5BO4fI sJDMwZJgukDLfghg2Tl1PGuICA3p0sjzwS3YsjHz/a8j6LryOPv7iUetqN3SATK2YeKl b4xJmPT03/oRPrtCL3CXXNEH9ShYNDqlubv7FFIxp1Zm03Uf541x2ZeqU3/w22y75kZn 1vjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=0YP2kHDR/RRBhpHIspG6GUx9Bu4B0kEf4CcC1mI43Ag=; b=ekuiFxJMeMkmww53L263XLDuUeE0sVLNCMPbINo06S5YRfgu/NUekm7nGv2ax5/3rR 7BmKptGEAU5nfJd3oQ3WHbT5E4RWubz5xQU/XX+p6tzAwUpSFD/3fb7tGHEi0oD4aC/O djiCQTLSNThPP+4R5/gkIyiQQylLpoeEv2wJWxQUF371TO5fhxK1arqI3wq17eKf0VGx ZhPX8PzlnaOmzua0YfgbDsNfNhMBXaQxPhyiH0d6sGDNkTXbiPeQLxMe4tCetHIW0mac f2evKaB1AFtTCgncnq7pi0w2pIBLazxMv+aO+DNBsmOppwWfP5U3VU2Ru8gRsBnTjQf+ BO3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=mCG2X1H9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=I8EcI07D; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l128-20020a633e86000000b005533f9527c2si1039136pga.433.2023.06.16.02.30.47; Fri, 16 Jun 2023 02:31:03 -0700 (PDT) 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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=mCG2X1H9; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=I8EcI07D; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344249AbjFPJZp (ORCPT + 99 others); Fri, 16 Jun 2023 05:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344127AbjFPJYy (ORCPT ); Fri, 16 Jun 2023 05:24:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B1F72117; Fri, 16 Jun 2023 02:24:51 -0700 (PDT) Date: Fri, 16 Jun 2023 09:24:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686907488; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0YP2kHDR/RRBhpHIspG6GUx9Bu4B0kEf4CcC1mI43Ag=; b=mCG2X1H9CH2cBkjM0FPZUbEhVYmSBFZlS4ceF5PYJTDYLq9dbslJKtTbAJHqKeY1NxbBxW FCKE/vDXcxr/ICQ/pJ3Pb9Wj0/Ax6bZhXJFDo1eF2Tvxe7IXKQVvEZGM+E4XTbA+QJ4qK9 FyrGUcdDEaA5jBKAZNO6GTGdeE236fVTQMljtKCAQWzmEy5rdYX9NCyIxuQhvE9aM1tSrQ vqBpVTA2ouZ3ohTQei4jJ/r6PVtDU7FX3uQRPJeBIK+j+eT/xSc5SINEYJsbKa4cJGeuzt xBtJvv6wuOsmcKdgmFgcWZKftsnPnxxStejTYH/kNuTOY+z2OmvdrrYfq7eAyA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686907488; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0YP2kHDR/RRBhpHIspG6GUx9Bu4B0kEf4CcC1mI43Ag=; b=I8EcI07D5scnvQLvHEw6tJ91EASapwE2fhkgJZUFtMhSAUSJ1Fg8ApV7JqGhr4gUlc7UBB +zPWM7haek0RwJDg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/boot] mips/cpu: Switch to arch_cpu_finalize_init() Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230613224545.312438573@linutronix.de> References: <20230613224545.312438573@linutronix.de> MIME-Version: 1.0 Message-ID: <168690748776.404.1793381056612048285.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768632834658590816?= X-GMAIL-MSGID: =?utf-8?q?1768851100347981578?= The following commit has been merged into the x86/boot branch of tip: Commit-ID: 7f066a22fe353a827a402ee2835e81f045b1574d Gitweb: https://git.kernel.org/tip/7f066a22fe353a827a402ee2835e81f045b1574d Author: Thomas Gleixner AuthorDate: Wed, 14 Jun 2023 01:39:32 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 16 Jun 2023 10:16:00 +02:00 mips/cpu: Switch to arch_cpu_finalize_init() check_bugs() is about to be phased out. Switch over to the new arch_cpu_finalize_init() implementation. No functional change. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20230613224545.312438573@linutronix.de --- arch/mips/Kconfig | 1 + arch/mips/include/asm/bugs.h | 17 ----------------- arch/mips/kernel/setup.c | 13 +++++++++++++ 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index c2f5498..023d3bd 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -4,6 +4,7 @@ config MIPS default y select ARCH_32BIT_OFF_T if !64BIT select ARCH_BINFMT_ELF_STATE if MIPS_FP_SUPPORT + select ARCH_HAS_CPU_FINALIZE_INIT select ARCH_HAS_CURRENT_STACK_POINTER if !CC_IS_CLANG || CLANG_VERSION >= 140000 select ARCH_HAS_DEBUG_VIRTUAL if !64BIT select ARCH_HAS_FORTIFY_SOURCE diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h index 653f78f..84be74a 100644 --- a/arch/mips/include/asm/bugs.h +++ b/arch/mips/include/asm/bugs.h @@ -1,17 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * This is included by init/main.c to check for architecture-dependent bugs. - * * Copyright (C) 2007 Maciej W. Rozycki - * - * Needs: - * void check_bugs(void); */ #ifndef _ASM_BUGS_H #define _ASM_BUGS_H #include -#include #include #include @@ -24,17 +18,6 @@ extern void check_bugs64_early(void); extern void check_bugs32(void); extern void check_bugs64(void); -static inline void __init check_bugs(void) -{ - unsigned int cpu = smp_processor_id(); - - cpu_data[cpu].udelay_val = loops_per_jiffy; - check_bugs32(); - - if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64)) - check_bugs64(); -} - static inline int r4k_daddiu_bug(void) { if (!IS_ENABLED(CONFIG_CPU_R4X00_BUGS64)) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index febdc55..07a1518 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -11,6 +11,8 @@ * Copyright (C) 2000, 2001, 2002, 2007 Maciej W. Rozycki */ #include +#include +#include #include #include #include @@ -840,3 +842,14 @@ static int __init setnocoherentio(char *str) } early_param("nocoherentio", setnocoherentio); #endif + +void __init arch_cpu_finalize_init(void) +{ + unsigned int cpu = smp_processor_id(); + + cpu_data[cpu].udelay_val = loops_per_jiffy; + check_bugs32(); + + if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64)) + check_bugs64(); +}