Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3680709ybi; Mon, 27 May 2019 04:16:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3h/SlIV8XUqLbXqb0sw3tNwkC9vKhtB9hLGBAYWG544BU4KBbEneE2mF9/ZAVUsQp397w X-Received: by 2002:a17:902:8508:: with SMTP id bj8mr84992968plb.79.1558955772066; Mon, 27 May 2019 04:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558955772; cv=none; d=google.com; s=arc-20160816; b=NIj6KLMxbI5qKBZBa9fZ+QnDOZxdoDPyXSkca/wMhw71grin7724+FDuzpqSDPDcig h82ZiNOp6E1Im4X+5sWlv+rGwo+vA4XolZ3Nxe/ZW2fehIoW7xwvsPJwG2Jqemua4wLV JJh+HZnZ0mbtGXL8AqMx1eqZK6+P5BNLvpoGM+Il9pIV1DHIWaLMTGxS6kL8f/e5KUhG YuduUuGFSu2oGkTXzjdADvv4DIUuWbb/5dEokQ9Meq4lzwa/fuX1w2Eb7XtsGEEekiZj Q0kO7EvbsU8UwSaYk0Hcyv/yXEj84SeKawwek3Ac/EprdbTplgQLOalbTliD/pvgdvXA 8R4Q== 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=FcpQtkM7mXzSuK2MeOX2MTV1RrfG5BMJDhikRUdEp1k=; b=viLTjDeYab54Nz+LAj5Bi4gHKt4WY/c5323Wauq57ZNMQYd+LRSfhsBAb6N+0njOYh PKEMCKy2s86UFRK9xbAFBs9XCkdMNjkyrTp0m30HZlOjG7Z7ITGW2jKphlXL1KfGxsZP LVIMK6IJzcSbBzybOFhXMR2E7GYd/y45aivRHbBiY662/guIfWGO749mWB7kY9K3Bqq/ FRM1erwGkA7modx87ECxe9kuxdJafei59hS7ieUdzIdgJSGnYfUeA6GU+v3UhixpVgMm OG6AGKP4flPXX7NRYgGfhtFPyCet5qcjMJALXV0YrmfachYcs327b371Y9ISpVllhkDy AatA== 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 h68si17124087pgc.270.2019.05.27.04.15.56; Mon, 27 May 2019 04:16:12 -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 S1727097AbfE0LNL (ORCPT + 99 others); Mon, 27 May 2019 07:13:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39992 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725991AbfE0LNJ (ORCPT ); Mon, 27 May 2019 07:13:09 -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 32F0F30833BF; Mon, 27 May 2019 11:13:09 +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 A50CC19C7F; Mon, 27 May 2019 11:13:04 +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 Subject: [PATCH v3 11/11] mm/memory_hotplug: Remove "zone" parameter from sparse_remove_one_section Date: Mon, 27 May 2019 13:11:52 +0200 Message-Id: <20190527111152.16324-12-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.44]); Mon, 27 May 2019 11:13:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The parameter is unused, so let's drop it. Memory removal paths should never care about zones. This is the job of memory offlining and will require more refactorings. Reviewed-by: Dan Williams Signed-off-by: David Hildenbrand --- include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 2 +- mm/sparse.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 2f1f87e13baa..1a4257c5f74c 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -346,7 +346,7 @@ extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, extern bool is_memblock_offlined(struct memory_block *mem); extern int sparse_add_one_section(int nid, unsigned long start_pfn, struct vmem_altmap *altmap); -extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms, +extern void sparse_remove_one_section(struct mem_section *ms, unsigned long map_offset, struct vmem_altmap *altmap); extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, unsigned long pnum); diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 82136c5b4c5f..e48ec7b9dee2 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -524,7 +524,7 @@ static void __remove_section(struct zone *zone, struct mem_section *ms, start_pfn = section_nr_to_pfn((unsigned long)scn_nr); __remove_zone(zone, start_pfn); - sparse_remove_one_section(zone, ms, map_offset, altmap); + sparse_remove_one_section(ms, map_offset, altmap); } /** diff --git a/mm/sparse.c b/mm/sparse.c index d1d5e05f5b8d..1552c855d62a 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -800,8 +800,8 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap, free_map_bootmem(memmap); } -void sparse_remove_one_section(struct zone *zone, struct mem_section *ms, - unsigned long map_offset, struct vmem_altmap *altmap) +void sparse_remove_one_section(struct mem_section *ms, unsigned long map_offset, + struct vmem_altmap *altmap) { struct page *memmap = NULL; unsigned long *usemap = NULL; -- 2.20.1