From patchwork Wed Sep 5 15:59:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10589149 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 C401013AC for ; Wed, 5 Sep 2018 16:01:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 165EA2A51A for ; Wed, 5 Sep 2018 16:01:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 151C82A532; Wed, 5 Sep 2018 16:01:12 +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=ham 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 69C8A2A801 for ; Wed, 5 Sep 2018 16:01:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B8E66B7421; Wed, 5 Sep 2018 12:01:00 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 63C626B7422; Wed, 5 Sep 2018 12:01:00 -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 46BCF6B7423; Wed, 5 Sep 2018 12:01:00 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-yw1-f69.google.com (mail-yw1-f69.google.com [209.85.161.69]) by kanga.kvack.org (Postfix) with ESMTP id 0B3026B7421 for ; Wed, 5 Sep 2018 12:01:00 -0400 (EDT) Received: by mail-yw1-f69.google.com with SMTP id x4-v6so5416326ywd.13 for ; Wed, 05 Sep 2018 09:01:00 -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:in-reply-to:references:message-id; bh=mDwzdOwNaetTfp3lBXfayL5I+dI6n0s6dJtubfKt43o=; b=DH3Hw038/yj5UkF/ywUE4Acj2kuk5EEdX28gSkJwVWTKbFoDD+B8xfJcP1Q725I7OH in1xjwqVVl/U0Wx/Dga6O906FFCQwy89rJ6327h7JYoKLQijEfgaeX+k8OgKFm8RfZQs 4M/MBZRfAYCpF4bzGof7jNMFEQ29ljbeMAe6j26lfTGlQ8MlZmvfK7OasSV8mxc1CkRb Z6R+oTR0VXQBm7X7fR+91n2CbzL3CCCHw8+u/O87kKcI4kVBNoCUxwcCn8uxFhgks2Cj d1BWcgj096/1KSJJFkaZYp+k0f5+cX/fKZNDLeYwhqW0OiQzNI8sN4MDgHVPvZcL14b3 r70w== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: APzg51DsQLroEwdWrj0erBlYFgBCLT/WXXNRrv6mrj5fbqdW5HWRa/g1 tfav4OXJE/4brv+OAguqsIBH3Q10hU4L4Yn+LSvZqXzD+J1lXQafySJbMH+rr2+ZMaIMfr9hPfH 8+F8750n2hhV0KcqCn6tWzT/v+7sl+G81vARImajTmEX6PXuxhdoRPKV1glj0ba4= X-Received: by 2002:a25:583:: with SMTP id 125-v6mr21000139ybf.268.1536163259779; Wed, 05 Sep 2018 09:00:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYeJqB/fynuP/Lf7kb6iGTltAkExBb7zlxgVO84DaBohnFHMuoZ9SuJUEAsKLqm4WXYnZMy X-Received: by 2002:a25:583:: with SMTP id 125-v6mr21000051ybf.268.1536163258448; Wed, 05 Sep 2018 09:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163258; cv=none; d=google.com; s=arc-20160816; b=dg3hlYaCb4qeGC7IDr8kkXX9UMgjuNFm817sDVRXvy3iR3uP87ELBPZkMTbvDbYmIM BGfftf0PU4OOOgnbTb5XkVTQy8AAOjjqEhRsYv/5L+Zz0iJmpd/aNpw0YbGFLbIxFCEo mGfqku6QtmUb80nHDcCxu4fh3fCmbuz5Q3YPlFwEreBHxYQopaA/DZRgGrqUvJPWuznb vVXikynFIXQLjLlDdaZUK4yuu1Qt/uOfvU1AHp5IvFGupnEmGWSdkm3ULAYDybNANhd5 JTuyFZVJREypOIV0g/hOxSHuD91YeWNCBCRf2dsLXopJDesGjRHAPDxe6tiDt5qe9fCa eC6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from; bh=mDwzdOwNaetTfp3lBXfayL5I+dI6n0s6dJtubfKt43o=; b=eGsFhxIhI2JgDIPFQRQ8Iskmcv0LldHa0RqiguPFq3J/siy3HdnIBTzyn/VMgIuQ9Q hS7MuJi0EWTXI9xK69EbnK0Wr/EwGEPNgDGY0d3zCwHK70L5JMBh7HUnnBijOUDZUP5G limcOpoGjdzGkQc6tTVhyT+dOxapKYgVHjn5h4SUMq2o5a2tNjjmapbjWw1Zcl6ALIS4 OJqxwo+wX18A8eIsUDnuUQif8eAW+IBGt7TfYsROxgsKjBVROMyx7trNkd1O1fd9sXwq wqLQ6p0TAeCKi9r/w55gauYpKsCjxo6lGcuDBpI8ln6dfI2yzkZ1JAPa+SucYu+6Z6MV 5iYg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id 199-v6si1554924oic.364.2018.09.05.09.00.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 09:00:58 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w85FuDSQ046964 for ; Wed, 5 Sep 2018 12:00:57 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mag027jkw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 05 Sep 2018 12:00:53 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 5 Sep 2018 17:00:41 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 5 Sep 2018 17:00:35 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w85G0Yjh46268502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Sep 2018 16:00:35 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ABCBA4C059; Wed, 5 Sep 2018 19:00:29 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 938924C058; Wed, 5 Sep 2018 19:00:27 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.92]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 5 Sep 2018 19:00:27 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 05 Sep 2018 19:00:32 +0300 From: Mike Rapoport To: linux-mm@kvack.org Cc: Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , Ingo Molnar , Michael Ellerman , Michal Hocko , 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, Mike Rapoport Subject: [RFC PATCH 17/29] memblock: replace alloc_bootmem_node with memblock_alloc_node Date: Wed, 5 Sep 2018 18:59:32 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18090516-0020-0000-0000-000002C1B2F3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090516-0021-0000-0000-0000210EE260 Message-Id: <1536163184-26356-18-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-05_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=848 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809050164 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 Signed-off-by: Mike Rapoport 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.