Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp1821709rwp; Thu, 13 Jul 2023 17:49:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlFwNOCgGFlUaz2S41yfeVFr5nm93MjyZihONQTAOgx92FsU77H4MWQ0xRmDmh/Mrk62sQdb X-Received: by 2002:a17:906:151:b0:992:3ac7:a2d8 with SMTP id 17-20020a170906015100b009923ac7a2d8mr2594173ejh.37.1689295759809; Thu, 13 Jul 2023 17:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689295759; cv=none; d=google.com; s=arc-20160816; b=qpihliS/qUsxeez0zR6yNf1h/YQCEEpJ6SRIMfwINsmwS8sXRDB2SEso2wXg08iSJY Tf1I7TuxhHK1imZFv3Is8u7YfbLjq613VoHtwbTb/Pye0L+bf2MgDcl4dfygpBcqQMLP nQX2aVKH2SCZWuvz+3omkV0hbfFcpg6gX+kwqEeUmO2b6Rc6QsqOZLTe8b5R6jaxsaXP 7LvDT8RUDblUrOtGYAlyjJXOY/MwYDuWKEu+NMpoAslQRXn/fO26WX7mUq88BpDykQlr k4uzh8X1Vo+Z5fHpl+EVl9S3iP+maJFkhWhqDi8M3JFS98gd3v89ozOc+9NpcH4KUSpl rDnA== 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=WogNqZmM5qIDEUwvyRv9RC9FRo2r68Wx4DIsyw3FtoM=; fh=My2jiibqoUeMwsqLbgcWgl692t5ymcXdwYlfrhkAJHk=; b=TFlWVB0XBs016vcI9D+KrT/TCSIregmghzNxf9RBGPIYopEZg+2Gg/T2i5fCR0dgFu v0DsT9Z+HEXB+5vPA/25BWs5FqsljXTWhR8GsMPphEy+XEfGG3CE3DoChGyZ7VjNRi+d pfb/xC0vqgIAXfX6GAELvmQVKdG5ZGK/32ZeaILyHYSQQL/pOmwPu80nXsuY1rL5BVkZ Z5m+TSGByazwg7jt0oXkT8WUtGX8KNGj1E+w0E7XWMrjIr0KBw3d1LBYctyXH3xSfqVR gwJxHG3yq1n8cC/2qCnoP7lGhT/tXsCvcyBYk1fb1w+h0dYxdrz4MmNvFDVbCS8/ubQK PDAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=scmvmusi; 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 gx3-20020a170906f1c300b009827b36b8ffsi8708629ejb.718.2023.07.13.17.48.55; Thu, 13 Jul 2023 17:49:19 -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=scmvmusi; 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 S234465AbjGNAPI (ORCPT + 99 others); Thu, 13 Jul 2023 20:15:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233757AbjGNAPE (ORCPT ); Thu, 13 Jul 2023 20:15:04 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F05372D65 for ; Thu, 13 Jul 2023 17:15:00 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-666ecf9a081so1320354b3a.2 for ; Thu, 13 Jul 2023 17:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1689293700; x=1689898500; 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=WogNqZmM5qIDEUwvyRv9RC9FRo2r68Wx4DIsyw3FtoM=; b=scmvmusinfT3X+K4TbCSiNrHD6GpfF3g/xu+9lahYYjU4ktFpp9PuohAB7wYjo2/7I /Mw7Dgl25dGudOqR4ayvcdQwHPhIOUDVymcob+uLiwh7kXLYl9glDGllZn9xoAMoP1is JCHFj5AIY7Nq6ca/fp7M1KmHBu5NUIQcKKnZx+xUDj2awa23VFRB8c4lTb/leJGEhfER 4S0RS8ULwsXWaVxCTPqOQTgpYI4hHeBp8dZ5ZB4/0RGM+X4cJLHMcheFvejUGBiL9t9M gCwPO8pH+w5DPvkfsvoLXokFvSLh0QIFcQB6sb4P+NguJuj4IrWxEgEI6vt33bo0OBbj FTzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689293700; x=1689898500; 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=WogNqZmM5qIDEUwvyRv9RC9FRo2r68Wx4DIsyw3FtoM=; b=SoLUPOIdd9gFqPJ0+XGG0aQorYN+ppit10kVtE/m5mvaBTRSXuW+zd/+sYm9bjVVWX dOb1zdq4ZBXDifDiDch7nvI6dVUOmDWbxvqFVcVI/ZBtUiUAOl5vdBMH31HIoFtqpe3M mtpFkNM2BeanXSmWRAE3HMhJQeKS8lFLk5BBsUaP/Frh2UWZ391MeiJ1dPukOwN5ewTK EJluNYUG6rjUXI0538eTBRDAwOQumkgbmyd3AHDxAIWRuRIHnJ71+sz9SBddLbh9fxEp n1DRTJ5LO/eoC7DbLbkvMNLOBz99goVOOu/nB+W/yJYcwuxXcAhdgF/8JfF7Yr1xl6a2 dvNQ== X-Gm-Message-State: ABy/qLbeCArjzRVZutnPtY5mO6jhP4rS5L/IofpwXu3TGiRfA8V2MNME PySppDrSdhN8uZJZdWJaGpWWpCFqpj9bO/I5f6M= X-Received: by 2002:a05:6a20:1445:b0:130:52c5:5123 with SMTP id a5-20020a056a20144500b0013052c55123mr3737553pzi.3.1689293699862; Thu, 13 Jul 2023 17:14:59 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id x25-20020aa793b9000000b00673e652985esm5938107pff.44.2023.07.13.17.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 17:14:59 -0700 (PDT) From: Charlie Jenkins To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.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 v5 3/4] RISC-V: mm: Update pgtable comment documentation Date: Thu, 13 Jul 2023 17:14:02 -0700 Message-ID: <20230714001430.75798-4-charlie@rivosinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230714001430.75798-1-charlie@rivosinc.com> References: <20230714001430.75798-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_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 --- 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 e13f5872bfe9..28660bab754c 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -840,14 +840,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.41.0