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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 9E82EC33CB2 for ; Tue, 28 Jan 2020 14:30:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7338024699 for ; Tue, 28 Jan 2020 14:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221813; bh=87zU2HfPJQxSVVJUShfv5Co+lwd3sWco4/BSmjl7nUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=oxpA4X571Egr6L5vv1jENzhSYK6XAX3m1/yqVTdfWxW1ulqGoi0u06XbPFM9SwpqR 4gNCjyE8q9dJPH5MSyJ00WKW7zzs6gkM4mWhjpInf0Zh47MjXvTxky0k1uCKUe4dXg EEyj9jK2AsRq91PeFUaoU7tmcfy399xk+1p3nlqY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733094AbgA1OaG (ORCPT ); Tue, 28 Jan 2020 09:30:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:59544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729368AbgA1OaG (ORCPT ); Tue, 28 Jan 2020 09:30:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 35E8D24692; Tue, 28 Jan 2020 14:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580221804; bh=87zU2HfPJQxSVVJUShfv5Co+lwd3sWco4/BSmjl7nUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jKSyT+SmbUbCl2TWLsIKbHQmPnte19ngMqW5Dx24KCHBQwfjJyQz5ltLj5UhKIAP4 YqaVLuox+ruEttYbUa9LGRBvtcIuPg90KA8YLYL7uonqdRFZ6JTeSzn/YmsYUL6cmF WrXi8e4yDCRJwnxNCtDTyxk2I554BZZiTcvjqxKM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Dan Williams , David Hildenbrand , Oscar Salvador , Michal Hocko , Logan Gunthorpe , Pavel Tatashin , Jane Chu , Jeff Moyer , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jonathan Corbet , Mike Rapoport , Toshi Kani , Vlastimil Babka , Wei Yang , Jason Gunthorpe , Christoph Hellwig , Andrew Morton , Linus Torvalds , "Aneesh Kumar K . V" Subject: [PATCH 4.19 88/92] mm/hotplug: kill is_dev_zone() usage in __remove_pages() Date: Tue, 28 Jan 2020 15:08:56 +0100 Message-Id: <20200128135820.770949060@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135809.344954797@linuxfoundation.org> References: <20200128135809.344954797@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Williams commit 96da4350000973ef9310a10d077d65bbc017f093 upstream. -- snip -- Minor conflict, keep the altmap check. -- snip -- The zone type check was a leftover from the cleanup that plumbed altmap through the memory hotplug path, i.e. commit da024512a1fa "mm: pass the vmem_altmap to arch_remove_memory and __remove_pages". Link: http://lkml.kernel.org/r/156092352642.979959.6664333788149363039.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Tested-by: Aneesh Kumar K.V [ppc64] Cc: Michal Hocko Cc: Logan Gunthorpe Cc: Pavel Tatashin Cc: Jane Chu Cc: Jeff Moyer Cc: Jérôme Glisse Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Toshi Kani Cc: Vlastimil Babka Cc: Wei Yang Cc: Jason Gunthorpe Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: David Hildenbrand Signed-off-by: Greg Kroah-Hartman --- mm/memory_hotplug.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -507,11 +507,8 @@ void __remove_pages(struct zone *zone, u unsigned long map_offset = 0; int sections_to_remove; - /* In the ZONE_DEVICE case device driver owns the memory region */ - if (is_dev_zone(zone)) { - if (altmap) - map_offset = vmem_altmap_offset(altmap); - } + if (altmap) + map_offset = vmem_altmap_offset(altmap); clear_zone_contiguous(zone);