aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-08 18:15:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-08 18:15:27 -0400
commit3d15b798eafd3b6b3cc25f20747008ab9401a57f (patch)
tree9cc140b174197048ae3f4282e09b50d0a43d3ae6 /arch
parent942d33da999b86821c9aee9615fcb81207ee04c7 (diff)
parent420c158dcf96ee3a5758c9bf1586b163584c75c7 (diff)
Merge tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64
Pull arm64 update from Catalin Marinas: - Since drivers/irqchip/irq-gic.c no longer has dependencies on arm32 specifics (the 'gic' branch merged), it can be enabled on arm64. - Enable arm64 support for poweroff/restart (for code under drivers/power/reset/). - Fixes (dts file, exception handling, bitops) * tag 'arm64-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64: arm64: Treat the bitops index argument as an 'int' arm64: Ignore the 'write' ESR flag on cache maintenance faults arm64: dts: fix #address-cells for foundation-v8 arm64: vexpress: Add support for poweroff/restart arm64: Enable support for the ARM GIC interrupt controller
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/Kconfig4
-rw-r--r--arch/arm64/boot/dts/foundation-v8.dts2
-rw-r--r--arch/arm64/include/asm/system_misc.h2
-rw-r--r--arch/arm64/kernel/process.c8
-rw-r--r--arch/arm64/lib/bitops.S10
-rw-r--r--arch/arm64/mm/fault.c3
6 files changed, 17 insertions, 12 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 73b6e764034c..43b0e9f10a39 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -6,6 +6,7 @@ config ARM64
6 select ARCH_WANT_FRAME_POINTERS 6 select ARCH_WANT_FRAME_POINTERS
7 select ARM_AMBA 7 select ARM_AMBA
8 select ARM_ARCH_TIMER 8 select ARM_ARCH_TIMER
9 select ARM_GIC
9 select CLONE_BACKWARDS 10 select CLONE_BACKWARDS
10 select COMMON_CLK 11 select COMMON_CLK
11 select GENERIC_CLOCKEVENTS 12 select GENERIC_CLOCKEVENTS
@@ -31,6 +32,8 @@ config ARM64
31 select OF 32 select OF
32 select OF_EARLY_FLATTREE 33 select OF_EARLY_FLATTREE
33 select PERF_USE_VMALLOC 34 select PERF_USE_VMALLOC
35 select POWER_RESET
36 select POWER_SUPPLY
34 select RTC_LIB 37 select RTC_LIB
35 select SPARSE_IRQ 38 select SPARSE_IRQ
36 select SYSCTL_EXCEPTION_TRACE 39 select SYSCTL_EXCEPTION_TRACE
@@ -105,6 +108,7 @@ config ARCH_VEXPRESS
105 bool "ARMv8 software model (Versatile Express)" 108 bool "ARMv8 software model (Versatile Express)"
106 select ARCH_REQUIRE_GPIOLIB 109 select ARCH_REQUIRE_GPIOLIB
107 select COMMON_CLK_VERSATILE 110 select COMMON_CLK_VERSATILE
111 select POWER_RESET_VEXPRESS
108 select VEXPRESS_CONFIG 112 select VEXPRESS_CONFIG
109 help 113 help
110 This enables support for the ARMv8 software model (Versatile 114 This enables support for the ARMv8 software model (Versatile
diff --git a/arch/arm64/boot/dts/foundation-v8.dts b/arch/arm64/boot/dts/foundation-v8.dts
index 198682b6de31..84fcc5018284 100644
--- a/arch/arm64/boot/dts/foundation-v8.dts
+++ b/arch/arm64/boot/dts/foundation-v8.dts
@@ -23,7 +23,7 @@
23 }; 23 };
24 24
25 cpus { 25 cpus {
26 #address-cells = <1>; 26 #address-cells = <2>;
27 #size-cells = <0>; 27 #size-cells = <0>;
28 28
29 cpu@0 { 29 cpu@0 {
diff --git a/arch/arm64/include/asm/system_misc.h b/arch/arm64/include/asm/system_misc.h
index 95e407255347..a6e1750369ef 100644
--- a/arch/arm64/include/asm/system_misc.h
+++ b/arch/arm64/include/asm/system_misc.h
@@ -41,7 +41,7 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr);
41extern void __show_regs(struct pt_regs *); 41extern void __show_regs(struct pt_regs *);
42 42
43void soft_restart(unsigned long); 43void soft_restart(unsigned long);
44extern void (*pm_restart)(const char *cmd); 44extern void (*arm_pm_restart)(char str, const char *cmd);
45 45
46#define UDBG_UNDEFINED (1 << 0) 46#define UDBG_UNDEFINED (1 << 0)
47#define UDBG_SYSCALL (1 << 1) 47#define UDBG_SYSCALL (1 << 1)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index f4919721f7dd..46f02c3b5015 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -81,8 +81,8 @@ void soft_restart(unsigned long addr)
81void (*pm_power_off)(void); 81void (*pm_power_off)(void);
82EXPORT_SYMBOL_GPL(pm_power_off); 82EXPORT_SYMBOL_GPL(pm_power_off);
83 83
84void (*pm_restart)(const char *cmd); 84void (*arm_pm_restart)(char str, const char *cmd);
85EXPORT_SYMBOL_GPL(pm_restart); 85EXPORT_SYMBOL_GPL(arm_pm_restart);
86 86
87void arch_cpu_idle_prepare(void) 87void arch_cpu_idle_prepare(void)
88{ 88{
@@ -131,8 +131,8 @@ void machine_restart(char *cmd)
131 local_fiq_disable(); 131 local_fiq_disable();
132 132
133 /* Now call the architecture specific reboot code. */ 133 /* Now call the architecture specific reboot code. */
134 if (pm_restart) 134 if (arm_pm_restart)
135 pm_restart(cmd); 135 arm_pm_restart('h', cmd);
136 136
137 /* 137 /*
138 * Whoops - the architecture was unable to reboot. 138 * Whoops - the architecture was unable to reboot.
diff --git a/arch/arm64/lib/bitops.S b/arch/arm64/lib/bitops.S
index 36216d30cb9a..e5db797790d3 100644
--- a/arch/arm64/lib/bitops.S
+++ b/arch/arm64/lib/bitops.S
@@ -21,13 +21,13 @@
21 21
22/* 22/*
23 * x0: bits 5:0 bit offset 23 * x0: bits 5:0 bit offset
24 * bits 63:6 word offset 24 * bits 31:6 word offset
25 * x1: address 25 * x1: address
26 */ 26 */
27 .macro bitop, name, instr 27 .macro bitop, name, instr
28ENTRY( \name ) 28ENTRY( \name )
29 and x3, x0, #63 // Get bit offset 29 and w3, w0, #63 // Get bit offset
30 eor x0, x0, x3 // Clear low bits 30 eor w0, w0, w3 // Clear low bits
31 mov x2, #1 31 mov x2, #1
32 add x1, x1, x0, lsr #3 // Get word offset 32 add x1, x1, x0, lsr #3 // Get word offset
33 lsl x3, x2, x3 // Create mask 33 lsl x3, x2, x3 // Create mask
@@ -41,8 +41,8 @@ ENDPROC(\name )
41 41
42 .macro testop, name, instr 42 .macro testop, name, instr
43ENTRY( \name ) 43ENTRY( \name )
44 and x3, x0, #63 // Get bit offset 44 and w3, w0, #63 // Get bit offset
45 eor x0, x0, x3 // Clear low bits 45 eor w0, w0, w3 // Clear low bits
46 mov x2, #1 46 mov x2, #1
47 add x1, x1, x0, lsr #3 // Get word offset 47 add x1, x1, x0, lsr #3 // Get word offset
48 lsl x4, x2, x3 // Create mask 48 lsl x4, x2, x3 // Create mask
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 52638171d6fd..98af6e760cce 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -148,6 +148,7 @@ void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
148#define VM_FAULT_BADACCESS 0x020000 148#define VM_FAULT_BADACCESS 0x020000
149 149
150#define ESR_WRITE (1 << 6) 150#define ESR_WRITE (1 << 6)
151#define ESR_CM (1 << 8)
151#define ESR_LNX_EXEC (1 << 24) 152#define ESR_LNX_EXEC (1 << 24)
152 153
153/* 154/*
@@ -206,7 +207,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
206 struct task_struct *tsk; 207 struct task_struct *tsk;
207 struct mm_struct *mm; 208 struct mm_struct *mm;
208 int fault, sig, code; 209 int fault, sig, code;
209 int write = esr & ESR_WRITE; 210 bool write = (esr & ESR_WRITE) && !(esr & ESR_CM);
210 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | 211 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
211 (write ? FAULT_FLAG_WRITE : 0); 212 (write ? FAULT_FLAG_WRITE : 0);
212 213