This is a note to let you know that I've just added the patch titled RISC-V: Declare cpu_ops_spinwait in <asm/cpu_ops.h> to the 5.19-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: risc-v-declare-cpu_ops_spinwait-in-asm-cpu_ops.h.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From da6d2128e56a50a0d497c8e41ca1d33d88bcc0aa Mon Sep 17 00:00:00 2001 From: Ben Dooks <ben.dooks@xxxxxxxxxx> Date: Thu, 14 Jul 2022 08:18:11 +0100 Subject: RISC-V: Declare cpu_ops_spinwait in <asm/cpu_ops.h> From: Ben Dooks <ben.dooks@xxxxxxxxxx> commit da6d2128e56a50a0d497c8e41ca1d33d88bcc0aa upstream. The cpu_ops_spinwait is used in a couple of places in arch/riscv and is causing a sparse warning due to no declaration. Add this to <asm/cpu_ops.h> with the others to fix the following: arch/riscv/kernel/cpu_ops_spinwait.c:16:29: warning: symbol 'cpu_ops_spinwait' was not declared. Should it be static? Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxx> Link: https://lore.kernel.org/r/20220714071811.187491-1-ben.dooks@xxxxxxxxxx [Palmer: Drop the extern from cpu_ops.c] Fixes: 2ffc48fc7071 ("RISC-V: Move spinwait booting method to its own config") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/riscv/include/asm/cpu_ops.h | 1 + arch/riscv/kernel/cpu_ops.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) --- a/arch/riscv/include/asm/cpu_ops.h +++ b/arch/riscv/include/asm/cpu_ops.h @@ -38,6 +38,7 @@ struct cpu_operations { #endif }; +extern const struct cpu_operations cpu_ops_spinwait; extern const struct cpu_operations *cpu_ops[NR_CPUS]; void __init cpu_set_ops(int cpu); --- a/arch/riscv/kernel/cpu_ops.c +++ b/arch/riscv/kernel/cpu_ops.c @@ -15,9 +15,7 @@ const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init; extern const struct cpu_operations cpu_ops_sbi; -#ifdef CONFIG_RISCV_BOOT_SPINWAIT -extern const struct cpu_operations cpu_ops_spinwait; -#else +#ifndef CONFIG_RISCV_BOOT_SPINWAIT const struct cpu_operations cpu_ops_spinwait = { .name = "", .cpu_prepare = NULL, Patches currently in stable-queue which might be from ben.dooks@xxxxxxxxxx are queue-5.19/risc-v-declare-cpu_ops_spinwait-in-asm-cpu_ops.h.patch queue-5.19/risc-v-cpu_ops_spinwait.c-should-include-head.h.patch