[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: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds |
Date: |
Tue, 24 Sep 2019 12:01:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 9/24/19 11:48 AM, Thomas Huth wrote:
> On 24/09/2019 11.42, Peter Maydell wrote:
>> On Tue, 24 Sep 2019 at 05:44, Thomas Huth <address@hidden> wrote:
>>>
>>> On 23/09/2019 20.50, Peter Maydell wrote:
>>>> On Mon, 23 Sep 2019 at 19:36, Thomas Huth <address@hidden> wrote:
>>>>> Just try to change "obj-$(CONFIG_ARM_V7M) += armv7m_nvic.o" into
>>>>> "obj-y += armv7m_nvic.o" in hw/int/Makefile.objs, and you'll see it break:
>>>>>
>>>>> CC alpha-softmmu/hw/intc/armv7m_nvic.o
>>>>> In file included from include/hw/intc/armv7m_nvic.h:13,
>>>>> from hw/intc/armv7m_nvic.c:19:
>>>>> target/arm/cpu.h:1416: error: "FPCR_DZE" redefined [-Werror]
>>>>> #define FPCR_DZE (1 << 9) /* Divide by Zero exception trap enable
>>>>> */
>>>>
>>>> Sure, so don't define CONFIG_ARM_V7M in a default-config for
>>>> a non-Arm architecture. Then you get the behaviour you want:
>>>> the file is compiled only for the arm targets.
>>>
>>> Sigh, the point of this series is that it should also possible to
>>> compile *without* CONFIG_ARM_V7M in default-configs if you want (and
>>> yes, there are people out there who want to be able to compile a
>>> minimalistic QEMU). It's currently not possible to disable this switch.
>>> But ok, if you're not really interested in providing a possibility to
>>> make qemu-system-arm a little bit more flexible in this regard, never
>>> mind, I'll look into other issues instead.
>>
>> No, I'm happy that we should be able to compile without CONFIG_ARM_V7M
>> selected. I'm just confused about why you think this requires that
>> we move this file out of hw/intc.
>>
>> Case 1: arm target, CONFIG_ARM_V7M=y (presumably in a Kconfig world
>> this is set by default if the user doesn't flip that switch):
>> obj-$(CONFIG_ARM_V7M) expands to obj-y, file compiled, OK
>> Case 2: arm target, CONFIG_ARM_V7M=n set by user via Kconfig:
>> obj-$(CONFIG_ARM_V7M) expands to obj-n, file not compiled, which is
>> also what we want
> The problem is this "case 2" - it does not work. For example, try to
> delete everything from default-configs/aarch64-softmmu.mak (especially
> the "include"), and just stick a "CONFIG_ARM_VIRT=y" in there.
> Linking of qemu-system-aarch64 will fail with lots of "undefined
> reference to `armv7m_nvic_set_pending'" etc. messages.
This is what I tried to fix with this patch:
"target/arm: Do not build A/M-profile cpus when using KVM"
https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05006.html
I addressed Richard/your's review comments, so the series is ready for
respin.
- Re: [PATCH 1/4] target/arm: Make cpu_register() and set_feature() available for other files, (continued)
- [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Thomas Huth, 2019/09/21
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Peter Maydell, 2019/09/23
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Thomas Huth, 2019/09/23
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Peter Maydell, 2019/09/23
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Thomas Huth, 2019/09/23
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Peter Maydell, 2019/09/23
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Thomas Huth, 2019/09/24
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Peter Maydell, 2019/09/24
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds, Thomas Huth, 2019/09/24
- Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds,
Philippe Mathieu-Daudé <=
- [PATCH 4/4] default-configs: Do not enforce CONFIG_ARM_V7M anymore, Thomas Huth, 2019/09/21
- [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Thomas Huth, 2019/09/21
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Auger Eric, 2019/09/23
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Thomas Huth, 2019/09/23
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Peter Maydell, 2019/09/23
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Thomas Huth, 2019/09/23
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Peter Maydell, 2019/09/23
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Auger Eric, 2019/09/24
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Thomas Huth, 2019/09/24
- Re: [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c, Auger Eric, 2019/09/24