Skip to contentSkip to conversation

fix MIPS PFN/page borkage

PATCH In review Dave Hansen 2 participants 2 messages Apr 3, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix MIPS PFN/page borkage

The "unify PFN_* macros" patch screwed up and somehow modified the MIPS code where it shouldn't have. This backs those changes back out.

---

 work-dave/arch/mips/mips-boards/generic/memory.c |    4 ++--
 work-dave/arch/mips/mips-boards/sim/sim_mem.c    |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
arch/mips/mips-boards/generic/memory.c renamed from arch/mips/mips-boards/generic/memory.c~unify_PFN_macros +2 -2
diff -puN arch/mips/mips-boards/generic/memory.c~unify_PFN_macros arch/mips/mips-boards/generic/memory.c
@@ -106,10 +106,10 @@ struct prom_pmemblock * __init prom_getm
 
 	mdesc[3].type = yamon_dontuse;
 	mdesc[3].base = 0x00100000;
-	mdesc[3].size = CPHYSADDR(PAGE_ALIGN(&_end)) - mdesc[3].base;
+	mdesc[3].size = CPHYSADDR(PFN_ALIGN(&_end)) - mdesc[3].base;
 
 	mdesc[4].type = yamon_free;
-	mdesc[4].base = CPHYSADDR(PAGE_ALIGN(&_end));
+	mdesc[4].base = CPHYSADDR(PFN_ALIGN(&_end));
 	mdesc[4].size = memsize - mdesc[4].base;
 
 	return &mdesc[0];
arch/mips/mips-boards/sim/sim_mem.c renamed from arch/mips/mips-boards/sim/sim_mem.c~unify_PFN_macros +2 -2
diff -puN arch/mips/mips-boards/sim/sim_mem.c~unify_PFN_macros arch/mips/mips-boards/sim/sim_mem.c
@@ -61,10 +61,10 @@ struct prom_pmemblock * __init prom_getm
 
 	mdesc[2].type = simmem_reserved;
 	mdesc[2].base = 0x00100000;
-	mdesc[2].size = CPHYSADDR(PAGE_ALIGN(&_end)) - mdesc[2].base;
+	mdesc[2].size = CPHYSADDR(PFN_ALIGN(&_end)) - mdesc[2].base;
 
 	mdesc[3].type = simmem_free;
-	mdesc[3].base = CPHYSADDR(PAGE_ALIGN(&_end));
+	mdesc[3].base = CPHYSADDR(PFN_ALIGN(&_end));
 	mdesc[3].size = memsize - mdesc[3].base;
 
 	return &mdesc[0];

_

#1 lore raw
Quoted 3 lines · Dave Hansen

The "unify PFN_* macros" patch screwed up and somehow modified the MIPS code where it shouldn't have. This backs those changes back out.

You need to include <linux/pfn.h> for this to build.

Ralf