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_LOONGSON3
27 #ifdef CONFIG_SYS_HAS_CPU_LOONGSON1B
31 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R1
38 #if defined(CONFIG_SYS_HAS_CPU_MIPS32_R1) || \
39 defined(CONFIG_SYS_HAS_CPU_MIPS32_R2)
43 #ifdef CONFIG_SYS_HAS_CPU_MIPS32_R2
57 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R1
66 #ifdef CONFIG_SYS_HAS_CPU_MIPS64_R2
68 * All MIPS64 R2 processors have their own special symbols. That is,
69 * there currently is no pure R2 core
73 #ifdef CONFIG_SYS_HAS_CPU_R3000
84 #ifdef CONFIG_SYS_HAS_CPU_TX39XX
90 #ifdef CONFIG_SYS_HAS_CPU_VR41XX
101 #ifdef CONFIG_SYS_HAS_CPU_R4300
106 #ifdef CONFIG_SYS_HAS_CPU_R4X00
120 #ifdef CONFIG_SYS_HAS_CPU_TX49XX
124 #ifdef CONFIG_SYS_HAS_CPU_R5000
128 #ifdef CONFIG_SYS_HAS_CPU_R5432
132 #ifdef CONFIG_SYS_HAS_CPU_R5500
136 #ifdef CONFIG_SYS_HAS_CPU_R6000
141 #ifdef CONFIG_SYS_HAS_CPU_NEVADA
145 #ifdef CONFIG_SYS_HAS_CPU_R8000
149 #ifdef CONFIG_SYS_HAS_CPU_R10000
154 #ifdef CONFIG_SYS_HAS_CPU_RM7000
158 #ifdef CONFIG_SYS_HAS_CPU_RM9000
161 #ifdef CONFIG_SYS_HAS_CPU_SB1
165 #ifdef CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON
166 case CPU_CAVIUM_OCTEON:
167 case CPU_CAVIUM_OCTEON_PLUS:
168 case CPU_CAVIUM_OCTEON2:
171 #if defined(CONFIG_SYS_HAS_CPU_BMIPS32_3300) || \
172 defined (CONFIG_SYS_HAS_CPU_MIPS32_R1)
177 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4350
181 #ifdef CONFIG_SYS_HAS_CPU_BMIPS4380
185 #ifdef CONFIG_SYS_HAS_CPU_BMIPS5000
189 #ifdef CONFIG_SYS_HAS_CPU_XLP
193 #ifdef CONFIG_SYS_HAS_CPU_XLR
204 static inline int __pure current_cpu_type(void)
206 const int cpu_type = current_cpu_data.cputype;
208 return __get_cpu_type(cpu_type);
211 static inline int __pure boot_cpu_type(void)
213 const int cpu_type = cpu_data[0].cputype;
215 return __get_cpu_type(cpu_type);
218 #endif /* __ASM_CPU_TYPE_H */