diff options
Diffstat (limited to 'arch/sparc/mm/io-unit.c')
-rw-r--r-- | arch/sparc/mm/io-unit.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c index 90b4aee69..a370ea2d4 100644 --- a/arch/sparc/mm/io-unit.c +++ b/arch/sparc/mm/io-unit.c @@ -1,4 +1,4 @@ -/* $Id: io-unit.c,v 1.20 2000/01/15 00:51:27 anton Exp $ +/* $Id: io-unit.c,v 1.21 2000/02/06 22:55:45 zaitcev Exp $ * io-unit.c: IO-UNIT specific routines for memory management. * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -210,6 +210,20 @@ static void iounit_map_dma_area(unsigned long va, __u32 addr, int len) static void iounit_unmap_dma_area(unsigned long addr, int len) { + /* XXX Somebody please fill this in */ +} + +/* XXX We do not pass sbus device here, bad. */ +static unsigned long iounit_translate_dvma(unsigned long addr) +{ + struct sbus_bus *sbus = sbus_root; /* They are all the same */ + struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu; + int i; + iopte_t *iopte; + + i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT); + iopte = (iopte_t *)(iounit->page_table + i); + return (iopte_val(*iopte) & 0xFFFFFFF0) << 4; /* XXX sun4d guru, help */ } #endif @@ -237,6 +251,7 @@ void __init ld_mmu_iounit(void) #ifdef CONFIG_SBUS BTFIXUPSET_CALL(mmu_map_dma_area, iounit_map_dma_area, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(mmu_unmap_dma_area, iounit_unmap_dma_area, BTFIXUPCALL_NORM); + BTFIXUPSET_CALL(mmu_translate_dvma, iounit_translate_dvma, BTFIXUPCALL_NORM); #endif } |