From: "Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>
To: Balbir Singh <bsingharora@gmail•com>,
benh@kernel•crashing.org, paulus@samba•org, mpe@ellerman•id.au
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v5 3/7] powerpc/mm/hugetlb: Handle hugepage size supported by hash config
Date: Wed, 23 Nov 2016 20:00:21 +0530 [thread overview]
Message-ID: <87vavegtfm.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <11917d34-3bb8-1d79-2753-ead02ebe7ce3@gmail.com>
Balbir Singh <bsingharora@gmail•com> writes:
> On 23/11/16 22:09, Aneesh Kumar K.V wrote:
>> W.r.t hash page table config, we support 16MB and 16GB as the hugepage
>> size. Update the hstate_get_psize to handle 16M and 16G.
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux•vnet.ibm.com>
>> ---
>> arch/powerpc/include/asm/book3s/64/hugetlb.h | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h
>> index 499268045306..d9c283f95e05 100644
>> --- a/arch/powerpc/include/asm/book3s/64/hugetlb.h
>> +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h
>> @@ -21,6 +21,10 @@ static inline int hstate_get_psize(struct hstate *hstate)
>> return MMU_PAGE_2M;
>> else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift)
>> return MMU_PAGE_1G;
>> + else if (shift == mmu_psize_defs[MMU_PAGE_16M].shift)
>> + return MMU_PAGE_16M;
>> + else if (shift == mmu_psize_defs[MMU_PAGE_16G].shift)
>> + return MMU_PAGE_16G;
>> else {
>> WARN(1, "Wrong huge page shift\n");
>> return mmu_virtual_psize;
>>
>
> Is this related to this patch series? Radix can't do these sizes
>
The code returns the psize (the index value of the page size ) from hstate.
It doesn't make any verification. I added the hash details here because
this header is now suppose to contain generic functions not radix
specific one.
-aneesh
next prev parent reply other threads:[~2016-11-23 14:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 11:09 [PATCH v5 1/7] powerpc/mm: update ptep_set_access_flag to not do full mm tlb flush Aneesh Kumar K.V
2016-11-23 11:09 ` [PATCH v5 2/7] powerpc/mm: Rename hugetlb-radix.h to hugetlb.h Aneesh Kumar K.V
2016-11-23 11:09 ` [PATCH v5 3/7] powerpc/mm/hugetlb: Handle hugepage size supported by hash config Aneesh Kumar K.V
2016-11-23 14:08 ` Balbir Singh
2016-11-23 14:30 ` Aneesh Kumar K.V [this message]
2016-11-23 11:10 ` [PATCH v5 4/7] powerpc/mm/hugetlb: Make copy of huge_ptep_get_and_clear to different platform headers Aneesh Kumar K.V
2016-11-23 11:10 ` [PATCH v5 5/7] powerpc/mm/hugetlb: Switch hugetlb update to use huge_pte_update Aneesh Kumar K.V
2016-11-23 11:10 ` [PATCH v5 6/7] powerpc/mm: update pte_update to not do full mm tlb flush Aneesh Kumar K.V
2016-11-23 11:10 ` [PATCH v5 7/7] powerpc/mm: Batch tlb flush when invalidating pte entries Aneesh Kumar K.V
2016-11-23 11:23 ` [PATCH v5 1/7] powerpc/mm: update ptep_set_access_flag to not do full mm tlb flush Balbir Singh
2016-11-23 11:53 ` Aneesh Kumar K.V
2016-11-23 14:05 ` Balbir Singh
2016-11-23 14:36 ` Aneesh Kumar K.V
2016-11-23 15:21 ` Balbir Singh
2016-11-25 2:48 ` Paul Mackerras
2016-11-25 4:19 ` Aneesh Kumar K.V
2016-11-25 7:05 ` Aneesh Kumar K.V
2016-11-25 8:22 ` Benjamin Herrenschmidt
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=87vavegtfm.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=benh@kernel$(echo .)crashing.org \
--cc=bsingharora@gmail$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mpe@ellerman$(echo .)id.au \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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