From patchwork Mon Dec 10 06:21:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 10720639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5AC915A6 for ; Mon, 10 Dec 2018 06:24:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A222529810 for ; Mon, 10 Dec 2018 06:24:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F72B29A32; Mon, 10 Dec 2018 06:24:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 463B029810 for ; Mon, 10 Dec 2018 06:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=kngVDYNbhhGOhHHHzJFkhtLTpJ9bf2NPOJLwokqKmkA=; b=SrtKSeHrYmcco32KNLAL8vrJiS db8KVnuef0k8OmENtHay3s395XUZPp2x5yQsBxxTFIlB6HmCsTy2+h9ktGgGNgzEJYkZgNM8M7nC5 AQDNToMa2rtMRpagXF8GWP5SB2JusegZIZrwAg4P68SO5xTQPa03Zd3ZnpA1rFkaF0h5kskauBO8D BFC6E/x0FvOy6+alzI16vWLqGm5Sv09gsnBDF24t0Y2nh0HeZMAZ/on1bzXx9AUvxhgqTlS3Jofvf Ms8UiR8cDys/GiGnoSNiQkV0NNS4Uoxbl+MDbl/BfwLIo1nE/xDYE+wH///3Bamhhcejre8woD/Dd YlTuFVMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWEzT-0003Iu-Mb; Mon, 10 Dec 2018 06:24:27 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gWEzQ-0003I5-9N for linux-riscv@lists.infradead.org; Mon, 10 Dec 2018 06:24:25 +0000 X-Originating-IP: 79.86.19.127 Received: from alex.numericable.fr (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E56CA20005; Mon, 10 Dec 2018 06:24:01 +0000 (UTC) From: Alexandre Ghiti To: palmer@sifive.com Subject: [PATCH 2/3] riscv: Fix wrong comment about task size for riscv64 Date: Mon, 10 Dec 2018 06:21:45 +0000 Message-Id: <20181210062146.24951-3-aghiti@upmem.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20181210062146.24951-1-aghiti@upmem.com> References: <20181210062146.24951-1-aghiti@upmem.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181209_222424_470890_E7049763 X-CRM114-Status: UNSURE ( 8.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aou@eecs.berkeley.edu, catalin.marinas@arm.com, ndesaulniers@google.com, linux-riscv@lists.infradead.org, Alexandre Ghiti , atish.patra@wdc.com, akpm@linux-foundation.org, mingo@kernel.org, mike.kravetz@oracle.com MIME-Version: 1.0 Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The comment indicated a wrong size which was misleading, after the following computation, TASK_SIZE is in fact equal to 0x4000000000. TASK_SIZE = (PGDIR_SIZE * PTRS_PER_PGD / 2) with PGDIR_SIZE = 1 << 30 and PTRS_PER_PGD = 4K / 8 = 0x200 => TASK_SIZE = 0x40000000 * 0x100 = 0x4000000000 Signed-off-by: Alexandre Ghiti Reviewed-by: Christoph Hellwig --- 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 50ea3d6e7de7..db3bf0dccd0d 100644 --- a/arch/riscv/include/asm/pgtable.h +++ b/arch/riscv/include/asm/pgtable.h @@ -420,7 +420,7 @@ static inline void pgtable_cache_init(void) #define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE) /* - * Task size is 0x40000000000 for RV64 or 0xb800000 for RV32. + * Task size is 0x4000000000 for RV64 or 0xb800000 for RV32. * Note that PGDIR_SIZE must evenly divide TASK_SIZE. */ #ifdef CONFIG_64BIT