Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77799C47404 for ; Wed, 9 Oct 2019 05:58:40 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 063D320B7C for ; Wed, 9 Oct 2019 05:58:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="Kk+qwwT/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 063D320B7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46p3Rw3qrPzDqMr for ; Wed, 9 Oct 2019 16:58:36 +1100 (AEDT) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46p3Q04M9yzDqJS for ; Wed, 9 Oct 2019 16:56:56 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.b="Kk+qwwT/"; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46p3Pz3pxxz9sPF; Wed, 9 Oct 2019 16:56:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1570600616; bh=ZfBf2MHcr0p97T1RCjzcJri4N8wX88l6VNo2jy3WEnU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Kk+qwwT/LQunmIG6IvS8IwQ9GCQiM/ANZxGcqhphK0zZW8uZNF6C/6k5PUY/oNH1Y hdYdDyQoPGjVgHkMG7kYcnygIZs1x/0THJT8e6egnaLiBktmGw6Ty6PVnwXql/Qron xLKDJ6RkPvBRxPomc6y+/Fxt3WiKYzbIgt29F+Up2/Pr1EXSYgTJQF5WaF9j0CG7t3 oRHcLJYLAMR5mcGKHsDBl+S5GvZvfSOnhHsI8GOuE14zm/G8ge5s1gfGDCsB/SQUWy ggAyGv7G40mFDv1knSzEO51nhVVojGA59T4lZa+OHktPn1Ntswy4RA/ykebxZc7bCS QIvrdvm6NyiGw== From: Michael Ellerman To: Samuel Holland , "Aneesh Kumar K.V" Subject: Re: [PATCH 1/3] powerpc/book3s64/hash/4k: 4k supports only 16TB linear mapping In-Reply-To: <7dc4aacd-ebe1-07d6-1869-e404c3c22d2e@sholland.org> References: <20190917145702.9214-1-aneesh.kumar@linux.ibm.com> <7dc4aacd-ebe1-07d6-1869-e404c3c22d2e@sholland.org> Date: Wed, 09 Oct 2019 16:56:52 +1100 Message-ID: <87mueampgb.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cameron Berkenpas , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Samuel Holland 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 >> Signed-off-by: Aneesh Kumar K.V >> --- >> 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