diff options
author | Tejun Heo <tj@kernel.org> | 2011-11-28 12:46:22 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-11-28 12:46:22 -0500 |
commit | d4bbf7e7759afc172e2bfbc5c416324590049cdd (patch) | |
tree | 7eab5ee5481cd3dcf1162329fec827177640018a /mm/memblock.c | |
parent | a150439c4a97db379f0ed6faa46fbbb6e7bf3cb2 (diff) | |
parent | 401d0069cb344f401bc9d264c31db55876ff78c0 (diff) |
Merge branch 'master' into x86/memblock
Conflicts & resolutions:
* arch/x86/xen/setup.c
dc91c728fd "xen: allow extra memory to be in multiple regions"
24aa07882b "memblock, x86: Replace memblock_x86_reserve/free..."
conflicted on xen_add_extra_mem() updates. The resolution is
trivial as the latter just want to replace
memblock_x86_reserve_range() with memblock_reserve().
* drivers/pci/intel-iommu.c
166e9278a3f "x86/ia64: intel-iommu: move to drivers/iommu/"
5dfe8660a3d "bootmem: Replace work_with_active_regions() with..."
conflicted as the former moved the file under drivers/iommu/.
Resolved by applying the chnages from the latter on the moved
file.
* mm/Kconfig
6661672053a "memblock: add NO_BOOTMEM config symbol"
c378ddd53f9 "memblock, x86: Make ARCH_DISCARD_MEMBLOCK a config option"
conflicted trivially. Both added config options. Just
letting both add their own options resolves the conflict.
* mm/memblock.c
d1f0ece6cdc "mm/memblock.c: small function definition fixes"
ed7b56a799c "memblock: Remove memblock_memory_can_coalesce()"
confliected. The former updates function removed by the
latter. Resolution is trivial.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r-- | mm/memblock.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mm/memblock.c b/mm/memblock.c index a75723d62631..a57092f63a86 100644 --- a/mm/memblock.c +++ b/mm/memblock.c | |||
@@ -47,7 +47,8 @@ static unsigned long __init_memblock memblock_addrs_overlap(phys_addr_t base1, p | |||
47 | return ((base1 < (base2 + size2)) && (base2 < (base1 + size1))); | 47 | return ((base1 < (base2 + size2)) && (base2 < (base1 + size1))); |
48 | } | 48 | } |
49 | 49 | ||
50 | long __init_memblock memblock_overlaps_region(struct memblock_type *type, phys_addr_t base, phys_addr_t size) | 50 | static long __init_memblock memblock_overlaps_region(struct memblock_type *type, |
51 | phys_addr_t base, phys_addr_t size) | ||
51 | { | 52 | { |
52 | unsigned long i; | 53 | unsigned long i; |
53 | 54 | ||
@@ -773,6 +774,12 @@ phys_addr_t __init memblock_phys_mem_size(void) | |||
773 | return memblock.memory_size; | 774 | return memblock.memory_size; |
774 | } | 775 | } |
775 | 776 | ||
777 | /* lowest address */ | ||
778 | phys_addr_t __init_memblock memblock_start_of_DRAM(void) | ||
779 | { | ||
780 | return memblock.memory.regions[0].base; | ||
781 | } | ||
782 | |||
776 | phys_addr_t __init_memblock memblock_end_of_DRAM(void) | 783 | phys_addr_t __init_memblock memblock_end_of_DRAM(void) |
777 | { | 784 | { |
778 | int idx = memblock.memory.cnt - 1; | 785 | int idx = memblock.memory.cnt - 1; |
@@ -912,9 +919,9 @@ void __init memblock_analyze(void) | |||
912 | 919 | ||
913 | /* Check marker in the unused last array entry */ | 920 | /* Check marker in the unused last array entry */ |
914 | WARN_ON(memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS].base | 921 | WARN_ON(memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS].base |
915 | != (phys_addr_t)RED_INACTIVE); | 922 | != MEMBLOCK_INACTIVE); |
916 | WARN_ON(memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS].base | 923 | WARN_ON(memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS].base |
917 | != (phys_addr_t)RED_INACTIVE); | 924 | != MEMBLOCK_INACTIVE); |
918 | 925 | ||
919 | memblock.memory_size = 0; | 926 | memblock.memory_size = 0; |
920 | 927 | ||
@@ -940,8 +947,8 @@ void __init memblock_init(void) | |||
940 | memblock.reserved.max = INIT_MEMBLOCK_REGIONS; | 947 | memblock.reserved.max = INIT_MEMBLOCK_REGIONS; |
941 | 948 | ||
942 | /* Write a marker in the unused last array entry */ | 949 | /* Write a marker in the unused last array entry */ |
943 | memblock.memory.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE; | 950 | memblock.memory.regions[INIT_MEMBLOCK_REGIONS].base = MEMBLOCK_INACTIVE; |
944 | memblock.reserved.regions[INIT_MEMBLOCK_REGIONS].base = (phys_addr_t)RED_INACTIVE; | 951 | memblock.reserved.regions[INIT_MEMBLOCK_REGIONS].base = MEMBLOCK_INACTIVE; |
945 | 952 | ||
946 | /* Create a dummy zero size MEMBLOCK which will get coalesced away later. | 953 | /* Create a dummy zero size MEMBLOCK which will get coalesced away later. |
947 | * This simplifies the memblock_add() code below... | 954 | * This simplifies the memblock_add() code below... |