Patches contributed by Eötvös Lorand University
commit 6c9fcaf2eec1b9f85226a694230dd957dd7926b3
Merge: b9d2252c1e44 199a952876ad
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Jul 15 21:10:12 2008 +0200
Merge branch 'core/rcu' into core/rcu-for-linus
commit 91d0322bef047e2916b3e52741411bffc63929cb
Merge: 065cb3dfe249 50515af207d4
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Jul 15 13:45:59 2008 +0200
Merge branch 'linus' into x86/urgent
commit 5806b81ac1c0c52665b91723fd4146a4f86e386b
Merge: d14c8a680ccf 6712e299b7dc
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 16:11:52 2008 +0200
Merge branch 'auto-ftrace-next' into tracing/for-linus
Conflicts:
arch/x86/kernel/entry_32.S
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
arch/x86/lib/Makefile
include/asm-x86/irqflags.h
kernel/Makefile
kernel/sched.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --cc arch/x86/kernel/Makefile
index 55ff016e9f69,5ff67208d4ae..5112c84f5421
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@@ -54,9 -60,10 +61,10 @@@ obj-$(CONFIG_X86_32_SMP) += smpcommon.
obj-$(CONFIG_X86_64_SMP) += tsc_sync.o smpcommon.o
obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o
obj-$(CONFIG_X86_MPPARSE) += mpparse.o
-obj-$(CONFIG_X86_LOCAL_APIC) += apic_$(BITS).o nmi_$(BITS).o
+obj-$(CONFIG_X86_LOCAL_APIC) += apic_$(BITS).o nmi.o
obj-$(CONFIG_X86_IO_APIC) += io_apic_$(BITS).o
obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o
+ obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o
obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o
obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
diff --cc arch/x86/kernel/entry_32.S
index cfe28a715434,95e6bbe3665e..6bc07f0f1202
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@@ -51,7 -51,8 +51,8 @@@
#include <asm/percpu.h>
#include <asm/dwarf2.h>
#include <asm/processor-flags.h>
+ #include <asm/ftrace.h>
-#include "irq_vectors.h"
+#include <asm/irq_vectors.h>
/*
* We use macros for low-level operations which need to be overridden
diff --cc arch/x86/kernel/process_32.c
index 9a139f6c9df3,347a7aba8b16..0c3927accb00
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@@ -142,7 -185,10 +142,10 @@@ void cpu_idle(void
local_irq_disable();
__get_cpu_var(irq_stat).idle_timestamp = jiffies;
+ /* Don't trace irqs off for idle */
+ stop_critical_timings();
- idle();
+ pm_idle();
+ start_critical_timings();
}
tick_nohz_restart_sched_tick();
preempt_enable_no_resched();
diff --cc arch/x86/kernel/process_64.c
index db5eb963e4df,ea090e6cfe39..a8e53626ac9a
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@@ -134,7 -165,10 +134,10 @@@ void cpu_idle(void
*/
local_irq_disable();
enter_idle();
+ /* Don't trace irqs off for idle */
+ stop_critical_timings();
- idle();
+ pm_idle();
+ start_critical_timings();
/* In many cases the interrupt that ended idle
has already called exit_idle. But some idle
loops can be woken up without interrupt. */
diff --cc arch/x86/lib/Makefile
index 83226e0a7ce4,84aa2883fe15..aa3fa4119424
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@@ -4,8 -4,9 +4,9 @@@
obj-$(CONFIG_SMP) := msr-on-cpu.o
-lib-y := delay_$(BITS).o
+lib-y := delay.o
+ lib-y += thunk_$(BITS).o
-lib-y += usercopy_$(BITS).o getuser_$(BITS).o putuser_$(BITS).o
+lib-y += usercopy_$(BITS).o getuser.o putuser.o
lib-y += memcpy_$(BITS).o
ifeq ($(CONFIG_X86_32),y)
diff --cc include/asm-x86/irqflags.h
index 17e7a1701c97,24d71b1eb189..424acb48cd61
--- a/include/asm-x86/irqflags.h
+++ b/include/asm-x86/irqflags.h
@@@ -190,8 -169,16 +190,6 @@@ static inline void trace_hardirqs_fixup
#else
#ifdef CONFIG_X86_64
- #define ARCH_TRACE_IRQS_ON call trace_hardirqs_on_thunk
- #define ARCH_TRACE_IRQS_OFF call trace_hardirqs_off_thunk
-/*
- * Currently paravirt can't handle swapgs nicely when we
- * don't have a stack we can rely on (such as a user space
- * stack). So we either find a way around these or just fault
- * and emulate if a guest tries to call swapgs directly.
- *
- * Either way, this is a good way to document that we don't
- * have a reliable stack. x86_64 only.
- */
-#define SWAPGS_UNSAFE_STACK swapgs
#define ARCH_LOCKDEP_SYS_EXIT call lockdep_sys_exit_thunk
#define ARCH_LOCKDEP_SYS_EXIT_IRQ \
TRACE_IRQS_ON; \
diff --cc include/linux/linkage.h
index 9fd1f859021b,14f329c64ba8..56ba37394656
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@@ -1,9 -1,10 +1,11 @@@
#ifndef _LINUX_LINKAGE_H
#define _LINUX_LINKAGE_H
+#include <linux/compiler.h>
#include <asm/linkage.h>
+ #define notrace __attribute__((no_instrument_function))
+
#ifdef __cplusplus
#define CPP_ASMLINKAGE extern "C"
#else
diff --cc kernel/Makefile
index 6c55301112e0,480976275d98..f6328e16dfdd
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@@ -69,7 -81,8 +81,9 @@@ obj-$(CONFIG_TASK_DELAY_ACCT) += delaya
obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
obj-$(CONFIG_MARKERS) += marker.o
obj-$(CONFIG_LATENCYTOP) += latencytop.o
+ obj-$(CONFIG_FTRACE) += trace/
+ obj-$(CONFIG_TRACING) += trace/
+obj-$(CONFIG_SMP) += sched_cpupri.o
ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
# According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
diff --cc kernel/sched.c
index 591d5e7f757a,42899dce837d..c74b0d23c752
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@@ -2448,8 -2299,11 +2470,11 @@@ void wake_up_new_task(struct task_struc
* management (if any):
*/
p->sched_class->task_new(rq, p);
- inc_nr_running(p, rq);
+ inc_nr_running(rq);
}
+ trace_mark(kernel_sched_wakeup_new,
+ "pid %d state %ld ## rq %p task %p rq->curr %p",
+ p->pid, p->state, rq, p, rq->curr);
check_preempt_curr(rq, p);
#ifdef CONFIG_SMP
if (p->sched_class->task_wake_up)
commit d14c8a680ccfdeb5e7b9be4d61162c2b373bd1e8
Merge: d59fdcf2ac50 873a6ed6288b
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 16:11:02 2008 +0200
Merge branch 'sched/for-linus' into tracing/for-linus
commit 6712e299b7dc78aa4971b85e803435ee6d49a9dd
Merge: ec1bb60bbff0 b2613e370dbe
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 15:58:35 2008 +0200
Merge branch 'tracing/ftrace' into auto-ftrace-next
commit 873a6ed6288b6c2c0d2cc84d3b2bf2fab9ba0181
Merge: 361833efac4d bce7f793daec
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 12:19:19 2008 +0200
Merge commit 'v2.6.26' into sched/devel
commit 361833efac4d277d209008e1e0658e597bc1bdef
Merge: 54ef76f37bcc c300ba252829
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 12:19:13 2008 +0200
Merge branch 'sched/clock' into sched/devel
commit d12c1a37925a8ec386994169605fe99217295199
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 12:09:28 2008 +0200
lockdep: fix kernel/fork.c warning
fix:
[ 0.184011] ------------[ cut here ]------------
[ 0.188011] WARNING: at kernel/fork.c:918 copy_process+0x1c0/0x1084()
[ 0.192011] Pid: 0, comm: swapper Not tainted 2.6.26-tip-00351-g01d4a50-dirty #14521
[ 0.196011] [<c0135d48>] warn_on_slowpath+0x3c/0x60
[ 0.200012] [<c016f805>] ? __alloc_pages_internal+0x92/0x36b
[ 0.208012] [<c033de5e>] ? __spin_lock_init+0x24/0x4a
[ 0.212012] [<c01347e3>] copy_process+0x1c0/0x1084
[ 0.216013] [<c013575f>] do_fork+0xb8/0x1ad
[ 0.220013] [<c034f75e>] ? acpi_os_release_lock+0x8/0xa
[ 0.228013] [<c034ff7a>] ? acpi_os_vprintf+0x20/0x24
[ 0.232014] [<c01129ee>] kernel_thread+0x75/0x7d
[ 0.236014] [<c0a491eb>] ? kernel_init+0x0/0x24a
[ 0.240014] [<c0a491eb>] ? kernel_init+0x0/0x24a
[ 0.244014] [<c01151b0>] ? kernel_thread_helper+0x0/0x10
[ 0.252015] [<c06c6ac0>] rest_init+0x14/0x50
[ 0.256015] [<c0a498ce>] start_kernel+0x2b9/0x2c0
[ 0.260015] [<c0a4904f>] __init_begin+0x4f/0x57
[ 0.264016] =======================
[ 0.268016] ---[ end trace 4eaa2a86a8e2da22 ]---
[ 0.272016] enabled ExtINT on CPU#0
which occurs if CONFIG_TRACE_IRQFLAGS=y, CONFIG_DEBUG_LOCKDEP=y,
but CONFIG_PROVE_LOCKING is disabled.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/fork.c b/kernel/fork.c
index 19908b26cf80..cdb1f82d3bd2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -909,7 +909,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
rt_mutex_init_task(p);
-#ifdef CONFIG_TRACE_IRQFLAGS
+#ifdef CONFIG_PROVE_LOCKING
DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled);
DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled);
#endif
commit d59fdcf2ac501de99c3dfb452af5e254d4342886
Merge: 2387ce57a816 bce7f793daec
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 11:37:46 2008 +0200
Merge commit 'v2.6.26' into x86/core
commit 992860e991f2015fb8c8df65aa32afa0dcbb4430
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Jul 14 10:28:38 2008 +0200
lockdep: fix ftrace irq tracing false positive
fix this false positive:
[ 0.020000] ------------[ cut here ]------------
[ 0.020000] WARNING: at kernel/lockdep.c:2718 check_flags+0x14a/0x170()
[ 0.020000] Modules linked in:
[ 0.020000] Pid: 0, comm: swapper Not tainted 2.6.26-tip-00343-gd7e5521-dirty #14486
[ 0.020000] [<c01312e4>] warn_on_slowpath+0x54/0x80
[ 0.020000] [<c067e451>] ? _spin_unlock_irqrestore+0x61/0x70
[ 0.020000] [<c0131bb1>] ? release_console_sem+0x201/0x210
[ 0.020000] [<c0143d65>] ? __kernel_text_address+0x35/0x40
[ 0.020000] [<c010562e>] ? dump_trace+0x5e/0x140
[ 0.020000] [<c01518b5>] ? __lock_acquire+0x245/0x820
[ 0.020000] [<c015063a>] check_flags+0x14a/0x170
[ 0.020000] [<c0151ed8>] ? lock_acquire+0x48/0xc0
[ 0.020000] [<c0151ee1>] lock_acquire+0x51/0xc0
[ 0.020000] [<c014a16c>] ? down+0x2c/0x40
[ 0.020000] [<c010a609>] ? sched_clock+0x9/0x10
[ 0.020000] [<c067e7b2>] _write_lock+0x32/0x60
[ 0.020000] [<c013797f>] ? request_resource+0x1f/0xb0
[ 0.020000] [<c013797f>] request_resource+0x1f/0xb0
[ 0.020000] [<c02f89ad>] vgacon_startup+0x2bd/0x3e0
[ 0.020000] [<c094d62a>] con_init+0x19/0x22f
[ 0.020000] [<c0330c7c>] ? tty_register_ldisc+0x5c/0x70
[ 0.020000] [<c094cf49>] console_init+0x20/0x2e
[ 0.020000] [<c092a969>] start_kernel+0x20c/0x379
[ 0.020000] [<c092a516>] ? unknown_bootoption+0x0/0x1f6
[ 0.020000] [<c092a099>] __init_begin+0x99/0xa1
[ 0.020000] =======================
[ 0.020000] ---[ end trace 4eaa2a86a8e2da22 ]---
[ 0.020000] possible reason: unannotated irqs-on.
[ 0.020000] irq event stamp: 0
which occurs if CONFIG_TRACE_IRQFLAGS=y, CONFIG_DEBUG_LOCKDEP=y,
but CONFIG_PROVE_LOCKING is disabled.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 7553a28b99cd..fc5d5aabd77a 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2688,7 +2688,8 @@ __lock_release(struct lockdep_map *lock, int nested, unsigned long ip)
*/
static void check_flags(unsigned long flags)
{
-#if defined(CONFIG_DEBUG_LOCKDEP) && defined(CONFIG_TRACE_IRQFLAGS)
+#if defined(CONFIG_PROVE_LOCKING) && defined(CONFIG_DEBUG_LOCKDEP) && \
+ defined(CONFIG_TRACE_IRQFLAGS)
if (!debug_locks)
return;