Skip to content

Commit 869d40b

Browse files
vlsunilpalmer-dabbelt
authored andcommitted
riscv: cpu_ops_sbi: Add 64bit hartid support on RV64
The hartid can be a 64bit value on RV64 platforms. Modify the hartid variable type to unsigned long so that it can hold 64bit value on RV64 platforms. Signed-off-by: Sunil V L <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Atish Patra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent f2906aa commit 869d40b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/riscv/kernel/cpu_ops_sbi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int sbi_hsm_hart_get_status(unsigned long hartid)
6565
static int sbi_cpu_start(unsigned int cpuid, struct task_struct *tidle)
6666
{
6767
unsigned long boot_addr = __pa_symbol(secondary_start_sbi);
68-
int hartid = cpuid_to_hartid_map(cpuid);
68+
unsigned long hartid = cpuid_to_hartid_map(cpuid);
6969
unsigned long hsm_data;
7070
struct sbi_hart_boot_data *bdata = &per_cpu(boot_data, cpuid);
7171

@@ -107,7 +107,7 @@ static void sbi_cpu_stop(void)
107107
static int sbi_cpu_is_stopped(unsigned int cpuid)
108108
{
109109
int rc;
110-
int hartid = cpuid_to_hartid_map(cpuid);
110+
unsigned long hartid = cpuid_to_hartid_map(cpuid);
111111

112112
rc = sbi_hsm_hart_get_status(hartid);
113113

0 commit comments

Comments
 (0)