[PATCH 04/18] powerpc/powernv: relocate struct opal_sg_entry in opal.h to same place it is in firmware

Stewart Smith stewart at linux.vnet.ibm.com
Tue Feb 10 13:26:46 AEDT 2015


For whatever reason these structures were in different places.

Now they are not.

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 arch/powerpc/include/asm/opal.h |   48 +++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 25 deletions(-)

diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index e8d9bfc..0f9f06d 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -12,31 +12,6 @@
 #ifndef __OPAL_H
 #define __OPAL_H
 
-#ifndef __ASSEMBLY__
-/*
- * SG entry
- *
- * WARNING: The current implementation requires each entry
- * to represent a block that is 4k aligned *and* each block
- * size except the last one in the list to be as well.
- */
-struct opal_sg_entry {
-	__be64 data;
-	__be64 length;
-};
-
-/* SG list */
-struct opal_sg_list {
-	__be64 length;
-	__be64 next;
-	struct opal_sg_entry entry[];
-};
-
-/* We calculate number of sg entries based on PAGE_SIZE */
-#define SG_ENTRIES_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct opal_sg_entry))
-
-#endif /* __ASSEMBLY__ */
-
 /****** OPAL APIs ******/
 
 /* Return codes */
@@ -740,6 +715,29 @@ typedef struct oppanel_line {
 	uint64_t 	line_len;
 } oppanel_line_t;
 
+/*
+ * SG entry
+ *
+ * WARNING: The current implementation requires each entry
+ * to represent a block that is 4k aligned *and* each block
+ * size except the last one in the list to be as well.
+ */
+struct opal_sg_entry {
+	__be64 data;
+	__be64 length;
+};
+
+/* SG list */
+struct opal_sg_list {
+	__be64 length;
+	__be64 next;
+	struct opal_sg_entry entry[];
+};
+
+/* We calculate number of sg entries based on PAGE_SIZE */
+#define SG_ENTRIES_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct opal_sg_entry))
+
+
 /* OPAL I2C request */
 struct opal_i2c_request {
 	uint8_t	type;
-- 
1.7.10.4



More information about the Linuxppc-dev mailing list