Re: [PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap

2018-10-02 Thread Zong Li
Christoph Hellwig 於 2018年10月2日 週二 下午10:51寫道: > > On Tue, Oct 02, 2018 at 04:52:31PM +0800, Zong Li wrote: > > From: Vincent Chen > > > > 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

Re: [PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap

2018-10-02 Thread Zong Li
Christoph Hellwig 於 2018年10月2日 週二 下午10:51寫道: > > On Tue, Oct 02, 2018 at 04:52:31PM +0800, Zong Li wrote: > > From: Vincent Chen > > > > 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

Re: [PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap

2018-10-02 Thread Christoph Hellwig
On Tue, Oct 02, 2018 at 04:52:31PM +0800, Zong Li wrote: > From: Vincent Chen > > 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

Re: [PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap

2018-10-02 Thread Christoph Hellwig
On Tue, Oct 02, 2018 at 04:52:31PM +0800, Zong Li wrote: > From: Vincent Chen > > 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

[PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap

2018-10-02 Thread Zong Li
From: Vincent Chen 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:

[PATCH v3 5/5] RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap

2018-10-02 Thread Zong Li
From: Vincent Chen 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: