Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp378909imm; Thu, 6 Sep 2018 04:04:44 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbS/wd8jSMrg3AqBJv7pMdVD34XVSCVlF3Orqqq2h551czUeYLX4BqXkdS6EtlRci61n194 X-Received: by 2002:a63:1e0b:: with SMTP id e11-v6mr2164965pge.44.1536231884743; Thu, 06 Sep 2018 04:04:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536231884; cv=none; d=google.com; s=arc-20160816; b=ghUWXs7sC1FzivVtdjZD1FgJQDGg5HU4eloyjz59VDu6mTGQlSmNbPfwwk0RGAgxot 9TrGziX3O5wIdgN5mmbh0CVX3YyHSUCil3q9JwtIV1mNh+Eb066iIV/hkXbPHu/rtG1X z3cjjrqG6B29jQfUnsk1GGz/umaUsyuSl+NYjmQM1tSidO+yUuK8pMYUVFg2R8iCcXj4 M7D3zwHN4IDg5fIofoIGkT2/uyvAupeuprF23WY1QUsNWjrN1i2oQ0pkLAQAZJwlqyi4 xV2Bpz/EPhsDdyMNDjQBw00jSMRoPLXLDwyJLYOJJJpjhCPORumqrypOHvOwxYYNO1H9 Nh3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=1wa6/nLfJOp5NKuDlCHwmx59w9RI0DRyrcG5QvdCoXk=; b=tLexsDtE1c8yZd1NuNAvT4hkaa9PhtpAe/vsL6/yM0sNR637+YARRmBe5wSPQfaH2h XojZVekN1/oPxkcX1eZrqdOfiYUAfwKEq4uBSz0zGJSFxIUJ42LvQSh9R9h7x8jxl/u/ AHJiqpXHCKBtTBM/+XgWeBvIz04aeVRA4CibAyLctb+MnxbN3qU3ku6pSLuF0yd3Zseb 7vPyJpum/qryeeNfdZoYSx7GWZTtHl3vdCXqzyx//LbicIMTtR9zR8+NKKDveKnF6jO9 WOWKmOy3nCDzhf7up639shEPH+G1DJFYnaOAeNMXV2VMlAFWPOXy7QHBMfWVLyRAFOy2 /fSQ== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si4897658pgn.431.2018.09.06.04.04.29; Thu, 06 Sep 2018 04:04:44 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728228AbeIFNP4 (ORCPT + 99 others); Thu, 6 Sep 2018 09:15:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:39800 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728127AbeIFNP4 (ORCPT ); Thu, 6 Sep 2018 09:15:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 01CB6AE60; Thu, 6 Sep 2018 08:41:31 +0000 (UTC) Date: Thu, 6 Sep 2018 10:41:31 +0200 From: Michal Hocko To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , Ingo Molnar , Michael Ellerman , Paul Burton , Thomas Gleixner , Tony Luck , linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 17/29] memblock: replace alloc_bootmem_node with memblock_alloc_node Message-ID: <20180906084131.GB14951@dhcp22.suse.cz> References: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> <1536163184-26356-18-git-send-email-rppt@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1536163184-26356-18-git-send-email-rppt@linux.vnet.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 05-09-18 18:59:32, Mike Rapoport wrote: > Signed-off-by: Mike Rapoport ENOCHAGELOG again The conversion itself looks good to me Acked-by: Michal Hocko > --- > arch/alpha/kernel/pci_iommu.c | 4 ++-- > arch/ia64/sn/kernel/io_common.c | 7 ++----- > arch/ia64/sn/kernel/setup.c | 4 ++-- > 3 files changed, 6 insertions(+), 9 deletions(-) > > diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c > index 6923b0d..b52d76f 100644 > --- a/arch/alpha/kernel/pci_iommu.c > +++ b/arch/alpha/kernel/pci_iommu.c > @@ -74,7 +74,7 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base, > > #ifdef CONFIG_DISCONTIGMEM > > - arena = alloc_bootmem_node(NODE_DATA(nid), sizeof(*arena)); > + arena = memblock_alloc_node(sizeof(*arena), align, nid); > if (!NODE_DATA(nid) || !arena) { > printk("%s: couldn't allocate arena from node %d\n" > " falling back to system-wide allocation\n", > @@ -82,7 +82,7 @@ iommu_arena_new_node(int nid, struct pci_controller *hose, dma_addr_t base, > arena = alloc_bootmem(sizeof(*arena)); > } > > - arena->ptes = __alloc_bootmem_node(NODE_DATA(nid), mem_size, align, 0); > + arena->ptes = memblock_alloc_node(sizeof(*arena), align, nid); > if (!NODE_DATA(nid) || !arena->ptes) { > printk("%s: couldn't allocate arena ptes from node %d\n" > " falling back to system-wide allocation\n", > diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c > index 102aaba..8b05d55 100644 > --- a/arch/ia64/sn/kernel/io_common.c > +++ b/arch/ia64/sn/kernel/io_common.c > @@ -385,16 +385,13 @@ void __init hubdev_init_node(nodepda_t * npda, cnodeid_t node) > { > struct hubdev_info *hubdev_info; > int size; > - pg_data_t *pg; > > size = sizeof(struct hubdev_info); > > if (node >= num_online_nodes()) /* Headless/memless IO nodes */ > - pg = NODE_DATA(0); > - else > - pg = NODE_DATA(node); > + node = 0; > > - hubdev_info = (struct hubdev_info *)alloc_bootmem_node(pg, size); > + hubdev_info = (struct hubdev_info *)memblock_alloc_node(size, 0, node); > > npda->pdinfo = (void *)hubdev_info; > } > diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c > index 5f6b6b4..ab2564f 100644 > --- a/arch/ia64/sn/kernel/setup.c > +++ b/arch/ia64/sn/kernel/setup.c > @@ -511,7 +511,7 @@ static void __init sn_init_pdas(char **cmdline_p) > */ > for_each_online_node(cnode) { > nodepdaindr[cnode] = > - alloc_bootmem_node(NODE_DATA(cnode), sizeof(nodepda_t)); > + memblock_alloc_node(sizeof(nodepda_t), 0, cnode); > memset(nodepdaindr[cnode]->phys_cpuid, -1, > sizeof(nodepdaindr[cnode]->phys_cpuid)); > spin_lock_init(&nodepdaindr[cnode]->ptc_lock); > @@ -522,7 +522,7 @@ static void __init sn_init_pdas(char **cmdline_p) > */ > for (cnode = num_online_nodes(); cnode < num_cnodes; cnode++) > nodepdaindr[cnode] = > - alloc_bootmem_node(NODE_DATA(0), sizeof(nodepda_t)); > + memblock_alloc_node(sizeof(nodepda_t), 0, 0); > > /* > * Now copy the array of nodepda pointers to each nodepda. > -- > 2.7.4 > -- Michal Hocko SUSE Labs