aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 15:54:53 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 16:01:40 -0400
commitae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch)
tree3c2086ab67398a019089a47ca3f362a4bc6db74f /arch/arm
parent34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff)
parent9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff)
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/compressed/head-sa1100.S2
-rw-r--r--arch/arm/common/vic.c1
-rw-r--r--arch/arm/include/asm/atomic.h26
-rw-r--r--arch/arm/include/asm/cache.h2
-rw-r--r--arch/arm/include/asm/pci.h2
-rw-r--r--arch/arm/include/asm/unified.h4
-rw-r--r--arch/arm/kernel/entry-armv.S19
-rw-r--r--arch/arm/kernel/entry-header.S14
-rw-r--r--arch/arm/kernel/kprobes.c19
-rw-r--r--arch/arm/kernel/vmlinux.lds.S1
-rw-r--r--arch/arm/lib/copy_page.S16
-rw-r--r--arch/arm/lib/lib1funcs.S2
-rw-r--r--arch/arm/lib/sha1.S2
-rw-r--r--arch/arm/mach-at91/at91cap9_devices.c10
-rw-r--r--arch/arm/mach-at91/board-cap9adk.c2
-rw-r--r--arch/arm/mach-at91/board-neocore926.c2
-rw-r--r--arch/arm/mach-pxa/spitz.c1
-rw-r--r--arch/arm/mach-s3c2410/Kconfig5
-rw-r--r--arch/arm/mach-s3c2412/Kconfig3
-rw-r--r--arch/arm/mach-s3c2440/Kconfig6
-rw-r--r--arch/arm/mach-s3c6400/Kconfig1
-rw-r--r--arch/arm/mach-s3c6410/Kconfig1
-rw-r--r--arch/arm/mach-sa1100/dma.c2
-rw-r--r--arch/arm/mach-sa1100/include/mach/assabet.h2
-rw-r--r--arch/arm/mach-sa1100/include/mach/hardware.h2
-rw-r--r--arch/arm/mach-sa1100/include/mach/memory.h2
-rw-r--r--arch/arm/mach-sa1100/include/mach/neponset.h2
-rw-r--r--arch/arm/mach-sa1100/include/mach/system.h2
-rw-r--r--arch/arm/mach-sa1100/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-sa1100/pm.c2
-rw-r--r--arch/arm/mach-sa1100/time.c2
-rw-r--r--arch/arm/mm/Kconfig5
-rw-r--r--arch/arm/mm/fault.c110
-rw-r--r--arch/arm/mm/proc-xscale.S2
-rw-r--r--arch/arm/plat-iop/setup.c2
-rw-r--r--arch/arm/plat-omap/include/mach/system.h2
-rw-r--r--arch/arm/plat-s3c/gpio.c2
-rw-r--r--arch/arm/plat-s3c64xx/dma.c6
-rw-r--r--arch/arm/plat-s3c64xx/include/plat/dma-plat.h2
-rw-r--r--arch/arm/plat-s3c64xx/include/plat/irqs.h10
-rw-r--r--arch/arm/plat-s3c64xx/s3c6400-clock.c8
-rw-r--r--arch/arm/plat-stmp3xxx/dma.c2
-rw-r--r--arch/arm/tools/mach-types20
43 files changed, 206 insertions, 124 deletions
diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S
index 4c8c0e46027d..6179d94dd5c6 100644
--- a/arch/arm/boot/compressed/head-sa1100.S
+++ b/arch/arm/boot/compressed/head-sa1100.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/arm/boot/compressed/head-sa1100.S 2 * linux/arch/arm/boot/compressed/head-sa1100.S
3 * 3 *
4 * Copyright (C) 1999 Nicolas Pitre <nico@cam.org> 4 * Copyright (C) 1999 Nicolas Pitre <nico@fluxnic.net>
5 * 5 *
6 * SA1100 specific tweaks. This is merged into head.S by the linker. 6 * SA1100 specific tweaks. This is merged into head.S by the linker.
7 * 7 *
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index 920ced0b73c5..f232941de8ab 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -22,6 +22,7 @@
22#include <linux/list.h> 22#include <linux/list.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/device.h>
25#include <linux/amba/bus.h> 26#include <linux/amba/bus.h>
26 27
27#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 9ed2377fe8e5..d0daeab2234e 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -19,31 +19,21 @@
19 19
20#ifdef __KERNEL__ 20#ifdef __KERNEL__
21 21
22/*
23 * On ARM, ordinary assignment (str instruction) doesn't clear the local
24 * strex/ldrex monitor on some implementations. The reason we can use it for
25 * atomic_set() is the clrex or dummy strex done on every exception return.
26 */
22#define atomic_read(v) ((v)->counter) 27#define atomic_read(v) ((v)->counter)
28#define atomic_set(v,i) (((v)->counter) = (i))
23 29
24#if __LINUX_ARM_ARCH__ >= 6 30#if __LINUX_ARM_ARCH__ >= 6
25 31
26/* 32/*
27 * ARMv6 UP and SMP safe atomic ops. We use load exclusive and 33 * ARMv6 UP and SMP safe atomic ops. We use load exclusive and
28 * store exclusive to ensure that these are atomic. We may loop 34 * store exclusive to ensure that these are atomic. We may loop
29 * to ensure that the update happens. Writing to 'v->counter' 35 * to ensure that the update happens.
30 * without using the following operations WILL break the atomic
31 * nature of these ops.
32 */ 36 */
33static inline void atomic_set(atomic_t *v, int i)
34{
35 unsigned long tmp;
36
37 __asm__ __volatile__("@ atomic_set\n"
38"1: ldrex %0, [%1]\n"
39" strex %0, %2, [%1]\n"
40" teq %0, #0\n"
41" bne 1b"
42 : "=&r" (tmp)
43 : "r" (&v->counter), "r" (i)
44 : "cc");
45}
46
47static inline void atomic_add(int i, atomic_t *v) 37static inline void atomic_add(int i, atomic_t *v)
48{ 38{
49 unsigned long tmp; 39 unsigned long tmp;
@@ -163,8 +153,6 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
163#error SMP not supported on pre-ARMv6 CPUs 153#error SMP not supported on pre-ARMv6 CPUs
164#endif 154#endif
165 155
166#define atomic_set(v,i) (((v)->counter) = (i))
167
168static inline int atomic_add_return(int i, atomic_t *v) 156static inline int atomic_add_return(int i, atomic_t *v)
169{ 157{
170 unsigned long flags; 158 unsigned long flags;
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h
index feaa75f0013e..66c160b8547f 100644
--- a/arch/arm/include/asm/cache.h
+++ b/arch/arm/include/asm/cache.h
@@ -4,7 +4,7 @@
4#ifndef __ASMARM_CACHE_H 4#ifndef __ASMARM_CACHE_H
5#define __ASMARM_CACHE_H 5#define __ASMARM_CACHE_H
6 6
7#define L1_CACHE_SHIFT 5 7#define L1_CACHE_SHIFT CONFIG_ARM_L1_CACHE_SHIFT
8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
9 9
10/* 10/*
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 0abf386ba3d3..226cddd2fb65 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -6,8 +6,6 @@
6 6
7#include <mach/hardware.h> /* for PCIBIOS_MIN_* */ 7#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
8 8
9#define pcibios_scan_all_fns(a, b) 0
10
11#ifdef CONFIG_PCI_HOST_ITE8152 9#ifdef CONFIG_PCI_HOST_ITE8152
12/* ITE bridge requires setting latency timer to avoid early bus access 10/* ITE bridge requires setting latency timer to avoid early bus access
13 termination by PIC bus mater devices 11 termination by PIC bus mater devices
diff --git a/arch/arm/include/asm/unified.h b/arch/arm/include/asm/unified.h
index 073e85b9b961..bc631161e9c6 100644
--- a/arch/arm/include/asm/unified.h
+++ b/arch/arm/include/asm/unified.h
@@ -35,7 +35,9 @@
35 35
36#define ARM(x...) 36#define ARM(x...)
37#define THUMB(x...) x 37#define THUMB(x...) x
38#ifdef __ASSEMBLY__
38#define W(instr) instr.w 39#define W(instr) instr.w
40#endif
39#define BSYM(sym) sym + 1 41#define BSYM(sym) sym + 1
40 42
41#else /* !CONFIG_THUMB2_KERNEL */ 43#else /* !CONFIG_THUMB2_KERNEL */
@@ -45,7 +47,9 @@
45 47
46#define ARM(x...) x 48#define ARM(x...) x
47#define THUMB(x...) 49#define THUMB(x...)
50#ifdef __ASSEMBLY__
48#define W(instr) instr 51#define W(instr) instr
52#endif
49#define BSYM(sym) sym 53#define BSYM(sym) sym
50 54
51#endif /* CONFIG_THUMB2_KERNEL */ 55#endif /* CONFIG_THUMB2_KERNEL */
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 3d727a8a23bc..0a2ba51cf35d 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -272,7 +272,15 @@ __und_svc:
272 @ 272 @
273 @ r0 - instruction 273 @ r0 - instruction
274 @ 274 @
275#ifndef CONFIG_THUMB2_KERNEL
275 ldr r0, [r2, #-4] 276 ldr r0, [r2, #-4]
277#else
278 ldrh r0, [r2, #-2] @ Thumb instruction at LR - 2
279 and r9, r0, #0xf800
280 cmp r9, #0xe800 @ 32-bit instruction if xx >= 0
281 ldrhhs r9, [r2] @ bottom 16 bits
282 orrhs r0, r9, r0, lsl #16
283#endif
276 adr r9, BSYM(1f) 284 adr r9, BSYM(1f)
277 bl call_fpe 285 bl call_fpe
278 286
@@ -678,7 +686,9 @@ ENTRY(fp_enter)
678 .word no_fp 686 .word no_fp
679 .previous 687 .previous
680 688
681no_fp: mov pc, lr 689ENTRY(no_fp)
690 mov pc, lr
691ENDPROC(no_fp)
682 692
683__und_usr_unknown: 693__und_usr_unknown:
684 enable_irq 694 enable_irq
@@ -734,13 +744,6 @@ ENTRY(__switch_to)
734#ifdef CONFIG_MMU 744#ifdef CONFIG_MMU
735 ldr r6, [r2, #TI_CPU_DOMAIN] 745 ldr r6, [r2, #TI_CPU_DOMAIN]
736#endif 746#endif
737#if __LINUX_ARM_ARCH__ >= 6
738#ifdef CONFIG_CPU_32v6K
739 clrex
740#else
741 strex r5, r4, [ip] @ Clear exclusive monitor
742#endif
743#endif
744#if defined(CONFIG_HAS_TLS_REG) 747#if defined(CONFIG_HAS_TLS_REG)
745 mcr p15, 0, r3, c13, c0, 3 @ set TLS register 748 mcr p15, 0, r3, c13, c0, 3 @ set TLS register
746#elif !defined(CONFIG_TLS_REG_EMUL) 749#elif !defined(CONFIG_TLS_REG_EMUL)
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index a4eaf4f920c5..e17e3c30d957 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -76,13 +76,25 @@
76#ifndef CONFIG_THUMB2_KERNEL 76#ifndef CONFIG_THUMB2_KERNEL
77 .macro svc_exit, rpsr 77 .macro svc_exit, rpsr
78 msr spsr_cxsf, \rpsr 78 msr spsr_cxsf, \rpsr
79#if defined(CONFIG_CPU_32v6K)
80 clrex @ clear the exclusive monitor
79 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr 81 ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr
82#elif defined (CONFIG_CPU_V6)
83 ldr r0, [sp]
84 strex r1, r2, [sp] @ clear the exclusive monitor
85 ldmib sp, {r1 - pc}^ @ load r1 - pc, cpsr
86#endif
80 .endm 87 .endm
81 88
82 .macro restore_user_regs, fast = 0, offset = 0 89 .macro restore_user_regs, fast = 0, offset = 0
83 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr 90 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
84 ldr lr, [sp, #\offset + S_PC]! @ get pc 91 ldr lr, [sp, #\offset + S_PC]! @ get pc
85 msr spsr_cxsf, r1 @ save in spsr_svc 92 msr spsr_cxsf, r1 @ save in spsr_svc
93#if defined(CONFIG_CPU_32v6K)
94 clrex @ clear the exclusive monitor
95#elif defined (CONFIG_CPU_V6)
96 strex r1, r2, [sp] @ clear the exclusive monitor
97#endif
86 .if \fast 98 .if \fast
87 ldmdb sp, {r1 - lr}^ @ get calling r1 - lr 99 ldmdb sp, {r1 - lr}^ @ get calling r1 - lr
88 .else 100 .else
@@ -98,6 +110,7 @@
98 .endm 110 .endm
99#else /* CONFIG_THUMB2_KERNEL */ 111#else /* CONFIG_THUMB2_KERNEL */
100 .macro svc_exit, rpsr 112 .macro svc_exit, rpsr
113 clrex @ clear the exclusive monitor
101 ldr r0, [sp, #S_SP] @ top of the stack 114 ldr r0, [sp, #S_SP] @ top of the stack
102 ldr r1, [sp, #S_PC] @ return address 115 ldr r1, [sp, #S_PC] @ return address
103 tst r0, #4 @ orig stack 8-byte aligned? 116 tst r0, #4 @ orig stack 8-byte aligned?
@@ -110,6 +123,7 @@
110 .endm 123 .endm
111 124
112 .macro restore_user_regs, fast = 0, offset = 0 125 .macro restore_user_regs, fast = 0, offset = 0
126 clrex @ clear the exclusive monitor
113 mov r2, sp 127 mov r2, sp
114 load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr 128 load_user_sp_lr r2, r3, \offset + S_SP @ calling sp, lr
115 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr 129 ldr r1, [sp, #\offset + S_PSR] @ get calling cpsr
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c
index f692efddd449..60c62c377fa9 100644
--- a/arch/arm/kernel/kprobes.c
+++ b/arch/arm/kernel/kprobes.c
@@ -22,6 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/kprobes.h> 23#include <linux/kprobes.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/stop_machine.h>
25#include <linux/stringify.h> 26#include <linux/stringify.h>
26#include <asm/traps.h> 27#include <asm/traps.h>
27#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
@@ -83,10 +84,24 @@ void __kprobes arch_arm_kprobe(struct kprobe *p)
83 flush_insns(p->addr, 1); 84 flush_insns(p->addr, 1);
84} 85}
85 86
87/*
88 * The actual disarming is done here on each CPU and synchronized using
89 * stop_machine. This synchronization is necessary on SMP to avoid removing
90 * a probe between the moment the 'Undefined Instruction' exception is raised
91 * and the moment the exception handler reads the faulting instruction from
92 * memory.
93 */
94int __kprobes __arch_disarm_kprobe(void *p)
95{
96 struct kprobe *kp = p;
97 *kp->addr = kp->opcode;
98 flush_insns(kp->addr, 1);
99 return 0;
100}
101
86void __kprobes arch_disarm_kprobe(struct kprobe *p) 102void __kprobes arch_disarm_kprobe(struct kprobe *p)
87{ 103{
88 *p->addr = p->opcode; 104 stop_machine(__arch_disarm_kprobe, p, &cpu_online_map);
89 flush_insns(p->addr, 1);
90} 105}
91 106
92void __kprobes arch_remove_kprobe(struct kprobe *p) 107void __kprobes arch_remove_kprobe(struct kprobe *p)
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 39d3ffb9ff2b..aecf87dfbaec 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -83,6 +83,7 @@ SECTIONS
83 EXIT_TEXT 83 EXIT_TEXT
84 EXIT_DATA 84 EXIT_DATA
85 *(.exitcall.exit) 85 *(.exitcall.exit)
86 *(.discard)
86 *(.ARM.exidx.exit.text) 87 *(.ARM.exidx.exit.text)
87 *(.ARM.extab.exit.text) 88 *(.ARM.extab.exit.text)
88#ifndef CONFIG_HOTPLUG_CPU 89#ifndef CONFIG_HOTPLUG_CPU
diff --git a/arch/arm/lib/copy_page.S b/arch/arm/lib/copy_page.S
index 6ae04db1ca4f..6ee2f6706f86 100644
--- a/arch/arm/lib/copy_page.S
+++ b/arch/arm/lib/copy_page.S
@@ -12,8 +12,9 @@
12#include <linux/linkage.h> 12#include <linux/linkage.h>
13#include <asm/assembler.h> 13#include <asm/assembler.h>
14#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
15#include <asm/cache.h>
15 16
16#define COPY_COUNT (PAGE_SZ/64 PLD( -1 )) 17#define COPY_COUNT (PAGE_SZ / (2 * L1_CACHE_BYTES) PLD( -1 ))
17 18
18 .text 19 .text
19 .align 5 20 .align 5
@@ -26,17 +27,16 @@
26ENTRY(copy_page) 27ENTRY(copy_page)
27 stmfd sp!, {r4, lr} @ 2 28 stmfd sp!, {r4, lr} @ 2
28 PLD( pld [r1, #0] ) 29 PLD( pld [r1, #0] )
29 PLD( pld [r1, #32] ) 30 PLD( pld [r1, #L1_CACHE_BYTES] )
30 mov r2, #COPY_COUNT @ 1 31 mov r2, #COPY_COUNT @ 1
31 ldmia r1!, {r3, r4, ip, lr} @ 4+1 32 ldmia r1!, {r3, r4, ip, lr} @ 4+1
321: PLD( pld [r1, #64] ) 331: PLD( pld [r1, #2 * L1_CACHE_BYTES])
33 PLD( pld [r1, #96] ) 34 PLD( pld [r1, #3 * L1_CACHE_BYTES])
342: stmia r0!, {r3, r4, ip, lr} @ 4 352:
35 ldmia r1!, {r3, r4, ip, lr} @ 4+1 36 .rept (2 * L1_CACHE_BYTES / 16 - 1)
36 stmia r0!, {r3, r4, ip, lr} @ 4
37 ldmia r1!, {r3, r4, ip, lr} @ 4+1
38 stmia r0!, {r3, r4, ip, lr} @ 4 37 stmia r0!, {r3, r4, ip, lr} @ 4
39 ldmia r1!, {r3, r4, ip, lr} @ 4 38 ldmia r1!, {r3, r4, ip, lr} @ 4
39 .endr
40 subs r2, r2, #1 @ 1 40 subs r2, r2, #1 @ 1
41 stmia r0!, {r3, r4, ip, lr} @ 4 41 stmia r0!, {r3, r4, ip, lr} @ 4
42 ldmgtia r1!, {r3, r4, ip, lr} @ 4 42 ldmgtia r1!, {r3, r4, ip, lr} @ 4
diff --git a/arch/arm/lib/lib1funcs.S b/arch/arm/lib/lib1funcs.S
index 67964bcfc854..6dc06487f3c3 100644
--- a/arch/arm/lib/lib1funcs.S
+++ b/arch/arm/lib/lib1funcs.S
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/arch/arm/lib/lib1funcs.S: Optimized ARM division routines 2 * linux/arch/arm/lib/lib1funcs.S: Optimized ARM division routines
3 * 3 *
4 * Author: Nicolas Pitre <nico@cam.org> 4 * Author: Nicolas Pitre <nico@fluxnic.net>
5 * - contributed to gcc-3.4 on Sep 30, 2003 5 * - contributed to gcc-3.4 on Sep 30, 2003
6 * - adapted for the Linux kernel on Oct 2, 2003 6 * - adapted for the Linux kernel on Oct 2, 2003
7 */ 7 */
diff --git a/arch/arm/lib/sha1.S b/arch/arm/lib/sha1.S
index 09b548cac1a4..eb0edb80d7b8 100644
--- a/arch/arm/lib/sha1.S
+++ b/arch/arm/lib/sha1.S
@@ -3,7 +3,7 @@
3 * 3 *
4 * SHA transform optimized for ARM 4 * SHA transform optimized for ARM
5 * 5 *
6 * Copyright: (C) 2005 by Nicolas Pitre <nico@cam.org> 6 * Copyright: (C) 2005 by Nicolas Pitre <nico@fluxnic.net>
7 * Created: September 17, 2005 7 * Created: September 17, 2005
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c
index 412aa49ad2fb..d1f775e86353 100644
--- a/arch/arm/mach-at91/at91cap9_devices.c
+++ b/arch/arm/mach-at91/at91cap9_devices.c
@@ -771,9 +771,9 @@ void __init at91_add_device_pwm(u32 mask) {}
771 * AC97 771 * AC97
772 * -------------------------------------------------------------------- */ 772 * -------------------------------------------------------------------- */
773 773
774#if defined(CONFIG_SND_AT91_AC97) || defined(CONFIG_SND_AT91_AC97_MODULE) 774#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
775static u64 ac97_dmamask = DMA_BIT_MASK(32); 775static u64 ac97_dmamask = DMA_BIT_MASK(32);
776static struct atmel_ac97_data ac97_data; 776static struct ac97c_platform_data ac97_data;
777 777
778static struct resource ac97_resources[] = { 778static struct resource ac97_resources[] = {
779 [0] = { 779 [0] = {
@@ -789,7 +789,7 @@ static struct resource ac97_resources[] = {
789}; 789};
790 790
791static struct platform_device at91cap9_ac97_device = { 791static struct platform_device at91cap9_ac97_device = {
792 .name = "ac97c", 792 .name = "atmel_ac97c",
793 .id = 1, 793 .id = 1,
794 .dev = { 794 .dev = {
795 .dma_mask = &ac97_dmamask, 795 .dma_mask = &ac97_dmamask,
@@ -800,7 +800,7 @@ static struct platform_device at91cap9_ac97_device = {
800 .num_resources = ARRAY_SIZE(ac97_resources), 800 .num_resources = ARRAY_SIZE(ac97_resources),
801}; 801};
802 802
803void __init at91_add_device_ac97(struct atmel_ac97_data *data) 803void __init at91_add_device_ac97(struct ac97c_platform_data *data)
804{ 804{
805 if (!data) 805 if (!data)
806 return; 806 return;
@@ -818,7 +818,7 @@ void __init at91_add_device_ac97(struct atmel_ac97_data *data)
818 platform_device_register(&at91cap9_ac97_device); 818 platform_device_register(&at91cap9_ac97_device);
819} 819}
820#else 820#else
821void __init at91_add_device_ac97(struct atmel_ac97_data *data) {} 821void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
822#endif 822#endif
823 823
824 824
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
index 83a1a0fef47b..d6940870e403 100644
--- a/arch/arm/mach-at91/board-cap9adk.c
+++ b/arch/arm/mach-at91/board-cap9adk.c
@@ -364,7 +364,7 @@ static struct atmel_lcdfb_info __initdata cap9adk_lcdc_data;
364/* 364/*
365 * AC97 365 * AC97
366 */ 366 */
367static struct atmel_ac97_data cap9adk_ac97_data = { 367static struct ac97c_platform_data cap9adk_ac97_data = {
368// .reset_pin = ... not connected 368// .reset_pin = ... not connected
369}; 369};
370 370
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index 9ba7ba2cc3b1..f78a55e5ad08 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -340,7 +340,7 @@ static void __init neocore926_add_device_buttons(void) {}
340/* 340/*
341 * AC97 341 * AC97
342 */ 342 */
343static struct atmel_ac97_data neocore926_ac97_data = { 343static struct ac97c_platform_data neocore926_ac97_data = {
344 .reset_pin = AT91_PIN_PA13, 344 .reset_pin = AT91_PIN_PA13,
345}; 345};
346 346
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index f9dc59c054b3..ee8d6038ce82 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -423,6 +423,7 @@ static struct ads7846_platform_data spitz_ads7846_info = {
423 .vref_delay_usecs = 100, 423 .vref_delay_usecs = 100,
424 .x_plate_ohms = 419, 424 .x_plate_ohms = 419,
425 .y_plate_ohms = 486, 425 .y_plate_ohms = 486,
426 .pressure_max = 1024,
426 .gpio_pendown = SPITZ_GPIO_TP_INT, 427 .gpio_pendown = SPITZ_GPIO_TP_INT,
427 .wait_for_sync = spitz_wait_for_hsync, 428 .wait_for_sync = spitz_wait_for_hsync,
428}; 429};
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index d8c023d4df30..3d4e9da3fa52 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -77,6 +77,7 @@ config ARCH_H1940
77 select CPU_S3C2410 77 select CPU_S3C2410
78 select PM_H1940 if PM 78 select PM_H1940 if PM
79 select S3C_DEV_USB_HOST 79 select S3C_DEV_USB_HOST
80 select S3C_DEV_NAND
80 help 81 help
81 Say Y here if you are using the HP IPAQ H1940 82 Say Y here if you are using the HP IPAQ H1940
82 83
@@ -89,6 +90,7 @@ config MACH_N30
89 bool "Acer N30 family" 90 bool "Acer N30 family"
90 select CPU_S3C2410 91 select CPU_S3C2410
91 select S3C_DEV_USB_HOST 92 select S3C_DEV_USB_HOST
93 select S3C_DEV_NAND
92 help 94 help
93 Say Y here if you want suppt for the Acer N30, Acer N35, 95 Say Y here if you want suppt for the Acer N30, Acer N35,
94 Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. 96 Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs.
@@ -103,6 +105,7 @@ config ARCH_BAST
103 select S3C24XX_DCLK 105 select S3C24XX_DCLK
104 select ISA 106 select ISA
105 select S3C_DEV_USB_HOST 107 select S3C_DEV_USB_HOST
108 select S3C_DEV_NAND
106 help 109 help
107 Say Y here if you are using the Simtec Electronics EB2410ITX 110 Say Y here if you are using the Simtec Electronics EB2410ITX
108 development board (also known as BAST) 111 development board (also known as BAST)
@@ -111,6 +114,7 @@ config MACH_OTOM
111 bool "NexVision OTOM Board" 114 bool "NexVision OTOM Board"
112 select CPU_S3C2410 115 select CPU_S3C2410
113 select S3C_DEV_USB_HOST 116 select S3C_DEV_USB_HOST
117 select S3C_DEV_NAND
114 help 118 help
115 Say Y here if you are using the Nex Vision OTOM board 119 Say Y here if you are using the Nex Vision OTOM board
116 120
@@ -154,6 +158,7 @@ config MACH_QT2410
154 bool "QT2410" 158 bool "QT2410"
155 select CPU_S3C2410 159 select CPU_S3C2410
156 select S3C_DEV_USB_HOST 160 select S3C_DEV_USB_HOST
161 select S3C_DEV_NAND
157 help 162 help
158 Say Y here if you are using the Armzone QT2410 163 Say Y here if you are using the Armzone QT2410
159 164
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index 35c1bde89cf2..c2bdc4635d12 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -48,6 +48,7 @@ config MACH_JIVE
48 bool "Logitech Jive" 48 bool "Logitech Jive"
49 select CPU_S3C2412 49 select CPU_S3C2412
50 select S3C_DEV_USB_HOST 50 select S3C_DEV_USB_HOST
51 select S3C_DEV_NAND
51 help 52 help
52 Say Y here if you are using the Logitech Jive. 53 Say Y here if you are using the Logitech Jive.
53 54
@@ -61,6 +62,7 @@ config MACH_SMDK2413
61 select MACH_S3C2413 62 select MACH_S3C2413
62 select MACH_SMDK 63 select MACH_SMDK
63 select S3C_DEV_USB_HOST 64 select S3C_DEV_USB_HOST
65 select S3C_DEV_NAND
64 help 66 help
65 Say Y here if you are using an SMDK2413 67 Say Y here if you are using an SMDK2413
66 68
@@ -84,6 +86,7 @@ config MACH_VSTMS
84 bool "VMSTMS" 86 bool "VMSTMS"
85 select CPU_S3C2412 87 select CPU_S3C2412
86 select S3C_DEV_USB_HOST 88 select S3C_DEV_USB_HOST
89 select S3C_DEV_NAND
87 help 90 help
88 Say Y here if you are using an VSTMS board 91 Say Y here if you are using an VSTMS board
89 92
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index 8ae1b288f7fa..d7bba919a77e 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -48,6 +48,7 @@ config MACH_OSIRIS
48 select S3C2440_XTAL_12000000 48 select S3C2440_XTAL_12000000
49 select S3C2410_IOTIMING if S3C2440_CPUFREQ 49 select S3C2410_IOTIMING if S3C2440_CPUFREQ
50 select S3C_DEV_USB_HOST 50 select S3C_DEV_USB_HOST
51 select S3C_DEV_NAND
51 help 52 help
52 Say Y here if you are using the Simtec IM2440D20 module, also 53 Say Y here if you are using the Simtec IM2440D20 module, also
53 known as the Osiris. 54 known as the Osiris.
@@ -57,6 +58,7 @@ config MACH_RX3715
57 select CPU_S3C2440 58 select CPU_S3C2440
58 select S3C2440_XTAL_16934400 59 select S3C2440_XTAL_16934400
59 select PM_H1940 if PM 60 select PM_H1940 if PM
61 select S3C_DEV_NAND
60 help 62 help
61 Say Y here if you are using the HP iPAQ rx3715. 63 Say Y here if you are using the HP iPAQ rx3715.
62 64
@@ -66,6 +68,7 @@ config ARCH_S3C2440
66 select S3C2440_XTAL_16934400 68 select S3C2440_XTAL_16934400
67 select MACH_SMDK 69 select MACH_SMDK
68 select S3C_DEV_USB_HOST 70 select S3C_DEV_USB_HOST
71 select S3C_DEV_NAND
69 help 72 help
70 Say Y here if you are using the SMDK2440. 73 Say Y here if you are using the SMDK2440.
71 74
@@ -74,6 +77,7 @@ config MACH_NEXCODER_2440
74 select CPU_S3C2440 77 select CPU_S3C2440
75 select S3C2440_XTAL_12000000 78 select S3C2440_XTAL_12000000
76 select S3C_DEV_USB_HOST 79 select S3C_DEV_USB_HOST
80 select S3C_DEV_NAND
77 help 81 help
78 Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board 82 Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
79 83
@@ -88,6 +92,7 @@ config MACH_AT2440EVB
88 bool "Avantech AT2440EVB development board" 92 bool "Avantech AT2440EVB development board"
89 select CPU_S3C2440 93 select CPU_S3C2440
90 select S3C_DEV_USB_HOST 94 select S3C_DEV_USB_HOST
95 select S3C_DEV_NAND
91 help 96 help
92 Say Y here if you are using the AT2440EVB development board 97 Say Y here if you are using the AT2440EVB development board
93 98
@@ -97,6 +102,7 @@ config MACH_MINI2440
97 select EEPROM_AT24 102 select EEPROM_AT24
98 select LEDS_TRIGGER_BACKLIGHT 103 select LEDS_TRIGGER_BACKLIGHT
99 select SND_S3C24XX_SOC_S3C24XX_UDA134X 104 select SND_S3C24XX_SOC_S3C24XX_UDA134X
105 select S3C_DEV_NAND
100 help 106 help
101 Say Y here to select support for the MINI2440. Is a 10cm x 10cm board 107 Say Y here to select support for the MINI2440. Is a 10cm x 10cm board
102 available via various sources. It can come with a 3.5" or 7" touch LCD. 108 available via various sources. It can come with a 3.5" or 7" touch LCD.
diff --git a/arch/arm/mach-s3c6400/Kconfig b/arch/arm/mach-s3c6400/Kconfig
index f5af212066c3..770b72067e3d 100644
--- a/arch/arm/mach-s3c6400/Kconfig
+++ b/arch/arm/mach-s3c6400/Kconfig
@@ -26,6 +26,7 @@ config MACH_SMDK6400
26 bool "SMDK6400" 26 bool "SMDK6400"
27 select CPU_S3C6400 27 select CPU_S3C6400
28 select S3C_DEV_HSMMC 28 select S3C_DEV_HSMMC
29 select S3C_DEV_NAND
29 select S3C6400_SETUP_SDHCI 30 select S3C6400_SETUP_SDHCI
30 help 31 help
31 Machine support for the Samsung SMDK6400 32 Machine support for the Samsung SMDK6400
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig
index f9d0f09f9761..53fc3ff657f7 100644
--- a/arch/arm/mach-s3c6410/Kconfig
+++ b/arch/arm/mach-s3c6410/Kconfig
@@ -102,6 +102,7 @@ config MACH_HMT
102 bool "Airgoo HMT" 102 bool "Airgoo HMT"
103 select CPU_S3C6410 103 select CPU_S3C6410
104 select S3C_DEV_FB 104 select S3C_DEV_FB
105 select S3C_DEV_NAND
105 select S3C_DEV_USB_HOST 106 select S3C_DEV_USB_HOST
106 select S3C64XX_SETUP_FB_24BPP 107 select S3C64XX_SETUP_FB_24BPP
107 select HAVE_PWM 108 select HAVE_PWM
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
index 95f9c5a6d6d5..cb4521a6f42d 100644
--- a/arch/arm/mach-sa1100/dma.c
+++ b/arch/arm/mach-sa1100/dma.c
@@ -39,7 +39,7 @@ typedef struct {
39 39
40static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS]; 40static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS];
41 41
42static spinlock_t dma_list_lock; 42static DEFINE_SPINLOCK(dma_list_lock);
43 43
44 44
45static irqreturn_t dma_irq_handler(int irq, void *dev_id) 45static irqreturn_t dma_irq_handler(int irq, void *dev_id)
diff --git a/arch/arm/mach-sa1100/include/mach/assabet.h b/arch/arm/mach-sa1100/include/mach/assabet.h
index 3959b20d5d1c..28c2cf50c259 100644
--- a/arch/arm/mach-sa1100/include/mach/assabet.h
+++ b/arch/arm/mach-sa1100/include/mach/assabet.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/assabet.h 2 * arch/arm/mach-sa1100/include/mach/assabet.h
3 * 3 *
4 * Created 2000/06/05 by Nicolas Pitre <nico@cam.org> 4 * Created 2000/06/05 by Nicolas Pitre <nico@fluxnic.net>
5 * 5 *
6 * This file contains the hardware specific definitions for Assabet 6 * This file contains the hardware specific definitions for Assabet
7 * Only include this file from SA1100-specific files. 7 * Only include this file from SA1100-specific files.
diff --git a/arch/arm/mach-sa1100/include/mach/hardware.h b/arch/arm/mach-sa1100/include/mach/hardware.h
index 60711822b125..99f5856d8de4 100644
--- a/arch/arm/mach-sa1100/include/mach/hardware.h
+++ b/arch/arm/mach-sa1100/include/mach/hardware.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/hardware.h 2 * arch/arm/mach-sa1100/include/mach/hardware.h
3 * 3 *
4 * Copyright (C) 1998 Nicolas Pitre <nico@cam.org> 4 * Copyright (C) 1998 Nicolas Pitre <nico@fluxnic.net>
5 * 5 *
6 * This file contains the hardware definitions for SA1100 architecture 6 * This file contains the hardware definitions for SA1100 architecture
7 * 7 *
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
index e9f8eed900f5..d5277f9bee77 100644
--- a/arch/arm/mach-sa1100/include/mach/memory.h
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/memory.h 2 * arch/arm/mach-sa1100/include/mach/memory.h
3 * 3 *
4 * Copyright (C) 1999-2000 Nicolas Pitre <nico@cam.org> 4 * Copyright (C) 1999-2000 Nicolas Pitre <nico@fluxnic.net>
5 */ 5 */
6 6
7#ifndef __ASM_ARCH_MEMORY_H 7#ifndef __ASM_ARCH_MEMORY_H
diff --git a/arch/arm/mach-sa1100/include/mach/neponset.h b/arch/arm/mach-sa1100/include/mach/neponset.h
index d3f044f92c00..ffe2bc45eed0 100644
--- a/arch/arm/mach-sa1100/include/mach/neponset.h
+++ b/arch/arm/mach-sa1100/include/mach/neponset.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/neponset.h 2 * arch/arm/mach-sa1100/include/mach/neponset.h
3 * 3 *
4 * Created 2000/06/05 by Nicolas Pitre <nico@cam.org> 4 * Created 2000/06/05 by Nicolas Pitre <nico@fluxnic.net>
5 * 5 *
6 * This file contains the hardware specific definitions for Assabet 6 * This file contains the hardware specific definitions for Assabet
7 * Only include this file from SA1100-specific files. 7 * Only include this file from SA1100-specific files.
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
index 942b153e251d..ba9da9f7f183 100644
--- a/arch/arm/mach-sa1100/include/mach/system.h
+++ b/arch/arm/mach-sa1100/include/mach/system.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/system.h 2 * arch/arm/mach-sa1100/include/mach/system.h
3 * 3 *
4 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org> 4 * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
5 */ 5 */
6#include <mach/hardware.h> 6#include <mach/hardware.h>
7 7
diff --git a/arch/arm/mach-sa1100/include/mach/uncompress.h b/arch/arm/mach-sa1100/include/mach/uncompress.h
index 714160b03d7a..6cb39ddde656 100644
--- a/arch/arm/mach-sa1100/include/mach/uncompress.h
+++ b/arch/arm/mach-sa1100/include/mach/uncompress.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/mach-sa1100/include/mach/uncompress.h 2 * arch/arm/mach-sa1100/include/mach/uncompress.h
3 * 3 *
4 * (C) 1999 Nicolas Pitre <nico@cam.org> 4 * (C) 1999 Nicolas Pitre <nico@fluxnic.net>
5 * 5 *
6 * Reorganised to be machine independent. 6 * Reorganised to be machine independent.
7 */ 7 */
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c
index 111cce67ad2f..c83fdc80edfd 100644
--- a/arch/arm/mach-sa1100/pm.c
+++ b/arch/arm/mach-sa1100/pm.c
@@ -15,7 +15,7 @@
15 * Save more value for the resume function! Support 15 * Save more value for the resume function! Support
16 * Bitsy/Assabet/Freebird board 16 * Bitsy/Assabet/Freebird board
17 * 17 *
18 * 2001-08-29: Nicolas Pitre <nico@cam.org> 18 * 2001-08-29: Nicolas Pitre <nico@fluxnic.net>
19 * Cleaned up, pushed platform dependent stuff 19 * Cleaned up, pushed platform dependent stuff
20 * in the platform specific files. 20 * in the platform specific files.
21 * 21 *
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 711c0295c66f..95d92e8e56a8 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -4,7 +4,7 @@
4 * Copyright (C) 1998 Deborah Wallach. 4 * Copyright (C) 1998 Deborah Wallach.
5 * Twiddles (C) 1999 Hugo Fiennes <hugo@empeg.com> 5 * Twiddles (C) 1999 Hugo Fiennes <hugo@empeg.com>
6 * 6 *
7 * 2000/03/29 (C) Nicolas Pitre <nico@cam.org> 7 * 2000/03/29 (C) Nicolas Pitre <nico@fluxnic.net>
8 * Rewritten: big cleanup, much simpler, better HZ accuracy. 8 * Rewritten: big cleanup, much simpler, better HZ accuracy.
9 * 9 *
10 */ 10 */
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 5fe595aeba69..8d43e58f9244 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -771,3 +771,8 @@ config CACHE_XSC3L2
771 select OUTER_CACHE 771 select OUTER_CACHE
772 help 772 help
773 This option enables the L2 cache on XScale3. 773 This option enables the L2 cache on XScale3.
774
775config ARM_L1_CACHE_SHIFT
776 int
777 default 6 if ARCH_OMAP3
778 default 5
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index cc8829d7e116..379f78556055 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -25,6 +25,19 @@
25 25
26#include "fault.h" 26#include "fault.h"
27 27
28/*
29 * Fault status register encodings. We steal bit 31 for our own purposes.
30 */
31#define FSR_LNX_PF (1 << 31)
32#define FSR_WRITE (1 << 11)
33#define FSR_FS4 (1 << 10)
34#define FSR_FS3_0 (15)
35
36static inline int fsr_fs(unsigned int fsr)
37{
38 return (fsr & FSR_FS3_0) | (fsr & FSR_FS4) >> 6;
39}
40
28#ifdef CONFIG_MMU 41#ifdef CONFIG_MMU
29 42
30#ifdef CONFIG_KPROBES 43#ifdef CONFIG_KPROBES
@@ -182,18 +195,35 @@ void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
182#define VM_FAULT_BADMAP 0x010000 195#define VM_FAULT_BADMAP 0x010000
183#define VM_FAULT_BADACCESS 0x020000 196#define VM_FAULT_BADACCESS 0x020000
184 197
185static int 198/*
199 * Check that the permissions on the VMA allow for the fault which occurred.
200 * If we encountered a write fault, we must have write permission, otherwise
201 * we allow any permission.
202 */
203static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
204{
205 unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
206
207 if (fsr & FSR_WRITE)
208 mask = VM_WRITE;
209 if (fsr & FSR_LNX_PF)
210 mask = VM_EXEC;
211
212 return vma->vm_flags & mask ? false : true;
213}
214
215static int __kprobes
186__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr, 216__do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
187 struct task_struct *tsk) 217 struct task_struct *tsk)
188{ 218{
189 struct vm_area_struct *vma; 219 struct vm_area_struct *vma;
190 int fault, mask; 220 int fault;
191 221
192 vma = find_vma(mm, addr); 222 vma = find_vma(mm, addr);
193 fault = VM_FAULT_BADMAP; 223 fault = VM_FAULT_BADMAP;
194 if (!vma) 224 if (unlikely(!vma))
195 goto out; 225 goto out;
196 if (vma->vm_start > addr) 226 if (unlikely(vma->vm_start > addr))
197 goto check_stack; 227 goto check_stack;
198 228
199 /* 229 /*
@@ -201,47 +231,24 @@ __do_page_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
201 * memory access, so we can handle it. 231 * memory access, so we can handle it.
202 */ 232 */
203good_area: 233good_area:
204 if (fsr & (1 << 11)) /* write? */ 234 if (access_error(fsr, vma)) {
205 mask = VM_WRITE; 235 fault = VM_FAULT_BADACCESS;
206 else
207 mask = VM_READ|VM_EXEC|VM_WRITE;
208
209 fault = VM_FAULT_BADACCESS;
210 if (!(vma->vm_flags & mask))
211 goto out; 236 goto out;
237 }
212 238
213 /* 239 /*
214 * If for any reason at all we couldn't handle 240 * If for any reason at all we couldn't handle the fault, make
215 * the fault, make sure we exit gracefully rather 241 * sure we exit gracefully rather than endlessly redo the fault.
216 * than endlessly redo the fault.
217 */ 242 */
218survive: 243 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, (fsr & FSR_WRITE) ? FAULT_FLAG_WRITE : 0);
219 fault = handle_mm_fault(mm, vma, addr & PAGE_MASK, (fsr & (1 << 11)) ? FAULT_FLAG_WRITE : 0); 244 if (unlikely(fault & VM_FAULT_ERROR))
220 if (unlikely(fault & VM_FAULT_ERROR)) { 245 return fault;
221 if (fault & VM_FAULT_OOM)
222 goto out_of_memory;
223 else if (fault & VM_FAULT_SIGBUS)
224 return fault;
225 BUG();
226 }
227 if (fault & VM_FAULT_MAJOR) 246 if (fault & VM_FAULT_MAJOR)
228 tsk->maj_flt++; 247 tsk->maj_flt++;
229 else 248 else
230 tsk->min_flt++; 249 tsk->min_flt++;
231 return fault; 250 return fault;
232 251
233out_of_memory:
234 if (!is_global_init(tsk))
235 goto out;
236
237 /*
238 * If we are out of memory for pid1, sleep for a while and retry
239 */
240 up_read(&mm->mmap_sem);
241 yield();
242 down_read(&mm->mmap_sem);
243 goto survive;
244
245check_stack: 252check_stack:
246 if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr)) 253 if (vma->vm_flags & VM_GROWSDOWN && !expand_stack(vma, addr))
247 goto good_area; 254 goto good_area;
@@ -278,6 +285,13 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
278 if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc)) 285 if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
279 goto no_context; 286 goto no_context;
280 down_read(&mm->mmap_sem); 287 down_read(&mm->mmap_sem);
288 } else {
289 /*
290 * The above down_read_trylock() might have succeeded in
291 * which case, we'll have missed the might_sleep() from
292 * down_read()
293 */
294 might_sleep();
281 } 295 }
282 296
283 fault = __do_page_fault(mm, addr, fsr, tsk); 297 fault = __do_page_fault(mm, addr, fsr, tsk);
@@ -289,6 +303,16 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
289 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS)))) 303 if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP | VM_FAULT_BADACCESS))))
290 return 0; 304 return 0;
291 305
306 if (fault & VM_FAULT_OOM) {
307 /*
308 * We ran out of memory, call the OOM killer, and return to
309 * userspace (which will retry the fault, or kill us if we
310 * got oom-killed)
311 */
312 pagefault_out_of_memory();
313 return 0;
314 }
315
292 /* 316 /*
293 * If we are in kernel mode at this point, we 317 * If we are in kernel mode at this point, we
294 * have no context to handle this fault with. 318 * have no context to handle this fault with.
@@ -296,16 +320,6 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
296 if (!user_mode(regs)) 320 if (!user_mode(regs))
297 goto no_context; 321 goto no_context;
298 322
299 if (fault & VM_FAULT_OOM) {
300 /*
301 * We ran out of memory, or some other thing
302 * happened to us that made us unable to handle
303 * the page fault gracefully.
304 */
305 printk("VM: killing process %s\n", tsk->comm);
306 do_group_exit(SIGKILL);
307 return 0;
308 }
309 if (fault & VM_FAULT_SIGBUS) { 323 if (fault & VM_FAULT_SIGBUS) {
310 /* 324 /*
311 * We had some memory, but were unable to 325 * We had some memory, but were unable to
@@ -489,10 +503,10 @@ hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *)
489asmlinkage void __exception 503asmlinkage void __exception
490do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 504do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
491{ 505{
492 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); 506 const struct fsr_info *inf = fsr_info + fsr_fs(fsr);
493 struct siginfo info; 507 struct siginfo info;
494 508
495 if (!inf->fn(addr, fsr, regs)) 509 if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
496 return; 510 return;
497 511
498 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 512 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n",
@@ -508,6 +522,6 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
508asmlinkage void __exception 522asmlinkage void __exception
509do_PrefetchAbort(unsigned long addr, struct pt_regs *regs) 523do_PrefetchAbort(unsigned long addr, struct pt_regs *regs)
510{ 524{
511 do_translation_fault(addr, 0, regs); 525 do_translation_fault(addr, FSR_LNX_PF, regs);
512} 526}
513 527
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 0cce37b93937..423394260bcb 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -17,7 +17,7 @@
17 * 17 *
18 * 2001 Sep 08: 18 * 2001 Sep 08:
19 * Completely revisited, many important fixes 19 * Completely revisited, many important fixes
20 * Nicolas Pitre <nico@cam.org> 20 * Nicolas Pitre <nico@fluxnic.net>
21 */ 21 */
22 22
23#include <linux/linkage.h> 23#include <linux/linkage.h>
diff --git a/arch/arm/plat-iop/setup.c b/arch/arm/plat-iop/setup.c
index 9e573e78176a..bade586fed0f 100644
--- a/arch/arm/plat-iop/setup.c
+++ b/arch/arm/plat-iop/setup.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/arm/plat-iop/setup.c 2 * arch/arm/plat-iop/setup.c
3 * 3 *
4 * Author: Nicolas Pitre <nico@cam.org> 4 * Author: Nicolas Pitre <nico@fluxnic.net>
5 * Copyright (C) 2001 MontaVista Software, Inc. 5 * Copyright (C) 2001 MontaVista Software, Inc.
6 * Copyright (C) 2004 Intel Corporation. 6 * Copyright (C) 2004 Intel Corporation.
7 * 7 *
diff --git a/arch/arm/plat-omap/include/mach/system.h b/arch/arm/plat-omap/include/mach/system.h
index 1060e345423b..ed8ec7477261 100644
--- a/arch/arm/plat-omap/include/mach/system.h
+++ b/arch/arm/plat-omap/include/mach/system.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copied from arch/arm/mach-sa1100/include/mach/system.h 2 * Copied from arch/arm/mach-sa1100/include/mach/system.h
3 * Copyright (c) 1999 Nicolas Pitre <nico@cam.org> 3 * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
4 */ 4 */
5#ifndef __ASM_ARCH_SYSTEM_H 5#ifndef __ASM_ARCH_SYSTEM_H
6#define __ASM_ARCH_SYSTEM_H 6#define __ASM_ARCH_SYSTEM_H
diff --git a/arch/arm/plat-s3c/gpio.c b/arch/arm/plat-s3c/gpio.c
index 260fdc6ad685..5ff24e0f9f89 100644
--- a/arch/arm/plat-s3c/gpio.c
+++ b/arch/arm/plat-s3c/gpio.c
@@ -28,7 +28,7 @@ static __init void s3c_gpiolib_track(struct s3c_gpio_chip *chip)
28 28
29 gpn = chip->chip.base; 29 gpn = chip->chip.base;
30 for (i = 0; i < chip->chip.ngpio; i++, gpn++) { 30 for (i = 0; i < chip->chip.ngpio; i++, gpn++) {
31 BUG_ON(gpn > ARRAY_SIZE(s3c_gpios)); 31 BUG_ON(gpn >= ARRAY_SIZE(s3c_gpios));
32 s3c_gpios[gpn] = chip; 32 s3c_gpios[gpn] = chip;
33 } 33 }
34} 34}
diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c
index 67aa93dbb69e..266a10745a85 100644
--- a/arch/arm/plat-s3c64xx/dma.c
+++ b/arch/arm/plat-s3c64xx/dma.c
@@ -345,13 +345,13 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
345 if (!chan) 345 if (!chan)
346 return -EINVAL; 346 return -EINVAL;
347 347
348 buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_KERNEL); 348 buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_ATOMIC);
349 if (!buff) { 349 if (!buff) {
350 printk(KERN_ERR "%s: no memory for buffer\n", __func__); 350 printk(KERN_ERR "%s: no memory for buffer\n", __func__);
351 return -ENOMEM; 351 return -ENOMEM;
352 } 352 }
353 353
354 lli = dma_pool_alloc(dma_pool, GFP_KERNEL, &buff->lli_dma); 354 lli = dma_pool_alloc(dma_pool, GFP_ATOMIC, &buff->lli_dma);
355 if (!lli) { 355 if (!lli) {
356 printk(KERN_ERR "%s: no memory for lli\n", __func__); 356 printk(KERN_ERR "%s: no memory for lli\n", __func__);
357 ret = -ENOMEM; 357 ret = -ENOMEM;
@@ -697,7 +697,7 @@ static int __init s3c64xx_dma_init(void)
697 697
698 printk(KERN_INFO "%s: Registering DMA channels\n", __func__); 698 printk(KERN_INFO "%s: Registering DMA channels\n", __func__);
699 699
700 dma_pool = dma_pool_create("DMA-LLI", NULL, 32, 16, 0); 700 dma_pool = dma_pool_create("DMA-LLI", NULL, sizeof(struct pl080s_lli), 16, 0);
701 if (!dma_pool) { 701 if (!dma_pool) {
702 printk(KERN_ERR "%s: failed to create pool\n", __func__); 702 printk(KERN_ERR "%s: failed to create pool\n", __func__);
703 return -ENOMEM; 703 return -ENOMEM;
diff --git a/arch/arm/plat-s3c64xx/include/plat/dma-plat.h b/arch/arm/plat-s3c64xx/include/plat/dma-plat.h
index 0c30dd986725..8f76a1e474d6 100644
--- a/arch/arm/plat-s3c64xx/include/plat/dma-plat.h
+++ b/arch/arm/plat-s3c64xx/include/plat/dma-plat.h
@@ -26,7 +26,7 @@ struct s3c64xx_dma_buff {
26 struct s3c64xx_dma_buff *next; 26 struct s3c64xx_dma_buff *next;
27 27
28 void *pw; 28 void *pw;
29 struct pl080_lli *lli; 29 struct pl080s_lli *lli;
30 dma_addr_t lli_dma; 30 dma_addr_t lli_dma;
31}; 31};
32 32
diff --git a/arch/arm/plat-s3c64xx/include/plat/irqs.h b/arch/arm/plat-s3c64xx/include/plat/irqs.h
index 743a70094d04..7956fd3bb194 100644
--- a/arch/arm/plat-s3c64xx/include/plat/irqs.h
+++ b/arch/arm/plat-s3c64xx/include/plat/irqs.h
@@ -194,9 +194,17 @@
194 194
195#define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##_BASE + (no)) 195#define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##_BASE + (no))
196 196
197/* Define a group of interrupts for board-specific use (eg, for MFD
198 * interrupt controllers). */
199#define IRQ_BOARD_START (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1)
200
201#define IRQ_BOARD_NR 16
202
203#define IRQ_BOARD_END (IRQ_BOARD_START + IRQ_BOARD_NR)
204
197/* Set the default NR_IRQS */ 205/* Set the default NR_IRQS */
198 206
199#define NR_IRQS (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1) 207#define NR_IRQS (IRQ_BOARD_END + 1)
200 208
201#endif /* __ASM_PLAT_S3C64XX_IRQS_H */ 209#endif /* __ASM_PLAT_S3C64XX_IRQS_H */
202 210
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c
index febac1950d8e..9745852261e0 100644
--- a/arch/arm/plat-s3c64xx/s3c6400-clock.c
+++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c
@@ -302,8 +302,8 @@ static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate)
302 return -EINVAL; 302 return -EINVAL;
303 303
304 val = __raw_readl(reg); 304 val = __raw_readl(reg);
305 val &= ~(0xf << sclk->shift); 305 val &= ~(0xf << sclk->divider_shift);
306 val |= (div - 1) << sclk->shift; 306 val |= (div - 1) << sclk->divider_shift;
307 __raw_writel(val, reg); 307 __raw_writel(val, reg);
308 308
309 return 0; 309 return 0;
@@ -328,6 +328,8 @@ static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent)
328 clksrc |= src_nr << sclk->shift; 328 clksrc |= src_nr << sclk->shift;
329 329
330 __raw_writel(clksrc, S3C_CLK_SRC); 330 __raw_writel(clksrc, S3C_CLK_SRC);
331
332 clk->parent = parent;
331 return 0; 333 return 0;
332 } 334 }
333 335
@@ -343,7 +345,7 @@ static unsigned long s3c64xx_roundrate_clksrc(struct clk *clk,
343 if (rate > parent_rate) 345 if (rate > parent_rate)
344 rate = parent_rate; 346 rate = parent_rate;
345 else { 347 else {
346 div = rate / parent_rate; 348 div = parent_rate / rate;
347 349
348 if (div == 0) 350 if (div == 0)
349 div = 1; 351 div = 1;
diff --git a/arch/arm/plat-stmp3xxx/dma.c b/arch/arm/plat-stmp3xxx/dma.c
index d2f497764dce..ef88f25fb870 100644
--- a/arch/arm/plat-stmp3xxx/dma.c
+++ b/arch/arm/plat-stmp3xxx/dma.c
@@ -264,7 +264,7 @@ int stmp3xxx_dma_make_chain(int ch, struct stmp37xx_circ_dma_chain *chain,
264 stmp3xxx_dma_free_command(ch, 264 stmp3xxx_dma_free_command(ch,
265 &descriptors 265 &descriptors
266 [i]); 266 [i]);
267 } while (i-- >= 0); 267 } while (i-- > 0);
268 } 268 }
269 return err; 269 return err;
270 } 270 }
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index c8c55b469342..94be7bb6cb9a 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Sat Sep 12 12:00:16 2009 15# Last update: Fri Sep 18 21:42:00 2009
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -1638,7 +1638,7 @@ mx35evb MACH_MX35EVB MX35EVB 1643
1638aml_m8050 MACH_AML_M8050 AML_M8050 1644 1638aml_m8050 MACH_AML_M8050 AML_M8050 1644
1639mx35_3ds MACH_MX35_3DS MX35_3DS 1645 1639mx35_3ds MACH_MX35_3DS MX35_3DS 1645
1640mars MACH_MARS MARS 1646 1640mars MACH_MARS MARS 1646
1641ntosd_644xa MACH_NTOSD_644XA NTOSD_644XA 1647 1641neuros_osd2 MACH_NEUROS_OSD2 NEUROS_OSD2 1647
1642badger MACH_BADGER BADGER 1648 1642badger MACH_BADGER BADGER 1648
1643trizeps4wl MACH_TRIZEPS4WL TRIZEPS4WL 1649 1643trizeps4wl MACH_TRIZEPS4WL TRIZEPS4WL 1649
1644trizeps5 MACH_TRIZEPS5 TRIZEPS5 1650 1644trizeps5 MACH_TRIZEPS5 TRIZEPS5 1650
@@ -1654,7 +1654,7 @@ vf10xx MACH_VF10XX VF10XX 1659
1654zoran43xx MACH_ZORAN43XX ZORAN43XX 1660 1654zoran43xx MACH_ZORAN43XX ZORAN43XX 1660
1655sonix926 MACH_SONIX926 SONIX926 1661 1655sonix926 MACH_SONIX926 SONIX926 1661
1656celestialsemi MACH_CELESTIALSEMI CELESTIALSEMI 1662 1656celestialsemi MACH_CELESTIALSEMI CELESTIALSEMI 1662
1657cc9m2443 MACH_CC9M2443 CC9M2443 1663 1657cc9m2443js MACH_CC9M2443JS CC9M2443JS 1663
1658tw5334 MACH_TW5334 TW5334 1664 1658tw5334 MACH_TW5334 TW5334 1664
1659omap_htcartemis MACH_HTCARTEMIS HTCARTEMIS 1665 1659omap_htcartemis MACH_HTCARTEMIS HTCARTEMIS 1665
1660nal_hlite MACH_NAL_HLITE NAL_HLITE 1666 1660nal_hlite MACH_NAL_HLITE NAL_HLITE 1666
@@ -1802,7 +1802,7 @@ ccw9p9215js MACH_CCW9P9215JS CCW9P9215JS 1811
1802rd88f5181l_ge MACH_RD88F5181L_GE RD88F5181L_GE 1812 1802rd88f5181l_ge MACH_RD88F5181L_GE RD88F5181L_GE 1812
1803sifmain MACH_SIFMAIN SIFMAIN 1813 1803sifmain MACH_SIFMAIN SIFMAIN 1813
1804sam9_l9261 MACH_SAM9_L9261 SAM9_L9261 1814 1804sam9_l9261 MACH_SAM9_L9261 SAM9_L9261 1814
1805cc9m2443js MACH_CC9M2443JS CC9M2443JS 1815 1805cc9m2443 MACH_CC9M2443 CC9M2443 1815
1806xaria300 MACH_XARIA300 XARIA300 1816 1806xaria300 MACH_XARIA300 XARIA300 1816
1807it9200 MACH_IT9200 IT9200 1817 1807it9200 MACH_IT9200 IT9200 1817
1808rd88f5181l_fxo MACH_RD88F5181L_FXO RD88F5181L_FXO 1818 1808rd88f5181l_fxo MACH_RD88F5181L_FXO RD88F5181L_FXO 1818
@@ -2409,3 +2409,15 @@ platypus MACH_PLATYPUS PLATYPUS 2422
2409pss2 MACH_PSS2 PSS2 2423 2409pss2 MACH_PSS2 PSS2 2423
2410davinci_apm150 MACH_DAVINCI_APM150 DAVINCI_APM150 2424 2410davinci_apm150 MACH_DAVINCI_APM150 DAVINCI_APM150 2424
2411str9100 MACH_STR9100 STR9100 2425 2411str9100 MACH_STR9100 STR9100 2425
2412net5big MACH_NET5BIG NET5BIG 2426
2413seabed9263 MACH_SEABED9263 SEABED9263 2427
2414mx51_m2id MACH_MX51_M2ID MX51_M2ID 2428
2415octvocplus_eb MACH_OCTVOCPLUS_EB OCTVOCPLUS_EB 2429
2416klk_firefox MACH_KLK_FIREFOX KLK_FIREFOX 2430
2417klk_wirma_module MACH_KLK_WIRMA_MODULE KLK_WIRMA_MODULE 2431
2418klk_wirma_mmi MACH_KLK_WIRMA_MMI KLK_WIRMA_MMI 2432
2419supersonic MACH_SUPERSONIC SUPERSONIC 2433
2420liberty MACH_LIBERTY LIBERTY 2434
2421mh355 MACH_MH355 MH355 2435
2422pc7802 MACH_PC7802 PC7802 2436
2423gnet_sgc MACH_GNET_SGC GNET_SGC 2437