smp.h 1009 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * include/asm-sh/smp.h
  3. *
  4. * Copyright (C) 2002, 2003 Paul Mundt
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive for
  8. * more details.
  9. */
  10. #ifndef __ASM_SH_SMP_H
  11. #define __ASM_SH_SMP_H
  12. #include <linux/config.h>
  13. #include <linux/bitops.h>
  14. #include <linux/cpumask.h>
  15. #ifdef CONFIG_SMP
  16. #include <asm/spinlock.h>
  17. #include <asm/atomic.h>
  18. #include <asm/current.h>
  19. extern cpumask_t cpu_online_map;
  20. extern cpumask_t cpu_possible_map;
  21. #define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
  22. #define raw_smp_processor_id() (current_thread_info()->cpu)
  23. /* I've no idea what the real meaning of this is */
  24. #define PROC_CHANGE_PENALTY 20
  25. #define NO_PROC_ID (-1)
  26. struct smp_fn_call_struct {
  27. spinlock_t lock;
  28. atomic_t finished;
  29. void (*fn)(void *);
  30. void *data;
  31. };
  32. extern struct smp_fn_call_struct smp_fn_call;
  33. #define SMP_MSG_RESCHEDULE 0x0001
  34. #endif /* CONFIG_SMP */
  35. #endif /* __ASM_SH_SMP_H */