Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * arch/sh/kernel/cpu/init.c |
| 3 | * |
| 4 | * CPU init code |
| 5 | * |
Paul Mundt | 7dd6662 | 2009-08-15 07:43:21 +0900 | [diff] [blame] | 6 | * Copyright (C) 2002 - 2009 Paul Mundt |
Richard Curnow | b638d0b | 2006-09-27 14:09:26 +0900 | [diff] [blame] | 7 | * Copyright (C) 2003 Richard Curnow |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | * |
| 9 | * This file is subject to the terms and conditions of the GNU General Public |
| 10 | * License. See the file "COPYING" in the main directory of this archive |
| 11 | * for more details. |
| 12 | */ |
| 13 | #include <linux/init.h> |
| 14 | #include <linux/kernel.h> |
Paul Mundt | aec5e0e | 2006-12-25 09:51:47 +0900 | [diff] [blame] | 15 | #include <linux/mm.h> |
Paul Mundt | cd01204 | 2007-12-10 15:50:28 +0900 | [diff] [blame] | 16 | #include <linux/log2.h> |
Paul Mundt | aec5e0e | 2006-12-25 09:51:47 +0900 | [diff] [blame] | 17 | #include <asm/mmu_context.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | #include <asm/processor.h> |
| 19 | #include <asm/uaccess.h> |
Paul Mundt | f3c2575 | 2006-09-27 18:36:17 +0900 | [diff] [blame] | 20 | #include <asm/page.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include <asm/system.h> |
| 22 | #include <asm/cacheflush.h> |
| 23 | #include <asm/cache.h> |
Paul Mundt | cd01204 | 2007-12-10 15:50:28 +0900 | [diff] [blame] | 24 | #include <asm/elf.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | #include <asm/io.h> |
Paul Mundt | aba1030 | 2007-09-21 18:32:32 +0900 | [diff] [blame] | 26 | #include <asm/smp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 28 | #ifdef CONFIG_SH_FPU |
| 29 | #define cpu_has_fpu 1 |
| 30 | #else |
| 31 | #define cpu_has_fpu 0 |
| 32 | #endif |
| 33 | |
| 34 | #ifdef CONFIG_SH_DSP |
| 35 | #define cpu_has_dsp 1 |
| 36 | #else |
| 37 | #define cpu_has_dsp 0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | #endif |
| 39 | |
| 40 | /* |
| 41 | * Generic wrapper for command line arguments to disable on-chip |
| 42 | * peripherals (nofpu, nodsp, and so forth). |
| 43 | */ |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 44 | #define onchip_setup(x) \ |
| 45 | static int x##_disabled __initdata = !cpu_has_##x; \ |
| 46 | \ |
| 47 | static int __init x##_setup(char *opts) \ |
| 48 | { \ |
| 49 | x##_disabled = 1; \ |
| 50 | return 1; \ |
| 51 | } \ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | __setup("no" __stringify(x), x##_setup); |
| 53 | |
| 54 | onchip_setup(fpu); |
| 55 | onchip_setup(dsp); |
| 56 | |
Paul Mundt | 45ed285 | 2007-03-08 18:12:17 +0900 | [diff] [blame] | 57 | #ifdef CONFIG_SPECULATIVE_EXECUTION |
| 58 | #define CPUOPM 0xff2f0000 |
| 59 | #define CPUOPM_RABD (1 << 5) |
| 60 | |
| 61 | static void __init speculative_execution_init(void) |
| 62 | { |
| 63 | /* Clear RABD */ |
Paul Mundt | 9d56dd3 | 2010-01-26 12:58:40 +0900 | [diff] [blame^] | 64 | __raw_writel(__raw_readl(CPUOPM) & ~CPUOPM_RABD, CPUOPM); |
Paul Mundt | 45ed285 | 2007-03-08 18:12:17 +0900 | [diff] [blame] | 65 | |
| 66 | /* Flush the update */ |
Paul Mundt | 9d56dd3 | 2010-01-26 12:58:40 +0900 | [diff] [blame^] | 67 | (void)__raw_readl(CPUOPM); |
Paul Mundt | 45ed285 | 2007-03-08 18:12:17 +0900 | [diff] [blame] | 68 | ctrl_barrier(); |
| 69 | } |
| 70 | #else |
| 71 | #define speculative_execution_init() do { } while (0) |
| 72 | #endif |
| 73 | |
Paul Mundt | 7dd6662 | 2009-08-15 07:43:21 +0900 | [diff] [blame] | 74 | #ifdef CONFIG_CPU_SH4A |
| 75 | #define EXPMASK 0xff2f0004 |
| 76 | #define EXPMASK_RTEDS (1 << 0) |
| 77 | #define EXPMASK_BRDSSLP (1 << 1) |
| 78 | #define EXPMASK_MMCAW (1 << 4) |
| 79 | |
| 80 | static void __init expmask_init(void) |
| 81 | { |
| 82 | unsigned long expmask = __raw_readl(EXPMASK); |
| 83 | |
| 84 | /* |
| 85 | * Future proofing. |
| 86 | * |
Paul Mundt | 6e8a0d1 | 2009-12-04 16:22:11 +0900 | [diff] [blame] | 87 | * Disable support for slottable sleep instruction, non-nop |
| 88 | * instructions in the rte delay slot, and associative writes to |
| 89 | * the memory-mapped cache array. |
Paul Mundt | 7dd6662 | 2009-08-15 07:43:21 +0900 | [diff] [blame] | 90 | */ |
Paul Mundt | 6e8a0d1 | 2009-12-04 16:22:11 +0900 | [diff] [blame] | 91 | expmask &= ~(EXPMASK_RTEDS | EXPMASK_BRDSSLP | EXPMASK_MMCAW); |
Paul Mundt | 7dd6662 | 2009-08-15 07:43:21 +0900 | [diff] [blame] | 92 | |
| 93 | __raw_writel(expmask, EXPMASK); |
| 94 | ctrl_barrier(); |
| 95 | } |
| 96 | #else |
| 97 | #define expmask_init() do { } while (0) |
| 98 | #endif |
| 99 | |
Kuninori Morimoto | fab88d9 | 2009-06-02 02:49:20 +0000 | [diff] [blame] | 100 | /* 2nd-level cache init */ |
Paul Mundt | 2dc2f8e | 2010-01-21 16:05:25 +0900 | [diff] [blame] | 101 | void __attribute__ ((weak)) l2_cache_init(void) |
Kuninori Morimoto | fab88d9 | 2009-06-02 02:49:20 +0000 | [diff] [blame] | 102 | { |
| 103 | } |
| 104 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 105 | /* |
| 106 | * Generic first-level cache init |
| 107 | */ |
Paul Mundt | 27a511c | 2007-11-10 20:25:28 +0900 | [diff] [blame] | 108 | #ifdef CONFIG_SUPERH32 |
Paul Mundt | 2dc2f8e | 2010-01-21 16:05:25 +0900 | [diff] [blame] | 109 | static void cache_init(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | { |
| 111 | unsigned long ccr, flags; |
| 112 | |
Stuart Menefy | cbaa118 | 2007-11-30 17:06:36 +0900 | [diff] [blame] | 113 | jump_to_uncached(); |
Paul Mundt | 9d56dd3 | 2010-01-26 12:58:40 +0900 | [diff] [blame^] | 114 | ccr = __raw_readl(CCR); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | |
| 116 | /* |
Richard Curnow | b638d0b | 2006-09-27 14:09:26 +0900 | [diff] [blame] | 117 | * At this point we don't know whether the cache is enabled or not - a |
| 118 | * bootloader may have enabled it. There are at least 2 things that |
| 119 | * could be dirty in the cache at this point: |
| 120 | * 1. kernel command line set up by boot loader |
| 121 | * 2. spilled registers from the prolog of this function |
| 122 | * => before re-initialising the cache, we must do a purge of the whole |
| 123 | * cache out to memory for safety. As long as nothing is spilled |
| 124 | * during the loop to lines that have already been done, this is safe. |
| 125 | * - RPC |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | */ |
| 127 | if (ccr & CCR_CACHE_ENABLE) { |
| 128 | unsigned long ways, waysize, addrstart; |
| 129 | |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 130 | waysize = current_cpu_data.dcache.sets; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | |
Yoshinori Sato | 9d4436a | 2006-11-05 15:40:13 +0900 | [diff] [blame] | 132 | #ifdef CCR_CACHE_ORA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | /* |
| 134 | * If the OC is already in RAM mode, we only have |
| 135 | * half of the entries to flush.. |
| 136 | */ |
| 137 | if (ccr & CCR_CACHE_ORA) |
| 138 | waysize >>= 1; |
Yoshinori Sato | 9d4436a | 2006-11-05 15:40:13 +0900 | [diff] [blame] | 139 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 141 | waysize <<= current_cpu_data.dcache.entry_shift; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | |
| 143 | #ifdef CCR_CACHE_EMODE |
| 144 | /* If EMODE is not set, we only have 1 way to flush. */ |
| 145 | if (!(ccr & CCR_CACHE_EMODE)) |
| 146 | ways = 1; |
| 147 | else |
| 148 | #endif |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 149 | ways = current_cpu_data.dcache.ways; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 150 | |
| 151 | addrstart = CACHE_OC_ADDRESS_ARRAY; |
| 152 | do { |
| 153 | unsigned long addr; |
| 154 | |
| 155 | for (addr = addrstart; |
| 156 | addr < addrstart + waysize; |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 157 | addr += current_cpu_data.dcache.linesz) |
Paul Mundt | 9d56dd3 | 2010-01-26 12:58:40 +0900 | [diff] [blame^] | 158 | __raw_writel(0, addr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 160 | addrstart += current_cpu_data.dcache.way_incr; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 161 | } while (--ways); |
| 162 | } |
| 163 | |
| 164 | /* |
| 165 | * Default CCR values .. enable the caches |
| 166 | * and invalidate them immediately.. |
| 167 | */ |
| 168 | flags = CCR_CACHE_ENABLE | CCR_CACHE_INVALIDATE; |
| 169 | |
| 170 | #ifdef CCR_CACHE_EMODE |
| 171 | /* Force EMODE if possible */ |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 172 | if (current_cpu_data.dcache.ways > 1) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 173 | flags |= CCR_CACHE_EMODE; |
Richard Curnow | b638d0b | 2006-09-27 14:09:26 +0900 | [diff] [blame] | 174 | else |
| 175 | flags &= ~CCR_CACHE_EMODE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | #endif |
| 177 | |
Paul Mundt | e7bd34a | 2007-07-31 17:07:28 +0900 | [diff] [blame] | 178 | #if defined(CONFIG_CACHE_WRITETHROUGH) |
| 179 | /* Write-through */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 180 | flags |= CCR_CACHE_WT; |
Paul Mundt | e7bd34a | 2007-07-31 17:07:28 +0900 | [diff] [blame] | 181 | #elif defined(CONFIG_CACHE_WRITEBACK) |
| 182 | /* Write-back */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 183 | flags |= CCR_CACHE_CB; |
Paul Mundt | e7bd34a | 2007-07-31 17:07:28 +0900 | [diff] [blame] | 184 | #else |
| 185 | /* Off */ |
| 186 | flags &= ~CCR_CACHE_ENABLE; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | #endif |
| 188 | |
Kuninori Morimoto | fab88d9 | 2009-06-02 02:49:20 +0000 | [diff] [blame] | 189 | l2_cache_init(); |
| 190 | |
Paul Mundt | 9d56dd3 | 2010-01-26 12:58:40 +0900 | [diff] [blame^] | 191 | __raw_writel(flags, CCR); |
Stuart Menefy | cbaa118 | 2007-11-30 17:06:36 +0900 | [diff] [blame] | 192 | back_to_cached(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | } |
Paul Mundt | 27a511c | 2007-11-10 20:25:28 +0900 | [diff] [blame] | 194 | #else |
| 195 | #define cache_init() do { } while (0) |
| 196 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | |
Paul Mundt | cd01204 | 2007-12-10 15:50:28 +0900 | [diff] [blame] | 198 | #define CSHAPE(totalsize, linesize, assoc) \ |
| 199 | ((totalsize & ~0xff) | (linesize << 4) | assoc) |
| 200 | |
| 201 | #define CACHE_DESC_SHAPE(desc) \ |
| 202 | CSHAPE((desc).way_size * (desc).ways, ilog2((desc).linesz), (desc).ways) |
| 203 | |
| 204 | static void detect_cache_shape(void) |
| 205 | { |
| 206 | l1d_cache_shape = CACHE_DESC_SHAPE(current_cpu_data.dcache); |
| 207 | |
| 208 | if (current_cpu_data.dcache.flags & SH_CACHE_COMBINED) |
| 209 | l1i_cache_shape = l1d_cache_shape; |
| 210 | else |
| 211 | l1i_cache_shape = CACHE_DESC_SHAPE(current_cpu_data.icache); |
| 212 | |
| 213 | if (current_cpu_data.flags & CPU_HAS_L2_CACHE) |
| 214 | l2_cache_shape = CACHE_DESC_SHAPE(current_cpu_data.scache); |
| 215 | else |
| 216 | l2_cache_shape = -1; /* No S-cache */ |
| 217 | } |
| 218 | |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 219 | static void __init fpu_init(void) |
| 220 | { |
| 221 | /* Disable the FPU */ |
| 222 | if (fpu_disabled && (current_cpu_data.flags & CPU_HAS_FPU)) { |
| 223 | printk("FPU Disabled\n"); |
| 224 | current_cpu_data.flags &= ~CPU_HAS_FPU; |
| 225 | } |
| 226 | |
| 227 | disable_fpu(); |
| 228 | clear_used_math(); |
| 229 | } |
| 230 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | #ifdef CONFIG_SH_DSP |
| 232 | static void __init release_dsp(void) |
| 233 | { |
| 234 | unsigned long sr; |
| 235 | |
| 236 | /* Clear SR.DSP bit */ |
| 237 | __asm__ __volatile__ ( |
| 238 | "stc\tsr, %0\n\t" |
| 239 | "and\t%1, %0\n\t" |
| 240 | "ldc\t%0, sr\n\t" |
| 241 | : "=&r" (sr) |
| 242 | : "r" (~SR_DSP) |
| 243 | ); |
| 244 | } |
| 245 | |
| 246 | static void __init dsp_init(void) |
| 247 | { |
| 248 | unsigned long sr; |
| 249 | |
| 250 | /* |
| 251 | * Set the SR.DSP bit, wait for one instruction, and then read |
| 252 | * back the SR value. |
| 253 | */ |
| 254 | __asm__ __volatile__ ( |
| 255 | "stc\tsr, %0\n\t" |
| 256 | "or\t%1, %0\n\t" |
| 257 | "ldc\t%0, sr\n\t" |
| 258 | "nop\n\t" |
| 259 | "stc\tsr, %0\n\t" |
| 260 | : "=&r" (sr) |
| 261 | : "r" (SR_DSP) |
| 262 | ); |
| 263 | |
| 264 | /* If the DSP bit is still set, this CPU has a DSP */ |
| 265 | if (sr & SR_DSP) |
Paul Mundt | 11c1965 | 2006-12-25 10:19:56 +0900 | [diff] [blame] | 266 | current_cpu_data.flags |= CPU_HAS_DSP; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 267 | |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 268 | /* Disable the DSP */ |
| 269 | if (dsp_disabled && (current_cpu_data.flags & CPU_HAS_DSP)) { |
| 270 | printk("DSP Disabled\n"); |
| 271 | current_cpu_data.flags &= ~CPU_HAS_DSP; |
| 272 | } |
| 273 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 274 | /* Now that we've determined the DSP status, clear the DSP bit. */ |
| 275 | release_dsp(); |
| 276 | } |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 277 | #else |
| 278 | static inline void __init dsp_init(void) { } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | #endif /* CONFIG_SH_DSP */ |
| 280 | |
| 281 | /** |
| 282 | * sh_cpu_init |
| 283 | * |
Paul Mundt | 7025bec | 2010-01-05 19:16:35 +0900 | [diff] [blame] | 284 | * This is our initial entry point for each CPU, and is invoked on the |
| 285 | * boot CPU prior to calling start_kernel(). For SMP, a combination of |
| 286 | * this and start_secondary() will bring up each processor to a ready |
| 287 | * state prior to hand forking the idle loop. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 288 | * |
Paul Mundt | 7025bec | 2010-01-05 19:16:35 +0900 | [diff] [blame] | 289 | * We do all of the basic processor init here, including setting up |
| 290 | * the caches, FPU, DSP, etc. By the time start_kernel() is hit (and |
| 291 | * subsequently platform_setup()) things like determining the CPU |
| 292 | * subtype and initial configuration will all be done. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 293 | * |
| 294 | * Each processor family is still responsible for doing its own probing |
| 295 | * and cache configuration in detect_cpu_and_cache_system(). |
| 296 | */ |
Paul Mundt | b2839ed | 2008-03-06 12:43:38 +0900 | [diff] [blame] | 297 | asmlinkage void __init sh_cpu_init(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | { |
Paul Mundt | aba1030 | 2007-09-21 18:32:32 +0900 | [diff] [blame] | 299 | current_thread_info()->cpu = hard_smp_processor_id(); |
| 300 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 301 | /* First, probe the CPU */ |
| 302 | detect_cpu_and_cache_system(); |
| 303 | |
Paul Mundt | ffe1b4e | 2007-03-12 16:15:22 +0900 | [diff] [blame] | 304 | if (current_cpu_data.type == CPU_SH_NONE) |
| 305 | panic("Unknown CPU"); |
| 306 | |
Paul Mundt | 27a511c | 2007-11-10 20:25:28 +0900 | [diff] [blame] | 307 | /* First setup the rest of the I-cache info */ |
| 308 | current_cpu_data.icache.entry_mask = current_cpu_data.icache.way_incr - |
| 309 | current_cpu_data.icache.linesz; |
| 310 | |
| 311 | current_cpu_data.icache.way_size = current_cpu_data.icache.sets * |
| 312 | current_cpu_data.icache.linesz; |
| 313 | |
| 314 | /* And the D-cache too */ |
| 315 | current_cpu_data.dcache.entry_mask = current_cpu_data.dcache.way_incr - |
| 316 | current_cpu_data.dcache.linesz; |
| 317 | |
| 318 | current_cpu_data.dcache.way_size = current_cpu_data.dcache.sets * |
| 319 | current_cpu_data.dcache.linesz; |
| 320 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 321 | /* Init the cache */ |
| 322 | cache_init(); |
| 323 | |
Paul Mundt | cd01204 | 2007-12-10 15:50:28 +0900 | [diff] [blame] | 324 | if (raw_smp_processor_id() == 0) { |
Paul Mundt | aba1030 | 2007-09-21 18:32:32 +0900 | [diff] [blame] | 325 | shm_align_mask = max_t(unsigned long, |
| 326 | current_cpu_data.dcache.way_size - 1, |
| 327 | PAGE_SIZE - 1); |
Paul Mundt | f3c2575 | 2006-09-27 18:36:17 +0900 | [diff] [blame] | 328 | |
Paul Mundt | cd01204 | 2007-12-10 15:50:28 +0900 | [diff] [blame] | 329 | /* Boot CPU sets the cache shape */ |
| 330 | detect_cache_shape(); |
| 331 | } |
| 332 | |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 333 | fpu_init(); |
| 334 | dsp_init(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | |
Paul Mundt | aec5e0e | 2006-12-25 09:51:47 +0900 | [diff] [blame] | 336 | /* |
| 337 | * Initialize the per-CPU ASID cache very early, since the |
| 338 | * TLB flushing routines depend on this being setup. |
| 339 | */ |
| 340 | current_cpu_data.asid_cache = NO_CONTEXT; |
| 341 | |
Paul Mundt | 45ed285 | 2007-03-08 18:12:17 +0900 | [diff] [blame] | 342 | speculative_execution_init(); |
Paul Mundt | 7dd6662 | 2009-08-15 07:43:21 +0900 | [diff] [blame] | 343 | expmask_init(); |
Paul Mundt | 0ea820c | 2010-01-13 12:51:40 +0900 | [diff] [blame] | 344 | |
| 345 | /* |
| 346 | * Boot processor to setup the FP and extended state context info. |
| 347 | */ |
| 348 | if (raw_smp_processor_id() == 0) |
| 349 | init_thread_xstate(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 350 | } |