kernel-fxtec-pro1x/include/asm-ppc
Roland Dreier 1d4454e7ce [POWERPC] Define pci_unmap_addr() et al. when CONFIG_NOT_COHERENT_CACHE=y
The current PowerPC code makes pci_unmap_addr(), pci_unmap_addr_set(),
and friends trivial for all 32-bit kernels.  This is reasonable, since
for those kernels it is true that pci_unmap_single() does not need the
DMA address from the original DMA mapping -- in fact, it is a NOP.

However, I recently tried the tg3 driver on a PowerPC 440SPe machine,
which runs a 32-bit kernel and has non-cache-coherent PCI DMA.  I
found that the tg3 driver crashed in pci_dma_sync_single_for_cpu(),
since for non-coherent systems, that function must invalidate the
cache for the DMA address range requested, and therefore it does use
the address passed in.  tg3 uses a DMA address it stashes away with
pci_unmap_addr_set() and retrieves with pci_unmap_addr().  Of course,
since pci_unmap_addr() is defined to (0) right now, this doesn't work.

It seems to me that the tg3 driver is using pci_unmap_addr() in a
legitimate way -- I wouldn't want to have to teach all drivers that
they should use pci_unmap_addr() if they only need the address for
unmapping functions, but if they want the pci_dma_sync functions, then
they have to store the DMA address without the helper macros.
The right fix therefore seems to be in the definition of the macros in
<asm/pci.h> -- we should use the trivial versions only for 32-bit
kernels for coherent systems, and the real versions for both 64-bit
kernels and non-coherent systems.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:10:18 +11:00
..
8xx_immap.h
amigahw.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
amigaints.h
amigappc.h
amigayle.h
amipcmcia.h
ans-lcd.h
bootinfo.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
bootx.h
btext.h
commproc.h [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
cpm2.h POWERPC: overhaul with cpm2_map mechanism 2006-09-21 22:38:05 +04:00
delay.h
device.h Driver core: add dev_archdata to struct device 2006-12-01 14:52:01 -08:00
floppy.h [PPC] Fix some irq breakage with ARCH=ppc 2006-10-06 21:09:40 +10:00
fs_pd.h POWERPC: Get rid of remapping the whole immr 2006-09-21 22:37:58 +04:00
gg2.h
gt64260.h [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
gt64260_defs.h
harrier.h
hawk.h
hawk_defs.h
highmem.h [PATCH] mm: pagefault_{disable,enable}() 2006-12-07 08:39:21 -08:00
hydra.h
ibm4xx.h [PATCH] #elif that should've been #elif defined 2006-09-23 11:34:43 -07:00
ibm44x.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ibm403.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ibm405.h
ibm_ocp.h
ibm_ocp_pci.h
immap_85xx.h
immap_cpm2.h
io.h [POWERPC] Fix IDE build with ARCH=ppc 2006-12-04 20:39:09 +11:00
kgdb.h
m48t35.h [POWERPC] ppc: m48t35 add missing bracket 2006-12-04 20:42:04 +11:00
m8260_pci.h
machdep.h [POWERPC] Fix up after irq changes 2006-10-07 22:08:26 +10:00
md.h
mk48t59.h
mmu.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
mmu_context.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-06-22 22:11:30 -07:00
mpc8xx.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
mpc10x.h
mpc52xx.h [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set 2006-11-13 14:49:25 +11:00
mpc52xx_psc.h
mpc83xx.h [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set 2006-11-13 14:49:25 +11:00
mpc85xx.h [PATCH] ppc: Fix io.h for config with CONFIG_PCI not set 2006-11-13 14:49:25 +11:00
mpc8260.h [PATCH] ppc32: board-specific part of fs_enet update 2006-08-19 17:44:31 -04:00
mpc8260_pci9.h [POWERPC] remove unused io accessors 2006-09-20 14:06:17 +10:00
mv64x60.h [POWERPC] ARCH=ppc pt_regs fixes 2006-10-10 11:55:25 +10:00
mv64x60_defs.h fix file specification in comments 2006-10-03 23:01:26 +02:00
ocp.h [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree 2006-06-26 12:25:08 -07:00
ocp_ids.h
open_pic.h [POWERPC] PReP fixup after irq changes 2006-10-07 22:11:20 +10:00
page.h typo fixes: mecanism -> mechanism 2006-06-30 18:20:44 +02:00
pc_serial.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
pci-bridge.h [POWERPC] Add "parent" struct device for PCI host bridges 2006-12-04 20:38:47 +11:00
pci.h [POWERPC] Define pci_unmap_addr() et al. when CONFIG_NOT_COHERENT_CACHE=y 2006-12-08 17:10:18 +11:00
pgalloc.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
pgtable.h [PATCH] Standardize pxx_page macros 2006-09-26 08:48:51 -07:00
pnp.h
ppc4xx_dma.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ppc4xx_pic.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
ppc_sys.h [PATCH] ppc32: odd fixes and improvements in ppc_sys 2006-04-28 21:05:16 +10:00
ppcboot.h
prep_nvram.h
prom.h ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc 2006-03-28 10:22:10 +11:00
raven.h
reg_booke.h [POWERPC] 40x: Fix debug status register defines 2006-09-21 22:59:39 +10:00
residual.h
rheap.h fix file specification in comments 2006-10-03 23:01:26 +02:00
rio.h
rtc.h fix file specification in comments 2006-10-03 23:01:26 +02:00
serial.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
smp.h [POWERPC] PReP fixup after irq changes 2006-10-07 22:11:20 +10:00
spinlock.h [PATCH] Directed yield: cpu_relax variants for spinlocks and rw-locks 2006-10-01 00:39:21 -07:00
suspend.h
system.h [PATCH] remove set_wmb - arch removal 2006-07-14 21:56:14 -07:00
time.h Don't include linux/config.h from anywhere else in include/ 2006-04-26 12:56:16 +01:00
todc.h
traps.h
zorro.h