From 3fadc52b2c9171b138b93f4a0121ceba67241b3b Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 12 Aug 2008 17:03:26 +1000 Subject: powerpc: Fix loss of vdso on fork on 32-bit When we fork, init_new_context() improperly resets the vdso_base of the new context to 0. That means that the new process loses access to the vdso for signal trampolines. The initialization should be unnecessary anyway as the context on a fresh mm should be 0 in the first place and binfmt_elf will initialize that value for a newly loaded process. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/mmu_context.h | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h index 9102b8bf0ea..6b993ef452f 100644 --- a/arch/powerpc/include/asm/mmu_context.h +++ b/arch/powerpc/include/asm/mmu_context.h @@ -147,7 +147,6 @@ static inline void get_mmu_context(struct mm_struct *mm) static inline int init_new_context(struct task_struct *t, struct mm_struct *mm) { mm->context.id = NO_CONTEXT; - mm->context.vdso_base = 0; return 0; } -- cgit v1.2.3 From 22b8f9ee4a91638a4c8f57e957a91cf49788332a Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 15 Aug 2008 17:11:31 +1000 Subject: powerpc: Fix lockdep IRQ tracing bug A small bogon sneaked into the ppc64 lockdep support. A test is branching slightly off causing a clobbered register value to overwrite the irq state under some circumstances. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/irqflags.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/irqflags.h b/arch/powerpc/include/asm/irqflags.h index 17ba3a881bf..5f68ecfdf51 100644 --- a/arch/powerpc/include/asm/irqflags.h +++ b/arch/powerpc/include/asm/irqflags.h @@ -20,7 +20,7 @@ #define TRACE_ENABLE_INTS bl .trace_hardirqs_on #define TRACE_DISABLE_INTS bl .trace_hardirqs_off #define TRACE_AND_RESTORE_IRQ_PARTIAL(en,skip) \ - cmpdi en, 0; \ + cmpdi en,0; \ bne 95f; \ stb en,PACASOFTIRQEN(r13); \ bl .trace_hardirqs_off; \ @@ -29,7 +29,8 @@ li en,1; #define TRACE_AND_RESTORE_IRQ(en) \ TRACE_AND_RESTORE_IRQ_PARTIAL(en,96f); \ -96: stb en,PACASOFTIRQEN(r13) + stb en,PACASOFTIRQEN(r13); \ +96: #else #define TRACE_ENABLE_INTS #define TRACE_DISABLE_INTS -- cgit v1.2.3 From 81f14997e8e8a10eb75ca593674d2b0c94129a21 Mon Sep 17 00:00:00 2001 From: Robert Jennings Date: Sat, 16 Aug 2008 05:07:31 +1000 Subject: powerpc: Make CMO paging space pool ID and page size available During platform setup, save off the primary/secondary paging space pool IDs and the page size. Added accessors in hvcall.h for these variables. This is needed for a subsequent fix. Submitted-by: Robert Jennings Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/hvcall.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index fbe2932fa9e..6251a4b10be 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h @@ -291,6 +291,28 @@ struct hvcall_mpp_data { }; int h_get_mpp(struct hvcall_mpp_data *); + +#ifdef CONFIG_PPC_PSERIES +extern int CMO_PrPSP; +extern int CMO_SecPSP; +extern unsigned long CMO_PageSize; + +static inline int cmo_get_primary_psp(void) +{ + return CMO_PrPSP; +} + +static inline int cmo_get_secondary_psp(void) +{ + return CMO_SecPSP; +} + +static inline unsigned long cmo_get_page_size(void) +{ + return CMO_PageSize; +} +#endif /* CONFIG_PPC_PSERIES */ + #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_HVCALL_H */ -- cgit v1.2.3 From 50d0b17645a26d2877c9d5538114498c3f82adac Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 17 Aug 2008 03:57:30 +1000 Subject: powerpc: Use generic compat_sys_old_readdir Use the generic compat_sys_old_readdir instead of the powerpc one which is almost the same except for the almost complete lack of error handling. Note that we can't just use SYSCALL() in systbl.h because the native syscall is named old_readdir, not sys_old_readdir. Signed-off-by: Christoph Hellwig Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/systbl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index e084272ed1c..f6cc7a43b4f 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h @@ -92,7 +92,7 @@ COMPAT_SYS_SPU(readlink) SYSCALL(uselib) SYSCALL(swapon) SYSCALL(reboot) -SYSX(sys_ni_syscall,old32_readdir,old_readdir) +SYSX(sys_ni_syscall,compat_sys_old_readdir,old_readdir) SYSCALL_SPU(mmap) SYSCALL_SPU(munmap) SYSCALL_SPU(truncate) -- cgit v1.2.3