Skip to content

Commit

Permalink
Merge branch 'perf/urgent' into perf/core, to pick up PMU driver fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Apr 18, 2014
2 parents 37b6cb4 + 2422365 commit 1111b68
Show file tree
Hide file tree
Showing 124 changed files with 2,497 additions and 1,941 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Optional Properties (for HDMI pins):
Example:
// pin controller node
pinctrl@35004800 {
compatible = "brcmbcm11351-pinctrl";
compatible = "brcm,bcm11351-pinctrl";
reg = <0x35004800 0x430>;

// pin configuration node
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/configs/bcm_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ CONFIG_CRC_ITU_T=y
CONFIG_CRC7=y
CONFIG_XZ_DEC=y
CONFIG_AVERAGE=y
CONFIG_PINCTRL_CAPRI=y
CONFIG_PINCTRL_BCM281XX=y
CONFIG_WATCHDOG=y
CONFIG_BCM_KONA_WDT=y
CONFIG_BCM_KONA_WDT_DEBUG=y
2 changes: 1 addition & 1 deletion arch/ia64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ start_ap:
* Switch into virtual mode:
*/
movl r16=(IA64_PSR_IT|IA64_PSR_IC|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_DFH|IA64_PSR_BN \
|IA64_PSR_DI|IA64_PSR_AC)
|IA64_PSR_DI)
;;
mov cr.ipsr=r16
movl r17=1f
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kernel/ivt.S
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include <asm/unistd.h>
#include <asm/errno.h>

#if 1
#if 0
# define PSR_DEFAULT_BITS psr.ac
#else
# define PSR_DEFAULT_BITS 0
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/kvm/vmm_ivt.S
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#include "kvm_minstate.h"
#include "vti.h"

#if 1
#if 0
# define PSR_DEFAULT_BITS psr.ac
#else
# define PSR_DEFAULT_BITS 0
Expand Down
19 changes: 19 additions & 0 deletions arch/s390/include/asm/sigp.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,23 @@
#define SIGP_STATUS_INCORRECT_STATE 0x00000200UL
#define SIGP_STATUS_NOT_RUNNING 0x00000400UL

#ifndef __ASSEMBLY__

static inline int __pcpu_sigp(u16 addr, u8 order, u32 parm, u32 *status)
{
register unsigned int reg1 asm ("1") = parm;
int cc;

asm volatile(
" sigp %1,%2,0(%3)\n"
" ipm %0\n"
" srl %0,28\n"
: "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
if (status && cc == 1)
*status = reg1;
return cc;
}

#endif /* __ASSEMBLY__ */

#endif /* __S390_ASM_SIGP_H */
13 changes: 12 additions & 1 deletion arch/s390/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#ifndef __ASM_SMP_H
#define __ASM_SMP_H

#include <asm/sigp.h>

#ifdef CONFIG_SMP

#include <asm/lowcore.h>
Expand Down Expand Up @@ -50,9 +52,18 @@ static inline int smp_store_status(int cpu) { return 0; }
static inline int smp_vcpu_scheduled(int cpu) { return 1; }
static inline void smp_yield_cpu(int cpu) { }
static inline void smp_yield(void) { }
static inline void smp_stop_cpu(void) { }
static inline void smp_fill_possible_mask(void) { }

static inline void smp_stop_cpu(void)
{
u16 pcpu = stap();

for (;;) {
__pcpu_sigp(pcpu, SIGP_STOP, 0, NULL);
cpu_relax();
}
}

#endif /* CONFIG_SMP */

#ifdef CONFIG_HOTPLUG_CPU
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/include/uapi/asm/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@
#define __NR_finit_module 344
#define __NR_sched_setattr 345
#define __NR_sched_getattr 346
#define NR_syscalls 345
#define __NR_renameat2 347
#define NR_syscalls 348

/*
* There are some system calls that are not present on 64 bit, some
Expand Down
3 changes: 2 additions & 1 deletion arch/s390/kernel/compat_wrapper.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Compat sytem call wrappers.
* Compat system call wrappers.
*
* Copyright IBM Corp. 2014
*/
Expand Down Expand Up @@ -213,3 +213,4 @@ COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, i
COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags);
COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags);
COMPAT_SYSCALL_WRAP4(sched_getattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, size, unsigned int, flags);
COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags);
8 changes: 4 additions & 4 deletions arch/s390/kernel/dumpstack.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ void show_registers(struct pt_regs *regs)
char *mode;

