Skip to content
Unverified Commit 827a4381 authored by Vincent Chen's avatar Vincent Chen Committed by Palmer Dabbelt
Browse files

RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap



For 32bit, the upper 32-bit of phys_addr_t will be flushed to zero
after AND with PAGE_MASK because the data type of PAGE_MASK is
unsigned long. To fix this problem, the page alignment is done by
subtracting the page offset instead of AND with PAGE_MASK.

Signed-off-by: default avatarVincent Chen <vincentc@andestech.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 757331db
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment