From patchwork Thu Sep 21 14:16:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Xiao W" X-Patchwork-Id: 143139 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5295676vqi; Thu, 21 Sep 2023 20:29:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHm6/Z5l/KqwsxQaEHfOhHD5IJjGIosG3yt2X4nr6BIe/ZnVTRiBICiyC+yK+vxXU04p9zQ X-Received: by 2002:a05:6a00:cc8:b0:682:4ef7:9b0b with SMTP id b8-20020a056a000cc800b006824ef79b0bmr8794351pfv.0.1695353352471; Thu, 21 Sep 2023 20:29:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695353352; cv=none; d=google.com; s=arc-20160816; b=XvU6t+fJAGyNO5PVv7DnEHTLcYFEdNoiKkPitLxsVAdC0Pz/kb15HTl0TRsYlOcBXC ccIFTL6mRmY3a2qPjNqhAK4IEnzpNSBZA8aphGi7M/ARSLkfHr2DxpXHwdANs4P8VqYx b38rr7g1zOAR0X5PFP2NdSSvkwoLDEbiY94I+s/h/c21Ia4iibMkGg4ckD2Lw8uJaVjN WmXF/BMcg3NZIrakLDmtg+cnVf3iw96/O/jzkgbbMkKVnoZNguGyuEi5Drxx+xS9spTv kq+M3mMEFOrsyw6ptZsp5ISR+dL2VHVo4MU66DAkVH+L2ClFWi3eC5quekvp5+QV75jP xbIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=m2P3gbJURDN3hYYSYvalNNM/sH+OvuOl053prv9M0Zo=; fh=OP4v3zel9qpkE3wSu9smtnPS+0CeE1RPPZiSp6jwiJ8=; b=vewVOKlcZRUPu9dC3A88pIX5x0uTuUXakVojWaCNsGUm1nXgZc2bn/mzxR1V1zukzT /sRqv6YRbJ3C+xUYnLDdlOoH5IiFccWMLU5Vnuk/rbva+6oc+Nxv2AX6ES3il9Qlqlds +Y7PRO+q7+vB6G6jzzs1yLzGqVBe8xwj2q3mqnYjit/hASfrummMBziTtltiaoEK5osp r9jTycazCZ8g73soOZXoK4ovI874YZNBML+JWWrnx6KJHAdO+lYTGpheQoYSvfjeKbGT Q2pQ4Gc7Xa4IlEAVG1EwAJL912CkMsq5Q800+s38JOSd6u+sQ6fcB/pdp1DUVTD8pEcm cdrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Nz11Iaph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bd34-20020a056a0027a200b0068a685bf30fsi2794560pfb.271.2023.09.21.20.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 20:29:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Nz11Iaph; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 06A1282990F2; Thu, 21 Sep 2023 12:39:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbjIUTjB (ORCPT + 28 others); Thu, 21 Sep 2023 15:39:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjIUTir (ORCPT ); Thu, 21 Sep 2023 15:38:47 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E52DBA0C1E for ; Thu, 21 Sep 2023 10:57:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695319055; x=1726855055; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zasYRfWXsYur9eNYrfG33BQQNdIZEYY/Xi5N1N8P2TU=; b=Nz11IaphBSMtPstlivTbQbIodZHcUlUhk1BC1OGOMtNKfeT+A3lMVjNj dhrRYNd1VoJX5w4oTDUT1hsvnKFNUQkJeK/nSN5uxJeyZ2DUaaJnNn/e3 nYcpUT/C5VBQT6B4p9rb99I2cNy+nrUCPw6LqbuibOMmgBYuvL8PNQY5k ZcZB+l/wmV3bw602hFGuB9CUw3qBxEl8odUzKhr0fmU4dx7RB5iBJj+tF PFdHqKMPKARdaDkH80/l9InSM6TUhGI72XZSitQOMbeRMVOmd3TzW9oFF tP5U8z9vuTKspv+eQLcqM565Ismum9yzaO11ckYKZsdnx0+53mP83J+p8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="383281997" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="383281997" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2023 07:08:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="1077899614" X-IronPort-AV: E=Sophos;i="6.03,165,1694761200"; d="scan'208";a="1077899614" Received: from xiao-desktop.sh.intel.com ([10.239.46.158]) by fmsmga005.fm.intel.com with ESMTP; 21 Sep 2023 07:08:16 -0700 From: Xiao Wang To: paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, david@redhat.com, Xiao Wang Subject: [PATCH] riscv/mm: Fix the comment for swap pte format Date: Thu, 21 Sep 2023 22:16:52 +0800 Message-Id: <20230921141652.2657054-1-xiao.w.wang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 21 Sep 2023 12:39:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777695212568590313 X-GMAIL-MSGID: 1777706836802230349 Swap type takes bits 7-11 and swap offset should start from bit 12. Signed-off-by: Xiao Wang --- arch/riscv/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index e05b5dc1f0cb..e94a2998e81e 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -812,7 +812,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