From: Linus Torvalds Date: Sun, 5 Apr 2009 18:04:19 +0000 (-0700) Subject: Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git... X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=714f83d5d9f7c785f622259dad1f4fad12d64664;p=linux-2.6-omap-h63xx.git Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (413 commits) tracing, net: fix net tree and tracing tree merge interaction tracing, powerpc: fix powerpc tree and tracing tree interaction ring-buffer: do not remove reader page from list on ring buffer free function-graph: allow unregistering twice trace: make argument 'mem' of trace_seq_putmem() const tracing: add missing 'extern' keywords to trace_output.h tracing: provide trace_seq_reserve() blktrace: print out BLK_TN_MESSAGE properly blktrace: extract duplidate code blktrace: fix memory leak when freeing struct blk_io_trace blktrace: fix blk_probes_ref chaos blktrace: make classic output more classic blktrace: fix off-by-one bug blktrace: fix the original blktrace blktrace: fix a race when creating blk_tree_root in debugfs blktrace: fix timestamp in binary output tracing, Text Edit Lock: cleanup tracing: filter fix for TRACE_EVENT_FORMAT events ftrace: Using FTRACE_WARN_ON() to check "freed record" in ftrace_release() x86: kretprobe-booster interrupt emulation code fix ... Fix up trivial conflicts in arch/parisc/include/asm/ftrace.h include/linux/memory.h kernel/extable.c kernel/module.c --- 714f83d5d9f7c785f622259dad1f4fad12d64664 diff --cc include/linux/memory.h index 42767d1a62e,86a6c0f0518..37fa19b34ef --- a/include/linux/memory.h +++ b/include/linux/memory.h @@@ -99,15 -99,10 +99,21 @@@ enum mem_add_context { BOOT, HOTPLUG } #define hotplug_memory_notifier(fn, pri) do { } while (0) #endif +/* + * 'struct memory_accessor' is a generic interface to provide + * in-kernel access to persistent memory such as i2c or SPI EEPROMs + */ +struct memory_accessor { + ssize_t (*read)(struct memory_accessor *, char *buf, off_t offset, + size_t count); + ssize_t (*write)(struct memory_accessor *, const char *buf, + off_t offset, size_t count); +}; + + /* + * Kernel text modification mutex, used for code patching. Users of this lock + * can sleep. + */ + extern struct mutex text_mutex; + #endif /* _LINUX_MEMORY_H_ */ diff --cc kernel/extable.c index 81e99d1f0d5,b54a6017b6b..7f8f263f852 --- a/kernel/extable.c +++ b/kernel/extable.c @@@ -41,15 -52,7 +52,15 @@@ const struct exception_table_entry *sea return e; } +static inline int init_kernel_text(unsigned long addr) +{ + if (addr >= (unsigned long)_sinittext && + addr <= (unsigned long)_einittext) + return 1; + return 0; +} + - __notrace_funcgraph int core_kernel_text(unsigned long addr) + int core_kernel_text(unsigned long addr) { if (addr >= (unsigned long)_stext && addr <= (unsigned long)_etext) diff --cc kernel/module.c index f6e08b7cff7,41f50605eed..c268a771595 --- a/kernel/module.c +++ b/kernel/module.c @@@ -2753,31 -2744,29 +2753,31 @@@ const struct exception_table_entry *sea } /* - * Is this a valid module address? + * is_module_address - is this address inside a module? + * @addr: the address to check. + * + * See is_module_text_address() if you simply want to see if the address + * is code (not data). */ -int is_module_address(unsigned long addr) +bool is_module_address(unsigned long addr) { - struct module *mod; + bool ret; preempt_disable(); - - list_for_each_entry_rcu(mod, &modules, list) { - if (within_module_core(addr, mod)) { - preempt_enable(); - return 1; - } - } - + ret = __module_address(addr) != NULL; preempt_enable(); - return 0; + return ret; } - -/* Is this a valid kernel address? */ -struct module *__module_text_address(unsigned long addr) +/* + * __module_address - get the module which contains an address. + * @addr: the address. + * + * Must be called with preempt disabled or module mutex held so that + * module doesn't get freed during this. + */ - __notrace_funcgraph struct module *__module_address(unsigned long addr) ++struct module *__module_address(unsigned long addr) { struct module *mod;