Lines Matching +full:x +full:- +full:mask

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2008-2010 Nokia Corporation
16 * "L2 table" address mask and size definitions.
20 #define IOPGD_MASK (~(IOPGD_SIZE - 1))
23 * "section" address mask and size definitions.
27 #define IOSECTION_MASK (~(IOSECTION_SIZE - 1))
30 * "supersection" address mask and size definitions.
34 #define IOSUPER_MASK (~(IOSUPER_SIZE - 1))
36 #define PTRS_PER_IOPGD (1UL << (32 - IOPGD_SHIFT))
40 * "small page" address mask and size definitions.
44 #define IOPTE_MASK (~(IOPTE_SIZE - 1))
47 * "large page" address mask and size definitions.
51 #define IOLARGE_MASK (~(IOLARGE_SIZE - 1))
53 #define PTRS_PER_IOPTE (1UL << (IOPGD_SHIFT - IOPTE_SHIFT))
59 * omap_iommu_translate() - va to pa translation
62 * @mask: omap iommu descriptor mask
67 dma_addr_t mask) in omap_iommu_translate() argument
69 return (d & mask) | (va & (~mask)); in omap_iommu_translate()
79 #define iopgd_is_table(x) (((x) & 3) == IOPGD_TABLE) argument
80 #define iopgd_is_section(x) (((x) & (1 << 18 | 3)) == IOPGD_SECTION) argument
81 #define iopgd_is_super(x) (((x) & (1 << 18 | 3)) == IOPGD_SUPER) argument
86 #define iopte_is_small(x) (((x) & 2) == IOPTE_SMALL) argument
87 #define iopte_is_large(x) (((x) & 3) == IOPTE_LARGE) argument
89 /* to find an entry in a page-table-directory */
90 #define iopgd_index(da) (((da) >> IOPGD_SHIFT) & (PTRS_PER_IOPGD - 1))
91 #define iopgd_offset(obj, da) ((obj)->iopgd + iopgd_index(da))
93 #define iopgd_page_paddr(iopgd) (*iopgd & ~((1 << 10) - 1))
96 /* to find an entry in the second-level page table. */
97 #define iopte_index(da) (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))