Re: [RFC PATCH 11/29] memblock: replace alloc_bootmem_pages_nopanic with memblock_alloc_nopanic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx>
- Subject: Re: [RFC PATCH 11/29] memblock: replace alloc_bootmem_pages_nopanic with memblock_alloc_nopanic
- From: Michal Hocko <mhocko@xxxxxxxxxx>
- Date: Thu, 6 Sep 2018 09:53:19 +0200
- Cc: linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Paul Burton <paul.burton@xxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <1536163184-26356-12-git-send-email-rppt@linux.vnet.ibm.com>
- References: <1536163184-26356-1-git-send-email-rppt@linux.vnet.ibm.com> <1536163184-26356-12-git-send-email-rppt@linux.vnet.ibm.com>
- User-agent: Mutt/1.10.1 (2018-07-13)
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@xxxxxxxxxxxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
> ---
> 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
>
--
Michal Hocko
SUSE Labs
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]