diff options
| author | Rob Herring <robh@kernel.org> | 2014-05-13 19:34:35 -0400 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2014-05-13 19:34:35 -0400 |
| commit | eafd370dfe487facfdef499057f4eac9aa0b4bf5 (patch) | |
| tree | 0925a67cd658cdf4811f49b4cd2073f663166bd0 /arch/xtensa/kernel | |
| parent | c3fc952d2fbe3ec78defd70cf73d5d76d27092ec (diff) | |
| parent | fb2caa50fbacd21719a90dd66b617ce3cb4fd6d7 (diff) | |
Merge branch 'dt-bus-name' into for-next
Diffstat (limited to 'arch/xtensa/kernel')
| -rw-r--r-- | arch/xtensa/kernel/setup.c | 46 | ||||
| -rw-r--r-- | arch/xtensa/kernel/smp.c | 15 | ||||
| -rw-r--r-- | arch/xtensa/kernel/xtensa_ksyms.c | 7 |
3 files changed, 33 insertions, 35 deletions
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 1991a3d0b2f8..06370ccea9e9 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | #include <asm/param.h> | 50 | #include <asm/param.h> |
| 51 | #include <asm/traps.h> | 51 | #include <asm/traps.h> |
| 52 | #include <asm/smp.h> | 52 | #include <asm/smp.h> |
| 53 | #include <asm/sysmem.h> | ||
| 53 | 54 | ||
| 54 | #include <platform/hardware.h> | 55 | #include <platform/hardware.h> |
| 55 | 56 | ||
| @@ -87,12 +88,6 @@ static char __initdata command_line[COMMAND_LINE_SIZE]; | |||
| 87 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | 88 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; |
| 88 | #endif | 89 | #endif |
| 89 | 90 | ||
| 90 | sysmem_info_t __initdata sysmem; | ||
| 91 | |||
| 92 | extern int mem_reserve(unsigned long, unsigned long, int); | ||
| 93 | extern void bootmem_init(void); | ||
| 94 | extern void zones_init(void); | ||
| 95 | |||
| 96 | /* | 91 | /* |
| 97 | * Boot parameter parsing. | 92 | * Boot parameter parsing. |
| 98 | * | 93 | * |
| @@ -112,31 +107,14 @@ typedef struct tagtable { | |||
| 112 | 107 | ||
| 113 | /* parse current tag */ | 108 | /* parse current tag */ |
| 114 | 109 | ||
| 115 | static int __init add_sysmem_bank(unsigned long type, unsigned long start, | ||
| 116 | unsigned long end) | ||
| 117 | { | ||
| 118 | if (sysmem.nr_banks >= SYSMEM_BANKS_MAX) { | ||
| 119 | printk(KERN_WARNING | ||
| 120 | "Ignoring memory bank 0x%08lx size %ldKB\n", | ||
| 121 | start, end - start); | ||
| 122 | return -EINVAL; | ||
| 123 | } | ||
| 124 | sysmem.bank[sysmem.nr_banks].type = type; | ||
| 125 | sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(start); | ||
| 126 | sysmem.bank[sysmem.nr_banks].end = end & PAGE_MASK; | ||
| 127 | sysmem.nr_banks++; | ||
| 128 | |||
| 129 | return 0; | ||
| 130 | } | ||
| 131 | |||
| 132 | static int __init parse_tag_mem(const bp_tag_t *tag) | 110 | static int __init parse_tag_mem(const bp_tag_t *tag) |
| 133 | { | 111 | { |
| 134 | meminfo_t *mi = (meminfo_t *)(tag->data); | 112 | struct bp_meminfo *mi = (struct bp_meminfo *)(tag->data); |
| 135 | 113 | ||
| 136 | if (mi->type != MEMORY_TYPE_CONVENTIONAL) | 114 | if (mi->type != MEMORY_TYPE_CONVENTIONAL) |
| 137 | return -1; | 115 | return -1; |
| 138 | 116 | ||
| 139 | return add_sysmem_bank(mi->type, mi->start, mi->end); | 117 | return add_sysmem_bank(mi->start, mi->end); |
| 140 | } | 118 | } |
| 141 | 119 | ||
| 142 | __tagtable(BP_TAG_MEMORY, parse_tag_mem); | 120 | __tagtable(BP_TAG_MEMORY, parse_tag_mem); |
| @@ -145,8 +123,8 @@ __tagtable(BP_TAG_MEMORY, parse_tag_mem); | |||
| 145 | 123 | ||
| 146 | static int __init parse_tag_initrd(const bp_tag_t* tag) | 124 | static int __init parse_tag_initrd(const bp_tag_t* tag) |
| 147 | { | 125 | { |
| 148 | meminfo_t* mi; | 126 | struct bp_meminfo *mi = (struct bp_meminfo *)(tag->data); |
| 149 | mi = (meminfo_t*)(tag->data); | 127 | |
| 150 | initrd_start = (unsigned long)__va(mi->start); | 128 | initrd_start = (unsigned long)__va(mi->start); |
| 151 | initrd_end = (unsigned long)__va(mi->end); | 129 | initrd_end = (unsigned long)__va(mi->end); |
| 152 | 130 | ||
| @@ -254,7 +232,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) | |||
| 254 | return; | 232 | return; |
| 255 | 233 | ||
| 256 | size &= PAGE_MASK; | 234 | size &= PAGE_MASK; |
| 257 | add_sysmem_bank(MEMORY_TYPE_CONVENTIONAL, base, base + size); | 235 | add_sysmem_bank(base, base + size); |
| 258 | } | 236 | } |
| 259 | 237 | ||
| 260 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) | 238 | void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align) |
| @@ -291,8 +269,6 @@ device_initcall(xtensa_device_probe); | |||
| 291 | 269 | ||
| 292 | void __init init_arch(bp_tag_t *bp_start) | 270 | void __init init_arch(bp_tag_t *bp_start) |
| 293 | { | 271 | { |
| 294 | sysmem.nr_banks = 0; | ||
| 295 | |||
| 296 | /* Parse boot parameters */ | 272 | /* Parse boot parameters */ |
| 297 | 273 | ||
| 298 | if (bp_start) | 274 | if (bp_start) |
| @@ -303,10 +279,9 @@ void __init init_arch(bp_tag_t *bp_start) | |||
| 303 | #endif | 279 | #endif |
| 304 | 280 | ||
| 305 | if (sysmem.nr_banks == 0) { | 281 | if (sysmem.nr_banks == 0) { |
| 306 | sysmem.nr_banks = 1; | 282 | add_sysmem_bank(PLATFORM_DEFAULT_MEM_START, |
| 307 | sysmem.bank[0].start = PLATFORM_DEFAULT_MEM_START; | 283 | PLATFORM_DEFAULT_MEM_START + |
| 308 | sysmem.bank[0].end = PLATFORM_DEFAULT_MEM_START | 284 | PLATFORM_DEFAULT_MEM_SIZE); |
| 309 | + PLATFORM_DEFAULT_MEM_SIZE; | ||
| 310 | } | 285 | } |
| 311 | 286 | ||
| 312 | #ifdef CONFIG_CMDLINE_BOOL | 287 | #ifdef CONFIG_CMDLINE_BOOL |
| @@ -486,7 +461,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 486 | #ifdef CONFIG_BLK_DEV_INITRD | 461 | #ifdef CONFIG_BLK_DEV_INITRD |
| 487 | if (initrd_start < initrd_end) { | 462 | if (initrd_start < initrd_end) { |
| 488 | initrd_is_mapped = mem_reserve(__pa(initrd_start), | 463 | initrd_is_mapped = mem_reserve(__pa(initrd_start), |
| 489 | __pa(initrd_end), 0); | 464 | __pa(initrd_end), 0) == 0; |
| 490 | initrd_below_start_ok = 1; | 465 | initrd_below_start_ok = 1; |
| 491 | } else { | 466 | } else { |
| 492 | initrd_start = 0; | 467 | initrd_start = 0; |
| @@ -531,6 +506,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 531 | __pa(&_Level6InterruptVector_text_end), 0); | 506 | __pa(&_Level6InterruptVector_text_end), 0); |
| 532 | #endif | 507 | #endif |
| 533 | 508 | ||
| 509 | parse_early_param(); | ||
| 534 | bootmem_init(); | 510 | bootmem_init(); |
| 535 | 511 | ||
| 536 | unflatten_and_copy_device_tree(); | 512 | unflatten_and_copy_device_tree(); |
diff --git a/arch/xtensa/kernel/smp.c b/arch/xtensa/kernel/smp.c index aa8bd8717927..40b5a3771fb0 100644 --- a/arch/xtensa/kernel/smp.c +++ b/arch/xtensa/kernel/smp.c | |||
| @@ -496,6 +496,21 @@ void flush_tlb_range(struct vm_area_struct *vma, | |||
| 496 | on_each_cpu(ipi_flush_tlb_range, &fd, 1); | 496 | on_each_cpu(ipi_flush_tlb_range, &fd, 1); |
| 497 | } | 497 | } |
| 498 | 498 | ||
| 499 | static void ipi_flush_tlb_kernel_range(void *arg) | ||
| 500 | { | ||
| 501 | struct flush_data *fd = arg; | ||
| 502 | local_flush_tlb_kernel_range(fd->addr1, fd->addr2); | ||
| 503 | } | ||
| 504 | |||
| 505 | void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ||
| 506 | { | ||
| 507 | struct flush_data fd = { | ||
| 508 | .addr1 = start, | ||
| 509 | .addr2 = end, | ||
| 510 | }; | ||
| 511 | on_each_cpu(ipi_flush_tlb_kernel_range, &fd, 1); | ||
| 512 | } | ||
| 513 | |||
| 499 | /* Cache flush functions */ | 514 | /* Cache flush functions */ |
| 500 | 515 | ||
| 501 | static void ipi_flush_cache_all(void *arg) | 516 | static void ipi_flush_cache_all(void *arg) |
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c index 80b33ed51f31..4d2872fd9bb5 100644 --- a/arch/xtensa/kernel/xtensa_ksyms.c +++ b/arch/xtensa/kernel/xtensa_ksyms.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
| 21 | 21 | ||
| 22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
| 23 | #include <asm/cacheflush.h> | ||
| 23 | #include <asm/checksum.h> | 24 | #include <asm/checksum.h> |
| 24 | #include <asm/dma.h> | 25 | #include <asm/dma.h> |
| 25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
| @@ -105,6 +106,7 @@ EXPORT_SYMBOL(csum_partial_copy_generic); | |||
| 105 | * Architecture-specific symbols | 106 | * Architecture-specific symbols |
| 106 | */ | 107 | */ |
| 107 | EXPORT_SYMBOL(__xtensa_copy_user); | 108 | EXPORT_SYMBOL(__xtensa_copy_user); |
| 109 | EXPORT_SYMBOL(__invalidate_icache_range); | ||
| 108 | 110 | ||
| 109 | /* | 111 | /* |
| 110 | * Kernel hacking ... | 112 | * Kernel hacking ... |
| @@ -127,3 +129,8 @@ EXPORT_SYMBOL(common_exception_return); | |||
| 127 | #ifdef CONFIG_FUNCTION_TRACER | 129 | #ifdef CONFIG_FUNCTION_TRACER |
| 128 | EXPORT_SYMBOL(_mcount); | 130 | EXPORT_SYMBOL(_mcount); |
| 129 | #endif | 131 | #endif |
| 132 | |||
| 133 | EXPORT_SYMBOL(__invalidate_dcache_range); | ||
| 134 | #if XCHAL_DCACHE_IS_WRITEBACK | ||
| 135 | EXPORT_SYMBOL(__flush_dcache_range); | ||
| 136 | #endif | ||
