Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp440117rwl; Wed, 9 Aug 2023 17:39:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJpIdoF8MJcZ3IJjw148683rxpTSyRXe7pplJ/vzUgx+hAT9F1J+FDr5+q3NrFpGapnWVN X-Received: by 2002:a17:903:41d1:b0:1b8:16c7:a786 with SMTP id u17-20020a17090341d100b001b816c7a786mr1043364ple.4.1691627944191; Wed, 09 Aug 2023 17:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691627944; cv=none; d=google.com; s=arc-20160816; b=Sd/dEkpCOvpmNg6pan+sC/5clfxUkZOn7uCzv/5hZLLLxLrwDNCuHIIcDOW6PEXqyS vYNt3Mt/EBpyGKAnx/NS7QA8KHtYU7q+HEfcQoHbjwG639GhXYODVG1QbwfOt/3Bukyb wSNavxHYmhwuhcUvTu/cniwjSgYyXJWlxz1gVmsl2Ma1dfdbjZWvSAGMM7AHkfQ5hfz1 Xv515ZOIroOnP0TLqzZNHDlXO3t60iDtvU5yJtAqXSXPYomWKbLKnky6pEcAkl1ViPWf 4ucUggm2CRR+NK2CDmzBP4B8Yi3ReJu8d1UxKSdh3pJl+u4ryQL4adpJ5IsWKN3YTS0S ek+g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yZ0IVnzj5yL9SoUKLkLsC9JEkQ8y1OJuZ3kbIa3etj8=; fh=7AUu9WDHec3ojD+PBWP8kj3GITT/pOnwiCBaYopXpyU=; b=CFSRgtkXbOM0FR5brznywMZs+FyKlNFkh3zLZ7G7OKhfB+zde7hBLKyNffFsUzZykn 4/h1MJJcFRZ3FIpraWfAcTKEk43/aMVA0ZemXMvn3RxTetbJRK+bS5AR6PamrJgUomBr Gxxgjk2F78Y+7tkgK9hqiSiDHSVmlCHtVoIFj/facJ90SAGQ1DPOQweEr0namUy8D1xH jLlGlv148Ga+skUXuUrar8rPR1rdKksJXnuDCrSF3kezaVPXH4QGtpaBjsGl1IrEdrPW 4OcJZwSwZauHc3qM5jOSRwFE+HO71JXelB/XtIlOHX3uDdAPNCatyRT9wMvf/iyVPg9V MRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=DPqz69bv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c14-20020a170903234e00b001ab29e00303si287122plh.426.2023.08.09.17.38.52; Wed, 09 Aug 2023 17:39:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=DPqz69bv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232439AbjHIXYe (ORCPT + 99 others); Wed, 9 Aug 2023 19:24:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232257AbjHIXYa (ORCPT ); Wed, 9 Aug 2023 19:24:30 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E53D1BCF for ; Wed, 9 Aug 2023 16:24:26 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1bbc64f9a91so3769895ad.0 for ; Wed, 09 Aug 2023 16:24:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1691623465; x=1692228265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yZ0IVnzj5yL9SoUKLkLsC9JEkQ8y1OJuZ3kbIa3etj8=; b=DPqz69bvmOi0drz5sANCyS+ejDOE4tK2aPT6CgqMeO23pKOSYzYTRtQqX2sUrjiJmC RrSZUkbRkQCVs7wzIENC1wePmX11ZnFj1kEpsCllQfjH8OdDSh+ynaBkruLDhKbxi/y7 hNKWT+H9FuM6BoaCv58BuAIhRmwJFzvP7uVm9tr4dtvvEe/YDApQvNm32rOzdMYd7vlm L6nJ3tcaqJbaF9pxp0H0xccKqzMXdCN5FaL8hF9CFS4XTf6Avl0vGc+i3JB23oEo+UYb B70BdpKfpKDQSAPKlmFJOXdwGmfAe0rv+GpuSvzqq6Fu2b/L19mwtUPiLUPiPFcaAgxf UibQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691623465; x=1692228265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yZ0IVnzj5yL9SoUKLkLsC9JEkQ8y1OJuZ3kbIa3etj8=; b=ZLqwa5IL2bXQhdw3tU0CttUybTVLrPiDfK9QongMrOi4KquqEqFtG4xAIxFbrLUl1n kMCg1qdugnclhYEvHRhk82JtKjTuJEgWOIG2Fh0Bjy5CAPVPzEzGyGmNw6VltYm0ns+x D4FXkqT3hpk1ptz4tT6U5gyfZ8mWRxugmoCL0c5RljGLdBK2h5wjU8JeVq7j/iNq3OpD 0y5PhYjoaIH83xn0ngIyicQab0hzdEFD19scibYmh01dSynUP1O+dqiqgAsfgnAZ9cWv q83p6u4l9w7i+XLOAawAWjIDXett4nDRhJzxeJo6YRZHmRtGOgIFZtEgbki7R+LdmuJn s6+Q== X-Gm-Message-State: AOJu0Yx77tDlv0BQf7AW/amiovthOO2+MEpkOLuz3FDXtLDkOII0vJeA G+X2PBJ6Sj6X1PDbO+ONjf+ykg== X-Received: by 2002:a17:903:110f:b0:1b8:b5f8:c485 with SMTP id n15-20020a170903110f00b001b8b5f8c485mr741164plh.50.1691623465574; Wed, 09 Aug 2023 16:24:25 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id l18-20020a170902d35200b001b54d064a4bsm82765plk.259.2023.08.09.16.24.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 16:24:25 -0700 (PDT) From: Charlie Jenkins To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: charlie@rivosinc.com, conor@kernel.org, paul.walmsley@sifive.com, palmer@rivosinc.com, aou@eecs.berkeley.edu, anup@brainfault.org, konstantin@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, mick@ics.forth.gr, jrtc27@jrtc27.com, rdunlap@infradead.org, alexghiti@rivosinc.com Subject: [PATCH v10 3/4] RISC-V: mm: Update pgtable comment documentation Date: Wed, 9 Aug 2023 16:22:03 -0700 Message-ID: <20230809232218.849726-4-charlie@rivosinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230809232218.849726-1-charlie@rivosinc.com> References: <20230809232218.849726-1-charlie@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sv57 is supported in the kernel so pgtable.h should reflect that. Signed-off-by: Charlie Jenkins Reviewed-by: Alexandre Ghiti --- arch/riscv/include/asm/pgtable.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index bb0b9ac7b581..2c5f6c8edc8a 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -851,14 +851,16 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte) * Task size is 0x4000000000 for RV64 or 0x9fc00000 for RV32. * Note that PGDIR_SIZE must evenly divide TASK_SIZE. * Task size is: - * - 0x9fc00000 (~2.5GB) for RV32. - * - 0x4000000000 ( 256GB) for RV64 using SV39 mmu - * - 0x800000000000 ( 128TB) for RV64 using SV48 mmu + * - 0x9fc00000 (~2.5GB) for RV32. + * - 0x4000000000 ( 256GB) for RV64 using SV39 mmu + * - 0x800000000000 ( 128TB) for RV64 using SV48 mmu + * - 0x100000000000000 ( 64PB) for RV64 using SV57 mmu * * Note that PGDIR_SIZE must evenly divide TASK_SIZE since "RISC-V * Instruction Set Manual Volume II: Privileged Architecture" states that * "load and store effective addresses, which are 64bits, must have bits * 63–48 all equal to bit 47, or else a page-fault exception will occur." + * Similarly for SV57, bits 63–57 must be equal to bit 56. */ #ifdef CONFIG_64BIT #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2) -- 2.34.1