[xtensa-cvscommit] linux/arch/xtensa/kernel pci-dma.c,1.1.1.1,1.2
Brought to you by:
zankel
|
From: <joe...@us...> - 2003-01-17 00:31:33
|
Update of /cvsroot/xtensa/linux/arch/xtensa/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv4681/arch/xtensa/kernel Modified Files: pci-dma.c Log Message: Add support for writeback caches. Affects only linux_test config. Index: pci-dma.c =================================================================== RCS file: /cvsroot/xtensa/linux/arch/xtensa/kernel/pci-dma.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** pci-dma.c 28 Aug 2002 16:10:14 -0000 1.1.1.1 --- pci-dma.c 17 Jan 2003 00:31:30 -0000 1.2 *************** *** 33,36 **** --- 33,40 ---- } + #if XCHAL_DCACHE_IS_WRITEBACK + xthal_dcache_region_writeback_inv((void *)ret, size); + #endif + return (void*) BYPASS_ADDR((unsigned long)ret); } *************** *** 48,57 **** BUG(); case PCI_DMA_FROMDEVICE: /* invalidate only */ ! invalidate_dcache_range(vaddr, vaddr + size); break; case PCI_DMA_TODEVICE: /* writeback only */ break; case PCI_DMA_BIDIRECTIONAL: /* writeback and invalidate */ ! invalidate_dcache_range(vaddr, vaddr + size); break; } --- 52,73 ---- BUG(); case PCI_DMA_FROMDEVICE: /* invalidate only */ ! xthal_dcache_region_invalidate(vaddr, size); break; case PCI_DMA_TODEVICE: /* writeback only */ + + #if XCHAL_DCACHE_IS_WRITEBACK + /* Invoke only if wb-caches exist. Invoking nothing + * is better if no wb-caches exist. */ + xthal_dcache_region_writeback(vaddr, size); + #endif break; case PCI_DMA_BIDIRECTIONAL: /* writeback and invalidate */ ! ! /* On Xtensa processors without writeback caches, the ! * writeback functionality does nothing, leaving only ! * the invalidate functionality. Thus, it's safe to ! * call the writeback function. */ ! ! xthal_dcache_region_writeback_inv(vaddr, size); break; } |