diff options
author | Anton Blanchard <anton@samba.org> | 2013-08-07 02:01:26 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-14 11:50:26 +1000 |
commit | f13c13a005127b5dc5daaca190277a062d946e63 (patch) | |
tree | 0e1085a2eb655f8992590cbce39de0c0f87a5a64 /arch/powerpc/include/asm/lppaca.h | |
parent | 0c69f9c52c474ccd1cade27c7be5f8ab830cdc3a (diff) | |
download | lwn-f13c13a005127b5dc5daaca190277a062d946e63.tar.gz lwn-f13c13a005127b5dc5daaca190277a062d946e63.zip |
powerpc: Stop using non-architected shared_proc field in lppaca
Although the shared_proc field in the lppaca works today, it is
not architected. A shared processor partition will always have a non
zero yield_count so use that instead. Create a wrapper so users
don't have to know about the details.
In order for older kernels to continue to work on KVM we need
to set the shared_proc bit. While here, remove the ugly bitfield.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/lppaca.h')
-rw-r--r-- | arch/powerpc/include/asm/lppaca.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h index 9b12f88d4adb..bc8def08d5d8 100644 --- a/arch/powerpc/include/asm/lppaca.h +++ b/arch/powerpc/include/asm/lppaca.h @@ -50,10 +50,8 @@ struct lppaca { u32 desc; /* Eye catcher 0xD397D781 */ u16 size; /* Size of this struct */ - u16 reserved1; - u16 reserved2:14; - u8 shared_proc:1; /* Shared processor indicator */ - u8 secondary_thread:1; /* Secondary thread indicator */ + u8 reserved1[3]; + u8 __old_status; /* Old status, including shared proc */ u8 reserved3[14]; volatile u32 dyn_hw_node_id; /* Dynamic hardware node id */ volatile u32 dyn_hw_proc_id; /* Dynamic hardware proc id */ @@ -108,6 +106,18 @@ extern struct lppaca lppaca[]; #define lppaca_of(cpu) (*paca[cpu].lppaca_ptr) /* + * Old kernels used a reserved bit in the VPA to determine if it was running + * in shared processor mode. New kernels look for a non zero yield count + * but KVM still needs to set the bit to keep the old stuff happy. + */ +#define LPPACA_OLD_SHARED_PROC 2 + +static inline bool lppaca_shared_proc(struct lppaca *l) +{ + return l->yield_count != 0; +} + +/* * 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. |