ARM: update __swp_entry_to_pte() to use PTE_TYPE_FAULT
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 13 May 2021 10:53:17 +0000 (11:53 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 7 Jun 2021 11:55:30 +0000 (12:55 +0100)
commitd619f90fae23a31eda3a06e762a17dcdc7fbd4e8
treee1bdbcc213f4f3a3e6c9e290736fe49c4672746c
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
ARM: update __swp_entry_to_pte() to use PTE_TYPE_FAULT

Swap entries use a faulting PTE which have the least two significant
bits as zero. Due to this, the use of PTE_TYPE_FAULT was overlooked,
but really should have been included in __swp_entry_to_pte().

Convert this macro to use PTE_TYPE_FAULT to properly document what is
going on here, and use __pte() to convert the swp_entry_t to a pte_t.

This results in no change to the resulting kernel image.

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/pgtable.h