mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
swiotlb: Expose swiotlb_nr_tlb function to modules
As a mechanism to detect whether SWIOTLB is enabled or not. We also fix the spelling - it was swioltb instead of swiotlb. CC: FUJITA Tomonori <[email protected]> [v1: Ripped out swiotlb_enabled] Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
This commit is contained in:
parent
bcdd6b2fd6
commit
f21ffe9f6d
3 changed files with 5 additions and 4 deletions
|
|
@ -110,11 +110,11 @@ setup_io_tlb_npages(char *str)
|
|||
__setup("swiotlb=", setup_io_tlb_npages);
|
||||
/* make io_tlb_overflow tunable too? */
|
||||
|
||||
unsigned long swioltb_nr_tbl(void)
|
||||
unsigned long swiotlb_nr_tbl(void)
|
||||
{
|
||||
return io_tlb_nslabs;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(swiotlb_nr_tbl);
|
||||
/* Note that this doesn't work with highmem page */
|
||||
static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev,
|
||||
volatile void *address)
|
||||
|
|
@ -321,6 +321,7 @@ void __init swiotlb_free(void)
|
|||
free_bootmem_late(__pa(io_tlb_start),
|
||||
PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT));
|
||||
}
|
||||
io_tlb_nslabs = 0;
|
||||
}
|
||||
|
||||
static int is_swiotlb_buffer(phys_addr_t paddr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue