Message ID | 20230110080419.931185-1-guoren@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2616649wrt; Tue, 10 Jan 2023 00:08:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXvgmEmbVv52vnXX0p3diB/3+eF/y2/0/VuGcA8xzxAzVGYP1xABe/3HYgxmZpAyt79wuM0O X-Received: by 2002:aa7:83d1:0:b0:580:d71e:a2e5 with SMTP id j17-20020aa783d1000000b00580d71ea2e5mr54324423pfn.22.1673338137277; Tue, 10 Jan 2023 00:08:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673338137; cv=none; d=google.com; s=arc-20160816; b=ngWPo7asM4q0XbwVhKK4yjAmrnT2Y7dyuLNAChdEjxERV5oiaShcaYyMmCoL74qCps oGwAli07uS1xSzuLAXrTn728Rk48O4GgxqPaeIGS9jgmt5QY9puoX3cVs8JNOjs153TX FJXmUdNTp1AxwZcmvPsEBzeRG/MpgimbvYoqEuK5YEIYnWOILpy8r9VF4vyYI8oGGn9U ehDLwBG90Ottq1Bq6wbDxefinI+jOcnLBdcCkgfovW5tXBQ9HIDJN2KCbE89SuD0ZALU IDN8X5bzBKH6g0UZC/3qB5YoaVJveqSpmRRapDmu8/CPJjGWd70d/KlpeBy7OFJWj17v g5GQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cp8-20020a056a00348800b00574694c97c7si10660857pfb.300.2023.01.10.00.08.44; Tue, 10 Jan 2023 00:08:57 -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 <rfc822;syz17693488234@gmail.com> + 99 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <linux-kernel@vger.kernel.org>; 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 <guoren@linux.alibaba.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754622210829676501?= X-GMAIL-MSGID: =?utf-8?q?1754622210829676501?= |
Series |
riscv: pgtable: Fixup comment for KERN_VIRT_SIZE
|
|
Commit Message
Guo Ren
Jan. 10, 2023, 8:04 a.m. UTC
From: Guo Ren <guoren@linux.alibaba.com> 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 <guoren@linux.alibaba.com> Signed-off-by: Guo Ren <guoren@kernel.org> Cc: Alexandre Ghiti <alexandre.ghiti@canonical.com> --- arch/riscv/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Guo, On 1/10/23 09:04, guoren@kernel.org wrote: > From: Guo Ren <guoren@linux.alibaba.com> > > 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 <guoren@linux.alibaba.com> > Signed-off-by: Guo Ren <guoren@kernel.org> > Cc: Alexandre Ghiti <alexandre.ghiti@canonical.com> > --- > 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 Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Thanks, Alex > * directory) is for the direct mapping. > */ > #define KERN_VIRT_SIZE ((PTRS_PER_PGD / 2 * PGDIR_SIZE) / 2)
On Tue, 10 Jan 2023 03:04:19 -0500, guoren@kernel.org wrote: > From: Guo Ren <guoren@linux.alibaba.com> > > KERN_VIRT_SIZE is 1/4 of the entries of the page global directory, > not half. > > Applied, thanks! [1/1] riscv: pgtable: Fixup comment for KERN_VIRT_SIZE https://git.kernel.org/palmer/c/6be1ff430dab Best regards,
Hello: This patch was applied to riscv/linux.git (for-next) by Palmer Dabbelt <palmer@rivosinc.com>: On Tue, 10 Jan 2023 03:04:19 -0500 you wrote: > From: Guo Ren <guoren@linux.alibaba.com> > > 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 <guoren@linux.alibaba.com> > Signed-off-by: Guo Ren <guoren@kernel.org> > Cc: Alexandre Ghiti <alexandre.ghiti@canonical.com> > > [...] Here is the summary with links: - riscv: pgtable: Fixup comment for KERN_VIRT_SIZE https://git.kernel.org/riscv/c/6be1ff430dab You are awesome, thank you!
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)