Skip to contentSkip to conversation

:

PATCH In review Juan Quintela 2 participants 3 messages Dec 19, 2002 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 :

Hi
- pte_val() returs a long, print it directly.
- flags needs to be unsigedn long, not unsigned int.

Later, Juan.

Later, Juan.

Index: arch/mips64/mm/tlb-r4k.c
===================================================================
RCS file: /home/cvs/linux/arch/mips64/mm/tlb-r4k.c,v retrieving revision 1.1.2.5

mips64/mm/tlb-r4k.c +2 -2
diff -u -r1.1.2.5 tlb-r4k.c
@@ -244,7 +244,7 @@
 	pmd = pmd_offset(pgd, addr);
 	pte = pte_offset(pmd, addr);
 	page = *pte;
-	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, (unsigned int) pte_val(page));
+	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, pte_val(page));
 	val = pte_val(page);
 	if (val & _PAGE_PRESENT) printk("present ");
 	if (val & _PAGE_READ) printk("read ");
@@ -259,7 +259,7 @@
 
 void show_tlb(void)
 {
-        unsigned int flags;
+        unsigned long flags;
         unsigned int old_ctx;
 	unsigned int entry;
 	unsigned int entrylo0, entrylo1, entryhi;
Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
#1 lore raw
Quoted 1 line · Juan Quintela

- pte_val() returs a long, print it directly.

[...]

mips64/mm/tlb-r4k.c line 247

Quoted 2 lines
mips64/mm/tlb-r4k.c +1 -1
-	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, (unsigned int) pte_val(page));
+	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, pte_val(page));

Well, I guess you need "%08lx" then. For both formats, actually.

Signature · 3 lines
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [email protected], PGP key available        +
#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"maciej" == Maciej W Rozycki <[email protected]> writes:

Quoted 1 line · Juan Quintela
Quoted 1 line

- pte_val() returs a long, print it directly.

maciej> [...]

Quoted 2 lines

Review

Quoted 2 lines
(quoted diff) +1 -1
-	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, (unsigned int) pte_val(page));
+	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, pte_val(page));

maciej> Well, I guess you need "%08lx" then. For both formats, actually.

Arghhhhhhhh, wrong patch,
Ralf, don't apply, appy this other:

Sorry for the inconvenience, just diff the wrong tree :(

Later, Juan.

Index: arch/mips64/mm/tlb-r4k.c
===================================================================
RCS file: /home/cvs/linux/arch/mips64/mm/tlb-r4k.c,v retrieving revision 1.1.2.5

mips64/mm/tlb-r4k.c +2 -2
diff -u -r1.1.2.5 tlb-r4k.c
@@ -244,7 +244,7 @@
 	pmd = pmd_offset(pgd, addr);
 	pte = pte_offset(pmd, addr);
 	page = *pte;
-	printk("Memory Mapping: VA = %08x, PA = %08x ", addr, (unsigned int) pte_val(page));
+	printk("Memory Mapping: VA = %08lx, PA = %08lx ", addr, pte_val(page));
 	val = pte_val(page);
 	if (val & _PAGE_PRESENT) printk("present ");
 	if (val & _PAGE_READ) printk("read ");
@@ -259,7 +259,7 @@
 
 void show_tlb(void)
 {
-        unsigned int flags;
+        unsigned long flags;
         unsigned int old_ctx;
 	unsigned int entry;
 	unsigned int entrylo0, entrylo1, entryhi;
Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy