Skip to content

Commit

Permalink
Merge tag 'pull-request-2024-03-12' of https://gitlab.com/thuth/qemu
Browse files Browse the repository at this point in the history
…into staging

* Add missing ERRP_GUARD() statements in functions that need it
* Prefer fast cpu_env() over slower CPU QOM cast macro

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmXwPhYRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbWHvBAAgKx5LHFjz3xREVA+LkDTQ49mz0lK3s32
# SGvNlIHjiaDGVttVYhVC4sinBWUruG4Lyv/2QN72OJBzn6WUsEUQE3KPH1d7Y3/s
# wS9X7mj70n4kugWJqeIJP5AXSRasHmWoQ4QJLVQRJd6+Eb9jqwep0x7bYkI1de6D
# bL1Q7bIfkFeNQBXaiPWAm2i+hqmT4C1r8HEAGZIjAsMFrjy/hzBEjNV+pnh6ZSq9
# Vp8BsPWRfLU2XHm4WX0o8d89WUMAfUGbVkddEl/XjIHDrUD+Zbd1HAhLyfhsmrnE
# jXIwSzm+ML1KX4MoF5ilGtg8Oo0gQDEBy9/xck6G0HCm9lIoLKlgTxK9glr2vdT8
# yxZmrM9Hder7F9hKKxmb127xgU6AmL7rYmVqsoQMNAq22D6Xr4UDpgFRXNk2/wO6
# zZZBkfZ4H4MpZXbd/KJpXvYH5mQA4IpkOy8LJdE+dbcHX7Szy9ksZdPA+Z10hqqf
# zqS13qTs3abxymy2Q/tO3hPKSJCk1+vCGUkN60Wm+9VoLWGoU43qMc7gnY/pCS7m
# 0rFKtvfwFHhokX1orK0lP/ppVzPv/5oFIeK8YDY9if+N+dU2LCwVZHIuf2/VJPRq
# wmgH2vAn3JDoRKPxTGX9ly6AMxuZaeP92qBTOPap0gDhihYzIpaCq9ecEBoTakI7
# tdFhV0iRr08=
# =NiP4
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Mar 2024 11:35:50 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2024-03-12' of https://gitlab.com/thuth/qemu: (55 commits)
  user: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/xtensa: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/tricore: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/sparc: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/sh4: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/rx: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/openrisc: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/nios2: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/mips: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/microblaze: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/m68k: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/loongarch: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/i386/hvf: Use CPUState typedef
  target/hexagon: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/cris: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/avr: Prefer fast cpu_env() over slower CPU QOM cast macro
  target/alpha: Prefer fast cpu_env() over slower CPU QOM cast macro
  target: Replace CPU_GET_CLASS(cpu -> obj) in cpu_reset_hold() handler
  bulk: Call in place single use cpu_env()
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Mar 12, 2024
2 parents 35ac683 + 42e62aa commit e692f9c
Show file tree
Hide file tree
Showing 154 changed files with 436 additions and 692 deletions.
3 changes: 1 addition & 2 deletions accel/tcg/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ const void *HELPER(lookup_tb_ptr)(CPUArchState *env)
static inline TranslationBlock * QEMU_DISABLE_CFI
cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit)
{
CPUArchState *env = cpu_env(cpu);
uintptr_t ret;
TranslationBlock *last_tb;
const void *tb_ptr = itb->tc.ptr;
Expand All @@ -446,7 +445,7 @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit)
}

