Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/mm
In directory sc8-pr-cvs1:/tmp/cvs-serv19093/mm
Modified Files:
ioremap.c
Log Message:
ioremap() cleaned up slightly.
Index: ioremap.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/mm/ioremap.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ioremap.c 12 Dec 2002 01:19:20 -0000 1.5
+++ ioremap.c 28 Dec 2002 02:13:47 -0000 1.6
@@ -70,6 +70,7 @@
unsigned int i;
pte_t *start_pte;
pte_t *p;
+ unsigned long pfn;
/* Page align the physical addresses */
phys_start = PAGE_ALIGN_PREV(phys_addr);
@@ -116,14 +117,11 @@
virt_start = SPTE_TO_VIRT(start_pte);
for (i = 0; i < num_ptes; i++) {
- set_pte( (pte_t *)start_pte + i,mk_pte_phys((phys_start + i*PAGE_SIZE), __pgprot(_PAGE_VALID | _PAGE_KW)) );
+ pfn = (phys_start >> PAGE_SHIFT) + i;
+ set_pte(start_pte + i, pfn_pte(pfn, __pgprot(_PAGE_VALID | _PAGE_KW)) );
-/* asm(" movl %0,r2\n"
- " movl %1,r3\n"
- " movl %2,r4\n"
- " halt" : : "g"(start_pte->pte), "g"(phys_start), "g"(virt_start) );*/
- /* fixme: tlb flushes for other pagelets */
- __flush_tlb_one(virt_start + (i<<PAGE_SHIFT));
+ /* fixme: tlb flushes for other pagelets */
+ __flush_tlb_one(virt_start + (i<<PAGE_SHIFT));
}
printk("IO mapped phys addr 0x%08lx, 0x%04x pages at virt 0x%08lx (IOMAP PTE index 0x%04x)\n",
|