Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f2fde92 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus',...

Merge branches 'core-urgent-for-linus', 'perf-urgent-for-linus', 'sched-urgent-for-linus' and 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  bugs, x86: Fix printk levels for panic, softlockups and stack dumps

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf top: Fix number of samples displayed
  perf tools: Fix strlen() bug in perf_event__synthesize_event_type()
  perf tools: Fix broken build by defining _GNU_SOURCE in Makefile
  x86/dumpstack: Remove unneeded check in dump_trace()
  perf: Fix broken interrupt rate throttling

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/rt: Fix task stack corruption under __ARCH_WANT_INTERRUPTS_ON_CTXSW
  sched: Fix ancient race in do_exit()
  sched/nohz: Fix nohz cpu idle load balancing state with cpu hotplug
  sched/s390: Fix compile error in sched/core.c
  sched: Fix rq->nr_uninterruptible update race

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/reboot: Remove VersaLogic Menlow reboot quirk
  x86/reboot: Skip DMI checks if reboot set by user
  x86: Properly parenthesize cmpxchg() macro arguments
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -145,13 +145,13 @@ extern void __add_wrong_size(void)


#ifdef __HAVE_ARCH_CMPXCHG
#ifdef __HAVE_ARCH_CMPXCHG
#define cmpxchg(ptr, old, new)						\
#define cmpxchg(ptr, old, new)						\
	__cmpxchg((ptr), (old), (new), sizeof(*ptr))
	__cmpxchg(ptr, old, new, sizeof(*(ptr)))


#define sync_cmpxchg(ptr, old, new)					\
#define sync_cmpxchg(ptr, old, new)					\
	__sync_cmpxchg((ptr), (old), (new), sizeof(*ptr))
	__sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))


#define cmpxchg_local(ptr, old, new)					\
#define cmpxchg_local(ptr, old, new)					\
	__cmpxchg_local((ptr), (old), (new), sizeof(*ptr))
	__cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
#endif
#endif


/*
/*
+2 −1
Original line number Original line Diff line number Diff line
@@ -252,7 +252,8 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
	unsigned short ss;
	unsigned short ss;
	unsigned long sp;
	unsigned long sp;
#endif
#endif
	printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
	printk(KERN_DEFAULT
	       "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
#ifdef CONFIG_PREEMPT
#ifdef CONFIG_PREEMPT
	printk("PREEMPT ");
	printk("PREEMPT ");
#endif
#endif
+4 −4
Original line number Original line Diff line number Diff line
@@ -129,7 +129,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
	if (!stack) {
	if (!stack) {
		if (regs)
		if (regs)
			stack = (unsigned long *)regs->sp;
			stack = (unsigned long *)regs->sp;
		else if (task && task != current)
		else if (task != current)
			stack = (unsigned long *)task->thread.sp;
			stack = (unsigned long *)task->thread.sp;
		else
		else
			stack = &dummy;
			stack = &dummy;
@@ -269,11 +269,11 @@ void show_registers(struct pt_regs *regs)
		unsigned char c;
		unsigned char c;
		u8 *ip;
		u8 *ip;


		printk(KERN_EMERG "Stack:\n");
		printk(KERN_DEFAULT "Stack:\n");
		show_stack_log_lvl(NULL, regs, (unsigned long *)sp,
		show_stack_log_lvl(NULL, regs, (unsigned long *)sp,
				   0, KERN_EMERG);
				   0, KERN_DEFAULT);


		printk(KERN_EMERG "Code: ");
		printk(KERN_DEFAULT "Code: ");


		ip = (u8 *)regs->ip - code_prologue;
		ip = (u8 *)regs->ip - code_prologue;
		if (ip < (u8 *)PAGE_OFFSET || probe_kernel_address(ip, c)) {
		if (ip < (u8 *)PAGE_OFFSET || probe_kernel_address(ip, c)) {
+26 −10
Original line number Original line Diff line number Diff line
@@ -39,6 +39,14 @@ static int reboot_mode;
enum reboot_type reboot_type = BOOT_ACPI;
enum reboot_type reboot_type = BOOT_ACPI;
int reboot_force;
int reboot_force;


/* This variable is used privately to keep track of whether or not
 * reboot_type is still set to its default value (i.e., reboot= hasn't
 * been set on the command line).  This is needed so that we can
 * suppress DMI scanning for reboot quirks.  Without it, it's
 * impossible to override a faulty reboot quirk without recompiling.
 */
