On Mon, Nov 26, 2018 at 11:00:10AM -0800, Sean Christopherson wrote:
> On Mon, Nov 26, 2018 at 05:07:46PM +0000, Will Deacon wrote:
> > The current ioremap() code uses a phys_addr variable at each level of
> > page table, which is confusingly offset by subtracting the base virtual
> > address being mapped so that adding the current virtual address back on
> > when iterating through the page table entries gives back the corresponding
> > physical address.
> > 
> > This is fairly confusing and results in all users of phys_addr having to
> > add the current virtual address back on. Instead, this patch just updates
> > phys_addr when iterating over the page table entries, ensuring that it's
> > always up-to-date and doesn't require explicit offsetting.
> > 
> > Cc: Chintan Pandya <[email protected]>
> > Cc: Toshi Kani <[email protected]>
> > Cc: Thomas Gleixner <[email protected]>
> > Cc: Michal Hocko <[email protected]>
> > Cc: Andrew Morton <[email protected]>
> > Cc: Sean Christopherson <[email protected]>
> > Signed-off-by: Will Deacon <[email protected]>
> 
> Tested-by: Sean Christopherson <[email protected]>
> Reviewed-by: Sean Christopherson <[email protected]>

Thanks, Sean. I think Andrew can queue these now.

Will

Reply via email to