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.
15 * Drivers could subclass this, and if it's a page-directory, typically
23 * struct xe_pt_walk - Embeddable struct for walk parameters
29 * @shifts: Array of page-table entry shifts used for the
31 * page-shift as the first entry. It's legal for this pointer to be
39 * to the address range and called only for entries that are
40 * shared with other address ranges. Such entries are referred to
47 * typedef xe_pt_entry_fn - gpu page-table-walk callback-function
51 * @addr: The virtual address.
52 * @next: The virtual address for the next call, or end address.
53 * @child: Pointer to pointer to child page-table at this @offset. The
66 * struct xe_pt_walk_ops - Walk callbacks.
70 * @pt_entry: Callback to be called for each page table entry prior
76 * @pt_post_descend: Callback to be called for each page table entry
90 * xe_pt_covers - Whether the address range covers an entire entry in @level
97 * entry can be inserted at this @level.
99 * Return: Whether the range provided covers exactly an entry at this level.
104 u64 pt_size = 1ull << walk->shifts[level]; in xe_pt_covers()
106 return end - addr == pt_size && IS_ALIGNED(addr, pt_size); in xe_pt_covers()
110 * xe_pt_num_entries: Number of page-table entries of a given range at this
112 * @addr: Start address.
113 * @end: End address.
124 u64 pt_size = 1ull << walk->shifts[level]; in xe_pt_num_entries()
126 return (round_up(end, pt_size) - round_down(addr, pt_size)) >> in xe_pt_num_entries()
127 walk->shifts[level]; in xe_pt_num_entries()
131 * xe_pt_offset: Offset of the page-table entry for a given address.
132 * @addr: The address.
136 * Return: The page table entry offset for the given address in a
142 if (level < walk->max_level) in xe_pt_offset()
143 addr &= ((1ull << walk->shifts[level + 1]) - 1); in xe_pt_offset()
145 return addr >> walk->shifts[level]; in xe_pt_offset()