Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32635721rwd; Fri, 7 Jul 2023 18:14:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlFHVDXRKQf0eUbi59YD7Bu6qnSEkJxByC4D0mBeRCr9ZjfdGsNPZ+OpOZl3ScideA9BmoZm X-Received: by 2002:a2e:88cf:0:b0:2b6:a804:4cc with SMTP id a15-20020a2e88cf000000b002b6a80404ccmr4580628ljk.53.1688778848771; Fri, 07 Jul 2023 18:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688778848; cv=none; d=google.com; s=arc-20160816; b=m5qOpPjDz2JDfp1kVt692e5olc+x4jPcd/7hYpidAmJqQRdhvPqeKA9e23y8T0d80Z OMEZHnzS8INgGWqzjwfQv6L8CoE2bKmAEYCY5zqkuEo+q6Ap52SWw2Dw5z3r9uUHld3p gc+SFJ2uCXNlUHsnCPsNFKYWpSCCWeh+pVMFWE67vMV40ElPlHNAnBFN5i05qCNnKUp5 DD9h2mIw2je6l2+g183SzezxbXeqCwmWkYlNpSNVu0WEf/aP7v7c81IrvimSSTT0Zvut Rc+rw0gaRR/I/s5sAoL3u5pmQ6wsxgqb0ser/e/oqEr/qyAKe4BmwUWYs9UH4/zV01o/ CPTQ== 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=VGYD7N8wGDu1tDg8VZbK81LUzFuUntAfMahEoaG4sqc=; fh=80GE7U8sEUy2VWZLuM4+yfmnOtoGy4A4FkAWCD0/DZk=; b=XoCdEIu0SppJeS8IBK38fKQuFamPiXFhSo/M4tq5Esip17fvNc8MoXUSkfA3CfbdiB Y9BNu71tgdj3OoTy3c1k82Nw4958z8THgKzqXM+1FW13MOWqeKXYE2XCzhhKl2icRDRB aOrZM4R1o1iWbbQhgEfTETGdV9xJc88855DegACgHytgRGWNBu7LRqa4cx4L8domrR78 Vf7a0dvaknrUI1bLw+M7dt2sLE/REJiHN4bcaRbWwgnneE70F8WdS2TEImjgNNAsfjV0 YrEl9yNvhdnREJv4DLSBkXYewuXGOXUcH5MDpEvqJ3mbCeANnW3rwmU5ZIOHQSrgjoS7 4dng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=HGN3ju79; 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 a4-20020aa7cf04000000b0051e3c92a20bsi1408900edy.318.2023.07.07.18.13.44; Fri, 07 Jul 2023 18:14:08 -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=HGN3ju79; 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 S232781AbjGHBMZ (ORCPT + 99 others); Fri, 7 Jul 2023 21:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231280AbjGHBMU (ORCPT ); Fri, 7 Jul 2023 21:12:20 -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 A16002117 for ; Fri, 7 Jul 2023 18:12:19 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b9c5e07c1bso7707165ad.2 for ; Fri, 07 Jul 2023 18:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1688778739; x=1691370739; 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=VGYD7N8wGDu1tDg8VZbK81LUzFuUntAfMahEoaG4sqc=; b=HGN3ju79/NcRtAH1rWTzt1SF66qlIOEIPW+h8YCZSLaemLUac5sLeNcc06JOpcpXYS Cj+44tx2Z+rwnRiNelURAceDB/qdaKXjyGvhTuZuZecJIPAZ93DUuWf9RMS8856fmHx8 Umn9pcJZq+zDFbW3kfivmOjwAuguRCJGOID7fJdAs9Nbn12i9eOGzLQ76DGuAdP1h2/F EC/pD0QZPhElZ7NCVIs4iLArjS3xtiJrVYm/2wZeUdSifvbekOHDtDtmS8cMIhwN9VIH 81Hbh7TQSzo/OJgjK4nyg7wVpciIrnm85nU2hbGdj1OHDOVQwJk4nRSRz6OyiZoPcTy9 ci6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688778739; x=1691370739; 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=VGYD7N8wGDu1tDg8VZbK81LUzFuUntAfMahEoaG4sqc=; b=l/gXIofelI3BFkedlXKpq97l05f3TCHAcNwbLPlZEiK65Z5A++677NhTi70ae0MzCj H7YcwxKKBFw4dmX/E3FQVRccfQmxKwl27LCiV42ZcGyvMsrZP7cCR41xDfKflmrAxK6x uLvAWuDRHEtXMOnAyVpmRJUEA2wwojKsMtDba4rqyA7RO/h5e/UGEe5cPGFdVc9ep+Lc v7AH2mQQdFSnsyXff9mII6RGuqNhZBeC6lgzw/ZTA//AotsajmtFLR288qDpEdCnsRi9 6cBtDL9M3bfJD8oUc+gQVXzDGUP8b2cAJTPaO9iBDbwVHRUrv95RQZNYScJlB2iY+qE2 Qf9Q== X-Gm-Message-State: ABy/qLbRVGjmoi/Or5T4+HX9yNUEjby3JJLrmHYGyZQTWe2zYcdG363u dcXUNC1vAy7ZwrvzTfjPYuHZ8w== X-Received: by 2002:a17:902:c951:b0:1b8:3e15:46a1 with SMTP id i17-20020a170902c95100b001b83e1546a1mr8516813pla.67.1688778738940; Fri, 07 Jul 2023 18:12:18 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id x24-20020a170902b41800b001b87d3e845bsm3830654plr.149.2023.07.07.18.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 18:12:18 -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 Subject: [PATCH v4 3/4] RISC-V: mm: Update pgtable comment documentation Date: Fri, 7 Jul 2023 18:11:34 -0700 Message-ID: <20230708011156.2697409-4-charlie@rivosinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230708011156.2697409-1-charlie@rivosinc.com> References: <20230708011156.2697409-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, T_SCC_BODY_TEXT_LINE autolearn=ham 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 a8090ebea705..e6bbe8c0e583 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -841,14 +841,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