cpu.h 725 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _ASM_X86_CPU_H
  2. #define _ASM_X86_CPU_H
  3. #include <linux/device.h>
  4. #include <linux/cpu.h>
  5. #include <linux/topology.h>
  6. #include <linux/nodemask.h>
  7. #include <linux/percpu.h>
  8. #ifdef CONFIG_SMP
  9. extern void prefill_possible_map(void);
  10. #else /* CONFIG_SMP */
  11. static inline void prefill_possible_map(void) {}
  12. #define cpu_physical_id(cpu) boot_cpu_physical_apicid
  13. #define safe_smp_processor_id() 0
  14. #define stack_smp_processor_id() 0
  15. #endif /* CONFIG_SMP */
  16. struct x86_cpu {
  17. struct cpu cpu;
  18. };
  19. #ifdef CONFIG_HOTPLUG_CPU
  20. extern int arch_register_cpu(int num);
  21. extern void arch_unregister_cpu(int);
  22. #endif
  23. DECLARE_PER_CPU(int, cpu_state);
  24. int mwait_usable(const struct cpuinfo_x86 *);
  25. #endif /* _ASM_X86_CPU_H */