aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/include/asm/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/include/asm/processor.h')
-rw-r--r--arch/tile/include/asm/processor.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/tile/include/asm/processor.h b/arch/tile/include/asm/processor.h
index ccd5f8425688..1747ff3946b2 100644
--- a/arch/tile/include/asm/processor.h
+++ b/arch/tile/include/asm/processor.h
@@ -328,18 +328,21 @@ extern int kdata_huge;
328 * Note that assembly code assumes that USER_PL is zero. 328 * Note that assembly code assumes that USER_PL is zero.
329 */ 329 */
330#define USER_PL 0 330#define USER_PL 0
331#define KERNEL_PL 1 331#if CONFIG_KERNEL_PL == 2
332#define GUEST_PL 1
333#endif
334#define KERNEL_PL CONFIG_KERNEL_PL
332 335
333/* SYSTEM_SAVE_1_0 holds the current cpu number ORed with ksp0. */ 336/* SYSTEM_SAVE_K_0 holds the current cpu number ORed with ksp0. */
334#define CPU_LOG_MASK_VALUE 12 337#define CPU_LOG_MASK_VALUE 12
335#define CPU_MASK_VALUE ((1 << CPU_LOG_MASK_VALUE) - 1) 338#define CPU_MASK_VALUE ((1 << CPU_LOG_MASK_VALUE) - 1)
336#if CONFIG_NR_CPUS > CPU_MASK_VALUE 339#if CONFIG_NR_CPUS > CPU_MASK_VALUE
337# error Too many cpus! 340# error Too many cpus!
338#endif 341#endif
339#define raw_smp_processor_id() \ 342#define raw_smp_processor_id() \
340 ((int)__insn_mfspr(SPR_SYSTEM_SAVE_1_0) & CPU_MASK_VALUE) 343 ((int)__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & CPU_MASK_VALUE)
341#define get_current_ksp0() \ 344#define get_current_ksp0() \
342 (__insn_mfspr(SPR_SYSTEM_SAVE_1_0) & ~CPU_MASK_VALUE) 345 (__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & ~CPU_MASK_VALUE)
343#define next_current_ksp0(task) ({ \ 346#define next_current_ksp0(task) ({ \
344 unsigned long __ksp0 = task_ksp0(task); \ 347 unsigned long __ksp0 = task_ksp0(task); \
345 int __cpu = raw_smp_processor_id(); \ 348 int __cpu = raw_smp_processor_id(); \