smp.h 857 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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/bitops.h>
  13. #include <linux/cpumask.h>
  14. #ifdef CONFIG_SMP
  15. #include <asm/spinlock.h>
  16. #include <asm/atomic.h>
  17. #include <asm/current.h>
  18. #define raw_smp_processor_id() (current_thread_info()->cpu)
  19. /* I've no idea what the real meaning of this is */
  20. #define PROC_CHANGE_PENALTY 20
  21. #define NO_PROC_ID (-1)
  22. struct smp_fn_call_struct {
  23. spinlock_t lock;
  24. atomic_t finished;
  25. void (*fn)(void *);
  26. void *data;
  27. };
  28. extern struct smp_fn_call_struct smp_fn_call;
  29. #define SMP_MSG_RESCHEDULE 0x0001
  30. #endif /* CONFIG_SMP */
  31. #endif /* __ASM_SH_SMP_H */