diff options
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/armksyms.c | 1 | ||||
-rw-r--r-- | arch/arm/kernel/ftrace.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/head-common.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/init_task.c | 1 | ||||
-rw-r--r-- | arch/arm/kernel/module.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 57 | ||||
-rw-r--r-- | arch/arm/kernel/smp.c | 4 | ||||
-rw-r--r-- | arch/arm/kernel/thumbee.c | 2 | ||||
-rw-r--r-- | arch/arm/kernel/vmlinux.lds.S | 2 |
9 files changed, 41 insertions, 34 deletions
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 23af3c972c9a..531e1860e546 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/sched.h> | ||
11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
12 | #include <linux/cryptohash.h> | 13 | #include <linux/cryptohash.h> |
13 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c index 6c90479e8974..c63842766229 100644 --- a/arch/arm/kernel/ftrace.c +++ b/arch/arm/kernel/ftrace.c | |||
@@ -95,7 +95,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
95 | return ret; | 95 | return ret; |
96 | } | 96 | } |
97 | 97 | ||
98 | /* run from kstop_machine */ | 98 | /* run from ftrace_init with irqs disabled */ |
99 | int __init ftrace_dyn_arch_init(void *data) | 99 | int __init ftrace_dyn_arch_init(void *data) |
100 | { | 100 | { |
101 | ftrace_mcount_set(data); | 101 | ftrace_mcount_set(data); |
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index bde52df1c668..991952c644d1 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -18,7 +18,7 @@ | |||
18 | __switch_data: | 18 | __switch_data: |
19 | .long __mmap_switched | 19 | .long __mmap_switched |
20 | .long __data_loc @ r4 | 20 | .long __data_loc @ r4 |
21 | .long __data_start @ r5 | 21 | .long _data @ r5 |
22 | .long __bss_start @ r6 | 22 | .long __bss_start @ r6 |
23 | .long _end @ r7 | 23 | .long _end @ r7 |
24 | .long processor_id @ r4 | 24 | .long processor_id @ r4 |
diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c index 0bbf80625395..e859af349467 100644 --- a/arch/arm/kernel/init_task.c +++ b/arch/arm/kernel/init_task.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable.h> |
14 | 14 | ||
15 | static struct fs_struct init_fs = INIT_FS; | ||
16 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 15 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
17 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 16 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
18 | struct mm_struct init_mm = INIT_MM(init_mm); | 17 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index b8d965dcd6fd..dab48f27263f 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | 22 | ||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/sections.h> | ||
24 | 25 | ||
25 | #ifdef CONFIG_XIP_KERNEL | 26 | #ifdef CONFIG_XIP_KERNEL |
26 | /* | 27 | /* |
@@ -29,9 +30,8 @@ | |||
29 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid | 30 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid |
30 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. | 31 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. |
31 | */ | 32 | */ |
32 | extern void _etext; | ||
33 | #undef MODULES_VADDR | 33 | #undef MODULES_VADDR |
34 | #define MODULES_VADDR (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) | 34 | #define MODULES_VADDR (((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef CONFIG_MMU | 37 | #ifdef CONFIG_MMU |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 1f1eecca7f55..7049815d66d5 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/cputype.h> | 29 | #include <asm/cputype.h> |
30 | #include <asm/elf.h> | 30 | #include <asm/elf.h> |
31 | #include <asm/procinfo.h> | 31 | #include <asm/procinfo.h> |
32 | #include <asm/sections.h> | ||
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
@@ -59,9 +60,8 @@ static int __init fpe_setup(char *line) | |||
59 | __setup("fpe=", fpe_setup); | 60 | __setup("fpe=", fpe_setup); |
60 | #endif | 61 | #endif |
61 | 62 | ||
62 | extern void paging_init(struct meminfo *, struct machine_desc *desc); | 63 | extern void paging_init(struct machine_desc *desc); |
63 | extern void reboot_setup(char *str); | 64 | extern void reboot_setup(char *str); |
64 | extern void _text, _etext, __data_start, _edata, _end; | ||
65 | 65 | ||
66 | unsigned int processor_id; | 66 | unsigned int processor_id; |
67 | EXPORT_SYMBOL(processor_id); | 67 | EXPORT_SYMBOL(processor_id); |
@@ -112,7 +112,6 @@ static struct stack stacks[NR_CPUS]; | |||
112 | char elf_platform[ELF_PLATFORM_SIZE]; | 112 | char elf_platform[ELF_PLATFORM_SIZE]; |
113 | EXPORT_SYMBOL(elf_platform); | 113 | EXPORT_SYMBOL(elf_platform); |
114 | 114 | ||
115 | static struct meminfo meminfo __initdata = { 0, }; | ||
116 | static const char *cpu_name; | 115 | static const char *cpu_name; |
117 | static const char *machine_name; | 116 | static const char *machine_name; |
118 | static char __initdata command_line[COMMAND_LINE_SIZE]; | 117 | static char __initdata command_line[COMMAND_LINE_SIZE]; |
@@ -367,21 +366,34 @@ static struct machine_desc * __init setup_machine(unsigned int nr) | |||
367 | return list; | 366 | return list; |
368 | } | 367 | } |
369 | 368 | ||
370 | static void __init arm_add_memory(unsigned long start, unsigned long size) | 369 | static int __init arm_add_memory(unsigned long start, unsigned long size) |
371 | { | 370 | { |
372 | struct membank *bank; | 371 | struct membank *bank = &meminfo.bank[meminfo.nr_banks]; |
372 | |||
373 | if (meminfo.nr_banks >= NR_BANKS) { | ||
374 | printk(KERN_CRIT "NR_BANKS too low, " | ||
375 | "ignoring memory at %#lx\n", start); | ||
376 | return -EINVAL; | ||
377 | } | ||
373 | 378 | ||
374 | /* | 379 | /* |
375 | * Ensure that start/size are aligned to a page boundary. | 380 | * Ensure that start/size are aligned to a page boundary. |
376 | * Size is appropriately rounded down, start is rounded up. | 381 | * Size is appropriately rounded down, start is rounded up. |
377 | */ | 382 | */ |
378 | size -= start & ~PAGE_MASK; | 383 | size -= start & ~PAGE_MASK; |
379 | |||
380 | bank = &meminfo.bank[meminfo.nr_banks++]; | ||
381 | |||
382 | bank->start = PAGE_ALIGN(start); | 384 | bank->start = PAGE_ALIGN(start); |
383 | bank->size = size & PAGE_MASK; | 385 | bank->size = size & PAGE_MASK; |
384 | bank->node = PHYS_TO_NID(start); | 386 | bank->node = PHYS_TO_NID(start); |
387 | |||
388 | /* | ||
389 | * Check whether this memory region has non-zero size or | ||
390 | * invalid node number. | ||
391 | */ | ||
392 | if (bank->size == 0 || bank->node >= MAX_NUMNODES) | ||
393 | return -EINVAL; | ||
394 | |||
395 | meminfo.nr_banks++; | ||
396 | return 0; | ||
385 | } | 397 | } |
386 | 398 | ||
387 | /* | 399 | /* |
@@ -472,10 +484,10 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) | |||
472 | struct resource *res; | 484 | struct resource *res; |
473 | int i; | 485 | int i; |
474 | 486 | ||
475 | kernel_code.start = virt_to_phys(&_text); | 487 | kernel_code.start = virt_to_phys(_text); |
476 | kernel_code.end = virt_to_phys(&_etext - 1); | 488 | kernel_code.end = virt_to_phys(_etext - 1); |
477 | kernel_data.start = virt_to_phys(&__data_start); | 489 | kernel_data.start = virt_to_phys(_data); |
478 | kernel_data.end = virt_to_phys(&_end - 1); | 490 | kernel_data.end = virt_to_phys(_end - 1); |
479 | 491 | ||
480 | for (i = 0; i < mi->nr_banks; i++) { | 492 | for (i = 0; i < mi->nr_banks; i++) { |
481 | if (mi->bank[i].size == 0) | 493 | if (mi->bank[i].size == 0) |
@@ -539,14 +551,7 @@ __tagtable(ATAG_CORE, parse_tag_core); | |||
539 | 551 | ||
540 | static int __init parse_tag_mem32(const struct tag *tag) | 552 | static int __init parse_tag_mem32(const struct tag *tag) |
541 | { | 553 | { |
542 | if (meminfo.nr_banks >= NR_BANKS) { | 554 | return arm_add_memory(tag->u.mem.start, tag->u.mem.size); |
543 | printk(KERN_WARNING | ||
544 | "Ignoring memory bank 0x%08x size %dKB\n", | ||
545 | tag->u.mem.start, tag->u.mem.size / 1024); | ||
546 | return -EINVAL; | ||
547 | } | ||
548 | arm_add_memory(tag->u.mem.start, tag->u.mem.size); | ||
549 | return 0; | ||
550 | } | 555 | } |
551 | 556 | ||
552 | __tagtable(ATAG_MEM, parse_tag_mem32); | 557 | __tagtable(ATAG_MEM, parse_tag_mem32); |
@@ -710,15 +715,15 @@ void __init setup_arch(char **cmdline_p) | |||
710 | parse_tags(tags); | 715 | parse_tags(tags); |
711 | } | 716 | } |
712 | 717 | ||
713 | init_mm.start_code = (unsigned long) &_text; | 718 | init_mm.start_code = (unsigned long) _text; |
714 | init_mm.end_code = (unsigned long) &_etext; | 719 | init_mm.end_code = (unsigned long) _etext; |
715 | init_mm.end_data = (unsigned long) &_edata; | 720 | init_mm.end_data = (unsigned long) _edata; |
716 | init_mm.brk = (unsigned long) &_end; | 721 | init_mm.brk = (unsigned long) _end; |
717 | 722 | ||
718 | memcpy(boot_command_line, from, COMMAND_LINE_SIZE); | 723 | memcpy(boot_command_line, from, COMMAND_LINE_SIZE); |
719 | boot_command_line[COMMAND_LINE_SIZE-1] = '\0'; | 724 | boot_command_line[COMMAND_LINE_SIZE-1] = '\0'; |
720 | parse_cmdline(cmdline_p, from); | 725 | parse_cmdline(cmdline_p, from); |
721 | paging_init(&meminfo, mdesc); | 726 | paging_init(mdesc); |
722 | request_standard_resources(&meminfo, mdesc); | 727 | request_standard_resources(&meminfo, mdesc); |
723 | 728 | ||
724 | #ifdef CONFIG_SMP | 729 | #ifdef CONFIG_SMP |
@@ -772,6 +777,8 @@ static const char *hwcap_str[] = { | |||
772 | "java", | 777 | "java", |
773 | "iwmmxt", | 778 | "iwmmxt", |
774 | "crunch", | 779 | "crunch", |
780 | "thumbee", | ||
781 | "neon", | ||
775 | NULL | 782 | NULL |
776 | }; | 783 | }; |
777 | 784 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index bd905c0a7365..55fa7ff96a3e 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -171,7 +171,7 @@ int __cpuexit __cpu_disable(void) | |||
171 | /* | 171 | /* |
172 | * Stop the local timer for this CPU. | 172 | * Stop the local timer for this CPU. |
173 | */ | 173 | */ |
174 | local_timer_stop(cpu); | 174 | local_timer_stop(); |
175 | 175 | ||
176 | /* | 176 | /* |
177 | * Flush user cache and TLB mappings, and then remove this CPU | 177 | * Flush user cache and TLB mappings, and then remove this CPU |
@@ -274,7 +274,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
274 | /* | 274 | /* |
275 | * Setup local timer for this CPU. | 275 | * Setup local timer for this CPU. |
276 | */ | 276 | */ |
277 | local_timer_setup(cpu); | 277 | local_timer_setup(); |
278 | 278 | ||
279 | calibrate_delay(); | 279 | calibrate_delay(); |
280 | 280 | ||
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index df3f6b7ebcea..9cb7aaca159f 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* | 25 | /* |
26 | * Access to the ThumbEE Handler Base register | 26 | * Access to the ThumbEE Handler Base register |
27 | */ | 27 | */ |
28 | static inline unsigned long teehbr_read() | 28 | static inline unsigned long teehbr_read(void) |
29 | { | 29 | { |
30 | unsigned long v; | 30 | unsigned long v; |
31 | asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v)); | 31 | asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v)); |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 4898bdcfe7dd..00216071eaf7 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -119,7 +119,7 @@ SECTIONS | |||
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | .data : AT(__data_loc) { | 121 | .data : AT(__data_loc) { |
122 | __data_start = .; /* address in memory */ | 122 | _data = .; /* address in memory */ |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * first, the init task union, aligned | 125 | * first, the init task union, aligned |