cputable.c (0337966d121ebebf73a1c346123e8112796e684e) | cputable.c (5a61ef74f269f2573f48fa53607a8911216c3326) |
---|---|
1/* 2 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) 3 * 4 * Modifications for ppc64: 5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 9 unchanged lines hidden (view full) --- 18#include <linux/jump_label.h> 19 20#include <asm/oprofile_impl.h> 21#include <asm/cputable.h> 22#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */ 23#include <asm/mmu.h> 24#include <asm/setup.h> 25 | 1/* 2 * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org) 3 * 4 * Modifications for ppc64: 5 * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 9 unchanged lines hidden (view full) --- 18#include <linux/jump_label.h> 19 20#include <asm/oprofile_impl.h> 21#include <asm/cputable.h> 22#include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */ 23#include <asm/mmu.h> 24#include <asm/setup.h> 25 |
26struct cpu_spec* cur_cpu_spec = NULL; | 26static struct cpu_spec the_cpu_spec __read_mostly; 27 28struct cpu_spec* cur_cpu_spec __read_mostly = NULL; |
27EXPORT_SYMBOL(cur_cpu_spec); 28 29/* The platform string corresponding to the real PVR */ 30const char *powerpc_base_platform; 31 32/* NOTE: 33 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's 34 * the responsibility of the appropriate CPU save/restore functions to --- 2139 unchanged lines hidden (view full) --- 2174 .dcache_bsize = 32, 2175 .machine_check = machine_check_e500, 2176 .platform = "powerpc", 2177 } 2178#endif /* CONFIG_PPC32 */ 2179#endif /* CONFIG_E500 */ 2180}; 2181 | 29EXPORT_SYMBOL(cur_cpu_spec); 30 31/* The platform string corresponding to the real PVR */ 32const char *powerpc_base_platform; 33 34/* NOTE: 35 * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's 36 * the responsibility of the appropriate CPU save/restore functions to --- 2139 unchanged lines hidden (view full) --- 2176 .dcache_bsize = 32, 2177 .machine_check = machine_check_e500, 2178 .platform = "powerpc", 2179 } 2180#endif /* CONFIG_PPC32 */ 2181#endif /* CONFIG_E500 */ 2182}; 2183 |
2182static struct cpu_spec the_cpu_spec; | 2184void __init set_cur_cpu_spec(struct cpu_spec *s) 2185{ 2186 struct cpu_spec *t = &the_cpu_spec; |
2183 | 2187 |
2188 t = PTRRELOC(t); 2189 *t = *s; 2190 2191 *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; 2192} 2193 |
|
2184static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, 2185 struct cpu_spec *s) 2186{ 2187 struct cpu_spec *t = &the_cpu_spec; 2188 struct cpu_spec old; 2189 2190 t = PTRRELOC(t); 2191 old = *t; --- 69 unchanged lines hidden (view full) --- 2261 return setup_cpu_spec(offset, s); 2262 } 2263 2264 BUG(); 2265 2266 return NULL; 2267} 2268 | 2194static struct cpu_spec * __init setup_cpu_spec(unsigned long offset, 2195 struct cpu_spec *s) 2196{ 2197 struct cpu_spec *t = &the_cpu_spec; 2198 struct cpu_spec old; 2199 2200 t = PTRRELOC(t); 2201 old = *t; --- 69 unchanged lines hidden (view full) --- 2271 return setup_cpu_spec(offset, s); 2272 } 2273 2274 BUG(); 2275 2276 return NULL; 2277} 2278 |
2279/* 2280 * Used by cpufeatures to get the name for CPUs with a PVR table. 2281 * If they don't hae a PVR table, cpufeatures gets the name from 2282 * cpu device-tree node. 2283 */ 2284void __init identify_cpu_name(unsigned int pvr) 2285{ 2286 struct cpu_spec *s = cpu_specs; 2287 struct cpu_spec *t = &the_cpu_spec; 2288 int i; 2289 2290 s = PTRRELOC(s); 2291 t = PTRRELOC(t); 2292 2293 for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) { 2294 if ((pvr & s->pvr_mask) == s->pvr_value) { 2295 t->cpu_name = s->cpu_name; 2296 return; 2297 } 2298 } 2299} 2300 2301 |
|
2269#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS 2270struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = { 2271 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT 2272}; 2273EXPORT_SYMBOL_GPL(cpu_feature_keys); 2274 2275void __init cpu_feature_keys_init(void) 2276{ --- 27 unchanged lines hidden --- | 2302#ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS 2303struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = { 2304 [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT 2305}; 2306EXPORT_SYMBOL_GPL(cpu_feature_keys); 2307 2308void __init cpu_feature_keys_init(void) 2309{ --- 27 unchanged lines hidden --- |