lkml.org 
[lkml]   [2004]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] aic7xxx large integer
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.094 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site