RISC-V: Declare per cpu boot data as static
authorAtish Patra <atishp@rivosinc.com>
Wed, 23 Mar 2022 17:17:26 +0000 (10:17 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 31 Mar 2022 19:44:32 +0000 (12:44 -0700)
The per cpu boot data is only used within the cpu_ops_sbi.c. It can
be delcared as static.

Fixes: 9a2451f18663 ("RISC-V: Avoid using per cpu array for ordered booting")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/cpu_ops_sbi.c

index 2e16f6732cdf8fba7232942f8238bc82ed26a618..4f5a6f84e2a4f30e1ba373b6a4e30f255954fa8d 100644 (file)
@@ -21,7 +21,7 @@ const struct cpu_operations cpu_ops_sbi;
  * be invoked from multiple threads in parallel. Define a per cpu data
  * to handle that.
  */
-DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
+static DEFINE_PER_CPU(struct sbi_hart_boot_data, boot_data);
 
 static int sbi_hsm_hart_start(unsigned long hartid, unsigned long saddr,
                              unsigned long priv)