topology.h 613 B

12345678910111213141516171819202122
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2007 by Ralf Baechle
  7. */
  8. #ifndef __ASM_TOPOLOGY_H
  9. #define __ASM_TOPOLOGY_H
  10. #include <topology.h>
  11. #include <linux/smp.h>
  12. #ifdef CONFIG_SMP
  13. #define topology_physical_package_id(cpu) (cpu_data[cpu].package)
  14. #define topology_core_id(cpu) (cpu_data[cpu].core)
  15. #define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
  16. #define topology_sibling_cpumask(cpu) (&cpu_sibling_map[cpu])
  17. #endif
  18. #endif /* __ASM_TOPOLOGY_H */