From: Reza Arbab <arbab@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Dan Williams <dan.j.williams@intel.com>,
Balbir Singh <bsingharora@gmail.com>,
Gavin Shan <gwshan@linux.vnet.ibm.com>,
David Gibson <david@gibson.dropbear.id.au>,
Vasant Hegde <hegdevasant@linux.vnet.ibm.com>,
Scott Wood <scottwood@freescale.com>,
"Oliver O'Halloran" <oohall@gmail.com>,
Nathan Fontenot <nfont@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/mm: update arch_{add,remove}_memory() for radix
Date: Wed, 29 Jun 2016 10:37:31 -0500 [thread overview]
Message-ID: <20160629153731.GA31214@arbab-laptop.austin.ibm.com> (raw)
In-Reply-To: <1467112865.16036.4.camel@ellerman.id.au>
On Tue, Jun 28, 2016 at 09:21:05PM +1000, Michael Ellerman wrote:
>No, you need to use mmu_linear_psize for the hotplug case.
>
>But you can probably factor out a common routine that both cases use, and hide
>the hash vs radix check in that.
Okay, I'm trying to refactor {create,remove}_section_mapping() into
hash__ and radix__ variants. This lead to a couple of questions.
Pseudocode for radix__create_section_mapping(start, end):
page_size = 1 << mmu_psize_defs[mmu_linear_psize].shift;
start = _ALIGN_DOWN(start, page_size);
for (; start < end; start += page_size) {
radix__map_kernel_page(start, __pa(start),
PAGE_KERNEL, page_size);
}
Should the above use PAGE_KERNEL, like the the hash table bolt, or
(_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_KERNEL_RW), like in the radix
vmemmap creation?
The other question is what radix__remove_section_mapping() should do.
I don't know offhand what the opposite of map_kernel_page() is. As
Aneesh mentioned, radix vmemmap removal is currently stubbed as a FIXME
so I couldn't use that as a reference.
--
Reza Arbab
next prev parent reply other threads:[~2016-06-29 15:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 16:39 Reza Arbab
2016-06-23 17:17 ` Aneesh Kumar K.V
2016-06-23 19:37 ` Reza Arbab
2016-06-23 19:52 ` Reza Arbab
2016-06-28 11:21 ` Michael Ellerman
2016-06-28 14:03 ` Aneesh Kumar K.V
2016-06-29 15:37 ` Reza Arbab [this message]
2016-06-24 3:22 ` Balbir Singh
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=20160629153731.GA31214@arbab-laptop.austin.ibm.com \
--to=arbab@linux.vnet.ibm.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=david@gibson.dropbear.id.au \
--cc=gwshan@linux.vnet.ibm.com \
--cc=hegdevasant@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nfont@linux.vnet.ibm.com \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
--cc=scottwood@freescale.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
all inboxes | Powered by JetHome®