diff options
Diffstat (limited to 'arch/tile/include/asm/processor.h')
-rw-r--r-- | arch/tile/include/asm/processor.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/arch/tile/include/asm/processor.h b/arch/tile/include/asm/processor.h index ccd5f8425688..34c1e01ffb5e 100644 --- a/arch/tile/include/asm/processor.h +++ b/arch/tile/include/asm/processor.h | |||
@@ -215,6 +215,8 @@ static inline void release_thread(struct task_struct *dead_task) | |||
215 | 215 | ||
216 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 216 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
217 | 217 | ||
218 | extern int do_work_pending(struct pt_regs *regs, u32 flags); | ||
219 | |||
218 | 220 | ||
219 | /* | 221 | /* |
220 | * Return saved (kernel) PC of a blocked thread. | 222 | * Return saved (kernel) PC of a blocked thread. |
@@ -255,10 +257,6 @@ static inline void cpu_relax(void) | |||
255 | barrier(); | 257 | barrier(); |
256 | } | 258 | } |
257 | 259 | ||
258 | struct siginfo; | ||
259 | extern void arch_coredump_signal(struct siginfo *, struct pt_regs *); | ||
260 | #define arch_coredump_signal arch_coredump_signal | ||
261 | |||
262 | /* Info on this processor (see fs/proc/cpuinfo.c) */ | 260 | /* Info on this processor (see fs/proc/cpuinfo.c) */ |
263 | struct seq_operations; | 261 | struct seq_operations; |
264 | extern const struct seq_operations cpuinfo_op; | 262 | extern const struct seq_operations cpuinfo_op; |
@@ -269,10 +267,6 @@ extern char chip_model[64]; | |||
269 | /* Data on which physical memory controller corresponds to which NUMA node. */ | 267 | /* Data on which physical memory controller corresponds to which NUMA node. */ |
270 | extern int node_controller[]; | 268 | extern int node_controller[]; |
271 | 269 | ||
272 | |||
273 | /* Do we dump information to the console when a user application crashes? */ | ||
274 | extern int show_crashinfo; | ||
275 | |||
276 | #if CHIP_HAS_CBOX_HOME_MAP() | 270 | #if CHIP_HAS_CBOX_HOME_MAP() |
277 | /* Does the heap allocator return hash-for-home pages by default? */ | 271 | /* Does the heap allocator return hash-for-home pages by default? */ |
278 | extern int hash_default; | 272 | extern int hash_default; |
@@ -292,8 +286,18 @@ extern int kstack_hash; | |||
292 | /* Are we using huge pages in the TLB for kernel data? */ | 286 | /* Are we using huge pages in the TLB for kernel data? */ |
293 | extern int kdata_huge; | 287 | extern int kdata_huge; |
294 | 288 | ||
289 | /* Support standard Linux prefetching. */ | ||
290 | #define ARCH_HAS_PREFETCH | ||
291 | #define prefetch(x) __builtin_prefetch(x) | ||
295 | #define PREFETCH_STRIDE CHIP_L2_LINE_SIZE() | 292 | #define PREFETCH_STRIDE CHIP_L2_LINE_SIZE() |
296 | 293 | ||
294 | /* Bring a value into the L1D, faulting the TLB if necessary. */ | ||
295 | #ifdef __tilegx__ | ||
296 | #define prefetch_L1(x) __insn_prefetch_l1_fault((void *)(x)) | ||
297 | #else | ||
298 | #define prefetch_L1(x) __insn_prefetch_L1((void *)(x)) | ||
299 | #endif | ||
300 | |||
297 | #else /* __ASSEMBLY__ */ | 301 | #else /* __ASSEMBLY__ */ |
298 | 302 | ||
299 | /* Do some slow action (e.g. read a slow SPR). */ | 303 | /* Do some slow action (e.g. read a slow SPR). */ |
@@ -328,18 +332,21 @@ extern int kdata_huge; | |||
328 | * Note that assembly code assumes that USER_PL is zero. | 332 | * Note that assembly code assumes that USER_PL is zero. |
329 | */ | 333 | */ |
330 | #define USER_PL 0 | 334 | #define USER_PL 0 |
331 | #define KERNEL_PL 1 | 335 | #if CONFIG_KERNEL_PL == 2 |
336 | #define GUEST_PL 1 | ||
337 | #endif | ||
338 | #define KERNEL_PL CONFIG_KERNEL_PL | ||
332 | 339 | ||
333 | /* SYSTEM_SAVE_1_0 holds the current cpu number ORed with ksp0. */ | 340 | /* SYSTEM_SAVE_K_0 holds the current cpu number ORed with ksp0. */ |
334 | #define CPU_LOG_MASK_VALUE 12 | 341 | #define CPU_LOG_MASK_VALUE 12 |
335 | #define CPU_MASK_VALUE ((1 << CPU_LOG_MASK_VALUE) - 1) | 342 | #define CPU_MASK_VALUE ((1 << CPU_LOG_MASK_VALUE) - 1) |
336 | #if CONFIG_NR_CPUS > CPU_MASK_VALUE | 343 | #if CONFIG_NR_CPUS > CPU_MASK_VALUE |
337 | # error Too many cpus! | 344 | # error Too many cpus! |
338 | #endif | 345 | #endif |
339 | #define raw_smp_processor_id() \ | 346 | #define raw_smp_processor_id() \ |
340 | ((int)__insn_mfspr(SPR_SYSTEM_SAVE_1_0) & CPU_MASK_VALUE) | 347 | ((int)__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & CPU_MASK_VALUE) |
341 | #define get_current_ksp0() \ | 348 | #define get_current_ksp0() \ |
342 | (__insn_mfspr(SPR_SYSTEM_SAVE_1_0) & ~CPU_MASK_VALUE) | 349 | (__insn_mfspr(SPR_SYSTEM_SAVE_K_0) & ~CPU_MASK_VALUE) |
343 | #define next_current_ksp0(task) ({ \ | 350 | #define next_current_ksp0(task) ({ \ |
344 | unsigned long __ksp0 = task_ksp0(task); \ | 351 | unsigned long __ksp0 = task_ksp0(task); \ |
345 | int __cpu = raw_smp_processor_id(); \ | 352 | int __cpu = raw_smp_processor_id(); \ |