Skip to content

Commit 016f8cf

Browse files
haokexinScott Wood
authored andcommitted
powerpc: book3e_64: fix the align size for paca_struct
All the cache line size of the current book3e 64bit SoCs are 64 bytes. So we should use this size to align the member of paca_struct. This only change the paca_struct's members which are private to book3e CPUs, and should not have any effect to book3s ones. With this, we save 192 bytes. Also change it to __aligned(size) since it is preferred over __attribute__((aligned(size))). Before: /* size: 1920, cachelines: 30, members: 46 */ /* sum members: 1667, holes: 6, sum holes: 141 */ /* padding: 112 */ After: /* size: 1728, cachelines: 27, members: 46 */ /* sum members: 1667, holes: 4, sum holes: 13 */ /* padding: 48 */ Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
1 parent 2e51563 commit 016f8cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • arch/powerpc/include/asm

‎arch/powerpc/include/asm/paca.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ struct paca_struct {
106106
#endif /* CONFIG_PPC_STD_MMU_64 */
107107

108108
#ifdef CONFIG_PPC_BOOK3E
109-
u64 exgen[8] __attribute__((aligned(0x80)));
109+
u64 exgen[8] __aligned(0x40);
110110
/* Keep pgd in the same cacheline as the start of extlb */
111-
pgd_t *pgd __attribute__((aligned(0x80))); /* Current PGD */
111+
pgd_t *pgd __aligned(0x40); /* Current PGD */
112112
pgd_t *kernel_pgd; /* Kernel PGD */
113113

114114
/* Shared by all threads of a core -- points to tcd of first thread */

0 commit comments

Comments
 (0)