From patchwork Thu Jun 20 10:35:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11006403 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 CE24F14DB for ; Thu, 20 Jun 2019 10:35:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD7ED26E96 for ; Thu, 20 Jun 2019 10:35:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B051B2842B; Thu, 20 Jun 2019 10:35:44 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AB5826E96 for ; Thu, 20 Jun 2019 10:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726915AbfFTKfo (ORCPT ); Thu, 20 Jun 2019 06:35:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32828 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726211AbfFTKfn (ORCPT ); Thu, 20 Jun 2019 06:35:43 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E1A41C1EB202; Thu, 20 Jun 2019 10:35:34 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-88.ams2.redhat.com [10.36.117.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A49D608A7; Thu, 20 Jun 2019 10:35:21 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: Dan Williams , Andrew Morton , linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, David Hildenbrand , Andrew Banman , Anshuman Khandual , Arun KS , Baoquan He , Benjamin Herrenschmidt , Greg Kroah-Hartman , Johannes Weiner , Juergen Gross , Keith Busch , Len Brown , Mel Gorman , Michael Ellerman , Michael Neuling , Michal Hocko , Mike Rapoport , "mike.travis@hpe.com" , Oscar Salvador , Oscar Salvador , Paul Mackerras , Pavel Tatashin , Pavel Tatashin , Pavel Tatashin , Qian Cai , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Rashmica Gupta , Stephen Rothwell , Thomas Gleixner , Vlastimil Babka , Wei Yang Subject: [PATCH v2 0/6] mm: Further memory block device cleanups Date: Thu, 20 Jun 2019 12:35:14 +0200 Message-Id: <20190620103520.23481-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 20 Jun 2019 10:35:43 +0000 (UTC) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP @Andrew: Only patch 1 and 6 changed. The patches are based on the same state as the previous patches (replace the old ones if possible). Some further cleanups around memory block devices. Especially, clean up and simplify walk_memory_range(). Including some other minor cleanups. Compiled + tested on x86 with DIMMs under QEMU. v1 -> v2: - "mm: Section numbers use the type "unsigned long"" -- "unsigned long i" -> "unsigned long nr", in one case -> "int i" - "drivers/base/memory.c: Get rid of find_memory_block_hinted(" -- Fix compilation error -- Get rid of the "hint" parameter completely David Hildenbrand (6): mm: Section numbers use the type "unsigned long" drivers/base/memory: Use "unsigned long" for block ids mm: Make register_mem_sect_under_node() static mm/memory_hotplug: Rename walk_memory_range() and pass start+size instead of pfns mm/memory_hotplug: Move and simplify walk_memory_blocks() drivers/base/memory.c: Get rid of find_memory_block_hinted() arch/powerpc/platforms/powernv/memtrace.c | 22 ++--- drivers/acpi/acpi_memhotplug.c | 19 +--- drivers/base/memory.c | 115 ++++++++++++++-------- drivers/base/node.c | 8 +- include/linux/memory.h | 5 +- include/linux/memory_hotplug.h | 2 - include/linux/mmzone.h | 4 +- include/linux/node.h | 7 -- mm/memory_hotplug.c | 57 +---------- mm/sparse.c | 12 +-- 10 files changed, 105 insertions(+), 146 deletions(-)