From patchwork Wed Sep 5 15:59:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10589133 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 09B9E13AC for ; Wed, 5 Sep 2018 16:00:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDAAA2A606 for ; Wed, 5 Sep 2018 16:00:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB6E52A614; Wed, 5 Sep 2018 16:00:45 +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 584872A606 for ; Wed, 5 Sep 2018 16:00:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 705BE6B740A; Wed, 5 Sep 2018 12:00:37 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 645516B740E; Wed, 5 Sep 2018 12:00:37 -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 38AB66B740F; Wed, 5 Sep 2018 12:00:37 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by kanga.kvack.org (Postfix) with ESMTP id DEFC76B740A for ; Wed, 5 Sep 2018 12:00:36 -0400 (EDT) Received: by mail-oi0-f71.google.com with SMTP id q11-v6so9142465oih.15 for ; Wed, 05 Sep 2018 09:00:36 -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=TxmIT5F6MSkAgIoqYIKYX4M2BSceSBQ0zw5VNivHBho=; b=sxejIaQ1y7MRD5EeBFfVpA9EDXY5922sh0O/24Jz6zNbqjmPF/yo3Qvb+pcAxBnAf7 cFryFh/GO8u/MSz/vXZm9Ilg1RIBQDW9r99EUuI2VW2X8wHEJ5gTCZ0jDCVnkjEZ7edO Z5SXoTay2laFO/v/SK4f6+T0CmgprE+VN54cXuRbd67kWa3FtpIkB7D16W+J5XCCuqwP dZtqH78SO4FgSRxviBpuA8yarGrIHZjCMa6lpGQAcPnifmDa4dZAmBBAVRj1w8hfUXpL I1JjQDTirov1thPC7PODzep/W2Lh+NxbZnm/15EnNh7+fW79n3JYxIm6+ooJk5Pc6CHt zRKw== 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: APzg51Dd269ELm9H0S07EH8JrgvAhYVa+ywcWACqayLcxM+0m2pCFZNI ksRrQdGb1p3/yh2NgX//L48CWAT7HuDsvgmq4vR00Bx0vpUvCEDZyXWPgXCLnF4+NqSuFDUqtBN rszWHBtkNupA42M2H81U1Qf7DfxZCwlzoUnnPQB92CRyiG2DKuaHL20aUHmJg32M= X-Received: by 2002:a54:4618:: with SMTP id p24-v6mr31656232oip.172.1536163236687; Wed, 05 Sep 2018 09:00:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbB8AVa8weYbSXWQaxQPCuE0+giaG/GiT2eXrfDeuCTVqnzLRxcgx709HKo2oDa3AebHSre X-Received: by 2002:a54:4618:: with SMTP id p24-v6mr31656178oip.172.1536163236025; Wed, 05 Sep 2018 09:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163236; cv=none; d=google.com; s=arc-20160816; b=dmwMl5pLqRTv/+vAa4d5D8sLXnskwnqolCcabbCPxEUiGzNrWTvDXxpwjnd98YHMSH +/5Ad7IEnv/obHS2yEeFQptnM0vO7r1r1sREpjGRddfmHliP6fMbs/I58PvGprUybM4q Jl5Km66cYELAIvnfZrRaODMHqBQUCB+oIqM1UF6BkilAyJ9KCN3R8+/7CCGF09Ds/+lP qsY+ImlwHDRus2Kva0AGG6ew0339XikIbuJK1/ouZmlhqbDHMDP+VCQO2hPmVPgd6TiZ gPJ7O1lpmS+yj2Ied3lRBFbCxtFyWJVNT4rYtMuFlEpIfnjSolhRGU4BmvJJUwXadYjy 3lpg== 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=TxmIT5F6MSkAgIoqYIKYX4M2BSceSBQ0zw5VNivHBho=; b=Cp+0KkqbP1XQorkY4PcEE8dLFmQ7X7p/xrTV0dF+s261v0c/KzXLUCk27Of02YeRPc B72seoR7151EdSuf47sdnZHL+/GMQyrx4MBwRKvcQymii4jTIyiJ0S6Uz4Q23sWAC0eC XhPKpWaOxNJ/g9WR6xDw4HWWknpK+fxqz3d6B54/ke0v/MhGgCrt7BavHirNQrCHgClW CSZtnXULvgUqK8e0BLq5InmbZN3RkVNoMBe16MlEUnJ1KOgzAdNzXOdHHbNwRgRNYXNd kDbIE7Qoa9SDnVbuTm8RxjUlWhJ4t901/imIimRmWBDMgbFz3mlITWfsMwAnlLp4hEFf WBRw== 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 v6-v6si1525491oix.348.2018.09.05.09.00.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 09:00:35 -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 (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w85Fu7lg073180 for ; Wed, 5 Sep 2018 12:00:35 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2maggdp9yt-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 05 Sep 2018 12:00:34 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 5 Sep 2018 17:00:28 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) 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:22 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w85G0LKi39583876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Sep 2018 16:00:21 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC5434C052; Wed, 5 Sep 2018 19:00:15 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CCFC84C062; Wed, 5 Sep 2018 19:00:13 +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:13 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 05 Sep 2018 19:00:18 +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 12/29] memblock: replace alloc_bootmem_low with memblock_alloc_low Date: Wed, 5 Sep 2018 18:59:27 +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-4275-0000-0000-000002B5BD18 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090516-4276-0000-0000-000037BED7C3 Message-Id: <1536163184-26356-13-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=552 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 The alloc_bootmem_low(size) allocates low memory with default alignement and can be replcaed by memblock_alloc_low(size, 0) Signed-off-by: Mike Rapoport Acked-by: Michal Hocko --- arch/arm64/kernel/setup.c | 2 +- arch/unicore32/kernel/setup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 5b4fac4..cf7a7b7 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -213,7 +213,7 @@ static void __init request_standard_resources(void) kernel_data.end = __pa_symbol(_end - 1); for_each_memblock(memory, region) { - res = alloc_bootmem_low(sizeof(*res)); + res = memblock_alloc_low(sizeof(*res), 0); if (memblock_is_nomap(region)) { res->name = "reserved"; res->flags = IORESOURCE_MEM; diff --git a/arch/unicore32/kernel/setup.c b/arch/unicore32/kernel/setup.c index c2bffa5..9f163f9 100644 --- a/arch/unicore32/kernel/setup.c +++ b/arch/unicore32/kernel/setup.c @@ -207,7 +207,7 @@ request_standard_resources(struct meminfo *mi) if (mi->bank[i].size == 0) continue; - res = alloc_bootmem_low(sizeof(*res)); + res = memblock_alloc_low(sizeof(*res), 0); res->name = "System RAM"; res->start = mi->bank[i].start; res->end = mi->bank[i].start + mi->bank[i].size - 1;