powerpc/book3e: Fix extlb size
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 7 Apr 2011 21:22:23 +0000 (21:22 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 27 Apr 2011 04:18:48 +0000 (14:18 +1000)
The calculation of the size for the exception save area of the TLB
miss handler is wrong, luckily it's too big not too small.

Rework it to make it a bit clearer, and also correct. We want 3 save
areas, each EX_TLB_SIZE _bytes_.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/paca.h

index f6da4f517fca2f15cc4b04e562d760520057f183..65c13c48db43201a57ce74cb720aabd1301757ea 100644 (file)
@@ -106,7 +106,8 @@ struct paca_struct {
        pgd_t *pgd;                     /* Current PGD */
        pgd_t *kernel_pgd;              /* Kernel PGD */
        u64 exgen[8] __attribute__((aligned(0x80)));
-       u64 extlb[EX_TLB_SIZE*3] __attribute__((aligned(0x80)));
+       /* We can have up to 3 levels of reentrancy in the TLB miss handler */
+       u64 extlb[3][EX_TLB_SIZE / sizeof(u64)] __attribute__((aligned(0x80)));
        u64 exmc[8];            /* used for machine checks */
        u64 excrit[8];          /* used for crit interrupts */
        u64 exdbg[8];           /* used for debug interrupts */