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
6 * Copyright (C) 2003, 2004 Ralf Baechle
7 * Copyright (C) 2004 Maciej W. Rozycki
9 #ifndef __ASM_CPU_TYPE_H
10 #define __ASM_CPU_TYPE_H
12 #include <linux/smp.h>
13 #include <linux/compiler.h>
15 static inline int __pure __get_cpu_type(const int cpu_type)
18 #if defined(CONFIG_SYS_HAS_CPU_LOONGSON2E) || \
19 defined(CONFIG_SYS_HAS_CPU_LOONGSON2F)
23 #ifdef CONFIG_SYS_HAS_CPU_LOONGSON1B
27 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R1
37 #if defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) || \
38 defined(CONFIG_SYS_HAS_CPU_MIPS32_R2)
42 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R2
52 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R1
61 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R2
63 * All MIPS64 R2 processors have their own special symbols. That is,
64 * there currently is no pure R2 core
68 #ifdef CONFIG_SYS_HAS_CPU_R3000
79 #ifdef CONFIG_SYS_HAS_CPU_TX39XX
85 #ifdef CONFIG_SYS_HAS_CPU_VR41XX
96 #ifdef CONFIG_SYS_HAS_CPU_R4300
101 #ifdef CONFIG_SYS_HAS_CPU_R4X00
115 #ifdef CONFIG_SYS_HAS_CPU_TX49XX
119 #ifdef CONFIG_SYS_HAS_CPU_R5000
123 #ifdef CONFIG_SYS_HAS_CPU_R5432
127 #ifdef CONFIG_SYS_HAS_CPU_R5500
131 #ifdef CONFIG_SYS_HAS_CPU_R6000
136 #ifdef CONFIG_SYS_HAS_CPU_NEVADA
140 #ifdef CONFIG_SYS_HAS_CPU_R8000
144 #ifdef CONFIG_SYS_HAS_CPU_R10000
149 #ifdef CONFIG_SYS_HAS_CPU_RM7000
153 #ifdef CONFIG_SYS_HAS_CPU_RM9000
156 #ifdef CONFIG_SYS_HAS_CPU_SB1
160 #ifdef CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON
161 case CPU_CAVIUM_OCTEON:
162 case CPU_CAVIUM_OCTEON_PLUS:
163 case CPU_CAVIUM_OCTEON2:
166 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4380
170 #ifdef CONFIG_SYS_HAS_CPU_BMIPS5000
174 #ifdef CONFIG_SYS_HAS_CPU_XLP
178 #ifdef CONFIG_SYS_HAS_CPU_XLR
189 static inline int __pure current_cpu_type(void)
191 const int cpu_type = current_cpu_data.cputype;
193 return __get_cpu_type(cpu_type);
196 static inline int __pure boot_cpu_type(void)
198 const int cpu_type = cpu_data[0].cputype;
200 return __get_cpu_type(cpu_type);
203 #endif /* __ASM_CPU_TYPE_H */