2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __UM_PROCESSOR_GENERIC_H
7 #define __UM_PROCESSOR_GENERIC_H
13 #include "linux/config.h"
14 #include "asm/ptrace.h"
15 #include "choose-mode.h"
19 struct thread_struct {
25 unsigned long trap_no;
26 int singlestep_syscall;
29 struct task_struct *prev_sched;
30 unsigned long temp_stack;
32 struct arch_thread arch;
42 #ifdef CONFIG_MODE_SKAS
79 .arch = INIT_ARCH_THREAD, \
87 extern struct task_struct *alloc_task_struct(void);
89 extern void release_thread(struct task_struct *);
90 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
91 extern void dump_thread(struct pt_regs *regs, struct user *u);
92 extern void prepare_to_copy(struct task_struct *tsk);
94 extern unsigned long thread_saved_pc(struct task_struct *t);
96 static inline void mm_copy_segments(struct mm_struct *from_mm,
97 struct mm_struct *new_mm)
101 #define init_stack (init_thread_union.stack)
104 * User space process size: 3GB (default).
106 extern unsigned long task_size;
108 #define TASK_SIZE (task_size)
110 /* This decides where the kernel will search for a free chunk of vm
111 * space during mmap's.
113 #define TASK_UNMAPPED_BASE (0x40000000)
115 extern void start_thread(struct pt_regs *regs, unsigned long entry,
116 unsigned long stack);
119 unsigned long loops_per_jiffy;
123 extern struct cpuinfo_um boot_cpu_data;
125 #define my_cpu_data cpu_data[smp_processor_id()]
128 extern struct cpuinfo_um cpu_data[];
129 #define current_cpu_data cpu_data[smp_processor_id()]
131 #define cpu_data (&boot_cpu_data)
132 #define current_cpu_data boot_cpu_data
135 #define KSTK_EIP(tsk) (PT_REGS_IP(&tsk->thread.regs))
136 #define KSTK_ESP(tsk) (PT_REGS_SP(&tsk->thread.regs))
137 #define get_wchan(p) (0)
142 * Overrides for Emacs so that we follow Linus's tabbing style.
143 * Emacs will notice this stuff at the end of the file and automatically
144 * adjust the settings for this buffer only. This must remain at the end
146 * ---------------------------------------------------------------------------
148 * c-file-style: "linux"