lkml.org 
[lkml]   [2015]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH V4] Fix pointer cast for 32 bits arch


On Fri, Apr 17, 2015 at 4:10 PM, Alan Cox <alan@linux.intel.com> wrote:
> On Fri, 2015-04-17 at 16:59 +0300, Dan Carpenter wrote:
>> On Fri, Apr 17, 2015 at 02:31:49PM +0100, Alan Cox wrote:
>> > On Fri, 2015-04-17 at 11:20 +0300, Dan Carpenter wrote:
>> > > Actually, my patch seems like a good idea to me but it's one of those
>> > > things that someone should probably test. Unless someone can test
>> > > goldfish on a 32 bit system with 64 bit dma addresses
>> >
>> > No such "system" exists.
>>
>> I don't understand. We definitely can have 64bit dma addresses on
>> x86_32.
>
>
> Yes but no actual Goldfish environment is built that way
Isn't this a simpler fix?

diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c
index 213877a..053ac11 100644
--- a/drivers/staging/goldfish/goldfish_nand.c
+++ b/drivers/staging/goldfish/goldfish_nand.c
@@ -87,7 +87,7 @@ static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd,
writel((u32)(addr >> 32), base + NAND_ADDR_HIGH);
writel((u32)addr, base + NAND_ADDR_LOW);
writel(len, base + NAND_TRANSFER_SIZE);
- gf_write64((u64)ptr, base + NAND_DATA, base + NAND_DATA_HIGH);
+ gf_write64((unsigned long)ptr, base + NAND_DATA, base + NAND_DATA_HIGH);
writel(cmd, base + NAND_COMMAND);
rv = readl(base + NAND_RESULT);
}

--
Peter


\
 
 \ /
  Last update: 2015-04-18 16:01    [W:0.104 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site