projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
riscv: Fix missing PAGE_PFN_MASK
[platform/kernel/linux-rpi.git]
/
arch
/
riscv
/
include
/
asm
/
pgtable-64.h
diff --git
a/arch/riscv/include/asm/pgtable-64.h
b/arch/riscv/include/asm/pgtable-64.h
index
5c2aba5
..
dc42375
100644
(file)
--- a/
arch/riscv/include/asm/pgtable-64.h
+++ b/
arch/riscv/include/asm/pgtable-64.h
@@
-175,7
+175,7
@@
static inline pud_t pfn_pud(unsigned long pfn, pgprot_t prot)
static inline unsigned long _pud_pfn(pud_t pud)
{
static inline unsigned long _pud_pfn(pud_t pud)
{
- return
pud_val(pud) >> _PAGE_PFN_SHIFT
;
+ return
__page_val_to_pfn(pud_val(pud))
;
}
static inline pmd_t *pud_pgtable(pud_t pud)
}
static inline pmd_t *pud_pgtable(pud_t pud)
@@
-278,13
+278,13
@@
static inline p4d_t pfn_p4d(unsigned long pfn, pgprot_t prot)
static inline unsigned long _p4d_pfn(p4d_t p4d)
{
static inline unsigned long _p4d_pfn(p4d_t p4d)
{
- return
p4d_val(p4d) >> _PAGE_PFN_SHIFT
;
+ return
__page_val_to_pfn(p4d_val(p4d))
;
}
static inline pud_t *p4d_pgtable(p4d_t p4d)
{
if (pgtable_l4_enabled)
}
static inline pud_t *p4d_pgtable(p4d_t p4d)
{
if (pgtable_l4_enabled)
- return (pud_t *)pfn_to_virt(
p4d_val(p4d) >> _PAGE_PFN_SHIFT
);
+ return (pud_t *)pfn_to_virt(
__page_val_to_pfn(p4d_val(p4d))
);
return (pud_t *)pud_pgtable((pud_t) { p4d_val(p4d) });
}
return (pud_t *)pud_pgtable((pud_t) { p4d_val(p4d) });
}
@@
-292,7
+292,7
@@
static inline pud_t *p4d_pgtable(p4d_t p4d)
static inline struct page *p4d_page(p4d_t p4d)
{
static inline struct page *p4d_page(p4d_t p4d)
{
- return pfn_to_page(
p4d_val(p4d) >> _PAGE_PFN_SHIFT
);
+ return pfn_to_page(
__page_val_to_pfn(p4d_val(p4d))
);
}
#define pud_index(addr) (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
}
#define pud_index(addr) (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
@@
-347,7
+347,7
@@
static inline void pgd_clear(pgd_t *pgd)
static inline p4d_t *pgd_pgtable(pgd_t pgd)
{
if (pgtable_l5_enabled)
static inline p4d_t *pgd_pgtable(pgd_t pgd)
{
if (pgtable_l5_enabled)
- return (p4d_t *)pfn_to_virt(
pgd_val(pgd) >> _PAGE_PFN_SHIFT
);
+ return (p4d_t *)pfn_to_virt(
__page_val_to_pfn(pgd_val(pgd))
);
return (p4d_t *)p4d_pgtable((p4d_t) { pgd_val(pgd) });
}
return (p4d_t *)p4d_pgtable((p4d_t) { pgd_val(pgd) });
}
@@
-355,7
+355,7
@@
static inline p4d_t *pgd_pgtable(pgd_t pgd)
static inline struct page *pgd_page(pgd_t pgd)
{
static inline struct page *pgd_page(pgd_t pgd)
{
- return pfn_to_page(
pgd_val(pgd) >> _PAGE_PFN_SHIFT
);
+ return pfn_to_page(
__page_val_to_pfn(pgd_val(pgd))
);
}
#define pgd_page(pgd) pgd_page(pgd)
}
#define pgd_page(pgd) pgd_page(pgd)