[PATCH] target/mips: make SEMIHOSTING conditional on TCG

Alex Bennée posted 1 patch 3 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220608104054.323642-1-alex.bennee@linaro.org
Maintainers: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
configs/devices/mips-softmmu/common.mak | 3 ---
target/mips/Kconfig                     | 1 +
2 files changed, 1 insertion(+), 3 deletions(-)
[PATCH] target/mips: make SEMIHOSTING conditional on TCG
Posted by Alex Bennée 3 years, 8 months ago
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.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
---
 configs/devices/mips-softmmu/common.mak | 3 ---
 target/mips/Kconfig                     | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/configs/devices/mips-softmmu/common.mak b/configs/devices/mips-softmmu/common.mak
index d2202c839e..89906777ae 100644
--- a/configs/devices/mips-softmmu/common.mak
+++ b/configs/devices/mips-softmmu/common.mak
@@ -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
diff --git a/target/mips/Kconfig b/target/mips/Kconfig
index 6adf145354..4918fa42e9 100644
--- a/target/mips/Kconfig
+++ b/target/mips/Kconfig
@@ -1,5 +1,6 @@
 config MIPS
     bool
+    select SEMIHOSTING if TCG
 
 config MIPS64
     bool
-- 
2.30.2


Re: [PATCH] target/mips: make SEMIHOSTING conditional on TCG
Posted by Richard Henderson 3 years, 8 months ago
On 6/8/22 03:40, Alex Bennée wrote:
> 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.
> 
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> Cc: Richard Henderson<richard.henderson@linaro.org>
> ---
>   configs/devices/mips-softmmu/common.mak | 3 ---
>   target/mips/Kconfig                     | 1 +
>   2 files changed, 1 insertion(+), 3 deletions(-)

Awesome, thanks.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~

Re: [PATCH] target/mips: make SEMIHOSTING conditional on TCG
Posted by Richard Henderson 3 years, 8 months ago
On 6/8/22 08:14, Richard Henderson wrote:
> On 6/8/22 03:40, Alex Bennée wrote:
>> 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.
>>
>> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
>> Cc: Richard Henderson<richard.henderson@linaro.org>
>> ---
>>   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~