42fda66387
This patchset throws out tt mode, which has been non-functional for a while. This is done in phases, interspersed with code cleanups on the affected files. The removal is done as follows: remove all code, config options, and files which depend on CONFIG_MODE_TT get rid of the CHOOSE_MODE macro, which decided whether to call tt-mode or skas-mode code, and replace invocations with their skas portions replace all now-trivial procedures with their skas equivalents There are now a bunch of now-redundant pieces of data structures, including mode-specific pieces of the thread structure, pt_regs, and mm_context. These are all replaced with their skas-specific contents. As part of the ongoing style compliance project, I made a style pass over all files that were changed. There are three such patches, one for each phase, covering the files affected by that phase but no later ones. I noticed that we weren't freeing the LDT state associated with a process when it exited, so that's fixed in one of the later patches. The last patch is a tidying patch which I've had for a while, but which caused inexplicable crashes under tt mode. Since that is no longer a problem, this can now go in. This patch: Start getting rid of tt mode support. This patch throws out CONFIG_MODE_TT and all config options, code, and files which depend on it. CONFIG_MODE_SKAS is gone and everything that depends on it is included unconditionally. The few changed lines are in re-written Kconfig help, lines which needed something skas-related removed from them, and a few more which weren't strictly deletions. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
134 lines
2.7 KiB
C
134 lines
2.7 KiB
C
/*
|
|
* Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
|
|
* Licensed under the GPL
|
|
*/
|
|
|
|
#ifndef __UM_PROCESSOR_GENERIC_H
|
|
#define __UM_PROCESSOR_GENERIC_H
|
|
|
|
struct pt_regs;
|
|
|
|
struct task_struct;
|
|
|
|
#include "asm/ptrace.h"
|
|
#include "choose-mode.h"
|
|
#include "registers.h"
|
|
#include "sysdep/archsetjmp.h"
|
|
|
|
struct mm_struct;
|
|
|
|
struct thread_struct {
|
|
/* This flag is set to 1 before calling do_fork (and analyzed in
|
|
* copy_thread) to mark that we are begin called from userspace (fork /
|
|
* vfork / clone), and reset to 0 after. It is left to 0 when called
|
|
* from kernelspace (i.e. kernel_thread() or fork_idle(), as of 2.6.11). */
|
|
struct task_struct *saved_task;
|
|
int forking;
|
|
int nsyscalls;
|
|
struct pt_regs regs;
|
|
int singlestep_syscall;
|
|
void *fault_addr;
|
|
void *fault_catcher;
|
|
struct task_struct *prev_sched;
|
|
unsigned long temp_stack;
|
|
void *exec_buf;
|
|
struct arch_thread arch;
|
|
union {
|
|
struct {
|
|
jmp_buf switch_buf;
|
|
int mm_count;
|
|
} skas;
|
|
} mode;
|
|
struct {
|
|
int op;
|
|
union {
|
|
struct {
|
|
int pid;
|
|
} fork, exec;
|
|
struct {
|
|
int (*proc)(void *);
|
|
void *arg;
|
|
} thread;
|
|
struct {
|
|
void (*proc)(void *);
|
|
void *arg;
|
|
} cb;
|
|
} u;
|
|
} request;
|
|
};
|
|
|
|
#define INIT_THREAD \
|
|
{ \
|
|
.forking = 0, \
|
|
.nsyscalls = 0, \
|
|
.regs = EMPTY_REGS, \
|
|
.fault_addr = NULL, \
|
|
.prev_sched = NULL, \
|
|
.temp_stack = 0, \
|
|
.exec_buf = NULL, \
|
|
.arch = INIT_ARCH_THREAD, \
|
|
.request = { 0 } \
|
|
}
|
|
|
|
typedef struct {
|
|
unsigned long seg;
|
|
} mm_segment_t;
|
|
|
|
extern struct task_struct *alloc_task_struct(void);
|
|
|
|
extern void release_thread(struct task_struct *);
|
|
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
|
|
|
|
static inline void prepare_to_copy(struct task_struct *tsk)
|
|
{
|
|
}
|
|
|
|
|
|
extern unsigned long thread_saved_pc(struct task_struct *t);
|
|
|
|
static inline void mm_copy_segments(struct mm_struct *from_mm,
|
|
struct mm_struct *new_mm)
|
|
{
|
|
}
|
|
|
|
#define init_stack (init_thread_union.stack)
|
|
|
|
/*
|
|
* User space process size: 3GB (default).
|
|
*/
|
|
extern unsigned long task_size;
|
|
|
|
#define TASK_SIZE (task_size)
|
|
|
|
/* This decides where the kernel will search for a free chunk of vm
|
|
* space during mmap's.
|
|
*/
|
|
#define TASK_UNMAPPED_BASE (0x40000000)
|
|
|
|
extern void start_thread(struct pt_regs *regs, unsigned long entry,
|
|
unsigned long stack);
|
|
|
|
struct cpuinfo_um {
|
|
unsigned long loops_per_jiffy;
|
|
int ipi_pipe[2];
|
|
};
|
|
|
|
extern struct cpuinfo_um boot_cpu_data;
|
|
|
|
#define my_cpu_data cpu_data[smp_processor_id()]
|
|
|
|
#ifdef CONFIG_SMP
|
|
extern struct cpuinfo_um cpu_data[];
|
|
#define current_cpu_data cpu_data[smp_processor_id()]
|
|
#else
|
|
#define cpu_data (&boot_cpu_data)
|
|
#define current_cpu_data boot_cpu_data
|
|
#endif
|
|
|
|
|
|
#define KSTK_REG(tsk, reg) \
|
|
get_thread_reg(reg, &tsk->thread.mode.skas.switch_buf)
|
|
#define get_wchan(p) (0)
|
|
|
|
#endif
|