aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge branches 'sh/ftrace' and 'sh/stable-updates'Paul Mundt2009-07-115-2/+127
|\ \
| * | sh: Mark __switch_to() as __notrace_funcgraphMatt Fleming2009-07-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Annotate __switch_to() so that the function graph tracer does not try to trace it. Use __notrace_funcgraph, as opposed to notrace, so that other tracers can continue to trace __switch_to(). The reason that we don't want to trace __switch_to() with the function graph tracer is because of how the return address stack in task_struct is implemented. When we enter __switch_to we store the real return address on prev's ret_stack. When we return from __switch_to() we've patched the return address on the kernel stack to be return_to_handler. Calling return_to_handler we do, -> ftrace_return_to_handler() -> ftrace_pop_return_ftrace() Which tries to pop the real return address from current->ret_stack. The problem being that we stored the return address on prev->ret_stack, but current now points to next, and next->ret_stack doesn't contain the correct return address (and is possibly even empty). Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Function graph tracer supportMatt Fleming2009-07-113-0/+123
| | | | | | | | | | | | | | | | | | | | | Add both dynamic and static function graph tracer support for sh. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Provide diagnostic kernel stack checksMatt Fleming2009-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable kernel stack checking code in both the dynamic ftrace and mcount code paths. Check the stack to see if it's overflowing and make sure that the stack pointer contains an address that's either in init_stack or after the bss. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Clean up linker script using new linker script macros.Tim Abbott2009-07-101-76/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the sh architecture to use the new linker script macros in include/asm-generic/vmlinux.lds.h. Signed-off-by: Tim Abbott <tabbott@ksplice.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | Merge branches 'sh/ftrace' and 'sh/cachetlb'Paul Mundt2009-07-0610-62/+440
|\ \ \ | |/ / |/| |
| | |
| | \
| *-. \ Merge branches 'sh/hwblk', 'sh/cpuidle' and 'sh/stable-updates'Paul Mundt2009-07-059-43/+388
| |\ \ \ | | | |/
| | * | sh: cpuidle for SuperH Mobile using hwblkMagnus Damm2009-07-053-13/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds cpuidle support for SuperH Mobile. The sleep mode selected by cpuidle is compared with the mode selected by the hwblk sleep code and the best allowed mode is entered. At this point "Sleep mode" and "Sleep mode + SF" are supported. This code can easily be extended to support "Software suspend mode", but the assembly code must first be updated to avoid loosing interrupts. Also, update the code to only copy the assembly snippet into internal memory once at bootup. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: hwblk for sh7722Magnus Damm2009-07-053-29/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the sh7722 specific hwblk implementation. Hwblk ids are added to the processor specific header file, module stop bits and areas are kept track of as hwblks, clocks are converted to make use of the shared hwblk code. Code to determine allowed sleep modes is also added. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: hwblk base implementationMagnus Damm2009-07-053-1/+133
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the hwblk base implementation, containing structures and shared functions dealing with hardware blocks. A each processor model should provide a list of hwblks and describe which module stop bit that is associated with each hwblck and how the hwblks are grouped together into areas. The shared code keeps track of the usage count for each hwblk and the areas. Fallback implementations for processor specific code are also kept as weak symbols. The clock framework, the runtime pm code and cpuidle will all tie into this hwblk implementation. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Use bootmem ontop of lmbMatt Fleming2009-07-031-19/+52
| |/ | | | | | | | | | | | | Rework the bootmem allocator to use the lmb framework. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add ftrace syscall tracing supportMatt Fleming2009-07-064-5/+90
|/ | | | | | | | | Now that I've added TIF_SYSCALL_FTRACE the thread flags do not fit into a single byte any more. Code testing them now needs to be aware of the upper and lower bytes. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: SH7786 SMP support.Paul Mundt2009-06-232-23/+12
| | | | | | | | | SH7786 is roughly identical to SH-X3 proto SMP, though there are only 2 CPUs. This just wraps in to the existing SH-X3 SMP code with some minor changes for SH7786, including wiring up the IPIs properly, enabling IRQ_PER_CPU, and so forth. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Provide cpu_idle_wait() to fix up cpuidle/SMP build.Paul Mundt2009-06-231-1/+22
| | | | | | | Crib the x86 cpu_idle_wait() implementation and shove it in with the idle code, subsequently enabling ARCH_HAS_CPU_IDLE_WAIT. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds2009-06-1815-85/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (56 commits) sh: Fix declaration of __kernel_sigreturn and __kernel_rt_sigreturn sh: Enable soc-camera in ap325rxa/migor/se7724 defconfigs. sh: remove stray markers. sh: defconfig updates. sh: pci: Initial PCI-Express support for SH7786 Urquell board. sh: Generic HAVE_PERF_COUNTER support. SH: convert migor to soc-camera as platform-device SH: convert ap325rxa to soc-camera as platform-device soc-camera: unify i2c camera device platform data sh: add platform data for r8a66597-hcd in setup-sh7723 sh: add platform data for r8a66597-hcd in setup-sh7366 sh: x3proto: add platform data for r8a66597-hcd sh: highlander: add platform data for r8a66597-hcd sh: sh7785lcr: add platform data for r8a66597-hcd sh: turn off irqs when disabling CMT/TMU timers sh: use kzalloc() for cpg clocks sh: unbreak WARN_ON() sh: Use generic atomic64_t implementation. sh: Revised clock function in highlander sh: Update r7780mp defconfig ...
| * sh: Fix declaration of __kernel_sigreturn and __kernel_rt_sigreturnMatt Fleming2009-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 4.5.0 complains about the declaration of variables __kernel_sigreturn and __kernel_rt_sigreturn because they have type void. Correctly declare these symbols as functions to fix the following error, arch/sh/kernel/signal_32.c: In function 'setup_frame': arch/sh/kernel/signal_32.c:368:14: error: taking address of expression of type 'void' arch/sh/kernel/signal_32.c: In function 'setup_rt_frame': arch/sh/kernel/signal_32.c:452:14: error: taking address of expression of type 'void' make[1]: *** [arch/sh/kernel/signal_32.o] Error 1 make: *** [arch/sh/kernel] Error 2 Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: remove stray markers.Christoph Hellwig2009-06-183-10/+1
| | | | | | | | | | | | | | | | | | | | arch/sh has a couple of stray markers without any users introduced in commit 3d58695edbfac785161bf282dc11fd42a483d6c9. Remove them in preparation of removing the markers in favour of the TRACE_EVENT macro (and also because we don't keep dead code around). Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| *---. Merge branches 'sh/pci-express-integration', 'sh/rsk-updates', ↵Paul Mundt2009-06-173-8/+14
| |\ \ \ | | | | | | | | | | | | | | | 'sh/platform-updates' and 'sh/perf_counter'
| | | | * sh: add platform data for r8a66597-hcd in setup-sh7723Yoshihiro Shimoda2009-06-171-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and remove redundant parameter for r8a66597-hcd. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | | | * sh: add platform data for r8a66597-hcd in setup-sh7366Yoshihiro Shimoda2009-06-171-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and remove redundant parameter for r8a66597-hcd. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: use kzalloc() for cpg clocksMagnus Damm2009-06-171-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the shared clock cpg code from bootmem to slab. Without this patch the current bootmem code triggers WARN_ON() because the slab is available. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | | sh: unbreak WARN_ON()Magnus Damm2009-06-171-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix WARN_ON() by modifying the bug trap handling code to always return in the in-kernel instruction pointer case. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: Convert sh64 to use the generic checksum code.Paul Mundt2009-06-151-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This plugs in GENERIC_CSUM support on sh64, and kills off all of the old references. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | Merge branch 'master' of ↵Paul Mundt2009-06-141-2/+0
| |\ \ \ | | |/ / | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * | | sh: Bump the earlytimer probe devices up.Paul Mundt2009-06-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently the earlytimer probe handles the clockevents driver, which requires that the clockevents driver be registered first. This bumps it up by 1 to include the clocksource device, which can be safely ignored if it doesn't exist, as we will simply error out on that path and defer to the jiffies clocksource. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: Use generic sched_clock().Paul Mundt2009-06-141-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic sched_clock() handles INITIAL_JIFFIES now as well, so we can just use that instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: Bump the earlytimer bits back to time_init().Paul Mundt2009-06-141-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were handled through late_time_init due to kmalloc() and friends not being available earlier on previously. Now with slab caches being available much earlier, this is no longer necessary, and we can move the initialization up to an earlier point. One of the benefits with this is that printk times are available a bit earlier! Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | cpumask: Use accessors for cpu_*_mask: shRusty Russell2009-06-142-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the accessors rather than frobbing bits directly (the new versions are const). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | cpumask: arch_send_call_function_ipi_mask: shRusty Russell2009-06-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(), and by defining it, the old arch_send_call_function_ipi is defined by the core code. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | sh: Wire up sys_perf_counter_open.Paul Mundt2009-06-122-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | | Merge branch 'sh/ftrace' of git://github.com/mfleming/linux-2.6Paul Mundt2009-06-121-30/+30
| |\ \ \
| | * | | sh: Fix dynamic ftrace's NOP action.Matt Fleming2009-06-111-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ftrace on sh handles nop'ing out trace function calls differently than other architectures. Instead of inserting NOP instructions in place of the call to the function tracer we branch over the call instructions and continue executing the main body of the function. This patch fixes a bug in the implementation of ftrace_modify_code() where we check that the old value of the code we're about to replace is an expected one. In the ftrace_make_call() code path ftrace_modify_code() was comparing the old instruction value with NOP instructions. The compare was failing because we never actually insert NOP instructions. It makes sense to just get rid of the NOP instructions in ftrace_nop and compare the old code with the address of the function body if we're expecting ftrace to have nop'd out the function trace call. Signed-off-by: Matt Fleming <matt@console-pimps.org>
| | * | | sh: Update my email addressMatt Fleming2009-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use my current email address as my gentoo account will be closed at some point. Signed-off-by: Matt Fleming <matt@console-pimps.org>
* | | | | ptrace: remove PT_DTRACE from avr32, mn10300, parisc, s390, sh, xtensaOleg Nesterov2009-06-182-10/+0
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avr32, mn10300, parisc, s390, sh, xtensa: They never set PT_DTRACE, but clear it after do_execve(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: David Howells <dhowells@redhat.com> Acked-by: Kyle McMartin <kyle@mcmartin.ca> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Chris Zankel <chris@zankel.net> Acked-by: Roland McGrath <roland@redhat.com> Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | mm: consolidate init_mm definitionAlexey Dobriyan2009-06-161-3/+0
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * create mm/init-mm.c, move init_mm there * remove INIT_MM, initialize init_mm with C99 initializer * unexport init_mm on all arches: init_mm is already unexported on x86. One strange place is some OMAP driver (drivers/video/omap/) which won't build modular, but it's already wants get_vm_area() export. Somebody should look there. [akpm@linux-foundation.org: add missing #includes] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Cc: Americo Wang <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | module: cleanup FIXME comments about trimming exception table entries.Rusty Russell2009-06-121-2/+0
|/ / | | | | | | | | | | | | | | Everyone cut and paste this comment from my original one. We now do it generically, so cut the comments. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Amerigo Wang <amwang@redhat.com>
* | sh: Tie sparseirq in to Kconfig.Paul Mundt2009-06-111-5/+2
| | | | | | | | | | | | | | | | | | Now that the dependent patches are merged, we are ready to enable sparseirq support. This simply adds the Kconfig option, and then converts from the _cpu to the _node allocation routines to follow the upstream sparseirq API changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Wire up sys_rt_tgsigqueueinfo.Paul Mundt2009-06-112-0/+2
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Fix sys_pwritev() syscall table entry for sh32.Paul Mundt2009-06-111-1/+1
| | | | | | | | | | | | | | | | There was a typo here that had this as sys_writev() instead of sys_pwritev(), fix this up. sh64 got this right, as did the preadv() case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7724: Add JPU supportKuninori Morimoto2009-06-111-0/+31
| | | | | | | | | | | | Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Acked-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7724: INTC setting updateKuninori Morimoto2009-06-111-89/+82
| | | | | | | | | | | | | | This patch follows Rev 0.50 manual Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7722 clock framework rewriteMagnus Damm2009-06-111-659/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the sh7722 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. While at it, now when all SuperH Mobile processors are converted, fix CONFIG_SH_CLK_CPG_LEGACY to depend on CONFIG_ARCH_SHMOBILE. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7366 clock framework rewriteMagnus Damm2009-06-113-42/+213
| | | | | | | | | | | | | | | | | | | | This patch rewrites the sh7366 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7343 clock framework rewriteMagnus Damm2009-06-113-33/+213
| | | | | | | | | | | | | | | | | | | | This patch rewrites the sh7343 clock framework code. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7724 clock framework rewrite V3Magnus Damm2009-06-113-81/+248
| | | | | | | | | | | | | | | | | | | | | | This patch contains V3 of the sh7724 clock framework rewrite. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and fll are supported as input clocks to the pll. The div6 clocks are fed through a divide-by-3 block. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7723 clock framework rewrite V2Magnus Damm2009-06-113-57/+224
| | | | | | | | | | | | | | | | | | | | This patch contains V2 of the sh7723 clock framework rewrite. The new code makes use of the recently merged div4, div6 and mstp32 helper code. Both extal and dll are supported as input clocks to the pll. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: add enable()/disable()/set_rate() to div6 codeMagnus Damm2009-06-112-0/+63
| | | | | | | | | | | | | | | | | | | | This patch updates the div6 clock helper code to add support for enable(), disable() and set_rate() callbacks. Needed by the camera clock enabling board code on Migo-R. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: rework mode pin codeMagnus Damm2009-06-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch reworks the mode pin code to keep the pin definitions in one place. The mode pins values are now the value of the bit instead of bit number. With this patch in place the sh7785 header file contains mode pin comments. The sh7785 clock code and the sh7785lcr board code are updated to reflect the new shared mode pins. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clock div6 helper codeMagnus Damm2009-06-111-6/+65
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds div6 clock helper code. The div6 clocks are simply 6-bit divide-by-n modules where n is 1 to 64. Needed for vclk on sh7722, sh7723, sh7343 and sh7366. sh7724 needs this even more for vclk, fclka, fclkb, irdaclk and spuclk. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: clock div4 frequency table offset fixMagnus Damm2009-06-111-2/+3
| | | | | | | | | | | | | | | | | | This patch fixes the per clock offset calculation in sh_clk_div4_register(). Without this patch the offset to the frequency table for each clock is incorrect. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>