“3c810c613a9d61eb70735cfb85fe5db6e0331bae”上不存在“drivers/gpu/drm/omapdrm/omap_gem.c”
提交 6b42a7ea 编写于 作者: S Stefano Stabellini

swiotlb-xen: static inline xen_phys_to_bus, xen_bus_to_phys, xen_virt_to_bus...

swiotlb-xen: static inline xen_phys_to_bus, xen_bus_to_phys, xen_virt_to_bus and range_straddles_page_boundary

This functions are small and called frequently. Static inline them.
Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
上级 3d24bbd7
...@@ -72,17 +72,17 @@ static unsigned long xen_io_tlb_nslabs; ...@@ -72,17 +72,17 @@ static unsigned long xen_io_tlb_nslabs;
static u64 start_dma_addr; static u64 start_dma_addr;
static dma_addr_t xen_phys_to_bus(phys_addr_t paddr) static inline dma_addr_t xen_phys_to_bus(phys_addr_t paddr)
{ {
return phys_to_machine(XPADDR(paddr)).maddr; return phys_to_machine(XPADDR(paddr)).maddr;
} }
static phys_addr_t xen_bus_to_phys(dma_addr_t baddr) static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr)
{ {
return machine_to_phys(XMADDR(baddr)).paddr; return machine_to_phys(XMADDR(baddr)).paddr;
} }
static dma_addr_t xen_virt_to_bus(void *address) static inline dma_addr_t xen_virt_to_bus(void *address)
{ {
return xen_phys_to_bus(virt_to_phys(address)); return xen_phys_to_bus(virt_to_phys(address));
} }
...@@ -105,7 +105,7 @@ static int check_pages_physically_contiguous(unsigned long pfn, ...@@ -105,7 +105,7 @@ static int check_pages_physically_contiguous(unsigned long pfn,
return 1; return 1;
} }
static int range_straddles_page_boundary(phys_addr_t p, size_t size) static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
{ {
unsigned long pfn = PFN_DOWN(p); unsigned long pfn = PFN_DOWN(p);
unsigned int offset = p & ~PAGE_MASK; unsigned int offset = p & ~PAGE_MASK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册