| * linux/arch/m68k/sun3/dvma.c |
| * Sun3 IOMMU routines used for dvma accesses. |
| #include <linux/kernel.h> |
| #include <linux/bootmem.h> |
| static unsigned long ptelist[120]; |
| static unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr) |
| j = *(volatile unsigned long *)kaddr; |
| *(volatile unsigned long *)kaddr = j; |
| ptep = pfn_pte(virt_to_pfn(kaddr), PAGE_KERNEL); |
| // pr_info("dvma_remap: addr %lx -> %lx pte %08lx\n", kaddr, vaddr, pte); |
| if(ptelist[(vaddr & 0xff000) >> PAGE_SHIFT] != pte) { |
| sun3_put_pte(vaddr, pte); |
| ptelist[(vaddr & 0xff000) >> PAGE_SHIFT] = pte; |
| return (vaddr + (kaddr & ~PAGE_MASK)); |
| int dvma_map_iommu(unsigned long kaddr, unsigned long baddr, |
| vaddr = dvma_btov(baddr); |
| void __init sun3_dvma_init(void) |
| memset(ptelist, 0, sizeof(ptelist)); |