From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0FF72C433F5 for ; Wed, 6 Apr 2022 15:01:45 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KYSQb35QQz3c8W for ; Thu, 7 Apr 2022 01:01:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=Z8txxhEv; dkim-atps=neutral Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KYSLl4LxPz2ygC for ; Thu, 7 Apr 2022 00:58:23 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=Z8txxhEv; 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 4KYSLj2hp0z4xXv; Thu, 7 Apr 2022 00:58:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1649257101; bh=l1F6SOvDeL3rrYvrYSjuzbBG5ScJxZ4IB5Bv/jtGkPs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z8txxhEvMonV5FcCsY8IXKPUN0yITma4bFyvmr3F4tY5pJUAl8rgXT+T+k/WJ/+ru 7xWmEz0Nh3YZ8tmrK74ua6VQmkIPEdQF3Qon/CYZdVFdbkwoayPbDYSddHLdXKlfmG 8vf4ZZtWVS6NYSyGgnrxsq0cH5g5cTskkiJIXLoDY9nqrEb96Y+AvwvMzZt+HBUvyP wI6mwjQnm41EuBMKK4vDnmVtfgmZlGs2QVgROg/awbGdoVRQYLbF4UipOtyGoU+Fh9 EbYA+ei+0VgM3ouPRfBa/X3h9o85ZdZV/D4LXsGUN+qvpF9hq6xskrxI9IUcFs4TJA AuBfMaiRVu7sg== From: Michael Ellerman To: Subject: [PATCH 2/6] Revert "powerpc: Set max_mapnr correctly" Date: Thu, 7 Apr 2022 00:57:58 +1000 Message-Id: <20220406145802.538416-2-mpe@ellerman.id.au> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220406145802.538416-1-mpe@ellerman.id.au> References: <20220406145802.538416-1-mpe@ellerman.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: erhard_f@mailbox.org, wangkefeng.wang@huawei.com, npiggin@gmail.com Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Kefeng Wang This reverts commit 602946ec2f90d5bd965857753880db29d2d9a1e9. If CONFIG_HIGHMEM is enabled, no highmem will be added with max_mapnr set to max_low_pfn, see mem_init(): for (pfn = highmem_mapnr; pfn < max_mapnr; ++pfn) { ... free_highmem_page(); } Now that virt_addr_valid() has been fixed in the previous commit, we can revert the change to max_mapnr. Fixes: 602946ec2f90 ("powerpc: Set max_mapnr correctly") Signed-off-by: Kefeng Wang Reviewed-by: Christophe Leroy Reported-by: Erhard F. [mpe: Update change log to reflect series reordering] Signed-off-by: Michael Ellerman --- arch/powerpc/mm/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 8e301cd8925b..4d221d033804 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c @@ -255,7 +255,7 @@ void __init mem_init(void) #endif high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); - set_max_mapnr(max_low_pfn); + set_max_mapnr(max_pfn); kasan_late_init(); -- 2.34.1