Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107634
b: refs/heads/master
c: c02a511
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Aug 4, 2008
1 parent 6f71e46 commit 885ab33
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: deb16999e452b74011dac5b2fe0d6258df81a2a1
refs/heads/master: c02a5119e862dea9a1361182840d41ae1fe24227
32 changes: 15 additions & 17 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ static void cheetah_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpumask
static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpumask_t *mask)
{
int cnt, retries, this_cpu, prev_sent, i;
unsigned long flags, status;
unsigned long status;
cpumask_t error_mask;
struct trap_per_cpu *tb;
u16 *cpu_list;
Expand All @@ -620,18 +620,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
if (cpus_empty(*mask))
return;

/* We have to do this whole thing with interrupts fully disabled.
* Otherwise if we send an xcall from interrupt context it will
* corrupt both our mondo block and cpu list state.
*
* One consequence of this is that we cannot use timeout mechanisms
* that depend upon interrupts being delivered locally. So, for
* example, we cannot sample jiffies and expect it to advance.
*
* Fortunately, udelay() uses %stick/%tick so we can use that.
*/
local_irq_save(flags);

this_cpu = smp_processor_id();
tb = &trap_block[this_cpu];

Expand Down Expand Up @@ -720,8 +708,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
}
} while (1);

local_irq_restore(flags);

if (unlikely(!cpus_empty(error_mask)))
goto fatal_mondo_cpu_error;

Expand All @@ -738,14 +724,12 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum
return;

fatal_mondo_timeout:
local_irq_restore(flags);
printk(KERN_CRIT "CPU[%d]: SUN4V mondo timeout, no forward "
" progress after %d retries.\n",
this_cpu, retries);
goto dump_cpu_list_and_out;

fatal_mondo_error:
local_irq_restore(flags);
printk(KERN_CRIT "CPU[%d]: Unexpected SUN4V mondo error %lu\n",
this_cpu, status);
printk(KERN_CRIT "CPU[%d]: Args were cnt(%d) cpulist_pa(%lx) "
Expand All @@ -763,7 +747,21 @@ static void (*xcall_deliver_impl)(u64, u64, u64, const cpumask_t *);

static void xcall_deliver(u64 data0, u64 data1, u64 data2, const cpumask_t *mask)
{
unsigned long flags;

/* We have to do this whole thing with interrupts fully disabled.
* Otherwise if we send an xcall from interrupt context it will
* corrupt both our mondo block and cpu list state.
*
* One consequence of this is that we cannot use timeout mechanisms
* that depend upon interrupts being delivered locally. So, for
* example, we cannot sample jiffies and expect it to advance.
*
* Fortunately, udelay() uses %stick/%tick so we can use that.
*/
local_irq_save(flags);
xcall_deliver_impl(data0, data1, data2, mask);
local_irq_restore(flags);
}

/* Send cross call to all processors mentioned in MASK_P
Expand Down

0 comments on commit 885ab33

Please sign in to comment.