Re: [PATCH v3 13/16] LoongArch: KVM: Add include defining struct cpu_feature
From: Bibo Mao
Date: Sun Jun 28 2026 - 22:24:36 EST
On 2026/6/29 上午5:58, Uwe Kleine-König (The Capable Hub) wrote:
Traditionally <linux/mod_devicetable.h> was a header defining a plethoraReviewed-by: Bibo Mao <maobibo@xxxxxxxxxxx>
of structs, among them struct cpu_features. This was split now with the
objective that only the relevant bits are included.
Currently <linux/mod_devicetable.h> is transitively included in
arch/loongarch/kvm/main.c via:
arch/loongarch/kvm/main.c ->
<linux/kvm_host.h> ->
<linux/entry-virt.h> ->
<linux/resume_user_mode.h> ->
<linux/memcontrol.h> ->
<linux/cgroup.h> ->
<linux/kernel_stat.h> ->
<linux/interrupt.h> ->
<linux/hardirq> ->
<asm/hardirq.h> ->
<linux/irq.h> ->
<asm/irq.h> ->
<linux/irqdomain.h> ->
<linux/of.h> ->
<linux/mod_devicetable.h>
To keep struct cpu_features available once <linux/of.h> stops including
<linux/mod_devicetable.h>, include it here explicitly.
Acked-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
arch/loongarch/kvm/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/loongarch/kvm/main.c b/arch/loongarch/kvm/main.c
index f105a86143f5..aa0fb4c90d90 100644
--- a/arch/loongarch/kvm/main.c
+++ b/arch/loongarch/kvm/main.c
@@ -5,6 +5,7 @@
#include <linux/err.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h> /* for struct cpu_feature */
#include <linux/kvm_host.h>
#include <asm/cacheflush.h>
#include <asm/cpufeature.h>