Thread (3 messages) 3 messages, 2 authors, 2015-02-17

Re: 3.14.23-rt20 - x86, UV: raw_spinlock conversion

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2015-02-17 13:02:54
Also in: lkml

* 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.
quoted hunk ↗ jump to hunk
--- 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help