From: Michael Ellerman <mpe@ellerman.id.au>
To: Christoph Hellwig <hch@infradead.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] powerpc/mm/book3s64/hash: Update 4k PAGE_SIZE kernel mapping
Date: Wed, 16 Oct 2019 20:30:15 +1100 [thread overview]
Message-ID: <87ftjtt4uw.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20191016060556.GA7279@infradead.org>
Christoph Hellwig <hch@infradead.org> writes:
> On Wed, Oct 16, 2019 at 11:21:30AM +0530, Aneesh Kumar K.V wrote:
>> With commit: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel
>> regions in the same 0xc range"), kernel now split the 64TB address range
>> into 4 contexts each of 16TB. That implies we can do only 16TB linear
>> mapping. This results in boot failure on some P9 systems.
>>
>> Fix this by redoing the hash 4k mapping as below.
>>
>> vmalloc start = 0xd000000000000000
>> IO start = 0xd000380000000000
>> vmemmap start = 0xf000000000000000
>>
>> Vmalloc area is now 56TB in size and IO remap 8TB.
>
> Btw, is there any good reason to keep the vmalloc and ioremap ranges
> separate on powerpc? Most architectures just use the low-level vmap
> code to implement both and share a range.
I think the main reason is that in some configurations we can't use 64K
pages for MMIO, so the 64K vmalloc mappings and 4K MMIO mappings need to
be in different segments.
It's possible that's no longer true on modern configs. But annoyingly I
can't easily tell because the kernel doesn't know, it defers to firmware
telling it via the "ibm,pa-features" property and setting
MMU_FTR_CI_LARGE_PAGE.
The spec (PAPR) doesn't give us any hints either it just says the bit in
the device tree means:
The value of 1 indicates support for I=1 (cache inhibited) large
pages; else not supported.
Which at least suggests that firmware is allowed to support 64K MMIO
mappings or not at its whim.
Hopefully Ben or Paul remember more details than me.
cheers
next prev parent reply other threads:[~2019-10-16 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 5:51 [PATCH] powerpc/mm/book3s64/hash: Update 4k PAGE_SIZE kernel mapping Aneesh Kumar K.V
2019-10-16 6:05 ` Christoph Hellwig
2019-10-16 8:45 ` Aneesh Kumar K.V
2019-10-16 9:30 ` Michael Ellerman [this message]
2019-10-17 2:18 ` Benjamin Herrenschmidt
2019-10-16 16:21 ` Cameron Berkenpas
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=87ftjtt4uw.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=aneesh.kumar@linux.ibm.com \
--cc=cam@neo-zeon.de \
--cc=hch@infradead.org \
--cc=linuxppc-dev@lists.ozlabs.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.