Skip to contentSkip to conversation

Multiple copies of pci-dma.c file.

DISCUSSION Dan Aizenstros 2 participants 4 messages Nov 22, 2000 – Nov 24, 2000 MIPS

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 6 lines · Dan Aizenstros

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.

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_pages function call into a KSEG1 address even if the pointer is NULL.

Fixed.

Ralf

#2 lore raw

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.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.

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_pages function call into a KSEG1 address even if the pointer is NULL.

Fixed.

Ralf

#3 lore raw
Quoted 1 line · Dan Aizenstros

Should the dma_cache_inv actually be a dma_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.c which is they same as pci-dma.c and should be removed.

``He's dead, Jim''.

Ralf