diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-17 21:19:25 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-17 21:19:25 -0500 |
commit | 82a0a1cc8f94bc59e5919715bc03fc8353fa770d (patch) | |
tree | c25f19a0ae1f7cb75319b585c1d473cfed463f22 /arch/powerpc/mm | |
parent | 8d30c14cab30d405a05f2aaceda1e9ad57800f36 (diff) | |
parent | 5955c7a2cfb6a35429adea5dc480002b15ca8cfc (diff) |
Merge commit 'origin/master' into next
Manual merge of:
arch/powerpc/include/asm/pgtable-ppc32.h
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r-- | arch/powerpc/mm/hash_low_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/mm/numa.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 67850ec9feb3..14af8cedab70 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -320,7 +320,7 @@ _GLOBAL(create_hpte) | |||
320 | and r8,r8,r0 /* writable if _RW & _DIRTY */ | 320 | and r8,r8,r0 /* writable if _RW & _DIRTY */ |
321 | rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ | 321 | rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ |
322 | rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ | 322 | rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ |
323 | ori r8,r8,0xe14 /* clear out reserved bits and M */ | 323 | ori r8,r8,0xe04 /* clear out reserved bits */ |
324 | andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ | 324 | andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ |
325 | BEGIN_FTR_SECTION | 325 | BEGIN_FTR_SECTION |
326 | rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ | 326 | rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index c81e74790a8c..0507faa65478 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/lmb.h> | 20 | #include <linux/lmb.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/pfn.h> | ||
22 | #include <asm/sparsemem.h> | 23 | #include <asm/sparsemem.h> |
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
@@ -853,7 +854,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
853 | unsigned long physbase = lmb.reserved.region[i].base; | 854 | unsigned long physbase = lmb.reserved.region[i].base; |
854 | unsigned long size = lmb.reserved.region[i].size; | 855 | unsigned long size = lmb.reserved.region[i].size; |
855 | unsigned long start_pfn = physbase >> PAGE_SHIFT; | 856 | unsigned long start_pfn = physbase >> PAGE_SHIFT; |
856 | unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT); | 857 | unsigned long end_pfn = PFN_UP(physbase + size); |
857 | struct node_active_region node_ar; | 858 | struct node_active_region node_ar; |
858 | unsigned long node_end_pfn = node->node_start_pfn + | 859 | unsigned long node_end_pfn = node->node_start_pfn + |
859 | node->node_spanned_pages; | 860 | node->node_spanned_pages; |
@@ -879,7 +880,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
879 | */ | 880 | */ |
880 | if (end_pfn > node_ar.end_pfn) | 881 | if (end_pfn > node_ar.end_pfn) |
881 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) | 882 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) |
882 | - (start_pfn << PAGE_SHIFT); | 883 | - physbase; |
883 | /* | 884 | /* |
884 | * Only worry about *this* node, others may not | 885 | * Only worry about *this* node, others may not |
885 | * yet have valid NODE_DATA(). | 886 | * yet have valid NODE_DATA(). |