Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3261153pxb; Tue, 19 Jan 2021 19:08:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJzNSNR8o+44eq/D+ClADS99T07nvGQjabG0nLBYagGjQbUR681tBdLvfG5Try0ZcISPrpy4 X-Received: by 2002:a17:906:eb95:: with SMTP id mh21mr4992287ejb.175.1611112100059; Tue, 19 Jan 2021 19:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611112100; cv=none; d=google.com; s=arc-20160816; b=sc2hyFTGROKUCz1heBHoHH8G5IaIuyIPvEhccEDWh+FlhRAGe9HXfA/K818j2gTPQY 7b/1ZNMdC191aOERmqRdyJ5n4oPCzbiVi/7x4vt2wTNm9YzwdmmVYD5jGgUYNUm2lwMa T15F6UtK9fb7AP89j3UoAtjMCth2rZRJvJHOHqYNGZTAyllwCozIWGTbmscjAp2FV7zo JG//fAyTTqJbADZ+otYamwi0fwiUGyuGxdijFc12otk1z4YKs0Wc8CPzZpjK99zU9TfP xYXQHqEwDToGJsvS5F1ip4zZZ9zFOacQzGBgf8yC5H9zgu+FCnHFEuG1vgTdwhDuPWEF uTIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=cW9dntD9nGh8jVvLhLWe1YqLbc1l7R2XancWLaWAZn0=; b=XjUzIwZAH8Tv6xEkDrmHZ8Q+j7yPwYcqif27RvyMkf95wY383D1k9dwVCxOAVhnYE7 nfiripD/UTnBexbtycPkH0x4zSikBsM0DSesQ7ul7UiSiu+c53i1IZ9+idQNTgdAFfxg dGYrX32t+smnLQMqhlAiNg4Y6Hs7mkoH+j7JukZwyjIIlgjc0YX2Vd7uJRamERaZBpbw Se88NFv8aUUv8NaF0gib00zLCipzd+uCZShg6WDcHmyUU4L0bPBz+0rKBVmtNxr1kOa3 3J4kduqZ4G4olLp+76VAdP0RhX00WHEnNlQL7RJ1VMgjoXUTmdoR1anhqbS8QPVVbGMa Ic3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b="dgyGnH/9"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n23si293611edq.549.2021.01.19.19.07.47; Tue, 19 Jan 2021 19:08:20 -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=@infradead.org header.s=merlin.20170209 header.b="dgyGnH/9"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389747AbhATDGX (ORCPT + 99 others); Tue, 19 Jan 2021 22:06:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730075AbhATDFv (ORCPT ); Tue, 19 Jan 2021 22:05:51 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B519C061575; Tue, 19 Jan 2021 19:05:11 -0800 (PST) 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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