Patches contributed by Eötvös Lorand University
commit 83f2f0ed715eb15a8e13c07df479d65bbc10d8d5
Merge: 3de46fda4c10 4fe70410d9a2
Author: Ingo Molnar <mingo@elte.hu>
Date: Thu Apr 2 16:33:42 2009 +0200
Merge branch 'linus' into x86/urgent
Merge needed to go past commit 7ca43e756 (mm: use debug_kmap_atomic)
and fix it.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
commit 8302294f43250dc337108c51882a6007f2b1e2e0
Merge: 4fe70410d9a2 2e572895bf32
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Apr 1 21:54:19 2009 +0200
Merge branch 'tracing/core-v2' into tracing-for-linus
Conflicts:
include/linux/slub_def.h
lib/Kconfig.debug
mm/slob.c
mm/slub.c
diff --cc arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
index 23da96e57b17,5e40f54171e7..05209b5cc6ca
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
@@@ -33,15 -33,12 +33,15 @@@
#include <linux/cpufreq.h>
#include <linux/compiler.h>
#include <linux/dmi.h>
- #include <linux/ftrace.h>
+ #include <trace/power.h>
#include <linux/acpi.h>
+#include <linux/io.h>
+#include <linux/delay.h>
+#include <linux/uaccess.h>
+
#include <acpi/processor.h>
-#include <asm/io.h>
#include <asm/msr.h>
#include <asm/processor.h>
#include <asm/cpufeature.h>
diff --cc include/asm-generic/vmlinux.lds.h
index a654d724d3b0,d3bc3c86df6a..7fa660fd449c
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@@ -80,13 -104,11 +104,16 @@@
VMLINUX_SYMBOL(__start___tracepoints) = .; \
*(__tracepoints) \
VMLINUX_SYMBOL(__stop___tracepoints) = .; \
+ /* implement dynamic printk debug */ \
+ . = ALIGN(8); \
+ VMLINUX_SYMBOL(__start___verbose) = .; \
+ *(__verbose) \
+ VMLINUX_SYMBOL(__stop___verbose) = .; \
LIKELY_PROFILE() \
- BRANCH_PROFILE()
+ BRANCH_PROFILE() \
+ TRACE_PRINTKS() \
+ FTRACE_EVENTS() \
+ TRACE_SYSCALLS()
#define RO_DATA(align) \
. = ALIGN((align)); \
diff --cc include/linux/string.h
index 8852739f36df,27ac31784ad2..3c877d686375
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@@ -10,9 -10,9 +10,10 @@@
#include <linux/compiler.h> /* for inline */
#include <linux/types.h> /* for size_t */
#include <linux/stddef.h> /* for NULL */
+ #include <stdarg.h>
extern char *strndup_user(const char __user *, long);
+extern void *memdup_user(const void __user *, size_t);
/*
* Include machine specific inline routines
diff --cc mm/slob.c
index 7a3411524dac,596152926a8d..4dd6516447f2
--- a/mm/slob.c
+++ b/mm/slob.c
@@@ -474,8 -464,9 +475,9 @@@ void *__kmalloc_node(size_t size, gfp_
{
unsigned int *m;
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
+ void *ret;
- lockdep_trace_alloc(flags);
+ lockdep_trace_alloc(gfp);
if (size < PAGE_SIZE - align) {
if (!size)
@@@ -485,11 -477,15 +488,15 @@@
if (!m)
return NULL;
*m = size;
- return (void *)m + align;
+ ret = (void *)m + align;
+
+ kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_KMALLOC,
+ _RET_IP_, ret,
+ size, size + align, gfp, node);
} else {
- void *ret;
+ unsigned int order = get_order(size);
- ret = slob_new_page(gfp | __GFP_COMP, order, node);
+ ret = slob_new_pages(gfp | __GFP_COMP, get_order(size), node);
if (ret) {
struct page *page;
page = virt_to_page(ret);
@@@ -583,10 -586,19 +597,19 @@@ void *kmem_cache_alloc_node(struct kmem
{
void *b;
- if (c->size < PAGE_SIZE)
+ if (c->size < PAGE_SIZE) {
b = slob_alloc(c->size, flags, c->align, node);
- else
+ kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_CACHE,
+ _RET_IP_, b, c->size,
+ SLOB_UNITS(c->size) * SLOB_UNIT,
+ flags, node);
+ } else {
- b = slob_new_page(flags, get_order(c->size), node);
+ b = slob_new_pages(flags, get_order(c->size), node);
+ kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_CACHE,
+ _RET_IP_, b, c->size,
+ PAGE_SIZE << get_order(c->size),
+ flags, node);
+ }
if (c->ctor)
c->ctor(b);
commit 8b54e45b0005875f59cb8b1c44d429a161d5f245
Merge: 0a5d649018b1 9a8118baaeb0 b14b70a6a4e3 fee039a1d05c 18cea4591a98 548c31613790
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Mar 31 17:46:40 2009 +0200
Merge branches 'tracing/docs', 'tracing/filters', 'tracing/ftrace', 'tracing/kprobes', 'tracing/blktrace-v2' and 'tracing/textedit' into tracing/core-v2
diff --cc kernel/trace/trace.h
index 7cfb741be200,90a848debcba,d7410bbb9a80,7cfb741be200,38276d1638e3,7cfb741be200..cb0ce3fc36d3
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@@@@@@ -775,24 -777,80 -776,24 -775,24 -777,18 -775,24 +778,80 @@@@@@@ enum
TRACE_EVENT_TYPE_RAW = 2,
};
+ ++++struct ftrace_event_field {
+ ++++ struct list_head link;
+ ++++ char *name;
+ ++++ char *type;
+ ++++ int offset;
+ ++++ int size;
+ ++++};
+ ++++
struct ftrace_event_call {
- ---- char *name;
- ---- char *system;
- ---- struct dentry *dir;
- ---- int enabled;
- ---- int (*regfunc)(void);
- ---- void (*unregfunc)(void);
- ---- int id;
- ---- int (*raw_init)(void);
- ---- int (*show_format)(struct trace_seq *s);
+ ++++ char *name;
+ ++++ char *system;
+ ++++ struct dentry *dir;
+ ++++ int enabled;
+ ++++ int (*regfunc)(void);
+ ++++ void (*unregfunc)(void);
+ ++++ int id;
+ ++++ int (*raw_init)(void);
+ ++++ int (*show_format)(struct trace_seq *s);
+ ++++ int (*define_fields)(void);
+ ++++ struct list_head fields;
+ ++++ struct filter_pred **preds;
+
+ #ifdef CONFIG_EVENT_PROFILE
+ atomic_t profile_count;
+ int (*profile_enable)(struct ftrace_event_call *);
+ void (*profile_disable)(struct ftrace_event_call *);
+ #endif
};
+ ++++struct event_subsystem {
+ ++++ struct list_head list;
+ ++++ const char *name;
+ ++++ struct dentry *entry;
+ ++++ struct filter_pred **preds;
+ ++++};
+ ++++
+ ++++#define events_for_each(event) \
+ ++++ for (event = __start_ftrace_events; \
+ ++++ (unsigned long)event < (unsigned long)__stop_ftrace_events; \
+ ++++ event++)
+ ++++
+ ++++#define MAX_FILTER_PRED 8
+ ++++
+ ++++struct filter_pred;
+ ++++
+ ++++typedef int (*filter_pred_fn_t) (struct filter_pred *pred, void *event);
+ ++++
+ ++++struct filter_pred {
+ ++++ filter_pred_fn_t fn;
+ ++++ u64 val;
+ ++++ char *str_val;
+ ++++ int str_len;
+ ++++ char *field_name;
+ ++++ int offset;
+ ++++ int not;
+ ++++ int or;
+ ++++ int compound;
+ ++++ int clear;
+ ++++};
+ ++++
+ ++++int trace_define_field(struct ftrace_event_call *call, char *type,
+ ++++ char *name, int offset, int size);
+ ++++extern void filter_free_pred(struct filter_pred *pred);
+ ++++extern void filter_print_preds(struct filter_pred **preds,
+ ++++ struct trace_seq *s);
+ ++++extern int filter_parse(char **pbuf, struct filter_pred *pred);
+ ++++extern int filter_add_pred(struct ftrace_event_call *call,
+ ++++ struct filter_pred *pred);
+ ++++extern void filter_free_preds(struct ftrace_event_call *call);
+ ++++extern int filter_match_preds(struct ftrace_event_call *call, void *rec);
+ ++++extern void filter_free_subsystem_preds(struct event_subsystem *system);
+ ++++extern int filter_add_subsystem_pred(struct event_subsystem *system,
+ ++++ struct filter_pred *pred);
+ ++++
void event_trace_printk(unsigned long ip, const char *fmt, ...);
extern struct ftrace_event_call __start_ftrace_events[];
extern struct ftrace_event_call __stop_ftrace_events[];
commit 7bee946358c3cb957d4aa648fc5ab3cad0b232d0
Merge: d820ac4c2fa8 15f7176eb1cc
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Mar 31 13:53:43 2009 +0200
Merge branch 'linus' into locking-for-linus
Conflicts:
lib/Kconfig.debug
commit 548c316137901cc81dea35e26362a9d5ba0b89b6
Author: Ingo Molnar <mingo@elte.hu>
Date: Tue Mar 31 00:25:23 2009 +0200
tracing, Text Edit Lock: cleanup
Remove incorrectly introduced headers.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/mm/memory.c b/mm/memory.c
index dfc9e4ea4e8b..baa999e87cd2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -48,8 +48,6 @@
#include <linux/rmap.h>
#include <linux/module.h>
#include <linux/delayacct.h>
-#include <linux/kprobes.h>
-#include <linux/mutex.h>
#include <linux/init.h>
#include <linux/writeback.h>
#include <linux/memcontrol.h>
commit 65fb0d23fcddd8697c871047b700c78817bdaa43
Merge: 8c083f081d00 dfbbe89e197a
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Mar 30 23:53:32 2009 +0200
Merge branch 'linus' into cpumask-for-linus
Conflicts:
arch/x86/kernel/cpu/common.c
diff --cc arch/x86/kernel/cpu/common.c
index d7dd3c294e2a,e2962cc1e27b..c4f667896c28
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@@ -29,22 -39,14 +39,12 @@@
#include <asm/uv/uv.h>
#endif
- #include <asm/pgtable.h>
- #include <asm/processor.h>
- #include <asm/desc.h>
- #include <asm/atomic.h>
- #include <asm/proto.h>
- #include <asm/sections.h>
- #include <asm/setup.h>
- #include <asm/hypervisor.h>
- #include <asm/stackprotector.h>
-
#include "cpu.h"
-#ifdef CONFIG_X86_64
-
/* all of these masks are initialized in setup_cpu_local_masks() */
- cpumask_var_t cpu_callin_mask;
- cpumask_var_t cpu_callout_mask;
cpumask_var_t cpu_initialized_mask;
+ cpumask_var_t cpu_callout_mask;
+ cpumask_var_t cpu_callin_mask;
/* representing cpus for which sibling maps can be computed */
cpumask_var_t cpu_sibling_setup_mask;
@@@ -58,7 -60,17 +58,7 @@@ void __init setup_cpu_local_masks(void
alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
}
- static struct cpu_dev *this_cpu __cpuinitdata;
-#else /* CONFIG_X86_32 */
-
-cpumask_t cpu_sibling_setup_map;
-cpumask_t cpu_callout_map;
-cpumask_t cpu_initialized;
-cpumask_t cpu_callin_map;
-
-#endif /* CONFIG_X86_32 */
-
-
+ static const struct cpu_dev *this_cpu __cpuinitdata;
DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
#ifdef CONFIG_X86_64
commit 19cefdffbfe0f7e280f21e80875937e8700e99e2
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Mar 15 06:03:11 2009 +0100
lockdep: annotate reclaim context (__GFP_NOFS), fix SLOB
Impact: build fix
fix typo in mm/slob.c:
mm/slob.c:469: error: ‘flags’ undeclared (first use in this function)
mm/slob.c:469: error: (Each undeclared identifier is reported only once
mm/slob.c:469: error: for each function it appears in.)
Cc: Nick Piggin <npiggin@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090128135457.350751756@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/mm/slob.c b/mm/slob.c
index 1264799df5d1..4b1c0c1d63cb 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -464,7 +464,7 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
unsigned int *m;
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
- lockdep_trace_alloc(flags);
+ lockdep_trace_alloc(gfp);
if (size < PAGE_SIZE - align) {
if (!size)
commit 5a3c8fe7353f78b73b9636353c6f7b881f19ebea
Author: Ingo Molnar <mingo@elte.hu>
Date: Mon Mar 30 16:14:40 2009 +0200
Revert "cpuacct: reduce one NULL check in fast-path"
This reverts commit 7a46c594bf7f1f2eeb1e12d4b857d5f581957a92.
This was applied to the x86 tree mistakenly, it belongs into the
scheduler tree.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/kernel/sched.c b/kernel/sched.c
index 2246591f3711..f4c413bdd38d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -10001,11 +10001,10 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime)
cpu = task_cpu(tsk);
ca = task_ca(tsk);
- do {
+ for (; ca; ca = ca->parent) {
u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
*cpuusage += cputime;
- ca = ca->parent;
- } while (ca);
+ }
}
struct cgroup_subsys cpuacct_subsys = {
commit a2bcd4731f77cb77ae4b5e4a3d7f5471cf346c33
Author: Ingo Molnar <mingo@elte.hu>
Date: Sun Mar 29 23:47:48 2009 +0200
x86/mm: further cleanups of fault.c's include file section
Impact: cleanup
Eliminate more than 20 unnecessary #include lines in fault.c
Also fix include file dependency bug in asm/traps.h. (this was
masked before, by implicit inclusion)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <tip-56aea8468746e673a4bf50b6a13d97b2d1cbe1e8@git.kernel.org>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index 0d5342515b86..37fb07a9cda0 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -2,6 +2,7 @@
#define _ASM_X86_TRAPS_H
#include <asm/debugreg.h>
+#include <asm/siginfo.h> /* TRAP_TRACE, ... */
#ifdef CONFIG_X86_32
#define dotraplinkage
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index a03b7279efa0..24a36a6426ab 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -3,40 +3,16 @@
* Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs.
* Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar
*/
-#include <linux/interrupt.h>
-#include <linux/mmiotrace.h>
-#include <linux/bootmem.h>
-#include <linux/compiler.h>
-#include <linux/highmem.h>
-#include <linux/kprobes.h>
-#include <linux/uaccess.h>
-#include <linux/vmalloc.h>
-#include <linux/vt_kern.h>
-#include <linux/signal.h>
-#include <linux/kernel.h>
-#include <linux/ptrace.h>
-#include <linux/string.h>
-#include <linux/module.h>
-#include <linux/kdebug.h>
-#include <linux/errno.h>
-#include <linux/magic.h>
-#include <linux/sched.h>
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/mman.h>
-#include <linux/tty.h>
-#include <linux/smp.h>
-#include <linux/mm.h>
-
-#include <asm-generic/sections.h>
-
-#include <asm/tlbflush.h>
-#include <asm/pgalloc.h>
-#include <asm/segment.h>
-#include <asm/system.h>
-#include <asm/proto.h>
-#include <asm/traps.h>
-#include <asm/desc.h>
+#include <linux/magic.h> /* STACK_END_MAGIC */
+#include <linux/sched.h> /* test_thread_flag(), ... */
+#include <linux/kdebug.h> /* oops_begin/end, ... */
+#include <linux/module.h> /* search_exception_table */
+#include <linux/bootmem.h> /* max_low_pfn */
+#include <linux/kprobes.h> /* __kprobes, ... */
+#include <linux/mmiotrace.h> /* kmmio_handler, ... */
+
+#include <asm/traps.h> /* dotraplinkage, ... */
+#include <asm/pgalloc.h> /* pgd_*(), ... */
/*
* Page fault error code bits:
commit 38a6ed3ed8e108b662f4016a1ebf068dcf4c1ef4
Merge: f2d28a2ebcb5 7c730ccdc118
Author: Ingo Molnar <mingo@elte.hu>
Date: Sat Mar 28 23:34:14 2009 +0100
Merge branch 'linus' into core/printk