From: Stephen Rothwell Date: Wed, 26 Sep 2012 05:32:37 +0000 (+1000) Subject: Merge remote-tracking branch 'signal/for-next' X-Git-Tag: next-20120926~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d12a41d0ba66037824bae760b5cc32bc50d07697;p=karo-tx-linux.git Merge remote-tracking branch 'signal/for-next' Conflicts: arch/alpha/Kconfig arch/arm/Kconfig arch/arm/include/asm/thread_info.h arch/c6x/Kconfig arch/cris/include/asm/Kbuild arch/h8300/include/asm/Kbuild arch/m32r/include/asm/Kbuild arch/m68k/Kconfig arch/mn10300/Kconfig arch/powerpc/Kconfig arch/s390/Kconfig arch/x86/Kconfig arch/x86/kernel/process_32.c --- d12a41d0ba66037824bae760b5cc32bc50d07697 diff --cc arch/alpha/Kconfig index 7e3710c0cce5,7da91246e279..6ac8f6e512f6 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@@ -20,8 -20,7 +20,9 @@@ config ALPH select GENERIC_CMOS_UPDATE select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, diff --cc arch/arm/Kconfig index e38065d7e026,a949eec22861..3e186c0cf93c --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@@ -50,8 -49,7 +50,9 @@@ config AR select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select DCACHE_WORD_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && !CPU_BIG_ENDIAN + select HAVE_MOD_ARCH_SPECIFIC if ARM_UNWIND + select MODULES_USE_ELF_REL + select GENERIC_KERNEL_THREAD help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and diff --cc arch/arm/include/asm/thread_info.h index f71cdab18b87,b2d6b412172d..8477b4c1d39f --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h @@@ -150,8 -148,6 +150,7 @@@ extern int vfp_restore_user_hwstate(str #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ #define TIF_SYSCALL_TRACE 8 #define TIF_SYSCALL_AUDIT 9 +#define TIF_SYSCALL_TRACEPOINT 10 - #define TIF_POLLING_NRFLAG 16 #define TIF_USING_IWMMXT 17 #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ #define TIF_RESTORE_SIGMASK 20 @@@ -163,8 -159,6 +162,7 @@@ #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) +#define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) - #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) #define _TIF_SECCOMP (1 << TIF_SECCOMP) diff --cc arch/c6x/Kconfig index f6a3648f5ec3,45268b50c0c8..20ef56e467b3 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig @@@ -17,7 -17,7 +17,8 @@@ config C6 select OF select OF_EARLY_FLATTREE select GENERIC_CLOCKEVENTS + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config MMU def_bool n diff --cc arch/cris/include/asm/Kbuild index 28b690de7971,b68ad4bfa088..f5ae9de736d3 --- a/arch/cris/include/asm/Kbuild +++ b/arch/cris/include/asm/Kbuild @@@ -8,4 -8,4 +8,5 @@@ header-y += etraxgpio. header-y += rs485.h header-y += sync_serial.h +generic-y += module.h + generic-y += exec.h diff --cc arch/h8300/include/asm/Kbuild index 871382d239fe,3a2af1a2974f..883a0be9f69f --- a/arch/h8300/include/asm/Kbuild +++ b/arch/h8300/include/asm/Kbuild @@@ -1,3 -1,2 +1,4 @@@ include include/asm-generic/Kbuild.asm + +generic-y += module.h + generic-y += exec.h diff --cc arch/m32r/include/asm/Kbuild index 871382d239fe,708340339b05..883a0be9f69f --- a/arch/m32r/include/asm/Kbuild +++ b/arch/m32r/include/asm/Kbuild @@@ -1,3 -1,3 +1,4 @@@ include include/asm-generic/Kbuild.asm +generic-y += module.h + generic-y += exec.h diff --cc arch/m68k/Kconfig index 0df07cee3faf,ccda007ba40f..b4126a7dfddc --- a/arch/m68k/Kconfig +++ b/arch/m68k/Kconfig @@@ -13,9 -13,7 +13,10 @@@ config M68 select FPU if MMU select ARCH_WANT_IPC_PARSE_VERSION select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_REL + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config RWSEM_GENERIC_SPINLOCK bool diff --cc arch/mn10300/Kconfig index aa03f2e13385,ddbdc33471a8..549b9e50182e --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig @@@ -8,7 -8,7 +8,8 @@@ config MN1030 select HAVE_ARCH_KGDB select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER select GENERIC_CLOCKEVENTS + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config AM33_2 def_bool n diff --cc arch/powerpc/Kconfig index 8d8a7c6a7066,6e5a0979c085..088fc76ce9f0 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@@ -139,8 -139,7 +139,9 @@@ config PP select GENERIC_CLOCKEVENTS select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config EARLY_PRINTK bool diff --cc arch/s390/Kconfig index a4843ddce69f,57442393bac7..18c7e63fd041 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@@ -132,8 -125,7 +132,9 @@@ config S39 select GENERIC_CLOCKEVENTS select KTIME_SCALAR if 32BIT select HAVE_ARCH_SECCOMP_FILTER + select HAVE_MOD_ARCH_SPECIFIC + select MODULES_USE_ELF_RELA + select GENERIC_KERNEL_THREAD config SCHED_OMIT_FRAME_POINTER def_bool y diff --cc arch/s390/include/asm/processor.h index 56831dfa9198,da6f5baeee5c..94e749c90230 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@@ -142,15 -133,8 +145,14 @@@ struct task_struct struct mm_struct; struct seq_file; +#ifdef CONFIG_64BIT +extern void show_cacheinfo(struct seq_file *m); +#else +static inline void show_cacheinfo(struct seq_file *m) { } +#endif + /* Free all resources held by a thread. */ extern void release_thread(struct task_struct *); - extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); /* * Return saved PC of a blocked thread. diff --cc arch/s390/kernel/process.c index 5024be27df44,bab088de4569..cd31ad457a9b --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@@ -169,15 -146,25 +149,30 @@@ int copy_thread(unsigned long clone_fla /* fake return stack for resume(), don't go back to schedule */ frame->sf.gprs[9] = (unsigned long) frame; - /* Save access registers to new thread structure. */ - save_access_regs(&p->thread.acrs[0]); + /* Store access registers to kernel stack of new process. */ + if (unlikely(!regs)) { + /* kernel thread */ + memset(&frame->childregs, 0, sizeof(struct pt_regs)); + frame->childregs.psw.mask = psw_kernel_bits | PSW_MASK_DAT | + PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK; + frame->childregs.psw.addr = PSW_ADDR_AMODE | + (unsigned long) kernel_thread_starter; + frame->childregs.gprs[9] = new_stackp; /* function */ + frame->childregs.gprs[10] = arg; + frame->childregs.gprs[11] = (unsigned long) do_exit; + frame->childregs.orig_gpr2 = -1; + + return 0; + } + frame->childregs = *regs; + frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */ + frame->childregs.gprs[15] = new_stackp; + /* Don't copy runtime instrumentation info */ + p->thread.ri_cb = NULL; + p->thread.ri_signum = 0; + frame->childregs.psw.mask &= ~PSW_MASK_RI; + #ifndef CONFIG_64BIT /* * save fprs to current->thread.fp_regs to merge them with diff --cc arch/x86/Kconfig index 670c97ae0026,d93eb9d1bb97..ef595cc4411d --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@@ -102,12 -97,10 +102,13 @@@ config X8 select KTIME_SCALAR if X86_32 select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER + select MODULES_USE_ELF_REL if X86_32 + select MODULES_USE_ELF_RELA if X86_64 + select GENERIC_KERNEL_THREAD config INSTRUCTION_DECODER - def_bool (KPROBES || PERF_EVENTS || UPROBES) + def_bool y + depends on KPROBES || PERF_EVENTS || UPROBES config OUTPUT_FORMAT string diff --cc arch/x86/kernel/process_32.c index b9ff83c7135b,25e7e9390d26..44e0bff38e72 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c @@@ -190,6 -207,16 +207,12 @@@ start_thread(struct pt_regs *regs, unsi regs->cs = __USER_CS; regs->ip = new_ip; regs->sp = new_sp; + regs->flags = X86_EFLAGS_IF; - /* - * Free the old FP and other extended state - */ - free_thread_xstate(current); + /* + * force it to the iret return path by making it look as if there was + * some work pending. + */ + set_thread_flag(TIF_NOTIFY_RESUME); } EXPORT_SYMBOL_GPL(start_thread);