Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107637
b: refs/heads/master
c: ae58388
h: refs/heads/master
i:
  107635: b34cb0d
v: v3
  • Loading branch information
David S. Miller committed Aug 4, 2008
1 parent 0bace92 commit 9c4cb9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 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: ed4d9c66eb941a416c8cb9a0138c69d46d82fc4f
refs/heads/master: ae583885bfd07474789059cdef399289bd66c8d0
33 changes: 9 additions & 24 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,21 +787,17 @@ static void xcall_deliver(u64 data0, u64 data1, u64 data2, const cpumask_t *mask
* 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, const cpumask_t *mask_p)
static void smp_cross_call_masked(unsigned long *func, u32 ctx, u64 data1, u64 data2, const cpumask_t *mask)
{
u64 data0 = (((u64)ctx)<<32 | (((u64)func) & 0xffffffff));
int this_cpu = get_cpu();
cpumask_t mask;

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);
/* NOTE: Caller runs local copy on master. */
xcall_deliver(data0, data1, data2, mask);
}

put_cpu();
/* Send cross call to all processors except self. */
static void smp_cross_call(unsigned long *func, u32 ctx, u64 data1, u64 data2)
{
smp_cross_call_masked(func, ctx, data1, data2, &cpu_online_map);
}

extern unsigned long xcall_sync_tick;
Expand All @@ -827,10 +823,6 @@ void arch_send_call_function_single_ipi(int cpu)
&cpumask_of_cpu(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)

void smp_call_function_client(int irq, struct pt_regs *regs)
{
clear_softint(1 << irq);
Expand Down Expand Up @@ -900,7 +892,6 @@ static inline void __local_flush_dcache_page(struct page *page)

void smp_flush_dcache_page_impl(struct page *page, int cpu)
{
cpumask_t mask = cpumask_of_cpu(cpu);
int this_cpu;

if (tlb_type == hypervisor)
Expand Down Expand Up @@ -929,7 +920,7 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu)
}
if (data0) {
xcall_deliver(data0, __pa(pg_addr),
(u64) pg_addr, &mask);
(u64) pg_addr, &cpumask_of_cpu(cpu));
#ifdef CONFIG_DEBUG_DCFLUSH
atomic_inc(&dcpage_flushes_xcall);
#endif
Expand All @@ -941,7 +932,6 @@ void smp_flush_dcache_page_impl(struct page *page, int cpu)

void flush_dcache_page_all(struct mm_struct *mm, struct page *page)
{
cpumask_t mask = cpu_online_map;
void *pg_addr;
int this_cpu;
u64 data0;
Expand All @@ -951,13 +941,9 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page)

this_cpu = get_cpu();

cpu_clear(this_cpu, mask);

#ifdef CONFIG_DEBUG_DCFLUSH
atomic_inc(&dcpage_flushes);
#endif
if (cpus_empty(mask))
goto flush_self;
data0 = 0;
pg_addr = page_address(page);
if (tlb_type == spitfire) {
Expand All @@ -971,12 +957,11 @@ void flush_dcache_page_all(struct mm_struct *mm, struct page *page)
}
if (data0) {
xcall_deliver(data0, __pa(pg_addr),
(u64) pg_addr, &mask);
(u64) pg_addr, &cpu_online_map);
#ifdef CONFIG_DEBUG_DCFLUSH
atomic_inc(&dcpage_flushes_xcall);
#endif
}
flush_self:
__local_flush_dcache_page(page);

put_cpu();
Expand Down

0 comments on commit 9c4cb9b

Please sign in to comment.