aboutsummaryrefslogtreecommitdiff
path: root/hw/sun4u.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-10-12 04:23:08 +0200
committerBlue Swirl <blauwirbel@gmail.com>2012-10-13 10:44:13 +0000
commitb64ba4b232e776d891a7a5137a6129221b6a9cd0 (patch)
tree5a4526f8c2fcb5b392a490496d100b52a73be6f4 /hw/sun4u.c
parentce18c558f08ea392b2ec79046eb40e791be5fc88 (diff)
sun4u: Pass SPARCCPU to cpu_set_ivec_irq()
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sun4u.c')
-rw-r--r--hw/sun4u.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 045352277e..940db3348a 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -321,7 +321,8 @@ static void cpu_kick_irq(SPARCCPU *cpu)
static void cpu_set_ivec_irq(void *opaque, int irq, int level)
{
- CPUSPARCState *env = opaque;
+ SPARCCPU *cpu = opaque;
+ CPUSPARCState *env = &cpu->env;
if (level) {
if (!(env->ivec_status & 0x20)) {
@@ -802,7 +803,6 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
const struct hwdef *hwdef)
{
SPARCCPU *cpu;
- CPUSPARCState *env;
M48t59State *nvram;
unsigned int i;
uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry;
@@ -815,14 +815,13 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
/* init CPUs */
cpu = cpu_devinit(cpu_model, hwdef);
- env = &cpu->env;
/* set up devices */
ram_init(0, RAM_size);
prom_init(hwdef->prom_addr, bios_name);
- ivec_irqs = qemu_allocate_irqs(cpu_set_ivec_irq, env, IVEC_MAX);
+ ivec_irqs = qemu_allocate_irqs(cpu_set_ivec_irq, cpu, IVEC_MAX);
pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, ivec_irqs, &pci_bus2,
&pci_bus3, &pbm_irqs);
pci_vga_init(pci_bus);