From patchwork Wed Apr 24 10:25:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10914471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68725922 for ; Wed, 24 Apr 2019 10:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5862428A6D for ; Wed, 24 Apr 2019 10:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C25828A70; Wed, 24 Apr 2019 10:26:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF6C828A6D for ; Wed, 24 Apr 2019 10:26:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A9DCA6B000E; Wed, 24 Apr 2019 06:26:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A4BD36B0010; Wed, 24 Apr 2019 06:26:02 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9681B6B0266; Wed, 24 Apr 2019 06:26:02 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by kanga.kvack.org (Postfix) with ESMTP id 72D286B000E for ; Wed, 24 Apr 2019 06:26:02 -0400 (EDT) Received: by mail-qt1-f197.google.com with SMTP id z34so17287910qtz.14 for ; Wed, 24 Apr 2019 03:26:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=1AHud2ZD6tXhbo4XTIHImH/7A+j/bT1tgyCj7c12ovw=; b=b7M2DWA8mZ6e25mvXbPRedANDWjQdOEfKt5J1dm5swsYy7HQseidVUBwgneA1x+tSn 5ox73Eox3bFgXZ92aBo3ysihGsW967Vlx5QDBnpJRVec93++ukrpETB8ZA4kdtvg8YBo JIH2fAj6+QheEH7bsJqkkJJZsn2b/QlJs78aDTRssyxrdzIsJ79E2gmNwvjTJX1Mrjo2 QBBU6NRGd+Td5y2YgxnOER7YyptqwKDhFeMO3UZ05VxSr8IHl83H+sdmob7bP6IUusOj hnXZTzFQIlBE6a8PtKVWr481Psyf0DK/7poQsrHGaXOjR0/KXhpP4pFKw+tkd+y3PelW vazw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: APjAAAWiGQBNJBURdrm/lLwFiMYU5h3TflUkkhbbWr1ktdfx4WMuyGPe uskvyisDPaeSKPt3B6bZS0yhyS0DNPgnvBDpWql0mfNWTKqi8J2x0lqMvoet20ffDZ1p5XLII08 R61IG1YMUwNBWF3naqnBArQ8OS0MtE2I/Z/ZCEV4w41DOzeItQuWLxtmcKM8PqYbJHQ== X-Received: by 2002:ae9:f00e:: with SMTP id l14mr24180692qkg.127.1556101562235; Wed, 24 Apr 2019 03:26:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwDOqvJqpBoUGUCEKgAIj9gvr9W+EXAm8uSmW1ebFfA/D2LWN2S6YofR/ubbkVzfUAw7tK X-Received: by 2002:ae9:f00e:: with SMTP id l14mr24180649qkg.127.1556101561615; Wed, 24 Apr 2019 03:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556101561; cv=none; d=google.com; s=arc-20160816; b=ZHhSAEEq0uBw9CV+mBPE+zwgQOAcTVSiRV43ATepFeJrhBHSnpALFsOyL3LCTIjOcJ LKwF4PTe9rHU29ld2cNlBManZxzmVsWQeqy4x/c1sotW+XBtgnvXT0uRYbBG6odnTxaP NgpKFN3bkN+BEskLK4c/Qp0z1yGjC7fMszzkXyWX2WdbfEBZRO9xJd4WZsh+bvyd5MeK IPWw42JihkRc4tYj+Yg+qsWI2QIErwQvnekl9CHyyznSUzzJyuUzcFYRBdbQCDqe2OAM cNP36pUuzOeDmG0f03OmXR7PrEvcU+tVhMfo5EtskLIs3xmTvBf+gsL9Vp9D5hZq+WvY 8bQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=1AHud2ZD6tXhbo4XTIHImH/7A+j/bT1tgyCj7c12ovw=; b=fb8msNhvZTMTZrdIQjp/twkhkwKUd74XEXHCdHScsoxik0UCcZi+TUvwIrhoocpzPF C3noyAZJ70s/7vxlicbeoweiYiiN+SftwGrHcxgaVyIca7TksHFTDGx7ISrA3796vUAf QDeQHmsW5ap7gfxfBWFNznVQiqYJkmBqVvTkvxvrJdvOOtDL5nY9pzAy99gJxV/UdGIK AwzjE2ZPhDHp8DGlH0pTZRbLrvQOe25pufGg/xmLNsB4UYjz6GcPnIlS3wuJWfC9V1ie Wm1c1qTFYpQlSXSPf/Uh/k5XwTmPCghgMtSHa2prqr7qIG78/ZlQpYwrEc7q3WO3PANW cDqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id o4si1207581qkb.139.2019.04.24.03.26.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 03:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B2E9F8AE76; Wed, 24 Apr 2019 10:26:00 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 776E0600C4; Wed, 24 Apr 2019 10:25:55 +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 v1 5/7] mm/memory_hotplug: Drop MHP_MEMBLOCK_API Date: Wed, 24 Apr 2019 12:25:09 +0200 Message-Id: <20190424102511.29318-6-david@redhat.com> In-Reply-To: <20190424102511.29318-1-david@redhat.com> References: <20190424102511.29318-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 24 Apr 2019 10:26:00 +0000 (UTC) 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: X-Virus-Scanned: ClamAV using ClamSMTP 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;