public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1 of 6] x86, UV: smp_processor_id in a preemptable region
@ 2011-06-14 23:06 Cliff Wickman
  2011-06-15  6:05 ` Rakib Mullick
  0 siblings, 1 reply; 9+ messages in thread
From: Cliff Wickman @ 2011-06-14 23:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo

From: Cliff Wickman <cpw@sgi.com>

Calling smp_processor_id() from within a preemptable region will issue
a warning if DEBUG_PREEMPT is set.

Diffed against 3.0.0-rc3

Signed-off-by: Cliff Wickman <cpw@sgi.com>
---
 arch/x86/platform/uv/tlb_uv.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux/arch/x86/platform/uv/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/platform/uv/tlb_uv.c
+++ linux/arch/x86/platform/uv/tlb_uv.c
@@ -1334,7 +1334,9 @@ static ssize_t tunables_write(struct fil
 
 	instr[count] = '\0';
 
+	preempt_disable(); /* avoid DEBUG_PREEMPT warning */
 	bcp = &per_cpu(bau_control, smp_processor_id());
+	preempt_enable_no_resched();
 
 	ret = parse_tunables_write(bcp, instr, count);
 	if (ret)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-06-15 18:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 23:06 [PATCH 1 of 6] x86, UV: smp_processor_id in a preemptable region Cliff Wickman
2011-06-15  6:05 ` Rakib Mullick
2011-06-15 13:52   ` Cliff Wickman
2011-06-15 15:54     ` Ingo Molnar
2011-06-15 16:07       ` Cliff Wickman
2011-06-15 16:15         ` Ingo Molnar
2011-06-15 16:40           ` Cliff Wickman
2011-06-15 17:21             ` H. Peter Anvin
2011-06-15 18:58               ` Cliff Wickman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox