@@ -40,6 +40,7 @@
#include <asm/dma.h>
#include <asm/starfire.h>
#include <asm/tlb.h>
+#include <asm/pgtable_64.h>
#include <asm/spitfire.h>
#include <asm/sections.h>
#include <asm/tsb.h>
@@ -272,6 +273,13 @@ static inline void tsb_insert(struct tsb
if (tlb_type == cheetah_plus || tlb_type == hypervisor)
tsb_addr = __pa(tsb_addr);
+ /* If pte is not valid, also invalidate tag to prevent invalid ptes to
+ * be loaded by the TLB miss handler (causing lockup)...
+ */
+ if(!(pte & _PAGE_VALID)) {
+ tag |= (1UL << TSB_TAG_INVALID_BIT);
+ }
+
__tsb_insert(tsb_addr, tag, pte);
}
PATCH 2 - KERNEL VERSION 3.16 #####################################################
@@ -40,6 +40,7 @@
#include <asm/dma.h>
#include <asm/starfire.h>
#include <asm/tlb.h>
+#include <asm/pgtable_64.h>
#include <asm/spitfire.h>
#include <asm/sections.h>
#include <asm/tsb.h>
@@ -273,6 +274,13 @@ static inline void tsb_insert(struct tsb
if (tlb_type == cheetah_plus || tlb_type == hypervisor)
tsb_addr = __pa(tsb_addr);
+ /* If pte is not valid, also invalidate tag to prevent invalid ptes to
+ * be loaded by the TLB miss handler (causing lockup)...
+ */
+ if(!(pte & _PAGE_VALID)) {
+ tag |= (1UL << TSB_TAG_INVALID_BIT);
+ }
+
__tsb_insert(tsb_addr, tag, pte);
}