Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

parisc: Fix encoding of swp_entry due to added SWP_EXCLUSIVE flag

Fix the __swp_offset() and __swp_entry() macros due to commit 6d239fc78c0b
("parisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE") which introduced the
SWP_EXCLUSIVE flag by reusing the _PAGE_ACCESSED flag.

Reported-by: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Tested-by: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: 6d239fc78c0b ("parisc/mm: support __HAVE_ARCH_PTE_SWP_EXCLUSIVE")
Cc: <stable@vger.kernel.org> # v6.3+

+4 -4
+4 -4
arch/parisc/include/asm/pgtable.h
··· 413 413 * For the 64bit version, the offset is extended by 32bit. 414 414 */ 415 415 #define __swp_type(x) ((x).val & 0x1f) 416 - #define __swp_offset(x) ( (((x).val >> 6) & 0x7) | \ 417 - (((x).val >> 8) & ~0x7) ) 416 + #define __swp_offset(x) ( (((x).val >> 5) & 0x7) | \ 417 + (((x).val >> 10) << 3) ) 418 418 #define __swp_entry(type, offset) ((swp_entry_t) { \ 419 419 ((type) & 0x1f) | \ 420 - ((offset & 0x7) << 6) | \ 421 - ((offset & ~0x7) << 8) }) 420 + ((offset & 0x7) << 5) | \ 421 + ((offset >> 3) << 10) }) 422 422 #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) 423 423 #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) 424 424