[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [QEMU-PPC] [PATCH V2 6/7] ppc/spapr-caps: Remove tristate spa
From: |
Suraj Jitindar Singh |
Subject: |
[Qemu-ppc] [QEMU-PPC] [PATCH V2 6/7] ppc/spapr-caps: Remove tristate spapr-caps support |
Date: |
Thu, 1 Mar 2018 17:38:03 +1100 |
All tristate caps have now been converted to custom spapr-caps, so
remove the remaining support for them.
Signed-off-by: Suraj Jitindar Singh <address@hidden>
---
V1 -> V2:
- Patch added to series
---
hw/ppc/spapr_caps.c | 60 -----------------------------------------------------
1 file changed, 60 deletions(-)
diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c
index 9f8dbc7aea..298915c81d 100644
--- a/hw/ppc/spapr_caps.c
+++ b/hw/ppc/spapr_caps.c
@@ -89,66 +89,6 @@ static void spapr_cap_set_bool(Object *obj, Visitor *v,
const char *name,
spapr->eff.caps[cap->index] = value ? SPAPR_CAP_ON : SPAPR_CAP_OFF;
}
-static void spapr_cap_get_tristate(Object *obj, Visitor *v, const char *name,
- void *opaque, Error **errp)
-{
- sPAPRCapabilityInfo *cap = opaque;
- sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
- char *val = NULL;
- uint8_t value = spapr_get_cap(spapr, cap->index);
-
- switch (value) {
- case SPAPR_CAP_BROKEN:
- val = g_strdup("broken");
- break;
- case SPAPR_CAP_WORKAROUND:
- val = g_strdup("workaround");
- break;
- case SPAPR_CAP_FIXED:
- val = g_strdup("fixed");
- break;
- default:
- error_setg(errp, "Invalid value (%d) for cap-%s", value, cap->name);
- return;
- }
-
- visit_type_str(v, name, &val, errp);
- g_free(val);
-}
-
-static void spapr_cap_set_tristate(Object *obj, Visitor *v, const char *name,
- void *opaque, Error **errp)
-{
- sPAPRCapabilityInfo *cap = opaque;
- sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
- char *val;
- Error *local_err = NULL;
- uint8_t value;
-
- visit_type_str(v, name, &val, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- return;
- }
-
- if (!strcasecmp(val, "broken")) {
- value = SPAPR_CAP_BROKEN;
- } else if (!strcasecmp(val, "workaround")) {
- value = SPAPR_CAP_WORKAROUND;
- } else if (!strcasecmp(val, "fixed")) {
- value = SPAPR_CAP_FIXED;
- } else {
- error_setg(errp, "Invalid capability mode \"%s\" for cap-%s", val,
- cap->name);
- goto out;
- }
-
- spapr->cmd_line_caps[cap->index] = true;
- spapr->eff.caps[cap->index] = value;
-out:
- g_free(val);
-}
-
static void spapr_cap_get_string(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
--
2.13.6
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 2/7] ppc/spapr-caps: Add support for custom spapr_capabilities, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 3/7] ppc/spapr-caps: Convert cap-cfpc to custom spapr-cap, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 4/7] ppc/spapr-caps: Convert cap-sbbc to custom spapr-cap, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 6/7] ppc/spapr-caps: Remove tristate spapr-caps support,
Suraj Jitindar Singh <=
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 5/7] ppc/spapr-caps: Convert cap-ibs to custom spapr-cap, Suraj Jitindar Singh, 2018/03/01
- [Qemu-ppc] [QEMU-PPC] [PATCH V2 7/7] ppc/spapr-caps: Define the pseries-2.12-sxxm machine type, Suraj Jitindar Singh, 2018/03/01
- Re: [Qemu-ppc] [QEMU-PPC] [PATCH V2 1/7] target/ppc: Check mask when setting cap_ppc_safe_indirect_branch, David Gibson, 2018/03/01