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.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS 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 3E49CC35246 for ; Tue, 28 Jan 2020 09:51:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E7A43214D8 for ; Tue, 28 Jan 2020 09:51:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NkQzizFW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7A43214D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9856F6B027B; Tue, 28 Jan 2020 04:51:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 95CA56B027C; Tue, 28 Jan 2020 04:51:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89A886B027D; Tue, 28 Jan 2020 04:51:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id 75FFA6B027B for ; Tue, 28 Jan 2020 04:51:45 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 32D726D91 for ; Tue, 28 Jan 2020 09:51:45 +0000 (UTC) X-FDA: 76426576170.03.cough41_f41bf9d8fe09 X-HE-Tag: cough41_f41bf9d8fe09 X-Filterd-Recvd-Size: 4553 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jan 2020 09:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580205104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Y37LtuBkW3Lzzd1FvM9mCBkJ82AVH3Rl8iL/YAjrZc=; b=NkQzizFWyyxyiulQ06HyCr8+d/Ns8jRsgL69V1k5APWxfOtXafBZ7G7avZ6R8+Af+WDCwm w4Ox7S52gJRphoo3nOgwzX65IYF0reVuCTF/+c2D716tOMoLxCP+wcFsSqJ91qfuWW/6pz EieohyfZA4bb1KIExO+ZBCdqbYVVxmQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-Tn1YY0_fMaCcAsPQ_0O8rA-1; Tue, 28 Jan 2020 04:51:39 -0500 X-MC-Unique: Tn1YY0_fMaCcAsPQ_0O8rA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4579F19057D8; Tue, 28 Jan 2020 09:51:38 +0000 (UTC) Received: from t480s.redhat.com (ovpn-116-207.ams2.redhat.com [10.36.116.207]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14A9660BE0; Tue, 28 Jan 2020 09:51:35 +0000 (UTC) From: David Hildenbrand To: stable@vger.kernel.org Cc: linux-mm@kvack.org, Michal Hocko , Greg Kroah-Hartman , Andrew Morton , "Aneesh Kumar K . V" , Baoquan He , Dan Williams , Oscar Salvador , Wei Yang , David Hildenbrand Subject: [PATCH for 4.19-stable v3 20/24] mm/hotplug: kill is_dev_zone() usage in __remove_pages() Date: Tue, 28 Jan 2020 10:50:17 +0100 Message-Id: <20200128095021.8076-21-david@redhat.com> In-Reply-To: <20200128095021.8076-1-david@redhat.com> References: <20200128095021.8076-1-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Content-Transfer-Encoding: quoted-printable 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: 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.st= git@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=C3=A9r=C3=B4me 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 --- 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 74cfa2fbe88e..888fcbdf97cf 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -507,11 +507,8 @@ void __remove_pages(struct zone *zone, unsigned long= phys_start_pfn, unsigned long map_offset =3D 0; int sections_to_remove; =20 - /* In the ZONE_DEVICE case device driver owns the memory region */ - if (is_dev_zone(zone)) { - if (altmap) - map_offset =3D vmem_altmap_offset(altmap); - } + if (altmap) + map_offset =3D vmem_altmap_offset(altmap); =20 clear_zone_contiguous(zone); =20 --=20 2.24.1