Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * include/asm-alpha/processor.h
0004  *
0005  * Copyright (C) 1994 Linus Torvalds
0006  */
0007 
0008 #ifndef __ASM_ALPHA_PROCESSOR_H
0009 #define __ASM_ALPHA_PROCESSOR_H
0010 
0011 #include <linux/personality.h>  /* for ADDR_LIMIT_32BIT */
0012 
0013 /*
0014  * We have a 42-bit user address space: 4TB user VM...
0015  */
0016 #define TASK_SIZE (0x40000000000UL)
0017 
0018 #define STACK_TOP \
0019   (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
0020 
0021 #define STACK_TOP_MAX   0x00120000000UL
0022 
0023 /* This decides where the kernel will search for a free chunk of vm
0024  * space during mmap's.
0025  */
0026 #define TASK_UNMAPPED_BASE \
0027   ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
0028 
0029 /* This is dead.  Everything has been moved to thread_info.  */
0030 struct thread_struct { };
0031 #define INIT_THREAD  { }
0032 
0033 /* Do necessary setup to start up a newly executed thread.  */
0034 struct pt_regs;
0035 extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
0036 
0037 /* Free all resources held by a thread. */
0038 struct task_struct;
0039 extern void release_thread(struct task_struct *);
0040 
0041 unsigned long __get_wchan(struct task_struct *p);
0042 
0043 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->pc)
0044 
0045 #define KSTK_ESP(tsk) \
0046   ((tsk) == current ? rdusp() : task_thread_info(tsk)->pcb.usp)
0047 
0048 #define cpu_relax() barrier()
0049 
0050 #define ARCH_HAS_PREFETCH
0051 #define ARCH_HAS_PREFETCHW
0052 #define ARCH_HAS_SPINLOCK_PREFETCH
0053 
0054 #ifndef CONFIG_SMP
0055 /* Nothing to prefetch. */
0056 #define spin_lock_prefetch(lock)    do { } while (0)
0057 #endif
0058 
0059 extern inline void prefetch(const void *ptr)  
0060 { 
0061     __builtin_prefetch(ptr, 0, 3);
0062 }
0063 
0064 extern inline void prefetchw(const void *ptr)  
0065 {
0066     __builtin_prefetch(ptr, 1, 3);
0067 }
0068 
0069 #ifdef CONFIG_SMP
0070 extern inline void spin_lock_prefetch(const void *ptr)  
0071 {
0072     __builtin_prefetch(ptr, 1, 3);
0073 }
0074 #endif
0075 
0076 #endif /* __ASM_ALPHA_PROCESSOR_H */