Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3287691imw; Mon, 11 Jul 2022 05:57:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uYYr6gK1+DSPW19GXvyte0wJPMAXz3iUBDj+4YMVHZIDJmdETWjOGoYabXR/J1lnhUDpXi X-Received: by 2002:a17:903:31c9:b0:16c:3024:69c4 with SMTP id v9-20020a17090331c900b0016c302469c4mr13851047ple.81.1657544231194; Mon, 11 Jul 2022 05:57:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657544231; cv=pass; d=google.com; s=arc-20160816; b=XtCGR6hw+Q6UE9hWaHLoGERfe7nfHbdr5TWQ8dvvxnxkn2zevByxRPD3Bm8G0eDig8 Xfyn7YIbU2a79J63gl1OpLjEb+diAHx2dYVhKKN5QLPHti5HceMEPAoZf0Hg9a+4DOcI FM+6E0Lr8GsgsTdDNnWQqdBGI4TUwBmgdLoqcetWjxC3Vb4IPPLbVzp1+kdPZgjavm83 haPkzv7O7b6ftrjWuIAx5Qa27SVfmrZ5f+ttlENwTUXb7xIJIiewSVopFzAIKEUeAf1q Yb88zUqWDoZrh+JaVtbyQt9Qavs1zdnNw70oWZU6kWYwNhYQ60tnmhGKMoqaHfvVO2KH 0fbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XcBY/Eq5IywNEBwnOGSytrIPNKZEd+GUxWkjesqgdhE=; b=Soxnd08Uj8a429mLMTTGYxlXjywFJzULO+FVNqZrC+xdiT58mzCJw9ZWldXC6pYZGL WfkFh764fTRpPn0VBIGiVsu3DCKDWYJ1Rwb+1zhM6YjzVMvE2MoX0c8DWrAdAMKytlmh ho5eZfUZVnDmTiXmhvGXt5fluEMhaff0Q13ehcgaAQQeOaJ2z71SKLrjVZTe75WMPtiq n2bzvyX33p82tm9mLqjhNt4AH6lTTNFuHpdhkuSGJxGifd3mCyhB8Ukb09Nf0ZXKdO2r SM/PaVBIsKfSYkmEfTadS39oqSTPneew9JwmBISJxod1Ng83cZTms5TwrKFo7p2Up2qC GukA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b="ZtcV/kLT"; arc=pass (i=1 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty dmarc=pass fromdomain=linux.beauty>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t192-20020a6378c9000000b004128c87df70si9972360pgc.608.2022.07.11.05.56.59; Mon, 11 Jul 2022 05:57:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.beauty header.s=zmail header.b="ZtcV/kLT"; arc=pass (i=1 spf=pass spfdomain=linux.beauty dkim=pass dkdomain=linux.beauty dmarc=pass fromdomain=linux.beauty>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231936AbiGKMn4 (ORCPT + 99 others); Mon, 11 Jul 2022 08:43:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbiGKMnr (ORCPT ); Mon, 11 Jul 2022 08:43:47 -0400 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8B7EDECB for ; Mon, 11 Jul 2022 05:43:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657542507; cv=none; d=zohomail.com; s=zohoarc; b=Wj44IkAqMXaiKU22l0jln19+dFZUF2tU1v6Ac7YOgtpb7vvnuFcD34l08N0YVG5nbJN2R/+aYu0sMawgJiFRjkG5NTyizEg5zz82r2G5Fuavr9rJ7dAIm9Gk1uicehNvkJsl5Iu3r4UvzamBKsmZDQXDKHfZpaLKatzU4OGALH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657542507; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=XcBY/Eq5IywNEBwnOGSytrIPNKZEd+GUxWkjesqgdhE=; b=BY4tqD/qFDF9rINfEZzxZKU+DaJNwKdHh1xD5Y+CVu4grzv+a9lvB9jhxgANvAy0p7xxK976w1KMBdDQhMhIIWYrqdY3GrmjDQfK4805g/qdEhPLEpuAkpWRFvkSC2ukCmVBB3pM0XMPR6G/X7TYFDG9NwL93CbGOiuxwQOVyGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=linux.beauty; spf=pass smtp.mailfrom=me@linux.beauty; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1657542507; s=zmail; d=linux.beauty; i=me@linux.beauty; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=XcBY/Eq5IywNEBwnOGSytrIPNKZEd+GUxWkjesqgdhE=; b=ZtcV/kLTYKL80lJw5yjgoMSBb4kqp2TEbTehtIGGwreBUCqr63ySryzpBf6w5IzY AIKjzm5yLsYgY1zXvcUsf1xJM1Op5zu0c1+cIxJnWup9K6mr8+cTEzpHJXeu4g73b2Y JWLicwjaA0FO8VmTqNcRBsP917DGU9KHhd+PIbmE= Received: from sh-lchen.ambarella.net (180.169.129.130 [180.169.129.130]) by mx.zohomail.com with SMTPS id 1657542504796249.49555353239066; Mon, 11 Jul 2022 05:28:24 -0700 (PDT) From: Li Chen To: Catalin Marinas , Will Deacon , Rob Herring , Frank Rowand , Andrew Morton Cc: Li Chen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 3/4] arm64: mm: move memblock_clear_nomap after __add_pages Date: Mon, 11 Jul 2022 20:24:53 +0800 Message-Id: <20220711122459.13773-4-me@linux.beauty> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711122459.13773-1-me@linux.beauty> References: <20220711122459.13773-1-me@linux.beauty> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Li Chen I'm trying to add struct page support to nomap reserved memory, and have skipped nomap bitmap_intersects check in fill_subsection_map, so just move memblock_clear_nomap after __add_pages. Signed-off-by: Li Chen Change-Id: I5e26fdc3f3e55b12f1acc1adb47fb262c4877ff3 --- arch/arm64/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 6680689242df..2e7f503837e4 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1537,10 +1537,10 @@ int arch_add_memory(int nid, u64 start, u64 size, size, params->pgprot, __pgd_pgtable_alloc, flags); - memblock_clear_nomap(start, size); ret = __add_pages(nid, start >> PAGE_SHIFT, size >> PAGE_SHIFT, params); + memblock_clear_nomap(start, size); if (ret) __remove_pgd_mapping(swapper_pg_dir, __phys_to_virt(start), size); -- 2.25.1