pgtable.h (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) pgtable.h (d460bb6c6417588dd8b0907d34f69b237918812a)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * S390 version
4 * Copyright IBM Corp. 1999, 2000
5 * Author(s): Hartmut Penner (hp@de.ibm.com)
6 * Ulrich Weigand (weigand@de.ibm.com)
7 * Martin Schwidefsky (schwidefsky@de.ibm.com)
8 *

--- 852 unchanged lines hidden (view full) ---

861
862#define __HAVE_ARCH_PTE_UNUSED
863static inline int pte_unused(pte_t pte)
864{
865 return pte_val(pte) & _PAGE_UNUSED;
866}
867
868/*
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * S390 version
4 * Copyright IBM Corp. 1999, 2000
5 * Author(s): Hartmut Penner (hp@de.ibm.com)
6 * Ulrich Weigand (weigand@de.ibm.com)
7 * Martin Schwidefsky (schwidefsky@de.ibm.com)
8 *

--- 852 unchanged lines hidden (view full) ---

861
862#define __HAVE_ARCH_PTE_UNUSED
863static inline int pte_unused(pte_t pte)
864{
865 return pte_val(pte) & _PAGE_UNUSED;
866}
867
868/*
869 * Extract the pgprot value from the given pte while at the same time making it
870 * usable for kernel address space mappings where fault driven dirty and
871 * young/old accounting is not supported, i.e _PAGE_PROTECT and _PAGE_INVALID
872 * must not be set.
873 */
874static inline pgprot_t pte_pgprot(pte_t pte)
875{
876 unsigned long pte_flags = pte_val(pte) & _PAGE_CHG_MASK;
877
878 if (pte_write(pte))
879 pte_flags |= pgprot_val(PAGE_KERNEL);
880 else
881 pte_flags |= pgprot_val(PAGE_KERNEL_RO);
882 pte_flags |= pte_val(pte) & mio_wb_bit_mask;
883
884 return __pgprot(pte_flags);
885}
886
887/*
869 * pgd/pmd/pte modification functions
870 */
871
872static inline void pgd_clear(pgd_t *pgd)
873{
874 if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R1)
875 pgd_val(*pgd) = _REGION1_ENTRY_EMPTY;
876}

--- 840 unchanged lines hidden ---
888 * pgd/pmd/pte modification functions
889 */
890
891static inline void pgd_clear(pgd_t *pgd)
892{
893 if ((pgd_val(*pgd) & _REGION_ENTRY_TYPE_MASK) == _REGION_ENTRY_TYPE_R1)
894 pgd_val(*pgd) = _REGION1_ENTRY_EMPTY;
895}

--- 840 unchanged lines hidden ---