Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188444
b: refs/heads/master
c: c9784eb
h: refs/heads/master
v: v3
  • Loading branch information
Yi Li authored and Mike Frysinger committed Mar 9, 2010
1 parent f2f76e6 commit cc44ba9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 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: 3630ac34b0ab346ff0910401dbed7af624be7027
refs/heads/master: c9784ebb23be1e2ef23f537d6df04e0ea0206802
26 changes: 24 additions & 2 deletions trunk/arch/blackfin/mach-common/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,17 @@ static void ipi_call_function(unsigned int cpu, struct ipi_message *msg)
wait = msg->call_struct.wait;
cpu_clear(cpu, msg->call_struct.pending);
func(info);
if (wait)
if (wait) {
#ifdef __ARCH_SYNC_CORE_DCACHE
/*
* 'wait' usually means synchronization between CPUs.
* Invalidate D cache in case shared data was changed
* by func() to ensure cache coherence.
*/
resync_core_dcache();
#endif
cpu_clear(cpu, msg->call_struct.waitmask);
else
} else
kfree(msg);
}

Expand Down Expand Up @@ -219,6 +227,13 @@ int smp_call_function(void (*func)(void *info), void *info, int wait)
blackfin_dcache_invalidate_range(
(unsigned long)(&msg->call_struct.waitmask),
(unsigned long)(&msg->call_struct.waitmask));
#ifdef __ARCH_SYNC_CORE_DCACHE
/*
* Invalidate D cache in case shared data was changed by
* other processors to ensure cache coherence.
*/
resync_core_dcache();
#endif
kfree(msg);
}
return 0;
Expand Down Expand Up @@ -261,6 +276,13 @@ int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
blackfin_dcache_invalidate_range(
(unsigned long)(&msg->call_struct.waitmask),
(unsigned long)(&msg->call_struct.waitmask));
#ifdef __ARCH_SYNC_CORE_DCACHE
/*
* Invalidate D cache in case shared data was changed by
* other processors to ensure cache coherence.
*/
resync_core_dcache();
#endif
kfree(msg);
}
return 0;
Expand Down

0 comments on commit cc44ba9

Please sign in to comment.