Skip to content

Commit

Permalink
riscv/mm: Fix the comment for swap pte format
Browse files Browse the repository at this point in the history
Swap type takes bits 7-11 and swap offset should start from bit 12.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
  • Loading branch information
XiaoWang1772 authored and Björn Töpel committed Oct 13, 2023
1 parent 9c6b164 commit 23a5f31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
* bit 5: _PAGE_PROT_NONE (zero)
* bit 6: exclusive marker
* bits 7 to 11: swap type
* bits 11 to XLEN-1: swap offset
* bits 12 to XLEN-1: swap offset
*/
#define __SWP_TYPE_SHIFT 7
#define __SWP_TYPE_BITS 5
Expand Down

0 comments on commit 23a5f31

Please sign in to comment.