lkml.org 
[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 3.14.23-rt20 - x86, UV: raw_spinlock conversion
* Mike Galbraith | 2014-11-02 08:31:37 [+0100]:

>Shrug. Lots of hobbyists have a beast in their basement, right?

I can take this as is if you want.

>--- a/arch/x86/platform/uv/uv_time.c
>+++ b/arch/x86/platform/uv/uv_time.c
>@@ -300,13 +300,18 @@ static int uv_rtc_unset_timer(int cpu, i
> static cycle_t uv_read_rtc(struct clocksource *cs)
> {
> unsigned long offset;
>+ cycle_t cycles;
>
>+ migrate_disable();
> if (uv_get_min_hub_revision_id() == 1)
> offset = 0;
> else
> offset = (uv_blade_processor_id() * L1_CACHE_BYTES) % PAGE_SIZE;
>
>- return (cycle_t)uv_read_local_mmr(UVH_RTC | offset);
>+ cycles = (cycle_t)uv_read_local_mmr(UVH_RTC | offset);
>+ migrate_enable();
>+
>+ return cycles;
> }

but do you really want a migrate_disable() in here? The only problem I
can imagine is that you switch CPUs between uv_blade_processor_id()
and the actual read. I recommend preempt_disable() and sending this
upstream as well since it is not limited to -RT.

Sebastian


\
 
 \ /
  Last update: 2015-02-17 14:21    [W:0.140 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site