From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E04A33D6F0 for ; Wed, 18 Mar 2026 17:42:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773855742; cv=none; b=L/UGZ4mN3W55SphsKx4PXW8ky2adMyakE+5MErc4x6IY6fRyfwm43Q0bW9L3gQeSUniHidtYqPWLZhwVBE1NnB8NVd3QWcOLoenaaHzH+1YvhX6MpfqlLofSBGvQemNQFiM3UTRiyxzQciR2rcGKs/PBB/AU8dMKhye3Zq5pw0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773855742; c=relaxed/simple; bh=8zKKN1pmyDuNOP9IFZ6JMQazxPmRneYZb7GkM0EWs1M=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=bhhuGWr/+jm5Q9S0U8w6mEuSLLwgiIufL95jhrfVREEThKTFcDBkyBp5GDcKFdtTkgOfYj761xUwk0J4504LjvqJ7Y0VGMf5WZwtljNGOpSBnYglevuC+MPbb127ubxR425b/JgvQjBq5HZt/yWsLy+Og0ZG4gIbLoSUDjLdU1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iYAEIkXC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iYAEIkXC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73AF2C19421; Wed, 18 Mar 2026 17:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773855742; bh=8zKKN1pmyDuNOP9IFZ6JMQazxPmRneYZb7GkM0EWs1M=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=iYAEIkXCrx+/VEh7DepBCdOTKPwbvrbMFvjTsIWj/rqiBguk6+RQ75QjfHlMkIQ4v PTG5SQq6AsjL7xtYZilcn6AgYRU82pofqSAoZrhhL59FYUak4m5cJqdcegrcHJPjWJ 8jIxEt3wImCIbcQU/kbaO3d/VyGmD2NFBb6CuGGUHczyc/EaJK3olq01mnk1kY+6A6 UjOXtjxsm/+addRwRZLayKye+WHXrPmZxtmquu7qkbJO6g4Uz1aBH755I8TJopmD1T vKwEFlhWyH+RqDMVMC0hHb000gZ3YxGHwykfhaiWQjmMBmPCcMxfg4q4vKLCoKrDi9 gD83h3od9KNSg== Date: Wed, 18 Mar 2026 11:42:18 -0600 (MDT) From: Paul Walmsley To: Vivian Wang cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Andrew Morton , "Mike Rapoport (Microsoft)" , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, =?ISO-8859-15?Q?Thomas_Wei=DFschuh?= Subject: Re: [PATCH] riscv: patch: Avoid early page_to_phys() In-Reply-To: <20260310-riscv-sparsemem-alternatives-fix-v1-1-659d5dd257e2@iscas.ac.cn> Message-ID: <6ec5d4d4-f171-d41b-2705-a051bcb794e9@kernel.org> References: <20260310-riscv-sparsemem-alternatives-fix-v1-1-659d5dd257e2@iscas.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-310414524-1773855742=:215483" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-310414524-1773855742=:215483 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Tue, 10 Mar 2026, Vivian Wang wrote: > Similarly to commit 8d09e2d569f6 ("arm64: patching: avoid early > page_to_phys()"), avoid using phys_to_page() for the kernel address case > in patch_map(). > > Since this is called from apply_boot_alternatives() in setup_arch(), and > commit 4267739cabb8 ("arch, mm: consolidate initialization of SPARSE > memory model") has moved sparse_init() to after setup_arch(), > phys_to_page() is not available there yet, and it panics on boot with > SPARSEMEM on RV32, which does not use SPARSEMEM_VMEMMAP. > > Reported-by: Thomas Weißschuh > Closes: https://lore.kernel.org/r/20260223144108-dcace0b9-02e8-4b67-a7ce-f263bed36f26@linutronix.de/ > Fixes: 4267739cabb8 ("arch, mm: consolidate initialization of SPARSE memory model") > Suggested-by: Mike Rapoport > Signed-off-by: Vivian Wang Thanks, queued for v7.0-rc. - Paul --8323329-310414524-1773855742=:215483--