lkml.org 
[lkml]   [2022]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] x86/platform/uv: Dont use smp_processor_id while preemptible
On Thu, Sep 22, 2022 at 11:01 PM Mike Travis <mike.travis@hpe.com> 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@hpe.com>
> Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
> Reviewed-by: Dimitri Sivanich <dimitri.sivanich@hpe.com>
> Cc: stable@vger.kernel.org

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

\
 
 \ /
  Last update: 2022-09-22 23:00    [W:0.024 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site