aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
Commit message (Collapse)AuthorAge
...
| * | sh: ftrace support.Paul Mundt2008-09-21
| | | | | | | | | | | | | | | | | | | | | This adds support for ftrace to SH. This only includes CONFIG_FTRACE, and does not handle dynamic ftrace presently. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Trivial trace_mark() instrumentation for core events.Paul Mundt2008-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements a few trace points across events that are deemed interesting. This implements a number of trace points: - The page fault handler / TLB miss - IPC calls - Kernel thread creation The original LTTng patch had the slow-path instrumented, which fails to account for the vast majority of events. In general placing this in the fast-path is not a huge performance hit, as we don't take page faults for kernel addresses. The other bits of interest are some of the other trap handlers, as well as the syscall entry/exit (which is better off being handled through the tracehook API). Most of the other trap handlers are corner cases where alternate means of notification exist, so there is little value in placing extra trace points in these locations. Based on top of the points provided both by the LTTng instrumentation patch as well as the patch shipping in the ST-Linux tree, albeit in a stripped down form. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Move lookup_exception_vector() out to asm/system_32.h.Paul Mundt2008-09-20
| | | | | | | | | | | | | | | | | | | | | | | | There are other places where we want to have access to the trap/exception number, so move out the lookup_exception_vector() helper. While we're at it, refactor it slightly to return the vector instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Fix up signal_64 conflicting handle_signal() definition.Paul Mundt2008-09-17
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Fix up fpu emu build.Paul Mundt2008-09-17
| | | | | | | | | | | | | | | | | | | | | The addition of the kprobes code pushed down a variable declaration, clean it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: latencytop support.Paul Mundt2008-09-12
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Tidy up ELF core dumps.Paul Mundt2008-09-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These have been using overrides for ELF_CORE_COPY_TASK_REGS and ELF_CORE_COPY_FPREGS while the generic versions can be used instead. Presently the pt_regs are also duplicated across elf_core_copy_regs() and elf_core_copy_task_regs(), this switches to simply copying out through elf_core_copy_regs() instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Check SR.DSP bit for DSP regset validity.Paul Mundt2008-09-12
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Add missing task_user_regset_view() definition.Paul Mundt2008-09-12
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Add DSP registers to regset interface.Paul Mundt2008-09-12
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Flag T-bit for syscall restart.Paul Mundt2008-09-12
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: ptrace: Introduce user_regset interface for gp regs.Paul Mundt2008-09-12
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: intc_prio_data() test before subtraction on unsignedroel kluin2008-09-09
| | | | | | | | | | | | | | | | | | | | | bit is unsigned, so test before subtraction Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: kretprobe_trampoline needs to be global.Paul Mundt2008-09-08
| | | | | | | | | | | | | | | | | | Needed by CONFIG_TRACING. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Derive calibrate_delay lpj from clk fwk.Paul Mundt2008-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All CPUs must have a sensible cpu_clk definition these days, which we can safely use for deriving the preset loops_per_jiffy. The only odd one out is SH-5, which hasn't been hammered in to the framework yet. Based on the ST patch. Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Carl Shaw <carl.shaw@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: __kprobes annotations and formatting cleanups.Paul Mundt2008-09-08
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: Fix up race against probe point removal.Paul Mundt2008-09-08
| | | | | | | | | | | | | | | | | | | | | Handle a corner case where another CPU or debugger removes the probe point from underneath us. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: Fix up a preemption imbalance on jprobe return.Paul Mundt2008-09-08
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: Default to NOTIFY_DONE for unhandled debug traps.Paul Mundt2008-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | Presently this is doing a force_sig() SIGTRAP, which is already taken care of in the generic code if no one asserts NOTIFY_STOP. Switch the default return to NOTIFY_DONE in the case of unhandled traps, so that the same trap may pass through to other users on the same die chain. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: Use trapa #0x3a for breakpoint trap.Paul Mundt2008-09-08
| | | | | | | | | | | | | | | | | | | | | Not all parts support trapa #0xff, so use something within the debug trap range that's accessible on all parts. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: kprobes: Hook up kprobe_fault_handler() in the page fault path.Paul Mundt2008-09-07
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Mark kretprobe_trampoline_holder static and __used.Paul Mundt2008-09-07
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Enable IRLM mode for SH7760 IRQ_MODE_IRQ.Luca Santini2008-09-07
| | | | | | | | | | | | | | | | | | | | | Follows the same setting as SH7750. Signed-off-by: Luca Santini <luca.santini@spesonline.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Add kprobes support.Chris Smith2008-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | Initial support for kprobes/kretprobes for 32-bit SH platforms. [ General cleanup and some rework for the kretprobe hash lock. -- PFM ] Signed-off-by: Chris Smith <chris.smith@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: fix the TMU code to allow a fully running NO_HZ systemFrancesco Virlinzi2008-09-07
| | | | | | | | | | | | | | | | | | | | | This patch fixes the TMU code to allow NO_HZ to work on sh Signed-off-by: Francesco Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Subnormal double to float conversionCarl Shaw2008-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the SH4 to convert a subnormal double into a float by catching the FPE and implementing the FCNVDS instruction in software. Signed-off-by: Carl Shaw <carl.shaw@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Fix an unusual memory initialisation error.Stuart Menefy2008-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a problems with the set up of Linux memory: - When reserving memory at boot time, the code previously reserved the bottom page of memory, and then from one page up to the end of the bootmap. This had the desired effect, but was strictly speaking wrong, as the one page was actually whatever CONFIG_ZERO_PAGE_OFFSET had been set to. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Fix up broken 32-bit initrd support.Stuart Menefy2008-09-07
| | | | | | | | | | | | | | | Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: fixup many sparse errors.Paul Mundt2008-09-07
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Display CPU information in show_regs().Paul Mundt2008-09-07
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Early dummy clockevent registration on boot CPU.Paul Mundt2008-09-07
| | | | | | | | | | | | | | | | | | | | | | | | The dummy timer needs to be registered on the boot CPU before the system timer clockevent is registered, or broadcasting doesn't work as advertized. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: smp: shove a cpu_relax() in the plat_start_cpu() busy loop.Paul Mundt2008-09-07
| | | | | | | | | | | | | | | | | | | | | Without this, certain versions of GCC will happily optimize the entire loop out. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: generic clockevent broadcast support.Paul Mundt2008-09-07
| | | | | | | | | | | | | | | | | | | | | | | | This hooks up GENERIC_CLOCKEVENTS_BROADCAST and a dummy local timer, which we call in to from the timer IPI when no other local timer is provided. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: smp: Hook up a timer IPI stub.Paul Mundt2008-09-07
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.Paul Mundt2008-09-07
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: smp: Provide a generic IPI handler.Paul Mundt2008-09-07
| | | | | | | | | | | | | | | | | | | | | This provides a generic smp_message_recv() routine (based on the PPC one), that IPI IRQs can wrap in to. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCOREVivek Goyal2008-10-20
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o elfcorehdr_addr is used by not only the code under CONFIG_PROC_VMCORE but also by the code which is not inside CONFIG_PROC_VMCORE. For example, is_kdump_kernel() is used by powerpc code to determine if kernel is booting after a panic then use previous kernel's TCE table. So even if CONFIG_PROC_VMCORE is not set in second kernel, one should be able to correctly determine that we are booting after a panic and setup calgary iommu accordingly. o So remove the assumption that elfcorehdr_addr is under CONFIG_PROC_VMCORE. o Move definition of elfcorehdr_addr to arch dependent crash files. (Unfortunately crash dump does not have an arch independent file otherwise that would have been the best place). o kexec.c is not the right place as one can Have CRASH_DUMP enabled in second kernel without KEXEC being enabled. o I don't see sh setup code parsing the command line for elfcorehdr_addr. I am wondering how does vmcore interface work on sh. Anyway, I am atleast defining elfcoredhr_addr so that compilation is not broken on sh. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Simon Horman <horms@verge.net.au> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | kernel/cpu.c: create a CPU_STARTING cpu_chain notifierManfred Spraul2008-09-08
|/ | | | | | | | | | | | | | | | | Right now, there is no notifier that is called on a new cpu, before the new cpu begins processing interrupts/softirqs. Various kernel function would need that notification, e.g. kvm works around by calling smp_call_function_single(), rcu polls cpu_online_map. The patch adds a CPU_STARTING notification. It also adds a helper function that sends the message to all cpu_chain handlers. Tested on x86-64. All other archs are untested. Especially on sparc, I'm not sure if I got it right. Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.Paul Mundt2008-09-05
| | | | | | Follows the SH change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.Carmelo Amoroso2008-09-05
| | | | | | | | | | | | | | | | This patch fixes a problem within the SH implementation of resume_kernel code, that implements in assembly the bulk of preempt_schedule_irq function without taking care of the extra code needed to handle the BKL preemptible. The patch basically consists of removing this asm code and calling the common C implementation (see kernel/sched.c) as other archs do. Another change is the missing 'cli' macro invocation at the beginning of the resume_kernel. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix semtimedop syscallYoshihiro Shimoda2008-08-28
| | | | | | | fix the problem that cannot work semtimedop system call. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix kexec entry point for crash kernelsMagnus Damm2008-08-28
| | | | | | | | | | | The crash kernel entry point is currently checked by the kexec kernel code and only physical addresses in the reserved memory window are accepted. This means that we can't pass P2 or P1 addresses as entry points in the case of crash kernels. This patch makes sure we can start crash kernels by adding support for physical address entry points. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: crash kernel resource fixMagnus Damm2008-08-28
| | | | | | | | | The reserved crash kernel memory range is currently missing from /proc/iomem. crashk_res is mistakenly setup after __add_active_range(). Reorder things to make sure the resource shows up in /proc/iomem. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix ptrace_64.c:user_disable_single_step()Adrian Bunk2008-08-25
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following compile error caused by commit c459dbf294b4a3d70490a468a7ca3907fb2c2f57 (sh: ptrace single stepping cleanups.): <-- snip --> ... CC arch/sh/kernel/ptrace_64.o arch/sh/kernel/ptrace_64.c: In function 'user_disable_single_step': arch/sh/kernel/ptrace_64.c:134: error: 'regs' undeclared (first use in this function) arch/sh/kernel/ptrace_64.c:134: error: (Each undeclared identifier is reported only once arch/sh/kernel/ptrace_64.c:134: error: for each function it appears in.) ... make[2]: *** [arch/sh/kernel/ptrace_64.o] Error 1 <-- snip --> Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: export sh7723 VEU as VEU2HMagnus Damm2008-08-11
| | | | | | | | Export sh7723 VEU hardware blocks as VEU2H. The sh7723 VEU2H differs a bit from the sh7722 VEU so use different names for our UIO devices. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.Yoshinori Sato2008-08-11
| | | | | | | | | | | | | | | | | | | | | | | | rsk7203_defconfig fails to build with the following error: <-- snip --> ... LD .tmp_vmlinux1 arch/sh/kernel/built-in.o:(__ksymtab+0xb8): undefined reference to `__udivsi3_i4i' arch/sh/kernel/built-in.o:(__ksymtab+0xc8): undefined reference to `__sdivsi3_i4i' make[1]: *** [.tmp_vmlinux1] Error 1 <-- snip --> That worked with 2.6.26, and these are far less undefined references than in the cases where libgcc was missing. [ These symbols are not defined on SH-2 versions of libgcc, so we have to special case the export there. - Paul ] Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Save NUMA node data in vmcore for crash dumps.Paul Mundt2008-08-04
| | | | | | | Presently the NUMA node data isn't saved on kexec. This implements a simple arch_crash_save_vmcoreinfo() for saving off the relevant data. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: module_alloc() should be using vmalloc_exec().Paul Mundt2008-08-04
| | | | | | | | SH-X2 extended mode TLB allows for toggling of the exec bit, so make sure we are using the right protection bits for module space there also. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up __bug_table handling in module loader.Paul Mundt2008-08-04
| | | | | | We should be calling in to the lib/bug.c module helpers, fix that up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up broken kerneldoc comments.Paul Mundt2008-08-03
| | | | | | These were completely unparseable, so fix them up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>