Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3253667pxv; Sun, 25 Jul 2021 22:44:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydIWDtWV5ajy/i5oC/hPQip7b7L7TQyodKeNc/tlLOaR5XKcuP9SXOFG51btjm53LVE1c+ X-Received: by 2002:a05:6e02:198f:: with SMTP id g15mr12534501ilf.120.1627278264168; Sun, 25 Jul 2021 22:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627278264; cv=none; d=google.com; s=arc-20160816; b=URWC8SzzyQTOJZDDRrC2hT95Pa6YABAUmyfCbCe/gkWm705RZ4CrQijTwlp6zKOO4h qUiYConzpI1xWteDMxaUez2/IhopANYX9Sxtgx4KAeCJ/stQaOiAnv4WSJ5uU6i7YsGn cbqvO/E3eLW04g2QXTlHHQNvbhtliJHQklQsSRKhs+BX8KVJLYGe6U7Sc1b5a+YdnAfD GunI5UdpDzXHT8PVZZV9arZ9kIsbHqdNRoiA0wjchbFy4ooAWM9BKE8iEk4zQy4SKBcN eEBrz0w1gUewqy8rau95iuuImHcCHCe8b5Cf9TZ//MHpPDjQJe/0jjy+20Lgfm0dsXoW Y7cg== 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; bh=fibQSOj3601th9dGLjZkjXtD981iLz/sbISDkRcMUzg=; b=kVgjfU2Ejwt//dvtXjir+mxD7fWGB5NF8DsH+tPjrDqE4gCh+9zksyzbjgAjqfHdsr 2NWJqwUDKM5A8KcvEobOOSpVbw/Xw9AiGPM372sPMYA6OL90HJk065wJrMHmIlIZg7Q/ 9cbMOHVoKoz8bW46AUJ4AGlhKoaVmtg5RSboSr94srTmGaTi+eJ3xDfy2VFHGkzad07z w0IljWpZ76IkhAIHVdwxUWuvni8d+I84wp/5bV8REZzU3+B1POF0myZGqevQ9yWYZ48Y UIdiUvBacp7LfpZZ/9+WJAtdrLf5Z7v06+kSS1RmI6eGjIazeD7IJT/j0LcZI7nBDfQu l2DA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si32468995iop.31.2021.07.25.22.44.13; Sun, 25 Jul 2021 22:44:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231640AbhGZFCc (ORCPT + 99 others); Mon, 26 Jul 2021 01:02:32 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:5207 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbhGZFCb (ORCPT ); Mon, 26 Jul 2021 01:02:31 -0400 Received: (Authenticated sender: alex@ghiti.fr) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 35CB2240002; Mon, 26 Jul 2021 05:42:56 +0000 (UTC) From: Alexandre Ghiti To: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH -fixes] riscv: Fix comment regarding kernel mapping overlapping with IS_ERR_VALUE Date: Mon, 26 Jul 2021 07:42:54 +0200 Message-Id: <20210726054254.21801-1-alex@ghiti.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current comment states that we check if the 64-bit kernel mapping overlaps with the last 4K of the address space that is reserved to error values in create_kernel_page_table, which is not the case since it is done in setup_vm. But anyway, remove the reference to any function and simply note that in 64-bit kernel, the check should be done as soon as the kernel mapping base address is known. Fixes: db6b84a368b4 ("riscv: Make sure the kernel mapping does not overlap with IS_ERR_VALUE") Signed-off-by: Alexandre Ghiti --- arch/riscv/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index a14bf3910eec..79a2e02924e4 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -191,7 +191,7 @@ static void __init setup_bootmem(void) * if end of dram is equal to maximum addressable memory. For 64-bit * kernel, this problem can't happen here as the end of the virtual * address space is occupied by the kernel mapping then this check must - * be done in create_kernel_page_table. + * be done as soon as the kernel mapping base address is determined. */ max_mapped_addr = __pa(~(ulong)0); if (max_mapped_addr == (dram_end - 1)) -- 2.30.2