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); |
Steven Miao | 5088846 | 2012-07-31 17:28:10 +0800 | [diff] [blame] | 21 | extern void arch_send_call_function_single_ipi(int cpu); |
| 22 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
Sonic Zhang | c6345ab | 2010-08-05 07:49:26 +0000 | [diff] [blame] | 23 | |
| 24 | #if defined(CONFIG_SMP) && defined(CONFIG_ICACHE_FLUSH_L1) |
| 25 | asmlinkage void blackfin_icache_flush_range_l1(unsigned long *ptr); |
| 26 | extern unsigned long blackfin_iflush_l1_entry[NR_CPUS]; |
| 27 | #endif |
Graf Yang | dbc895f | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 28 | |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 29 | struct corelock_slot { |
| 30 | int lock; |
| 31 | }; |
Graf Yang | 60ffdb3 | 2010-01-20 10:56:24 +0000 | [diff] [blame] | 32 | extern struct corelock_slot corelock; |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 33 | |
Graf Yang | 718340f | 2010-02-01 06:07:50 +0000 | [diff] [blame] | 34 | #ifdef __ARCH_SYNC_CORE_ICACHE |
| 35 | extern unsigned long icache_invld_count[NR_CPUS]; |
| 36 | #endif |
| 37 | #ifdef __ARCH_SYNC_CORE_DCACHE |
| 38 | extern unsigned long dcache_invld_count[NR_CPUS]; |
| 39 | #endif |
| 40 | |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 41 | void smp_icache_flush_range_others(unsigned long start, |
Bob Liu | d0014be | 2011-12-12 11:04:05 +0800 | [diff] [blame] | 42 | unsigned long end); |
Graf Yang | 0b39db2 | 2009-12-28 11:13:51 +0000 | [diff] [blame] | 43 | #ifdef CONFIG_HOTPLUG_CPU |
Graf Yang | 6f546bc | 2010-01-28 10:46:55 +0000 | [diff] [blame] | 44 | void coreb_die(void); |
Graf Yang | 0b39db2 | 2009-12-28 11:13:51 +0000 | [diff] [blame] | 45 | void cpu_die(void); |
| 46 | void platform_cpu_die(void); |
| 47 | int __cpu_disable(void); |
| 48 | int __cpu_die(unsigned int cpu); |
| 49 | #endif |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 50 | |
Bob Liu | d0014be | 2011-12-12 11:04:05 +0800 | [diff] [blame] | 51 | void smp_timer_broadcast(const struct cpumask *mask); |
| 52 | |
| 53 | |
Graf Yang | 6b3087c | 2009-01-07 23:14:39 +0800 | [diff] [blame] | 54 | #endif /* !__ASM_BLACKFIN_SMP_H */ |