Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3994259imm; Wed, 5 Sep 2018 09:03:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZKK+Jve8fchA/2I4QqAXM5odWQ3pyeetw0jZgeCFQ8Ajlw+Df6EQzcvycarwWK68hNYg/W X-Received: by 2002:a17:902:24d:: with SMTP id 71-v6mr31394578plc.91.1536163439268; Wed, 05 Sep 2018 09:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163439; cv=none; d=google.com; s=arc-20160816; b=KCzrZpBxPv5ZekN3U3hEoaLfoVnXvhbC3RDcgFbYZ55icq8i/nFoC0N8ikez7ZJd2r Aytu38FdoN8+siWoU+vOpbqvy136Yfro13Lx7O4HervezYC8rEMXVIkAMvngJyYAqnnN WMzDdg5WDz9P22QERN7wpD1xsU4AcYG8M6gBxzpKbOgT/1H5ovifSkeqzeTKuknyUBmb zIEMeZUgzjX0f1FAy7ckxgeMoeYc/cMHY5rampIxQFB//DFbmU2tyszfSnbufTI90g1p PQGWFDAt2ibEGlvfvChLGUn9e/7zQPq49cOk6QRv5LEryobYNHh8ZRm5q6Zbs66xc5WS KTUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from; bh=yCHCepTQlnW+YpUBuXGFXLlg8KTKq+Bn5cCVk3uyQZw=; b=rpEkMmse7riA+NpOIAI7Prv19DApKOJdfBB7a/8FRbJX3z3bf9fNt87JSlrDB+iUxW epfpdgUpDqHXTmoIF4hGYifj+wsXnDGkmxjKFmZVBzP3DC2Vn/CrebgXAVJTusmQE2/4 N7ShTk4Un8oDogyXDaS+8TOl8n6BAW4x8Mtn78E0qq/o7IDGESiQb+oOImZS+KN6F5nF 0FNseYl564QxLjAI4o1cfeY0M+3rQIfNBZ9IRf/zYG/wUgRzyRKp7TXcxGDnpUH4UQDW 2ptdJAy8wsXHLwAY1U4wJd87BGFJNokOj8gWo/3IWJ7FSBoEm208/L2i2TFRz07X504/ 7tyw== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13-v6si2315962pgk.127.2018.09.05.09.03.41; Wed, 05 Sep 2018 09:03:59 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728266AbeIEUcG (ORCPT + 99 others); Wed, 5 Sep 2018 16:32:06 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:32856 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728250AbeIEUcG (ORCPT ); Wed, 5 Sep 2018 16:32:06 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w85FuAAS033743 for ; Wed, 5 Sep 2018 12:01:16 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mafkfgm96-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 e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 5 Sep 2018 17:00:31 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp02.uk.ibm.com (192.168.101.132) 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:27 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w85G0QUx34734304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Sep 2018 16:00:26 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D94342045; Wed, 5 Sep 2018 19:00:21 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2468042057; Wed, 5 Sep 2018 19:00:19 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.92]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 5 Sep 2018 19:00:19 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 05 Sep 2018 19:00:23 +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 14/29] memblock: add align parameter to memblock_alloc_node() Date: Wed, 5 Sep 2018 18:59:29 +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-0008-0000-0000-0000026CBA33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090516-0009-0000-0000-000021D4D856 Message-Id: <1536163184-26356-15-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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809050164 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the align parameter memblock_alloc_node() can be used as drop in replacement for alloc_bootmem_pages_node(). Signed-off-by: Mike Rapoport --- include/linux/bootmem.h | 4 ++-- mm/sparse.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 7d91f0f..3896af2 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h @@ -157,9 +157,9 @@ static inline void * __init memblock_alloc_from_nopanic( } static inline void * __init memblock_alloc_node( - phys_addr_t size, int nid) + phys_addr_t size, phys_addr_t align, int nid) { - return memblock_alloc_try_nid(size, 0, BOOTMEM_LOW_LIMIT, + return memblock_alloc_try_nid(size, align, BOOTMEM_LOW_LIMIT, BOOTMEM_ALLOC_ACCESSIBLE, nid); } diff --git a/mm/sparse.c b/mm/sparse.c index 04e97af..509828f 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -68,7 +68,7 @@ static noinline struct mem_section __ref *sparse_index_alloc(int nid) if (slab_is_available()) section = kzalloc_node(array_size, GFP_KERNEL, nid); else - section = memblock_alloc_node(array_size, nid); + section = memblock_alloc_node(array_size, 0, nid); return section; } -- 2.7.4