Skip to contentSkip to conversation

Make dtstruct variable to be 8 byte aligned

PATCH Applied M. Mohan Kumar 2 participants 2 messages Aug 10, 2009 – Aug 12, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Make dtstruct variable to be 8 byte aligned

[PATCH 1/2] Make dtstruct variable to be 8 byte aligned

kexec is creating a version 3 device tree to be backwards compatible. This version of the struct has 8-byte alignment for properties whose value is 8 or more bytes. As the code directly checks the pointer when deciding to add the alignment word, the struct memory must start on an 8 byte boundary. Force the dtstruct variable to be always 8 bytes aligned.

---
 kexec/arch/ppc64/fs2dt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kexec/arch/ppc64/fs2dt.c +1 -1
index 1f551fd..b01ff86 100644
@@ -41,7 +41,7 @@
 
 static char pathname[MAXPATH], *pathstart;
 static char propnames[NAMESPACE] = { 0 };
-static unsigned dtstruct[TREEWORDS], *dt;
+static unsigned dtstruct[TREEWORDS] __attribute__ ((aligned (8))), *dt;
 static unsigned long long mem_rsrv[2*MEMRESERVE] = { 0, 0 };
 
 static int crash_param = 0;
Signature · 1 line
1.6.2.5
Applied
#1 lore raw
Quoted 9 lines · M. Mohan Kumar

[PATCH 1/2] Make dtstruct variable to be 8 byte aligned

kexec is creating a version 3 device tree to be backwards compatible. This version of the struct has 8-byte alignment for properties whose value is 8 or more bytes. As the code directly checks the pointer when deciding to add the alignment word, the struct memory must start on an 8 byte boundary. Force the dtstruct variable to be always 8 bytes aligned.

Thanks, applied.

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec