diff -Naur uClinux-2.4.4-arm-orig/Makefile uClinux-2.4.4-arm/Makefile --- uClinux-2.4.4-arm-orig/Makefile Wed Sep 5 15:38:39 2001 +++ uClinux-2.4.4-arm/Makefile Wed Sep 5 12:20:56 2001 @@ -5,7 +5,7 @@ KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -# ARCH := armnommu + ARCH := armnommu # ARCH := m68knommu CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ @@ -20,7 +20,7 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer # CROSS_COMPILE = m68k-elf- -# CROSS_COMPILE = arm-linux- + CROSS_COMPILE = arm-linux- # # Include the make variables (CC, etc...) diff -Naur uClinux-2.4.4-arm-orig/arch/armnommu/kernel/setup.c uClinux-2.4.4-arm/arch/armnommu/kernel/setup.c --- uClinux-2.4.4-arm-orig/arch/armnommu/kernel/setup.c Wed Sep 5 15:38:40 2001 +++ uClinux-2.4.4-arm/arch/armnommu/kernel/setup.c Wed Sep 5 14:13:23 2001 @@ -39,7 +39,7 @@ extern void paging_init(struct meminfo *, struct machine_desc *desc); extern void bootmem_init(struct meminfo *); extern void reboot_setup(char *str); -extern unsigned long memparse(char *ptr, char **retptr); +extern unsigned long long memparse(char *ptr, char **retptr); extern int root_mountflags; extern int _stext, _text, _etext, _edata, _end; diff -Naur uClinux-2.4.4-arm-orig/arch/armnommu/kernel/signal.c uClinux-2.4.4-arm/arch/armnommu/kernel/signal.c --- uClinux-2.4.4-arm-orig/arch/armnommu/kernel/signal.c Wed Sep 5 15:38:40 2001 +++ uClinux-2.4.4-arm/arch/armnommu/kernel/signal.c Wed Sep 5 14:18:19 2001 @@ -36,8 +36,8 @@ #define SWI_THUMB_SIGRETURN (0xdf00) #define SWI_THUMB_RT_SIGRETURN (0xdf00) -asmlinkage int sys_wait4(pid_t pid, unsigned long * stat_addr, - int options, unsigned long *ru); +asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, + int options, struct rusage * ru); asmlinkage int do_signal(sigset_t *oldset, struct pt_regs * regs, int syscall); int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from) diff -Naur uClinux-2.4.4-arm-orig/arch/armnommu/nwfpe/ARM-gcc.h uClinux-2.4.4-arm/arch/armnommu/nwfpe/ARM-gcc.h --- uClinux-2.4.4-arm-orig/arch/armnommu/nwfpe/ARM-gcc.h Thu Jan 1 05:30:00 1970 +++ uClinux-2.4.4-arm/arch/armnommu/nwfpe/ARM-gcc.h Thu Jun 17 13:41:35 1999 @@ -0,0 +1,128 @@ + +/* +------------------------------------------------------------------------------- +One of the macros `BIGENDIAN' or `LITTLEENDIAN' must be defined. +------------------------------------------------------------------------------- +*/ +#define LITTLEENDIAN + +/* +------------------------------------------------------------------------------- +The macro `BITS64' can be defined to indicate that 64-bit integer types are +supported by the compiler. +------------------------------------------------------------------------------- +*/ +#define BITS64 + +/* +------------------------------------------------------------------------------- +Each of the following `typedef's defines the most convenient type that holds +integers of at least as many bits as specified. For example, `uint8' should +be the most convenient type that can hold unsigned integers of as many as +8 bits. The `flag' type must be able to hold either a 0 or 1. For most +implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed +to the same as `int'. +------------------------------------------------------------------------------- +*/ +typedef char flag; +typedef unsigned char uint8; +typedef signed char int8; +typedef int uint16; +typedef int int16; +typedef unsigned int uint32; +typedef signed int int32; +#ifdef BITS64 +typedef unsigned long long int bits64; +typedef signed long long int sbits64; +#endif + +/* +------------------------------------------------------------------------------- +Each of the following `typedef's defines a type that holds integers +of _exactly_ the number of bits specified. For instance, for most +implementation of C, `bits16' and `sbits16' should be `typedef'ed to +`unsigned short int' and `signed short int' (or `short int'), respectively. +------------------------------------------------------------------------------- +*/ +typedef unsigned char bits8; +typedef signed char sbits8; +typedef unsigned short int bits16; +typedef signed short int sbits16; +typedef unsigned int bits32; +typedef signed int sbits32; +#ifdef BITS64 +typedef unsigned long long int uint64; +typedef signed long long int int64; +#endif + +#ifdef BITS64 +/* +------------------------------------------------------------------------------- +The `LIT64' macro takes as its argument a textual integer literal and if +necessary ``marks'' the literal as having a 64-bit integer type. For +example, the Gnu C Compiler (`gcc') requires that 64-bit literals be +appended with the letters `LL' standing for `long long', which is `gcc's +name for the 64-bit integer type. Some compilers may allow `LIT64' to be +defined as the identity macro: `#define LIT64( a ) a'. +------------------------------------------------------------------------------- +*/ +#define LIT64( a ) a##LL +#endif + +/* +------------------------------------------------------------------------------- +The macro `INLINE' can be used before functions that should be inlined. If +a compiler does not support explicit inlining, this macro should be defined +to be `static'. +------------------------------------------------------------------------------- +*/ +#define INLINE extern __inline__ + + +/* For use as a GCC soft-float library we need some special function names. */ + +#ifdef __LIBFLOAT__ + +/* Some 32-bit ops can be mapped straight across by just changing the name. */ +#define float32_add __addsf3 +#define float32_sub __subsf3 +#define float32_mul __mulsf3 +#define float32_div __divsf3 +#define int32_to_float32 __floatsisf +#define float32_to_int32_round_to_zero __fixsfsi +#define float32_to_uint32_round_to_zero __fixunssfsi + +/* These ones go through the glue code. To avoid namespace pollution + we rename the internal functions too. */ +#define float32_eq ___float32_eq +#define float32_le ___float32_le +#define float32_lt ___float32_lt + +/* All the 64-bit ops have to go through the glue, so we pull the same + trick. */ +#define float64_add ___float64_add +#define float64_sub ___float64_sub +#define float64_mul ___float64_mul +#define float64_div ___float64_div +#define int32_to_float64 ___int32_to_float64 +#define float64_to_int32_round_to_zero ___float64_to_int32_round_to_zero +#define float64_to_uint32_round_to_zero ___float64_to_uint32_round_to_zero +#define float64_to_float32 ___float64_to_float32 +#define float32_to_float64 ___float32_to_float64 +#define float64_eq ___float64_eq +#define float64_le ___float64_le +#define float64_lt ___float64_lt + +#if 0 +#define float64_add __adddf3 +#define float64_sub __subdf3 +#define float64_mul __muldf3 +#define float64_div __divdf3 +#define int32_to_float64 __floatsidf +#define float64_to_int32_round_to_zero __fixdfsi +#define float64_to_uint32_round_to_zero __fixunsdfsi +#define float64_to_float32 __truncdfsf2 +#define float32_to_float64 __extendsfdf2 +#endif + +#endif diff -Naur uClinux-2.4.4-arm-orig/include/asm-armnommu/semaphore.h uClinux-2.4.4-arm/include/asm-armnommu/semaphore.h --- uClinux-2.4.4-arm-orig/include/asm-armnommu/semaphore.h Wed Sep 5 15:38:44 2001 +++ uClinux-2.4.4-arm/include/asm-armnommu/semaphore.h Wed Sep 5 14:54:41 2001 @@ -142,6 +142,21 @@ */ struct rw_semaphore { atomic_t count; +/* HanishKVC - 5 Sep 2001 +* Picked up from i386 rwsem implementation. +* Haven't verified properly, but should be ok +* has in generic parts of Linux kernel when RWSEM is +* initialized with out a Count specified, its set +* to RWSEM_UNLOCKED_VALUE. +* A new RWSEM_INITIALIZER has been defined to provide +* support for Count specification +* */ +#define RWSEM_UNLOCKED_VALUE 0x00000000 +#define RWSEM_ACTIVE_BIAS 0x00000001 +#define RWSEM_ACTIVE_MASK 0x0000ffff +#define RWSEM_WAITING_BIAS (-0x00010000) +#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS +#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS) volatile unsigned char write_bias_granted; volatile unsigned char read_bias_granted; volatile unsigned char pad1; @@ -161,13 +176,18 @@ #define __RWSEM_DEBUG_INIT /* */ #endif -#define __RWSEM_INITIALIZER(name,count) \ -{ ATOMIC_INIT(count), 0, 0, 0, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ +#define __RWSEM_INITIALIZER(name) \ +{ ATOMIC_INIT(RWSEM_UNLOCKED_VALUE), 0, 0, 0, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ __WAIT_QUEUE_HEAD_INITIALIZER((name).write_bias_wait) \ __SEM_DEBUG_INIT(name) __RWSEM_DEBUG_INIT } +#define __RWSEM_INITIALIZER_WITH_COUNT(name,count) \ +{ ATOMIC_INIT(count), 0, 0, 0, 0, __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ + __WAIT_QUEUE_HEAD_INITIALIZER((name).write_bias_wait) \ + __SEM_DEBUG_INIT(name) __RWSEM_DEBUG_INIT } + #define __DECLARE_RWSEM_GENERIC(name,count) \ - struct rw_semaphore name = __RWSEM_INITIALIZER(name,count) + struct rw_semaphore name = __RWSEM_INITIALIZER_WITH_COUNT(name,count) #define DECLARE_RWSEM(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS) #define DECLARE_RWSEM_READ_LOCKED(name) __DECLARE_RWSEM_GENERIC(name,RW_LOCK_BIAS-1) diff -Naur uClinux-2.4.4-arm-orig/include/asm-armnommu/socket.h uClinux-2.4.4-arm/include/asm-armnommu/socket.h --- uClinux-2.4.4-arm-orig/include/asm-armnommu/socket.h Wed Sep 5 15:38:44 2001 +++ uClinux-2.4.4-arm/include/asm-armnommu/socket.h Wed Sep 5 14:08:45 2001 @@ -43,6 +43,8 @@ #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP +#define SO_ACCEPTCONN 30 + /* Nast libc5 fixup - bletch */ #if defined(__KERNEL__) /* Socket types. */ diff -Naur uClinux-2.4.4-arm-orig/include/asm-armnommu/unistd.h uClinux-2.4.4-arm/include/asm-armnommu/unistd.h --- uClinux-2.4.4-arm-orig/include/asm-armnommu/unistd.h Wed Sep 5 15:38:44 2001 +++ uClinux-2.4.4-arm/include/asm-armnommu/unistd.h Wed Sep 5 13:09:47 2001 @@ -400,7 +400,7 @@ static inline pid_t waitpid(pid_t pid, int *wait_stat, int options) { - extern long sys_wait4(int, int *, int, struct rusage *); + extern long sys_wait4(pid_t, unsigned int *, int, struct rusage *); return sys_wait4((int)pid, wait_stat, options, NULL); } @@ -412,7 +412,7 @@ static inline pid_t wait(int * wait_stat) { - extern long sys_wait4(int, int *, int, struct rusage *); + extern long sys_wait4(pid_t, unsigned int *, int, struct rusage *); return sys_wait4(-1, wait_stat, 0, NULL); } diff -Naur uClinux-2.4.4-arm-orig/include/linux/mm.h uClinux-2.4.4-arm/include/linux/mm.h --- uClinux-2.4.4-arm-orig/include/linux/mm.h Wed Sep 5 15:38:45 2001 +++ uClinux-2.4.4-arm/include/linux/mm.h Wed Sep 5 14:55:02 2001 @@ -416,7 +416,9 @@ extern void vmtruncate(struct inode * inode, loff_t offset); extern pmd_t *FASTCALL(__pmd_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)); +#ifndef CONFIG_UCLINUX extern pte_t *FASTCALL(pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address)); +#endif extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsigned long address, int write_access); extern int make_pages_present(unsigned long addr, unsigned long end); extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);