blob: 0673d2d0f2e6dd02ed14d650e5af7b8a3c162b6f [file] [log] [blame]
Ralf Baechle0ab7aef2007-03-02 20:42:04 +00001/*
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 Torvalds1da177e2005-04-16 15:20:36 -070011#include <topology.h>
Huacai Chendc578702014-08-26 14:41:31 +080012#include <linux/smp.h>
13
14#ifdef CONFIG_SMP
15#define topology_physical_package_id(cpu) (cpu_data[cpu].package)
Paul Burtonf875a8322017-08-12 19:49:35 -070016#define topology_core_id(cpu) (cpu_core(&cpu_data[cpu]))
Huacai Chendc578702014-08-26 14:41:31 +080017#define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
Bartosz Golaszewski06931e62015-05-26 15:11:28 +020018#define topology_sibling_cpumask(cpu) (&cpu_sibling_map[cpu])
Huacai Chendc578702014-08-26 14:41:31 +080019#endif
Ralf Baechle0ab7aef2007-03-02 20:42:04 +000020
Ralf Baechle0ab7aef2007-03-02 20:42:04 +000021#endif /* __ASM_TOPOLOGY_H */