From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Will Deacon <will.deacon@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
cpandya@codeaurora.org, toshi.kani@hpe.com, tglx@linutronix.de,
mhocko@suse.com, akpm@linux-foundation.org
Subject: Re: [PATCH v4 4/5] lib/ioremap: Ensure phys_addr actually corresponds to a physical address
Date: Mon, 26 Nov 2018 11:00:10 -0800 [thread overview]
Message-ID: <20181126190009.GG25719@linux.intel.com> (raw)
In-Reply-To: <1543252067-30831-5-git-send-email-will.deacon@arm.com>
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 <cpandya@codeaurora.org>
> Cc: Toshi Kani <toshi.kani@hpe.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Sean Christopherson <sean.j.christopherson@intel.com>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Tested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
next prev parent reply other threads:[~2018-11-26 19:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 17:07 [PATCH v4 0/5] Clean up huge vmap and ioremap code Will Deacon
2018-11-26 17:07 ` [PATCH v4 1/5] ioremap: Rework pXd_free_pYd_page() API Will Deacon
2018-11-26 17:07 ` [PATCH v4 2/5] arm64: mmu: Drop pXd_present() checks from pXd_free_pYd_table() Will Deacon
2018-11-26 17:07 ` [PATCH v4 3/5] x86/pgtable: Drop pXd_none() " Will Deacon
2018-11-26 17:07 ` [PATCH v4 4/5] lib/ioremap: Ensure phys_addr actually corresponds to a physical address Will Deacon
2018-11-26 19:00 ` Sean Christopherson [this message]
2018-11-27 12:12 ` Will Deacon
2018-11-26 17:07 ` [PATCH v4 5/5] lib/ioremap: Ensure break-before-make is used for huge p4d mappings Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181126190009.GG25719@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cpandya@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=tglx@linutronix.de \
--cc=toshi.kani@hpe.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).