Commit a927d4c7 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Make sure init_irqwork_curcpu() is called with PSTATE_IE off.

parent fd0c9ac4
...@@ -1097,6 +1097,18 @@ void init_irqwork_curcpu(void) ...@@ -1097,6 +1097,18 @@ void init_irqwork_curcpu(void)
memset(__irq_work + smp_processor_id(), 0, sizeof(*workp)); memset(__irq_work + smp_processor_id(), 0, sizeof(*workp));
/* Make sure we are called with PSTATE_IE disabled. */
__asm__ __volatile__("rdpr %%pstate, %0\n\t"
: "=r" (tmp));
if (tmp & PSTATE_IE) {
prom_printf("BUG: init_irqwork_curcpu() called with "
"PSTATE_IE enabled, bailing.\n");
__asm__ __volatile__("mov %%i7, %0\n\t"
: "=r" (tmp));
prom_printf("BUG: Called from %lx\n", tmp);
prom_halt();
}
/* Set interrupt globals. */ /* Set interrupt globals. */
workp = &__irq_work[smp_processor_id()]; workp = &__irq_work[smp_processor_id()];
__asm__ __volatile__( __asm__ __volatile__(
...@@ -1105,7 +1117,7 @@ void init_irqwork_curcpu(void) ...@@ -1105,7 +1117,7 @@ void init_irqwork_curcpu(void)
"mov %2, %%g6\n\t" "mov %2, %%g6\n\t"
"wrpr %0, 0x0, %%pstate\n\t" "wrpr %0, 0x0, %%pstate\n\t"
: "=&r" (tmp) : "=&r" (tmp)
: "i" (PSTATE_IG | PSTATE_IE), "r" (workp)); : "i" (PSTATE_IG), "r" (workp));
} }
/* Only invoked on boot processor. */ /* Only invoked on boot processor. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment