|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] ARM: GIC: add GIC_INVALID to enum gic_version
commit db8b980c4d7edd5a498659bb87b9965a60d79867
Author: Andre Przywara <andre.przywara@xxxxxxxxxx>
AuthorDate: Wed Mar 21 13:38:21 2018 +0000
Commit: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CommitDate: Mon Mar 26 13:30:55 2018 -0700
ARM: GIC: add GIC_INVALID to enum gic_version
The enum gic_version at the moment just contains GIC_V2 and GIC_V3,
where GIC_V2 happens to map to 0. So without having initialised a
variable of that type, we will read back GIC_V2 (when allocated with zeroing
the memory).
To prevent ambiguities and to give an explicitly uninitialised state, add
a new first member: GIC_INVALID. Also make it obvious that this has a
"0" encoding.
Signed-off-by: Andre Przywara <andre.przywara@xxxxxxxxxx>
Acked-by: Julien Grall <julien.grall@xxxxxxx>
---
xen/include/asm-arm/gic.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index 565b0875ca..3079387e06 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -227,6 +227,7 @@ struct gic_lr {
};
enum gic_version {
+ GIC_INVALID = 0, /* the default until explicitly set up */
GIC_V2,
GIC_V3,
};
--
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 |