smp.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 char coreb_trampoline_start, coreb_trampoline_end;
  17. struct corelock_slot {
  18. int lock;
  19. };
  20. extern struct corelock_slot corelock;
  21. #ifdef __ARCH_SYNC_CORE_ICACHE
  22. extern unsigned long icache_invld_count[NR_CPUS];
  23. #endif
  24. #ifdef __ARCH_SYNC_CORE_DCACHE
  25. extern unsigned long dcache_invld_count[NR_CPUS];
  26. #endif
  27. void smp_icache_flush_range_others(unsigned long start,
  28. unsigned long end);
  29. #ifdef CONFIG_HOTPLUG_CPU
  30. void coreb_sleep(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
  31. void cpu_die(void);
  32. void platform_cpu_die(void);
  33. int __cpu_disable(void);
  34. int __cpu_die(unsigned int cpu);
  35. #endif
  36. #endif /* !__ASM_BLACKFIN_SMP_H */