[PATCH] SLB shadow buffer
Milton Miller
miltonm at bga.com
Tue Aug 8 11:15:53 EST 2006
On Mon Aug 7 2006 01:19:19 AM CDT, Michael Neuling wrote:
> Updated with comments from Milton.
Better
> +#define SHADOW_SLB_BOLTED_STACK_ESID \
> + (SLBSHADOW_SAVEAREA + 0x10*(SLB_NUM_BOLTED-1))
> +#define SHADOW_SLB_BOLTED_STACK_VSID \
> + (SLBSHADOW_SAVEAREA + 0x10*(SLB_NUM_BOLTED-1) + 8)
> +
Still a bit of magic size, but not likely to change.
Maybe an expicit define for the slot?
> + /* Update the last bolted SLB */
> + ld r9,PACA_SLBSHADOWPTR(r13)
> + li r12,0
> + std r12,SHADOW_SLB_BOLTED_STACK_ESID(r9) /* Clear ESID */
> + std r7,SHADOW_SLB_BOLTED_STACK_VSID(r9) /* Save VSID */
> + std r0,SHADOW_SLB_BOLTED_STACK_ESID(r9) /* Save ESID */
> +
Still some leading spaces hiding
> Index: linux-2.6-ozlabs/include/asm-powerpc/lppaca.h
> @@ -133,5 +135,22 @@ struct > > > lppaca {
>
> extern struct lppaca lppaca[];
>
> +/*
> + * SLB shadow buffer structure as defined in the PAPR. The save_area
> + * contains adjacent ESID and VSID pairs for each shadowed SLB. The
> + * ESID is stored in the lower 64bits, then the VSID.
> + */
> +struct slb_shadow {
> + u32 persistent; // Number of persistent SLBs x00-x03
> + u32 buffer_length; // Total shadow buffer length x04-x07
> + u64 reserved; // Alignment x08-x0f
> + struct {
> + u64 esid;
> + u64 vsid;
> + } save_area[SLB_NUM_BOLTED]; // x10-x40
> +} ____cacheline_aligned;
> +
C comments ... or in the separate cleanup patch
> +extern struct slb_shadow slb_shadow[];
> +
> #endif /* __KERNEL__ */
> #endif /* _ASM_POWERPC_LPPACA_H */
> Index: linux-2.6-ozlabs/include/asm-powerpc/paca.h
> ===================================================================
>
> /* accumulated system TB ticks */
> u64 startpurr; /* PURR/TB value snapshot */
> +
> + struct slb_shadow *slb_shadow_ptr;
> };
Do we need the extra line? (I haven't looked at the result)
milton
More information about the Linuxppc-dev
mailing list