Commit 16c80381 authored by Jeff Dike's avatar Jeff Dike

Finished the skas merge by eliminating a syntax error, fixing the

new compilation warnings, and fixing a call to handle_page_fault.
parent 41fb3bb0
...@@ -75,6 +75,7 @@ extern void debugger_parent_signal(int status, int pid); ...@@ -75,6 +75,7 @@ extern void debugger_parent_signal(int status, int pid);
extern void child_signal(int pid, int status); extern void child_signal(int pid, int status);
extern int init_ptrace_proxy(int idle_pid, int startup, int stop); extern int init_ptrace_proxy(int idle_pid, int startup, int stop);
extern int init_parent_proxy(int pid); extern int init_parent_proxy(int pid);
extern int singlestepping(void *t);
extern void check_stack_overflow(void *ptr); extern void check_stack_overflow(void *ptr);
extern void relay_signal(int sig, struct uml_pt_regs *regs); extern void relay_signal(int sig, struct uml_pt_regs *regs);
extern void not_implemented(void); extern void not_implemented(void);
......
...@@ -34,7 +34,7 @@ extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out, ...@@ -34,7 +34,7 @@ extern unsigned long set_task_sizes_skas(int arg, unsigned long *host_size_out,
extern int start_uml_skas(void); extern int start_uml_skas(void);
extern struct page *arch_validate_skas(struct page *page, int mask, int order); extern struct page *arch_validate_skas(struct page *page, int mask, int order);
extern int external_pid_skas(struct task_struct *task); extern int external_pid_skas(struct task_struct *task);
extern int thread_pid_skas(struct thread_struct *thread); extern int thread_pid_skas(struct task_struct *task);
#define kmem_end_skas (host_task_size) #define kmem_end_skas (host_task_size)
......
...@@ -37,7 +37,7 @@ static inline unsigned long maybe_map(unsigned long virt, int is_write) ...@@ -37,7 +37,7 @@ static inline unsigned long maybe_map(unsigned long virt, int is_write)
int dummy_code; int dummy_code;
if(IS_ERR(phys) || (is_write && !pte_write(pte))){ if(IS_ERR(phys) || (is_write && !pte_write(pte))){
if(!handle_page_fault(virt, 0, is_write, 0, &dummy_code)) if(handle_page_fault(virt, 0, is_write, 0, &dummy_code))
return(0); return(0);
phys = um_virt_to_phys(current, virt, NULL); phys = um_virt_to_phys(current, virt, NULL);
} }
......
...@@ -298,7 +298,10 @@ void initial_thread_cb_skas(void (*proc)(void *), void *arg) ...@@ -298,7 +298,10 @@ void initial_thread_cb_skas(void (*proc)(void *), void *arg)
cb_back = &here; cb_back = &here;
if(setjmp(here) == 0) if(setjmp(here) == 0)
longjmp(initial_jmpbuf, 2); longjmp(initial_jmpbuf, 2);
cb_proc = NULL;
cb_arg = NULL;
cb_back = NULL;
} }
void halt_skas(void) void halt_skas(void)
......
...@@ -137,6 +137,7 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, ...@@ -137,6 +137,7 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp,
void init_idle_skas(void) void init_idle_skas(void)
{ {
cpu_tasks[current->thread_info->cpu].pid = os_getpid(); cpu_tasks[current->thread_info->cpu].pid = os_getpid();
default_idle();
} }
extern void start_kernel(void); extern void start_kernel(void);
...@@ -177,7 +178,7 @@ int external_pid_skas(struct task_struct *task) ...@@ -177,7 +178,7 @@ int external_pid_skas(struct task_struct *task)
return(userspace_pid); return(userspace_pid);
} }
int thread_pid_skas(struct thread_struct *thread) int thread_pid_skas(struct task_struct *task)
{ {
return(userspace_pid); return(userspace_pid);
} }
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "asm/ptrace.h" #include "asm/ptrace.h"
#include "asm/uaccess.h" #include "asm/uaccess.h"
#include "asm/pgalloc.h" #include "asm/pgalloc.h"
#include "asm/tlbflush.h"
#include "user_util.h" #include "user_util.h"
#include "kern_util.h" #include "kern_util.h"
#include "irq_user.h" #include "irq_user.h"
......
...@@ -35,7 +35,7 @@ extern unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, ...@@ -35,7 +35,7 @@ extern unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out,
extern int start_uml_tt(void); extern int start_uml_tt(void);
extern struct page *arch_validate_tt(struct page *page, int mask, int order); extern struct page *arch_validate_tt(struct page *page, int mask, int order);
extern int external_pid_tt(struct task_struct *task); extern int external_pid_tt(struct task_struct *task);
extern int thread_pid_tt(struct thread_struct *thread); extern int thread_pid_tt(struct task_struct *task);
#define kmem_end_tt (host_task_size - ABOVE_KMEM) #define kmem_end_tt (host_task_size - ABOVE_KMEM)
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "asm/system.h" #include "asm/system.h"
#include "asm/pgalloc.h" #include "asm/pgalloc.h"
#include "asm/ptrace.h" #include "asm/ptrace.h"
#include "asm/tlbflush.h"
#include "irq_user.h" #include "irq_user.h"
#include "signal_user.h" #include "signal_user.h"
#include "kern_util.h" #include "kern_util.h"
...@@ -480,9 +481,9 @@ int external_pid_tt(struct task_struct *task) ...@@ -480,9 +481,9 @@ int external_pid_tt(struct task_struct *task)
return(task->thread.mode.tt.extern_pid); return(task->thread.mode.tt.extern_pid);
} }
int thread_pid_tt(struct thread_struct *thread) int thread_pid_tt(struct task_struct *task)
{ {
return(thread->mode.tt.extern_pid); return(task->thread.mode.tt.extern_pid);
} }
int is_valid_pid(int pid) int is_valid_pid(int pid)
......
...@@ -21,6 +21,7 @@ Jeff Dike (jdike@karaya.com) : Modified for integration into uml ...@@ -21,6 +21,7 @@ Jeff Dike (jdike@karaya.com) : Modified for integration into uml
#include "user_util.h" #include "user_util.h"
#include "kern_util.h" #include "kern_util.h"
#include "ptrace_user.h" #include "ptrace_user.h"
#include "tt.h"
long proxy_ptrace(struct debugger *debugger, int arg1, pid_t arg2, long proxy_ptrace(struct debugger *debugger, int arg1, pid_t arg2,
long arg3, long arg4, pid_t child, int *ret) long arg3, long arg4, pid_t child, int *ret)
......
...@@ -48,7 +48,7 @@ struct cpuinfo_um boot_cpu_data = { ...@@ -48,7 +48,7 @@ struct cpuinfo_um boot_cpu_data = {
unsigned long thread_saved_pc(struct task_struct *task) unsigned long thread_saved_pc(struct task_struct *task)
{ {
return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas, return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas,
thread))); task)));
} }
static int show_cpuinfo(struct seq_file *m, void *v) static int show_cpuinfo(struct seq_file *m, void *v)
...@@ -190,8 +190,8 @@ __uml_setup("ncpus=", uml_ncpus_setup, ...@@ -190,8 +190,8 @@ __uml_setup("ncpus=", uml_ncpus_setup,
int force_tt = 0; int force_tt = 0;
if defined(CONFIG_MODE_TT) && defined(CONFIG_MODE_SKAS) #if defined(CONFIG_MODE_TT) && defined(CONFIG_MODE_SKAS)
+#define DEFAULT_TT 0 #define DEFAULT_TT 0
static int __init mode_tt_setup(char *line, int *add) static int __init mode_tt_setup(char *line, int *add)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment