All of lore.kernel.org
 help / color / mirror / Atom feed
From: hpa@zytor.com (H. Peter Anvin)
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] aic7xxx large integer
Date: Mon, 6 Dec 2004 21:35:05 +0000 (UTC)	[thread overview]
Message-ID: <cp2ja9$i88$1@terminus.zytor.com> (raw)
In-Reply-To: 1102208526.6052.87.camel@localhost

Followup to:  <1102208526.6052.87.camel@localhost>
By author:    Robert Love <rml@novell.com>
In newsgroup: linux.dev.kernel
>
> On Sun, 2004-12-05 at 00:16 +0100, Miguel Angel Flores wrote:
> 
> > I post the patch very quickly :(. The original code finally seems OK. My 
> > controller is not working with 39 bit addressing, although I can't find 
> > why the compiler warns. Maybe the length of dma_addr_t type, in the 
> > 2.6.9 the type of the mask_39bit variable is bus_addr_t.
> 
> The compiler warns because you are putting a 64-bit value (an unsigned
> long long) in a 32-bit value (a u32).
> 
> There is definitely a problem on non-highmem compiled kernels, there is
> no doubt of that.  The concern was that your suggested fix is not right.
> 
> Assuming that a 39-bit value is really wanted, the type either needs to
> be changed to a dma64_addr_t or the value needs to change at
> compile-time to a suitable 32-bit variant when !CONFIG_HIGHMEM64G.
> 
> Without knowing what the driver is doing, I have no idea.
> 

I suspect that what the driver wants is a mask that is a valid DMA
address no wider than 39 bits (because that's all the hardware can
do.)

If so, I would assume (dma_addr_t)0x7FFFFFFFFFULL is probably the
right thing; it will be truncated to a 32-bit mask if only 32-bit
addressing is available.

	-hpa

      reply	other threads:[~2004-12-06 21:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-04 20:49 [PATCH] aic7xxx large integer Miguel Angel Flores
2004-12-04 20:59 ` Dr. David Alan Gilbert
2004-12-04 22:01 ` Robert Love
2004-12-04 23:16 ` Miguel Angel Flores
2004-12-05  1:02   ` Robert Love
2004-12-06 21:35     ` H. Peter Anvin [this message]

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='cp2ja9$i88$1@terminus.zytor.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.