Re: [PATCH v2] x86/platform/uv: Dont use smp_processor_id while preemptible
From: Andy Shevchenko
Date: Thu Sep 22 2022 - 16:59:57 EST
On Thu, Sep 22, 2022 at 11:01 PM Mike Travis <mike.travis@xxxxxxx> wrote:
>
> To avoid a "BUG: using smp_processor_id() in preemptible" debug warning
> message, disable preemption around use of the processor id. This code
> sequence merely decides which portal that this CPU uses to read the RTC.
> It does this to avoid thrashing the cache but even if preempted it still
> reads the same time from the single RTC clock.
...
> Signed-off-by: Mike Travis <mike.travis@xxxxxxx>
> Reviewed-by: Steve Wahl <steve.wahl@xxxxxxx>
> Reviewed-by: Dimitri Sivanich <dimitri.sivanich@xxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
No kernel version? No Fixes tag?
...
> - offset = (uv_blade_processor_id() * L1_CACHE_BYTES) % PAGE_SIZE;
> + offset = (uv_cpu_blade_processor_id(cpu) * L1_CACHE_BYTES) % PAGE_SIZE;
Perhaps it can be transformed to use offset_in_page() at the same time.
--
With Best Regards,
Andy Shevchenko