diff mbox series

[01/28] target/hexagon: Ensure not being build on system emulation

Message ID 20250121142341.17001-2-philmd@linaro.org (mailing list archive)
State New
Headers show
Series cpus: Restrict CPU has_work() handlers to system emulation | expand

Commit Message

Philippe Mathieu-Daudé Jan. 21, 2025, 2:23 p.m. UTC
Currently only user emulation is supported.
Assert no target code is built for system emulation.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/hexagon/cpu.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Brian Cain Jan. 21, 2025, 5:39 p.m. UTC | #1
On 1/21/2025 8:23 AM, Philippe Mathieu-Daudé wrote:
> Currently only user emulation is supported.
> Assert no target code is built for system emulation.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/hexagon/cpu.h | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
> index 79e60d4bfa1..f78c8f9c2a0 100644
> --- a/target/hexagon/cpu.h
> +++ b/target/hexagon/cpu.h
> @@ -26,6 +26,10 @@
>   #include "mmvec/mmvec.h"
>   #include "hw/registerfields.h"
>   
> +#ifndef CONFIG_USER_ONLY
> +#error "Hexagon does not support system emulation"
> +#endif
> +
>   #define NUM_PREGS 4
>   #define TOTAL_PER_THREAD_REGS 64
>   

We hope to mitigate this one in the not-too-distant future. Staged 
commits on my tree implement system emulation, undergoing some 
review/revision now. ;)

But of course this change makes sense for the time being.

Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
diff mbox series

Patch

diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h
index 79e60d4bfa1..f78c8f9c2a0 100644
--- a/target/hexagon/cpu.h
+++ b/target/hexagon/cpu.h
@@ -26,6 +26,10 @@ 
 #include "mmvec/mmvec.h"
 #include "hw/registerfields.h"
 
+#ifndef CONFIG_USER_ONLY
+#error "Hexagon does not support system emulation"
+#endif
+
 #define NUM_PREGS 4
 #define TOTAL_PER_THREAD_REGS 64