static int reboot_default = 1;

#if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
#if defined(CONFIG_X86_32) && defined(CONFIG_SMP)
static int reboot_cpu = -1;
static int reboot_cpu = -1;
#endif
#endif
@@ -67,6 +75,12 @@ bool port_cf9_safe = false;
static int __init reboot_setup(char *str)
static int __init reboot_setup(char *str)
{
{
	for (;;) {
	for (;;) {
		/* Having anything passed on the command line via
		 * reboot= will cause us to disable DMI checking
		 * below.
		 */
		reboot_default = 0;

		switch (*str) {
		switch (*str) {
		case 'w':
		case 'w':
			reboot_mode = 0x1234;
			reboot_mode = 0x1234;
@@ -295,14 +309,6 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
			DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
			DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
		},
		},
	},
	},
	{	/* Handle problems with rebooting on VersaLogic Menlow boards */
		.callback = set_bios_reboot,
		.ident = "VersaLogic Menlow based board",
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "VersaLogic Corporation"),
			DMI_MATCH(DMI_BOARD_NAME, "VersaLogic Menlow board"),
		},
	},
	{ /* Handle reboot issue on Acer Aspire one */
	{ /* Handle reboot issue on Acer Aspire one */
		.callback = set_kbd_reboot,
		.callback = set_kbd_reboot,
		.ident = "Acer Aspire One A110",
		.ident = "Acer Aspire One A110",
@@ -316,7 +322,12 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {


static int __init reboot_init(void)
static int __init reboot_init(void)
{
{
	/* Only do the DMI check if reboot_type hasn't been overridden
	 * on the command line
	 */
	if (reboot_default) {
		dmi_check_system(reboot_dmi_table);
		dmi_check_system(reboot_dmi_table);
	}
	return 0;
	return 0;
}
}
core_initcall(reboot_init);
core_initcall(reboot_init);
@@ -465,7 +476,12 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = {


static int __init pci_reboot_init(void)
static int __init pci_reboot_init(void)
{
{
	/* Only do the DMI check if reboot_type hasn't been overridden
	 * on the command line
	 */
	if (reboot_default) {
		dmi_check_system(pci_reboot_dmi_table);
		dmi_check_system(pci_reboot_dmi_table);
	}
	return 0;
	return 0;
}
}
core_initcall(pci_reboot_init);
core_initcall(pci_reboot_init);
+2 −2
Original line number Original line Diff line number Diff line
@@ -673,7 +673,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,


	stackend = end_of_stack(tsk);
	stackend = end_of_stack(tsk);
	if (tsk != &init_task && *stackend != STACK_END_MAGIC)
	if (tsk != &init_task && *stackend != STACK_END_MAGIC)
		printk(KERN_ALERT "Thread overran stack, or stack corrupted\n");
		printk(KERN_EMERG "Thread overran stack, or stack corrupted\n");


	tsk->thread.cr2		= address;
	tsk->thread.cr2		= address;
	tsk->thread.trap_no	= 14;
	tsk->thread.trap_no	= 14;
@@ -684,7 +684,7 @@ no_context(struct pt_regs *regs, unsigned long error_code,
		sig = 0;
		sig = 0;


	/* Executive summary in case the body of the oops scrolled away */
	/* Executive summary in case the body of the oops scrolled away */
	printk(KERN_EMERG "CR2: %016lx\n", address);
	printk(KERN_DEFAULT "CR2: %016lx\n", address);


	oops_end(flags, regs, sig);
	oops_end(flags, regs, sig);
}
}
Loading