mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
s390x: Introduce a SCLPDevice pointer under the machine
Initialize directly SCLPDevice from the machine init handler and remove s390_sclp_init(). We will use the SCLPDevice pointer later to create the consoles. Signed-off-by: Cédric Le Goater <clg@redhat.com> Message-ID: <20240502131533.377719-2-clg@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
c990c1f35b
commit
b350f6c8ed
4 changed files with 8 additions and 13 deletions
|
@ -251,11 +251,15 @@ static void s390_create_sclpconsole(const char *type, Chardev *chardev)
|
|||
static void ccw_init(MachineState *machine)
|
||||
{
|
||||
MachineClass *mc = MACHINE_GET_CLASS(machine);
|
||||
S390CcwMachineState *ms = S390_CCW_MACHINE(machine);
|
||||
int ret;
|
||||
VirtualCssBus *css_bus;
|
||||
DeviceState *dev;
|
||||
|
||||
s390_sclp_init();
|
||||
ms->sclp = SCLP(object_new(TYPE_SCLP));
|
||||
object_property_add_child(OBJECT(machine), TYPE_SCLP, OBJECT(ms->sclp));
|
||||
qdev_realize_and_unref(DEVICE(ms->sclp), NULL, &error_fatal);
|
||||
|
||||
/* init memory + setup max page size. Required for the CPU model */
|
||||
s390_memory_init(machine->ram);
|
||||
|
||||
|
|
|
@ -378,16 +378,6 @@ void sclp_service_interrupt(uint32_t sccb)
|
|||
}
|
||||
|
||||
/* qemu object creation and initialization functions */
|
||||
|
||||
void s390_sclp_init(void)
|
||||
{
|
||||
Object *new = object_new(TYPE_SCLP);
|
||||
|
||||
object_property_add_child(qdev_get_machine(), TYPE_SCLP, new);
|
||||
object_unref(new);
|
||||
qdev_realize(DEVICE(new), NULL, &error_fatal);
|
||||
}
|
||||
|
||||
static void sclp_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
MachineState *machine = MACHINE(qdev_get_machine());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue