smp.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. extern void arch_send_call_function_single_ipi(int cpu);
  18. extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
  19. #if defined(CONFIG_SMP) && defined(CONFIG_ICACHE_FLUSH_L1)
  20. asmlinkage void blackfin_icache_flush_range_l1(unsigned long *ptr);
  21. extern unsigned long blackfin_iflush_l1_entry[NR_CPUS];
  22. #endif
  23. struct corelock_slot {
  24. int lock;
  25. };
  26. extern struct corelock_slot corelock;
  27. #ifdef __ARCH_SYNC_CORE_ICACHE
  28. extern unsigned long icache_invld_count[NR_CPUS];
  29. #endif
  30. #ifdef __ARCH_SYNC_CORE_DCACHE
  31. extern unsigned long dcache_invld_count[NR_CPUS];
  32. #endif
  33. void smp_icache_flush_range_others(unsigned long start,
  34. unsigned long end);
  35. #ifdef CONFIG_HOTPLUG_CPU
  36. void coreb_die(void);
  37. void cpu_die(void);
  38. void platform_cpu_die(void);
  39. int __cpu_disable(void);
  40. int __cpu_die(unsigned int cpu);
  41. #endif
  42. void smp_timer_broadcast(const struct cpumask *mask);
  43. #endif /* !__ASM_BLACKFIN_SMP_H */