On 3/1/23 19:16, Richard Henderson wrote:
With the movement of the property, we can remove the field
from the cpu entirely, using only the class.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  target/arm/cpu-qom.h    |  3 +++
  target/arm/cpu.h        |  3 ---
  hw/arm/aspeed_ast2600.c |  6 +++--
  target/arm/cpu.c        | 50 +++++++++++++++++++++++------------------
  target/arm/helper.c     |  3 ++-
  5 files changed, 37 insertions(+), 28 deletions(-)


@@ -2320,6 +2318,14 @@ static bool arm_cpu_class_late_init(ObjectClass *oc, 
Error **errp)
          }
      }
+#ifndef CONFIG_USER_ONLY
+    /* TODO: Perhaps better to put this check in a property set hook. */

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>

+    if (!acc->gt_cntfrq_hz) {
+        error_setg(errp, "Invalid CNTFRQ: %"PRId64"Hz", acc->gt_cntfrq_hz);
+        return false;
+    }
+#endif /* CONFIG_USER_ONLY */

Reply via email to