[Skiboot] [PATCH 6/6] hw/phb4: fix lane_eq_default for little endian

Nicholas Piggin npiggin at gmail.com
Wed Sep 25 11:19:21 AEST 2019


Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
 hw/phb4.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 3c71427ae..7f7c39b6d 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -5558,16 +5558,12 @@ static const struct irq_source_ops phb4_lsi_ops = {
 	.attributes = phb4_lsi_attributes,
 };
 
-#ifdef HAVE_BIG_ENDIAN
 static u64 lane_eq_default[8] = {
-	0x5454545454545454UL, 0x5454545454545454UL,
-	0x5454545454545454UL, 0x5454545454545454UL,
-	0x7777777777777777UL, 0x7777777777777777UL,
-	0x7777777777777777UL, 0x7777777777777777UL
+	CPU_TO_BE64(0x5454545454545454UL), CPU_TO_BE64(0x5454545454545454UL),
+	CPU_TO_BE64(0x5454545454545454UL), CPU_TO_BE64(0x5454545454545454UL),
+	CPU_TO_BE64(0x7777777777777777UL), CPU_TO_BE64(0x7777777777777777UL),
+	CPU_TO_BE64(0x7777777777777777UL), CPU_TO_BE64(0x7777777777777777UL),
 };
-#else
-#error lane_eq_default needs to be big endian (device tree property)
-#endif
 
 static void phb4_create(struct dt_node *np)
 {
-- 
2.23.0



More information about the Skiboot mailing list