mode = user_mode(regs) ? "User" : "Krnl";
printk("%s PSW : %p %p (%pSR)\n",
mode, (void *) regs->psw.mask,
(void *) regs->psw.addr,
(void *) regs->psw.addr);
printk("%s PSW : %p %p", mode, (void *)regs->psw.mask, (void *)regs->psw.addr);
if (!user_mode(regs))
printk(" (%pSR)", (void *)regs->psw.addr);
printk("\n");
printk(" R:%x T:%x IO:%x EX:%x Key:%x M:%x W:%x "
"P:%x AS:%x CC:%x PM:%x", mask_bits(regs, PSW_MASK_PER),
mask_bits(regs, PSW_MASK_DAT), mask_bits(regs, PSW_MASK_IO),
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void update_cr_regs(struct task_struct *task)
if (task->thread.per_flags & PER_FLAG_NO_TE)
cr_new &= ~(1UL << 55);
if (cr_new != cr)
__ctl_load(cr, 0, 0);
__ctl_load(cr_new, 0, 0);
/* Set or clear transaction execution TDC bits 62 and 63. */
__ctl_store(cr, 2, 2);
cr_new = cr & ~3UL;
Expand Down
32 changes: 32 additions & 0 deletions arch/s390/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,3 +1027,35 @@ void __init setup_arch(char **cmdline_p)
/* Setup zfcpdump support */
setup_zfcpdump();
}

#ifdef CONFIG_32BIT
static int no_removal_warning __initdata;

static int __init parse_no_removal_warning(char *str)
{
no_removal_warning = 1;
return 0;
}
__setup("no_removal_warning", parse_no_removal_warning);

static int __init removal_warning(void)
{
if (no_removal_warning)
return 0;
printk(KERN_ALERT "\n\n");
printk(KERN_CONT "Warning - you are using a 31 bit kernel!\n\n");
printk(KERN_CONT "We plan to remove 31 bit kernel support from the kernel sources in March 2015.\n");
printk(KERN_CONT "Currently we assume that nobody is using the 31 bit kernel on old 31 bit\n");
printk(KERN_CONT "hardware anymore. If you think that the code should not be removed and also\n");
printk(KERN_CONT "future versions of the Linux kernel should be able to run in 31 bit mode\n");
printk(KERN_CONT "please let us know. Please write to:\n");
printk(KERN_CONT "linux390@de.ibm.com (mail address) and/or\n");
printk(KERN_CONT "linux-s390@vger.kernel.org (mailing list).\n\n");
printk(KERN_CONT "Thank you!\n\n");
printk(KERN_CONT "If this kernel runs on a 64 bit machine you may consider using a 64 bit kernel.\n");
printk(KERN_CONT "This message can be disabled with the \"no_removal_warning\" kernel parameter.\n");
schedule_timeout_uninterruptible(300 * HZ);
return 0;
}
early_initcall(removal_warning);
#endif
15 changes: 0 additions & 15 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,6 @@ DEFINE_MUTEX(smp_cpu_state_mutex);
/*
* Signal processor helper functions.
*/
static inline int __pcpu_sigp(u16 addr, u8 order, u32 parm, u32 *status)
{
register unsigned int reg1 asm ("1") = parm;
int cc;

asm volatile(
" sigp %1,%2,0(%3)\n"
" ipm %0\n"
" srl %0,28\n"
: "=d" (cc), "+d" (reg1) : "d" (addr), "a" (order) : "cc");
if (status && cc == 1)
*status = reg1;
return cc;
}

