diff options
author | Nicolas Pitre <nico@cam.org> | 2008-10-01 22:29:22 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-02 17:46:21 -0400 |
commit | 3319f5e51a20f3e3c59ed7dac9fc2d5c89aa2d9f (patch) | |
tree | 36669425f9ef0ac52fb40859381f8fc3a84f3340 /arch/arm/kernel | |
parent | 4ba3f7c55938d7e51e23c1feedd035dd46716ae7 (diff) |
[ARM] 5274/1: simplify request_standard_resources()
There is no point converting memory bank addresses from physical to
virtual just to convert them back to physical addresses. Furthermore
this isn't "right" for highmem even if in this case the end result is
the correct one.
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/setup.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index e4a975fa2d7e..1f1eecca7f55 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -478,18 +478,13 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) | |||
478 | kernel_data.end = virt_to_phys(&_end - 1); | 478 | kernel_data.end = virt_to_phys(&_end - 1); |
479 | 479 | ||
480 | for (i = 0; i < mi->nr_banks; i++) { | 480 | for (i = 0; i < mi->nr_banks; i++) { |
481 | unsigned long virt_start, virt_end; | ||
482 | |||
483 | if (mi->bank[i].size == 0) | 481 | if (mi->bank[i].size == 0) |
484 | continue; | 482 | continue; |
485 | 483 | ||
486 | virt_start = __phys_to_virt(mi->bank[i].start); | ||
487 | virt_end = virt_start + mi->bank[i].size - 1; | ||
488 | |||
489 | res = alloc_bootmem_low(sizeof(*res)); | 484 | res = alloc_bootmem_low(sizeof(*res)); |
490 | res->name = "System RAM"; | 485 | res->name = "System RAM"; |
491 | res->start = __virt_to_phys(virt_start); | 486 | res->start = mi->bank[i].start; |
492 | res->end = __virt_to_phys(virt_end); | 487 | res->end = mi->bank[i].start + mi->bank[i].size - 1; |
493 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; | 488 | res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; |
494 | 489 | ||
495 | request_resource(&iomem_resource, res); | 490 | request_resource(&iomem_resource, res); |