[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 06/45] xen/arm: gic: Split the field state in gic_lr in 2 fields active and pending





On 16/03/2018 21:34, Stefano Stabellini wrote:
On Thu, 15 Mar 2018, Andre Przywara wrote:
From: Julien Grall <julien.grall@xxxxxxx>
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index daec51499c..c32861d4fa 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -209,7 +209,8 @@ struct gic_lr {
     /* Virtual IRQ */
     uint32_t virq;
     uint8_t priority;
-   uint8_t state;
+   bool active;
+   bool pending;
     bool hw_status;
  };

I like the readability but dislike the increase memory usage. I would
have kept a single uint8_t and I would have used status flags as an
approach, maybe I would have improved on those flags.

Why is that important? gic_lr will only be allocated on the stack...

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.