diff options
author | Paul Mackerras <paulus@samba.org> | 2008-12-15 22:38:58 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-15 22:38:58 -0500 |
commit | 1e1c568d6c66d1e2e345fd15e2a1ceafc5d7e33a (patch) | |
tree | 0cf88547108a750d6eb910564ef5bf0ffb5ceef3 /arch/powerpc/mm | |
parent | 91cac623262c1c0cd298c5c648a8bd2b647c264d (diff) | |
parent | 23e0e8afafd9ac065d81506524adf3339584044b (diff) |
Merge branch 'merge' into next
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hugetlbpage.c | 3 | ||||
-rw-r--r-- | arch/powerpc/mm/numa.c | 16 |
2 files changed, 14 insertions, 5 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index deb494687a65..201c7a5486cb 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -506,6 +506,9 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, | |||
506 | { | 506 | { |
507 | struct hstate *hstate = hstate_file(file); | 507 | struct hstate *hstate = hstate_file(file); |
508 | int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate)); | 508 | int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate)); |
509 | |||
510 | if (!mmu_huge_psizes[mmu_psize]) | ||
511 | return -EINVAL; | ||
509 | return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0); | 512 | return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0); |
510 | } | 513 | } |
511 | 514 | ||
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index a8397bbad3d4..cf81049e1e51 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -901,10 +901,17 @@ static void mark_reserved_regions_for_nid(int nid) | |||
901 | if (end_pfn > node_ar.end_pfn) | 901 | if (end_pfn > node_ar.end_pfn) |
902 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) | 902 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) |
903 | - (start_pfn << PAGE_SHIFT); | 903 | - (start_pfn << PAGE_SHIFT); |
904 | dbg("reserve_bootmem %lx %lx nid=%d\n", physbase, | 904 | /* |
905 | reserve_size, node_ar.nid); | 905 | * Only worry about *this* node, others may not |
906 | reserve_bootmem_node(NODE_DATA(node_ar.nid), physbase, | 906 | * yet have valid NODE_DATA(). |
907 | reserve_size, BOOTMEM_DEFAULT); | 907 | */ |
908 | if (node_ar.nid == nid) { | ||
909 | dbg("reserve_bootmem %lx %lx nid=%d\n", | ||
910 | physbase, reserve_size, node_ar.nid); | ||
911 | reserve_bootmem_node(NODE_DATA(node_ar.nid), | ||
912 | physbase, reserve_size, | ||
913 | BOOTMEM_DEFAULT); | ||
914 | } | ||
908 | /* | 915 | /* |
909 | * if reserved region is contained in the active region | 916 | * if reserved region is contained in the active region |
910 | * then done. | 917 | * then done. |
@@ -929,7 +936,6 @@ static void mark_reserved_regions_for_nid(int nid) | |||
929 | void __init do_init_bootmem(void) | 936 | void __init do_init_bootmem(void) |
930 | { | 937 | { |
931 | int nid; | 938 | int nid; |
932 | unsigned int i; | ||
933 | 939 | ||
934 | min_low_pfn = 0; | 940 | min_low_pfn = 0; |
935 | max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; | 941 | max_low_pfn = lmb_end_of_DRAM() >> PAGE_SHIFT; |