2009-01-07 23:14:39 +08:00
/*
2009-09-24 14:11:24 +00:00
* Copyright 2007 - 2009 Analog Devices Inc .
* Philippe Gerum < rpm @ xenomai . org >
2009-01-07 23:14:39 +08:00
*
2009-09-24 14:11:24 +00:00
* Licensed under the GPL - 2 or later .
2009-01-07 23:14:39 +08:00
*/
# ifndef __ASM_BLACKFIN_SMP_H
# define __ASM_BLACKFIN_SMP_H
# include <linux/kernel.h>
# include <linux/threads.h>
# include <linux/cpumask.h>
# include <linux/cache.h>
# include <asm/blackfin.h>
# include <mach/smp.h>
# define raw_smp_processor_id() blackfin_core_id()
2010-08-05 07:49:26 +00:00
extern void bfin_relocate_coreb_l1_mem ( void ) ;
2012-07-31 17:28:10 +08:00
extern void arch_send_call_function_single_ipi ( int cpu ) ;
extern void arch_send_call_function_ipi_mask ( const struct cpumask * mask ) ;
2010-08-05 07:49:26 +00:00
# if defined(CONFIG_SMP) && defined(CONFIG_ICACHE_FLUSH_L1)
asmlinkage void blackfin_icache_flush_range_l1 ( unsigned long * ptr ) ;
extern unsigned long blackfin_iflush_l1_entry [ NR_CPUS ] ;
# endif
2009-01-07 23:14:39 +08:00
2009-01-07 23:14:39 +08:00
struct corelock_slot {
int lock ;
} ;
2010-01-20 10:56:24 +00:00
extern struct corelock_slot corelock ;
2009-01-07 23:14:39 +08:00
2010-02-01 06:07:50 +00:00
# ifdef __ARCH_SYNC_CORE_ICACHE
extern unsigned long icache_invld_count [ NR_CPUS ] ;
# endif
# ifdef __ARCH_SYNC_CORE_DCACHE
extern unsigned long dcache_invld_count [ NR_CPUS ] ;
# endif
2009-01-07 23:14:39 +08:00
void smp_icache_flush_range_others ( unsigned long start ,
2011-12-12 11:04:05 +08:00
unsigned long end ) ;
2009-12-28 11:13:51 +00:00
# ifdef CONFIG_HOTPLUG_CPU
2010-01-28 10:46:55 +00:00
void coreb_die ( void ) ;
2009-12-28 11:13:51 +00:00
void cpu_die ( void ) ;
void platform_cpu_die ( void ) ;
int __cpu_disable ( void ) ;
int __cpu_die ( unsigned int cpu ) ;
# endif
2009-01-07 23:14:39 +08:00
2011-12-12 11:04:05 +08:00
void smp_timer_broadcast ( const struct cpumask * mask ) ;
2009-01-07 23:14:39 +08:00
# endif /* !__ASM_BLACKFIN_SMP_H */