Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7602263rwl; Tue, 10 Jan 2023 03:04:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXtzpVnmI6jRfwXkSxOz1iGct/nfhkYk0ox5l1U8GAgn2V4VhWWA6OF1sojvL0QJrLiN3Cz2 X-Received: by 2002:a17:902:a582:b0:192:52d7:b574 with SMTP id az2-20020a170902a58200b0019252d7b574mr62421791plb.63.1673348670522; Tue, 10 Jan 2023 03:04:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673348670; cv=none; d=google.com; s=arc-20160816; b=LolPGo0O5i6JVPP/dPWljn7+jwZnT245UEStPM1M/UKe5DFz7nxTiA+hbVWROloXB3 FovDYzWubowdRpA2+0ZlVyC0Fe0YXOI6jn7EviG87mmU6BAKUsCny8Y3LTwkARGzIZ+h /yonKoBvn0d8lzrhVs2Ei+h9JqpBnKWkwYblRUB5eyx859bSIPocr3Cou7ojYaGKxThl kU0CtkwOFTikxyYzuXCc00xBjVU97XLWy2ZdGHcEJ+OZjUoOvXAvx8cnL7fJbiy7Ihtt 0yhaBhl7Mm3THOsLivD3eS/8YwYEaLEQ7T+QtzVt7FChIaBMpd8JoNEUktiOKz6eunTx iN2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=d8jknvpgCgJaxZEjq8bytANNUl1NN0VqPHQlhwLMLWg=; b=WsA6Zh730nr84yWzCnhP7GKWbPIJ1isLAmTcqVcZ1NnIY2O3js2JmX2+EhrFLXas4a HdDowmFrL4ciJ5ob5yz1KR68pwaMg06re6gjXZ2RlSKe/e5FVHPXp9+f7b63oL7W8r0c MbeHa21JDkmV7AwmJFoflYQMLvCKzvLVyvr8wGrwoM2P0NP9lUP9WKCNImACfojf4abR 0Y7qnIk+FVnuw8c3kUvKx/cwW4O7Q0RiGmGISDCDAipJKv/YSb7FQAwhIlTNKqIP4VY8 n9kLV01o+D5CcDFVifx9ILYakzPWjRVl9wlwqVLUvH1hkuh2/2wNlQYI1W1ugHE56vth g/EQ== ARC-Authentication-Results: i=1; mx.google.com; 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 r3-20020a632b03000000b004792b0801f3si12091177pgr.558.2023.01.10.03.04.23; Tue, 10 Jan 2023 03:04:30 -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; 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 S231808AbjAJKW5 (ORCPT + 53 others); Tue, 10 Jan 2023 05:22:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbjAJKWb (ORCPT ); Tue, 10 Jan 2023 05:22:31 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7BF3517EF for ; Tue, 10 Jan 2023 02:21:37 -0800 (PST) Received: (Authenticated sender: alex@ghiti.fr) by mail.gandi.net (Postfix) with ESMTPSA id 51678E000E; Tue, 10 Jan 2023 10:21:32 +0000 (UTC) Message-ID: <49fe95c8-031e-5f4b-3c37-8bc78a7210d8@ghiti.fr> Date: Tue, 10 Jan 2023 10:21:32 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] riscv: pgtable: Fixup comment for KERN_VIRT_SIZE To: guoren@kernel.org, alexandre.ghiti@canonical.com, palmer@dabbelt.com Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Guo Ren References: <20230110080419.931185-1-guoren@kernel.org> Content-Language: en-US From: Alexandre Ghiti In-Reply-To: <20230110080419.931185-1-guoren@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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 Hi Guo, On 1/10/23 09:04, guoren@kernel.org wrote: > 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 Reviewed-by: Alexandre Ghiti Thanks, Alex > * directory) is for the direct mapping. > */ > #define KERN_VIRT_SIZE ((PTRS_PER_PGD / 2 * PGDIR_SIZE) / 2)