cluster.c (f3b8f18ebf344ab359e8f79f6ed777e740dae77c) | cluster.c (4f67d30b5e74e060b8dbe10528829b47345cd6e8) |
---|---|
1/* 2 * QEMU CPU cluster 3 * 4 * Copyright (c) 2018 GreenSocs SAS 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 --- 64 unchanged lines hidden (view full) --- 73 */ 74 assert(cbdata.cpu_count > 0); 75} 76 77static void cpu_cluster_class_init(ObjectClass *klass, void *data) 78{ 79 DeviceClass *dc = DEVICE_CLASS(klass); 80 | 1/* 2 * QEMU CPU cluster 3 * 4 * Copyright (c) 2018 GreenSocs SAS 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 --- 64 unchanged lines hidden (view full) --- 73 */ 74 assert(cbdata.cpu_count > 0); 75} 76 77static void cpu_cluster_class_init(ObjectClass *klass, void *data) 78{ 79 DeviceClass *dc = DEVICE_CLASS(klass); 80 |
81 dc->props = cpu_cluster_properties; | 81 device_class_set_props(dc, cpu_cluster_properties); |
82 dc->realize = cpu_cluster_realize; 83 84 /* This is not directly for users, CPU children must be attached by code */ 85 dc->user_creatable = false; 86} 87 88static const TypeInfo cpu_cluster_type_info = { 89 .name = TYPE_CPU_CLUSTER, 90 .parent = TYPE_DEVICE, 91 .instance_size = sizeof(CPUClusterState), 92 .class_init = cpu_cluster_class_init, 93}; 94 95static void cpu_cluster_register_types(void) 96{ 97 type_register_static(&cpu_cluster_type_info); 98} 99 100type_init(cpu_cluster_register_types) | 82 dc->realize = cpu_cluster_realize; 83 84 /* This is not directly for users, CPU children must be attached by code */ 85 dc->user_creatable = false; 86} 87 88static const TypeInfo cpu_cluster_type_info = { 89 .name = TYPE_CPU_CLUSTER, 90 .parent = TYPE_DEVICE, 91 .instance_size = sizeof(CPUClusterState), 92 .class_init = cpu_cluster_class_init, 93}; 94 95static void cpu_cluster_register_types(void) 96{ 97 type_register_static(&cpu_cluster_type_info); 98} 99 100type_init(cpu_cluster_register_types) |