[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250206131926.91289-5-qirui.001@bytedance.com>
Date: Thu, 6 Feb 2025 21:19:25 +0800
From: Rui Qi <qirui.001@...edance.com>
To: paul.walmsley@...ive.com,
palmer@...belt.com,
aou@...s.berkeley.edu,
ardb@...nel.org,
haibo1.xu@...el.com,
guohanjun@...wei.com,
sunilvl@...tanamicro.com,
samuel.holland@...ive.com,
parri.andrea@...il.com,
ericchancf@...gle.com
Cc: linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-efi@...r.kernel.org,
Rui Qi <qirui.001@...edance.com>
Subject: [RFC 4/5] RISC-V: ACPI: define arch_apei_get_mem_attribute
From: Rui Qi <qirui.001@...edance.com>
we need arch_apei_get_mem_attribute to get protection bits
for a given physical address. These protection
bits are then used to map the physical address.
Signed-off-by: Rui Qi <qirui.001@...edance.com>
---
arch/riscv/include/asm/acpi.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h
index 6e13695120bc..c35dd4e5a84d 100644
--- a/arch/riscv/include/asm/acpi.h
+++ b/arch/riscv/include/asm/acpi.h
@@ -90,6 +90,24 @@ static inline void acpi_get_cbo_block_size(struct acpi_table_header *table,
#endif /* CONFIG_ACPI */
+#ifdef CONFIG_ACPI_APEI
+/*
+ * acpi_disable_cmcff is used in drivers/acpi/apei/hest.c for disabling
+ * IA-32 Architecture Corrected Machine Check (CMC) Firmware-First mode
+ * with a kernel command line parameter "acpi=nocmcoff". But we don't
+ * have this IA-32 specific feature on RISC-V, this definition is only
+ * for compatibility.
+ */
+#define acpi_disable_cmcff 1
+static inline pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr)
+{
+ return PAGE_KERNEL_IO;
+}
+
+#else
+#define acpi_disable_cmcff 0
+#endif
+
#ifdef CONFIG_ACPI_NUMA
void acpi_map_cpus_to_nodes(void);
#else
--
2.20.1
Powered by blists - more mailing lists