Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7428902rwl; Tue, 10 Jan 2023 00:14:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXsBSxC7VRq5aEKDPTs36AwvcHm31fW7e/gNoa+YCNr87E9MBU411x1rcI6+ITgOEznBQxLv X-Received: by 2002:a17:907:6d85:b0:83f:748a:5c6e with SMTP id sb5-20020a1709076d8500b0083f748a5c6emr94482213ejc.71.1673338483382; Tue, 10 Jan 2023 00:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673338483; cv=none; d=google.com; s=arc-20160816; b=zOJK7tfwHiOKAKpVUZFjrCL3kl82Wl2XcBYbXkz4ymOb+DIPoCYvFyKnhBh+No38sD ZJLQz0VREsPtxCwXHllGmpaFEg7UAJw2OEy5didZ9tjI+M3467KZhNT4z/3bJ8xP2zBc tTD7l0gNMPFInixGbjGtqrbc5SdUR0tqUd6RViwbuF0yUPYjnES98wsPEMixqylnA8us Z+HPNrQ+VHaC0s+ckSE/jagdm1Cbx+2nuZA9H+X5C1CaBGOTFN2QCsWbN53mGEXAuDlo 6gEPhShJLS1Jq4/MfbcztI08V27AB0wrEz0YqUvvEWzSoNBJ7UEgK6PDk+MksDI+Ctoz VsDA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=xuoJXymIHpoU5fbxforsXPqk6FuyVotfCrgD73aejgc=; b=Ajuh1jPnaNVxftEcootB2pVg+2T8beW+Zvn3KwksuAFM3z2cnd10X3B+BND+otZOCF VZ4Qn4d/ixAUBQ6JihkFY9Z5sPO3l7b4zOHTH6SouiRc8I//u356uiHXWIDG9+HWJj4J 1d+Si8FxgsTX4GjFDk+dAFqTo4UVB5+oNuupTAwnnbKiWPO4N/jD5NjG7EEesarOsE4t /peYplpCm55CUO70ZYBWx9xSiaUiJjtFVzw7jvTBKRNsZskNeWOt9eI4qGAGQpM9Xa8a ftEV9b5qLLuorj8kiKUmPE/x4sbjFQzScGp8rQ0/y0EvqS1uxE99mpdQ4/Hr0y+qfsSD 7ODQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o0n5lmbC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020aa7df0a000000b00497779c45dfsi9218138edy.538.2023.01.10.00.14.28; Tue, 10 Jan 2023 00:14:43 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=o0n5lmbC; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235313AbjAJIFE (ORCPT + 55 others); Tue, 10 Jan 2023 03:05:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235000AbjAJIEr (ORCPT ); Tue, 10 Jan 2023 03:04:47 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D26237250 for ; Tue, 10 Jan 2023 00:04:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9D621B810FE for ; Tue, 10 Jan 2023 08:04:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43B47C433D2; Tue, 10 Jan 2023 08:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673337883; bh=5Wa/I8iPWXYq4EtfoTuN8CIETGpW0mcYV16o+ZIQb0s=; h=From:To:Cc:Subject:Date:From; b=o0n5lmbCHXUilcZgN67fSb0kHZhmYurEURBnz2aANtb7fEmon6LfscWTpyk2UaIId 7SdowYfjZAQUMsGeSDAG8ozCKW/cqyHZuGuYiZ9XsA3muhdizIP+G1mr94x84TsK5v xmWA1EbB2kF0ZnVV8o3m9HnLOytW7kjoK0OxEP1jq8au8NpB3lJstse3KEGW90BFbV sS3zptGl4hoe3cFNE60EHZOqKWkRyGdu1ebf2j5oZX4CLyXlAGCAgIaDQatjKEB3Zv RLWO++k7/Cjhva2Tc+xJooe556duXejs+KH5mikbkbZRKUEO/gG/+voMMpBF4qbLY/ 5u+rbIEiHIU6g== From: guoren@kernel.org To: guoren@kernel.org, alexandre.ghiti@canonical.com, palmer@dabbelt.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Guo Ren Subject: [PATCH] riscv: pgtable: Fixup comment for KERN_VIRT_SIZE Date: Tue, 10 Jan 2023 03:04:19 -0500 Message-Id: <20230110080419.931185-1-guoren@kernel.org> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Guo Ren KERN_VIRT_SIZE is 1/4 of the entries of the page global directory, not half. Fixes: f7ae02333d13 ("riscv: Move KASAN mapping next to the kernel mapping") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Cc: Alexandre Ghiti --- arch/riscv/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h index 4eba9a98d0e3..2a88362dffa5 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -31,7 +31,7 @@ #define PTRS_PER_PTE (PAGE_SIZE / sizeof(pte_t)) /* - * Half of the kernel address space (half of the entries of the page global + * Half of the kernel address space (1/4 of the entries of the page global * directory) is for the direct mapping. */ #define KERN_VIRT_SIZE ((PTRS_PER_PGD / 2 * PGDIR_SIZE) / 2) -- 2.36.1