From 8ae1d15face892e5520dcaa59c822b57d297e464 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Tue, 12 Jul 2022 13:08:16 +0900 Subject: [PATCH] hv/trace_pmgr.py: Tolerate missing pwrgate-regs Signed-off-by: Hector Martin --- proxyclient/hv/trace_pmgr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxyclient/hv/trace_pmgr.py b/proxyclient/hv/trace_pmgr.py index 2254db82..0c67dce4 100644 --- a/proxyclient/hv/trace_pmgr.py +++ b/proxyclient/hv/trace_pmgr.py @@ -137,7 +137,7 @@ class PMGRTracer(Tracer): ps_addr = addr + idx * 8 self.ranges[ps_addr:ps_addr + 8] = self.event_default, ps_addr, f"ps[{i}][{idx}]" - for i, pg in enumerate(self.dev.pwrgate_regs): + for i, pg in getattr(self.dev, "pwrgate_regs", []): addr = self.dev.get_reg(pg.reg)[0] + pg.offset for idx in range(32): gate_addr = addr + idx * 8