Skip to content

Commit 2b7ec33

Browse files
chenhuacaivireshk
authored andcommitted
cpufreq: loongson3: Use raw_smp_processor_id() in do_service_request()
Use raw_smp_processor_id() instead of plain smp_processor_id() in do_service_request(), otherwise we may get some errors with the driver enabled: BUG: using smp_processor_id() in preemptible [00000000] code: (udev-worker)/208 caller is loongson3_cpufreq_probe+0x5c/0x250 [loongson3_cpufreq] Reported-by: Xi Ruoyao <xry111@xry111.site> Tested-by: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 5493f97 commit 2b7ec33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cpufreq/loongson3_cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static DEFINE_PER_CPU(struct loongson3_freq_data *, freq_data);
176176
static inline int do_service_request(u32 id, u32 info, u32 cmd, u32 val, u32 extra)
177177
{
178178
int retries;
179-
unsigned int cpu = smp_processor_id();
179+
unsigned int cpu = raw_smp_processor_id();
180180
unsigned int package = cpu_data[cpu].package;
181181
union smc_message msg, last;
182182

0 commit comments

Comments
 (0)