Re: [PATCH V4] Fix pointer cast for 32 bits arch
From: Dan Carpenter
Date: Fri Apr 17 2015 - 04:12:26 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/