Re: [PATCH] lib/smp_processor_id: Don't warn if there is only one CPU

From: Tiezhu Yang

Date: Wed Nov 11 2026 - 23:00:41 EST


On 11/11/26 5:24 PM, Huacai Chen wrote:
When CONFIG_DEBUG_PREEMPT is enabled on a Non-SMP (single-core) kernel,
calls to smp_processor_id() in preemptible contexts trigger some false
positive "BUG: using smp_processor_id() in preemptible" warnings, which
are harmless noise because the process always executes on CPU 0 and CPU
migration is impossible.

...

Reported-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>

Hi all,

Just for reference, here is the related LoongArch patch that
fixes the specific callers in cacheinfo and local TLB flush:

LoongArch: Fix preemptible warnings in cacheinfo and local TLB flush
https://lore.kernel.org/loongarch/20261111113738.862-1-yangtiezhu@xxxxxxxxxxx/T/#u

Thanks,
Tiezhu