Lines Matching +full:entry +full:- +full:address
1 /* SPDX-License-Identifier: GPL-2.0-only */
12 * struct xe_ptw - base class for driver pagetable subclassing.
16 * Drivers could subclass this, and if it's a page-directory, typically
25 * struct xe_pt_walk - Embeddable struct for walk parameters
31 * @shifts: Array of page-table entry shifts used for the
33 * page-shift as the first entry. It's legal for this pointer to be
41 * to the address range and called only for entries that are
42 * shared with other address ranges. Such entries are referred to
51 * typedef xe_pt_entry_fn - gpu page-table-walk callback-function
55 * @addr: The virtual address.
56 * @next: The virtual address for the next call, or end address.
57 * @child: Pointer to pointer to child page-table at this @offset. The
70 * struct xe_pt_walk_ops - Walk callbacks.
74 * @pt_entry: Callback to be called for each page table entry prior
80 * @pt_post_descend: Callback to be called for each page table entry
94 * xe_pt_covers - Whether the address range covers an entire entry in @level
101 * entry can be inserted at this @level.
103 * Return: Whether the range provided covers exactly an entry at this level.
108 u64 pt_size = 1ull << walk->shifts[level]; in xe_pt_covers()
110 return end - addr == pt_size && IS_ALIGNED(addr, pt_size); in xe_pt_covers()
114 * xe_pt_num_entries: Number of page-table entries of a given range at this
116 * @addr: Start address.
117 * @end: End address.
128 u64 pt_size = 1ull << walk->shifts[level]; in xe_pt_num_entries()
130 return (round_up(end, pt_size) - round_down(addr, pt_size)) >> in xe_pt_num_entries()
131 walk->shifts[level]; in xe_pt_num_entries()
135 * xe_pt_offset: Offset of the page-table entry for a given address.
136 * @addr: The address.
140 * Return: The page table entry offset for the given address in a
146 if (level < walk->max_level) in xe_pt_offset()
147 addr &= ((1ull << walk->shifts[level + 1]) - 1); in xe_pt_offset()
149 return addr >> walk->shifts[level]; in xe_pt_offset()