blob: f5b537967116d151c828eac66b2166b3d5f179eb [file] [log] [blame]
Graf Yang6b3087c2009-01-07 23:14:39 +08001/*
Robin Getz96f10502009-09-24 14:11:24 +00002 * Copyright 2007-2009 Analog Devices Inc.
3 * Philippe Gerum <rpm@xenomai.org>
Graf Yang6b3087c2009-01-07 23:14:39 +08004 *
Robin Getz96f10502009-09-24 14:11:24 +00005 * Licensed under the GPL-2 or later.
Graf Yang6b3087c2009-01-07 23:14:39 +08006 */
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
Graf Yangdbc895f2009-01-07 23:14:39 +080020extern char coreb_trampoline_start, coreb_trampoline_end;
21
Graf Yang6b3087c2009-01-07 23:14:39 +080022struct corelock_slot {
23 int lock;
24};
Graf Yang60ffdb32010-01-20 10:56:24 +000025extern struct corelock_slot corelock;
Graf Yang6b3087c2009-01-07 23:14:39 +080026
Graf Yang718340f2010-02-01 06:07:50 +000027#ifdef __ARCH_SYNC_CORE_ICACHE
28extern unsigned long icache_invld_count[NR_CPUS];
29#endif
30#ifdef __ARCH_SYNC_CORE_DCACHE
31extern unsigned long dcache_invld_count[NR_CPUS];
32#endif
33
Graf Yang6b3087c2009-01-07 23:14:39 +080034void smp_icache_flush_range_others(unsigned long start,
35 unsigned long end);
Graf Yang0b39db22009-12-28 11:13:51 +000036#ifdef CONFIG_HOTPLUG_CPU
37void coreb_sleep(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
38void cpu_die(void);
39void platform_cpu_die(void);
40int __cpu_disable(void);
41int __cpu_die(unsigned int cpu);
42#endif
Graf Yang6b3087c2009-01-07 23:14:39 +080043
44#endif /* !__ASM_BLACKFIN_SMP_H */