Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3988676pxb; Tue, 25 Jan 2022 00:48:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyajhRU11X9vHmoX08hoEefRMDVBHDuhhompcviVP/Ef/O6PudEjzdWyvkLa9k2Pa45dSfZ X-Received: by 2002:a65:5502:: with SMTP id f2mr14617442pgr.2.1643100512324; Tue, 25 Jan 2022 00:48:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643100512; cv=none; d=google.com; s=arc-20160816; b=uJA7SHzuYPXW+5ZJyX/wVRlT9Mbzbzo2yWCcXvY9gSpJHp9isN+zqLOj3iWvqXuqab 4VLFS2rnJit4wuRnNxiUGd/Sn8LYdsHowb9WCXIPEhhHmHKfeU5AzGfpan0xEDs6gTXv eNQXSQYYqi6faHAKa2xk8g9ypOCJBKIGW53MrtkyYi8Iodj5DTpssS3GUXCz33NmKSGC PHFZWF4pitW3+CF0fKCtNcxIIUPPfp+lMkYCS+HFPucPAs1PiM8ypGBc/nxeQScK1cgJ qwaExparsdcdNb5VXB+Iqfr6QcJs+gFh/Ck6szWIZ4oscAPFXmRUxb8zLPLkOkUiKRuK T+fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vD8Hwt7Z1rMPcElBM/G0yeORRSB3PQ29oC6XizvuO1k=; b=P04uBKyy4BGkIIbe7en6+4+s3Wz2d1y6uLGf/s4M3RP1bsr3Rqd/605NkikmJFFmGa YhbsNGsA5iPHUw7yp9kaKxXIG3HYXPF2a4gmGBI4ZXyxZVADhCMSmvG3LgJEE//pXnJw wVdZoEy97CncBkruypUvKDV+wORbwWPluBpYAe0H+DLv7DLorKmoOkxzL2xYm7PF3qm7 l1kAexj7ERlTtljLOpHIRaCsEDK4rM832bxQfRj23D8ho6ktnjhWb2lntt9rYGGyfkGs F/NG52V+rYztbZkkcxj/lvzs7j2EkKQBhoqi6Opgth+lj6VtFsuaQou0KF8tONiO5qU9 A81w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W5Z0DDUF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m5si13165396plt.311.2022.01.25.00.48.19; Tue, 25 Jan 2022 00:48:32 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=W5Z0DDUF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1320478AbiAYDNE (ORCPT + 99 others); Mon, 24 Jan 2022 22:13:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1316868AbiAYC6x (ORCPT ); Mon, 24 Jan 2022 21:58:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4F8C0E262F; Mon, 24 Jan 2022 12:44:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8C2E460916; Mon, 24 Jan 2022 20:44:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6510EC340E5; Mon, 24 Jan 2022 20:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057057; bh=MRETdH0R/JG+t6ZDfa9LEIzPGElTchgZ8fjTDMT/5lk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W5Z0DDUFtU6aYdCAQKYqfwaFy5aLDs+6vK3rjcl63ThHzlsCKM/6ujlcuqgD5YaJA 3XkRKHKCMJWijhD7GbXqDklo+TljQgU4ePDHD2vJ5JBjZAeH6Kxa3HGppMT//Eg9Qh c/Kl6cu3beEQ6WBFkrqmKsREpuYcUJf2CHrltIdo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman , Sasha Levin Subject: [PATCH 5.15 645/846] powerpc/40x: Map 32Mbytes of memory at startup Date: Mon, 24 Jan 2022 19:42:42 +0100 Message-Id: <20220124184123.271975059@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy [ Upstream commit 06e7cbc29e97b4713b4ea6def04ae8501a7d1a59 ] 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. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/89b5f974a7fa5011206682cd092e2c905530ff46.1632755552.git.christophe.leroy@csgroup.eu Signed-off-by: Sasha Levin --- arch/powerpc/kernel/head_40x.S | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index 7d72ee5ab387c..e783860bea838 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -650,7 +651,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 +688,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@h + addis r3,r3,SZ_16M@h + 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.34.1