qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable


From: Thomas Huth
Subject: Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds
Date: Mon, 23 Sep 2019 19:54:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 23/09/2019 16.52, Peter Maydell wrote:
> On Sat, 21 Sep 2019 at 16:04, Thomas Huth <address@hidden> wrote:
>>
>> qemu-system-arm/-aarch64 currently can't be built without setting the
>> switch CONFIG_ARM_V7M=y - which we currently always do in the config file
>> default-configs/arm-softmmu.mak. This is because the code in target/arm/
>> calls many functions from this armv7m_nvic.c, and thus linking fails
>> without this file.
>>
>> So armv7m_nvic.c should not be under the CONFIG_ARM_V7M switch, but always
>> compiled for arm builds. Since we can not simply do this in hw/intc/ (with
>> "obj-y += ..." it would get compiled for all other architectures, too),
>> let's move the file to hw/arm/ instead and always enable it there.
>>
>> Signed-off-by: Thomas Huth <address@hidden>
>> ---
>>  hw/arm/Makefile.objs           |  2 ++
>>  hw/{intc => arm}/armv7m_nvic.c |  0
>>  hw/arm/trace-events            | 17 +++++++++++++++++
>>  hw/intc/Makefile.objs          |  1 -
>>  hw/intc/trace-events           | 17 -----------------
>>  5 files changed, 19 insertions(+), 18 deletions(-)
>>  rename hw/{intc => arm}/armv7m_nvic.c (100%)
> 
> Please don't move this file. This is an interrupt
> controller (with some other functionality jammed into it)
> and so it should be in hw/intc. It's true that it's rather
> tightly-coupled to the CPU, but the same is true for our
> GICv3 model.

Ok, then what would you suggest to solve the problem that this file has
always to be linked into the binary? I can't use "obj-y += ..." in
hw/intc/Makefile.objs since that would mean that the file also gets
compiled for non-Arm boards. Would you prefer a bunch of stubs instead
that get used if CONFIG_ARM_V7M is not set?

 Thomas



reply via email to

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