Re: [PATCH] ARC: Fix __swp_offset() implementation

2018-06-28 Thread Vineet Gupta
On 06/28/2018 04:59 PM, Alexey Brodkin wrote: > We encode offset from swapcache page in __swp_entry() this way, see [1]: > | /* Encode swap {type,off} tuple into PTE > | * We reserve 13 bits for 5-bit @type, keeping bits 12-5 zero, ensuring that > | * PAGE_PRESENT is zero in a PTE holding swap "i

[PATCH] ARC: Fix __swp_offset() implementation

2018-06-28 Thread Alexey Brodkin
We encode offset from swapcache page in __swp_entry() this way, see [1]: | /* Encode swap {type,off} tuple into PTE | * We reserve 13 bits for 5-bit @type, keeping bits 12-5 zero, ensuring that | * PAGE_PRESENT is zero in a PTE holding swap "identifier" | */ | #define __swp_entry(type, off)