Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4425523pxb; Mon, 27 Sep 2021 17:20:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZWj3NVsV+UG4+zkxr/BTQAErCS7DT4rfdWx4geYDkiAnZ5lxQJ/bKIhv8TNPrjX65H4fx X-Received: by 2002:a62:1409:0:b0:447:a1bf:9f44 with SMTP id 9-20020a621409000000b00447a1bf9f44mr2382670pfu.76.1632788427503; Mon, 27 Sep 2021 17:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632788427; cv=none; d=google.com; s=arc-20160816; b=masvLEWCn5RonLeTtqhXJ9VuJjs9H5K68CmVuiJA3H8+Zlu7kr/xInI3emdN6mV3oC 7pCF3RkfOOE1GH1q2zyibPXpbV0o6AwQpasFg/36hbS97UAmWzybzgD+u8l06dw3pQ6J RbDZXgFyTLmLTPIw0ZJh6XFeeZN97rWKr+jNJWnq5RvpTOTf7Ce+ct9nz/ncJsW4LADn 2/LAP84oJi92SRqTOi9Bhy/AIVtTFs27Ie/uLFmr5k5Ofrew2slHBR6mdSnUTnW0hE9c HytyNAAg+3ho4FpJ0CarKcm/LVAoWMqPoQkOTCmV2Pw2P5kmm6+aHLk1u0sWXVelV8IP hgJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=mIwKTL/6vQf6UwYRTbvOgxIEqEcbaxe7nzUDzD7ufKk=; b=yrJEw1mKKpe4YwGKW7RWfD05XSmp7lVhPLJGIHoUCbfxmwI2gyi7O/nUEWiQ+7GG6o ybMKpFeHwzfth3CGa5CXlv9VKKCfOywSdl0ohIGJXhRB0HAfgJ923jQHCTUscKO8LDiK BMlJKuy9m8umzdMO491EWlB8/rj8OKeVSMUxz3ZXkuxgSMUWA8yv5NNa9cgApBBbpnSf PEHUbAh98AUIaKdq81IDNcujfIS3625zTshVWDJCexo1QaAT+amYuw/I7357kGtvpAhu x9t1eYdt2HI6JRH61e9sBhWZTwpMowHIHH6S7Hxs4ARhei8wPIMn+SyLG+mkqYtucKaU b8yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=WY0WSjfK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si15634223plz.341.2021.09.27.17.20.14; Mon, 27 Sep 2021 17:20:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=WY0WSjfK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238285AbhI1AVI (ORCPT + 99 others); Mon, 27 Sep 2021 20:21:08 -0400 Received: from gandalf.ozlabs.org ([150.107.74.76]:33799 "EHLO gandalf.ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236941AbhI1AVI (ORCPT ); Mon, 27 Sep 2021 20:21:08 -0400 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 4HJKrJ5M3zz4xLs; Tue, 28 Sep 2021 10:19:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1632788368; bh=mIwKTL/6vQf6UwYRTbvOgxIEqEcbaxe7nzUDzD7ufKk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WY0WSjfKEYV81l5c4MWdMF3j3Y/k5/zK/IffwOYcBARS5Iupu3Connde/bNmIDjee MTscRq5RVYLAcr/uJOiXlIp5qEsHZSHFqpeNoy1cF5oO1kN38XiCMbvMLOxEaDT4oZ kPH8eGG38SPEZ8l8fLYVT7d4UcWTtvYVOJv1pXtUa/FEOQrSEP+NSDpo2JsoVkz9fm TyVoxuMM5nwXiFJnr7yOW2JGsNgGvrFbTtQVnxGyQ2hLTdb+y4EMLmGe2n78StUyB2 gp91MY21/yF1KPXSFDUoPj4q5lVPlkkiqOzTZqPm/lepPlkkEvL9ts+9H9R6fhcDBX B6ILLbR+5x6kg== From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, cp Subject: Re: [PATCH] powerpc/40x: Map 32Mbytes of memory at startup In-Reply-To: References: Date: Tue, 28 Sep 2021 10:19:28 +1000 Message-ID: <87mtnx1rhr.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > As reported by Carlo, 16Mbytes is not enough with modern kernels > that tend to be a bit big, so map another 16M page at boot. I guess we're not expecting systems with less than 32MB, so making it unconditional is OK? cheers > diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S > index 7d72ee5ab387..5fce4680d2d3 100644 > --- a/arch/powerpc/kernel/head_40x.S > +++ b/arch/powerpc/kernel/head_40x.S > @@ -650,7 +650,7 @@ start_here: > b . /* prevent prefetch past rfi */ > > /* Set up the initial MMU state so we can do the first level of > - * kernel initialization. This maps the first 16 MBytes of memory 1:1 > + * kernel initialization. This maps the first 32 MBytes of memory 1:1 > * virtual to physical and more importantly sets the cache mode. > */ > initial_mmu: > @@ -687,6 +687,12 @@ initial_mmu: > tlbwe r4,r0,TLB_DATA /* Load the data portion of the entry */ > tlbwe r3,r0,TLB_TAG /* Load the tag portion of the entry */ > > + li r0,62 /* TLB slot 62 */ > + addis r4,r4,SZ_16M > + addis r3,r3,SZ_16M > + tlbwe r4,r0,TLB_DATA /* Load the data portion of the entry */ > + tlbwe r3,r0,TLB_TAG /* Load the tag portion of the entry */ > + > isync > > /* Establish the exception vector base > -- > 2.31.1