qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 16/24] target/openrisc: Restrict cpu_exec_interrupt() handler


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 16/24] target/openrisc: Restrict cpu_exec_interrupt() handler to sysemu
Date: Sun, 5 Sep 2021 01:40:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 9/2/21 10:24 PM, Warner Losh wrote:
> 
> 
> On Thu, Sep 2, 2021 at 9:18 AM Philippe Mathieu-Daudé <f4bug@amsat.org
> <mailto:f4bug@amsat.org>> wrote:
> 
>     Restrict cpu_exec_interrupt() and its callees to sysemu.
> 
>     Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org
>     <mailto:f4bug@amsat.org>>
>     ---
>      target/openrisc/cpu.h       | 5 +++--
>      target/openrisc/cpu.c       | 2 +-
>      target/openrisc/interrupt.c | 2 --
>      target/openrisc/meson.build | 6 ++++--
>      4 files changed, 8 insertions(+), 7 deletions(-)
> 
> 
> I'm not 100% sure about the build changes because my meson fu is weak,
> but they seem right given the rest. 
> 
> Reviewed-by: Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>>

>     diff --git a/target/openrisc/meson.build b/target/openrisc/meson.build
>     index 9774a583065..e445dec4a00 100644
>     --- a/target/openrisc/meson.build
>     +++ b/target/openrisc/meson.build
>     @@ -9,7 +9,6 @@
>        'exception_helper.c',
>        'fpu_helper.c',
>        'gdbstub.c',
>     -  'interrupt.c',

openrisc_ss is a 'Source Set', it is build each time the openrisc
target is selected (regardless system/user).

>        'interrupt_helper.c',
>        'mmu.c',
>        'sys_helper.c',
>     @@ -17,7 +16,10 @@
>      ))
> 
>      openrisc_softmmu_ss = ss.source_set()

The 'openrisc_softmmu_ss' source set is only build when sysemu
is selected.

>     -openrisc_softmmu_ss.add(files('machine.c'))
>     +openrisc_softmmu_ss.add(files(
>     +  'interrupt.c',

By moving it to the sysemu-specific set, the file won't be built
for a user-only build.

>     +  'machine.c',
>     +))
> 
>      target_arch += {'openrisc': openrisc_ss}
>      target_softmmu_arch += {'openrisc': openrisc_softmmu_ss}

BTW the user-equivalent of ARCH_softmmu_ss is ARCH_user_ss, and
is optional:

$ git grep _user_ss.= target
target/i386/meson.build:23:i386_user_ss = ss.source_set()
target/mips/meson.build:1:mips_user_ss = ss.source_set()
target/s390x/meson.build:34:s390x_user_ss = ss.source_set()

Thanks for your reviews!

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]