From: Rashmica Gupta <rashmica.g@gmail.com>
To: Oliver O'Halloran <oohall@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/6] powerpc/mm: Wire up hpte_removebolted for powernv
Date: Thu, 25 May 2017 10:02:36 +1000 [thread overview]
Message-ID: <bc645266-c79e-e418-d564-1fdb0ee1d7a2@gmail.com> (raw)
In-Reply-To: <20170523040524.13717-1-oohall@gmail.com>
Looks good to me
On 23/05/17 14:05, Oliver O'Halloran wrote:
> From: Anton Blanchard <anton@samba.org>
>
> Adds support for removing bolted (i.e kernel linear mapping) mappings on
> powernv. This is needed to support memory hot unplug operations which
> are required for the teardown of DAX/PMEM devices.
>
> Reviewed-by: Rashmica Gupta <rashmica.g@gmail.com>
^^ x2
> Signed-off-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> ---
> v1 -> v2: Fixed the commit author
> Added VM_WARN_ON() if we attempt to remove an unbolted hpte
> ---
> arch/powerpc/mm/hash_native_64.c | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c
> index 65bb8f33b399..b534d041cfe8 100644
> --- a/arch/powerpc/mm/hash_native_64.c
> +++ b/arch/powerpc/mm/hash_native_64.c
> @@ -407,6 +407,38 @@ static void native_hpte_updateboltedpp(unsigned long newpp, unsigned long ea,
> tlbie(vpn, psize, psize, ssize, 0);
> }
>
> +/*
> + * Remove a bolted kernel entry. Memory hotplug uses this.
> + *
> + * No need to lock here because we should be the only user.
> + */
> +static int native_hpte_removebolted(unsigned long ea, int psize, int ssize)
> +{
> + unsigned long vpn;
> + unsigned long vsid;
> + long slot;
> + struct hash_pte *hptep;
> +
> + vsid = get_kernel_vsid(ea, ssize);
> + vpn = hpt_vpn(ea, vsid, ssize);
> +
> + slot = native_hpte_find(vpn, psize, ssize);
> + if (slot == -1)
> + return -ENOENT;
> +
> + hptep = htab_address + slot;
> +
> + VM_WARN_ON(!(be64_to_cpu(hptep->v) & HPTE_V_BOLTED));
> +
> + /* Invalidate the hpte */
> + hptep->v = 0;
> +
> + /* Invalidate the TLB */
> + tlbie(vpn, psize, psize, ssize, 0);
> + return 0;
> +}
> +
> +
> static void native_hpte_invalidate(unsigned long slot, unsigned long vpn,
> int bpsize, int apsize, int ssize, int local)
> {
> @@ -725,6 +757,7 @@ void __init hpte_init_native(void)
> mmu_hash_ops.hpte_invalidate = native_hpte_invalidate;
> mmu_hash_ops.hpte_updatepp = native_hpte_updatepp;
> mmu_hash_ops.hpte_updateboltedpp = native_hpte_updateboltedpp;
> + mmu_hash_ops.hpte_removebolted = native_hpte_removebolted;
> mmu_hash_ops.hpte_insert = native_hpte_insert;
> mmu_hash_ops.hpte_remove = native_hpte_remove;
> mmu_hash_ops.hpte_clear_all = native_hpte_clear;
prev parent reply other threads:[~2017-05-25 0:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 4:05 [PATCH 1/6] powerpc/mm: Wire up hpte_removebolted for powernv Oliver O'Halloran
2017-05-23 4:05 ` [PATCH 2/6] powerpc/vmemmap: Reshuffle vmemmap_free() Oliver O'Halloran
2017-05-23 4:05 ` [PATCH 3/6] powerpc/vmemmap: Add altmap support Oliver O'Halloran
2017-05-23 9:25 ` Balbir Singh
2017-05-23 4:05 ` [PATCH 4/6] powerpc/mm: Add devmap support for ppc64 Oliver O'Halloran
2017-05-23 4:23 ` Aneesh Kumar K.V
2017-05-23 6:42 ` Oliver O'Halloran
2017-05-23 10:40 ` Balbir Singh
2017-05-24 2:17 ` Oliver O'Halloran
2017-05-23 4:05 ` [PATCH 5/6] mm, x86: Add ARCH_HAS_ZONE_DEVICE Oliver O'Halloran
2017-05-23 6:42 ` Ingo Molnar
2017-05-23 9:20 ` Balbir Singh
2017-05-23 4:05 ` [PATCH 6/6] powerpc/mm: Enable ZONE_DEVICE on powerpc Oliver O'Halloran
2017-05-23 9:21 ` Balbir Singh
2017-05-23 9:27 ` [PATCH 1/6] powerpc/mm: Wire up hpte_removebolted for powernv Balbir Singh
2017-05-25 0:02 ` Rashmica Gupta [this message]
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=bc645266-c79e-e418-d564-1fdb0ee1d7a2@gmail.com \
--to=rashmica.g@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oohall@gmail.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).