linux-stable/drivers/firmware/google
Furquan Shaikh 17adb469bf firmware: gsmi: Drop the use of dma_pool_* API functions
GSMI driver uses dma_pool_* API functions for buffer allocation
because it requires that the SMI buffers are allocated within 32-bit
physical address space. However, this does not work well with IOMMU
since there is no real device and hence no domain associated with the
device.

Since this is not a real device, it does not require any device
address(IOVA) for the buffer allocations. The only requirement is to
ensure that the physical address allocated to the buffer is within
32-bit physical address space. This is because the buffers have
nothing to do with DMA at all. It is required for communication with
firmware executing in SMI mode which has access only to the bottom
4GiB of memory. Hence, this change switches to using a SLAB cache
created with SLAB_CACHE_DMA32 that guarantees that the allocation
happens from the DMA32 memory zone. All calls to dma_pool_* are
replaced with kmem_cache_*.

In addition to that, all the code for managing the dma_pool for GSMI
platform device is dropped.

Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20201022071550.1192947-1-furquan@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-09 18:48:06 +01:00
..
coreboot_table.c firmware: google: Release devices before unregistering the bus 2020-01-14 21:46:48 +01:00
coreboot_table.h Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
framebuffer-coreboot.c Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
gsmi.c firmware: gsmi: Drop the use of dma_pool_* API functions 2020-11-09 18:48:06 +01:00
Kconfig efi: gsmi: fix false dependency on CONFIG_EFI_VARS 2020-09-29 19:40:57 +02:00
Makefile firmware: coreboot: Collapse platform drivers into bus core 2018-09-14 15:37:23 +02:00
memconsole-coreboot.c firmware: google: memconsole: Replace zero-length array with flexible-array member 2020-06-15 23:08:16 -05:00
memconsole-x86-legacy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
memconsole.c Merge 5.2-rc4 into char-misc-next 2019-06-09 09:11:21 +02:00
memconsole.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 287 2019-06-05 17:36:37 +02:00
vpd.c firmware: google: vpd: Replace zero-length array with flexible-array member 2020-06-15 23:08:21 -05:00
vpd_decode.c firmware: google: increment VPD key_len properly 2019-10-11 08:41:34 +02:00
vpd_decode.h firmware: google: check if size is valid when decoding VPD data 2019-09-04 13:31:28 +02:00