aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-29 16:40:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-29 16:40:08 -0400
commitef2e0391e531832eea96ed31cba5a131bdfe4149 (patch)
treec2e281387229046f763375c17aff42f0e14c81a1 /arch
parent97be078b87f82e49b3e7a46fa71e07b7829838d3 (diff)
parent42309ab450b608ddcfafa90e4cfa93a5001ecfba (diff)
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King: "Another round of ARM fixes. The largest change here is the L2 changes to work around problems for the Armada 37x/380 devices, where most of the size comes down to comments rather than code. The other significant fix here is for the ptrace code, to ensure that rewritten syscalls work as intended. This was pointed out by Kees Cook, but Will Deacon reworked the patch to be more elegant. The remainder are fairly trivial changes" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8087/1: ptrace: reload syscall number after secure_computing() check ARM: 8086/1: Set memblock limit for nommu ARM: 8085/1: sa1100: collie: add top boot mtd partition ARM: 8084/1: sa1100: collie: revert back to cfi_probe ARM: 8080/1: mcpm.h: remove unused variable declaration ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/mcpm.h2
-rw-r--r--arch/arm/kernel/ptrace.c7
-rw-r--r--arch/arm/mach-sa1100/collie.c7
-rw-r--r--arch/arm/mm/cache-l2x0.c31
-rw-r--r--arch/arm/mm/nommu.c1
5 files changed, 42 insertions, 6 deletions
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h
index d9702eb0b02b..94060adba174 100644
--- a/arch/arm/include/asm/mcpm.h
+++ b/arch/arm/include/asm/mcpm.h
@@ -208,8 +208,6 @@ struct sync_struct {
208 struct mcpm_sync_struct clusters[MAX_NR_CLUSTERS]; 208 struct mcpm_sync_struct clusters[MAX_NR_CLUSTERS];
209}; 209};
210 210
211extern unsigned long sync_phys; /* physical address of *mcpm_sync */
212
213void __mcpm_cpu_going_down(unsigned int cpu, unsigned int cluster); 211void __mcpm_cpu_going_down(unsigned int cpu, unsigned int cluster);
214void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster); 212void __mcpm_cpu_down(unsigned int cpu, unsigned int cluster);
215void __mcpm_outbound_leave_critical(unsigned int cluster, int state); 213void __mcpm_outbound_leave_critical(unsigned int cluster, int state);
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 0dd3b79b15c3..0c27ed6f3f23 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -908,7 +908,7 @@ enum ptrace_syscall_dir {
908 PTRACE_SYSCALL_EXIT, 908 PTRACE_SYSCALL_EXIT,
909}; 909};
910 910
911static int tracehook_report_syscall(struct pt_regs *regs, 911static void tracehook_report_syscall(struct pt_regs *regs,
912 enum ptrace_syscall_dir dir) 912 enum ptrace_syscall_dir dir)
913{ 913{
914 unsigned long ip; 914 unsigned long ip;
@@ -926,7 +926,6 @@ static int tracehook_report_syscall(struct pt_regs *regs,
926 current_thread_info()->syscall = -1; 926 current_thread_info()->syscall = -1;
927 927
928 regs->ARM_ip = ip; 928 regs->ARM_ip = ip;
929 return current_thread_info()->syscall;
930} 929}
931 930
932asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno) 931asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
@@ -938,7 +937,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
938 return -1; 937 return -1;
939 938
940 if (test_thread_flag(TIF_SYSCALL_TRACE)) 939 if (test_thread_flag(TIF_SYSCALL_TRACE))
941 scno = tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER); 940 tracehook_report_syscall(regs, PTRACE_SYSCALL_ENTER);
941
942 scno = current_thread_info()->syscall;
942 943
943 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) 944 if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
944 trace_sys_enter(regs, scno); 945 trace_sys_enter(regs, scno);
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index f9874ba60cc8..108939f8d053 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -329,6 +329,11 @@ static struct mtd_partition collie_partitions[] = {
329 .name = "rootfs", 329 .name = "rootfs",
330 .offset = MTDPART_OFS_APPEND, 330 .offset = MTDPART_OFS_APPEND,
331 .size = 0x00e20000, 331 .size = 0x00e20000,
332 }, {
333 .name = "bootblock",
334 .offset = MTDPART_OFS_APPEND,
335 .size = 0x00020000,
336 .mask_flags = MTD_WRITEABLE
332 } 337 }
333}; 338};
334 339
@@ -356,7 +361,7 @@ static void collie_flash_exit(void)
356} 361}
357 362
358static struct flash_platform_data collie_flash_data = { 363static struct flash_platform_data collie_flash_data = {
359 .map_name = "jedec_probe", 364 .map_name = "cfi_probe",
360 .init = collie_flash_init, 365 .init = collie_flash_init,
361 .set_vpp = collie_set_vpp, 366 .set_vpp = collie_set_vpp,
362 .exit = collie_flash_exit, 367 .exit = collie_flash_exit,
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index efc5cabf70e0..076172b69422 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -1069,6 +1069,33 @@ static const struct l2c_init_data of_l2c310_data __initconst = {
1069}; 1069};
1070 1070
1071/* 1071/*
1072 * This is a variant of the of_l2c310_data with .sync set to
1073 * NULL. Outer sync operations are not needed when the system is I/O
1074 * coherent, and potentially harmful in certain situations (PCIe/PL310
1075 * deadlock on Armada 375/38x due to hardware I/O coherency). The
1076 * other operations are kept because they are infrequent (therefore do
1077 * not cause the deadlock in practice) and needed for secondary CPU
1078 * boot and other power management activities.
1079 */
1080static const struct l2c_init_data of_l2c310_coherent_data __initconst = {
1081 .type = "L2C-310 Coherent",
1082 .way_size_0 = SZ_8K,
1083 .num_lock = 8,
1084 .of_parse = l2c310_of_parse,
1085 .enable = l2c310_enable,
1086 .fixup = l2c310_fixup,
1087 .save = l2c310_save,
1088 .outer_cache = {
1089 .inv_range = l2c210_inv_range,
1090 .clean_range = l2c210_clean_range,
1091 .flush_range = l2c210_flush_range,
1092 .flush_all = l2c210_flush_all,
1093 .disable = l2c310_disable,
1094 .resume = l2c310_resume,
1095 },
1096};
1097
1098/*
1072 * Note that the end addresses passed to Linux primitives are 1099 * Note that the end addresses passed to Linux primitives are
1073 * noninclusive, while the hardware cache range operations use 1100 * noninclusive, while the hardware cache range operations use
1074 * inclusive start and end addresses. 1101 * inclusive start and end addresses.
@@ -1487,6 +1514,10 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
1487 1514
1488 data = of_match_node(l2x0_ids, np)->data; 1515 data = of_match_node(l2x0_ids, np)->data;
1489 1516
1517 if (of_device_is_compatible(np, "arm,pl310-cache") &&
1518 of_property_read_bool(np, "arm,io-coherent"))
1519 data = &of_l2c310_coherent_data;
1520
1490 old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); 1521 old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);
1491 if (old_aux != ((old_aux & aux_mask) | aux_val)) { 1522 if (old_aux != ((old_aux & aux_mask) | aux_val)) {
1492 pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n", 1523 pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n",
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index da1874f9f8cf..a014dfacd5ca 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -300,6 +300,7 @@ void __init sanity_check_meminfo(void)
300 sanity_check_meminfo_mpu(); 300 sanity_check_meminfo_mpu();
301 end = memblock_end_of_DRAM(); 301 end = memblock_end_of_DRAM();
302 high_memory = __va(end - 1) + 1; 302 high_memory = __va(end - 1) + 1;
303 memblock_set_current_limit(end);
303} 304}
304 305
305/* 306/*