xref: /openbmc/qemu/include/hw/ppc/spapr_cpu_core.h (revision b70ce101)
1 /*
2  * sPAPR CPU core device.
3  *
4  * Copyright (C) 2016 Bharata B Rao <bharata@linux.vnet.ibm.com>
5  *
6  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7  * See the COPYING file in the top-level directory.
8  */
9 #ifndef HW_SPAPR_CPU_CORE_H
10 #define HW_SPAPR_CPU_CORE_H
11 
12 #include "hw/qdev.h"
13 #include "hw/cpu/core.h"
14 #include "target-ppc/cpu-qom.h"
15 
16 #define TYPE_SPAPR_CPU_CORE "spapr-cpu-core"
17 #define SPAPR_CPU_CORE(obj) \
18     OBJECT_CHECK(sPAPRCPUCore, (obj), TYPE_SPAPR_CPU_CORE)
19 
20 typedef struct sPAPRCPUCore {
21     /*< private >*/
22     CPUCore parent_obj;
23 
24     /*< public >*/
25     void *threads;
26     ObjectClass *cpu_class;
27 } sPAPRCPUCore;
28 
29 void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
30                          Error **errp);
31 char *spapr_get_cpu_core_type(const char *model);
32 void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
33                      Error **errp);
34 void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev,
35                        Error **errp);
36 #endif
37