lkml.org 
[lkml]   [2015]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4] Fix pointer cast for 32 bits arch
On Thu, Apr 16, 2015 at 06:05:27PM +0100, Alan Cox wrote:
> Its a 64 on 64 or 32 on 32 virtual machine. Goldfish is used for Android
> emulation for all the system level phone emulation tools. On the
> emulation side it provides an interface for the emulated OS but makes no
> effort to emulate it as if it was a real hardware. If you think of it as
> a funky emulator interface all is good. If you think about it as
> "hardware" you've got the wrong model and chunks of Goldfish make less
> sense.
>

Ah. Ok. That makes sense.

Peter maybe the fix is to make a different function:

static inline void gf_write_dma_addr(dma_addr_t addr, void __iomem *portl,
void __iomem *porth)
{
writel((u32)data, portl);
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
writel(data >> 32, porth);
#endif
}

Something like that.

The gf_write_ptr() function patch you wrote preserves the current
behavior, but the current behavior is buggy, (I think) so we need
both gf_write_dma_addr() and gf_write_ptr().

regards,
dan carpenter



\
 
 \ /
  Last update: 2015-04-17 10:41    [W:0.058 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site