diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-07 15:45:24 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-07 15:45:24 +0000 |
commit | 9f9f3e6e8548a596697778337110a423c384b6f3 (patch) | |
tree | 5dd4b290ef532cf5ecb058e1a92cd3435afeac8c /arch/arm | |
parent | d5c9a365ee7d2fded249aa5abfc5e89587583029 (diff) |
Merge with Linux 2.3.49.
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 9 | ||||
-rw-r--r-- | arch/arm/boot/compressed/head-sa1100.S | 61 | ||||
-rw-r--r-- | arch/arm/config.in | 12 | ||||
-rw-r--r-- | arch/arm/kernel/arthur.c | 60 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armo.S | 20 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 20 | ||||
-rw-r--r-- | arch/arm/kernel/entry-common.S | 47 | ||||
-rw-r--r-- | arch/arm/kernel/hw-footbridge.c | 16 | ||||
-rw-r--r-- | arch/arm/kernel/irq.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/leds-footbridge.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/sys_arm.c | 23 | ||||
-rw-r--r-- | arch/arm/lib/findbit.S | 4 | ||||
-rw-r--r-- | arch/arm/lib/getconsdata.c | 2 | ||||
-rw-r--r-- | arch/arm/lib/strrchr.S | 2 | ||||
-rw-r--r-- | arch/arm/mm/consistent.c | 19 | ||||
-rw-r--r-- | arch/arm/mm/fault-armv.c | 4 | ||||
-rw-r--r-- | arch/arm/mm/fault-common.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/mm-armv.c | 8 | ||||
-rw-r--r-- | arch/arm/mm/mm-nexuspci.c | 20 | ||||
-rw-r--r-- | arch/arm/vmlinux-armo.lds.in | 5 | ||||
-rw-r--r-- | arch/arm/vmlinux-armv.lds.in | 35 |
22 files changed, 242 insertions, 137 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index d2992a491..d92f2b093 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -46,13 +46,12 @@ endif ifeq ($(CONFIG_ARCH_SA1100),y) OBJS += head-sa1100.o -ifeq ($(CONFIG_SA1100_VICTOR),y) -ZTEXTADDR = 0x00002000 -ZBSSADDR = 0xc0100000 -else ZTEXTADDR = 0xc0008000 -endif ZRELADDR = 0xc0008000 +ifeq ($(CONFIG_SA1100_VICTOR),y) + ZTEXTADDR = 0x00002000 + ZBSSADDR = 0xc0100000 +endif endif # diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S index 90018e52b..4464157c3 100644 --- a/arch/arm/boot/compressed/head-sa1100.S +++ b/arch/arm/boot/compressed/head-sa1100.S @@ -11,6 +11,8 @@ .section ".start", #alloc, #execinstr +__SA1100_start: + #ifndef CONFIG_ARCH_SA1100 #error What am I doing here... #endif @@ -58,6 +60,65 @@ orr r0, r0, #0x1000 @ set Icache mcr p15, 0, r0, c1, c0, 0 +#ifdef CONFIG_SA1100_BRUTUS + @ Initialize UART1 for early serial communication + @ since UART3 is used by angelboot. It is routed to + @ alternate GPIO functions on Brutus. + b 1f + +GPIO_BASE: .long 0x90040000 +#define GPDR 0x04 +#define GAFR 0x1c + +PPC_BASE: .long 0x90060000 +#define PPAR 0x08 + +UART1_BASE: .long 0x80010000 +#define UTCR0 0x00 +#define UTCR1 0x04 +#define UTCR2 0x08 +#define UTCR3 0x0c +#define UTSR0 0x1c +#define UTSR1 0x20 + +#define BAUD_DIV_230400 0x000 +#define BAUD_DIV_115200 0x001 +#define BAUD_DIV_57600 0x003 +#define BAUD_DIV_38400 0x005 +#define BAUD_DIV_19200 0x00b +#define BAUD_DIV_9600 0x017 +#define BAUD_DIV BAUD_DIV_9600 + +1: ldr r0, GPIO_BASE + ldr r1, [r0, #GPDR] + bic r1, r1, #1<<15 + orr r1, r1, #1<<14 + str r1, [r0, #GPDR] + ldr r1, [r0, #GAFR] + orr r1, r1, #(1<<15)|(1<<14) + str r1, [r0, #GAFR] + ldr r0, PPC_BASE + ldr r1, [r0, #PPAR] + orr r1, r1, #1<<12 + str r1, [r0, #PPAR] + ldr r0, UART1_BASE +1: ldr r1, [r0, #UTSR1] + tst r1, #1<<0 @ TBY + bne 1b + mov r1, #0 + str r1, [r0, #UTCR3] + mov r1, #0x08 @ 8N1 + str r1, [r0, #UTCR0] + mov r1, #BAUD_DIV + str r1, [r0, #UTCR2] + mov r1, r1, lsr #8 + str r1, [r0, #UTCR1] + mov r1, #0x03 @ RXE + TXE + str r1, [r0, #UTCR3] + mov r1, #0xff @ flush status reg + str r1, [r0, #UTSR0] +#endif + @ set registers for entry mov r0, #0 mov r1, #16 diff --git a/arch/arm/config.in b/arch/arm/config.in index be7102698..5e9cc8bfc 100644 --- a/arch/arm/config.in +++ b/arch/arm/config.in @@ -92,6 +92,8 @@ else if [ "$CONFIG_ARCH_EBSA110" = "y" -o \ "$CONFIG_ARCH_SA1100" = "y" -o \ "$CONFIG_FOOTBRIDGE" = "y" -o \ + "$CONFIG_ARCH_TBOX" = "y" -o \ + "$CONFIG_ARCH_SHARK" = "y" -o \ "$CONFIG_ARCH_NEXUSPCI" = "y" ]; then define_bool CONFIG_CPU_32v4 y if [ "$CONFIG_ARCH_SA1100" = "y" ]; then @@ -122,6 +124,7 @@ fi # These machines have ISA-DMA # if [ "$CONFIG_CATS" = "y" -o \ + "$CONFIG_ARCH_SHARK" = "y" -o \ "$CONFIG_ARCH_NETWINDER" = "y" ]; then define_bool CONFIG_ISA_DMA y else @@ -186,6 +189,8 @@ if [ "$CONFIG_ARCH_NETWINDER" = "y" -o \ fi endmenu +source drivers/ieee1394/Config.in + source drivers/i2o/Config.in source drivers/pnp/Config.in @@ -209,6 +214,8 @@ fi source drivers/usb/Config.in +source drivers/misc/Config.in + if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' @@ -256,7 +263,10 @@ if [ "$CONFIG_SCSI" != "n" ]; then fi endmenu -if [ "$CONFIG_ARCH_ACORN" = "y" -o "$CONFIG_PCI" = "y" ]; then +if [ "$CONFIG_ARCH_ACORN" = "y" -o \ + "$CONFIG_ARCH_CLPS7500" = "y" -o \ + "$CONFIG_ARCH_SHARK" = "y" -o \ + "$CONFIG_PCI" = "y" ]; then mainmenu_option next_comment comment 'Sound' diff --git a/arch/arm/kernel/arthur.c b/arch/arm/kernel/arthur.c index 9994fdd4a..77c7d7396 100644 --- a/arch/arm/kernel/arthur.c +++ b/arch/arm/kernel/arthur.c @@ -1,6 +1,6 @@ /* * Arthur personality - * Copyright (C) 1998 Philip Blundell + * Copyright (C) 1998-1999 Philip Blundell */ #include <linux/personality.h> @@ -8,35 +8,36 @@ #include <linux/stddef.h> #include <linux/signal.h> #include <linux/sched.h> +#include <linux/init.h> #include <asm/ptrace.h> -/* RISC OS doesn't have many signals, and a lot of those that it does +/* Arthur doesn't have many signals, and a lot of those that it does have don't map easily to any Linux equivalent. Never mind. */ -#define RISCOS_SIGABRT 1 -#define RISCOS_SIGFPE 2 -#define RISCOS_SIGILL 3 -#define RISCOS_SIGINT 4 -#define RISCOS_SIGSEGV 5 -#define RISCOS_SIGTERM 6 -#define RISCOS_SIGSTAK 7 -#define RISCOS_SIGUSR1 8 -#define RISCOS_SIGUSR2 9 -#define RISCOS_SIGOSERROR 10 +#define ARTHUR_SIGABRT 1 +#define ARTHUR_SIGFPE 2 +#define ARTHUR_SIGILL 3 +#define ARTHUR_SIGINT 4 +#define ARTHUR_SIGSEGV 5 +#define ARTHUR_SIGTERM 6 +#define ARTHUR_SIGSTAK 7 +#define ARTHUR_SIGUSR1 8 +#define ARTHUR_SIGUSR2 9 +#define ARTHUR_SIGOSERROR 10 -static unsigned long riscos_to_linux_signals[32] = { +static unsigned long arthur_to_linux_signals[32] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; -static unsigned long linux_to_riscos_signals[32] = { - 0, -1, RISCOS_SIGINT, -1, - RISCOS_SIGILL, 5, RISCOS_SIGABRT, 7, - RISCOS_SIGFPE, 9, RISCOS_SIGUSR1, RISCOS_SIGSEGV, - RISCOS_SIGUSR2, 13, 14, RISCOS_SIGTERM, +static unsigned long linux_to_arthur_signals[32] = { + 0, -1, ARTHUR_SIGINT, -1, + ARTHUR_SIGILL, 5, ARTHUR_SIGABRT, 7, + ARTHUR_SIGFPE, 9, ARTHUR_SIGUSR1, ARTHUR_SIGSEGV, + ARTHUR_SIGUSR2, 13, 14, ARTHUR_SIGTERM, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, @@ -52,12 +53,12 @@ static void arthur_lcall7(int nr, struct pt_regs *regs) send_sig_info(SIGSWI, &info, current); } -static struct exec_domain riscos_exec_domain = { +static struct exec_domain arthur_exec_domain = { "Arthur", /* name */ (lcall7_func)arthur_lcall7, PER_RISCOS, PER_RISCOS, - riscos_to_linux_signals, - linux_to_riscos_signals, + arthur_to_linux_signals, + linux_to_arthur_signals, #ifdef MODULE &__this_module, /* No usage counter. */ #else @@ -71,18 +72,15 @@ static struct exec_domain riscos_exec_domain = { * processes are using it. */ -#ifdef MODULE -int init_module(void) -#else -int initialise_arthur(void) -#endif +int __init arthur_init(void) { - return register_exec_domain(&riscos_exec_domain); + return register_exec_domain(&arthur_exec_domain); } -#ifdef MODULE -void cleanup_module(void) +void __exit arthur_exit(void) { - unregister_exec_domain(&riscos_exec_domain); + unregister_exec_domain(&arthur_exec_domain); } -#endif + +module_init(arthur_init); +module_exit(arthur_exit); diff --git a/arch/arm/kernel/entry-armo.S b/arch/arm/kernel/entry-armo.S index f2dc9e36c..d6fa94867 100644 --- a/arch/arm/kernel/entry-armo.S +++ b/arch/arm/kernel/entry-armo.S @@ -22,6 +22,7 @@ * adhering to the above criteria. */ #include <linux/linkage.h> +#include <linux/config.h> #include <asm/assembler.h> #include <asm/errno.h> @@ -29,6 +30,12 @@ #include "../lib/constants.h" + .macro zero_fp +#ifdef CONFIG_FRAME_POINTER + mov fp, #0 +#endif + .endm + .text @ Offsets into task structure @@ -213,7 +220,7 @@ irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10 stmfd sp!, {r0 - r12} ;\ mov r0, #-1 ;\ str r0, [sp, #S_OLD_R0] ;\ - mov fp, #0 + zero_fp #define SVC_IRQ_SAVE_ALL \ str sp, [sp, #-16]! ;\ @@ -224,7 +231,7 @@ irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10 stmfd sp!, {r0 - r12} ;\ mov r0, #-1 ;\ str r0, [sp, #S_OLD_R0] ;\ - mov fp, #0 + zero_fp #define SVC_RESTORE_ALL \ ldmfd sp, {r0 - pc}^ @@ -261,7 +268,7 @@ vector_undefinstr: tst lr,#3 bne __und_svc save_user_regs - mov fp, #0 + zero_fp teqp pc, #I_BIT | MODE_SVC .Lbug_undef: ldr r4, .LC2 @@ -283,6 +290,10 @@ __und_svc: SVC_SAVE_ALL @ Non-user mode bl SYMBOL_NAME(do_undefinstr) SVC_RESTORE_ALL +#ifdef CONFIG_NWFPE + /* The FPE is always present */ + .equ fpe_not_present, 0 +#else /* We get here if an undefined instruction happens and the floating * point emulator is not present. If the offending instruction was * a WFS, we just perform a normal return as if we had emulated the @@ -319,6 +330,7 @@ wfs_mask_data: .word 0x0e200110 @ WFS/RFS .word 0x0d0d0100 @ LDF [sp]/STF [sp] .word 0x0d0b0100 @ LDF [fp]/STF [fp] .word 0x0f0f0f00 +#endif .LC2: .word SYMBOL_NAME(fp_enter) @@ -686,7 +698,7 @@ ENTRY(__switch_to) /* * initialise the trap system */ -ENTRY(trap_init) +ENTRY(__trap_init) stmfd sp!, {r4 - r7, lr} adr r1, .Ljump_addresses ldmia r1, {r1 - r7, ip, lr} diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index f4f03ee93..fe3939888 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -24,6 +24,12 @@ #define MODE_SVC 0x13 #endif + .macro zero_fp +#ifdef CONFIG_FRAME_POINTER + mov fp, #0 +#endif + .endm + .text #define PF_TRACESYS 0x20 @@ -421,7 +427,7 @@ __und_invalid: sub sp, sp, #S_FRAME_SIZE ldr r4, .LCund mov r1, #BAD_UNDEFINSTR @ int reason -1: mov fp, #0 +1: zero_fp ldmia r4, {r5 - r7} @ Get XXX pc, cpsr, old_r0 add r4, sp, #S_PC stmia r4, {r5 - r7} @ Save XXX pc, cpsr, old_r0 @@ -573,7 +579,7 @@ __dabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go stmia r3, {r0 - r2} @ Save USR pc, cpsr, old_r0 stmdb r3, {sp, lr}^ alignment_trap r4, r7, __temp_abt - mov fp, #0 + zero_fp #ifdef MULTI_CPU ldr r2, .LCprocfns mov lr, pc @@ -595,7 +601,7 @@ __irq_usr: sub sp, sp, #S_FRAME_SIZE stmia r8, {r5 - r7} @ save pc, psr, old_r0 stmdb r8, {sp, lr}^ alignment_trap r4, r7, __temp_irq - mov fp, #0 + zero_fp 1: get_irqnr_and_base r0, r6, r5 movne r1, sp adrsvc ne, lr, 1b @@ -615,7 +621,7 @@ __und_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go stmia r8, {r5 - r7} @ Save USR pc, cpsr, old_r0 stmdb r8, {sp, lr}^ @ Save user r0 - r12 alignment_trap r4, r7, __temp_und - mov fp, #0 + zero_fp adrsvc al, r9, ret_from_sys_call @ r9 = normal FP return adrsvc al, lr, fpundefinstr @ lr = undefined instr return @@ -641,7 +647,7 @@ __pabt_usr: sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go stmia r8, {r5 - r7} @ Save USR pc, cpsr, old_r0 stmdb r8, {sp, lr}^ @ Save sp_usr lr_usr alignment_trap r4, r7, __temp_abt - mov fp, #0 + zero_fp msr cpsr_c, #MODE_SVC @ Enable interrupts mov r0, r5 @ address (pc) mov r1, sp @ regs @@ -688,11 +694,11 @@ t: .ascii "Prefetch -> undefined instruction\n\0" ENTRY(__switch_to) stmfd sp!, {r4 - sl, fp, lr} @ Store most regs on stack mrs ip, cpsr - stmfd sp!, {ip} @ Save cpsr_SVC + str ip, [sp, #-4]! @ Save cpsr_SVC str sp, [r0, #TSS_SAVE] @ Save sp_SVC ldr sp, [r1, #TSS_SAVE] @ Get saved sp_SVC ldr r2, [r1, #TSS_DOMAIN] - ldmfd sp!, {ip} + ldr ip, [sp], #4 mcr p15, 0, r2, c3, c0 @ Set domain register msr spsr, ip @ Save tasks CPSR into SPSR for this return ldmfd sp!, {r4 - sl, fp, pc}^ @ Load all regs saved previously diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 5dc61c6d7..97dfef0c1 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S @@ -4,16 +4,6 @@ */ #define S_OFF 8 -#define SYSCALL_REGS r4, r5 - -/* - * Define to favour ARM8, ARM9 and StrongARM cpus. This says that it is - * cheaper to use two LDR instructions than a two-register LDM, if the - * latter would entail calculating an address specially. - */ -#if defined(CONFIG_CPU_SA110) -#define HARVARD_CACHE -#endif .macro get_softirq, rd #ifdef __SMP__ @@ -85,7 +75,7 @@ tip .req r7 @ temporary IP .align 5 vector_swi: save_user_regs mask_pc lr, lr - mov fp, #0 + zero_fp ldr scno, [lr, #-4] @ get SWI instruction arm700_bug_check scno, ip #ifdef CONFIG_ALIGNMENT_TRAP @@ -95,9 +85,7 @@ vector_swi: save_user_regs #endif enable_irqs ip - stmdb sp!, {SYSCALL_REGS} @ new style: (r0 = arg1, r4 = arg5, r5 = arg6) - @ Note that we dont have to handle - @ sys_syscalls arg7 here + str r4, [sp, #-S_OFF]! @ push fifth arg adrsvc al, lr, fast_syscall_return bic scno, scno, #0xff000000 @ mask off SWI op-code @@ -141,10 +129,11 @@ vector_swi: save_user_regs b SYMBOL_NAME(deferred) .align 5 - + .type __softirq_state, #object __softirq_state: .word SYMBOL_NAME(softirq_state) + .type sys_call_table, #object ENTRY(sys_call_table) #include "calls.S" @@ -153,15 +142,18 @@ ENTRY(sys_call_table) */ @ r0 = syscall number @ r5 = syscall table + .type sys_syscall, #function SYMBOL_NAME(sys_syscall): eor scno, r0, #OS_NUMBER << 20 cmp scno, #NR_syscalls @ check range add ip, sp, #S_OFF - ldmleib ip, {r0 - r3, SYSCALL_REGS} @ get our args - stmleia sp, {SYSCALL_REGS} @ Put our arg on the stack + stmleia sp, {r5, r6} @ shuffle args + movle r0, r1 + movle r1, r2 + movle r2, r3 + movle r3, r4 ldrle pc, [tbl, scno, lsl #2] - mov r0, #-ENOSYS - RETINSTR(mov,pc,lr) + b sys_ni_syscall sys_fork_wrapper: add r0, sp, #S_OFF @@ -199,6 +191,23 @@ sys_sigaltstack_wrapper: ldr r2, [sp, #S_OFF + S_SP] b do_sigaltstack +/* + * Note: off_4k (r5) is always units of 4K. If we can't do the requested + * offset, we return EINVAL. + */ +sys_mmap2: +#if PAGE_SHIFT > 12 + tst r5, #PGOFF_MASK + moveq r5, r5, lsr #PGOFF_SHIFT + streq r5, [sp, #4] + beq do_mmap2 + mov r0, #-EINVAL + RETINSTR(mov,pc, lr) +#else + str r5, [sp, #4] + b do_mmap2 +#endif + .data ENTRY(fp_enter) diff --git a/arch/arm/kernel/hw-footbridge.c b/arch/arm/kernel/hw-footbridge.c index e06c8092d..8dcad0b93 100644 --- a/arch/arm/kernel/hw-footbridge.c +++ b/arch/arm/kernel/hw-footbridge.c @@ -68,13 +68,13 @@ static inline void wb977_ww(int reg, int val) /* * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE */ -spinlock_t __netwinder_data gpio_lock = SPIN_LOCK_UNLOCKED; +spinlock_t gpio_lock = SPIN_LOCK_UNLOCKED; -static unsigned int __netwinder_data current_gpio_op = 0; -static unsigned int __netwinder_data current_gpio_io = 0; -static unsigned int __netwinder_data current_cpld = 0; +static unsigned int current_gpio_op = 0; +static unsigned int current_gpio_io = 0; +static unsigned int current_cpld = 0; -void __netwinder_text gpio_modify_op(int mask, int set) +void gpio_modify_op(int mask, int set) { unsigned int new_gpio, changed; @@ -119,7 +119,7 @@ static inline void __gpio_modify_io(int mask, int in) } } -void __netwinder_text gpio_modify_io(int mask, int in) +void gpio_modify_io(int mask, int in) { /* Open up the SuperIO chip */ wb977_open(); @@ -130,7 +130,7 @@ void __netwinder_text gpio_modify_io(int mask, int in) wb977_close(); } -int __netwinder_text gpio_read(void) +int gpio_read(void) { return inb(GP1_IO_BASE) | inb(GP2_IO_BASE) << 8; } @@ -360,7 +360,7 @@ static void __init wb977_init(void) wb977_close(); } -void __netwinder_text cpld_modify(int mask, int set) +void cpld_modify(int mask, int set) { int msk; diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 6e3c863d5..699cea4ab 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c @@ -471,6 +471,10 @@ out: return irq_found; } +void __init init_irq_proc(void) +{ +} + void __init init_IRQ(void) { extern void init_dma(void); diff --git a/arch/arm/kernel/leds-footbridge.c b/arch/arm/kernel/leds-footbridge.c index 90f2fe109..05f232f57 100644 --- a/arch/arm/kernel/leds-footbridge.c +++ b/arch/arm/kernel/leds-footbridge.c @@ -37,7 +37,7 @@ extern spinlock_t gpio_lock; #ifdef CONFIG_FOOTBRIDGE -static void __ebsa285_text ebsa285_leds_event(led_event_t evt) +static void ebsa285_leds_event(led_event_t evt) { unsigned long flags; @@ -129,7 +129,7 @@ static void __ebsa285_text ebsa285_leds_event(led_event_t evt) #ifdef CONFIG_ARCH_NETWINDER -static void __netwinder_text netwinder_leds_event(led_event_t evt) +static void netwinder_leds_event(led_event_t evt) { unsigned long flags; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index a2f7292f6..5815529aa 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -767,6 +767,8 @@ void __init setup_arch(char **cmdline_p) setup_bootmem(); request_standard_resources(mdesc); + paging_init(); + #ifdef CONFIG_VT #if defined(CONFIG_VGA_CONSOLE) conswitchp = &vga_con; diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 47b2930c2..9abb9e617 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c @@ -50,7 +50,7 @@ asmlinkage int sys_pipe(unsigned long * fildes) } /* common code for old and new mmaps */ -static inline long do_mmap2( +inline long do_mmap2( unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff) @@ -79,27 +79,6 @@ out: return error; } -#define PGOFF_SHIFT (PAGE_SHIFT - 12) -#define PGOFF_MASK (~((1 << PGOFF_SHIFT) - 1)) - -/* - * Note: off_4k is always units of 4K. If we can't do the requested - * offset, we return EINVAL. - */ -asmlinkage long -sys_mmap2(unsigned long addr, unsigned long len, unsigned long prot, - unsigned long flags, unsigned long fd, unsigned long off_4k) -{ - unsigned long pgoff; - - if (off_4k & ~PGOFF_MASK) - return -EINVAL; - - pgoff = off_4k >> PGOFF_SHIFT; - - return do_mmap2(addr, len, prot, flags, fd, pgoff); -} - struct mmap_arg_struct { unsigned long addr; unsigned long len; diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S index e1651904f..3544ac89d 100644 --- a/arch/arm/lib/findbit.S +++ b/arch/arm/lib/findbit.S @@ -53,10 +53,10 @@ ENTRY(find_next_zero_bit) beq Lfindzbit1lp @ If new byte, goto old routine ldrb r3, [r0, r2, lsr#3] orr r3, r3, #0xFF00 @ Set top bits so we wont get confused - stmfd sp!, {r4} + str r4, [sp, #-4]! and r4, r2, #7 mov r3, r3, lsr r4 @ Shift right by no. of bits - ldmfd sp!, {r4} + ldr r4, [sp], #4 and r3, r3, #0xFF teq r3, #0xFF orreq r2, r2, #7 diff --git a/arch/arm/lib/getconsdata.c b/arch/arm/lib/getconsdata.c index aaa7a7ad2..8b6a0affa 100644 --- a/arch/arm/lib/getconsdata.c +++ b/arch/arm/lib/getconsdata.c @@ -91,3 +91,5 @@ unsigned long PAGE_SZ = PAGE_SIZE; unsigned long KSWI_BASE = 0x900000; unsigned long KSWI_SYS_BASE = 0x9f0000; unsigned long SYS_ERROR0 = 0x9f0000; +unsigned long PGOFF_SHIFT = PAGE_SHIFT - 12; +unsigned long PGOFF_MASK = (1 << (PAGE_SHIFT - 12)) - 1; diff --git a/arch/arm/lib/strrchr.S b/arch/arm/lib/strrchr.S index ad5a46089..c9145d7af 100644 --- a/arch/arm/lib/strrchr.S +++ b/arch/arm/lib/strrchr.S @@ -12,7 +12,7 @@ .text ENTRY(strrchr) - stmfd sp!, {lr} + str lr, [sp, #-4]! mov r3, #0 1: ldrb r2, [r0], #1 teq r2, r1 diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c index 7101b2936..76d1a5c74 100644 --- a/arch/arm/mm/consistent.c +++ b/arch/arm/mm/consistent.c @@ -1,13 +1,14 @@ /* * Dynamic DMA mapping support. */ - +#include <linux/config.h> #include <linux/types.h> #include <linux/mm.h> #include <linux/string.h> #include <linux/vmalloc.h> #include <linux/interrupt.h> #include <linux/errno.h> +#include <linux/pci.h> #include <asm/io.h> #include <asm/pgalloc.h> @@ -49,6 +50,22 @@ no_page: return NULL; } +void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *handle) +{ + void *__ret; + int __gfp = GFP_KERNEL; + +#ifdef CONFIG_PCI + if ((hwdev) == NULL || + (hwdev)->dma_mask != 0xffffffff) +#endif + __gfp |= GFP_DMA; + + __ret = consistent_alloc(__gfp, (size), + (handle)); + return __ret; +} + /* * free a page as defined by the above mapping. We expressly forbid * calling this from interrupt context. diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 5151591b8..4a23d14bd 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c @@ -351,7 +351,7 @@ do_sect_fault(unsigned long addr, int error_code, struct pt_regs *regs) #endif -static struct fsr_info { +static const struct fsr_info { int (*fn)(unsigned long addr, int error_code, struct pt_regs *regs); int sig; char *name; @@ -384,7 +384,7 @@ static struct fsr_info { asmlinkage void do_DataAbort(unsigned long addr, int fsr, int error_code, struct pt_regs *regs) { - struct fsr_info *inf; + const struct fsr_info *inf; if (user_mode(regs) && addr == regs->ARM_pc) { static int first = 1; diff --git a/arch/arm/mm/fault-common.c b/arch/arm/mm/fault-common.c index d04808ffa..c34c37203 100644 --- a/arch/arm/mm/fault-common.c +++ b/arch/arm/mm/fault-common.c @@ -6,7 +6,7 @@ */ #include <linux/config.h> -extern void die(const char *msg, struct pt_regs *regs, unsigned int err); +extern void die(const char *msg, struct pt_regs *regs, int err); /* * This is useful to dump out the page tables associated with diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c index 92007d975..ddc69089a 100644 --- a/arch/arm/mm/mm-armv.c +++ b/arch/arm/mm/mm-armv.c @@ -60,6 +60,8 @@ __setup("noalign", noalign_setup); __setup("nocache", nocache_setup); __setup("nowb", nowrite_setup); +#define FIRST_KERNEL_PGD_NR (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD) + /* * need to get a 16k page for level 1 */ @@ -71,9 +73,9 @@ pgd_t *get_pgd_slow(void) if (pgd) { pgd_t *init = pgd_offset_k(0); - memzero(pgd, USER_PTRS_PER_PGD * sizeof(pgd_t)); - memcpy(pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, - (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); + memzero(pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); + memcpy(pgd + FIRST_KERNEL_PGD_NR, init + FIRST_KERNEL_PGD_NR, + (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t)); clean_cache_area(pgd, PTRS_PER_PGD * sizeof(pgd_t)); /* diff --git a/arch/arm/mm/mm-nexuspci.c b/arch/arm/mm/mm-nexuspci.c index 5b66faa51..ccb6c8a5c 100644 --- a/arch/arm/mm/mm-nexuspci.c +++ b/arch/arm/mm/mm-nexuspci.c @@ -2,9 +2,9 @@ * arch/arm/mm/mm-nexuspci.c * from arch/arm/mm/mm-ebsa110.c * - * Extra MM routines for the NexusPCI architecture + * Extra MM routines for the FTV/PCI architecture * - * Copyright (C) 1998 Phil Blundell + * Copyright (C) 1998-1999 Phil Blundell * Copyright (C) 1998-1999 Russell King */ @@ -18,14 +18,14 @@ #include "map.h" -#define SIZE(x) (sizeof(x) / sizeof(x[0])) - -const struct map_desc io_desc[] __initdata = { - { 0xfff00000, 0x10000000, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }, - { 0xffe00000, 0x20000000, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }, - { 0xffc00000, 0x60000000, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }, - { 0xfe000000, 0x80000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, - { 0xfd000000, 0x88000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 } +struct map_desc io_desc[] __initdata = { + { INTCONT_BASE, INTCONT_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }, + { PLX_BASE, PLX_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }, + { PCIO_BASE, PLX_IO_START, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 }, + { DUART_BASE, DUART_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 }, + { STATUS_BASE, STATUS_START, 0x00001000, DOMAIN_IO, 0, 1, 0, 0 } }; +#define SIZE(x) (sizeof(x) / sizeof(x[0])) + unsigned int __initdata io_desc_size = SIZE(io_desc); diff --git a/arch/arm/vmlinux-armo.lds.in b/arch/arm/vmlinux-armo.lds.in index 5fbafe77a..94c155232 100644 --- a/arch/arm/vmlinux-armo.lds.in +++ b/arch/arm/vmlinux-armo.lds.in @@ -28,6 +28,11 @@ SECTIONS *(.init.task) } + /DISCARD/ : { /* Exit code and data */ + *(.text.exit) + *(.data.exit) + } + _text = .; /* Text and read-only data */ .text : { *(.text) diff --git a/arch/arm/vmlinux-armv.lds.in b/arch/arm/vmlinux-armv.lds.in index 93b8946e7..d2a79ca9d 100644 --- a/arch/arm/vmlinux-armv.lds.in +++ b/arch/arm/vmlinux-armv.lds.in @@ -25,22 +25,6 @@ SECTIONS __init_end = .; } - .ebsa285 : { - __ebsa285_begin = .; - *(.text.ebsa285) - *(.data.ebsa285) - . = ALIGN(4096); - __ebsa285_end = .; - } - - .netwinder : { - __netwinder_begin = .; - *(.text.netwinder) - *(.data.netwinder) - . = ALIGN(4096); - __netwinder_end = .; - } - .text : { /* Real text segment */ _text = .; /* Text and read-only data */ *(.text) @@ -65,11 +49,26 @@ SECTIONS . = ALIGN(8192); - .data : { /* Data */ + .data : { + /* + * first, the init task union, aligned + * to an 8192 byte boundary. + */ *(.init.task) + + /* + * then the cacheline aligned data + */ + . = ALIGN(32); + *(.data.cacheline_aligned) + + /* + * and the usual data section + */ *(.data) CONSTRUCTORS - _edata = .; /* End of data section */ + + _edata = .; } .bss : { |