From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796386353; b=qXChvIIXL063Fkl0V+5Sn42S934lg0UuBxZt1aelb1AH7BQH4nBC2dehbkD3zuHcVikx MSaei/cSIN1182te3g3h6KuKbXpeTajCjc7srDMnuzzJvxt4hg/u0MpRTGYluFSPR5egH 7a0sg5lhN2cfcAlHc2p+Ps08T3m86B/81n3lM9v+x3ipGu9IJ54uEny3Pj0TZu/6mt+p9 khosMwYTo0Rq/FC8NzH8jn2lqudoRglyzdb/rednyOCeQltRwIX636mfKuUqdUO9XK6xk 5ttSpOWfHoo5RxRd7i4CiWOxl8Y7UyV+k+XtSwuZ/5s9hIQMYzDOxGuZByMZ0L38XOA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796386353; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=+pD0uJzy2JDkMzVuGyA4g+mbn5W7HEcygpb6uNkfeVQ=; b=RHH1lgj0KZUJPv9SjoedXrjiRIe/ZRKHm1vM1gZ8EBO+H4VfLssmqyjShphR5KZEGNzQ zISYLoMsYXZfRToWBWG/oIYQpRT4xCk2ebdpF+dmF3kF3wjN6BHOC+95mTxJyYQ/u53oB UoSvML0PE7gfumlpd/g159MQyOH8QlpiGIDB13D90QuTdr3hWz3E5o4eECF6Kah6Cja2R uk1uWedD5KAa4yhY4dIx7IkCO1ciLLipRiA4XXuFFajbtjl9OuTjwzczR6Q1LSp0eOLL1 4ZVTI94YVqSUHsyQpc6CPNqZbdZmhJUHzAaU6e2gIomecoVCf6LfMoM9JkrFIZZfSqA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="Eryp/leZ"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75366606A32F; Fri, 4 Dec 2026 12:12:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Eryp/leZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A2151F000C2; Fri, 4 Dec 2026 12:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796386352; bh=+pD0uJzy2JDkMzVuGyA4g+mbn5W7HEcygpb6uNkfeVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Eryp/leZEF/HnHxAcvrLs1WSVNZLXe7TrUpVfc1+9xgLp6YjtBE0AMKIUpoLkXunD gVO0SUUXI+fADk/6ipSU4IUE+i1/Zn/UOMeaHZ4wRwQ4KN0FBGzwkyp7nPTNDApRlM 1057mzyyBOqGvDC09zbULo7N1dReKaVw38BzmkB8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Han Gao , Ard Biesheuvel , Sasha Levin Subject: [PATCH 6.6 0926/1167] riscv: efi: Map runtime MMIO with device attributes Date: Fri, 4 Dec 2026 19:05:53 +0900 Message-ID: <20261204100726.315624004@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Han Gao [ Upstream commit 7d49d6e0898680925ea410cbb9d1a6a0e6441462 ] EFI_MEMORY_MAPPED_IO regions are mapped with PAGE_KERNEL, so device registers end up mapped as normal memory. On Milk-V Pioneer, GetTime() reads the clock controller registers and faults: Oops - load access fault [#1] Workqueue: efi_runtime efi_call_rts status: 0000000200000120 badaddr: 0000007030012000 cause: 0000000000000005 Use PAGE_KERNEL_IO for these regions. Fixes: b91540d52a08 ("RISC-V: Add EFI runtime services") Signed-off-by: Han Gao Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin --- arch/riscv/kernel/efi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/efi.c b/arch/riscv/kernel/efi.c index b64bf1624a052..0cf27d4e10f0d 100644 --- a/arch/riscv/kernel/efi.c +++ b/arch/riscv/kernel/efi.c @@ -22,7 +22,7 @@ static __init pgprot_t efimem_to_pgprot_map(efi_memory_desc_t *md) u32 type = md->type; if (type == EFI_MEMORY_MAPPED_IO) - return PAGE_KERNEL; + return PAGE_KERNEL_IO; /* R-- */ if ((attr & (EFI_MEMORY_XP | EFI_MEMORY_RO)) == -- 2.53.0