Re: Does kmalloc always return address below 4GB?

David S. Miller
2002-03-06T01:16:08Z

From: "Adam J. Richter" <adam@yggdrasil.com>
Date: Tue, 5 Mar 2002 09:08:20 -0800

Steffen Persvold writes:
>I know pci_map_single (and _sg) will
>use bounce buffers on platforms without an IOMMU [...]

For a moment I thought that must be the point that I
was missing, but I don't see any such bounce buffer support
in linux-2.5.6-pre2/include/asm-i386/pci.h or arch/i386/kernel/pci-dma.c.
I do not see how this is currently implemented on x86 systems with >4GB
of RAM.

You won't get HIGHMEM pages in your driver unless you are using
2.5.x and tell the scsi layer you are capable to DMA to/from
HIGHMEM pages.

Similarly for networking drivers, and setting NETIF_F_HIGHDMA in
the net device feature flags.