Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107631
b: refs/heads/master
c: 91a4231
h: refs/heads/master
i:
  107629: ea7042c
  107627: 737a9ec
  107623: 308ee95
  107615: 2ce383d
v: v3
  • Loading branch information
David S. Miller committed Aug 4, 2008
1 parent 785887f commit 06b371d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 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: 24445a4ac9d3fdd3f96f0ad277cb2ba274470d94
refs/heads/master: 91a4231cc2efb9134373bb2a93be96a284955607
18 changes: 11 additions & 7 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,15 +761,19 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, const cpum

static void (*xcall_deliver)(u64, u64, u64, const cpumask_t *);

/* Send cross call to all processors mentioned in MASK
* except self.
/* Send cross call to all processors mentioned in MASK_P
* except self. Really, there are only two cases currently,
* "&cpu_online_map" and "&mm->cpu_vm_mask".
*/
static void smp_cross_call_masked(unsigned long *func, u32 ctx, u64 data1, u64 data2, cpumask_t mask)
static void smp_cross_call_masked(unsigned long *func, u32 ctx, u64 data1, u64 data2, const cpumask_t *mask_p)
{
u64 data0 = (((u64)ctx)<<32 | (((u64)func) & 0xffffffff));
int this_cpu = get_cpu();
cpumask_t mask;

cpus_and(mask, mask, cpu_online_map);
mask = *mask_p;
if (mask_p != &cpu_online_map)
cpus_and(mask, mask, cpu_online_map);
cpu_clear(this_cpu, mask);

xcall_deliver(data0, data1, data2, &mask);
Expand Down Expand Up @@ -803,7 +807,7 @@ void arch_send_call_function_single_ipi(int cpu)

/* Send cross call to all processors except self. */
#define smp_cross_call(func, ctx, data1, data2) \
smp_cross_call_masked(func, ctx, data1, data2, cpu_online_map)
smp_cross_call_masked(func, ctx, data1, data2, &cpu_online_map)

void smp_call_function_client(int irq, struct pt_regs *regs)
{
Expand Down Expand Up @@ -1056,7 +1060,7 @@ void smp_flush_tlb_mm(struct mm_struct *mm)

smp_cross_call_masked(&xcall_flush_tlb_mm,
ctx, 0, 0,
mm->cpu_vm_mask);
&mm->cpu_vm_mask);

local_flush_and_out:
__flush_tlb_mm(ctx, SECONDARY_CONTEXT);
Expand All @@ -1074,7 +1078,7 @@ void smp_flush_tlb_pending(struct mm_struct *mm, unsigned long nr, unsigned long
else
smp_cross_call_masked(&xcall_flush_tlb_pending,
ctx, nr, (unsigned long) vaddrs,
mm->cpu_vm_mask);
&mm->cpu_vm_mask);

__flush_tlb_pending(ctx, nr, vaddrs);

Expand Down

0 comments on commit 06b371d

Please sign in to comment.