mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
swiotlb: Convert swiotlb_force from int to enum
Convert the flag swiotlb_force from an int to an enum, to prepare for the advent of more possible values. Suggested-by: Konrad Rzeszutek Wilk <[email protected]> Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
This commit is contained in:
parent
6c206e4d99
commit
ae7871be18
8 changed files with 27 additions and 18 deletions
|
|
@ -392,7 +392,7 @@ dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page,
|
|||
if (dma_capable(dev, dev_addr, size) &&
|
||||
!range_straddles_page_boundary(phys, size) &&
|
||||
!xen_arch_need_swiotlb(dev, phys, dev_addr) &&
|
||||
!swiotlb_force) {
|
||||
(swiotlb_force != SWIOTLB_FORCE)) {
|
||||
/* we are not interested in the dma_addr returned by
|
||||
* xen_dma_map_page, only in the potential cache flushes executed
|
||||
* by the function. */
|
||||
|
|
@ -552,7 +552,7 @@ xen_swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
|
|||
phys_addr_t paddr = sg_phys(sg);
|
||||
dma_addr_t dev_addr = xen_phys_to_bus(paddr);
|
||||
|
||||
if (swiotlb_force ||
|
||||
if (swiotlb_force == SWIOTLB_FORCE ||
|
||||
xen_arch_need_swiotlb(hwdev, paddr, dev_addr) ||
|
||||
!dma_capable(hwdev, dev_addr, sg->length) ||
|
||||
range_straddles_page_boundary(paddr, sg->length)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue