Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9178156rwp; Thu, 20 Jul 2023 00:16:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlFH10PpWOhnXNz8UAHt4OjLCr6GQNENzKqCM0utJ56iNx2l6esUbWqLkajwF5Hyo1WDpnkO X-Received: by 2002:a17:906:73cf:b0:98d:5333:79c with SMTP id n15-20020a17090673cf00b0098d5333079cmr4793877ejl.5.1689837393190; Thu, 20 Jul 2023 00:16:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689837393; cv=none; d=google.com; s=arc-20160816; b=J3WKMEpNrBCTb8+3c7amCu5D8RHQAbkIdD4UlXKCuQwX6f4gNCRhOUYEFBC0OhJxZB BprdiRgK1NoxyhzEkXzYcfBfKH2O2iNLZIZV8ths3DcZuV3yXHMKEMxxSIJHTUJEc4WW MnWXIhteLm6Zoyv+dEphfcGU/+cRqqc2F2YPHY2LbUA3SLhngVGBXT6nxHynYNBAHfmb w7ARBg8WOHAVm85bO7d640ByqGB8eCgafHUX0WW8/K2Tcjv29xg8VNrPcQ9kDTWZCGyY P/voeFSMxgM7o9k2ST0d9lkFgMn7AK2k98LW1CfMFEI7LxMf4rVmTu1RmwGW13c6eFg5 DW/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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3ZEjFz7LOZdmaaeUrHv50TFnsXpX5R1v3ht7TZZ808M=; fh=ndblg2dALUQcsjGAGAPUQ5KoZyCh2MVOlF+6a8mdrLk=; b=PP/C6O3XOGWHd6RXDuEWw9O5oTb0St0kNiGBM0rPtX7xXGQ8f+CFgS9Hw1JtZPCTKp 3a3HmBwtg/NFyTk24mqa3scBMD+R+SjsWYfklIvw4y+G/4o+eNcyDkB+ZIYa1Fhkge5l 7BWfKj4atNaxWMPVWBNr3bN2AD+vHGYRmdZdc0MukWDECbSOawueIWgr+xBVEalQ0dDy XUKG0nhTXSMgu6l0MprgBpm9JKQgixUf+tXhV/GeS0iZ35lqmxhdGdRC3WgrTfETFjrc yk0LagkS2zOxv7FE/iAytRRPom6YSydNRDgldBdpdrjgdz+HK0j/YaXI012UHtZcVgr+ vfSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=1MfTo46H; 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 r10-20020a170906364a00b0098dd0341f27si250257ejb.225.2023.07.20.00.16.08; Thu, 20 Jul 2023 00:16: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=1MfTo46H; 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 S230342AbjGTHBD (ORCPT + 99 others); Thu, 20 Jul 2023 03:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230194AbjGTHBB (ORCPT ); Thu, 20 Jul 2023 03:01:01 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A5FC110 for ; Thu, 20 Jul 2023 00:00:59 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3159da54e95so302699f8f.3 for ; Thu, 20 Jul 2023 00:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1689836458; x=1690441258; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3ZEjFz7LOZdmaaeUrHv50TFnsXpX5R1v3ht7TZZ808M=; b=1MfTo46HP0GNpJ9cJoyU1w/4UKVOAFz6QpJ4q70QXZNvjfL/YVfMgjHYqRYUSAxHDc jTtWwxIaJkGms8cWTugFcMm3Mz/kMh171waQTUmVGUrnhWRdSZZAnopxNT52sGyk4Vhr JccuRh1ReQQymlnZdjxbyC4YAll5dWm92TQo+/lCGQexj5cQvGKHZ8hgObMHOvGcBNKc O5YUKLp3tsmyVHte9MmjUkozGnbFeFs6ggXSUOdv86CnBPa+ITw35RBr4dJ9ncycHteI yoBB4mBa6g7bQWRNx+/Wq4Kah+D6A8vPku4/YRJO5RvDvi7ldgcJ20Ijhjk2fCg6Vb/c pjSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689836458; x=1690441258; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3ZEjFz7LOZdmaaeUrHv50TFnsXpX5R1v3ht7TZZ808M=; b=k8L1Ut4NwGNixkAwJqilatzjJ5WNio3jp+keARbpt/D1LfDyFIt8QbFt0R3A+626G4 aMujUwUWF/drvbPixAlGVAhZ+L3E7lds+5GizWWXgtuYjwezTAyIbZA4nMvpzu0J1wbu ZieV3YFjty0GIfAS/yw+C/S17INjbooqxU7PRj7FS/j1Xp1rhqxMPPDjSfg6FBI64MpC N4ty8M2SqnyqdCHW2SoYqtUm1sj8vmen4XYYElbipgN2MLpvd19DH9cKWK4Zb4CjiVmw tNvbNqUcx11ITQYJNPh6GwGKCS5wis9i2va9sCYZoW3Hb48IQXqWf0CTqGCyMGTgE9eh suIw== X-Gm-Message-State: ABy/qLaBIfsPdXeMCPkEZUGNOlFVP6WH2F0j5fAwtLUt10J5neNWTOy4 0LyDK8c0rEeV3q0xeHaxGbkXRjVGP7AoD5Bj/+08lw== X-Received: by 2002:adf:e903:0:b0:30e:3da5:46e5 with SMTP id f3-20020adfe903000000b0030e3da546e5mr1830181wrm.59.1689836457755; Thu, 20 Jul 2023 00:00:57 -0700 (PDT) MIME-Version: 1.0 References: <20230714165508.94561-1-charlie@rivosinc.com> <20230714165508.94561-4-charlie@rivosinc.com> In-Reply-To: <20230714165508.94561-4-charlie@rivosinc.com> From: Alexandre Ghiti Date: Thu, 20 Jul 2023 09:00:46 +0200 Message-ID: Subject: Re: [PATCH v6 3/4] RISC-V: mm: Update pgtable comment documentation To: Charlie Jenkins Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Fri, Jul 14, 2023 at 6:56=E2=80=AFPM Charlie Jenkins wrote: > > 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/pg= table.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 p= te) > * 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 tha= t > * "load and store effective addresses, which are 64bits, must have bits > * 63=E2=80=9348 all equal to bit 47, or else a page-fault exception wil= l occur." > + * Similarly for SV57, bits 63=E2=80=9357 must be equal to bit 56. > */ > #ifdef CONFIG_64BIT > #define TASK_SIZE_64 (PGDIR_SIZE * PTRS_PER_PGD / 2) > -- > 2.41.0 > You can add: Reviewed-by: Alexandre Ghiti Thanks, Alex