static inline int __pcpu_sigp_relax(u16 addr, u8 order, u32 parm, u32 *status)
{
int cc;
Expand Down
1 change: 1 addition & 0 deletions arch/s390/kernel/syscalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,4 @@ SYSCALL(sys_kcmp,sys_kcmp,compat_sys_kcmp)
SYSCALL(sys_finit_module,sys_finit_module,compat_sys_finit_module)
SYSCALL(sys_sched_setattr,sys_sched_setattr,compat_sys_sched_setattr) /* 345 */
SYSCALL(sys_sched_getattr,sys_sched_getattr,compat_sys_sched_getattr)
SYSCALL(sys_renameat2,sys_renameat2,compat_sys_renameat2)
5 changes: 2 additions & 3 deletions arch/s390/lib/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,6 @@ static inline unsigned long strnlen_user_srst(const char __user *src,
register unsigned long reg0 asm("0") = 0;
unsigned long tmp1, tmp2;

if (unlikely(!size))
return 0;
update_primary_asce(current);
asm volatile(
" la %2,0(%1)\n"
" la %3,0(%0,%1)\n"
Expand All @@ -359,6 +356,8 @@ static inline unsigned long strnlen_user_srst(const char __user *src,

unsigned long __strnlen_user(const char __user *src, unsigned long size)
{
if (unlikely(!size))
return 0;
update_primary_asce(current);
return strnlen_user_srst(src, size);
}
Expand Down
140 changes: 135 additions & 5 deletions arch/s390/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,133 @@ static inline int user_space_fault(struct pt_regs *regs)
return 0;
}

static int bad_address(void *p)
{
unsigned long dummy;

return probe_kernel_address((unsigned long *)p, dummy);
}

#ifdef CONFIG_64BIT
static void dump_pagetable(unsigned long asce, unsigned long address)
{
unsigned long *table = __va(asce & PAGE_MASK);

pr_alert("AS:%016lx ", asce);
switch (asce & _ASCE_TYPE_MASK) {
case _ASCE_TYPE_REGION1:
table = table + ((address >> 53) & 0x7ff);
if (bad_address(table))
goto bad;
pr_cont("R1:%016lx ", *table);
if (*table & _REGION_ENTRY_INVALID)
goto out;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
/* fallthrough */
case _ASCE_TYPE_REGION2:
table = table + ((address >> 42) & 0x7ff);
if (bad_address(table))
goto bad;
pr_cont("R2:%016lx ", *table);
if (*table & _REGION_ENTRY_INVALID)
goto out;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
/* fallthrough */
case _ASCE_TYPE_REGION3:
table = table + ((address >> 31) & 0x7ff);
if (bad_address(table))
goto bad;
pr_cont("R3:%016lx ", *table);
if (*table & (_REGION_ENTRY_INVALID | _REGION3_ENTRY_LARGE))
goto out;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
/* fallthrough */
case _ASCE_TYPE_SEGMENT:
table = table + ((address >> 20) & 0x7ff);
if (bad_address(table))
goto bad;
pr_cont(KERN_CONT "S:%016lx ", *table);
if (*table & (_SEGMENT_ENTRY_INVALID | _SEGMENT_ENTRY_LARGE))
goto out;
table = (unsigned long *)(*table & _SEGMENT_ENTRY_ORIGIN);
}
table = table + ((address >> 12) & 0xff);
if (bad_address(table))
goto bad;
pr_cont("P:%016lx ", *table);
out:
pr_cont("\n");
return;
bad:
pr_cont("BAD\n");
}

#else /* CONFIG_64BIT */

static void dump_pagetable(unsigned long asce, unsigned long address)
{
unsigned long *table = __va(asce & PAGE_MASK);

pr_alert("AS:%08lx ", asce);
table = table + ((address >> 20) & 0x7ff);
if (bad_address(table))
goto bad;
pr_cont("S:%08lx ", *table);
if (*table & _SEGMENT_ENTRY_INVALID)
goto out;
table = (unsigned long *)(*table & _SEGMENT_ENTRY_ORIGIN);
table = table + ((address >> 12) & 0xff);
if (bad_address(table))
goto bad;
pr_cont("P:%08lx ", *table);
out:
pr_cont("\n");
return;
bad:
pr_cont("BAD\n");
}

#endif /* CONFIG_64BIT */

static void dump_fault_info(struct pt_regs *regs)
{
unsigned long asce;

pr_alert("Fault in ");
switch (regs->int_parm_long & 3) {
case 3:
pr_cont("home space ");
break;
case 2:
pr_cont("secondary space ");
break;
case 1:
pr_cont("access register ");
break;
case 0:
pr_cont("primary space ");
break;
}
pr_cont("mode while using ");
if (!user_space_fault(regs)) {
asce = S390_lowcore.kernel_asce;
pr_cont("kernel ");
}
#ifdef CONFIG_PGSTE
else if ((current->flags & PF_VCPU) && S390_lowcore.gmap) {
struct gmap *gmap = (struct gmap *)S390_lowcore.gmap;
asce = gmap->asce;
pr_cont("gmap ");
}
#endif
else {
asce = S390_lowcore.user_asce;
pr_cont("user ");
}
pr_cont("ASCE.\n");
dump_pagetable(asce, regs->int_parm_long & __FAIL_ADDR_MASK);
}

static inline void report_user_fault(struct pt_regs *regs, long signr)
{
if ((task_pid_nr(current) > 1) && !show_unhandled_signals)
Expand All @@ -138,8 +265,9 @@ static inline void report_user_fault(struct pt_regs *regs, long signr)
regs->int_code);
print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
printk(KERN_CONT "\n");
printk(KERN_ALERT "failing address: %lX\n",
regs->int_parm_long & __FAIL_ADDR_MASK);
printk(KERN_ALERT "failing address: %016lx TEID: %016lx\n",
regs->int_parm_long & __FAIL_ADDR_MASK, regs->int_parm_long);
dump_fault_info(regs);
show_regs(regs);
}

Expand Down Expand Up @@ -177,11 +305,13 @@ static noinline void do_no_context(struct pt_regs *regs)
address = regs->int_parm_long & __FAIL_ADDR_MASK;
if (!user_space_fault(regs))
printk(KERN_ALERT "Unable to handle kernel pointer dereference"
" at virtual kernel address %p\n", (void *)address);
" in virtual kernel address space\n");
else
printk(KERN_ALERT "Unable to handle kernel paging request"
" at virtual user address %p\n", (void *)address);

" in virtual user address space\n");
printk(KERN_ALERT "failing address: %016lx TEID: %016lx\n",
regs->int_parm_long & __FAIL_ADDR_MASK, regs->int_parm_long);
dump_fault_info(regs);
die(regs, "Oops");
do_exit(SIGKILL);
}
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ archclean:
PHONY += kvmconfig
kvmconfig:
$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target))
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config arch/x86/configs/kvm_guest.config
$(Q)yes "" | $(MAKE) oldconfig
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(srctree)/arch/x86/configs/kvm_guest.config
$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig

define archhelp
echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
Expand Down
Loading

0 comments on commit 1111b68

Please sign in to comment.