[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <48E4FB85.2040204@linux-foundation.org>
Date: Thu, 02 Oct 2008 11:49:09 -0500
From: Christoph Lameter <cl@...ux-foundation.org>
To: Russell King - ARM Linux <linux@....linux.org.uk>
CC: Nicolas Pitre <nico@....org>, lkml <linux-kernel@...r.kernel.org>
Subject: Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h
Russell King - ARM Linux wrote:
>> Maybe we should make these physical addresses to avoid the casts?
>
> Finally, we agree on something. Yes, they should be phys addresses.
> But not for the sake of getting rid of casts, but because that's what
> the bootmem allocator _actually_ wants to have in the first place.
>
> And, to do this, the following are going to have to be changed:
>
> drivers/block/floppy.c: } else if ((unsigned long)current_req->buffer < MAX_DMA_ADDRESS) {
> drivers/block/floppy.c: * Do NOT use minimum() here---MAX_DMA_ADDRESS is 64 bits wide
> drivers/block/floppy.c: (MAX_DMA_ADDRESS -
> drivers/net/3c505.c: if ((unsigned long)(target + rlen) >= MAX_DMA_ADDRESS) {
> drivers/net/3c505.c: if ((unsigned long)(skb->data + nlen) >= MAX_DMA_ADDRESS || nlen != skb->len) {
> drivers/net/cs89x0.c: if ((unsigned long) lp->dma_buff >= MAX_DMA_ADDRESS ||
> drivers/net/wan/cosa.c: if (b+len >= MAX_DMA_ADDRESS)
> drivers/parport/parport_pc.c: if (end < MAX_DMA_ADDRESS) {
> drivers/scsi/BusLogic.c: if (HostAdapter->HostAdapterBusType == BusLogic_ISA_Bus && (void *) high_memory > (void *)
> drivers/scsi/BusLogic.c: if (HostAdapter->BIOS_Address > 0 && strcmp(HostAdapter->ModelName, "BT-445S") == 0 && strc
> sound/oss/dmabuf.c: || end_addr >= (char *) (MAX_DMA_ADDRESS)) {
> sound/oss/sscape.c: || end_addr >= (char *) (MAX_DMA_ADDRESS)) {
>
> which probably want to do the check in the phys address space anyway.
Right. Lets do it. MAX_DMA32 needs to be changed too.
While you are at it: Could you make the association with the zones clearer?
MAX_ZONE_DMA32_ADDRESS MAX_ZONE_DMA_ADDRESS, MAX_ZONE_DMA_PFN,
MAX_ZONE_DMA32_PFN ....
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists