Skip to contentSkip to conversation

x86: UV uv_flush_tlb_others WARN_ON

PATCH Superseded Cliff Wickman 2 participants 2 messages Feb 2, 2009 – Feb 5, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86: UV uv_flush_tlb_others WARN_ON

From: Cliff Wickman <[email protected]>

uv_flush_tlb_others() (arch/x86/kernel/tlb_uv.c)
The "WARN_ON(!in_atomic())" fails if CONFIG_PREEMPT is not enabled. And CONFIG_PREEMPT is not enabled by default in the distribution that most UV owners will use.

We could #ifdef CONFIG_PREEMPT the warning, but that is not good form.

And there seems to be no suitable fix to in_atomic() when CONFIG_PREMPT is not on.
As you commented, Ingo:

Quoted 2 lines

and we have no proper primitive to test for atomicity. (mainly because we dont know about atomicity on a non-preempt kernel)

I propose that we drop the WARN_ON.

Diffed against 2.6.29-rc2

---
 arch/x86/kernel/tlb_uv.c |    2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/tlb_uv.c +0 -2
Index: linux/arch/x86/kernel/tlb_uv.c
===================================================================
@@ -316,8 +316,6 @@ const struct cpumask *uv_flush_tlb_other
 	int locals = 0;
 	struct bau_desc *bau_desc;
 
-	WARN_ON(!in_atomic());
-
 	cpumask_andnot(flush_mask, cpumask, cpumask_of(cpu));
 
 	uv_cpu = uv_blade_processor_id();
#1 lore raw
Quoted 12 lines · Cliff Wickman

From: Cliff Wickman <[email protected]>

uv_flush_tlb_others() (arch/x86/kernel/tlb_uv.c)
The "WARN_ON(!in_atomic())" fails if CONFIG_PREEMPT is not enabled. And CONFIG_PREEMPT is not enabled by default in the distribution that most UV owners will use.

We could #ifdef CONFIG_PREEMPT the warning, but that is not good form.

And there seems to be no suitable fix to in_atomic() when CONFIG_PREMPT is not on.
As you commented, Ingo:

Quoted 8 lines
Quoted 2 lines

and we have no proper primitive to test for atomicity. (mainly because we dont know about atomicity on a non-preempt kernel)

I propose that we drop the WARN_ON.

Diffed against 2.6.29-rc2

Heh.. I included it in the first two merges but forgot it in the final round. Applying to tj-percpu.

Thanks.

Signature · 1 line
tejun