Re: [for-4.4-rc6 PATCH] scatterlist: fix sg_phys() masking

2015-12-15 Thread Dan Williams
On Tue, Dec 15, 2015 at 2:35 AM, Joerg Roedel wrote: > On Mon, Dec 14, 2015 at 03:17:39PM -0800, Dan Williams wrote: >> commit db0fa0cb0157 "scatterlist: use sg_phys()" did replacements of the >> form: >> >> phys_addr_t phys = page_to_phys(sg_page(s)); >> phys_addr_t phys = sg_phys(s) &

Re: [for-4.4-rc6 PATCH] scatterlist: fix sg_phys() masking

2015-12-15 Thread Joerg Roedel
On Mon, Dec 14, 2015 at 03:17:39PM -0800, Dan Williams wrote: > commit db0fa0cb0157 "scatterlist: use sg_phys()" did replacements of the > form: > > phys_addr_t phys = page_to_phys(sg_page(s)); > phys_addr_t phys = sg_phys(s) & PAGE_MASK; > > However, this breaks platforms where

Re: [for-4.4-rc6 PATCH] scatterlist: fix sg_phys() masking

2015-12-15 Thread Dan Williams
On Tue, Dec 15, 2015 at 2:35 AM, Joerg Roedel wrote: > On Mon, Dec 14, 2015 at 03:17:39PM -0800, Dan Williams wrote: >> commit db0fa0cb0157 "scatterlist: use sg_phys()" did replacements of the >> form: >> >> phys_addr_t phys = page_to_phys(sg_page(s)); >> phys_addr_t phys

Re: [for-4.4-rc6 PATCH] scatterlist: fix sg_phys() masking

2015-12-15 Thread Joerg Roedel
On Mon, Dec 14, 2015 at 03:17:39PM -0800, Dan Williams wrote: > commit db0fa0cb0157 "scatterlist: use sg_phys()" did replacements of the > form: > > phys_addr_t phys = page_to_phys(sg_page(s)); > phys_addr_t phys = sg_phys(s) & PAGE_MASK; > > However, this breaks platforms where

[for-4.4-rc6 PATCH] scatterlist: fix sg_phys() masking

2015-12-14 Thread Dan Williams
commit db0fa0cb0157 "scatterlist: use sg_phys()" did replacements of the form: phys_addr_t phys = page_to_phys(sg_page(s)); phys_addr_t phys = sg_phys(s) & PAGE_MASK; However, this breaks platforms where sizeof(phys_addr_t) > sizeof(unsigned long). Since PAGE_MASK is an unsigned long

[for-4.4-rc6 PATCH] scatterlist: fix sg_phys() masking

2015-12-14 Thread Dan Williams
commit db0fa0cb0157 "scatterlist: use sg_phys()" did replacements of the form: phys_addr_t phys = page_to_phys(sg_page(s)); phys_addr_t phys = sg_phys(s) & PAGE_MASK; However, this breaks platforms where sizeof(phys_addr_t) > sizeof(unsigned long). Since PAGE_MASK is an unsigned long