Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d081b18 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge
Browse files

x86: unify pud_offset



Impact: cleanup

Unify and demacro pud_offset.

Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 7cfb8102
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -506,6 +506,11 @@ static inline unsigned pud_index(unsigned long address)
{
{
	return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
	return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
}
}

static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
{
	return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address);
}
#endif	/* PAGETABLE_LEVELS > 3 */
#endif	/* PAGETABLE_LEVELS > 3 */


#endif	/* __ASSEMBLY__ */
#endif	/* __ASSEMBLY__ */
+0 −2
Original line number Original line Diff line number Diff line
@@ -183,8 +183,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)
#define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)


/* PUD - Level3 access */
/* PUD - Level3 access */
#define pud_offset(pgd, address)					\
	((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address)))


static inline int pud_large(pud_t pte)
static inline int pud_large(pud_t pte)
{
{