aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2015-03-31 21:53:18 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-04-01 12:16:38 +1100
commit7ab4251b813ac09785cdb001a7cf354329eb7675 (patch)
tree11ccee9e40d6e6674c4baf31be686b44767ce29f
parentbca121333446e419b3acf8b7b9ad150a41699c6a (diff)
downloadskiboot-7ab4251b813ac09785cdb001a7cf354329eb7675.zip
skiboot-7ab4251b813ac09785cdb001a7cf354329eb7675.tar.gz
skiboot-7ab4251b813ac09785cdb001a7cf354329eb7675.tar.bz2
Move opal-api.h to opal-internal.h
Move the content of opal-api.h, which is currently "Internal header for OPAL API related things" to opal-internal.h. Recreate opal-api.h as an empty header, until the next commit, so as not to break all the includers of it. Include opal-internal.h from opal.h, but not for assembly users as it's all C declarations. Finally we need to adjust include guard names. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--include/opal-api.h84
-rw-r--r--include/opal-internal.h85
-rw-r--r--include/opal.h1
3 files changed, 86 insertions, 84 deletions
diff --git a/include/opal-api.h b/include/opal-api.h
index 4e05d59..e69de29 100644
--- a/include/opal-api.h
+++ b/include/opal-api.h
@@ -1,84 +0,0 @@
-/* Copyright 2013-2014 IBM Corp.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __OPAL_API_H
-#define __OPAL_API_H
-
-/****** Internal header for OPAL API related things in skiboot **********/
-#include <skiboot.h>
-
-/* An opal table entry */
-struct opal_table_entry {
- void *func;
- __be32 token;
- __be32 nargs;
-};
-
-#define opal_call(__tok, __func, __nargs) \
-static struct opal_table_entry __e_##__func __used __section(".opal_table") = \
-{ .func = __func, .token = __tok, \
- .nargs = __nargs + 0 * sizeof(__func( __test_args##__nargs )) }
-
-/* Make sure function takes args they claim. Look away now... */
-#define __test_args0
-#define __test_args1 0
-#define __test_args2 0,0
-#define __test_args3 0,0,0
-#define __test_args4 0,0,0,0
-#define __test_args5 0,0,0,0,0
-#define __test_args6 0,0,0,0,0,0
-#define __test_args7 0,0,0,0,0,0,0
-
-extern struct opal_table_entry __opal_table_start[];
-extern struct opal_table_entry __opal_table_end[];
-
-extern __be64 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);
-__be64 opal_dynamic_event_alloc(void);
-void opal_dynamic_event_free(__be64 event);
-extern void add_opal_node(void);
-
-#define opal_register(token, func, nargs) \
- __opal_register((token) + 0*sizeof(func(__test_args##nargs)), \
- (func), (nargs))
-extern void __opal_register(__be64 token, void *func, unsigned num_args);
-
-/* Warning: no locking at the moment, do at init time only
- *
- * XXX TODO: Add the big RCU-ish "opal API lock" to protect us here
- * which will also be used for other things such as runtime updates
- */
-extern void opal_add_poller(void (*poller)(void *data), void *data);
-extern void opal_del_poller(void (*poller)(void *data));
-extern void opal_run_pollers(void);
-
-/*
- * Warning: no locking, only call that from the init processor
- */
-extern void opal_add_host_sync_notifier(bool (*notify)(void *data), void *data);
-extern void opal_del_host_sync_notifier(bool (*notify)(void *data));
-
-/*
- * Opal internal function prototype
- */
-struct OpalHMIEvent;
-extern int handle_hmi_exception(__be64 hmer, struct OpalHMIEvent *hmi_evt);
-
-#endif /* __OPAL_API_H */
diff --git a/include/opal-internal.h b/include/opal-internal.h
new file mode 100644
index 0000000..3194676
--- /dev/null
+++ b/include/opal-internal.h
@@ -0,0 +1,85 @@
+/* Copyright 2013-2014 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __OPAL_INTERNAL_H
+#define __OPAL_INTERNAL_H
+
+/****** Internal header for OPAL API related things in skiboot **********/
+
+#include <skiboot.h>
+
+/* An opal table entry */
+struct opal_table_entry {
+ void *func;
+ __be32 token;
+ __be32 nargs;
+};
+
+#define opal_call(__tok, __func, __nargs) \
+static struct opal_table_entry __e_##__func __used __section(".opal_table") = \
+{ .func = __func, .token = __tok, \
+ .nargs = __nargs + 0 * sizeof(__func( __test_args##__nargs )) }
+
+/* Make sure function takes args they claim. Look away now... */
+#define __test_args0
+#define __test_args1 0
+#define __test_args2 0,0
+#define __test_args3 0,0,0
+#define __test_args4 0,0,0,0
+#define __test_args5 0,0,0,0,0
+#define __test_args6 0,0,0,0,0,0
+#define __test_args7 0,0,0,0,0,0,0
+
+extern struct opal_table_entry __opal_table_start[];
+extern struct opal_table_entry __opal_table_end[];
+
+extern __be64 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);
+__be64 opal_dynamic_event_alloc(void);
+void opal_dynamic_event_free(__be64 event);
+extern void add_opal_node(void);
+
+#define opal_register(token, func, nargs) \
+ __opal_register((token) + 0*sizeof(func(__test_args##nargs)), \
+ (func), (nargs))
+extern void __opal_register(__be64 token, void *func, unsigned num_args);
+
+/* Warning: no locking at the moment, do at init time only
+ *
+ * XXX TODO: Add the big RCU-ish "opal API lock" to protect us here
+ * which will also be used for other things such as runtime updates
+ */
+extern void opal_add_poller(void (*poller)(void *data), void *data);
+extern void opal_del_poller(void (*poller)(void *data));
+extern void opal_run_pollers(void);
+
+/*
+ * Warning: no locking, only call that from the init processor
+ */
+extern void opal_add_host_sync_notifier(bool (*notify)(void *data), void *data);
+extern void opal_del_host_sync_notifier(bool (*notify)(void *data));
+
+/*
+ * Opal internal function prototype
+ */
+struct OpalHMIEvent;
+extern int handle_hmi_exception(__be64 hmer, struct OpalHMIEvent *hmi_evt);
+
+#endif /* __OPAL_INTERNAL_H */
diff --git a/include/opal.h b/include/opal.h
index 622e1d5..234f5a3 100644
--- a/include/opal.h
+++ b/include/opal.h
@@ -19,6 +19,7 @@
#ifdef __SKIBOOT__
#ifndef __ASSEMBLY__
+#include <opal-internal.h>
#include <types.h>
#endif /* __ASSEMBLY__ */
#endif /* __SKIBOOT__ */