[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: initialize target
commit fe8afc2dc6080504dd3c70a1e40b531f8ad79791 Author: Stefano Stabellini <sstabellini@xxxxxxxxxx> AuthorDate: Tue Nov 6 14:05:56 2018 -0800 Commit: Julien Grall <julien.grall@xxxxxxx> CommitDate: Fri Nov 9 11:49:20 2018 +0000 xen/arm: initialize target Initialize variable target before passing it as a parameter. It makes the code a bit nicer and it is a safety certification requirement. M3CM Rule-9.1: The value of an object with automatic storage duration shall not be read before it has been set QAVerify: 2972 Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx> Acked-by: Julien Grall <julien.grall@xxxxxxx> --- xen/arch/arm/vgic-v2.c | 2 +- xen/arch/arm/vgic-v3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index f6c11f1e41..0099fcffda 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -379,6 +379,7 @@ static bool vgic_v2_to_sgi(struct vcpu *v, register_t sgir) enum gic_sgi_mode sgi_mode; struct sgi_target target; + sgi_target_init(&target); irqmode = (sgir & GICD_SGI_TARGET_LIST_MASK) >> GICD_SGI_TARGET_LIST_SHIFT; virq = (sgir & GICD_SGI_INTID_MASK); @@ -386,7 +387,6 @@ static bool vgic_v2_to_sgi(struct vcpu *v, register_t sgir) switch ( irqmode ) { case GICD_SGI_TARGET_LIST_VAL: - sgi_target_init(&target); target.list = (sgir & GICD_SGI_TARGET_MASK) >> GICD_SGI_TARGET_SHIFT; sgi_mode = SGI_TARGET_LIST; break; diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index efe824c6fb..c14bcd87b1 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1474,6 +1474,7 @@ static bool vgic_v3_to_sgi(struct vcpu *v, register_t sgir) enum gic_sgi_mode sgi_mode; struct sgi_target target; + sgi_target_init(&target); irqmode = (sgir >> ICH_SGI_IRQMODE_SHIFT) & ICH_SGI_IRQMODE_MASK; virq = (sgir >> ICH_SGI_IRQ_SHIFT ) & ICH_SGI_IRQ_MASK; @@ -1481,7 +1482,6 @@ static bool vgic_v3_to_sgi(struct vcpu *v, register_t sgir) switch ( irqmode ) { case ICH_SGI_TARGET_LIST: - sgi_target_init(&target); /* We assume that only AFF1 is used in ICC_SGI1R_EL1. */ target.aff1 = (sgir >> ICH_SGI_AFFINITY_LEVEL(1)) & ICH_SGI_AFFx_MASK; target.list = sgir & ICH_SGI_TARGETLIST_MASK; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |