mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
cpu: move cc->transaction_failed to tcg_ops
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [claudio: wrap target code around CONFIG_TCG and !CONFIG_USER_ONLY] avoiding its use in headers used by common_ss code (should be poisoned). Note: need to be careful with the use of CONFIG_USER_ONLY, Message-Id: <20210204163931.7358-11-cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
0545608056
commit
cbc183d2d9
12 changed files with 34 additions and 29 deletions
|
@ -116,6 +116,8 @@ static const MemoryRegionOps dma_dummy_ops = {
|
|||
#define MAGNUM_BIOS_SIZE_MAX 0x7e000
|
||||
#define MAGNUM_BIOS_SIZE \
|
||||
(BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
|
||||
|
||||
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
|
||||
static void (*real_do_transaction_failed)(CPUState *cpu, hwaddr physaddr,
|
||||
vaddr addr, unsigned size,
|
||||
MMUAccessType access_type,
|
||||
|
@ -137,6 +139,7 @@ static void mips_jazz_do_transaction_failed(CPUState *cs, hwaddr physaddr,
|
|||
(*real_do_transaction_failed)(cs, physaddr, addr, size, access_type,
|
||||
mmu_idx, attrs, response, retaddr);
|
||||
}
|
||||
#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
|
||||
|
||||
static void mips_jazz_init(MachineState *machine,
|
||||
enum jazz_model_e jazz_model)
|
||||
|
@ -205,8 +208,10 @@ static void mips_jazz_init(MachineState *machine,
|
|||
* memory region that catches all memory accesses, as we do on Malta.
|
||||
*/
|
||||
cc = CPU_GET_CLASS(cpu);
|
||||
real_do_transaction_failed = cc->do_transaction_failed;
|
||||
cc->do_transaction_failed = mips_jazz_do_transaction_failed;
|
||||
#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
|
||||
real_do_transaction_failed = cc->tcg_ops.do_transaction_failed;
|
||||
cc->tcg_ops.do_transaction_failed = mips_jazz_do_transaction_failed;
|
||||
#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */
|
||||
|
||||
/* allocate RAM */
|
||||
memory_region_add_subregion(address_space, 0, machine->ram);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue