public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Lameter <cl@linux-foundation.org>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Nicolas Pitre <nico@cam.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h
Date: Thu, 02 Oct 2008 11:49:09 -0500	[thread overview]
Message-ID: <48E4FB85.2040204@linux-foundation.org> (raw)
In-Reply-To: <20081001150258.GB22031@flint.arm.linux.org.uk>

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

  reply	other threads:[~2008-10-02 16:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1222230419-15661-21-git-send-email-nico@cam.org>
     [not found] ` <1222230592-15868-1-git-send-email-nico@cam.org>
     [not found]   ` <20080930162809.GD15911@flint.arm.linux.org.uk>
     [not found]     ` <alpine.LFD.2.00.0809301409230.3635@xanadu.home>
     [not found]       ` <20080930184411.GJ15911@flint.arm.linux.org.uk>
2008-09-30 19:35         ` wrong usage of MAX_DMA_ADDRESS in bootmem.h Nicolas Pitre
2008-09-30 19:56           ` Christoph Lameter
2008-09-30 20:12             ` Russell King - ARM Linux
2008-09-30 21:09               ` Nicolas Pitre
2008-10-01 12:07               ` Christoph Lameter
2008-10-01 14:06                 ` Russell King - ARM Linux
2008-10-01 14:50                   ` Christoph Lameter
2008-10-01 15:02                     ` Russell King - ARM Linux
2008-10-02 16:49                       ` Christoph Lameter [this message]
2008-10-02 19:06                         ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48E4FB85.2040204@linux-foundation.org \
    --to=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox