[Skiboot] [RFC PATCH 09/10] events: add set/clr helpers

Oliver O'Halloran oohall at gmail.com
Wed Dec 21 16:35:43 AEDT 2016


Every usage of opal_update_pending_evt() falls into two categories:

Clearing: opal_update_pending_evt(<event>, 0)
Setting: opal_update_pending_evt(<event>, <event>)

This patch adds wrapper macros for both these usages since that's
slightly nicer to read.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 include/opal-internal.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/opal-internal.h b/include/opal-internal.h
index 583e99948597..4e3b89a41fd7 100644
--- a/include/opal-internal.h
+++ b/include/opal-internal.h
@@ -51,6 +51,9 @@ extern uint64_t opal_pending_events;
 extern struct dt_node *opal_node;
 
 extern void opal_table_init(void);
+
+#define opal_set_pending_evt(evt) opal_update_pending_evt(evt, evt)
+#define opal_clr_pending_evt(evt) opal_update_pending_evt(evt, 0)
 extern void opal_update_pending_evt(uint64_t evt_mask, uint64_t evt_values);
 __be64 opal_dynamic_event_alloc(void);
 void opal_dynamic_event_free(__be64 event);
-- 
2.7.4



More information about the Skiboot mailing list