From: Kenn H. <ke...@us...> - 2002-10-29 00:52:58
|
Update of /cvsroot/linux-vax/kernel-2.5/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv2713/include/asm-vax Modified Files: current.h irq.h processor.h siginfo.h uaccess.h Log Message: Merge Linus' 2.5.4 release. Major change is the splitting of task_struct into task_struct and struct thread_info. Index: current.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/current.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- current.h 20 May 2002 00:33:39 -0000 1.3 +++ current.h 29 Oct 2002 00:52:51 -0000 1.4 @@ -1,8 +1,7 @@ #ifndef _VAX_CURRENT_H #define _VAX_CURRENT_H -#include <asm/psl.h> -#include <asm/mtpr.h> +#include <asm/thread_info.h> struct task_struct; @@ -19,7 +18,7 @@ static inline struct task_struct * get_current(void) { - return (struct task_struct *)(__mfpr(PR_KSP) & ~8191); + return current_thread_info()->task; } #define current get_current() Index: irq.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/irq.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- irq.h 20 May 2002 00:33:39 -0000 1.3 +++ irq.h 29 Oct 2002 00:52:51 -0000 1.4 @@ -23,6 +23,9 @@ #ifndef __ASSEMBLY__ +#include <linux/threads.h> /* for NR_CPUS */ +#include <asm/psl.h> /* for struct psl_fields */ +#include <asm/ptrace.h> /* for struct pt_regs */ extern void disable_irq(unsigned int); extern void enable_irq(unsigned int); Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/processor.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- processor.h 31 May 2002 01:58:39 -0000 1.4 +++ processor.h 29 Oct 2002 00:52:51 -0000 1.5 @@ -14,6 +14,7 @@ #include <asm/page.h> #include <asm/vaxcpu.h> /* CPU type definitions */ #include <asm/mm/task.h> /* task memory space defines */ + /* * Default implementation of macro that returns current * instruction pointer ("program counter"). @@ -53,21 +54,16 @@ /* At present only the pcb is here. */ #define INIT_THREAD { INIT_PCB } -#include <asm/ptrace.h> - -/* go with the flow here. Everyone else defines - * THREAD_SIZE to be 8192 or similar. FIXME: */ +// #include <asm/ptrace.h> -#define THREAD_SIZE (8192) +struct task_struct; +struct pt_regs; /* * Do necessary setup to start up a newly executed thread. */ extern void start_thread(struct pt_regs *, unsigned long, unsigned long); -/* Forward declaration, a strange C thing */ -struct task_struct; - /* Free all resources held by a thread. */ static inline void release_thread(struct task_struct *p) { @@ -90,12 +86,12 @@ /* * Return saved PC of a blocked thread. + * This needs to be a #define rather than an inline, since we + * don't have the full definition of task_struct at this point + * in the compilation (linux/sched.h includes this file before + * defining task_struct) */ -extern inline unsigned long thread_saved_pc(struct thread_struct *t) -{ - return ((unsigned long *)t->pcb.pc)[3]; -} - +#define thread_saved_pc(tsk) tsk->thread.pcb.pc unsigned long get_wchan(struct task_struct *p); @@ -108,24 +104,6 @@ #define KSTK_EIP(tsk) (0xdeadbeef) #define KSTK_ESP(tsk) (0xdeadbeef) - - - - -/* NOTE: The task struct and the stack go together! - Later, we may do this with a small look-aside cache - so that we'll be able to allocate contiguous 16-page - chunks later when memory gets fragmented on small - machines. See arch/i386/kernel/process.c for the - implementation of this. */ - -#define alloc_task_struct() \ - ((struct task_struct *) __get_free_pages(GFP_KERNEL,1)) -#define free_task_struct(p) free_pages((unsigned long)(p),1) -#define get_task_struct(tsk) atomic_inc(&virt_to_page(tsk)->count) - -#define init_task (init_task_union.task) -#define init_stack (init_task_union.stack) #define cpu_relax() do { } while (0) Index: siginfo.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/siginfo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- siginfo.h 20 May 2002 00:33:39 -0000 1.3 +++ siginfo.h 29 Oct 2002 00:52:51 -0000 1.4 @@ -109,6 +109,7 @@ #define SI_MESGQ -3 /* sent by real time mesq state change */ #define SI_ASYNCIO -4 /* sent by AIO completion */ #define SI_SIGIO -5 /* sent by queued SIGIO */ +#define SI_TKILL -6 /* sent by tkill system call */ #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) Index: uaccess.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/include/asm-vax/uaccess.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- uaccess.h 20 May 2002 00:33:39 -0000 1.3 +++ uaccess.h 29 Oct 2002 00:52:51 -0000 1.4 @@ -25,8 +25,8 @@ #define USER_DS MAKE_MM_SEG(PAGE_OFFSET) #define get_ds() (KERNEL_DS) -#define get_fs() (current->addr_limit) -#define set_fs(x) (current->addr_limit = (x)) +#define get_fs() (current_thread_info()->addr_limit) +#define set_fs(x) (current_thread_info()->addr_limit = (x)) #define segment_eq(a,b) ((a).seg == (b).seg) |