Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3680035ybi; Mon, 27 May 2019 04:15:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNk5AWJ11xZw1CGFKaJr7AdbcgpPsydau5iG5WResFwHsDbaqQxWzZcRlJlV1uUCD869xU X-Received: by 2002:a17:90a:8a10:: with SMTP id w16mr30577635pjn.133.1558955733032; Mon, 27 May 2019 04:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558955733; cv=none; d=google.com; s=arc-20160816; b=kiHFslUdwTXGJ3HyyMoyZpPZiABOb1OGjnXq7U1CsRar4aov17MDorp2WohuwxleBv t7+M6KYeSTNSIV54M+NBLFbN5skCPaEu3anOVCHNUdDD8Eh2l+QTovNLxoVV0rTPpbVV Uj+DLxZPiboUo5SEbriuoVQG2jMt1Ae223tpwU0GcyyzBEXyaSluOEbm3g03IFOudTTe llYZdBRcej32uf5p1C6gM8MxdbG8eEf9E7Pbrg6Hq/UVn2inL1zofaHoMQbRi7qjQu1D 7yNfsZJaHQq1Lg7gWEkMXc514o5D+rxfY1izjQp1xlxlkrhkJjZBKyuKsH8lHLGBLU1N BgpA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=81dv9FTnNj/7LyZAowjAA1AFW7W3zsQkqaihczv2Mls=; b=y05RiRFRaNrbjGsT1sfPv9x78U5J36bGiOlm00ezLCyrGe+kxXcahCmc0+S3gR7Oie snJVwI5hkFdGr0qEy23FYRpwuDH5fFkAjsk7lRGyD/siejY3YnsJwfci0epcsj8+7HVS yIP3Ft6LjHHvmshMIWqyVzzL1CnqVIJb36LK1XWD8OizNeo0PkjKGw34SaRGOD/caqth 0Fmt972d2qxKEnGrlUOF1hUSGhbHgNSF7K48SvNo1Be+c/lfc4CS2IA9iG5F31tmBT/t zxmp/r9EYo2kldHGBXOBJklCBh+hPlHAS1D3wGlftTN3amcNQFTdGlOHuqycGT98+HsD 3/+A== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r88si17834225pjb.15.2019.05.27.04.15.16; Mon, 27 May 2019 04:15:33 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727036AbfE0LM4 (ORCPT + 99 others); Mon, 27 May 2019 07:12:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47470 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725996AbfE0LMz (ORCPT ); Mon, 27 May 2019 07:12:55 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19FE3307D855; Mon, 27 May 2019 11:12:55 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-89.ams2.redhat.com [10.36.117.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F3D72AA82; Mon, 27 May 2019 11:12:51 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, Dan Williams , Wei Yang , Igor Mammedov , David Hildenbrand , Michal Hocko , Oscar Salvador , Pavel Tatashin , Joonsoo Kim , Qian Cai , Arun KS , Mathieu Malaterre Subject: [PATCH v3 08/11] mm/memory_hotplug: Drop MHP_MEMBLOCK_API Date: Mon, 27 May 2019 13:11:49 +0200 Message-Id: <20190527111152.16324-9-david@redhat.com> In-Reply-To: <20190527111152.16324-1-david@redhat.com> References: <20190527111152.16324-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 27 May 2019 11:12:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No longer needed, the callers of arch_add_memory() can handle this manually. Cc: Andrew Morton Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Wei Yang Cc: Joonsoo Kim Cc: Qian Cai Cc: Arun KS Cc: Mathieu Malaterre Signed-off-by: David Hildenbrand --- include/linux/memory_hotplug.h | 8 -------- mm/memory_hotplug.c | 9 +++------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 2d4de313926d..2f1f87e13baa 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -128,14 +128,6 @@ extern void arch_remove_memory(int nid, u64 start, u64 size, extern void __remove_pages(struct zone *zone, unsigned long start_pfn, unsigned long nr_pages, struct vmem_altmap *altmap); -/* - * Do we want sysfs memblock files created. This will allow userspace to online - * and offline memory explicitly. Lack of this bit means that the caller has to - * call move_pfn_range_to_zone to finish the initialization. - */ - -#define MHP_MEMBLOCK_API (1<<0) - /* reasonably generic interface to expand the physical pages */ extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, struct mhp_restrictions *restrictions); diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index b1fde90bbf19..9a92549ef23b 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -251,7 +251,7 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat) #endif /* CONFIG_HAVE_BOOTMEM_INFO_NODE */ static int __meminit __add_section(int nid, unsigned long phys_start_pfn, - struct vmem_altmap *altmap, bool want_memblock) + struct vmem_altmap *altmap) { int ret; @@ -294,8 +294,7 @@ int __ref __add_pages(int nid, unsigned long phys_start_pfn, } for (i = start_sec; i <= end_sec; i++) { - err = __add_section(nid, section_nr_to_pfn(i), altmap, - restrictions->flags & MHP_MEMBLOCK_API); + err = __add_section(nid, section_nr_to_pfn(i), altmap); /* * EEXIST is finally dealt with by ioresource collision @@ -1067,9 +1066,7 @@ static int online_memory_block(struct memory_block *mem, void *arg) */ int __ref add_memory_resource(int nid, struct resource *res) { - struct mhp_restrictions restrictions = { - .flags = MHP_MEMBLOCK_API, - }; + struct mhp_restrictions restrictions = {}; u64 start, size; bool new_node = false; int ret; -- 2.20.1