Index: arch/ppc32/src/mm/page.c
===================================================================
--- arch/ppc32/src/mm/page.c	(revision dadb68ea1499f9a46e2d8e787b58c21a0e51bb4b)
+++ arch/ppc32/src/mm/page.c	(revision cf464d1cc863822647b909d4187cbb00a7e71d45)
@@ -155,5 +155,5 @@
 		   PTE in PTEG */
 		for (i = 0; i < 8; i++) {
-			if (!phte[base2 + i].v) {
+			if ((!phte[base2 + i].v) || ((phte[base2 + i].vsid == vsid) && (phte[base2 + i].api == api))) {
 				found = true;
 				base = base2;
@@ -256,5 +256,5 @@
 		int flags;
 		
-		/* Pages below 128 MB are mapped using BAT,
+		/* Frames below 128 MB are mapped using BAT,
 		   map rest of the physical memory */
 		for (cur = 128 << 20; cur < last_frame; cur += FRAME_SIZE) {
