Re: linux-next: Tree for May 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/05/2022 07:22, Christoph Hellwig wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> Can you try this patch?

Hey Christoph, gave it a try but nfortunately, no joy!
Thanks,
Conor.

> 
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index e2ef0864eb1e5..856179f27f608 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -234,7 +234,7 @@ void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags,
>   {
>          struct io_tlb_mem *mem = &io_tlb_default_mem;
>          unsigned long nslabs = default_nslabs;
> -       size_t alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs));
> +       size_t alloc_size;
>          size_t bytes;
>          void *tlb;
> 
> @@ -267,12 +267,13 @@ void __init swiotlb_init_remap(bool addressing_limit, unsigned int flags,
>                  goto retry;
>          }
> 
> +       alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs));
>          mem->slots = memblock_alloc(alloc_size, PAGE_SIZE);
>          if (!mem->slots)
>                  panic("%s: Failed to allocate %zu bytes align=0x%lx\n",
>                        __func__, alloc_size, PAGE_SIZE);
> 
> -       swiotlb_init_io_tlb_mem(mem, __pa(tlb), default_nslabs, false);
> +       swiotlb_init_io_tlb_mem(mem, __pa(tlb), nslabs, false);
>          mem->force_bounce = flags & SWIOTLB_FORCE;
> 
>          if (flags & SWIOTLB_VERBOSE)





[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux