xics.c (5325cc34a2ca985283134c7e264be7851b112d4e) | xics.c (af175e85f92c870386ad74f466e29537b79611d3) |
---|---|
1/* 2 * QEMU PowerPC pSeries Logical Partition (aka sPAPR) hardware System Emulator 3 * 4 * PAPR Virtualized Interrupt System, aka ICS/ICP aka xics 5 * 6 * Copyright (c) 2010,2011 David Gibson, IBM Corporation. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy --- 362 unchanged lines hidden (view full) --- 371 .parent = TYPE_DEVICE, 372 .instance_size = sizeof(ICPState), 373 .class_init = icp_class_init, 374 .class_size = sizeof(ICPStateClass), 375}; 376 377Object *icp_create(Object *cpu, const char *type, XICSFabric *xi, Error **errp) 378{ | 1/* 2 * QEMU PowerPC pSeries Logical Partition (aka sPAPR) hardware System Emulator 3 * 4 * PAPR Virtualized Interrupt System, aka ICS/ICP aka xics 5 * 6 * Copyright (c) 2010,2011 David Gibson, IBM Corporation. 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy --- 362 unchanged lines hidden (view full) --- 371 .parent = TYPE_DEVICE, 372 .instance_size = sizeof(ICPState), 373 .class_init = icp_class_init, 374 .class_size = sizeof(ICPStateClass), 375}; 376 377Object *icp_create(Object *cpu, const char *type, XICSFabric *xi, Error **errp) 378{ |
379 Error *local_err = NULL; | |
380 Object *obj; 381 382 obj = object_new(type); 383 object_property_add_child(cpu, type, obj); 384 object_unref(obj); 385 object_property_set_link(obj, ICP_PROP_XICS, OBJECT(xi), &error_abort); 386 object_property_set_link(obj, ICP_PROP_CPU, cpu, &error_abort); | 379 Object *obj; 380 381 obj = object_new(type); 382 object_property_add_child(cpu, type, obj); 383 object_unref(obj); 384 object_property_set_link(obj, ICP_PROP_XICS, OBJECT(xi), &error_abort); 385 object_property_set_link(obj, ICP_PROP_CPU, cpu, &error_abort); |
387 if (!qdev_realize(DEVICE(obj), NULL, &local_err)) { | 386 if (!qdev_realize(DEVICE(obj), NULL, errp)) { |
388 object_unparent(obj); | 387 object_unparent(obj); |
389 error_propagate(errp, local_err); | |
390 obj = NULL; 391 } 392 393 return obj; 394} 395 396void icp_destroy(ICPState *icp) 397{ --- 357 unchanged lines hidden --- | 388 obj = NULL; 389 } 390 391 return obj; 392} 393 394void icp_destroy(ICPState *icp) 395{ --- 357 unchanged lines hidden --- |