diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-15 15:29:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-15 15:29:50 -0500 |
commit | 65e5d002b5ad220db2bf9557f53de5a98f7dab86 (patch) | |
tree | 93d36afd4b82a24e5b553766a574a6632fca3aff /arch/arm/kernel/setup.c | |
parent | 38567333a6dabd0f2b4150e9fb6dd8e3ba2985e5 (diff) | |
parent | cb4d3eaebb96616085f5a46a7d7e004ddd955b09 (diff) |
Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
ARM: fix missing branch in __error_a
ARM: fix /proc/$PID/stack on SMP
ARM: Fix build regression on SA11x0, PXA, and H720x targets
ARM: 6625/1: use memblock memory regions for "System RAM" I/O resources
ARM: fix wrongly patched constants
ARM: 6624/1: fix dependency for CONFIG_SMP_ON_UP
ARM: 6623/1: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S
ARM: 6622/1: fix dma_unmap_sg() documentation
ARM: 6621/1: bitops: remove condition code clobber for CLZ
ARM: 6620/1: Change misleading warning when CONFIG_CMDLINE_FORCE is used
ARM: 6619/1: nommu: avoid mapping vectors page when !CONFIG_MMU
ARM: sched_clock: make minsec argument to clocks_calc_mult_shift() zero
ARM: sched_clock: allow init_sched_clock() to be called early
ARM: integrator: fix compile warning in cpu.c
ARM: 6616/1: Fix ep93xx-fb init/exit annotations
ARM: twd: fix display of twd frequency
ARM: udelay: prevent math rounding resulting in short udelays
Diffstat (limited to 'arch/arm/kernel/setup.c')
-rw-r--r-- | arch/arm/kernel/setup.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 3455ad33de4c..420b8d6485d6 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -518,25 +518,21 @@ setup_ramdisk(int doload, int prompt, int image_start, unsigned int rd_sz) | |||
518 | #endif | 518 | #endif |
519 | } | 519 | } |
520 | 520 | ||
521 | static void __init | 521 | static void __init request_standard_resources(struct machine_desc *mdesc) |
522 | request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) | ||
523 | { | 522 | { |
523 | struct memblock_region *region; | ||
524 | struct resource *res; | 524 | struct resource *res; |
525 | int i; | ||
526 | 525 | ||
527 | kernel_code.start = virt_to_phys(_text); | 526 | kernel_code.start = virt_to_phys(_text); |
528 | kernel_code.end = virt_to_phys(_etext - 1); | 527 | kernel_code.end = virt_to_phys(_etext - 1); |
529 | kernel_data.start = virt_to_phys(_sdata); | 528 | kernel_data.start = virt_to_phys(_sdata); |
530 | kernel_data.end = virt_to_phys(_end - 1); | 529 | kernel_data.end = virt_to_phys(_end - 1); |
531 | 530 | ||
532 | for (i = 0; i < mi->nr_banks; i++) { | 531 | for_each_memblock(memory, region) { |
533 | if (mi->bank[i].size == 0) | ||
534 | continue; | ||
535 | |||
536 | res = alloc_bootmem_low(sizeof(*res)); | 532 | res = alloc_bootmem_low(sizeof(*res)); |
537 | res->name = "System RAM"; | 533 | res->name = "System RAM"; |
538 | res->start = mi->bank[i].start; | 534 | res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region)); |
539 | res->end = mi->bank[i].start + mi->bank[i].size - 1; | 535 | res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1; |
540 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 536 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
541 | 537 | ||
542 | request_resource(&iomem_resource, res); | 538 | request_resource(&iomem_resource, res); |
@@ -650,15 +646,17 @@ static int __init parse_tag_revision(const struct tag *tag) | |||
650 | 646 | ||
651 | __tagtable(ATAG_REVISION, parse_tag_revision); | 647 | __tagtable(ATAG_REVISION, parse_tag_revision); |
652 | 648 | ||
653 | #ifndef CONFIG_CMDLINE_FORCE | ||
654 | static int __init parse_tag_cmdline(const struct tag *tag) | 649 | static int __init parse_tag_cmdline(const struct tag *tag) |
655 | { | 650 | { |
651 | #ifndef CONFIG_CMDLINE_FORCE | ||
656 | strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); | 652 | strlcpy(default_command_line, tag->u.cmdline.cmdline, COMMAND_LINE_SIZE); |
653 | #else | ||
654 | pr_warning("Ignoring tag cmdline (using the default kernel command line)\n"); | ||
655 | #endif /* CONFIG_CMDLINE_FORCE */ | ||
657 | return 0; | 656 | return 0; |
658 | } | 657 | } |
659 | 658 | ||
660 | __tagtable(ATAG_CMDLINE, parse_tag_cmdline); | 659 | __tagtable(ATAG_CMDLINE, parse_tag_cmdline); |
661 | #endif /* CONFIG_CMDLINE_FORCE */ | ||
662 | 660 | ||
663 | /* | 661 | /* |
664 | * Scan the tag table for this tag, and call its parse function. | 662 | * Scan the tag table for this tag, and call its parse function. |
@@ -857,7 +855,7 @@ void __init setup_arch(char **cmdline_p) | |||
857 | arm_memblock_init(&meminfo, mdesc); | 855 | arm_memblock_init(&meminfo, mdesc); |
858 | 856 | ||
859 | paging_init(mdesc); | 857 | paging_init(mdesc); |
860 | request_standard_resources(&meminfo, mdesc); | 858 | request_standard_resources(mdesc); |
861 | 859 | ||
862 | #ifdef CONFIG_SMP | 860 | #ifdef CONFIG_SMP |
863 | if (is_smp()) | 861 | if (is_smp()) |