Multiple copies of pci-dma.c file.
Hello All,
Is there any reason for having multiple copies of the pci-dma.c file in Linux/MIPS. The are all doing basically the same thing. We could have just one copy in the arch/mips/lib directory and have the Makefile build it if CONFIG_PCI is defined.
Also they appear to have an error in that they convert the pointer that is returned from the __get_free_pages function call into a KSEG1 address even if the pointer is NULL.
Dan Aizenstros
Software Engineer
V3 Semiconductor Corp.
Quoted 6 lines · Dan Aizenstros
Is there any reason for having multiple copies of the
pci-dma.cfile in Linux/MIPS. The are all doing basically the same thing. We could have just one copy in thearch/mips/libdirectory and have theMakefilebuild it ifCONFIG_PCIis defined.
Sounds like a plan, done. Tell me if it breaks something ...
Some chipsets have a builtin scatter / gather facility, those may need special variants of pci-dma.c for better support.
Quoted 4 lines
Also they appear to have an error in that they convert the pointer that is returned from the
__get_free_pagesfunction call into a KSEG1 address even if the pointer is NULL.
Fixed.
Ralf
Hello Ralf,
Should the dma_cache_inv actually be a dma_cache_wback_inv?
Also, the sni directory contains a dma.c which is they same as pci-dma.c and should be removed.
Dan Aizenstros
Software Engineer
V3 Semicondutor Corp.
Quoted 23 lines · Ralf Baechle
Quoted 6 lines · Dan Aizenstros
Is there any reason for having multiple copies of the
pci-dma.cfile in Linux/MIPS. The are all doing basically the same thing. We could have just one copy in thearch/mips/libdirectory and have theMakefilebuild it ifCONFIG_PCIis defined.Sounds like a plan, done. Tell me if it breaks something ...
Some chipsets have a builtin scatter / gather facility, those may need special variants of
pci-dma.cfor better support.Quoted 4 lines
Also they appear to have an error in that they convert the pointer that is returned from the
__get_free_pagesfunction call into a KSEG1 address even if the pointer is NULL.Fixed.
Ralf
Quoted 1 line · Dan Aizenstros
Should the
dma_cache_invactually be adma_cache_wback_inv?
Conceptually your right and I've therefore changed the kernel. It wasn't a bug though because the actual implementation was in both cases actually doing a dma_cache_wback_inv.
Quoted 2 lines
Also, the sni directory contains a
dma.cwhich is they same aspci-dma.cand should be removed.
``He's dead, Jim''.
Ralf