Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D04B5C433EF for ; Mon, 29 Nov 2021 22:13:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233271AbhK2WRN (ORCPT ); Mon, 29 Nov 2021 17:17:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231407AbhK2WQr (ORCPT ); Mon, 29 Nov 2021 17:16:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A07C127126; Mon, 29 Nov 2021 10:22:10 -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 ams.source.kernel.org (Postfix) with ESMTPS id B0E9CB815D5; Mon, 29 Nov 2021 18:22:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3B98C53FAD; Mon, 29 Nov 2021 18:22:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1638210128; bh=zqGGUiA2RueHIM7XpDtu5QoJvpt7mQxSeBHbCMJQjnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WVWWLdtmEKhpEUSCIg4mRCZdFNQY7mWpzItK5AgIFT1/3G16XurTO8H6lrmfYBclz kbWYiEgPp8NvCXmnUa6CqBJjdFiuIR3lLjD9skGt9WPMKwWg+Syb3JgURM3Z4MdakC V4wqK7/sXKe4yotlVTKScznmzLIv31ps1++b90zc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huang Pei , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 4.19 52/69] MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48 Date: Mon, 29 Nov 2021 19:18:34 +0100 Message-Id: <20211129181705.348252154@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211129181703.670197996@linuxfoundation.org> References: <20211129181703.670197996@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: Huang Pei [ Upstream commit 41ce097f714401e6ad8f3f5eb30d7f91b0b5e495 ] It hangup when booting Loongson 3A1000 with BOTH CONFIG_PAGE_SIZE_64KB and CONFIG_MIPS_VA_BITS_48, that it turn out to use 2-level pgtable instead of 3-level. 64KB page size with 2-level pgtable only cover 42 bits VA, use 3-level pgtable to cover all 48 bits VA(55 bits) Fixes: 1e321fa917fb ("MIPS64: Support of at least 48 bits of SEGBITS) Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e513528be3ad7..8a227a80f6bd5 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2991,7 +2991,7 @@ config HAVE_LATENCYTOP_SUPPORT config PGTABLE_LEVELS int default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48 - default 3 if 64BIT && !PAGE_SIZE_64KB + default 3 if 64BIT && (!PAGE_SIZE_64KB || MIPS_VA_BITS_48) default 2 config MIPS_AUTO_PFN_OFFSET -- 2.33.0