mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
x86: unify pud_present
Impact: cleanup Unify and demacro pud_present. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
parent
7c683851d9
commit
5ba7c91341
@ -28,11 +28,6 @@ static inline int pud_bad(pud_t pud)
|
|||||||
return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
|
return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int pud_present(pud_t pud)
|
|
||||||
{
|
|
||||||
return pud_val(pud) & _PAGE_PRESENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Rules for using set_pte: the pte being assigned *must* be
|
/* Rules for using set_pte: the pte being assigned *must* be
|
||||||
* either not present or in a state where the hardware will
|
* either not present or in a state where the hardware will
|
||||||
* not attempt to update the pte. In places where this is
|
* not attempt to update the pte. In places where this is
|
||||||
|
@ -445,6 +445,13 @@ static inline int pte_present(pte_t a)
|
|||||||
return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE);
|
return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PAGETABLE_LEVELS > 2
|
||||||
|
static inline int pud_present(pud_t pud)
|
||||||
|
{
|
||||||
|
return pud_val(pud) & _PAGE_PRESENT;
|
||||||
|
}
|
||||||
|
#endif /* PAGETABLE_LEVELS > 2 */
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
|
@ -194,7 +194,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
|
|||||||
#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
|
#define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
|
||||||
#define pud_offset(pgd, address) \
|
#define pud_offset(pgd, address) \
|
||||||
((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address)))
|
((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address)))
|
||||||
#define pud_present(pud) (pud_val((pud)) & _PAGE_PRESENT)
|
|
||||||
|
|
||||||
static inline int pud_large(pud_t pte)
|
static inline int pud_large(pud_t pte)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user