diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2021-02-16 06:33:06 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-04-22 18:38:04 +0300 |
commit | 7f1fa82d79947dfabb4046e1d787da9db2bc1c20 (patch) | |
tree | c5b4c0c664a80359ec39102d2efdab3b6ca581bc /arch/powerpc/crypto | |
parent | 0db11461677aa5105b9ebbd939aee0ceb77a988b (diff) | |
download | linux-7f1fa82d79947dfabb4046e1d787da9db2bc1c20.tar.xz |
powerpc/iommu: Allocate it_map by vmalloc
The IOMMU table uses the it_map bitmap to keep track of allocated DMA
pages. This has always been a contiguous array allocated at either
the boot time or when a passed through device is returned to the host OS.
The it_map memory is allocated by alloc_pages() which allocates
contiguous physical memory.
Such allocation method occasionally creates a problem when there is
no big chunk of memory available (no free memory or too fragmented).
On powernv/ioda2 the default DMA window requires 16MB for it_map.
This replaces alloc_pages_node() with vzalloc_node() which allocates
contiguous block but in virtual memory. This should reduce changes of
failure but should not cause other behavioral changes as it_map is only
used by the kernel's DMA hooks/api when MMU is on.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210216033307.69863-2-aik@ozlabs.ru
Diffstat (limited to 'arch/powerpc/crypto')
0 files changed, 0 insertions, 0 deletions