Commit 3d15b798 authored by Linus Torvalds's avatar Linus Torvalds

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
parents 942d33da 420c158d
...@@ -6,6 +6,7 @@ config ARM64 ...@@ -6,6 +6,7 @@ config ARM64
select ARCH_WANT_FRAME_POINTERS select ARCH_WANT_FRAME_POINTERS
select ARM_AMBA select ARM_AMBA
select ARM_ARCH_TIMER select ARM_ARCH_TIMER
select ARM_GIC
select CLONE_BACKWARDS select CLONE_BACKWARDS
select COMMON_CLK select COMMON_CLK
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
...@@ -31,6 +32,8 @@ config ARM64 ...@@ -31,6 +32,8 @@ config ARM64
select OF select OF
select OF_EARLY_FLATTREE select OF_EARLY_FLATTREE
select PERF_USE_VMALLOC select PERF_USE_VMALLOC
select POWER_RESET
select POWER_SUPPLY
select RTC_LIB select RTC_LIB
select SPARSE_IRQ select SPARSE_IRQ
select SYSCTL_EXCEPTION_TRACE select SYSCTL_EXCEPTION_TRACE
...@@ -105,6 +108,7 @@ config ARCH_VEXPRESS ...@@ -105,6 +108,7 @@ config ARCH_VEXPRESS
bool "ARMv8 software model (Versatile Express)" bool "ARMv8 software model (Versatile Express)"
select ARCH_REQUIRE_GPIOLIB select ARCH_REQUIRE_GPIOLIB
select COMMON_CLK_VERSATILE select COMMON_CLK_VERSATILE
select POWER_RESET_VEXPRESS
select VEXPRESS_CONFIG select VEXPRESS_CONFIG
help help
This enables support for the ARMv8 software model (Versatile This enables support for the ARMv8 software model (Versatile
......
...@@ -23,7 +23,7 @@ aliases { ...@@ -23,7 +23,7 @@ aliases {
}; };
cpus { cpus {
#address-cells = <1>; #address-cells = <2>;
#size-cells = <0>; #size-cells = <0>;
cpu@0 { cpu@0 {
......
...@@ -41,7 +41,7 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr); ...@@ -41,7 +41,7 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr);
extern void __show_regs(struct pt_regs *); extern void __show_regs(struct pt_regs *);
void soft_restart(unsigned long); void soft_restart(unsigned long);
extern void (*pm_restart)(const char *cmd); extern void (*arm_pm_restart)(char str, const char *cmd);
#define UDBG_UNDEFINED (1 << 0) #define UDBG_UNDEFINED (1 << 0)
#define UDBG_SYSCALL (1 << 1) #define UDBG_SYSCALL (1 << 1)
......
...@@ -81,8 +81,8 @@ void soft_restart(unsigned long addr) ...@@ -81,8 +81,8 @@ void soft_restart(unsigned long addr)
void (*pm_power_off)(void); void (*pm_power_off)(void);
EXPORT_SYMBOL_GPL(pm_power_off); EXPORT_SYMBOL_GPL(pm_power_off);
void (*pm_restart)(const char *cmd); void (*arm_pm_restart)(char str, const char *cmd);
EXPORT_SYMBOL_GPL(pm_restart); EXPORT_SYMBOL_GPL(arm_pm_restart);
void arch_cpu_idle_prepare(void) void arch_cpu_idle_prepare(void)
{ {
...@@ -131,8 +131,8 @@ void machine_restart(char *cmd) ...@@ -131,8 +131,8 @@ void machine_restart(char *cmd)
local_fiq_disable(); local_fiq_disable();
/* Now call the architecture specific reboot code. */ /* Now call the architecture specific reboot code. */
if (pm_restart) if (arm_pm_restart)
pm_restart(cmd); arm_pm_restart('h', cmd);
/* /*
* Whoops - the architecture was unable to reboot. * Whoops - the architecture was unable to reboot.
......
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
/* /*
* x0: bits 5:0 bit offset * x0: bits 5:0 bit offset
* bits 63:6 word offset * bits 31:6 word offset
* x1: address * x1: address
*/ */
.macro bitop, name, instr .macro bitop, name, instr
ENTRY( \name ) ENTRY( \name )
and x3, x0, #63 // Get bit offset and w3, w0, #63 // Get bit offset
eor x0, x0, x3 // Clear low bits eor w0, w0, w3 // Clear low bits
mov x2, #1 mov x2, #1
add x1, x1, x0, lsr #3 // Get word offset add x1, x1, x0, lsr #3 // Get word offset
lsl x3, x2, x3 // Create mask lsl x3, x2, x3 // Create mask
...@@ -41,8 +41,8 @@ ENDPROC(\name ) ...@@ -41,8 +41,8 @@ ENDPROC(\name )
.macro testop, name, instr .macro testop, name, instr
ENTRY( \name ) ENTRY( \name )
and x3, x0, #63 // Get bit offset and w3, w0, #63 // Get bit offset
eor x0, x0, x3 // Clear low bits eor w0, w0, w3 // Clear low bits
mov x2, #1 mov x2, #1
add x1, x1, x0, lsr #3 // Get word offset add x1, x1, x0, lsr #3 // Get word offset
lsl x4, x2, x3 // Create mask lsl x4, x2, x3 // Create mask
......
...@@ -148,6 +148,7 @@ void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs) ...@@ -148,6 +148,7 @@ void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
#define VM_FAULT_BADACCESS 0x020000 #define VM_FAULT_BADACCESS 0x020000
#define ESR_WRITE (1 << 6) #define ESR_WRITE (1 << 6)
#define ESR_CM (1 << 8)
#define ESR_LNX_EXEC (1 << 24) #define ESR_LNX_EXEC (1 << 24)
/* /*
...@@ -206,7 +207,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr, ...@@ -206,7 +207,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
struct task_struct *tsk; struct task_struct *tsk;
struct mm_struct *mm; struct mm_struct *mm;
int fault, sig, code; int fault, sig, code;
int write = esr & ESR_WRITE; bool write = (esr & ESR_WRITE) && !(esr & ESR_CM);
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
(write ? FAULT_FLAG_WRITE : 0); (write ? FAULT_FLAG_WRITE : 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment