Skip to contentSkip to conversation

powerpc: Align thread->fpr to 16 bytes

PATCH New Anton Blanchard 1 participant 1 message Jun 5, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Align thread->fpr to 16 bytes

On newer CPUs we use VSX loads and stores to the thread->fpr array. For best performance we need to ensure 16 byte alignment.

---

arch/powerpc/include/asm/processor.h +1 -1
Index: b/arch/powerpc/include/asm/processor.h
===================================================================
@@ -200,7 +200,7 @@ struct thread_struct {
 #endif
 #endif
 	/* FP and VSX 0-31 register set */
-	double		fpr[32][TS_FPRWIDTH];
+	double		fpr[32][TS_FPRWIDTH] __attribute__((aligned(16)));
 	struct {
 
 		unsigned int pad;