qemu_thread_jit_execute();
ret = tcg_qemu_tb_exec(env, tb_ptr);
ret = tcg_qemu_tb_exec(cpu_env(cpu), tb_ptr);
cpu->neg.can_do_io = true;
qemu_plugin_disable_mem_helpers(cpu);
/*
Expand Down
1 change: 1 addition & 0 deletions backends/iommufd.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static void iommufd_backend_finalize(Object *obj)

static void iommufd_backend_set_fd(Object *obj, const char *str, Error **errp)
{
ERRP_GUARD();
IOMMUFDBackend *be = IOMMUFD_BACKEND(obj);
int fd = -1;

Expand Down
6 changes: 5 additions & 1 deletion block.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ typedef struct CreateCo {
int coroutine_fn bdrv_co_create(BlockDriver *drv, const char *filename,
QemuOpts *opts, Error **errp)
{
ERRP_GUARD();
int ret;
GLOBAL_STATE_CODE();
ERRP_GUARD();

if (!drv->bdrv_co_create_opts) {
error_setg(errp, "Driver '%s' does not support image creation",
Expand Down Expand Up @@ -633,6 +633,7 @@ int coroutine_fn bdrv_co_create_opts_simple(BlockDriver *drv,
QemuOpts *opts,
Error **errp)
{
ERRP_GUARD();
BlockBackend *blk;
QDict *options;
int64_t size = 0;
Expand Down Expand Up @@ -1998,6 +1999,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockBackend *file,

static QDict *parse_json_filename(const char *filename, Error **errp)
{
ERRP_GUARD();
QObject *options_obj;
QDict *options;
int ret;
Expand Down Expand Up @@ -3585,6 +3587,7 @@ int bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
const char *bdref_key, Error **errp)
{
ERRP_GUARD();
char *backing_filename = NULL;
char *bdref_key_dot;
const char *reference = NULL;
Expand Down Expand Up @@ -3851,6 +3854,7 @@ static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs,
QDict *snapshot_options,
Error **errp)
{
ERRP_GUARD();
g_autofree char *tmp_filename = NULL;
int64_t total_size;
QemuOpts *opts = NULL;
Expand Down
1 change: 1 addition & 0 deletions block/copy-before-write.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ static BlockdevOptions *cbw_parse_options(QDict *options, Error **errp)
static int cbw_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
ERRP_GUARD();
BDRVCopyBeforeWriteState *s = bs->opaque;
BdrvDirtyBitmap *bitmap = NULL;
int64_t cluster_size;
Expand Down
1 change: 1 addition & 0 deletions block/nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ static coroutine_fn int nbd_co_do_receive_one_chunk(
BDRVNBDState *s, uint64_t cookie, bool only_structured,
int *request_ret, QEMUIOVector *qiov, void **payload, Error **errp)
{
ERRP_GUARD();
int ret;
int i = COOKIE_TO_INDEX(cookie);
void *local_payload = NULL;
Expand Down
3 changes: 3 additions & 0 deletions block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ static QemuOptsList runtime_opts = {
static bool nvme_init_queue(BDRVNVMeState *s, NVMeQueue *q,
unsigned nentries, size_t entry_bytes, Error **errp)
{
ERRP_GUARD();
size_t bytes;
int r;

Expand Down Expand Up @@ -221,6 +222,7 @@ static NVMeQueuePair *nvme_create_queue_pair(BDRVNVMeState *s,
unsigned idx, size_t size,
Error **errp)
{
ERRP_GUARD();
int i, r;
NVMeQueuePair *q;
uint64_t prp_list_iova;
Expand Down Expand Up @@ -535,6 +537,7 @@ static int nvme_admin_cmd_sync(BlockDriverState *bs, NvmeCmd *cmd)
/* Returns true on success, false on failure. */
static bool nvme_identify(BlockDriverState *bs, int namespace, Error **errp)
{
ERRP_GUARD();
BDRVNVMeState *s = bs->opaque;
bool ret = false;
QEMU_AUTO_VFREE union {
Expand Down
6 changes: 3 additions & 3 deletions block/qapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
bool flat,
Error **errp)
{
ERRP_GUARD();
ImageInfo **p_image_info;
ImageInfo *backing_info;
BlockDriverState *backing;
BlockDeviceInfo *info;
ERRP_GUARD();

if (!bs->drv) {
error_setg(errp, "Block device %s is ejected", bs->node_name);
Expand Down Expand Up @@ -330,8 +330,8 @@ void bdrv_query_image_info(BlockDriverState *bs,
bool skip_implicit_filters,
Error **errp)
{
ImageInfo *info;
ERRP_GUARD();
ImageInfo *info;

info = g_new0(ImageInfo, 1);
bdrv_do_query_node_info(bs, qapi_ImageInfo_base(info), errp);
Expand Down Expand Up @@ -382,10 +382,10 @@ void bdrv_query_block_graph_info(BlockDriverState *bs,
BlockGraphInfo **p_info,
Error **errp)
{
ERRP_GUARD();
BlockGraphInfo *info;
BlockChildInfoList **children_list_tail;
BdrvChild *c;
ERRP_GUARD();

info = g_new0(BlockGraphInfo, 1);
bdrv_do_query_node_info(bs, qapi_BlockGraphInfo_base(info), errp);
Expand Down
1 change: 1 addition & 0 deletions block/qcow2-bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,7 @@ bool coroutine_fn qcow2_co_can_store_new_dirty_bitmap(BlockDriverState *bs,
uint32_t granularity,
Error **errp)
{
ERRP_GUARD();
BDRVQcow2State *s = bs->opaque;
BdrvDirtyBitmap *bitmap;
uint64_t bitmap_directory_size = 0;
Expand Down
2 changes: 2 additions & 0 deletions block/qcow2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3483,6 +3483,7 @@ static uint64_t qcow2_opt_get_refcount_bits_del(QemuOpts *opts, int version,
static int coroutine_fn GRAPH_UNLOCKED
qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
{
ERRP_GUARD();
BlockdevCreateOptionsQcow2 *qcow2_opts;
QDict *options;

Expand Down Expand Up @@ -4283,6 +4284,7 @@ static int coroutine_fn GRAPH_RDLOCK
qcow2_co_truncate(BlockDriverState *bs, int64_t offset, bool exact,
PreallocMode prealloc, BdrvRequestFlags flags, Error **errp)
{
ERRP_GUARD();
BDRVQcow2State *s = bs->opaque;
uint64_t old_length;
int64_t new_l1_size;
Expand Down
1 change: 1 addition & 0 deletions block/qed.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,7 @@ bdrv_qed_co_change_backing_file(BlockDriverState *bs, const char *backing_file,
static void coroutine_fn GRAPH_RDLOCK
bdrv_qed_co_invalidate_cache(BlockDriverState *bs, Error **errp)
{
ERRP_GUARD();
BDRVQEDState *s = bs->opaque;
int ret;

Expand Down
2 changes: 2 additions & 0 deletions block/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ int bdrv_all_delete_snapshot(const char *name,
bool has_devices, strList *devices,
Error **errp)
{
ERRP_GUARD();
g_autoptr(GList) bdrvs = NULL;
GList *iterbdrvs;

Expand Down Expand Up @@ -605,6 +606,7 @@ int bdrv_all_goto_snapshot(const char *name,
bool has_devices, strList *devices,
Error **errp)
{
ERRP_GUARD();
g_autoptr(GList) bdrvs = NULL;
GList *iterbdrvs;
int ret;
Expand Down
1 change: 1 addition & 0 deletions block/vdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ static int coroutine_fn GRAPH_UNLOCKED
vdi_co_do_create(BlockdevCreateOptions *create_options, size_t block_size,
Error **errp)
{
ERRP_GUARD();
BlockdevCreateOptionsVdi *vdi_opts;
int ret = 0;
uint64_t bytes = 0;
Expand Down
1 change: 1 addition & 0 deletions block/vmdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,6 +1147,7 @@ static int GRAPH_RDLOCK
vmdk_parse_extents(const char *desc, BlockDriverState *bs, QDict *options,
Error **errp)
{
ERRP_GUARD();
int ret;
int matches;
char access[11];
Expand Down
3 changes: 1 addition & 2 deletions bsd-user/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,13 @@ static int fatal_signal(int sig)
void force_sig_fault(int sig, int code, abi_ulong addr)
{
CPUState *cpu = thread_cpu;
CPUArchState *env = cpu_env(cpu);
target_siginfo_t info = {};

info.si_signo = sig;
info.si_errno = 0;
info.si_code = code;
info.si_addr = addr;
queue_signal(env, sig, QEMU_SI_FAULT, &info);
queue_signal(cpu_env(cpu), sig, QEMU_SI_FAULT, &info);
}

static void host_signal_handler(int host_sig, siginfo_t *info, void *puc)
Expand Down
1 change: 1 addition & 0 deletions hw/block/virtio-blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,7 @@ static bool apply_iothread_vq_mapping(
/* Context: BQL held */
static bool virtio_blk_vq_aio_context_init(VirtIOBlock *s, Error **errp)
{
ERRP_GUARD();
VirtIODevice *vdev = VIRTIO_DEVICE(s);
VirtIOBlkConf *conf = &s->conf;
BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(vdev)));
Expand Down
4 changes: 2 additions & 2 deletions hw/core/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine)
mc->possible_cpu_arch_ids(machine);

for (i = 0; i < machine->possible_cpus->len; i++) {
Object *cpu;
CPUState *cpu;
HotpluggableCPU *cpu_item = g_new0(typeof(*cpu_item), 1);

cpu_item->type = g_strdup(machine->possible_cpus->cpus[i].type);
Expand All @@ -728,7 +728,7 @@ HotpluggableCPUList *machine_query_hotpluggable_cpus(MachineState *machine)

cpu = machine->possible_cpus->cpus[i].cpu;
if (cpu) {
cpu_item->qom_path = object_get_canonical_path(cpu);
cpu_item->qom_path = object_get_canonical_path(OBJECT(cpu));
}
QAPI_LIST_PREPEND(head, cpu_item);
}
Expand Down
1 change: 1 addition & 0 deletions hw/cxl/cxl-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static void cxl_fixed_memory_window_config(CXLState *cxl_state,
CXLFixedMemoryWindowOptions *object,
Error **errp)
{
ERRP_GUARD();
g_autofree CXLFixedWindow *fw = g_malloc0(sizeof(*fw));
strList *target;
int i;
Expand Down
2 changes: 1 addition & 1 deletion hw/display/ati.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ static void ati_vga_realize(PCIDevice *dev, Error **errp)
}
vga_init(vga, OBJECT(s), pci_address_space(dev),
pci_address_space_io(dev), true);
vga->con = graphic_console_init(DEVICE(s), 0, s->vga.hw_ops, &s->vga);
vga->con = graphic_console_init(DEVICE(s), 0, s->vga.hw_ops, vga);
if (s->cursor_guest_mode) {
vga->cursor_invalidate = ati_cursor_invalidate;
vga->cursor_draw_line = ati_cursor_draw_line;
Expand Down
1 change: 1 addition & 0 deletions hw/display/macfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ static void macfb_nubus_set_irq(void *opaque, int n, int level)

static void macfb_nubus_realize(DeviceState *dev, Error **errp)
{
ERRP_GUARD();
NubusDevice *nd = NUBUS_DEVICE(dev);
MacfbNubusState *s = NUBUS_MACFB(dev);
MacfbNubusDeviceClass *ndc = NUBUS_MACFB_GET_CLASS(dev);
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void x86_cpu_plug(HotplugHandler *hotplug_dev,
}

found_cpu = x86_find_cpu_slot(MACHINE(x86ms), cpu->apic_id, NULL);
found_cpu->cpu = OBJECT(dev);
found_cpu->cpu = CPU(dev);
out:
error_propagate(errp, local_err);
}
Expand Down
4 changes: 4 additions & 0 deletions hw/intc/ioapic_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ static int ioapic_dispatch_post_load(void *opaque, int version_id)

static void ioapic_common_realize(DeviceState *dev, Error **errp)
{
ERRP_GUARD();
IOAPICCommonState *s = IOAPIC_COMMON(dev);
IOAPICCommonClass *info;

Expand All @@ -162,6 +163,9 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp)

info = IOAPIC_COMMON_GET_CLASS(s);
info->realize(dev, errp);
if (*errp) {
return;
}

sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->io_memory);
ioapic_no++;
Expand Down
2 changes: 1 addition & 1 deletion hw/loongarch/virt.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ static void loongarch_init(MachineState *machine)
for (i = 0; i < possible_cpus->len; i++) {
cpu = cpu_create(machine->cpu_type);
cpu->cpu_index = i;
machine->possible_cpus->cpus[i].cpu = OBJECT(cpu);
machine->possible_cpus->cpus[i].cpu = cpu;
lacpu = LOONGARCH_CPU(cpu);
lacpu->phy_id = machine->possible_cpus->cpus[i].arch_id;
}
Expand Down
1 change: 1 addition & 0 deletions hw/mem/cxl_type3.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ static DOEProtocol doe_cdat_prot[] = {

static void ct3_realize(PCIDevice *pci_dev, Error **errp)
{
ERRP_GUARD();
CXLType3Dev *ct3d = CXL_TYPE3(pci_dev);
CXLComponentState *cxl_cstate = &ct3d->cxl_cstate;
ComponentRegisters *regs = &cxl_cstate->crb;
Expand Down
3 changes: 1 addition & 2 deletions hw/misc/macio/pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,7 @@ static void pmu_realize(DeviceState *dev, Error **errp)
timer_mod(s->one_sec_timer, s->one_sec_target);

if (s->has_adb) {
qbus_init(&s->adb_bus, sizeof(s->adb_bus), TYPE_ADB_BUS,
dev, "adb.0");
qbus_init(adb_bus, sizeof(*adb_bus), TYPE_ADB_BUS, dev, "adb.0");
adb_register_autopoll_callback(adb_bus, pmu_adb_poll, s);
}
}
Expand Down
2 changes: 1 addition & 1 deletion hw/misc/pvpanic-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static void pvpanic_pci_realizefn(PCIDevice *dev, Error **errp)
PVPanicPCIState *s = PVPANIC_PCI_DEVICE(dev);
PVPanicState *ps = &s->pvpanic;

pvpanic_setup_io(&s->pvpanic, DEVICE(s), 2);
pvpanic_setup_io(ps, DEVICE(s), 2);

pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &ps->mr);
}
Expand Down
3 changes: 1 addition & 2 deletions hw/misc/xlnx-versal-trng.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,7 @@ static void trng_prop_fault_event_set(Object *obj, Visitor *v,
Property *prop = opaque;
uint32_t *events = object_field_prop_ptr(obj, prop);

visit_type_uint32(v, name, events, errp);
if (*errp) {
if (!visit_type_uint32(v, name, events, errp)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion hw/pci-bridge/cxl_root_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static void cxl_rp_realize(DeviceState *dev, Error **errp)

cxl_cstate->dvsec_offset = CXL_ROOT_PORT_DVSEC_OFFSET;
cxl_cstate->pdev = pci_dev;
build_dvsecs(&crp->cxl_cstate);
build_dvsecs(cxl_cstate);

cxl_component_register_block_init(OBJECT(pci_dev), cxl_cstate,
TYPE_CXL_ROOT_PORT);
Expand Down
1 change: 1 addition & 0 deletions hw/pci-bridge/cxl_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ static void free_default_cdat_table(CDATSubHeader **cdat_table, int num,

static void cxl_usp_realize(PCIDevice *d, Error **errp)
{
ERRP_GUARD();
PCIEPort *p = PCIE_PORT(d);
CXLUpstreamPort *usp = CXL_USP(d);
CXLComponentState *cxl_cstate = &usp->cxl_cstate;
Expand Down
3 changes: 1 addition & 2 deletions hw/ppc/mpc8544_guts.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ static uint64_t mpc8544_guts_read(void *opaque, hwaddr addr,
unsigned size)
{
uint32_t value = 0;
PowerPCCPU *cpu = POWERPC_CPU(current_cpu);
CPUPPCState *env = &cpu->env;
CPUPPCState *env = cpu_env(current_cpu);

addr &= MPC8544_GUTS_MMIO_SIZE - 1;
switch (addr) {
Expand Down

0 comments on commit e692f9c

Please sign in to comment.