diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 19:14:49 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 19:14:49 -0400 |
| commit | 5a7d8a28080caed7fd4cb1b81d092adac4445e8e (patch) | |
| tree | 7d410cdd62dfebb24c22ccb8895efd9acf74ddb9 /arch/mips/kernel/setup.c | |
| parent | e0ea4045bce3cee84e35746fb98946ca36781248 (diff) | |
| parent | eb37e6ddf75a3d4c59e38193a7c8d409f5bd7d57 (diff) | |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"This has been sitting in -next for a while with no objections and all
MIPS defconfigs except one are building fine; that one platform got
broken by another patch in your tree and I'm going to submit a patch
separately.
- a handful of fixes that didn't make 3.11
- a few bits of Octeon 3 support with more to come for a later
release
- platform enhancements for Octeon, ath79, Lantiq, Netlogic and
Ralink SOCs
- a GPIO driver for the Octeon
- some dusting off of the DECstation code
- the usual dose of cleanups"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
MIPS: kexec: Fix random crashes while loading crashkernel
MIPS: kdump: Skip walking indirection page for crashkernels
MIPS: DECstation HRT calibration bug fixes
MIPS: Export copy_from_user_page() (needed by lustre)
MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
MIPS: ralink: Add support for reset-controller API
MIPS: ralink: mt7620: Add cpu-feature-override header
MIPS: ralink: mt7620: Add spi clock definition
MIPS: ralink: mt7620: Add wdt clock definition
MIPS: ralink: mt7620: Improve clock frequency detection
MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
MIPS: ralink: mt7620: Add verbose ram info
MIPS: ralink: Probe clocksources from OF
MIPS: ralink: Add support for systick timer found on newer ralink SoC
MIPS: ralink: Add support for periodic timer irq
MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
MIPS: Netlogic: Add support for USB on XLP2xx
MIPS: Netlogic: XLP2xx update for I2C controller
...
Diffstat (limited to 'arch/mips/kernel/setup.c')
| -rw-r--r-- | arch/mips/kernel/setup.c | 99 |
1 files changed, 48 insertions, 51 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index c7f90519e58c..c538d6e01b7b 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
| @@ -552,6 +552,52 @@ static void __init arch_mem_addpart(phys_t mem, phys_t end, int type) | |||
| 552 | add_memory_region(mem, size, type); | 552 | add_memory_region(mem, size, type); |
| 553 | } | 553 | } |
| 554 | 554 | ||
| 555 | #ifdef CONFIG_KEXEC | ||
| 556 | static inline unsigned long long get_total_mem(void) | ||
| 557 | { | ||
| 558 | unsigned long long total; | ||
| 559 | |||
| 560 | total = max_pfn - min_low_pfn; | ||
| 561 | return total << PAGE_SHIFT; | ||
| 562 | } | ||
| 563 | |||
| 564 | static void __init mips_parse_crashkernel(void) | ||
| 565 | { | ||
| 566 | unsigned long long total_mem; | ||
| 567 | unsigned long long crash_size, crash_base; | ||
| 568 | int ret; | ||
| 569 | |||
| 570 | total_mem = get_total_mem(); | ||
| 571 | ret = parse_crashkernel(boot_command_line, total_mem, | ||
| 572 | &crash_size, &crash_base); | ||
| 573 | if (ret != 0 || crash_size <= 0) | ||
| 574 | return; | ||
| 575 | |||
| 576 | crashk_res.start = crash_base; | ||
| 577 | crashk_res.end = crash_base + crash_size - 1; | ||
| 578 | } | ||
| 579 | |||
| 580 | static void __init request_crashkernel(struct resource *res) | ||
| 581 | { | ||
| 582 | int ret; | ||
| 583 | |||
| 584 | ret = request_resource(res, &crashk_res); | ||
| 585 | if (!ret) | ||
| 586 | pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n", | ||
| 587 | (unsigned long)((crashk_res.end - | ||
| 588 | crashk_res.start + 1) >> 20), | ||
| 589 | (unsigned long)(crashk_res.start >> 20)); | ||
| 590 | } | ||
| 591 | #else /* !defined(CONFIG_KEXEC) */ | ||
| 592 | static void __init mips_parse_crashkernel(void) | ||
| 593 | { | ||
| 594 | } | ||
| 595 | |||
| 596 | static void __init request_crashkernel(struct resource *res) | ||
| 597 | { | ||
| 598 | } | ||
| 599 | #endif /* !defined(CONFIG_KEXEC) */ | ||
| 600 | |||
| 555 | static void __init arch_mem_init(char **cmdline_p) | 601 | static void __init arch_mem_init(char **cmdline_p) |
| 556 | { | 602 | { |
| 557 | extern void plat_mem_setup(void); | 603 | extern void plat_mem_setup(void); |
| @@ -608,6 +654,8 @@ static void __init arch_mem_init(char **cmdline_p) | |||
| 608 | BOOTMEM_DEFAULT); | 654 | BOOTMEM_DEFAULT); |
| 609 | } | 655 | } |
| 610 | #endif | 656 | #endif |
| 657 | |||
| 658 | mips_parse_crashkernel(); | ||
| 611 | #ifdef CONFIG_KEXEC | 659 | #ifdef CONFIG_KEXEC |
| 612 | if (crashk_res.start != crashk_res.end) | 660 | if (crashk_res.start != crashk_res.end) |
| 613 | reserve_bootmem(crashk_res.start, | 661 | reserve_bootmem(crashk_res.start, |
| @@ -620,52 +668,6 @@ static void __init arch_mem_init(char **cmdline_p) | |||
| 620 | paging_init(); | 668 | paging_init(); |
| 621 | } | 669 | } |
| 622 | 670 | ||
| 623 | #ifdef CONFIG_KEXEC | ||
| 624 | static inline unsigned long long get_total_mem(void) | ||
| 625 | { | ||
| 626 | unsigned long long total; | ||
| 627 | |||
| 628 | total = max_pfn - min_low_pfn; | ||
| 629 | return total << PAGE_SHIFT; | ||
| 630 | } | ||
| 631 | |||
| 632 | static void __init mips_parse_crashkernel(void) | ||
| 633 | { | ||
| 634 | unsigned long long total_mem; | ||
| 635 | unsigned long long crash_size, crash_base; | ||
| 636 | int ret; | ||
| 637 | |||
| 638 | total_mem = get_total_mem(); | ||
| 639 | ret = parse_crashkernel(boot_command_line, total_mem, | ||
| 640 | &crash_size, &crash_base); | ||
| 641 | if (ret != 0 || crash_size <= 0) | ||
| 642 | return; | ||
| 643 | |||
| 644 | crashk_res.start = crash_base; | ||
| 645 | crashk_res.end = crash_base + crash_size - 1; | ||
| 646 | } | ||
| 647 | |||
| 648 | static void __init request_crashkernel(struct resource *res) | ||
| 649 | { | ||
| 650 | int ret; | ||
| 651 | |||
| 652 | ret = request_resource(res, &crashk_res); | ||
| 653 | if (!ret) | ||
| 654 | pr_info("Reserving %ldMB of memory at %ldMB for crashkernel\n", | ||
| 655 | (unsigned long)((crashk_res.end - | ||
| 656 | crashk_res.start + 1) >> 20), | ||
| 657 | (unsigned long)(crashk_res.start >> 20)); | ||
| 658 | } | ||
| 659 | #else /* !defined(CONFIG_KEXEC) */ | ||
| 660 | static void __init mips_parse_crashkernel(void) | ||
| 661 | { | ||
| 662 | } | ||
| 663 | |||
| 664 | static void __init request_crashkernel(struct resource *res) | ||
| 665 | { | ||
| 666 | } | ||
| 667 | #endif /* !defined(CONFIG_KEXEC) */ | ||
| 668 | |||
| 669 | static void __init resource_init(void) | 671 | static void __init resource_init(void) |
| 670 | { | 672 | { |
| 671 | int i; | 673 | int i; |
| @@ -678,11 +680,6 @@ static void __init resource_init(void) | |||
| 678 | data_resource.start = __pa_symbol(&_etext); | 680 | data_resource.start = __pa_symbol(&_etext); |
| 679 | data_resource.end = __pa_symbol(&_edata) - 1; | 681 | data_resource.end = __pa_symbol(&_edata) - 1; |
| 680 | 682 | ||
| 681 | /* | ||
| 682 | * Request address space for all standard RAM. | ||
| 683 | */ | ||
| 684 | mips_parse_crashkernel(); | ||
| 685 | |||
| 686 | for (i = 0; i < boot_mem_map.nr_map; i++) { | 683 | for (i = 0; i < boot_mem_map.nr_map; i++) { |
| 687 | struct resource *res; | 684 | struct resource *res; |
| 688 | unsigned long start, end; | 685 | unsigned long start, end; |
