aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 21:34:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-23 21:34:03 -0500
commitf341535193c338b4ce4af8e32be51e6aae7f22a6 (patch)
treed054a10be84681b93ce53c348cde0d764e1e24a2 /arch/arm/kernel
parent13c789a6b219aa23f917466c7e630566106b14c2 (diff)
parent857989a7fdd2f6de42272578b8aaa413ed6e63e4 (diff)
Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM updates from Russell King: "In this set, we have: - Refactoring of some of the old StrongARM-1100 GPIO code to make things simpler by Dmitry Eremin-Solenikov - Read-only and non-executable support for modules on ARM from Laura Abbot - Removal of unnecessary set_drvdata() calls in AMBA code - Some non-executable support for kernel lowmem mappings at the 1MB section granularity, and dumping of kernel page tables via debugfs - Some improvements for the timer/clock code on Footbridge platforms, and cleanup some of the LED code there - Fix fls/ffs() signatures to match x86 to prevent build warnings, particularly where these are used with min/max() macros - Avoid using the bootmem allocator on ARM (patches from Santosh Shilimkar) - Various asid/unaligned access updates from Will Deacon" * 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: (51 commits) ARM: SMP implementations are not supposed to return from smp_ops.cpu_die() ARM: ignore memory below PHYS_OFFSET Fix select-induced Kconfig warning for ZBOOT_ROM ARM: fix ffs/fls implementations to match x86 ARM: 7935/1: sa1100: collie: add gpio-keys configuration ARM: 7932/1: bcm: Add DEBUG_LL console support ARM: 7929/1: Remove duplicate SCHED_HRTICK config option ARM: 7928/1: kconfig: select HAVE_EFFICIENT_UNALIGNED_ACCESS for CPUv6+ && MMU ARM: 7927/1: dcache: select DCACHE_WORD_ACCESS for big-endian CPUs ARM: 7926/1: mm: flesh out and fix the comments in the ASID allocator ARM: 7925/1: mm: keep track of last ASID allocation to improve bitmap searching ARM: 7924/1: mm: don't bother with reserved ttbr0 when running with LPAE ARM: PCI: add legacy IDE IRQ implementation ARM: footbridge: cleanup LEDs code ARM: pgd allocation: retry on failure ARM: footbridge: add one-shot mode for DC21285 timer ARM: footbridge: add sched_clock implementation ARM: 7922/1: l2x0: add Marvell Tauros3 support ARM: 7877/1: use built-in byte swap function ARM: 7921/1: mcpm: remove redundant dsb instructions prior to sev ...
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/armksyms.c4
-rw-r--r--arch/arm/kernel/entry-v7m.S2
-rw-r--r--arch/arm/kernel/etm.c6
-rw-r--r--arch/arm/kernel/setup.c57
-rw-r--r--arch/arm/kernel/smp.c6
-rw-r--r--arch/arm/kernel/tcm.c4
-rw-r--r--arch/arm/kernel/topology.c12
-rw-r--r--arch/arm/kernel/traps.c2
8 files changed, 52 insertions, 41 deletions
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 1f031ddd0667..85e664b6a5f1 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -35,6 +35,8 @@ extern void __ucmpdi2(void);
35extern void __udivsi3(void); 35extern void __udivsi3(void);
36extern void __umodsi3(void); 36extern void __umodsi3(void);
37extern void __do_div64(void); 37extern void __do_div64(void);
38extern void __bswapsi2(void);
39extern void __bswapdi2(void);
38 40
39extern void __aeabi_idiv(void); 41extern void __aeabi_idiv(void);
40extern void __aeabi_idivmod(void); 42extern void __aeabi_idivmod(void);
@@ -114,6 +116,8 @@ EXPORT_SYMBOL(__ucmpdi2);
114EXPORT_SYMBOL(__udivsi3); 116EXPORT_SYMBOL(__udivsi3);
115EXPORT_SYMBOL(__umodsi3); 117EXPORT_SYMBOL(__umodsi3);
116EXPORT_SYMBOL(__do_div64); 118EXPORT_SYMBOL(__do_div64);
119EXPORT_SYMBOL(__bswapsi2);
120EXPORT_SYMBOL(__bswapdi2);
117 121
118#ifdef CONFIG_AEABI 122#ifdef CONFIG_AEABI
119EXPORT_SYMBOL(__aeabi_idiv); 123EXPORT_SYMBOL(__aeabi_idiv);
diff --git a/arch/arm/kernel/entry-v7m.S b/arch/arm/kernel/entry-v7m.S
index 52b26432c9a9..2260f1855820 100644
--- a/arch/arm/kernel/entry-v7m.S
+++ b/arch/arm/kernel/entry-v7m.S
@@ -14,8 +14,6 @@
14#include <asm/thread_notify.h> 14#include <asm/thread_notify.h>
15#include <asm/v7m.h> 15#include <asm/v7m.h>
16 16
17#include <mach/entry-macro.S>
18
19#include "entry-header.S" 17#include "entry-header.S"
20 18
21#ifdef CONFIG_TRACE_IRQFLAGS 19#ifdef CONFIG_TRACE_IRQFLAGS
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c
index 8ff0ecdc637f..131a6ab5f355 100644
--- a/arch/arm/kernel/etm.c
+++ b/arch/arm/kernel/etm.c
@@ -385,7 +385,6 @@ out:
385 return ret; 385 return ret;
386 386
387out_unmap: 387out_unmap:
388 amba_set_drvdata(dev, NULL);
389 iounmap(t->etb_regs); 388 iounmap(t->etb_regs);
390 389
391out_release: 390out_release:
@@ -398,8 +397,6 @@ static int etb_remove(struct amba_device *dev)
398{ 397{
399 struct tracectx *t = amba_get_drvdata(dev); 398 struct tracectx *t = amba_get_drvdata(dev);
400 399
401 amba_set_drvdata(dev, NULL);
402
403 iounmap(t->etb_regs); 400 iounmap(t->etb_regs);
404 t->etb_regs = NULL; 401 t->etb_regs = NULL;
405 402
@@ -588,7 +585,6 @@ out:
588 return ret; 585 return ret;
589 586
590out_unmap: 587out_unmap:
591 amba_set_drvdata(dev, NULL);
592 iounmap(t->etm_regs); 588 iounmap(t->etm_regs);
593 589
594out_release: 590out_release:
@@ -601,8 +597,6 @@ static int etm_remove(struct amba_device *dev)
601{ 597{
602 struct tracectx *t = amba_get_drvdata(dev); 598 struct tracectx *t = amba_get_drvdata(dev);
603 599
604 amba_set_drvdata(dev, NULL);
605
606 iounmap(t->etm_regs); 600 iounmap(t->etm_regs);
607 t->etm_regs = NULL; 601 t->etm_regs = NULL;
608 602
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 8ce1cbd08dba..1e8b030dbefd 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -334,7 +334,7 @@ static void __init cacheid_init(void)
334 cacheid = CACHEID_VIVT; 334 cacheid = CACHEID_VIVT;
335 } 335 }
336 336
337 printk("CPU: %s data cache, %s instruction cache\n", 337 pr_info("CPU: %s data cache, %s instruction cache\n",
338 cache_is_vivt() ? "VIVT" : 338 cache_is_vivt() ? "VIVT" :
339 cache_is_vipt_aliasing() ? "VIPT aliasing" : 339 cache_is_vipt_aliasing() ? "VIPT aliasing" :
340 cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown", 340 cache_is_vipt_nonaliasing() ? "PIPT / VIPT nonaliasing" : "unknown",
@@ -416,7 +416,7 @@ void notrace cpu_init(void)
416 struct stack *stk = &stacks[cpu]; 416 struct stack *stk = &stacks[cpu];
417 417
418 if (cpu >= NR_CPUS) { 418 if (cpu >= NR_CPUS) {
419 printk(KERN_CRIT "CPU%u: bad primary CPU number\n", cpu); 419 pr_crit("CPU%u: bad primary CPU number\n", cpu);
420 BUG(); 420 BUG();
421 } 421 }
422 422
@@ -484,7 +484,7 @@ void __init smp_setup_processor_id(void)
484 */ 484 */
485 set_my_cpu_offset(0); 485 set_my_cpu_offset(0);
486 486
487 printk(KERN_INFO "Booting Linux on physical CPU 0x%x\n", mpidr); 487 pr_info("Booting Linux on physical CPU 0x%x\n", mpidr);
488} 488}
489 489
490struct mpidr_hash mpidr_hash; 490struct mpidr_hash mpidr_hash;
@@ -564,8 +564,8 @@ static void __init setup_processor(void)
564 */ 564 */
565 list = lookup_processor_type(read_cpuid_id()); 565 list = lookup_processor_type(read_cpuid_id());
566 if (!list) { 566 if (!list) {
567 printk("CPU configuration botched (ID %08x), unable " 567 pr_err("CPU configuration botched (ID %08x), unable to continue.\n",
568 "to continue.\n", read_cpuid_id()); 568 read_cpuid_id());
569 while (1); 569 while (1);
570 } 570 }
571 571
@@ -585,9 +585,9 @@ static void __init setup_processor(void)
585 cpu_cache = *list->cache; 585 cpu_cache = *list->cache;
586#endif 586#endif
587 587
588 printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n", 588 pr_info("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
589 cpu_name, read_cpuid_id(), read_cpuid_id() & 15, 589 cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
590 proc_arch[cpu_architecture()], cr_alignment); 590 proc_arch[cpu_architecture()], cr_alignment);
591 591
592 snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c", 592 snprintf(init_utsname()->machine, __NEW_UTS_LEN + 1, "%s%c",
593 list->arch_name, ENDIANNESS); 593 list->arch_name, ENDIANNESS);
@@ -629,8 +629,8 @@ int __init arm_add_memory(u64 start, u64 size)
629 u64 aligned_start; 629 u64 aligned_start;
630 630
631 if (meminfo.nr_banks >= NR_BANKS) { 631 if (meminfo.nr_banks >= NR_BANKS) {
632 printk(KERN_CRIT "NR_BANKS too low, " 632 pr_crit("NR_BANKS too low, ignoring memory at 0x%08llx\n",
633 "ignoring memory at 0x%08llx\n", (long long)start); 633 (long long)start);
634 return -EINVAL; 634 return -EINVAL;
635 } 635 }
636 636
@@ -643,14 +643,14 @@ int __init arm_add_memory(u64 start, u64 size)
643 643
644#ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT 644#ifndef CONFIG_ARCH_PHYS_ADDR_T_64BIT
645 if (aligned_start > ULONG_MAX) { 645 if (aligned_start > ULONG_MAX) {
646 printk(KERN_CRIT "Ignoring memory at 0x%08llx outside " 646 pr_crit("Ignoring memory at 0x%08llx outside 32-bit physical address space\n",
647 "32-bit physical address space\n", (long long)start); 647 (long long)start);
648 return -EINVAL; 648 return -EINVAL;
649 } 649 }
650 650
651 if (aligned_start + size > ULONG_MAX) { 651 if (aligned_start + size > ULONG_MAX) {
652 printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in " 652 pr_crit("Truncating memory at 0x%08llx to fit in 32-bit physical address space\n",
653 "32-bit physical address space\n", (long long)start); 653 (long long)start);
654 /* 654 /*
655 * To ensure bank->start + bank->size is representable in 655 * To ensure bank->start + bank->size is representable in
656 * 32 bits, we use ULONG_MAX as the upper limit rather than 4GB. 656 * 32 bits, we use ULONG_MAX as the upper limit rather than 4GB.
@@ -660,6 +660,20 @@ int __init arm_add_memory(u64 start, u64 size)
660 } 660 }
661#endif 661#endif
662 662
663 if (aligned_start < PHYS_OFFSET) {
664 if (aligned_start + size <= PHYS_OFFSET) {
665 pr_info("Ignoring memory below PHYS_OFFSET: 0x%08llx-0x%08llx\n",
666 aligned_start, aligned_start + size);
667 return -EINVAL;
668 }
669
670 pr_info("Ignoring memory below PHYS_OFFSET: 0x%08llx-0x%08llx\n",
671 aligned_start, (u64)PHYS_OFFSET);
672
673 size -= PHYS_OFFSET - aligned_start;
674 aligned_start = PHYS_OFFSET;
675 }
676
663 bank->start = aligned_start; 677 bank->start = aligned_start;
664 bank->size = size & ~(phys_addr_t)(PAGE_SIZE - 1); 678 bank->size = size & ~(phys_addr_t)(PAGE_SIZE - 1);
665 679
@@ -817,18 +831,17 @@ static void __init reserve_crashkernel(void)
817 if (ret) 831 if (ret)
818 return; 832 return;
819 833
820 ret = reserve_bootmem(crash_base, crash_size, BOOTMEM_EXCLUSIVE); 834 ret = memblock_reserve(crash_base, crash_size);
821 if (ret < 0) { 835 if (ret < 0) {
822 printk(KERN_WARNING "crashkernel reservation failed - " 836 pr_warn("crashkernel reservation failed - memory is in use (0x%lx)\n",
823 "memory is in use (0x%lx)\n", (unsigned long)crash_base); 837 (unsigned long)crash_base);
824 return; 838 return;
825 } 839 }
826 840
827 printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " 841 pr_info("Reserving %ldMB of memory at %ldMB for crashkernel (System RAM: %ldMB)\n",
828 "for crashkernel (System RAM: %ldMB)\n", 842 (unsigned long)(crash_size >> 20),
829 (unsigned long)(crash_size >> 20), 843 (unsigned long)(crash_base >> 20),
830 (unsigned long)(crash_base >> 20), 844 (unsigned long)(total_mem >> 20));
831 (unsigned long)(total_mem >> 20));
832 845
833 crashk_res.start = crash_base; 846 crashk_res.start = crash_base;
834 crashk_res.end = crash_base + crash_size - 1; 847 crashk_res.end = crash_base + crash_size - 1;
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index dc894ab3622b..b7b4c86e338b 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -105,8 +105,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
105 secondary_data.pgdir = get_arch_pgd(idmap_pgd); 105 secondary_data.pgdir = get_arch_pgd(idmap_pgd);
106 secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir); 106 secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir);
107#endif 107#endif
108 __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 108 sync_cache_w(&secondary_data);
109 outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
110 109
111 /* 110 /*
112 * Now bring the CPU into our world. 111 * Now bring the CPU into our world.
@@ -294,6 +293,9 @@ void __ref cpu_die(void)
294 if (smp_ops.cpu_die) 293 if (smp_ops.cpu_die)
295 smp_ops.cpu_die(cpu); 294 smp_ops.cpu_die(cpu);
296 295
296 pr_warn("CPU%u: smp_ops.cpu_die() returned, trying to resuscitate\n",
297 cpu);
298
297 /* 299 /*
298 * Do not return to the idle loop - jump back to the secondary 300 * Do not return to the idle loop - jump back to the secondary
299 * cpu initialisation. There's some initialisation which needs 301 * cpu initialisation. There's some initialisation which needs
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
index f50f19e5c138..7a3be1d4d0b1 100644
--- a/arch/arm/kernel/tcm.c
+++ b/arch/arm/kernel/tcm.c
@@ -52,7 +52,7 @@ static struct map_desc dtcm_iomap[] __initdata = {
52 .virtual = DTCM_OFFSET, 52 .virtual = DTCM_OFFSET,
53 .pfn = __phys_to_pfn(DTCM_OFFSET), 53 .pfn = __phys_to_pfn(DTCM_OFFSET),
54 .length = 0, 54 .length = 0,
55 .type = MT_MEMORY_DTCM 55 .type = MT_MEMORY_RW_DTCM
56 } 56 }
57}; 57};
58 58
@@ -61,7 +61,7 @@ static struct map_desc itcm_iomap[] __initdata = {
61 .virtual = ITCM_OFFSET, 61 .virtual = ITCM_OFFSET,
62 .pfn = __phys_to_pfn(ITCM_OFFSET), 62 .pfn = __phys_to_pfn(ITCM_OFFSET),
63 .length = 0, 63 .length = 0,
64 .type = MT_MEMORY_ITCM 64 .type = MT_MEMORY_RWX_ITCM,
65 } 65 }
66}; 66};
67 67
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 85a87370f144..0bc94b1fd1ae 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -68,16 +68,16 @@ struct cpu_efficiency {
68 * Processors that are not defined in the table, 68 * Processors that are not defined in the table,
69 * use the default SCHED_POWER_SCALE value for cpu_scale. 69 * use the default SCHED_POWER_SCALE value for cpu_scale.
70 */ 70 */
71struct cpu_efficiency table_efficiency[] = { 71static const struct cpu_efficiency table_efficiency[] = {
72 {"arm,cortex-a15", 3891}, 72 {"arm,cortex-a15", 3891},
73 {"arm,cortex-a7", 2048}, 73 {"arm,cortex-a7", 2048},
74 {NULL, }, 74 {NULL, },
75}; 75};
76 76
77unsigned long *__cpu_capacity; 77static unsigned long *__cpu_capacity;
78#define cpu_capacity(cpu) __cpu_capacity[cpu] 78#define cpu_capacity(cpu) __cpu_capacity[cpu]
79 79
80unsigned long middle_capacity = 1; 80static unsigned long middle_capacity = 1;
81 81
82/* 82/*
83 * Iterate all CPUs' descriptor in DT and compute the efficiency 83 * Iterate all CPUs' descriptor in DT and compute the efficiency
@@ -89,7 +89,7 @@ unsigned long middle_capacity = 1;
89 */ 89 */
90static void __init parse_dt_topology(void) 90static void __init parse_dt_topology(void)
91{ 91{
92 struct cpu_efficiency *cpu_eff; 92 const struct cpu_efficiency *cpu_eff;
93 struct device_node *cn = NULL; 93 struct device_node *cn = NULL;
94 unsigned long min_capacity = (unsigned long)(-1); 94 unsigned long min_capacity = (unsigned long)(-1);
95 unsigned long max_capacity = 0; 95 unsigned long max_capacity = 0;
@@ -158,7 +158,7 @@ static void __init parse_dt_topology(void)
158 * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the 158 * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the
159 * function returns directly for SMP system. 159 * function returns directly for SMP system.
160 */ 160 */
161void update_cpu_power(unsigned int cpu) 161static void update_cpu_power(unsigned int cpu)
162{ 162{
163 if (!cpu_capacity(cpu)) 163 if (!cpu_capacity(cpu))
164 return; 164 return;
@@ -185,7 +185,7 @@ const struct cpumask *cpu_coregroup_mask(int cpu)
185 return &cpu_topology[cpu].core_sibling; 185 return &cpu_topology[cpu].core_sibling;
186} 186}
187 187
188void update_siblings_masks(unsigned int cpuid) 188static void update_siblings_masks(unsigned int cpuid)
189{ 189{
190 struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; 190 struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid];
191 int cpu; 191 int cpu;
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 4636d56af2db..172ee18ff124 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -62,7 +62,7 @@ static void dump_mem(const char *, const char *, unsigned long, unsigned long);
62void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame) 62void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame)
63{ 63{
64#ifdef CONFIG_KALLSYMS 64#ifdef CONFIG_KALLSYMS
65 printk("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); 65 printk("[<%08lx>] (%ps) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from);
66#else 66#else
67 printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); 67 printk("Function entered at [<%08lx>] from [<%08lx>]\n", where, from);
68#endif 68#endif