Ralf Baechle | 0ab7aef | 2007-03-02 20:42:04 +0000 | [diff] [blame] | 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | #include <topology.h> |
Huacai Chen | dc57870 | 2014-08-26 14:41:31 +0800 | [diff] [blame] | 12 | #include <linux/smp.h> |
| 13 | |
| 14 | #ifdef CONFIG_SMP |
| 15 | #define topology_physical_package_id(cpu) (cpu_data[cpu].package) |
| 16 | #define topology_core_id(cpu) (cpu_data[cpu].core) |
| 17 | #define topology_core_cpumask(cpu) (&cpu_core_map[cpu]) |
Bartosz Golaszewski | 06931e6 | 2015-05-26 15:11:28 +0200 | [diff] [blame] | 18 | #define topology_sibling_cpumask(cpu) (&cpu_sibling_map[cpu]) |
Huacai Chen | dc57870 | 2014-08-26 14:41:31 +0800 | [diff] [blame] | 19 | #endif |
Ralf Baechle | 0ab7aef | 2007-03-02 20:42:04 +0000 | [diff] [blame] | 20 | |
Ralf Baechle | 0ab7aef | 2007-03-02 20:42:04 +0000 | [diff] [blame] | 21 | #endif /* __ASM_TOPOLOGY_H */ |