Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 1 | /* |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 2 | * Copyright 2007-2009 Analog Devices Inc. |
| 3 | * Philippe Gerum <rpm@xenomai.org> |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 4 | * |
Robin Getz | 96f1050 | 2009-09-24 14:11:24 +0000 | [diff] [blame] | 5 | * Licensed under the GPL-2 or later. |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef __ASM_BLACKFIN_SMP_H |
| 9 | #define __ASM_BLACKFIN_SMP_H |
| 10 | |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/threads.h> |
| 13 | #include <linux/cpumask.h> |
| 14 | #include <linux/cache.h> |
| 15 | #include <asm/blackfin.h> |
| 16 | #include <mach/smp.h> |
| 17 | |
| 18 | #define raw_smp_processor_id() blackfin_core_id() |
| 19 | |
Sonic Zhang | c6345ab | 2010-08-05 07:49:26 +0000 | [diff] [blame] | 20 | extern void bfin_relocate_coreb_l1_mem(void); |
| 21 | |
| 22 | #if defined(CONFIG_SMP) && defined(CONFIG_ICACHE_FLUSH_L1) |
| 23 | asmlinkage void blackfin_icache_flush_range_l1(unsigned long *ptr); |
| 24 | extern unsigned long blackfin_iflush_l1_entry[NR_CPUS]; |
| 25 | #endif |
Graf Yang | dbc895f | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 26 | |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 27 | struct corelock_slot { |
| 28 | int lock; |
| 29 | }; |
Graf Yang | 60ffdb3 | 2010-01-20 10:56:24 +0000 | [diff] [blame] | 30 | extern struct corelock_slot corelock; |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 31 | |
Graf Yang | 718340f | 2010-02-01 06:07:50 +0000 | [diff] [blame] | 32 | #ifdef __ARCH_SYNC_CORE_ICACHE |
| 33 | extern unsigned long icache_invld_count[NR_CPUS]; |
| 34 | #endif |
| 35 | #ifdef __ARCH_SYNC_CORE_DCACHE |
| 36 | extern unsigned long dcache_invld_count[NR_CPUS]; |
| 37 | #endif |
| 38 | |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 39 | void smp_icache_flush_range_others(unsigned long start, |
| 40 | unsigned long end); |
Graf Yang | 0b39db2 | 2009-12-28 11:13:51 +0000 | [diff] [blame] | 41 | #ifdef CONFIG_HOTPLUG_CPU |
Graf Yang | 6f546bc | 2010-01-28 10:46:55 +0000 | [diff] [blame] | 42 | void coreb_die(void); |
Graf Yang | 0b39db2 | 2009-12-28 11:13:51 +0000 | [diff] [blame] | 43 | void cpu_die(void); |
| 44 | void platform_cpu_die(void); |
| 45 | int __cpu_disable(void); |
| 46 | int __cpu_die(unsigned int cpu); |
| 47 | #endif |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 48 | |
| 49 | #endif /* !__ASM_BLACKFIN_SMP_H */ |