From patchwork Thu Jun 20 18:31:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 11007649 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 9EA3D76 for ; Thu, 20 Jun 2019 18:32:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 909BB2866D for ; Thu, 20 Jun 2019 18:32:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8425428751; Thu, 20 Jun 2019 18:32:16 +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 2074A2866D for ; Thu, 20 Jun 2019 18:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727260AbfFTScP (ORCPT ); Thu, 20 Jun 2019 14:32:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49842 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727149AbfFTScO (ORCPT ); Thu, 20 Jun 2019 14:32:14 -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 06634356EA; Thu, 20 Jun 2019 18:31:58 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-71.ams2.redhat.com [10.36.116.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACE2819722; Thu, 20 Jun 2019 18:31:40 +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 v3 0/6] mm: Further memory block device cleanups Date: Thu, 20 Jun 2019 20:31:33 +0200 Message-Id: <20190620183139.4352-1-david@redhat.com> MIME-Version: 1.0 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.30]); Thu, 20 Jun 2019 18:32:13 +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, 4 and 6 changed compared to v1. 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. Compile-tested on ppc64. v2 -> v3: - "mm/memory_hotplug: Rename walk_memory_range() and pass start+size .." -- Avoid warning on ppc. - "drivers/base/memory.c: Get rid of find_memory_block_hinted()" -- Fixup a comment regarding hinted devices. 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 | 23 ++--- drivers/acpi/acpi_memhotplug.c | 19 +--- drivers/base/memory.c | 120 +++++++++++++--------- 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, 106 insertions(+), 151 deletions(-) Reported-by: Qian Cai Tested-by: Qian Cai Signed-off-by: Andrew Morton