Lines Matching refs:root
77 static inline bool root_present(struct root_entry *root) in root_present() argument
79 return (root->val & 1); in root_present()
81 static inline void set_root_present(struct root_entry *root) in set_root_present() argument
83 root->val |= 1; in set_root_present()
85 static inline void set_root_value(struct root_entry *root, unsigned long value) in set_root_value() argument
87 root->val |= value & VTD_PAGE_MASK; in set_root_value()
91 get_context_addr_from_root(struct root_entry *root) in get_context_addr_from_root() argument
94 (root_present(root)?phys_to_virt( in get_context_addr_from_root()
95 root->val & VTD_PAGE_MASK) : in get_context_addr_from_root()
474 struct root_entry *root; in device_to_context_entry() local
480 root = &iommu->root_entry[bus]; in device_to_context_entry()
481 context = get_context_addr_from_root(root); in device_to_context_entry()
490 set_root_value(root, phy_addr); in device_to_context_entry()
491 set_root_present(root); in device_to_context_entry()
492 __iommu_flush_cache(iommu, root, sizeof(*root)); in device_to_context_entry()
500 struct root_entry *root; in device_context_mapped() local
506 root = &iommu->root_entry[bus]; in device_context_mapped()
507 context = get_context_addr_from_root(root); in device_context_mapped()
520 struct root_entry *root; in clear_context_table() local
525 root = &iommu->root_entry[bus]; in clear_context_table()
526 context = get_context_addr_from_root(root); in clear_context_table()
537 struct root_entry *root; in free_context_table() local
547 root = &iommu->root_entry[i]; in free_context_table()
548 context = get_context_addr_from_root(root); in free_context_table()
748 struct root_entry *root; in iommu_alloc_root_entry() local
751 root = (struct root_entry *)alloc_pgtable_page(); in iommu_alloc_root_entry()
752 if (!root) in iommu_alloc_root_entry()
755 __iommu_flush_cache(iommu, root, ROOT_SIZE); in iommu_alloc_root_entry()
758 iommu->root_entry = root; in iommu_alloc_root_entry()