[xen master] xen/arm: domain_builder: irq sanity check logic fix

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] xen/arm: domain_builder: irq sanity check logic fix

patchbot
commit 11e7dd958de73a45645bd40d82280660bd2c9ee8
Author:     Stewart Hildebrand <[hidden email]>
AuthorDate: Tue Nov 28 14:42:03 2017 +0000
Commit:     Stefano Stabellini <[hidden email]>
CommitDate: Tue Nov 28 11:27:14 2017 -0800

    xen/arm: domain_builder: irq sanity check logic fix
   
    It's not possible for an irq to be both below 16 and greater/equal than 32.
    Also fix the reference to linux documentation while we're at it.
   
    Signed-off-by: Stewart Hildebrand <[hidden email]>
    Reviewed-by: Julien Grall <[hidden email]>
    Release-acked-by: Julien Grall <[hidden email]>
---
 xen/arch/arm/domain_build.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index c74f4dd..f50f8b9 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -501,9 +501,10 @@ static void set_interrupt_ppi(gic_interrupt_t interrupt, unsigned int irq,
 {
     __be32 *cells = interrupt;
 
-    BUG_ON(irq < 16 && irq >= 32);
+    BUG_ON(irq < 16);
+    BUG_ON(irq >= 32);
 
-    /* See linux Documentation/devictree/bindings/arm/gic.txt */
+    /* See linux Documentation/devicetree/bindings/interrupt-controller/arm,gic.txt */
     dt_set_cell(&cells, 1, 1); /* is a PPI */
     dt_set_cell(&cells, 1, irq - 16); /* PPIs start at 16 */
     dt_set_cell(&cells, 1, (cpumask << 8) | level);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog