diff -Naur -X exclude-files ac_cur/arch/um/Makefile ac/arch/um/Makefile --- ac_cur/arch/um/Makefile Sat Aug 4 22:01:02 2001 +++ ac/arch/um/Makefile Sun Aug 5 14:44:07 2001 @@ -46,7 +46,11 @@ -DSUBARCH=$(SUBARCH) -DELF_SUBARCH=$(ELF_SUBARCH) \ $(ARCH_DIR)/link.ld.in > $(ARCH_DIR)/link.ld -ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep +SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \ + include/asm-um/sigcontext.h include/asm-um/processor.h + +ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep $(SYMLINK_HEADERS) + linux: $(ARCH_SYMLINKS) $(ARCH_DIR)/main.o vmlinux $(ARCH_DIR)/link.ld mv vmlinux vmlinux.o @@ -74,6 +78,11 @@ archdep: $(ARCH_SYMLINKS) @$(MAKEBOOT) dep + +$(SYMLINK_HEADERS): + echo $@ + cd $(TOPDIR)/$(dir $@) ; \ + ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@) include/asm-um/arch: cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch diff -Naur -X exclude-files ac_cur/arch/um/include/sysdep-ppc/syscalls.h ac/arch/um/include/sysdep-ppc/syscalls.h --- ac_cur/arch/um/include/sysdep-ppc/syscalls.h Sat Aug 4 22:01:03 2001 +++ ac/arch/um/include/sysdep-ppc/syscalls.h Sun Aug 5 14:44:07 2001 @@ -15,12 +15,16 @@ UM_SYSCALL_ARG5(®s), \ UM_SYSCALL_ARG6(®s)) -extern syscall_handler_t old_mmap; -extern syscall_handler_t sys_fcntl64; -extern syscall_handler_t sys_getdents64; extern syscall_handler_t sys_mincore; extern syscall_handler_t sys_madvise; +/* old_mmap needs the correct prototype since syscall_kern.c includes + * this file. + */ +int old_mmap(unsigned long addr, unsigned long len, + unsigned long prot, unsigned long flags, + unsigned long fd, unsigned long offset); + #define ARCH_SYSCALLS \ [ __NR_modify_ldt ] = sys_ni_syscall, \ [ __NR_pciconfig_read ] = sys_ni_syscall, \ @@ -29,10 +33,8 @@ [ __NR_pivot_root ] = sys_ni_syscall, \ [ __NR_multiplexer ] = sys_ni_syscall, \ [ __NR_mmap ] = old_mmap, \ - [ __NR_fcntl64 ] = sys_fcntl64, \ - [ __NR_getdents64 ] = sys_getdents64, \ [ __NR_madvise ] = sys_madvise, \ - [ __NR_mincore ] = sys_mincore, \ + [ __NR_mincore ] = sys_mincore, #define LAST_SYSCALL __NR_mincore diff -Naur -X exclude-files ac_cur/arch/um/sys-ppc/Makefile ac/arch/um/sys-ppc/Makefile --- ac_cur/arch/um/sys-ppc/Makefile Sat Aug 4 22:01:03 2001 +++ ac/arch/um/sys-ppc/Makefile Sun Aug 5 14:44:07 2001 @@ -22,9 +22,6 @@ ptrace.o: ptrace.c $(CC) -D__KERNEL__ $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< -miscthings.o: miscthings.c - $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< - sigcontext.o: sigcontext.c $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $< diff -Naur -X exclude-files ac_cur/arch/um/sys-ppc/miscthings.c ac/arch/um/sys-ppc/miscthings.c --- ac_cur/arch/um/sys-ppc/miscthings.c Sat Aug 4 22:01:03 2001 +++ ac/arch/um/sys-ppc/miscthings.c Sun Aug 5 14:44:07 2001 @@ -1,4 +1,3 @@ -#include "asm/uaccess.h" #include "linux/threads.h" #include "linux/stddef.h" // for NULL #include "linux/elf.h" // for AT_NULL diff -Naur -X exclude-files ac_cur/include/asm-um/archparam-i386.h ac/include/asm-um/archparam-i386.h --- ac_cur/include/asm-um/archparam-i386.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/archparam-i386.h Sun Aug 5 14:44:26 2001 @@ -0,0 +1,26 @@ +#ifndef __UM_ARCHPARAM_I386_H +#define __UM_ARCHPARAM_I386_H + +/********* Bits for asm-um/elf.h ************/ + +#define ELF_PLATFORM "i586" + +#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) + +typedef int elf_gregset_t; +typedef int elf_fpregset_t; + +#define ELF_DATA ELFDATA2LSB +#define ELF_ARCH EM_386 + +/********* Bits for asm-um/delay.h **********/ + +typedef unsigned long um_udelay_t; + +/********* Nothing for asm-um/hardirq.h **********/ + +/********* Nothing for asm-um/hw_irq.h **********/ + +/********* Nothing for asm-um/string.h **********/ + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/archparam-ppc.h ac/include/asm-um/archparam-ppc.h --- ac_cur/include/asm-um/archparam-ppc.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/archparam-ppc.h Sun Aug 5 14:44:26 2001 @@ -0,0 +1,41 @@ +#ifndef __UM_ARCHPARAM_PPC_H +#define __UM_ARCHPARAM_PPC_H + +/********* Bits for asm-um/elf.h ************/ + +#define ELF_PLATFORM (0) + +#define ELF_ET_DYN_BASE (0x08000000) + +/* the following stolen from asm-ppc/elf.h */ +#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ +#define ELF_NFPREG 33 /* includes fpscr */ +/* General registers */ +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Floating point registers */ +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +#define ELF_DATA ELFDATA2MSB +#define ELF_ARCH EM_PPC + +/********* Bits for asm-um/delay.h **********/ + +typedef unsigned int um_udelay_t; + +/********* Bits for asm-um/hw_irq.h **********/ + +struct hw_interrupt_type; + +/********* Bits for asm-um/hardirq.h **********/ + +#define irq_enter(cpu, irq) hardirq_enter(cpu) +#define irq_exit(cpu, irq) hardirq_exit(cpu) + +/********* Bits for asm-um/string.h **********/ + +#define __HAVE_ARCH_STRRCHR + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/current.h ac/include/asm-um/current.h --- ac_cur/include/asm-um/current.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/current.h Sun Aug 5 14:44:26 2001 @@ -1,6 +1,8 @@ #ifndef __UM_CURRENT_H #define __UM_CURRENT_H +#ifndef __ASSEMBLY__ + #include "linux/config.h" struct task_struct; @@ -18,5 +20,7 @@ #define current current_task #endif + +#endif /* __ASSEMBLY__ */ #endif diff -Naur -X exclude-files ac_cur/include/asm-um/delay.h ac/include/asm-um/delay.h --- ac_cur/include/asm-um/delay.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/delay.h Sun Aug 5 14:44:26 2001 @@ -2,7 +2,6 @@ #define __UM_DELAY_H #include "asm/arch/delay.h" - -typedef unsigned long um_udelay_t; +#include "asm/archparam.h" #endif diff -Naur -X exclude-files ac_cur/include/asm-um/elf.h ac/include/asm-um/elf.h --- ac_cur/include/asm-um/elf.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/elf.h Sun Aug 5 14:44:26 2001 @@ -1,23 +1,16 @@ #ifndef __UM_ELF_H #define __UM_ELF_H -#define ELF_HWCAP (0) +#include "asm/archparam.h" -#define ELF_PLATFORM "i586" +#define ELF_HWCAP (0) #define SET_PERSONALITY(ex, ibcs2) do ; while(0) -#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) - -typedef int elf_gregset_t; -typedef int elf_fpregset_t; - #define ELF_EXEC_PAGESIZE 4096 #define elf_check_arch(x) (1) #define ELF_CLASS ELFCLASS32 -#define ELF_DATA ELFDATA2LSB -#define ELF_ARCH EM_386 #endif diff -Naur -X exclude-files ac_cur/include/asm-um/hw_irq.h ac/include/asm-um/hw_irq.h --- ac_cur/include/asm-um/hw_irq.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/hw_irq.h Sun Aug 5 14:47:42 2001 @@ -2,6 +2,7 @@ #define _ASM_UM_HW_IRQ_H #include "asm/irq.h" +#include "asm/archparam.h" static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} diff -Naur -X exclude-files ac_cur/include/asm-um/page.h ac/include/asm-um/page.h --- ac_cur/include/asm-um/page.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/page.h Sun Aug 5 14:44:26 2001 @@ -10,6 +10,8 @@ #undef PAGE_OFFSET #undef __pa #undef __va +#undef virt_to_page +#undef VALID_PAGE #ifndef __ASSEMBLY__ diff -Naur -X exclude-files ac_cur/include/asm-um/processor-generic.h ac/include/asm-um/processor-generic.h --- ac_cur/include/asm-um/processor-generic.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/processor-generic.h Sun Aug 5 14:47:42 2001 @@ -0,0 +1,251 @@ +/* + * Copyright (C) 2000 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 "linux/config.h" +#include "asm/segment.h" +#include "asm/ptrace.h" +#include "asm/arch/signal.h" + +struct mm_struct; + +#define current_text_addr() ((void *) 0) + +#define SIGNAL_NONE 0 +#define SIGNAL_PENDING 1 +#define SIGNAL_HANDLING 2 + +struct thread_struct { + int extern_pid; + int tracing; + int forking; + unsigned long kernel_stack; + struct { + int state; + int signal; + unsigned long sp; + unsigned long handler; + } signal; + sigset_t saved_sigs; + int nsyscalls; + struct sys_pt_regs process_regs; + struct sys_pt_regs syscall_regs; + struct sys_pt_regs altstack_regs; + void *altstack; + int altstack_size; + unsigned long cr2; + int err; + int repeat_syscall; + void *fault_addr; + void *fault_catcher; + void *brk; + int sigreturn_syscall; + struct { + int op; + union { + struct { + int pid; + } fork, exec; + struct { + struct task_struct *to; + struct task_struct *from; + } cswitch; + struct { + int (*proc)(void *); + void *arg; + int flags; + int new_pid; + struct task_struct *new_task; + int cpu; + } thread; + struct { + unsigned long stack; + struct sys_pt_regs regs; + struct task_struct *from; + } fork_finish; + struct { + void (*proc)(void *); + void *arg; + } cb; + struct { + int restore_regs; + } tracing; + } u; + } request; +}; + +#define EMPTY_MM \ +{ \ + mmap: NULL, \ + mmap_avl: NULL, \ + mmap_cache: NULL, \ + pgd: NULL, \ + mm_users: { 0 }, \ + mm_count: { 0 }, \ + map_count: 0, \ + page_table_lock:{ }, \ + mmlist: { }, \ + start_code: 0, \ + end_code: 0, \ + start_data: 0, \ + end_data: 0, \ + start_brk: 0, \ + brk: 0, \ + start_stack: 0, \ + arg_start: 0, \ + arg_end: 0, \ + env_start: 0, \ + env_end: 0, \ + rss: 0, \ + total_vm: 0, \ + locked_vm: 0, \ + def_flags: 0, \ + cpu_vm_mask: 0, \ + swap_address: 0, \ + context: { NULL } \ +} + +#define INIT_MMAP \ +{ \ + vm_mm: &init_mm, \ + vm_start: 0, \ + vm_end: 0, \ + vm_next: NULL, \ + vm_page_prot: PAGE_SHARED, \ + vm_flags: VM_READ | VM_WRITE | VM_EXEC, \ + vm_avl_height: 0, \ + vm_avl_left: NULL, \ + vm_avl_right: NULL, \ + vm_next_share: NULL, \ + vm_pprev_share: NULL, \ + vm_ops: NULL, \ + vm_pgoff: 0, \ + vm_file: NULL, \ + vm_raend: 0, \ + vm_private_data:NULL \ +} + +#define INIT_THREAD \ +{ \ + extern_pid: -1, \ + tracing: 0, \ + forking: 0, \ + kernel_stack: 0, \ + signal: { \ + state: SIGNAL_NONE, \ + signal: 0, \ + sp: 0, \ + handler:0 \ + }, \ + saved_sigs: { { 0 } }, \ + nsyscalls: 0, \ + process_regs: EMPTY_REGS, \ + syscall_regs: EMPTY_REGS, \ + altstack_regs: EMPTY_REGS, \ + altstack: NULL, \ + altstack_size: 0, \ + cr2: 0, \ + err: 0, \ + repeat_syscall: 0, \ + fault_addr: NULL, \ + brk: NULL, \ + sigreturn_syscall: 0, \ + request: { 0 } \ +} + +#define THREAD_SIZE (2*PAGE_SIZE) + +typedef struct { + unsigned long seg; +} mm_segment_t; + +extern struct task_struct *alloc_task_struct(void); +extern void free_task_struct(struct task_struct *task); + +#define get_task_struct(tsk) atomic_inc(&virt_to_page(tsk)->count) + +extern void release_thread(struct task_struct *); +extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); + +extern inline void release_segments(struct mm_struct *mm) +{ +} + +extern inline void copy_segments(struct task_struct *p, + struct mm_struct *new_mm) +{ +} + +#define forget_segments() do ; while(0) + +extern unsigned long thread_saved_pc(struct thread_struct *t); + +/* +extern unsigned long init_task_ptr; + +#define init_task_u (*((union task_union *) init_task_ptr)) +*/ +#define init_task (init_task_union.task) +#define init_stack (init_task_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); + +#ifndef ARCH_CPUINFO +struct cpuinfo_um { + unsigned long loops_per_sec; + unsigned long *pgd_quick; + unsigned long *pmd_quick; + unsigned long *pte_quick; + unsigned long pgtable_cache_sz; +}; +#endif + +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_EIP(tsk) (0) +#define KSTK_ESP(tsk) (0) +#define get_wchan(p) (0) + +#endif + +/* + * Overrides for Emacs so that we follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-file-style: "linux" + * End: + */ diff -Naur -X exclude-files ac_cur/include/asm-um/processor-i386.h ac/include/asm-um/processor-i386.h --- ac_cur/include/asm-um/processor-i386.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/processor-i386.h Sun Aug 5 14:47:42 2001 @@ -0,0 +1,6 @@ +#ifndef __UM_PROCESSOR_I386_H +#define __UM_PROCESSOR_I386_H + +#include "asm/processor-generic.h" + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/processor-ppc.h ac/include/asm-um/processor-ppc.h --- ac_cur/include/asm-um/processor-ppc.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/processor-ppc.h Sun Aug 5 14:44:26 2001 @@ -0,0 +1,11 @@ +#ifndef __UM_PROCESSOR_PPC_H +#define __UM_PROCESSOR_PPC_H + +#if defined(__ASSEMBLY__) +#define CONFIG_ALL_PPC + +#include "asm/processor-generic.h" + +#endif + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/processor.h ac/include/asm-um/processor.h --- ac_cur/include/asm-um/processor.h Sun Aug 5 14:24:45 2001 +++ ac/include/asm-um/processor.h Wed Dec 31 19:00:00 1969 @@ -1,250 +0,0 @@ -/* - * Copyright (C) 2000 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __UM_PROCESSOR_H -#define __UM_PROCESSOR_H - -struct pt_regs; - -struct task_struct; - -#include "asm/segment.h" -#include "asm/ptrace.h" -#include "asm/arch/signal.h" - -struct mm_struct; - -#define current_text_addr() ((void *) 0) - -#define SIGNAL_NONE 0 -#define SIGNAL_PENDING 1 -#define SIGNAL_HANDLING 2 - -struct thread_struct { - int extern_pid; - int tracing; - int forking; - unsigned long kernel_stack; - struct { - int state; - int signal; - unsigned long sp; - unsigned long handler; - } signal; - sigset_t saved_sigs; - int nsyscalls; - struct sys_pt_regs process_regs; - struct sys_pt_regs syscall_regs; - struct sys_pt_regs altstack_regs; - void *altstack; - int altstack_size; - unsigned long cr2; - int err; - int repeat_syscall; - void *fault_addr; - void *fault_catcher; - void *brk; - int sigreturn_syscall; - struct { - int op; - union { - struct { - int pid; - } fork, exec; - struct { - struct task_struct *to; - struct task_struct *from; - } cswitch; - struct { - int (*proc)(void *); - void *arg; - int flags; - int new_pid; - struct task_struct *new_task; - int cpu; - } thread; - struct { - unsigned long stack; - struct sys_pt_regs regs; - struct task_struct *from; - } fork_finish; - struct { - void (*proc)(void *); - void *arg; - } cb; - struct { - int restore_regs; - } tracing; - } u; - } request; -}; - -#define EMPTY_MM \ -{ \ - mmap: NULL, \ - mmap_avl: NULL, \ - mmap_cache: NULL, \ - pgd: NULL, \ - mm_users: { 0 }, \ - mm_count: { 0 }, \ - map_count: 0, \ - page_table_lock:{ }, \ - mmlist: { }, \ - start_code: 0, \ - end_code: 0, \ - start_data: 0, \ - end_data: 0, \ - start_brk: 0, \ - brk: 0, \ - start_stack: 0, \ - arg_start: 0, \ - arg_end: 0, \ - env_start: 0, \ - env_end: 0, \ - rss: 0, \ - total_vm: 0, \ - locked_vm: 0, \ - def_flags: 0, \ - cpu_vm_mask: 0, \ - swap_address: 0, \ - context: { NULL } \ -} - -#define INIT_MMAP \ -{ \ - vm_mm: &init_mm, \ - vm_start: 0, \ - vm_end: 0, \ - vm_next: NULL, \ - vm_page_prot: PAGE_SHARED, \ - vm_flags: VM_READ | VM_WRITE | VM_EXEC, \ - vm_avl_height: 0, \ - vm_avl_left: NULL, \ - vm_avl_right: NULL, \ - vm_next_share: NULL, \ - vm_pprev_share: NULL, \ - vm_ops: NULL, \ - vm_pgoff: 0, \ - vm_file: NULL, \ - vm_raend: 0, \ - vm_private_data:NULL \ -} - -#define INIT_THREAD \ -{ \ - extern_pid: -1, \ - tracing: 0, \ - forking: 0, \ - kernel_stack: 0, \ - signal: { \ - state: SIGNAL_NONE, \ - signal: 0, \ - sp: 0, \ - handler:0 \ - }, \ - saved_sigs: { { 0 } }, \ - nsyscalls: 0, \ - process_regs: EMPTY_REGS, \ - syscall_regs: EMPTY_REGS, \ - altstack_regs: EMPTY_REGS, \ - altstack: NULL, \ - altstack_size: 0, \ - cr2: 0, \ - err: 0, \ - repeat_syscall: 0, \ - fault_addr: NULL, \ - brk: NULL, \ - sigreturn_syscall: 0, \ - request: { 0 } \ -} - -#define THREAD_SIZE (2*PAGE_SIZE) - -typedef struct { - unsigned long seg; -} mm_segment_t; - -extern struct task_struct *alloc_task_struct(void); -extern void free_task_struct(struct task_struct *task); - -#define get_task_struct(tsk) atomic_inc(&virt_to_page(tsk)->count) - -extern void release_thread(struct task_struct *); -extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); - -extern inline void release_segments(struct mm_struct *mm) -{ -} - -extern inline void copy_segments(struct task_struct *p, - struct mm_struct *new_mm) -{ -} - -#define forget_segments() do ; while(0) - -extern unsigned long thread_saved_pc(struct thread_struct *t); - -/* -extern unsigned long init_task_ptr; - -#define init_task_u (*((union task_union *) init_task_ptr)) -*/ -#define init_task (init_task_union.task) -#define init_stack (init_task_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); - -#ifndef ARCH_CPUINFO -struct cpuinfo_um { - unsigned long loops_per_sec; - unsigned long *pgd_quick; - unsigned long *pmd_quick; - unsigned long *pte_quick; - unsigned long pgtable_cache_sz; -}; -#endif - -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_EIP(tsk) (0) -#define KSTK_ESP(tsk) (0) -#define get_wchan(p) (0) - -#endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff -Naur -X exclude-files ac_cur/include/asm-um/ptrace.h ac/include/asm-um/ptrace.h --- ac_cur/include/asm-um/ptrace.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/ptrace.h Sun Aug 5 14:44:27 2001 @@ -1,6 +1,8 @@ #ifndef __UM_PTRACE_H #define __UM_PTRACE_H +#ifndef __ASSEMBLY__ + #include "asm/current.h" #define pt_regs pt_regs_subarch @@ -24,5 +26,7 @@ unsigned long getreg(struct task_struct *child, unsigned long regno); #define INIT_TASK_SIZE (4 * PAGE_SIZE) + +#endif #endif diff -Naur -X exclude-files ac_cur/include/asm-um/sigcontext-generic.h ac/include/asm-um/sigcontext-generic.h --- ac_cur/include/asm-um/sigcontext-generic.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/sigcontext-generic.h Sun Aug 5 14:44:27 2001 @@ -0,0 +1,6 @@ +#ifndef __UM_SIGCONTEXT_GENERIC_H +#define __UM_SIGCONTEXT_GENERIC_H + +#include "asm/arch/sigcontext.h" + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/sigcontext-i386.h ac/include/asm-um/sigcontext-i386.h --- ac_cur/include/asm-um/sigcontext-i386.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/sigcontext-i386.h Sun Aug 5 14:44:27 2001 @@ -0,0 +1,6 @@ +#ifndef __UM_SIGCONTEXT_I386_H +#define __UM_SIGCONTEXT_I386_H + +#include "asm/sigcontext-generic.h" + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/sigcontext-ppc.h ac/include/asm-um/sigcontext-ppc.h --- ac_cur/include/asm-um/sigcontext-ppc.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/sigcontext-ppc.h Sun Aug 5 14:44:27 2001 @@ -0,0 +1,10 @@ +#ifndef __UM_SIGCONTEXT_PPC_H +#define __UM_SIGCONTEXT_PPC_H + +#define pt_regs sys_pt_regs + +#include "asm/sigcontext-generic.h" + +#undef pt_regs + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/sigcontext.h ac/include/asm-um/sigcontext.h --- ac_cur/include/asm-um/sigcontext.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/sigcontext.h Wed Dec 31 19:00:00 1969 @@ -1,6 +0,0 @@ -#ifndef __UM_SIGCONTEXT_H -#define __UM_SIGCONTEXT_H - -#include "asm/arch/sigcontext.h" - -#endif diff -Naur -X exclude-files ac_cur/include/asm-um/string.h ac/include/asm-um/string.h --- ac_cur/include/asm-um/string.h Sat Aug 4 22:01:05 2001 +++ ac/include/asm-um/string.h Sun Aug 5 14:44:27 2001 @@ -2,5 +2,6 @@ #define __UM_STRING_H #include "asm/arch/string.h" +#include "asm/archparam.h" #endif diff -Naur -X exclude-files ac_cur/include/asm-um/system-generic.h ac/include/asm-um/system-generic.h --- ac_cur/include/asm-um/system-generic.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/system-generic.h Sun Aug 5 14:47:42 2001 @@ -0,0 +1,49 @@ +#ifndef __UM_SYSTEM_GENERIC_H +#define __UM_SYSTEM_GENERIC_H + +#include "asm/arch/system.h" + +#undef prepare_to_switch +#undef switch_to +#undef __save_flags +#undef save_flags +#undef __restore_flags +#undef restore_flags +#undef __cli +#undef __sti +#undef cli +#undef sti +#undef local_irq_save +#undef local_irq_restore +#undef local_irq_disable +#undef local_irq_enable + +#define prepare_to_switch() do ; while(0) + +void *_switch_to(void *prev, void *next); + +#define switch_to(prev, next, last) prev = _switch_to(prev, next) + +extern int set_signals(int enable); +extern void block_signals(void); +extern void unblock_signals(void); + +#define local_irq_save(flags) do { (flags) = set_signals(0); } while(0) + +#define local_irq_restore(flags) do { set_signals(flags); } while(0) + +#define local_irq_enable() unblock_signals() +#define local_irq_disable() block_signals() + +#define __sti() unblock_signals() +#define sti() unblock_signals() +#define __cli() block_signals() +#define cli() block_signals() + +#define __save_flags(x) local_irq_save(x) +#define save_flags(x) __save_flags(x) + +#define __restore_flags(x) local_irq_restore(x) +#define restore_flags(x) __restore_flags(x) + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/system-i386.h ac/include/asm-um/system-i386.h --- ac_cur/include/asm-um/system-i386.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/system-i386.h Sun Aug 5 14:47:42 2001 @@ -0,0 +1,6 @@ +#ifndef __UM_SYSTEM_I386_H +#define __UM_SYSTEM_I386_H + +#include "asm/system-generic.h" + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/system-ppc.h ac/include/asm-um/system-ppc.h --- ac_cur/include/asm-um/system-ppc.h Wed Dec 31 19:00:00 1969 +++ ac/include/asm-um/system-ppc.h Sun Aug 5 14:44:27 2001 @@ -0,0 +1,10 @@ +#ifndef __UM_SYSTEM_PPC_H +#define __UM_SYSTEM_PPC_H + +#define pt_regs sys_pt_regs + +#include "asm/system-generic.h" + +#undef pt_regs + +#endif diff -Naur -X exclude-files ac_cur/include/asm-um/system.h ac/include/asm-um/system.h --- ac_cur/include/asm-um/system.h Sun Aug 5 14:24:45 2001 +++ ac/include/asm-um/system.h Wed Dec 31 19:00:00 1969 @@ -1,49 +0,0 @@ -#ifndef __UM_SYSTEM_H -#define __UM_SYSTEM_H - -#include "asm/arch/system.h" - -#undef prepare_to_switch -#undef switch_to -#undef __save_flags -#undef save_flags -#undef __restore_flags -#undef restore_flags -#undef __cli -#undef __sti -#undef cli -#undef sti -#undef local_irq_save -#undef local_irq_restore -#undef local_irq_disable -#undef local_irq_enable - -#define prepare_to_switch() do ; while(0) - -void *_switch_to(void *prev, void *next); - -#define switch_to(prev, next, last) prev = _switch_to(prev, next) - -extern int set_signals(int enable); -extern void block_signals(void); -extern void unblock_signals(void); - -#define local_irq_save(flags) do { (flags) = set_signals(0); } while(0) - -#define local_irq_restore(flags) do { set_signals(flags); } while(0) - -#define local_irq_enable() unblock_signals() -#define local_irq_disable() block_signals() - -#define __sti() unblock_signals() -#define sti() unblock_signals() -#define __cli() block_signals() -#define cli() block_signals() - -#define __save_flags(x) local_irq_save(x) -#define save_flags(x) __save_flags(x) - -#define __restore_flags(x) local_irq_restore(x) -#define restore_flags(x) __restore_flags(x) - -#endif