Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7309398ybi; Wed, 5 Jun 2019 15:14:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwm8ka/gNRdDuIli2u9BUxtZujAqBCnsAa37QHw+xYQBYJwf03+uCbTvEtJqj4rxEoGhtFg X-Received: by 2002:a62:bd11:: with SMTP id a17mr41892097pff.126.1559772864164; Wed, 05 Jun 2019 15:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559772864; cv=none; d=google.com; s=arc-20160816; b=j7h673k55OP+sNWtgpfUWsIsaENG9mvY3GULYXbNGD5EZULXDm2aPklNNUSASP8ucN ixXrMxbKD1wrOSTX6hNefu9RkkWWetIEIrYk8nggAgPVOZnt5yrtxrlSOHMD2yhTkTQY RBC7neCO52hLWf0+Y+fLLBXU5ddtzTHZrsyWMQtrVSaM+ZCYLQ1GrczR+77YR/ruR0iG p/pIj1H/64T9Voglc2gNUQ0DCu2jT2bf1+lNY56Q5PyC2vnnOtlLopQqpPuCFDtlxoyv FlLeJGwwvEXrI1YE2F2Z4V8XsphmIQfO/mKUqLJ/PCCWYtbf/Gq59oo5RQq0rVwa2r8f ksXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject; bh=LEsj0JvF5oyzUNmNgQWz6pMzr+Cf/rYYP2iyFKbjxv8=; b=WDpuKFSWLHMY+CfyPxnpXDN6OW6r4U2xDNQ/d7Gfq2NEq6uouDaX+5cDEUhdaBa8L5 OQCkmL6bQX5b2+4YsUmCGc6we0yW9Wve2lnPelxFm7ZSvEKA0DLENSe/gNTW01szWMFe A6wiDXS7EVKCbVsJWmnpr7m3NyKI/xnju9/HzK+Uyjw36deTd/6Kp0pRZ1/8pFT4omzf RHEaJN8y3KvvBk8R3/3uPV6qqDKb1oxnmS1t3lCMBQhGiImlOl80+oedl/LzkhhMG02i wtuA/BhlvpTMeymRjxLedC2K2dKZwf5AZvUN0hiGG5q1MpOG2d9sET4OM6FlJXjfw1J5 uv/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j66si2343147plb.375.2019.06.05.15.14.08; Wed, 05 Jun 2019 15:14:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726743AbfFEWMo (ORCPT + 99 others); Wed, 5 Jun 2019 18:12:44 -0400 Received: from mga14.intel.com ([192.55.52.115]:22266 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbfFEWMo (ORCPT ); Wed, 5 Jun 2019 18:12:44 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 15:12:44 -0700 X-ExtLoop1: 1 Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga004.jf.intel.com with ESMTP; 05 Jun 2019 15:12:44 -0700 Subject: [PATCH v9 05/12] mm/hotplug: Kill is_dev_zone() usage in __remove_pages() From: Dan Williams To: akpm@linux-foundation.org Cc: Michal Hocko , Logan Gunthorpe , Pavel Tatashin , David Hildenbrand , Oscar Salvador , linux-mm@kvack.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, osalvador@suse.de, mhocko@suse.com Date: Wed, 05 Jun 2019 14:58:27 -0700 Message-ID: <155977190749.2443951.1028412998584791672.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <155977186863.2443951.9036044808311959913.stgit@dwillia2-desk3.amr.corp.intel.com> References: <155977186863.2443951.9036044808311959913.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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". Cc: Michal Hocko Cc: Logan Gunthorpe Cc: Pavel Tatashin Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Signed-off-by: Dan Williams --- mm/memory_hotplug.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 647859a1d119..4b882c57781a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -535,11 +535,8 @@ void __remove_pages(struct zone *zone, unsigned long phys_start_pfn, 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);