• Reza Arbab's avatar
    powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask · 865a9432
    Reza Arbab authored
    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: default avatarCharles Johns <crjohns@us.ibm.com>
    Signed-off-by: default avatarReza Arbab <arbab@linux.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    865a9432
pgtable.h 38 KB