summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2008-05-01Merge commit 'sched-latest/latest'Stephen Rothwell
2008-05-01Merge commit 'x86-latest/latest'Stephen Rothwell
2008-05-01Merge commit 'semaphore-removal/semaphore-removal'Stephen Rothwell
Conflicts: drivers/atm/ambassador.c
2008-05-01Merge commit 'arm/devel'Stephen Rothwell
Conflicts: arch/arm/common/rtctime.c arch/arm/mach-integrator/time.c arch/arm/mach-pxa/zylonite.c
2008-05-01Merge commit 'vfs/vfs-2.6.25'Stephen Rothwell
2008-05-01Merge commit 'galak/powerpc-next'Stephen Rothwell
2008-05-01Merge branch 'quilt/m68k'Stephen Rothwell
2008-05-01Merge commit 'kvm/master'Stephen Rothwell
2008-05-01Merge commit 'sh/master'Stephen Rothwell
2008-05-01Merge branch 'quilt/driver-core'Stephen Rothwell
Conflicts: include/linux/io.h include/linux/klist.h lib/klist.c
2008-05-01Merge commit 'pci-current/for-linus'Stephen Rothwell
2008-05-01Merge commit 'sched-fixes/for-linus'Stephen Rothwell
2008-05-01m68k: Add multi_defconfigGeert Uytterhoeven
Add multi_defconfig, to build a kernel for all supported m68k platforms, excluding Sun 3 (Sun 3 kernels are incompatible with all other m68k platforms) Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-05-01m68k: Update defconfigsGeert Uytterhoeven
Update the m68k defconfigs Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-05-01m68k: Q40/Q60 floppy support is brokenGeert Uytterhoeven
Mark Q40/Q60 floppy support broken: arch/m68k/q40/q40ints.c: In function 'q40_irq_handler': arch/m68k/q40/q40ints.c:214: error: implicit declaration of function 'floppy_hardint' Including <asm/floppy.h> doesn't help, as it causes a lot of additional error messages (cfr. Sun 3x). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-05-01m68k: Correct jump if not running on HP300Geert Uytterhoeven
When running a HP300-enabled kernel on non-HP300 hardware, a test in the early startup code jumps to the wrong label, causing a double bus fault. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-05-01m68k: Kill CONFIG_WHIPPET_SERIALGeert Uytterhoeven
The Hisoft Whippet PCMCIA serial driver has been removed a long time ago, but it's Kconfig symbol still existed. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2008-05-01sysfs: crash debuggingAndrew Morton
Print the name of the last-accessed sysfs file when we oops, to help track down oopses which occur in sysfs store/read handlers. Because these oopses tend to not leave any trace of the offending code in the stack traces. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-01PM: Introduce new top level suspend and hibernation callbacksRafael J. Wysocki
Introduce 'struct pm_ops' and 'struct pm_ext_ops' ('ext' meaning 'extended') representing suspend and hibernation operations for bus types, device classes, device types and device drivers. Modify the PM core to use 'struct pm_ops' and 'struct pm_ext_ops' objects, if defined, instead of the ->suspend(), ->resume(), ->suspend_late(), and ->resume_early() callbacks (the old callbacks will be considered as legacy and gradually phased out). The main purpose of doing this is to separate suspend (aka S2RAM and standby) callbacks from hibernation callbacks in such a way that the new callbacks won't take arguments and the semantics of each of them will be clearly specified.  This has been requested for multiple times by many people, including Linus himself, and the reason is that within the current scheme if ->resume() is called, for example, it's difficult to say why it's been called (ie. is it a resume from RAM or from hibernation or a suspend/hibernation failure etc.?). The second purpose is to make the suspend/hibernation callbacks more flexible so that device drivers can handle more than they can within the current scheme. For example, some drivers may need to prevent new children of the device from being registered before their ->suspend() callbacks are executed or they may want to carry out some operations requiring the availability of some other devices, not directly bound via the parent-child relationship, in order to prepare for the execution of ->suspend(), etc. Ultimately, we'd like to stop using the freezing of tasks for suspend and therefore the drivers' suspend/hibernation code will have to take care of the handling of the user space during suspend/hibernation. That, in turn, would be difficult within the current scheme, without the new ->prepare() and ->complete() callbacks. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-30immediate values: jump livelinessMathieu Desnoyers
Check for limited liveliness of ZF and %eax in the search pattern. Declare a 5-bytes mov in the inline assembly stub and change it for a 5-bytes jump. We would not want to modify an instruction which gcc reuses for other purposes (it could jump in the middle of the pattern), but changing our own mov is ok, because we know that liveliness of %eax is limited to our pattern (mov, test, branch). It is therefore OK to change: mov, test, cond. branch for jump, test, cond. branch Where jump has the same behavior as the conditional branch. It applies on top of the Immediate Values - jump patch. (should be folded with that patch). Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Scheduler Profiling - Use Immediate ValuesMathieu Desnoyers
Use immediate values with lower d-cache hit in optimized version as a condition for scheduler profiling call. Changelog : - Use imv_* instead of immediate_*. - Follow the white rabbit : kvm_main.c which becomes x86.c. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Adrian Bunk <bunk@stusta.de> CC: Andi Kleen <andi@firstfloor.org> CC: Christoph Hellwig <hch@infradead.org> CC: mingo@elte.hu CC: akpm@osdl.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Immediate Values - JumpMathieu Desnoyers
Adds a new imv_cond() macro to declare a byte read that is meant to be embedded in unlikely(imv_cond(var)), so the kernel can dynamically detect patterns such as mov, test, jne or mov, test, je and patch it with nops and a jump. Changelog: - fix !CONFIG_IMMEDIATE Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Immediate Values - Powerpc Optimization NMI MCE supportMathieu Desnoyers
Use an atomic update for immediate values. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Christoph Hellwig <hch@infradead.org> CC: Paul Mackerras <paulus@samba.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Immediate Values - x86 Optimization NMI and MCE supportMathieu Desnoyers
x86 optimization of the immediate values which uses a movl with code patching to set/unset the value used to populate the register used as variable source. It uses a breakpoint to bypass the instruction being changed, which lessens the interrupt latency of the operation and protects against NMIs and MCE. - More reentrant immediate value : uses a breakpoint. Needs to know the instruction's first byte. This is why we keep the "instruction size" variable, so we can support the REX prefixed instructions too. Changelog: - Change the immediate.c update code to support variable length opcodes. - Use text_poke_early with cr0 WP save/restore to patch the bypass. We are doing non atomic writes to a code region only touched by us (nobody can execute it since we are protected by the imv_mutex). - Add x86_64 support, ready for i386+x86_64 -> x86 merge. - Use asm-x86/asm.h. - Change the immediate.c update code to support variable length opcodes. - Use imv_* instead of immediate_*. - Use kernel_wp_disable/enable instead of save/restore. - Fix 1 byte immediate value so it declares its instruction size. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Andi Kleen <ak@muc.de> CC: "H. Peter Anvin" <hpa@zytor.com> CC: Chuck Ebbert <cebbert@redhat.com> CC: Christoph Hellwig <hch@infradead.org> CC: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Add __discard section to x86Mathieu Desnoyers
Add a __discard sectionto the linker script. Code produced in this section will not be put in the vmlinux file. This is useful when we have to calculate the size of an instruction before actually declaring it (for alignment purposes for instance). This is used by the immediate values. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: H. Peter Anvin <hpa@zytor.com> CC: Andi Kleen <ak@muc.de> CC: Chuck Ebbert <cebbert@redhat.com> CC: Christoph Hellwig <hch@infradead.org> CC: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Immediate Values - Powerpc OptimizationMathieu Desnoyers
PowerPC optimization of the immediate values which uses a li instruction, patched with an immediate value. Changelog: - Put imv_set and _imv_set in the architecture independent header. - Pack the __imv section. Use smallest types required for size (char). - Remove architecture specific update code : now handled by architecture agnostic code. - Use imv_* instead of immediate_*. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Christoph Hellwig <hch@infradead.org> CC: Paul Mackerras <paulus@samba.org> CC: Adrian Bunk <bunk@stusta.de> CC: Andi Kleen <andi@firstfloor.org> CC: mingo@elte.hu CC: akpm@osdl.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Immediate Values - x86 OptimizationMathieu Desnoyers
x86 optimization of the immediate values which uses a movl with code patching to set/unset the value used to populate the register used as variable source. Note : a movb needs to get its value froma =q constraint. Quoting "H. Peter Anvin" <hpa@zytor.com> Using =r for single-byte values is incorrect for 32-bit code -- that would permit %spl, %bpl, %sil, %dil which are illegal in 32-bit mode. Changelog: - Use text_poke_early with cr0 WP save/restore to patch the bypass. We are doing non atomic writes to a code region only touched by us (nobody can execute it since we are protected by the imv_mutex). - Put imv_set and _imv_set in the architecture independent header. - Use $0 instead of %2 with (0) operand. - Add x86_64 support, ready for i386+x86_64 -> x86 merge. - Use asm-x86/asm.h. - Bugfix : 8 bytes 64 bits immediate value was declared as "4 bytes" in the immediate structure. - Change the immediate.c update code to support variable length opcodes. - Vastly simplified, using a busy looping IPI with interrupts disabled. Does not protect against NMI nor MCE. - Pack the __imv section. Use smallest types required for size (char). - Use imv_* instead of immediate_*. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: Andi Kleen <ak@muc.de> CC: "H. Peter Anvin" <hpa@zytor.com> CC: Chuck Ebbert <cebbert@redhat.com> CC: Christoph Hellwig <hch@infradead.org> CC: Jeremy Fitzhardinge <jeremy@goop.org> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Adrian Bunk <bunk@stusta.de> CC: akpm@osdl.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30Kprobes - do not use kprobes mutex in arch codeMathieu Desnoyers
Remove the kprobes mutex from kprobes.h, since it does not belong there. Also remove all use of this mutex in the architecture specific code, replacing it by a proper mutex lock/unlock in the architecture agnostic code. Changelog : - remove unnecessary kprobe_mutex around arch_remove_kprobe() Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Acked-by: Masami Hiramatsu <mhiramat@redhat.com> CC: anil.s.keshavamurthy@intel.com CC: davem@davemloft.net Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86 NMI-safe INT3 and Page FaultMathieu Desnoyers
Implements an alternative iret with popf and return so trap and exception handlers can return to the NMI handler without issuing iret. iret would cause NMIs to be reenabled prematurely. x86_32 uses popf and far return. x86_64 has to copy the return instruction pointer to the top of the previous stack, issue a popf, loads the previous esp and issue a near return (ret). It allows placing immediate values (and therefore optimized trace_marks) in NMI code since returning from a breakpoint would be valid. Accessing vmalloc'd memory, which allows executing module code or accessing vmapped or vmalloc'd areas from NMI context, would also be valid. This is very useful to tracers like LTTng. This patch makes all faults, traps and exception safe to be called from NMI context *except* single-stepping, which requires iret to restore the TF (trap flag) and jump to the return address in a single instruction. Sorry, no kprobes support in NMI handlers because of this limitation. We cannot single-step an NMI handler, because iret must set the TF flag and return back to the instruction to single-step in a single instruction. This cannot be emulated with popf/lret, because lret would be single-stepped. It does not apply to immediate values because they do not use single-stepping. This code detects if the TF flag is set and uses the iret path for single-stepping, even if it reactivates NMIs prematurely. Test to detect if nested under a NMI handler is only done upon the return from trap/exception to kernel, which is not frequent. Other return paths (return from trap/exception to userspace, return from interrupt) keep the exact same behavior (no slowdown). Depends on : change-alpha-active-count-bit.patch change-avr32-active-count-bit.patch TODO : test with lguest, xen, kvm. ** This patch depends on the "Stringify support commas" patchset ** ** Also depends on fix-x86_64-page-fault-scheduler-race patch ** tested on x86_32 (tests implemented in a separate patch) : - instrumented the return path to export the EIP, CS and EFLAGS values when taken so we know the return path code has been executed. - trace_mark, using immediate values, with 10ms delay with the breakpoint activated. Runs well through the return path. - tested vmalloc faults in NMI handler by placing a non-optimized marker in the NMI handler (so no breakpoint is executed) and connecting a probe which touches every pages of a 20MB vmalloc'd buffer. It executes trough the return path without problem. - Tested with and without preemption tested on x86_64 - instrumented the return path to export the EIP, CS and EFLAGS values when taken so we know the return path code has been executed. - trace_mark, using immediate values, with 10ms delay with the breakpoint activated. Runs well through the return path. To test on x86_64 : - Test without preemption - Test vmalloc faults - Test on Intel 64 bits CPUs. (AMD64 was fine) Changelog since v1 : - x86_64 fixes. Changelog since v2 : - fix paravirt build Changelog since v3 : - Include modifications suggested by Jeremy Changelog since v4 : - including hardirq.h in entry_32/64.S is a bad idea (non ifndef'd C code), define HARDNMI_MASK in the .S files directly. Changelog since v5 : - Add HARDNMI_MASK to irq_count() and make die() more verbose for NMIs. Changelog since v7 : - Implement paravirtualized nmi_return. Changelog since v8 : - refreshed the patch for asm-offsets. Those were left out of v8. - now depends on "Stringify support commas" patch. Changelog since v9 : - Only test the nmi nested preempt count flag upon return from exceptions, not on return from interrupts. Only the kernel return path has this test. - Add Xen, VMI, lguest support. Use their iret pavavirt ops in lieu of nmi_return. -- Ported to sched-devel.git Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: akpm@osdl.org CC: mingo@elte.hu CC: "H. Peter Anvin" <hpa@zytor.com> CC: Jeremy Fitzhardinge <jeremy@goop.org> CC: Steven Rostedt <rostedt@goodmis.org> CC: "Frank Ch. Eigler" <fche@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86_64 page fault NMI-safeMathieu Desnoyers
> I think you're vastly overestimating what is sane to do from an NMI > context. It is utterly and totally insane to assume vmalloc is available > in NMI. > > -hpa > Ok, please tell me where I am wrong then.. by looking into arch/x86/mm/fault.c, I see that vmalloc_sync_all() touches pgd_list entries while the pgd_lock spinlock is taken, with interrupts disabled. So it's protected against concurrent pgd_list modification from a - vmalloc_sync_all() on other CPUs b - local interrupts However, a completely normal interrupt can come on a remote CPU, run vmalloc_fault() and issue a set_pgd concurrently. Therefore I conclude this interrupt disable is not there to insure any kind of protection against concurrent updates. Also, we see that vmalloc_fault has comments such as : (for x86_32) * Do _not_ use "current" here. We might be inside * an interrupt in the middle of a task switch.. So it takes the pgd_addr from cr3, not from current. Using only the stack/registers makes this NMI-safe even if "current" is invalid when the NMI comes. This is caused by the fact that __switch_to will update the registers before updating current_task without disabling interrupts. You are right in that x86_64 does not seems to play as safely as x86_32 on this matter; it uses current->mm. Probably it shouldn't assume "current" is valid. Actually, I don't see where x86_64 disables interrupts around __switch_to, so this would seem to be a race condition. Or have I missed something ? (Ingo) > > the scheduler disables interrupts around __switch_to(). (x86 does > > not set __ARCH_WANT_INTERRUPTS_ON_CTXSW) > (Mathieu) > Ok, so I guess it's only useful to NMIs then. However, it makes me > wonder why this comment was there in the first place on x86_32 > vmalloc_fault() and why it uses read_cr3() : > > * Do _not_ use "current" here. We might be inside > * an interrupt in the middle of a task switch.. (Ingo) hm, i guess it's still useful to keep the __ARCH_WANT_INTERRUPTS_ON_CTXSW case working too. On -rt we used to enable it to squeeze a tiny bit more latency out of the system. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> CC: akpm@osdl.org CC: mingo@elte.hu CC: "H. Peter Anvin" <hpa@zytor.com> CC: Jeremy Fitzhardinge <jeremy@goop.org> CC: Steven Rostedt <rostedt@goodmis.org> CC: "Frank Ch. Eigler" <fche@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30rcu: split list h and move rcu protected lists into rculist.h ,fixIngo Molnar
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30rcu: split list.h and move rcu-protected lists into rculist.hFranck Bui-Huu
Move rcu-protected lists from list.h into a new header file rculist.h. This is done because list are a very used primitive structure all over the kernel and it's currently impossible to include other header files in this list.h without creating some circular dependencies. For example, list.h implements rcu-protected list and uses rcu_dereference() without including rcupdate.h. It actually compiles because users of rcu_dereference() are macros. Others RCU functions could be used too but aren't probably because of this. Therefore this patch creates rculist.h which includes rcupdates without to many changes/troubles. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Josh Triplett <josh@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30genirq: system set irq affinitiesPeter Zijlstra
Keep the affinity of unbound IRQs within the system set. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30Merge branch 'latest' of /home/mingo/linux-2.6-x86 into latestIngo Molnar
2008-04-30mmiotrace: rename kmmio_probe::user_data to :private.Pekka Paalanen
Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86 mmiotrace: use resource_size_t for phys addressesPekka Paalanen
Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86 mmiotrace: fix page-unaligned ioremapsPekka Paalanen
mmiotrace_ioremap() expects to receive the original unaligned map phys address and size. Also fix {un,}register_kmmio_probe() to deal properly with unaligned size. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30mmiotrace: code style cleanupsPekka Paalanen
From c2da03771e29159627c5c7b9509ec70bce9f91ee Mon Sep 17 00:00:00 2001 From: Pekka Paalanen <pq@iki.fi> Date: Mon, 28 Apr 2008 21:25:22 +0300 Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86 mmiotrace: dynamically disable non-boot CPUsPekka Paalanen
From 8979ee55cb6a429c4edd72ebec2244b849f6a79a Mon Sep 17 00:00:00 2001 From: Pekka Paalanen <pq@iki.fi> Date: Sat, 12 Apr 2008 00:18:57 +0300 Mmiotrace is not reliable with multiple CPUs and may miss events. Drop to single CPU when mmiotrace is activated. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86: fix SMP alternatives: use mutex instead of spinlock, text_poke is sleepablePekka Paalanen
text_poke is sleepable. The original fix by Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86_64: fix kernel rodata NX settingPekka Paalanen
Without CONFIG_DYNAMIC_FTRACE, mark_rodata_ro() would mark a wrong number of pages as no-execute. The bug was introduced in the patch "ftrace: dont write protect kernel text". The symptom was machine reboot after a CPU hotplug. Signed-off-by: Pekka Paalanen <pq@iki.fi> Acked-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-30x86/mmiotrace: uses/depends on PCIRandy Dunlap
Don't try to build mmiotrace when CONFIG_PCI=n. next-20080416/kernel/trace/trace_mmiotrace.c: In function 'mmio_print_pcidev': next-20080416/kernel/trace/trace_mmiotrace.c:62: error: implicit declaration of function 'pci_dev_driver' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30x86: fix printk formatRandy Dunlap
Fix gcc printk format warnings: next-20080415/arch/x86/mm/mmio-mod.c: In function 'print_pte': next-20080415/arch/x86/mm/mmio-mod.c:154: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'pteval_t' next-20080415/arch/x86/mm/mmio-mod.c:154: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'pteval_t' next-20080415/arch/x86/mm/mmio-mod.c: At top level: next-20080415/arch/x86/mm/mmio-mod.c:403: warning: 'downed_cpus' defined but not used Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30mmiotrace: add user documentationPekka Paalanen
Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30x86 mmiotrace: remove ISA_trace parameter.Pekka Paalanen
This had become a no-op. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30x86 mmiotrace: move files into arch/x86/mm/.Pekka Paalanen
Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30mmiotrace: cleanupIngo Molnar
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30ftrace: mmiotrace update, #2Pekka Paalanen
another weekend, another patch. This should apply on top of my previous patch from March 23rd. Summary of changes: - Print PCI device list in output header - work around recursive probe hits on SMP - refactor dis/arm_kmmio_fault_page() and add check for page levels - remove un/reference_kmmio(), the die notifier hook is registered permanently into the list - explicitly check for single stepping in die notifier callback I have tested this version on my UP Athlon64 desktop with Nouveau, and SMP Core 2 Duo laptop with the proprietary nvidia driver. Both systems are 64-bit. One previously unknown bug crept into daylight: the ftrace framework's output routines print the first entry last after buffer has wrapped around. The most important regressions compared to non-ftrace mmiotrace at this time are: - failure of trace_pipe file - illegal lines in output file - unaware of losing data due to buffer full Personally I'd like to see these three solved before submitting to mainline. Other issues may come up once we know when we lose events. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30ftrace: mmiotrace, updatesPekka Paalanen
here is a patch that makes mmiotrace work almost well within the tracing framework. The patch applies on top of my previous patch. I have my own output formatting in place now. Summary of changes: - fix the NULL dereference that was due to not calling tracing_reset() - add print_line() callback into struct tracer - implement print_line() for mmiotrace, producing up-to-spec text - add my output header, but that is not really called in the right place - rewrote the main structs in mmiotrace - added two new trace entry types: TRACE_MMIO_RW and TRACE_MMIO_MAP - made some functions in trace.c non-static - check current==NULL in tracing_generic_entry_update() - fix(?) comparison in trace_seq_printf() Things seem to work fine except a few issues. Markers (text lines injected into mmiotrace log) are missing, I did not feel hacking them in before we have variable length entries. My output header is printed only for 'trace' file, but not 'trace_pipe'. For some reason, despite my quick fix, iter->trace is NULL in print_trace_line() when called from 'trace_pipe' file, which means I don't get proper output formatting. I only tried by loading nouveau.ko, which just detects the card, and that is traced fine. I didn't try further. Map, two reads and unmap. Works perfectly. I am missing the information about overflows, I'd prefer to have a counter for lost events. I didn't try, but I guess currently there is no way of knowning when it overflows? So, not too far from being fully operational, it seems :-) And looking at the diffstat, there also is some 700-900 lines of user space code that just became obsolete. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30ftrace: add mmiotrace pluginPekka Paalanen
On Sat, 22 Mar 2008 13:07:47 +0100 Ingo Molnar <mingo@elte.hu> wrote: > > > i'd suggest the following: pull x86.git and sched-devel.git into a > > > single tree [the two will combine without rejects]. Then try to add a > > > kernel/tracing/trace_mmiotrace.c ftrace plugin. The trace_sysprof.c > > > plugin might be a good example. > > > > I did this and now I have mmiotrace enabled/disabled via the tracing > > framework (what do we call this, since ftrace is one of the tracers?). > > cool! could you send the patches for that? (even if they are not fully > functional yet) Patch attached in the end. Nice to see how much code disappeared. I tried to mark all the features I had to break with XXX-comments. Signed-off-by: Ingo Molnar <mingo@elte.hu>