Skip to content

Commit

Permalink
S390: Merging s390_ipl_cpu and s390_ipl_reset
Browse files Browse the repository at this point in the history
There is no use in have this splitted in two functions.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
Dominik Dingel authored and agraf committed May 6, 2013
1 parent e89e33e commit 2c4c71e
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions hw/s390x/ipl.c
Expand Up @@ -57,16 +57,6 @@ typedef struct S390IPLState {
} S390IPLState;


static void s390_ipl_cpu(uint64_t pswaddr)
{
S390CPU *cpu = S390_CPU(qemu_get_cpu(0));
CPUS390XState *env = &cpu->env;

env->psw.addr = pswaddr;
env->psw.mask = IPL_PSW_MASK;
s390_add_running_cpu(cpu);
}

static int s390_ipl_init(SysBusDevice *dev)
{
S390IPLState *ipl = S390_IPL(dev);
Expand Down Expand Up @@ -155,8 +145,12 @@ static Property s390_ipl_properties[] = {
static void s390_ipl_reset(DeviceState *dev)
{
S390IPLState *ipl = S390_IPL(dev);
S390CPU *cpu = S390_CPU(qemu_get_cpu(0));
CPUS390XState *env = &cpu->env;

s390_ipl_cpu(ipl->start_addr);
env->psw.addr = ipl->start_addr;
env->psw.mask = IPL_PSW_MASK;
s390_add_running_cpu(cpu);
}

static void s390_ipl_class_init(ObjectClass *klass, void *data)
Expand Down

0 comments on commit 2c4c71e

Please sign in to comment.