[Skiboot] [PATCH 06/36] Fixup sparse endian annotations for opal events and masks

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 10 15:18:00 AEDT 2015


This fixes many spurious sparse warnings

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 core/interrupts.c       | 4 ++--
 core/opal.c             | 4 ++--
 include/opal-internal.h | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/core/interrupts.c b/core/interrupts.c
index 6ed2e9a0de16..aafdea912fcd 100644
--- a/core/interrupts.c
+++ b/core/interrupts.c
@@ -375,7 +375,7 @@ static int64_t opal_get_xive(uint32_t isn, uint16_t *server, uint8_t *priority)
 }
 opal_call(OPAL_GET_XIVE, opal_get_xive, 3);
 
-static int64_t opal_handle_interrupt(uint32_t isn, uint64_t *outstanding_event_mask)
+static int64_t opal_handle_interrupt(uint32_t isn, __be64 *outstanding_event_mask)
 {
 	struct irq_source *is = irq_find_source(isn);
 	int64_t rc = OPAL_SUCCESS;
@@ -396,7 +396,7 @@ static int64_t opal_handle_interrupt(uint32_t isn, uint64_t *outstanding_event_m
 	/* Update output events */
  bail:
 	if (outstanding_event_mask)
-		*outstanding_event_mask = opal_pending_events;
+		*outstanding_event_mask = cpu_to_be64(opal_pending_events);
 
 	return rc;
 }
diff --git a/core/opal.c b/core/opal.c
index b5a422ad84a7..04e2283e77bd 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -318,7 +318,7 @@ void opal_run_pollers(void)
 	check_stacks();
 }
 
-static int64_t opal_poll_events(uint64_t *outstanding_event_mask)
+static int64_t opal_poll_events(__be64 *outstanding_event_mask)
 {
 	/* Check if we need to trigger an attn for test use */
 	if (attn_trigger == 0xdeadbeef) {
@@ -335,7 +335,7 @@ static int64_t opal_poll_events(uint64_t *outstanding_event_mask)
 	opal_run_pollers();
 
 	if (outstanding_event_mask)
-		*outstanding_event_mask = opal_pending_events;
+		*outstanding_event_mask = cpu_to_be64(opal_pending_events);
 
 	return OPAL_SUCCESS;
 }
diff --git a/include/opal-internal.h b/include/opal-internal.h
index d75a58d9809c..1410481d6777 100644
--- a/include/opal-internal.h
+++ b/include/opal-internal.h
@@ -46,12 +46,12 @@ static struct opal_table_entry __e_##__func __used __section(".opal_table") = \
 extern struct opal_table_entry __opal_table_start[];
 extern struct opal_table_entry __opal_table_end[];
 
-extern __be64 opal_pending_events;
+extern uint64_t opal_pending_events;
 
 extern struct dt_node *opal_node;
 
 extern void opal_table_init(void);
-extern void opal_update_pending_evt(__be64 evt_mask, __be64 evt_values);
+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);
 extern void add_opal_node(void);
-- 
2.1.4



More information about the Skiboot mailing list