When system registers are not enabled, all the access to them will trap
in EL2. In Xen, system registers will be enabled by gicv3_cpu_init only
on success. As the rest of the code (e.g gicv3_hyp_init) relies on
system register, it is better to bail out directly.
This will save time on debugging early boot issue on GICv3 platform.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
spin_lock(&gicv3.lock);
res = gicv3_cpu_init();
+ if ( res )
+ goto out;
+
gicv3_hyp_init();
+out:
spin_unlock(&gicv3.lock);
return res;
panic("GICv3: ITS: initialization failed: %d\n", res);
res = gicv3_cpu_init();
+ if ( res )
+ goto out;
+
gicv3_hyp_init();
+out:
spin_unlock(&gicv3.lock);
return res;