[Crash-utility] [PATCH 1/2] ppc64/book3s: use the same masked bit values for 4K and 64K pagesizes
Dave Anderson
anderson at redhat.com
Tue Sep 27 14:17:07 UTC 2016
Hari,
Looks good -- queued for crash-7.1.6:
https://github.com/crash-utility/crash/commit/312d354f3bef2203a23fbbd3b38a9fe8039c2f3e
Thanks,
Dave
----- Original Message -----
> Starting with kernel v4.7, masked bit values are the same for 4K and
> 64K pagesizes. This patch updates here accordingly.
>
> Signed-off-by: Hari Bathini <hbathini at linux.vnet.ibm.com>
> ---
> defs.h | 4 ++++
> ppc64.c | 14 ++++++++++----
> 2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/defs.h b/defs.h
> index e730be3..142149e 100644
> --- a/defs.h
> +++ b/defs.h
> @@ -3848,6 +3848,10 @@ struct efi_memory_desc_t {
> #define PTE_RPN_MASK_L4_4_6 (((1UL << PTE_RPN_SIZE_L4_4_6) - 1) <<
> PAGESHIFT())
> #define PTE_RPN_SHIFT_L4_4_6 PAGESHIFT()
>
> +#define PGD_MASKED_BITS_4_7 0xc0000000000000ffUL
> +#define PUD_MASKED_BITS_4_7 0xc0000000000000ffUL
> +#define PMD_MASKED_BITS_4_7 0xc0000000000000ffUL
> +
> #define PD_HUGE 0x8000000000000000
> #define HUGE_PTE_MASK 0x03
> #define HUGEPD_SHIFT_MASK 0x3f
> diff --git a/ppc64.c b/ppc64.c
> index 83ebd16..17c9a19 100644
> --- a/ppc64.c
> +++ b/ppc64.c
> @@ -471,10 +471,16 @@ ppc64_init(int when)
> }
>
> m->pte_rpn_mask = PTE_RPN_MASK_DEFAULT;
> - if (!(machdep->flags & BOOK3E) &&
> - (THIS_KERNEL_VERSION >= LINUX(4,6,0))) {
> - m->pte_rpn_mask = PTE_RPN_MASK_L4_4_6;
> - m->pte_rpn_shift = PTE_RPN_SHIFT_L4_4_6;
> + if (!(machdep->flags & BOOK3E)) {
> + if (THIS_KERNEL_VERSION >= LINUX(4,6,0)) {
> + m->pte_rpn_mask = PTE_RPN_MASK_L4_4_6;
> + m->pte_rpn_shift = PTE_RPN_SHIFT_L4_4_6;
> + }
> + if (THIS_KERNEL_VERSION >= LINUX(4,7,0)) {
> + m->pgd_masked_bits = PGD_MASKED_BITS_4_7;
> + m->pud_masked_bits = PUD_MASKED_BITS_4_7;
> + m->pmd_masked_bits = PMD_MASKED_BITS_4_7;
> + }
> }
>
> /* Compute ptrs per each level */
>
>
More information about the Crash-utility
mailing list