Message ID | 1536163184-26356-12-git-send-email-rppt@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 9ECA8112B for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Sep 2018 16:00:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF2242A63E for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Sep 2018 16:00:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABADA2A64F; Wed, 5 Sep 2018 16:00:42 +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 249ED2A66D for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 5 Sep 2018 16:00:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4C5DC6B740B; 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 41C5B6B740A; 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 099196B740C; Wed, 5 Sep 2018 12:00:36 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by kanga.kvack.org (Postfix) with ESMTP id C87266B7409 for <linux-mm@kvack.org>; Wed, 5 Sep 2018 12:00:36 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id c18-v6so9165428oiy.3 for <linux-mm@kvack.org>; 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=Eos1XdfGP2gWf43QtgCxooiqS60mdj6LN0nOfwNUWlE=; b=btrpjX1T3cBfHbJKdmVBbDz5ZrLD1y7GMB6g7/7N+zdm2Y/I3FbL99S0rS2fEQ3z0f oT1tf+cuuuGo+tOt6Zxue+QL1AnNMTfJKhBU2qJAyN4S+9K8BYrzKrpS4qZOnLsyHtOu MwRbkKMbbEnlIz7qzK2nG8FMBY+ZbaPv/f8lfLYWhjZS7FQcDuGX8eHoJCNmHQ2xFoya i/Uh6J7h2wUDzCVmlBxgGzRXPFMvNmsN3YwYPC+J1f1dL1BvU4f2YFDuCdPoLLWgTHg8 4l+Dl5SzNHJWU9VAF2g6U5saA0JDTHGef6AQ+jilyT+YLZQ56XFCqNMDjBe4x2S4Cl2w eQGQ== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 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: APzg51ANCEBZhWsBxFvG3mtQvSnJbDg5ubqwFMzYhVgVN6WC6ycDB9wN wDwmL/aNiNogcIrlDVVz2vUYfmFKs9NJm9PINzHaQ7e9rJ1FQ4c6HgzAKkDchSt/5sc4mbx/wNh zBGm/jDA6nqoj7UEIfoubLLI1XU6GxECrDZNyZYv1xN4esgKrtRK4gQBdpTaG5rU= X-Received: by 2002:aca:ad86:: with SMTP id w128-v6mr31824592oie.112.1536163236598; Wed, 05 Sep 2018 09:00:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdacIZBxuJA9dDnbwUdfgaLI28UvfRvDF9xZty6ReLnLgBb4LRv4+6PXa73/4/w5Ir1eq9EB X-Received: by 2002:aca:ad86:: with SMTP id w128-v6mr31824525oie.112.1536163235941; Wed, 05 Sep 2018 09:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163235; cv=none; d=google.com; s=arc-20160816; b=0li7FoWcTzJC3yyIHLqCNjhGgD78x33u3XR3Jo+oHUCW4DjZ2NagneRTpkdEd5KqYs AmzZNq4uj69JdKa8PX3dQczgAZ3Uv60XAcmHr/Pqish/oCtNc6QItZulcQQcZdZbHspv e/X1TNJU2pXno5TGuTrYxBf78TcSX3G5HqZp/ntCFBZLUBtLAJ78UNJvQPtlnLcMp5kV 3Kh1+Jk2E1W/KHTaFZxH8hNLZJjIen/8EvGXzUZx0uKuhTBtj83WMHXz7Wb70ejzlFRv LaGsCTG9uNv0u6tkPXTAVgfkYGd/V7B89HGNUDoDEIeBuXWlwA8CnHPvrqYrcS1mX+ih ie8Q== 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=Eos1XdfGP2gWf43QtgCxooiqS60mdj6LN0nOfwNUWlE=; b=KgyB1358e48uvKdHKiZHcrmmjDot4RUff7siF74m/M97lVZgqiVgy7qwjRO19sV8DI 7LdoEJlosqyfzcA17hyuNQjAONJYhDwMqkjBdXDTk9rFO/H9N9Ruxvk/2xL1HXgPzee4 VjtN9w3wST++hF2/mh5c4RstSLzL8n+hAQ+yCy7Bt5OaYnp4yLWB6D6iVkrEJ0nM+z4J 2hEW3Z5Yb3wrHnAwIzCNtOycy06NftjCv1qygG/myF9dVfHBMtuIwUOj1Ya4DK9IvANy RltWJraZpGm1TCclYA2ao1kx/xHth1Qzd+vjBQQBkP7VbjyrL+MH6oKlZe8McdRVzYDk LukQ== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 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 (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id v135-v6si1572382oie.5.2018.09.05.09.00.35 for <linux-mm@kvack.org> (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.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 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 (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w85FvxWi104114 for <linux-mm@kvack.org>; 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 2maj3wrjfv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <linux-mm@kvack.org>; Wed, 05 Sep 2018 12:00:25 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <linux-mm@kvack.org> from <rppt@linux.vnet.ibm.com>; Wed, 5 Sep 2018 17:00:23 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) 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:19 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w85G0Irw28704882 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 5 Sep 2018 16:00:18 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DF2175207A; Wed, 5 Sep 2018 19:00:10 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.92]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id C94DF52065; Wed, 5 Sep 2018 19:00:08 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Wed, 05 Sep 2018 19:00:15 +0300 From: Mike Rapoport <rppt@linux.vnet.ibm.com> To: linux-mm@kvack.org Cc: Andrew Morton <akpm@linux-foundation.org>, "David S. Miller" <davem@davemloft.net>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Ingo Molnar <mingo@redhat.com>, Michael Ellerman <mpe@ellerman.id.au>, Michal Hocko <mhocko@suse.com>, Paul Burton <paul.burton@mips.com>, Thomas Gleixner <tglx@linutronix.de>, Tony Luck <tony.luck@intel.com>, 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 <rppt@linux.vnet.ibm.com> Subject: [RFC PATCH 11/29] memblock: replace alloc_bootmem_pages_nopanic with memblock_alloc_nopanic Date: Wed, 5 Sep 2018 18:59:26 +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-000002B5BD17 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18090516-4276-0000-0000-000037BED7C2 Message-Id: <1536163184-26356-12-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 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=683 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
mm: remove bootmem allocator
|
expand
|
On Wed 05-09-18 18:59:26, Mike Rapoport wrote: > The alloc_bootmem_pages_nopanic(size) is a shortcut for > __alloc_bootmem_nopanic(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT) and can be > replaced by memblock_alloc_nopanic(size, PAGE_SIZE) It is not so straightforward because you really have to go deep down the callpath to see they are doing the same thing essentially. > Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Acked-by: Michal Hocko <mhocko@suse.com> > --- > drivers/usb/early/xhci-dbc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c > index e15e896..16df968 100644 > --- a/drivers/usb/early/xhci-dbc.c > +++ b/drivers/usb/early/xhci-dbc.c > @@ -94,7 +94,7 @@ static void * __init xdbc_get_page(dma_addr_t *dma_addr) > { > void *virt; > > - virt = alloc_bootmem_pages_nopanic(PAGE_SIZE); > + virt = memblock_alloc_nopanic(PAGE_SIZE, PAGE_SIZE); > if (!virt) > return NULL; > > -- > 2.7.4 >
diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index e15e896..16df968 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -94,7 +94,7 @@ static void * __init xdbc_get_page(dma_addr_t *dma_addr) { void *virt; - virt = alloc_bootmem_pages_nopanic(PAGE_SIZE); + virt = memblock_alloc_nopanic(PAGE_SIZE, PAGE_SIZE); if (!virt) return NULL;
The alloc_bootmem_pages_nopanic(size) is a shortcut for __alloc_bootmem_nopanic(x, PAGE_SIZE, BOOTMEM_LOW_LIMIT) and can be replaced by memblock_alloc_nopanic(size, PAGE_SIZE) Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> --- drivers/usb/early/xhci-dbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)