]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask
authorReza Arbab <arbab@linux.ibm.com>
Mon, 28 Jan 2019 17:31:42 +0000 (11:31 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 30 Jan 2019 13:36:06 +0000 (00:36 +1100)
commita559d96cc19b26a67ba4f8983174d416f04d240c
treebd3e61c92bd1b1ca438f5d796900310481f41e9a
parent39421335d49b93e0eb3ba19a3ad457b032af666c
powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

In htab_convert_pte_flags(), _PAGE_CACHE_CTL is used to check for the
_PAGE_SAO flag:

  else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO)
          rflags |= (HPTE_R_W | HPTE_R_I | HPTE_R_M);

But, it isn't defined to include that flag:

  #define _PAGE_CACHE_CTL (_PAGE_NON_IDEMPOTENT | _PAGE_TOLERANT)

This happens to work, but only because of the flag values:

  #define _PAGE_SAO               0x00010 /* Strong access order */
  #define _PAGE_NON_IDEMPOTENT    0x00020 /* non idempotent memory */
  #define _PAGE_TOLERANT          0x00030 /* tolerant memory, cache inhibited */

To prevent any issues if these particulars ever change, add _PAGE_SAO to
the mask.

Suggested-by: Charles Johns <crjohns@us.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/pgtable.h