Re: Is sendfile all that sexy?

From: kuznet@ms2.inr.ac.ru
Date: Sun Jan 21 2001 - 13:00:05 EST


Hello!

> "struct page" tricks, some macros etc WILL NOT WORK. In particular, we do
> not currently have a good "page_to_bus/phys()" function. That means that
> anybody trying to do DMA to this page is currently screwed, simply because
> he has no good way of getting the physical address.

We already have similar problem with 64bit dma on Intel.
Namely, we need page_to_bus() and, moreover, we need 64bit bus addresses
for devices understanding them.

Now we make this in acenic like:

#if defined(CONFIG_X86) && defined(CONFIG_HIGHMEM)

#define BITS_PER_DMAADDR 64

typedef unsigned long long dmaaddr_high_t;

static inline dmaaddr_high_t
pci_map_single_high(struct pci_dev *hwdev, struct page *page,
                    int offset, size_t size, int dir)
{
        dmaaddr_high_t phys;

        phys = (page-mem_map) *
                (unsigned long long) PAGE_SIZE +
                        offset;

        return phys;
}

#else

Ingo, do you remember, that we agreed not to consider this code
as "ready for release" until this issue is not cleaned up?
I forgot this. 8)8)8)

Seems, we can remove at least direct dependencies on mem_map
using zone_struct.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 21:00:24 EST