diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/drivers/mconsole_kern.c x/arch/um/drivers/mconsole_kern.c --- x-ref/arch/um/drivers/mconsole_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/drivers/mconsole_kern.c 2003-06-01 16:34:00.000000000 +0200 @@ -104,20 +104,7 @@ void mconsole_version(struct mc_request } #define UML_MCONSOLE_HELPTEXT \ -"Commands: \n\ - version - Get kernel version \n\ - help - Print this message \n\ - halt - Halt UML \n\ - reboot - Reboot UML \n\ - config = - Add a new device to UML; \n\ - same syntax as command line \n\ - config - Query the configuration of a device \n\ - remove - Remove a device from UML \n\ - sysrq - Performs the SysRq action controlled by the letter \n\ - cad - invoke the Ctl-Alt-Del handler \n\ - stop - pause the UML; it will do nothing until it receives a 'go' \n\ - go - continue the UML after a 'stop' \n\ -" +"Commands: \n version - Get kernel version \n help - Print this message \n halt - Halt UML \n reboot - Reboot UML \n config = - Add a new device to UML; \n same syntax as command line \n config - Query the configuration of a device \n remove - Remove a device from UML \n sysrq - Performs the SysRq action controlled by the letter \n cad - invoke the Ctl-Alt-Del handler \n stop - pause the UML; it will do nothing until it receives a 'go' \n go - continue the UML after a 'stop' \n" void mconsole_help(struct mc_request *req) { diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/include/kern_util.h x/arch/um/include/kern_util.h --- x-ref/arch/um/include/kern_util.h 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/include/kern_util.h 2003-06-01 16:33:04.000000000 +0200 @@ -106,7 +106,7 @@ extern int is_syscall(unsigned long addr extern void arch_switch(void); extern void free_irq(unsigned int, void *); extern int um_in_interrupt(void); -extern int cpu(void); +extern int uml_cpu(void); #endif /* diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/include/user_util.h x/arch/um/include/user_util.h --- x-ref/arch/um/include/user_util.h 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/include/user_util.h 2003-06-01 16:34:15.000000000 +0200 @@ -87,6 +87,7 @@ extern void write_sigio_workaround(void) extern void arch_check_bugs(void); extern int arch_handle_signal(int sig, union uml_pt_regs *regs); extern int arch_fixup(unsigned long address, void *sc_ptr); +extern void forward_pending_sigio(int target); extern int can_do_skas(void); extern void arch_init_thread(void); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/init_task.c x/arch/um/kernel/init_task.c --- x-ref/arch/um/kernel/init_task.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/init_task.c 2003-06-01 16:33:04.000000000 +0200 @@ -7,6 +7,7 @@ #include "linux/mm.h" #include "linux/sched.h" #include "linux/version.h" +#include "linux/sched_runqueue.h" #include "asm/uaccess.h" #include "asm/pgtable.h" #include "user_util.h" diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/ksyms.c x/arch/um/kernel/ksyms.c --- x-ref/arch/um/kernel/ksyms.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/ksyms.c 2003-06-01 16:33:04.000000000 +0200 @@ -64,8 +64,6 @@ EXPORT_SYMBOL(dump_thread); */ EXPORT_SYMBOL(sys_open); EXPORT_SYMBOL(sys_lseek); -EXPORT_SYMBOL(sys_read); -EXPORT_SYMBOL(sys_wait4); #ifdef CONFIG_SMP diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/process.c x/arch/um/kernel/process.c --- x-ref/arch/um/kernel/process.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/process.c 2003-06-01 16:33:04.000000000 +0200 @@ -239,6 +239,16 @@ int run_kernel_thread(int (*fn)(void *), return(0); } +void forward_pending_sigio(int target) +{ + sigset_t sigs; + + if(sigpending(&sigs)) + panic("forward_pending_sigio : sigpending failed"); + if(sigismember(&sigs, SIGIO)) + kill(target, SIGIO); +} + int can_do_skas(void) { #ifdef UML_CONFIG_MODE_SKAS diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/process_kern.c x/arch/um/kernel/process_kern.c --- x-ref/arch/um/kernel/process_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/process_kern.c 2003-06-01 16:33:04.000000000 +0200 @@ -119,7 +119,7 @@ void set_current(void *t) { struct task_struct *task = t; - cpu_tasks[task->processor] = ((struct cpu_task) + cpu_tasks[task->cpu] = ((struct cpu_task) { external_pid(task), task }); } @@ -360,7 +360,7 @@ int strlen_user_proc(char *str) int smp_sigio_handler(void) { #ifdef CONFIG_SMP - int cpu = current->processor; + int cpu = cpu(); IPI_handler(cpu); if(cpu != 0) @@ -374,9 +374,9 @@ int um_in_interrupt(void) return(in_interrupt()); } -int cpu(void) +int uml_cpu(void) { - return(current->processor); + return(current->cpu); } /* diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/skas/process_kern.c x/arch/um/kernel/skas/process_kern.c --- x-ref/arch/um/kernel/skas/process_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/skas/process_kern.c 2003-06-01 16:33:04.000000000 +0200 @@ -133,7 +133,7 @@ int copy_thread_skas(int nr, unsigned lo void init_idle_skas(void) { - cpu_tasks[current->processor].pid = os_getpid(); + cpu_tasks[cpu()].pid = os_getpid(); } extern void start_kernel(void); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/skas/trap_user.c x/arch/um/kernel/skas/trap_user.c --- x-ref/arch/um/kernel/skas/trap_user.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/skas/trap_user.c 2003-06-01 16:33:04.000000000 +0200 @@ -42,7 +42,7 @@ void user_signal(int sig, union uml_pt_r struct signal_info *info; if(sig == SIGVTALRM) - missed_ticks[cpu()]++; + missed_ticks[uml_cpu()]++; regs->skas.is_user = 1; regs->skas.fault_addr = 0; regs->skas.fault_type = 0; diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/time_kern.c x/arch/um/kernel/time_kern.c --- x-ref/arch/um/kernel/time_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/time_kern.c 2003-06-01 16:33:04.000000000 +0200 @@ -37,7 +37,7 @@ int __attribute__ ((__section__ (".unpro void timer_irq(union uml_pt_regs *regs) { - int cpu = current->processor, ticks = missed_ticks[cpu]; + int cpu = current->cpu, ticks = missed_ticks[cpu]; if(!timer_irq_inited) return; missed_ticks[cpu] = 0; @@ -125,7 +125,7 @@ void timer_handler(int sig, union uml_pt #ifdef CONFIG_SMP update_process_times(user_context(UPT_SP(regs))); #endif - if(current->processor == 0) + if(current->cpu == 0) timer_irq(regs); } diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/trap_user.c x/arch/um/kernel/trap_user.c --- x-ref/arch/um/kernel/trap_user.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/trap_user.c 2003-06-01 16:33:04.000000000 +0200 @@ -109,7 +109,7 @@ extern int timer_irq_inited, missed_tick void alarm_handler(int sig, struct sigcontext sc) { if(!timer_irq_inited) return; - missed_ticks[cpu()]++; + missed_ticks[uml_cpu()]++; if(sig == SIGALRM) switch_timers(0); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/tt/exec_kern.c x/arch/um/kernel/tt/exec_kern.c --- x-ref/arch/um/kernel/tt/exec_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/tt/exec_kern.c 2003-06-01 16:33:04.000000000 +0200 @@ -46,7 +46,7 @@ void flush_thread_tt(void) do_exit(SIGKILL); } - if(current->processor == 0) + if(cpu() == 0) forward_interrupts(new_pid); current->thread.request.op = OP_EXEC; current->thread.request.u.exec.pid = new_pid; diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/tt/gdb_kern.c x/arch/um/kernel/tt/gdb_kern.c --- x-ref/arch/um/kernel/tt/gdb_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/tt/gdb_kern.c 2003-06-01 16:33:04.000000000 +0200 @@ -5,6 +5,7 @@ #include "linux/init.h" #include "linux/config.h" +#include "asm/types.h" #include "mconsole_kern.h" #ifdef CONFIG_MCONSOLE diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/tt/process_kern.c x/arch/um/kernel/tt/process_kern.c --- x-ref/arch/um/kernel/tt/process_kern.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/tt/process_kern.c 2003-06-01 16:33:04.000000000 +0200 @@ -39,7 +39,7 @@ void *_switch_to_tt(void *prev, void *ne to->thread.prev_sched = from; - cpu = from->processor; + cpu = from->cpu; if(cpu == 0) forward_interrupts(to->thread.mode.tt.extern_pid); #ifdef CONFIG_SMP @@ -51,6 +51,8 @@ void *_switch_to_tt(void *prev, void *ne alrm = change_sig(SIGALRM, 0); prof = change_sig(SIGPROF, 0); + forward_pending_sigio(to->thread.mode.tt.extern_pid); + c = 0; set_current(to); @@ -299,7 +301,7 @@ int do_proc_op(void *t, int proc_id) pid = thread->request.u.exec.pid; do_exec(thread->mode.tt.extern_pid, pid); thread->mode.tt.extern_pid = pid; - cpu_tasks[task->processor].pid = pid; + cpu_tasks[task->cpu].pid = pid; break; case OP_FORK: attach_process(thread->request.u.fork.pid); diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/um/kernel/tt/ptproxy/proxy.c x/arch/um/kernel/tt/ptproxy/proxy.c --- x-ref/arch/um/kernel/tt/ptproxy/proxy.c 2003-06-01 16:33:03.000000000 +0200 +++ x/arch/um/kernel/tt/ptproxy/proxy.c 2003-06-01 16:34:31.000000000 +0200 @@ -293,11 +293,7 @@ void fake_child_exit(void) } char gdb_init_string[] = -"att 1 \n\ -b panic \n\ -b stop \n\ -handle SIGWINCH nostop noprint pass \n\ -"; +"att 1 \nb panic \nb stop \nhandle SIGWINCH nostop noprint pass \n"; int start_debugger(char *prog, int startup, int stop, int *fd_out) { --- x/arch/um/include/2_5compat.h.~1~ 2003-06-07 16:10:29.000000000 +0200 +++ x/arch/um/include/2_5compat.h 2003-06-07 16:20:53.000000000 +0200 @@ -29,8 +29,7 @@ #define IS_WRITE(req) ((req)->cmd == WRITE) -#define SET_PRI(task) \ - do { (task)->nice = 20; (task)->counter = -100; } while(0); +#define SET_PRI(task) do { } while(0) #endif