]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
SPARC32 require access to the start address. Add a new helper
authorSam Ravnborg <sam@ravnborg.org>
Wed, 24 Aug 2011 23:47:13 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Sep 2011 07:02:23 +0000 (17:02 +1000)
memblock_start_of_DRAM() to give access to the address of the first
memblock - which contains the lowest address.

The awkward name was chosen to match the already present
memblock_end_of_DRAM().

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Yinghai Lu <yinghai@kernel.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memblock.h
mm/memblock.c

index 7525e38c434d64fa690c454922d99df75d75c983..e6b843e16e81d592131e74a47974182cadb301d9 100644 (file)
@@ -80,6 +80,7 @@ extern phys_addr_t __memblock_alloc_base(phys_addr_t size,
                                           phys_addr_t align,
                                           phys_addr_t max_addr);
 extern phys_addr_t memblock_phys_mem_size(void);
+extern phys_addr_t memblock_start_of_DRAM(void);
 extern phys_addr_t memblock_end_of_DRAM(void);
 extern void memblock_enforce_memory_limit(phys_addr_t memory_limit);
 extern int memblock_is_memory(phys_addr_t addr);
index ccbf97339592fe2335dfe6994fed8112f3ecdfc5..b7ed63633581ab58ba3ceff10ac72a2a897ef6e2 100644 (file)
@@ -626,6 +626,12 @@ phys_addr_t __init memblock_phys_mem_size(void)
        return memblock.memory_size;
 }
 
+/* lowest address */
+phys_addr_t __init_memblock memblock_start_of_DRAM(void)
+{
+       return memblock.memory.regions[0].base;
+}
+
 phys_addr_t __init_memblock memblock_end_of_DRAM(void)
 {
        int idx = memblock.memory.cnt - 1;