Skip to contentSkip to conversation

[2.6] VR41xx pte fix and VR413x cpu-probe fix

PATCH New Dimitri Torfs 1 participant 1 message Dec 30, 2003 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [2.6] VR41xx pte fix and VR413x cpu-probe fix

Hi,

here are two patches related to the VR41xx series. The first patch fixes the pte calculation (pte_pfn and pfn_pte) for VR41xx. Second patch fixes the cpu detection for the VR413x cpu's (missing break).

include/asm-mips/pgtable-32.h +7 -0
@@ -131,8 +131,15 @@
 static inline void pgd_clear(pgd_t *pgdp)	{ }
 
 #define pte_page(x)		pfn_to_page(pte_pfn(x))
+
+
+#ifdef CONFIG_CPU_VR41XX
+#define pte_pfn(x)		((unsigned long)((x).pte >> (PAGE_SHIFT + 2)))
+#define pfn_pte(pfn, prot)	__pte(((pfn) << (PAGE_SHIFT + 2)) | pgprot_val(prot))
+#else
 #define pte_pfn(x)		((unsigned long)((x).pte >> PAGE_SHIFT))
 #define pfn_pte(pfn, prot)	__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
+#endif
 
 #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
 
arch/mips/kernel/cpu-probe.c +1 -0
@@ -228,6 +228,7 @@
 				c->cputype = CPU_VR4131;
 			else
 				c->cputype = CPU_VR4133;
+			break;
 		default:
 			printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
 				c->cputype = CPU_VR41XX;

Dimitri

Signature · 4 lines
Dimitri Torfs             |  NSCE 
[email protected] |  Sint Stevens Woluwestraat 55
tel: +32 2 2908451        |  1130 Brussel
fax: +32 2 7262686        |  Belgium