This is a note to let you know that I've just added the patch titled mips/cpu: Switch to arch_cpu_finalize_init() to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mips-cpu-switch-to-arch_cpu_finalize_init.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 2bedb079d39e87a51a6af0a9606dbd147a9bbfde Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Date: Wed, 14 Jun 2023 01:39:32 +0200 Subject: mips/cpu: Switch to arch_cpu_finalize_init() From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> commit 7f066a22fe353a827a402ee2835e81f045b1574d upstream 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 <tglx@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230613224545.312438573@xxxxxxxxxxxxx Signed-off-by: Daniel Sneddon <daniel.sneddon@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/mips/Kconfig | 1 + arch/mips/include/asm/bugs.h | 17 ----------------- arch/mips/kernel/setup.c | 13 +++++++++++++ 3 files changed, 14 insertions(+), 17 deletions(-) --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -4,6 +4,7 @@ config MIPS default y select ARCH_BINFMT_ELF_STATE select ARCH_CLOCKSOURCE_DATA + select ARCH_HAS_CPU_FINALIZE_INIT select ARCH_DISCARD_MEMBLOCK select ARCH_HAS_ELF_RANDOMIZE select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST --- 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 <linux/bug.h> -#include <linux/delay.h> #include <linux/smp.h> #include <asm/cpu.h> @@ -31,17 +25,6 @@ static inline void check_bugs_early(void #endif } -static inline void check_bugs(void) -{ - unsigned int cpu = smp_processor_id(); - - cpu_data[cpu].udelay_val = loops_per_jiffy; - check_bugs32(); -#ifdef CONFIG_64BIT - check_bugs64(); -#endif -} - static inline int r4k_daddiu_bug(void) { #ifdef CONFIG_64BIT --- 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 <linux/init.h> +#include <linux/cpu.h> +#include <linux/delay.h> #include <linux/ioport.h> #include <linux/export.h> #include <linux/screen_info.h> @@ -1060,3 +1062,14 @@ static int __init debugfs_mips(void) } arch_initcall(debugfs_mips); #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(); +} Patches currently in stable-queue which might be from tglx@xxxxxxxxxxxxx are queue-4.14/x86-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/arm-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/um-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/mips-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/init-x86-move-mem_encrypt_init-into-arch_cpu_finalize_init.patch queue-4.14/sh-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/init-invoke-arch_cpu_finalize_init-earlier.patch queue-4.14/x86-xen-fix-secondary-processors-fpu-initialization.patch queue-4.14/x86-fpu-move-fpu-initialization-into-arch_cpu_finalize_init.patch queue-4.14/init-remove-check_bugs-leftovers.patch queue-4.14/init-provide-arch_cpu_finalize_init.patch queue-4.14/m68k-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/sparc-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/x86-fpu-mark-init-functions-__init.patch queue-4.14/ia64-cpu-switch-to-arch_cpu_finalize_init.patch queue-4.14/x86-fpu-remove-cpuinfo-argument-from-init-functions.patch