Skip to contentSkip to conversation

accel/tcg: Include missing headers to 'tb-jmp-cache.h'

PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages Jan 11, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/tcg: Include missing headers to 'tb-jmp-cache.h'

Due to missing headers, when including "tb-jmp-cache.h" we might get:

accel/tcg/tb-jmp-cache.h:21:21: error: field ‘rcu’ has incomplete type

     21 |     struct rcu_head rcu;
        |                     ^~~
  accel/tcg/tb-jmp-cache.h:24:9: error: unknown type name ‘vaddr’
     24 |         vaddr pc;
        |         ^~~~~

Add the missing "qemu/rcu.h" and "exec/cpu-common.h" headers.

---
 accel/tcg/tb-jmp-cache.h | 3 +++
 1 file changed, 3 insertions(+)
accel/tcg/tb-jmp-cache.h +3 -0
index bb424c8a05..b13a02e45d 100644
@@ -9,6 +9,9 @@
 #ifndef ACCEL_TCG_TB_JMP_CACHE_H
 #define ACCEL_TCG_TB_JMP_CACHE_H
 
+#include "qemu/rcu.h"
+#include "exec/cpu-common.h"
+
 #define TB_JMP_CACHE_BITS 12
 #define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS)
 
Signature · 1 line
2.41.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Philippe Mathieu-Daudé

Due to missing headers, when including "tb-jmp-cache.h" we might get:

   accel/tcg/tb-jmp-cache.h:21:21: error: field ‘rcu’ has incomplete type
      21 |     struct rcu_head rcu;
         |                     ^~~
   accel/tcg/tb-jmp-cache.h:24:9: error: unknown type name ‘vaddr’
      24 |         vaddr pc;
         |         ^~~~~
Quoted 3 lines

Add the missing "qemu/rcu.h" and "exec/cpu-common.h" headers.

r~

Quoted 18 lines
---
  accel/tcg/tb-jmp-cache.h | 3 +++
  1 file changed, 3 insertions(+)
accel/tcg/tb-jmp-cache.h +3 -0
index bb424c8a05..b13a02e45d 100644
@@ -9,6 +9,9 @@
  #ifndef ACCEL_TCG_TB_JMP_CACHE_H
  #define ACCEL_TCG_TB_JMP_CACHE_H
 
+#include "qemu/rcu.h"
+#include "exec/cpu-common.h"
+
  #define TB_JMP_CACHE_BITS 12
  #define TB_JMP_CACHE_SIZE (1 << TB_JMP_CACHE_BITS)