All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Samuel Holland <samuel@sholland.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Cameron Berkenpas <cam@neo-zeon.de>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 1/3] powerpc/book3s64/hash/4k: 4k supports only 16TB linear mapping
Date: Wed, 09 Oct 2019 16:56:52 +1100	[thread overview]
Message-ID: <87mueampgb.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <7dc4aacd-ebe1-07d6-1869-e404c3c22d2e@sholland.org>

Samuel Holland <samuel@sholland.org> writes:
> Hello,
>
> On 9/17/19 9:57 AM, Aneesh Kumar K.V wrote:
>> With commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the
>> same 0xc range"), we now split the 64TB address range into 4 contexts each of
>> 16TB. That implies we can do only 16TB linear mapping. Make sure we don't
>> add physical memory above 16TB if that is present in the system.
>> 
>> Fixes: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in thesame 0xc range")
>> Reported-by: Cameron Berkenpas <cam@neo-zeon.de>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>>  arch/powerpc/include/asm/book3s/64/mmu.h | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>> 
>> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
>> index bb3deb76c951..86cce8189240 100644
>> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
>> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
>> @@ -35,12 +35,16 @@ extern struct mmu_psize_def mmu_psize_defs[MMU_PAGE_COUNT];
>>   * memory requirements with large number of sections.
>>   * 51 bits is the max physical real address on POWER9
>>   */
>> -#if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME) &&  \
>> -	defined(CONFIG_PPC_64K_PAGES)
>> +
>> +#if defined(CONFIG_PPC_64K_PAGES)
>> +#if defined(CONFIG_SPARSEMEM_VMEMMAP) && defined(CONFIG_SPARSEMEM_EXTREME)
>
> This prevents accessing physical memory over 16TB with 4k pages and radix MMU as
> well. Was this intentional?

No, it was meant to be a temporary fix until the rest of Aneesh's series
fixed things up properly, but then there were problems with those
patches so he asked me to just pick up this one.

At the moment 4K hash won't boot at all if you have too much RAM on P9,
so this was meant to at least avoid that.

But breaking 4K radix is arguably worse, so I'll drop this for now.

cheers

      reply	other threads:[~2019-10-09  5:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-17 14:57 [PATCH 1/3] powerpc/book3s64/hash/4k: 4k supports only 16TB linear mapping Aneesh Kumar K.V
2019-09-17 14:57 ` [PATCH 2/3] powerpc/64/mm: implement page mapping percpu first chunk allocator Aneesh Kumar K.V
2019-09-17 14:57 ` [PATCH 3/3] powerpc/book3s64/hash/4K: Update the kernel mapping with 4K page size config Aneesh Kumar K.V
2019-10-03 23:05 ` [PATCH 1/3] powerpc/book3s64/hash/4k: 4k supports only 16TB linear mapping Michael Ellerman
2019-10-05 20:15 ` Samuel Holland
2019-10-09  5:56   ` Michael Ellerman [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=87mueampgb.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=cam@neo-zeon.de \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=samuel@sholland.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.