[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 02/23] cpu: Restrict target cpu_do_transaction_failed() ha
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v7 02/23] cpu: Restrict target cpu_do_transaction_failed() handlers to sysemu |
Date: |
Wed, 26 May 2021 19:22:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 |
On 5/26/21 4:12 AM, Richard Henderson wrote:
> On 5/17/21 3:51 AM, Philippe Mathieu-Daudé wrote:
>> In commit cbc183d2d9f ("cpu: move cc->transaction_failed to tcg_ops")
>> we restricted the do_transaction_failed() handler to the sysemu part
>> of TCGCPUOps, but forgot to restrict the target specific declarations.
>>
>> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
>> ---
>> target/arm/internals.h | 2 ++
>> target/m68k/cpu.h | 2 ++
>> target/riscv/cpu.h | 10 +++++-----
>> target/xtensa/cpu.h | 8 ++++----
>> 4 files changed, 13 insertions(+), 9 deletions(-)
>
> What do the extra ifdefs buy us? Surely the fact that the symbol is not
> present in the user-only, and would produce link errors if used, is
> sufficient?
Last month on another series you told me we should declare prototypes
that can't be used :) However I agree we want *less* #ifdef'ry, not
more.
The ARM declarations is fixed in Claudio's accel rework.
For the m68k/riscv/xtensa targets I'll see if I can move it elsewhere
in the same file (if there is already such #ifdef'ry), it is worthwhile
to move the declaration in another (sysemu) header, or simply do
nothing.
Thanks,
Phil.
- [PATCH v7 00/23] cpu: Introduce SysemuCPUOps structure, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 03/23] cpu: Restrict target cpu_do_unaligned_access() handlers to sysemu, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 04/23] cpu: Remove duplicated 'sysemu/hw_accel.h' header, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 05/23] cpu: Split as cpu-common / cpu-sysemu, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 06/23] cpu: Un-inline cpu_get_phys_page_debug and cpu_asidx_from_attrs, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 07/23] cpu: Introduce cpu_virtio_is_big_endian(), Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 08/23] cpu: Directly use cpu_write_elf*() fallback handlers in place, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH v7 09/23] cpu: Directly use get_paging_enabled() fallback handlers in place, Philippe Mathieu-Daudé, 2021/05/17