Re: [PATCH] swiotlb: Return error from swiotlb_init_with_tbl()

From: Christoph Hellwig
Date: Fri Feb 01 2019 - 03:12:12 EST


On Thu, Jan 31, 2019 at 05:24:24PM +0100, Joerg Roedel wrote:
> From: Joerg Roedel <jroedel@xxxxxxx>
>
> The only reason why swiotlb_init_with_tbl() can fail is an
> allocation failure in the memblock_alloc() function. But
> this function just calls panic() in case it can't fulfill
> the request and never returns an error, therefore
> swiotlb_init_with_tbl() also never actually returns an
> error.

Please use up all 72 characters per line available in the commit log
format.

> - io_tlb_list = memblock_alloc(
> + io_tlb_list = memblock_alloc_nopanic(
> PAGE_ALIGN(io_tlb_nslabs * sizeof(int)),
> PAGE_SIZE);

Mike just killed the _nopanic versions and made the normal ones not
panic.