Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2718730rwp; Fri, 14 Jul 2023 10:11:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlFlVF+IaWAryfAh0MzCEle3J0Stl88KRmb9YCsZRhFiMs+PdE24iODaneckxE3xHIgqN8tA X-Received: by 2002:a17:906:e252:b0:96f:f19b:887a with SMTP id gq18-20020a170906e25200b0096ff19b887amr4685863ejb.56.1689354693850; Fri, 14 Jul 2023 10:11:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689354693; cv=none; d=google.com; s=arc-20160816; b=0JfcUcbCDWt7yy9QmUPVP4sobanXHNfV9NrgqnZRO895BF/+NZ09oDcrRaFxs39t1F wcj8wN3hKysvBK195FsTgQnoMclfYQFYmGojAdHq98cOlioFwkaYVbAuCQZx61ouW0df UE0huP0b857irOe3HPq2DmRCDN3zAr9rkymWQ4ZBwZN3OsoAPtbzK/NBTZlXusYuh+Q6 q4UsMmEUw42kbJAuXhUJFG3jJqJA15/2TuTShagl40kx9HlxvX/ym+gpNXMnfqswnkNB Bid+6tWHBpG10FzdbyQHvywFVMoEl1nZLLmh5FHidRoQOxUwUhmq6Xf/ACqV6bwxRC0Z zS+A== 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=7AUu9WDHec3ojD+PBWP8kj3GITT/pOnwiCBaYopXpyU=; b=lbb319AFeoAQna8+FVIkNl44dypvYJziFXqjQuP0fFT2Z2aQhka9l7/5SiCumJj/Pt BHbk3fZ7Lu1jkZ17Obo8yyDUwkR7i228zHARuMbXJzBheVhv8Im5SnnIcAH67p59618Z Jw8QDRxsZ2H37ebjn9BPGqlaBg1IUefa0iWSvI/eWaalA0uqymKFIRbwEoO20wqVasvu Qock8r3gBgznWg1Nu1cT+cO+bsHwF4JKv7YHsV7HDkWhiTAEipmrOOIykBquaEOvJ+3z 0RGBiuTCL1/+h+jJoUORktva1EUI1OIHIYwIx0EfPd8RqM+LuMvreHG5Hy8PNW4LJckN Jsxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=k4JpV8O2; 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 q2-20020a1709060e4200b009823926ec36si8943583eji.931.2023.07.14.10.11.09; Fri, 14 Jul 2023 10:11:33 -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=k4JpV8O2; 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 S236223AbjGNQ4I (ORCPT + 99 others); Fri, 14 Jul 2023 12:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236123AbjGNQ4B (ORCPT ); Fri, 14 Jul 2023 12:56:01 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 398663599 for ; Fri, 14 Jul 2023 09:56:00 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-666ed230c81so2072217b3a.0 for ; Fri, 14 Jul 2023 09:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1689353760; x=1689958560; 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=k4JpV8O2fSGGk7XNKD9q0ujwSrgLNS5JKisf0sw0jvUKEZew9wqD0mOgv5xqEakXS6 pzsAREBd08kDkGplbNP1AkoiyWeRAIz7FulZLlqtB8qp3y/qckPqJhQJiKhZfl9WN0WU nMle1U6p0NZ6MT6w5szP3MC1Av+TfDzsM7avqkgjrKklsCAEJOIvC2zN/3btjBehraei NSwhWdWxIJBc5KhqU4BaNyhMvKIzjfVx6EmHAfAN5LUA6SlhocFalrUll5gGPpviaIA5 tMoWOIW4JYBkvXrXMWF2tH+8ZBhwSqtGJVaUkW1XRy8sQZxk+lMN38vEoUg+I8BBf1Ee cuQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689353760; x=1689958560; 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=deQ5bV89FJPSIii76/hxBP4vhQrDYrjpy8hmMRiQ3xswHQ2UBZVJWlQ6ykvC3zASCD ajCVVooM6QQTeTM/AEchilf5HaS3O8HXHssWOcIVfvOVcYzm1s72S4akhMU1l/nrOx96 B1eaxbFPIIu2eGCQ0LAo1xZThMfEEjYylSKcbg12GoZkavR9kxcQCY2XGObAfsN+nPKR m6CX3OqJJjW2TWlWRP+qSu/+APFcbwjzJjg8OKwTrjLZs1sImx1BSwr5UYw3LF+d2oAP BRT3dbsYmtzUW0ihTe6XWR2Kov+K+4/haeRuwH71l37uv3wNCWOa/oJ2UFGlKobKlMlK Mr1g== X-Gm-Message-State: ABy/qLZQ+nJuCkze0Yaqs9hFpHzFtB8N4ZuKA/bL++U8KViw4120CcSY eY35nLd30kFs32ZPPy+JJMiAzg== X-Received: by 2002:a05:6a20:639e:b0:133:ee16:5677 with SMTP id m30-20020a056a20639e00b00133ee165677mr1028643pzg.59.1689353759643; Fri, 14 Jul 2023 09:55:59 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id s8-20020a170902b18800b001b694140d96sm8008081plr.170.2023.07.14.09.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 09:55:59 -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 v6 3/4] RISC-V: mm: Update pgtable comment documentation Date: Fri, 14 Jul 2023 09:54:51 -0700 Message-ID: <20230714165508.94561-4-charlie@rivosinc.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230714165508.94561-1-charlie@rivosinc.com> References: <20230714165508.94561-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