aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-10-30ftrace: nmi safe code modificationSteven Rostedt1-0/+5
Impact: fix crashes that can occur in NMI handlers, if their code is modified Modifying code is something that needs special care. On SMP boxes, if code that is being modified is also being executed on another CPU, that CPU will have undefined results. The dynamic ftrace uses kstop_machine to make the system act like a uniprocessor system. But this does not address NMIs, that can still run on other CPUs. One approach to handle this is to make all code that are used by NMIs not be traced. But NMIs can call notifiers that spread throughout the kernel and this will be very hard to maintain, and the chance of missing a function is very high. The approach that this patch takes is to have the NMIs modify the code if the modification is taking place. The way this works is that just writing to code executing on another CPU is not harmful if what is written is the same as what exists. Two buffers are used: an IP buffer and a "code" buffer. The steps that the patcher takes are: 1) Put in the instruction pointer into the IP buffer and the new code into the "code" buffer. 2) Set a flag that says we are modifying code 3) Wait for any running NMIs to finish. 4) Write the code 5) clear the flag. 6) Wait for any running NMIs to finish. If an NMI is executed, it will also write the pending code. Multiple writes are OK, because what is being written is the same. Then the patcher must wait for all running NMIs to finish before going to the next line that must be patched. This is basically the RCU approach to code modification. Thanks to Ingo Molnar for suggesting the idea, and to Arjan van de Ven for his guidence on what is safe and what is not. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-23sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().Paul Mundt1-0/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.Paul Mundt1-0/+6
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23sh: sh7785 pinmux supportMagnus Damm1-0/+234
This patch implements pinmux tables for the sh7785 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22sh: improve pinmux support for single direction pinsMagnus Damm1-0/+1
This patch improves the support for gpio pins that are hard wired to either input or output and lack control register association. A special force enum id is used to allow use without control register but still mark the gpio pin as input or output. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Wire up oops reporting in the die notifier chain.Paul Mundt1-0/+1
Commit 3f5a54e371ca20b119b73704f6c01b71295c1714 ("ftrace: dump out ftrace buffers to console on panic") added an ftrace buffer dumper that hooks in to the die notifier chain and dumps out data in the oops path. Unfortunately SH supported ftrace but didn't support DIE_OOPS, so add that in and get it building again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.Paul Mundt1-0/+15
IRQ modes are not presently supported, so stub in dummy definitions for now (taken from linux/gpio.h). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.Paul Mundt1-4/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Move SH-4 CPU headers down one more level.Paul Mundt2-0/+0
These accidentally got placed in to cpu-sh4 instead of cpu-sh4/cpu, push them down one more level. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Migrate common board headers to mach-common/.Paul Mundt15-0/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Move the CPU definition headers from asm/ to cpu/.Paul Mundt4-0/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: reduce Migo-R smc91x overrunsMagnus Damm1-0/+2
Improve Migo-R ethernet performance by reducing smc91x overruns. This is done by enabling SMC91X_NOWAIT and optimizing CS4 setup. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Fix up some merge damage.Paul Mundt1-0/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6Paul Mundt1-2/+0
Conflicts: Documentation/kernel-parameters.txt arch/sh/include/asm/elf.h
2008-10-20sh: Add sh7720 pinmux codeMagnus Damm1-0/+174
This patch adds pinmux and gpio support for the sh7720 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Add sh7203 pinmux codeMagnus Damm1-0/+143
This patch adds pinmux and gpio support for the sh7203 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Add sh7723 pinmux codeMagnus Damm1-0/+254
This patch adds pinmux and gpio support for the sh7723 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: Add sh7722 pinmux codeMagnus Damm1-0/+210
This patch adds pinmux and gpio support for the sh7722 processor. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20sh: GPIO and pinmux base codeMagnus Damm1-2/+90
This patch adds gpio code together with the pinmux table parser. In the future we should optimize this and switch back to gpiolib. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-16[PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITYMartin Schwidefsky1-1/+1
The SET_PERSONALITY macro is always called with a second argument of 0. Remove the ibcs argument and the various tests to set the PER_SVR4 personality. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-10-04sh: More I/O routine overhauling.Paul Mundt3-175/+96
This tidies up a lot of the PIO/MMIO split. No in-tree platforms were making use of the MMIO overloading through the machvec (nor have any of them been in some time), so we just kill all of that off. The ISA I/O routine wrapping remains unaffected, which remains the only special casing outside of the iomap API that boards need to think about. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01video: sh_mobile_lcdcfb: Support HAVE_CLK=n configurations.Paul Mundt2-73/+1
This provides a workaround for users of sh_mobile_lcdcfb that don't define HAVE_CLK and have otherwise sane clock initialization. At the same time, move the sh_mobile_lcdc.h header to include/video/. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01sh: Move the shared INTC code out to drivers/sh/Paul Mundt1-90/+2
The INTC code will be re-used across different architectures, so move this out to drivers/sh/ and include/linux/sh_intc.h respectively. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-01sh: Fix up the __raw_read/writeX() definitions.Paul Mundt1-41/+36
These were doing largely bogus things and using the wrong typing for the address. Bring these in line with the ARM definitions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29sh: sh_ksyms_64 needs __strncpy_from_user() definition.Paul Mundt1-0/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-29sh: Fix up uaccess_64 put/get_user() cast warnings.Paul Mundt1-8/+16
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21sh: Add FPU registers to regset interface.Paul Mundt2-3/+22
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21sh: Add missing asm/ftrace.h.Paul Mundt1-0/+8
This was missed with the ftrace support commit.. check it in now. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21sh: Move lookup_exception_vector() out to asm/system_32.h.Paul Mundt1-0/+25
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>
2008-09-21sh: Add a few more definitions to asm/sizes.h.Paul Mundt1-0/+5
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-21sh: Copy in asm/sizes.h helper from ARM.Paul Mundt1-0/+56
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-20sh: Support kernel stacks smaller than a page.Paul Mundt1-18/+14
This follows the powerpc commit f6a616800e68b61807d0f7bb0d5dc70665ef8046 '[POWERPC] Fix kernel stack allocation alignment'. SH has traditionally forced the thread order to be relative to the page size, so there were never any situations where the same bug was triggered by slub. Regardless, the usage of > 8kB stacks for the larger page sizes is overkill, so we switch to using slab allocations there, as per the powerpc change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17sh: Fix up headers_check regression.Paul Mundt1-3/+0
linux/mmzone.h isn't exported, kill it off from asm/setup.h and simply deal with it in the places that have a dependency instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-17sh: Consolidate struct sh_cpuinfo definitions across _32/_64 split.Paul Mundt3-61/+39
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12sh: Tidy up ELF core dumps.Paul Mundt1-6/+0
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>
2008-09-12sh: Add DSP registers to regset interface.Paul Mundt2-3/+5
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12sh: Fix up NUMA build error with se7722_defconfig.Paul Mundt2-1/+3
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12sh: Provide the asm/syscall.h interface, needed by tracehook.Paul Mundt3-0/+126
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12sh: provide user_stack_pointer(), needed for tracehook support.Paul Mundt2-0/+4
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12sh: ioremap_prot support.Paul Mundt3-0/+5
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-12sh: ptrace: Introduce user_regset interface for gp regs.Paul Mundt2-1/+16
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: kprobes: Use trapa #0x3a for breakpoint trap.Paul Mundt1-1/+1
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>
2008-09-08sh: kprobes: Hook up kprobe_fault_handler() in the page fault path.Paul Mundt1-2/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: Add kprobes support.Chris Smith1-0/+59
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>
2008-09-08sh: early cached_to_uncached initialization.Stuart Menefy1-1/+2
statically initialise the cached_to_uncached offset, so that we can use it immediatly. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: fixup many sparse errors.Paul Mundt13-6/+151
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: generic clockevent broadcast support.Paul Mundt1-0/+3
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>
2008-09-08sh: smp: Hook up a timer IPI stub.Paul Mundt1-6/+13
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: smp: Hook in to the generic IPI handler for SH-X3 SMP.Paul Mundt1-2/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-09-08sh: smp: Provide a generic IPI handler.Paul Mundt1-0/+1
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>