diff mbox series

[v2,1/4] accel/tcg: Move system emulation files under sysemu/ subdirectory

Message ID 20240503122526.28312-2-philmd@linaro.org
State New
Headers show
Series accel/tcg: Call tcg_flush_jmp_cache() again when creating user-mode cpu | expand

Commit Message

Philippe Mathieu-Daudé May 3, 2024, 12:25 p.m. UTC
Some files are specific to system emulation. Move them under
their own sysemu/ directory. This might help to notice what
is affected (user, system or both) when doing global refactors.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h |  0
 accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h  |  0
 accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h     |  0
 accel/tcg/{ => sysemu}/tcg-accel-ops.h        |  0
 accel/tcg/{ => sysemu}/icount-common.c        |  0
 accel/tcg/{ => sysemu}/monitor.c              |  4 ++--
 accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c |  0
 accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c  |  0
 accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c     |  0
 accel/tcg/{ => sysemu}/tcg-accel-ops.c        |  0
 accel/tcg/meson.build                         | 14 ++------------
 accel/tcg/sysemu/meson.build                  | 11 +++++++++++
 12 files changed, 15 insertions(+), 14 deletions(-)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h (100%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h (100%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h (100%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops.h (100%)
 rename accel/tcg/{ => sysemu}/icount-common.c (100%)
 rename accel/tcg/{ => sysemu}/monitor.c (99%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c (100%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c (100%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c (100%)
 rename accel/tcg/{ => sysemu}/tcg-accel-ops.c (100%)
 create mode 100644 accel/tcg/sysemu/meson.build

Comments

Philippe Mathieu-Daudé May 3, 2024, 12:30 p.m. UTC | #1
On 3/5/24 14:25, Philippe Mathieu-Daudé wrote:
> Some files are specific to system emulation. Move them under
> their own sysemu/ directory. This might help to notice what
> is affected (user, system or both) when doing global refactors.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h |  0
>   accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h  |  0
>   accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h     |  0
>   accel/tcg/{ => sysemu}/tcg-accel-ops.h        |  0
>   accel/tcg/{ => sysemu}/icount-common.c        |  0
>   accel/tcg/{ => sysemu}/monitor.c              |  4 ++--
>   accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c |  0
>   accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c  |  0
>   accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c     |  0
>   accel/tcg/{ => sysemu}/tcg-accel-ops.c        |  0
>   accel/tcg/meson.build                         | 14 ++------------
>   accel/tcg/sysemu/meson.build                  | 11 +++++++++++
>   12 files changed, 15 insertions(+), 14 deletions(-)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.h (100%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.h (100%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.h (100%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops.h (100%)
>   rename accel/tcg/{ => sysemu}/icount-common.c (100%)
>   rename accel/tcg/{ => sysemu}/monitor.c (99%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops-icount.c (100%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops-mttcg.c (100%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops-rr.c (100%)
>   rename accel/tcg/{ => sysemu}/tcg-accel-ops.c (100%)
>   create mode 100644 accel/tcg/sysemu/meson.build


> diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build
> index aef80de967..1b91f26a7f 100644
> --- a/accel/tcg/meson.build
> +++ b/accel/tcg/meson.build
> @@ -18,19 +18,9 @@ if get_option('plugins')
>   endif
>   specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss)
>   
> -specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
> +specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( # SoftMMU
>     'cputlb.c',
>     'watchpoint.c',
>   ))
>   
> -system_ss.add(when: ['CONFIG_TCG'], if_true: files(
> -  'icount-common.c',
> -  'monitor.c',
> -))
> -
> -tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
> -  'tcg-accel-ops.c',
> -  'tcg-accel-ops-mttcg.c',
> -  'tcg-accel-ops-icount.c',
> -  'tcg-accel-ops-rr.c',
> -))
> +subdir('sysemu')
> diff --git a/accel/tcg/sysemu/meson.build b/accel/tcg/sysemu/meson.build
> new file mode 100644
> index 0000000000..d0b4939ba9
> --- /dev/null
> +++ b/accel/tcg/sysemu/meson.build
> @@ -0,0 +1,11 @@
> +system_ss.add(files(

Oops, broken rebase, sorry...

> +  'icount-common.c',
> +  'monitor.c',
> +))
> +
> +tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files(
> +  'tcg-accel-ops.c',
> +  'tcg-accel-ops-mttcg.c',
> +  'tcg-accel-ops-icount.c',
> +  'tcg-accel-ops-rr.c',
> +))
diff mbox series

Patch

diff --git a/accel/tcg/tcg-accel-ops-icount.h b/accel/tcg/sysemu/tcg-accel-ops-icount.h
similarity index 100%
rename from accel/tcg/tcg-accel-ops-icount.h
rename to accel/tcg/sysemu/tcg-accel-ops-icount.h
diff --git a/accel/tcg/tcg-accel-ops-mttcg.h b/accel/tcg/sysemu/tcg-accel-ops-mttcg.h
similarity index 100%
rename from accel/tcg/tcg-accel-ops-mttcg.h
rename to accel/tcg/sysemu/tcg-accel-ops-mttcg.h
diff --git a/accel/tcg/tcg-accel-ops-rr.h b/accel/tcg/sysemu/tcg-accel-ops-rr.h
similarity index 100%
rename from accel/tcg/tcg-accel-ops-rr.h
rename to accel/tcg/sysemu/tcg-accel-ops-rr.h
diff --git a/accel/tcg/tcg-accel-ops.h b/accel/tcg/sysemu/tcg-accel-ops.h
similarity index 100%
rename from accel/tcg/tcg-accel-ops.h
rename to accel/tcg/sysemu/tcg-accel-ops.h
diff --git a/accel/tcg/icount-common.c b/accel/tcg/sysemu/icount-common.c
similarity index 100%
rename from accel/tcg/icount-common.c
rename to accel/tcg/sysemu/icount-common.c
diff --git a/accel/tcg/monitor.c b/accel/tcg/sysemu/monitor.c
similarity index 99%
rename from accel/tcg/monitor.c
rename to accel/tcg/sysemu/monitor.c
index 093efe9714..620c18d267 100644
--- a/accel/tcg/monitor.c
+++ b/accel/tcg/sysemu/monitor.c
@@ -17,8 +17,8 @@ 
 #include "sysemu/cpu-timers.h"
 #include "sysemu/tcg.h"
 #include "tcg/tcg.h"
-#include "internal-common.h"
-#include "tb-context.h"
+#include "../internal-common.h"
+#include "../tb-context.h"
 
 
 static void dump_drift_info(GString *buf)
diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/sysemu/tcg-accel-ops-icount.c
similarity index 100%
rename from accel/tcg/tcg-accel-ops-icount.c
rename to accel/tcg/sysemu/tcg-accel-ops-icount.c
diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/sysemu/tcg-accel-ops-mttcg.c
similarity index 100%
rename from accel/tcg/tcg-accel-ops-mttcg.c
rename to accel/tcg/sysemu/tcg-accel-ops-mttcg.c
diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/sysemu/tcg-accel-ops-rr.c
similarity index 100%
rename from accel/tcg/tcg-accel-ops-rr.c
rename to accel/tcg/sysemu/tcg-accel-ops-rr.c
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/sysemu/tcg-accel-ops.c
similarity index 100%
rename from accel/tcg/tcg-accel-ops.c
rename to accel/tcg/sysemu/tcg-accel-ops.c
diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build
index aef80de967..1b91f26a7f 100644
--- a/accel/tcg/meson.build
+++ b/accel/tcg/meson.build
@@ -18,19 +18,9 @@  if get_option('plugins')
 endif
 specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss)
 
-specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
+specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( # SoftMMU
   'cputlb.c',
   'watchpoint.c',
 ))
 
-system_ss.add(when: ['CONFIG_TCG'], if_true: files(
-  'icount-common.c',
-  'monitor.c',
-))
-
-tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files(
-  'tcg-accel-ops.c',
-  'tcg-accel-ops-mttcg.c',
-  'tcg-accel-ops-icount.c',
-  'tcg-accel-ops-rr.c',
-))
+subdir('sysemu')
diff --git a/accel/tcg/sysemu/meson.build b/accel/tcg/sysemu/meson.build
new file mode 100644
index 0000000000..d0b4939ba9
--- /dev/null
+++ b/accel/tcg/sysemu/meson.build
@@ -0,0 +1,11 @@ 
+system_ss.add(files(
+  'icount-common.c',
+  'monitor.c',
+))
+
+tcg_module_ss.add(when: ['CONFIG_SYSTEM_ONLY'], if_true: files(
+  'tcg-accel-ops.c',
+  'tcg-accel-ops-mttcg.c',
+  'tcg-accel-ops-icount.c',
+  'tcg-accel-ops-rr.c',
+))