提交 c3c75eb7 编写于 作者: J Joerg Roedel

iommu/vt-d: Don't use magic number in dma_pte_superpage

Use the already defined DMA_PTE_LARGE_PAGE for testing
instead of hardcoding the value again.
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 9b27e82d
...@@ -304,7 +304,7 @@ static inline bool dma_pte_present(struct dma_pte *pte) ...@@ -304,7 +304,7 @@ static inline bool dma_pte_present(struct dma_pte *pte)
static inline bool dma_pte_superpage(struct dma_pte *pte) static inline bool dma_pte_superpage(struct dma_pte *pte)
{ {
return (pte->val & (1 << 7)); return (pte->val & DMA_PTE_LARGE_PAGE);
} }
static inline int first_pte_in_page(struct dma_pte *pte) static inline int first_pte_in_page(struct dma_pte *pte)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册