From patchwork Wed Jan 20 03:04:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12031303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE734C433DB for ; Wed, 20 Jan 2021 03:05:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ABB2D2310D for ; Wed, 20 Jan 2021 03:05:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABB2D2310D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 892BF6B0005; Tue, 19 Jan 2021 22:05:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 843C06B0006; Tue, 19 Jan 2021 22:05:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 759AB6B0007; Tue, 19 Jan 2021 22:05:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 638B56B0005 for ; Tue, 19 Jan 2021 22:05:16 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2AB5C1EE6 for ; Wed, 20 Jan 2021 03:05:16 +0000 (UTC) X-FDA: 77724662232.18.shoe76_3613f8727557 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 055A0100ED0C7 for ; Wed, 20 Jan 2021 03:05:15 +0000 (UTC) X-HE-Tag: shoe76_3613f8727557 X-Filterd-Recvd-Size: 3115 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Wed, 20 Jan 2021 03:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=cW9dntD9nGh8jVvLhLWe1YqLbc1l7R2XancWLaWAZn0=; b=dgyGnH/9OA6cRq6lOqC17NWXBn gsp7Y/bP2Mx6Mn6cLhVLZKkA3Ag4+5tx3c8Xj5IvsYuBrpU3H6G+VpTi/+KjbDjF2lYqYRjlbDPVF 1lD8TU9+2869FaBaX5vemMdnDMY+YQ5lBKSEV7OJgkuN/XtXLeQuoHFBoAM+gtEaCXgwnAE9wQFa8 hUUi5BWLiS4bzljjOGy0dcFYLwBj2sHdQfuND27PUEUfsMd/yCjjYmvDdcjRn43bQMSNccI23+XRQ keHOdcCVx4Y5eiO/QqVj4UMPt9eFHQZxRHyF78k31EThdlA31a8lgXgw60M6KIQnKIXApSSZD4R2r suBkbohA==; Received: from [2601:1c0:6280:3f0::9abc] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l23nm-0004q5-Ox; Wed, 20 Jan 2021 03:04:59 +0000 Subject: [PATCH -mmotm] mm/memory_hotplug: fix for CONFIG_ZONE_DEVICE not enabled To: akpm@linux-foundation.org, broonie@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-next@vger.kernel.org, mhocko@suse.cz, mm-commits@vger.kernel.org, sfr@canb.auug.org.au, Dan Williams References: <20210119213727.pkiuSGW9i%akpm@linux-foundation.org> From: Randy Dunlap Message-ID: <5f8e2ede-5836-45e1-d8d7-ae949775e76e@infradead.org> Date: Tue, 19 Jan 2021 19:04:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210119213727.pkiuSGW9i%akpm@linux-foundation.org> Content-Language: en-US X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Randy Dunlap Fix memory_hotplug.c when CONFIG_ZONE_DEVICE is not enabled. Fixes this build error: ../mm/memory_hotplug.c: In function ‘move_pfn_range_to_zone’: ../mm/memory_hotplug.c:772:24: error: ‘ZONE_DEVICE’ undeclared (first use in this function); did you mean ‘ZONE_MOVABLE’? if (zone_idx(zone) == ZONE_DEVICE) { Signed-off-by: Randy Dunlap Cc: Andrew Morton Cc: Dan Williams --- mm/memory_hotplug.c | 2 ++ 1 file changed, 2 insertions(+) --- mmotm-2021-0119-1336.orig/mm/memory_hotplug.c +++ mmotm-2021-0119-1336/mm/memory_hotplug.c @@ -769,12 +769,14 @@ void __ref move_pfn_range_to_zone(struct * ZONE_DEVICE pages in an otherwise ZONE_{NORMAL,MOVABLE} * section. */ +#ifdef CONFIG_ZONE_DEVICE if (zone_idx(zone) == ZONE_DEVICE) { if (!IS_ALIGNED(start_pfn, PAGES_PER_SECTION)) section_taint_zone_device(start_pfn); if (!IS_ALIGNED(start_pfn + nr_pages, PAGES_PER_SECTION)) section_taint_zone_device(start_pfn + nr_pages); } +#endif /* * TODO now we have a visible range of pages which are not associated