smp.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Copyright 2007-2009 Analog Devices Inc.
  3. * Philippe Gerum <rpm@xenomai.org>
  4. *
  5. * Licensed under the GPL-2 or later.
  6. */
  7. #ifndef __ASM_BLACKFIN_SMP_H
  8. #define __ASM_BLACKFIN_SMP_H
  9. #include <linux/kernel.h>
  10. #include <linux/threads.h>
  11. #include <linux/cpumask.h>
  12. #include <linux/cache.h>
  13. #include <asm/blackfin.h>
  14. #include <mach/smp.h>
  15. #define raw_smp_processor_id() blackfin_core_id()
  16. extern void bfin_relocate_coreb_l1_mem(void);
  17. #if defined(CONFIG_SMP) && defined(CONFIG_ICACHE_FLUSH_L1)
  18. asmlinkage void blackfin_icache_flush_range_l1(unsigned long *ptr);
  19. extern unsigned long blackfin_iflush_l1_entry[NR_CPUS];
  20. #endif
  21. struct corelock_slot {
  22. int lock;
  23. };
  24. extern struct corelock_slot corelock;
  25. #ifdef __ARCH_SYNC_CORE_ICACHE
  26. extern unsigned long icache_invld_count[NR_CPUS];
  27. #endif
  28. #ifdef __ARCH_SYNC_CORE_DCACHE
  29. extern unsigned long dcache_invld_count[NR_CPUS];
  30. #endif
  31. void smp_icache_flush_range_others(unsigned long start,
  32. unsigned long end);
  33. #ifdef CONFIG_HOTPLUG_CPU
  34. void coreb_die(void);
  35. void cpu_die(void);
  36. void platform_cpu_die(void);
  37. int __cpu_disable(void);
  38. int __cpu_die(unsigned int cpu);
  39. #endif
  40. void smp_timer_broadcast(const struct cpumask *mask);
  41. #endif /* !__ASM_BLACKFIN_SMP_H */