Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4075938yba; Tue, 7 May 2019 11:41:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyV+hQfoFc4Rxx7hJ4LAHZ8aEzhA4rD83M2ApNwrUPt77vriGNZ3YwAaHGauwAIle6LYOto X-Received: by 2002:a17:902:e612:: with SMTP id cm18mr18590545plb.255.1557254486349; Tue, 07 May 2019 11:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557254486; cv=none; d=google.com; s=arc-20160816; b=NqMei2v7LkQQMM+GVpuqwHSYKYeXpx0AheLu5/NLkVSih7iNIDblouzOrdG/MSu1L1 XYnGi0NVQ89cvxcMkbSFfXljXcl3ASXcWHx4e73moZgCe7nBW6avXkeuVdwKQCv7BWgh EqxTAqvnBou75qFk9qx6e3zNVIhQCMjPWHuC5+yZcuGgM90NCQr91vAw1j1MummLnN6F tS8UvTOOm6PVS64oNldlpNvMBmy7w3ZlUrOioN3EH8YndtfMH/VX0YIYimLaDbgM5tmO 5GE1boi2Cex/e2FVC+9G9gsrOhkU2jIToTcI5WEbsGCBjATOeh9BC+j7VDN5XtuB/xJj 2GTQ== 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=1AHud2ZD6tXhbo4XTIHImH/7A+j/bT1tgyCj7c12ovw=; b=FTZ43F+jGQdIbO9Zj+cnZ1vCbkze2LWQAbzXwdm4rPC8nRkLvnSuAn1VVZT+R005z4 R3IhL5QHtDqAPhCOgIbaBG4pkaQB/6ooPMUqqWzroy6XG4AusqzYZSoKOXD4ea/my/hx FtpWCV99euK7lKDDBLMJUj6w27OXn36h30gbd7wCTGk7haE6NjIP2v0drPoNeklSEPIp lZZnvkDtNClTEvalqy3R9uOKo3E2RUHAilriOhRFwH1kIOSB3uG2HqwkeefszVGs0itT OA1e16IiWSYpPi/di8qYJ5x18xXDVyHZDltfFdRrOPDgW6Ms90lNmrYnKy0XcggccimD JeXg== 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 l4si21189128plb.305.2019.05.07.11.41.10; Tue, 07 May 2019 11:41:26 -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 S1727556AbfEGSis (ORCPT + 99 others); Tue, 7 May 2019 14:38:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47080 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbfEGSir (ORCPT ); Tue, 7 May 2019 14:38:47 -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 6315F3082E72; Tue, 7 May 2019 18:38:47 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-95.ams2.redhat.com [10.36.116.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id 172023DA5; Tue, 7 May 2019 18:38:41 +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, akpm@linux-foundation.org, Dan Williams , David Hildenbrand , Michal Hocko , Oscar Salvador , Pavel Tatashin , Wei Yang , Joonsoo Kim , Qian Cai , Arun KS , Mathieu Malaterre Subject: [PATCH v2 5/8] mm/memory_hotplug: Drop MHP_MEMBLOCK_API Date: Tue, 7 May 2019 20:38:01 +0200 Message-Id: <20190507183804.5512-6-david@redhat.com> In-Reply-To: <20190507183804.5512-1-david@redhat.com> References: <20190507183804.5512-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.46]); Tue, 07 May 2019 18:38:47 +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 e1637c8a0723..107f72952347 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -250,7 +250,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; @@ -293,8 +293,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 @@ -1066,9 +1065,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