Skip to contentSkip to conversation

target/mips: make SEMIHOSTING conditional on TCG

PATCH In review Alex Bennée 2 participants 3 messages Jun 8, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/mips: make SEMIHOSTING conditional on TCG

Previously SEMIHOSTING was always selected due to requirements in the helper files. Since the original fix there has been refactoring in the mips code to split TCG and KVM code. The recent semihosting refactoring triggers the inverse build problem for KVM only mips builds. Instead of selecting it in the common config make it optional on TCG being enabled in the target Kconfig.

Cc Richard Henderson <[email protected]>
---
 configs/devices/mips-softmmu/common.mak | 3 ---
 target/mips/Kconfig                     | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)
configs/devices/mips-softmmu/common.mak +0 -3
index d2202c839e..89906777ae 100644
@@ -1,8 +1,5 @@
 # Common mips*-softmmu CONFIG defines
 
-# CONFIG_SEMIHOSTING is always required on this architecture
-CONFIG_SEMIHOSTING=y
-
 CONFIG_ISA_BUS=y
 CONFIG_PCI=y
 CONFIG_PCI_DEVICES=y
target/mips/Kconfig +1 -0
index 6adf145354..4918fa42e9 100644
@@ -1,5 +1,6 @@
 config MIPS
     bool
+    select SEMIHOSTING if TCG
 
 config MIPS64
     bool
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Alex Bennée

Previously SEMIHOSTING was always selected due to requirements in the helper files. Since the original fix there has been refactoring in the mips code to split TCG and KVM code. The recent semihosting refactoring triggers the inverse build problem for KVM only mips builds. Instead of selecting it in the common config make it optional on TCG being enabled in the target Kconfig.

Quoted 6 lines
Cc Richard Henderson<[email protected]>
---
  configs/devices/mips-softmmu/common.mak | 3 ---
  target/mips/Kconfig                     | 1 +
  2 files changed, 1 insertion(+), 3 deletions(-)

Awesome, thanks.

r~

#2 lore raw
Quoted 8 lines · Richard Henderson
Quoted 7 lines · Alex Bennée

Previously SEMIHOSTING was always selected due to requirements in the helper files. Since the original fix there has been refactoring in the mips code to split TCG and KVM code. The recent semihosting refactoring triggers the inverse build problem for KVM only mips builds. Instead of selecting it in the common config make it optional on TCG being enabled in the target Kconfig.

Quoted 6 lines
Quoted 6 lines
Cc Richard Henderson<[email protected]>

---
  configs/devices/mips-softmmu/common.mak | 3 ---
  target/mips/Kconfig                     | 1 +

  2 files changed, 1 insertion(+), 3 deletions(-)

Oh, I would expect all of the settings of SEMIHOSTING to be done this way. But I guess mips is the current target that supports semihosting and kvm-only.

r~