summaryrefslogtreecommitdiffstats
path: root/arch/sh
AgeCommit message (Collapse)AuthorFilesLines
2008-12-25[S390] arch_setup_additional_pages argumentsMartin Schwidefsky2-3/+2
arch_setup_additional_pages currently gets two arguments, the binary format descripton and an indication if the process uses an executable stack or not. The second argument is not used by anybody, it could be removed without replacement. What actually does make sense is to pass an indication if the process uses the elf interpreter or not. The glibc code will not use anything from the vdso if the process does not use the dynamic linker, so for statically linked binaries the architecture backend can choose not to map the vdso. Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-16sh: Disable GENERIC_HARDIRQS_NO__DO_IRQ for unconverted platforms.Paul Mundt1-0/+2
Presently limited to Cayman, Dreamcast, Microdev, and SystemH 7751. Re-enable it for everyone once these have been fixed up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13serial: sh-sci: Reorder the SCxTDR write after the TDxE clear.Paul Mundt1-1/+1
Under qemu there is a race between the TDxE read-and-clear and the SCxTDR write. While on hardware it can be gauranteed that the read-and-clear will happen prior to the character being written out, no such assumption can be made under emulation. As this path happens with IRQs off and the hardware itself doesn't care about the ordering, move the SCxTDR write until after the read-and-clear. Signed-off-by: Vladimir Prus <vladimir@codesourcery.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13sh: __copy_user function can corrupt the stack in case of exceptionStuart MENEFY1-3/+8
The __copy_user function can corrupt the stack in the case of a non-trivial length of data, and either of the first two move instructions cause an exception. This is because the fixup for these two instructions is mapped to the no_pop case, but these instructions execute after the stack is pushed. This change creates an explicit NO_POP exception mapping macro, and uses it for the two instructions executed in the trivial case where no stack pushes occur. More information at ST Linux bugzilla: https://bugzilla.stlinux.com/show_bug.cgi?id=4824 Signed-off-by: Dylan Reid <dylan_reid@bose.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13sh: Fixed the TMU0 reload value on resumeFrancesco VIRLINZI1-1/+1
This patch fixes the TMU0 interrupt frequency on suspend/resume. During the resume the kernel reprograms the TMU0.ClockEvent mode but if the mode is periodic than the TMU0.TCOR is updated with a random wrong value without taking care latest valid saved value. There was no problem with No_HZ system where TMU0.TCOR isn't used. Signed-off-by: Francesco M. Virlinzi <francesco.virlinzi@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13sh: Don't factor in PAGE_OFFSET for valid_phys_addr_range() check.Paul Mundt1-1/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-13sh: early printk port type fixMagnus Damm1-0/+1
Add PORT_SCIF to unbreak the early printk code. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-12sh: Provide a sane valid_phys_addr_range() to prevent TLB reset with PMB.Paul Mundt4-2/+37
With the PMB enabled, only P1SEG and up are covered by the PMB mappings, meaning that situations where out-of-bounds physical addresses are read from will lead to TLB reset after the PMB miss, allowing for use cases like dd if=/dev/mem to reset the TLB. Fix this up to make sure the reference is between __MEMORY_START (phys) and __pa(high_memory). This is coherent across all variants of sh/sh64 with and without MMU, though the PMB bug itself is only applicable to SH-4A parts. Reported-by: Hideo Saito <saito@densan.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-12fix sci type for SH7723Yoshihiro Shimoda1-3/+3
This patch changes sci type of SH7723 from PORT_SCI to PORT_SCIFA. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-11-10sh: Handle fixmap TLB eviction more coherently.Paul Mundt3-3/+32
There was a race in the kmap_coherent() implementation. While we guarded against preemption, there was nothing preventing eviction of the pre-faulted fixmap entry from the UTLB. Under certain workloads this would result in the fixmap entries used for cache colouring being evicted from the UTLB in the midst of a copy_page(). In addition to pre-faulting, we also make sure to preserve the PTEs in the kernel page table and introduce a cached PTE for kmap_coherent() usage. This follows a similar change on MIPS ("[MIPS] Fix aliasing bug in copy_to_user_page / copy_from_user_page"). Reported-by: Hideo Saito <saito@densan.co.jp> Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com> Tested-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31sh: fix sh2a cache entry_maskYoshihiro Shimoda1-4/+4
fix sh2a cache entry_mask in __flush_{purge,invalidate}_region. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31sh: Enable NFS root in Migo-R defconfig.Kuninori Morimoto1-7/+28
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31sh: FTRACE renamed to FUNCTION_TRACER.Paul Mundt4-5/+5
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31Add support usb setting on sh 7366Kuninori Morimoto1-0/+28
This patch add usb setting for sh 7366 Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31sh: use the new byteorder headers.Harvey Harrison1-19/+17
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-31sh: SHmedia ISA tuning fixups.Paul Mundt1-0/+4
SH-5 doesn't support any elaborate ISA inheritance schemes (-dsp, -up, etc.), so only bother with that if we are building an sh32 kernel. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28sh: Kill off long-dead HD64465 cchip support.Paul Mundt11-992/+0
This code has been dead for many years. The last update it received was in 2003 in order to update it for the driver model changes, though it had already been in disarray and unused before that point. The only boards that ever used this chip have not had users in many years either, so it is finally safe to just kill it off and move on with life. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28Merge branches 'sh/serial-rework' and 'sh/oprofile'Paul Mundt1-4/+2
2008-10-28sh: Simplify and lock down the ISA tuning.Paul Mundt1-9/+1
The ISA tuning as it is today can not cope with all of the different variations that are possible, so all we can do is a best attempt based on the CPU family. The DSP and FPU generation are already at odds with each other, and the nommu tuning we weren't handling at all. Additionally, for platforms that never had an FPU, the -nofpu variant never existed, meaning that we would lose out on family granular tuning completely in certain cases. With tat out of the way, we were also using -up versions, allowing for later instructions that branched off of a particular subset of the ISA, but are not actually reflected on the hardware being targetted. This leads to some confusion, and the possibility of bogus instructions on older parts. Kill that off and lock it down to the family being built for specifically. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28sh: sh7785lcr: Select uImage as default image target.Paul Mundt1-1/+2
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28sh: Add on-chip RTC support for SH7722.Paul Mundt2-3/+33
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28sh: Provide a sample defconfig for the UL2 (SH7366) board.Kuninori Morimoto1-0/+1169
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-28sh: Fix FPU tuning on toolchains with mismatched multilib targets.Paul Mundt2-5/+22
Presently there is very little standing in the way of using an SH-4 toolchain for building an SH-2 kernel, and vice versa. Binutils itself has no limitations whatsoever and supports explicit ISA hinting, which we already use with varying degrees of success today. This leaves GCC as the odd one out, due to a rather dubious policy decision by the GCC folks to not include all of the CPU family variants in the default list of multilib targets in GCC4. Despite best efforts to the contrary, libgcc itself already contains awareness of the various CPU types and remains generally usable, allowing it to safely be referenced even on a mismatched target (and indeed, explicit ISA tuning by binutils keeps us honest in terms of ensuring that we do not link incompatible objects in). In order to support this, a couple of changes had to be made. Firstly, the introduction of MAYBE_DECLARE_EXPORT(), which provides a __weak extern reference for libgcc resident routines when finer-grained -m<cpu-family> based tuning is not supported by the toolchain. This fixes up the __sdivsi3_i4i and __udivsi3_i4i references when dealing with SH-2 kernels linked with an SH-4 libgcc. Secondly, in case where we are unable to find a suitable match for CPU family tuning but still have a toolchain that defaults to FP instruction generation, a suitable nofpu target must be selected. This is accomplished by selecting the first nofpu multilib target supported by the toolchain, which is also necessary for selecting the proper libgcc to link against. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-27sh: oprofile: Fix up the SH7750 performance counter name.Paul Mundt1-4/+2
Rather than varying this on a subtype level, we use the counter type as a generic identifier. This simplifies logic in the userspace tools where no fundamental difference exists across the various subtypes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 Mundt5-5/+34
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-23sh: sh7785 pinmux supportMagnus Damm3-0/+1545
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: update defconfigs.Paul Mundt36-3983/+6098
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22sh: Kill off unused p1fc divisors from SH7763 clk fwk.Paul Mundt1-1/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-22sh: improve pinmux support for single direction pinsMagnus Damm3-23/+27
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-22sh: use 10MHz VIO_CLK for ov772x on Migo-RMagnus Damm1-1/+4
Use a slower VIO_CKO clock frequency for the ov772x on Migo-R. This improves the camera picture quality on Panel Board V2.1. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Update gpio_set_value() pin value handlingMagnus Damm1-1/+1
This patch updates the pinmux code to use the boolean value for the function gpio_set_value(). Without this patch values other than 0 and 1 will result in incorrect GPIO settings. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: update ov772x byte order on Migo-RMagnus Damm1-1/+1
Update the ov772x byte sequence to enable byte swap. This to reflect the recent CEU driver change to follow incoming byte order. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Export cache flush routines needed by sh_eth on SH7619.Paul Mundt1-1/+6
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Wire up oops reporting in the die notifier chain.Paul Mundt2-0/+3
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: ap325rxa: Kill off unused port definitions.Paul Mundt1-5/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.Paul Mundt1-9/+8
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.Paul Mundt1-6/+14
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: add support FLCTL for ap325rxa boardYoshihiro Shimoda1-6/+55
This patch adds platform_device for sh_flctl driver, NAND Flash simple partition, and GPIO setting. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> 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: rsk7203: leds-gpio support for RSK+ LEDs.Paul Mundt1-5/+37
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-21sh: fix soc-camera compile breakage on Migo-R.Guennadi Liakhovetski1-2/+9
Fix Migo-R compile breakage caused by incomplete merge. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: arch/sh/kernel/smp.c needs linux/cpu.h for notify_cpu_starting().Paul Mundt1-0/+1
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Kill off duplicate remove_memory() definition.Andrew Morton1-17/+0
Use the generic remove_memory() provided by mm/memory_hotplug.c instead. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-21sh: Fix up the SH7203 build.Paul Mundt2-2/+2
The sh7203.h include paths were missed in the previous update, so switch the include path to cpu/ as with the rest. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-10-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds163-1915/+12970
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (112 commits) sh: Move SH-4 CPU headers down one more level. sh: Only build in gpio.o when CONFIG_GENERIC_GPIO is selected. sh: Migrate common board headers to mach-common/. sh: Move the CPU definition headers from asm/ to cpu/. serial: sh-sci: Add support SCIF of SH7723 video: add sh_mobile_lcdc platform flags video: remove unused sh_mobile_lcdc platform data sh: remove consistent alloc cruft sh: add dynamic crash base address support sh: reduce Migo-R smc91x overruns sh: Fix up some merge damage. Fix debugfs_create_file's error checking method for arch/sh/mm/ Fix debugfs_create_dir's error checking method for arch/sh/kernel/ sh: ap325rxa: Add support RTC RX-8564LC in AP325RXA board sh: Use sh7720 GPIO on magicpanelr2 board sh: Add sh7720 pinmux code sh: Use sh7203 GPIO on rsk7203 board sh: Add sh7203 pinmux code sh: Use sh7723 GPIO on AP325RXA board sh: Add sh7723 pinmux code ...
2008-10-20kdump: make elfcorehdr_addr independent of CONFIG_PROC_VMCOREVivek Goyal1-0/+3
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>
2008-10-20container freezer: implement freezer cgroup subsystemMatt Helsley1-0/+2
This patch implements a new freezer subsystem in the control groups framework. It provides a way to stop and resume execution of all tasks in a cgroup by writing in the cgroup filesystem. The freezer subsystem in the container filesystem defines a file named freezer.state. Writing "FROZEN" to the state file will freeze all tasks in the cgroup. Subsequently writing "RUNNING" will unfreeze the tasks in the cgroup. Reading will return the current state. * Examples of usage : # mkdir /containers/freezer # mount -t cgroup -ofreezer freezer /containers # mkdir /containers/0 # echo $some_pid > /containers/0/tasks to get status of the freezer subsystem : # cat /containers/0/freezer.state RUNNING to freeze all tasks in the container : # echo FROZEN > /containers/0/freezer.state # cat /containers/0/freezer.state FREEZING # cat /containers/0/freezer.state FROZEN to unfreeze all tasks in the container : # echo RUNNING > /containers/0/freezer.state # cat /containers/0/freezer.state RUNNING This is the basic mechanism which should do the right thing for user space task in a simple scenario. It's important to note that freezing can be incomplete. In that case we return EBUSY. This means that some tasks in the cgroup are busy doing something that prevents us from completely freezing the cgroup at this time. After EBUSY, the cgroup will remain partially frozen -- reflected by freezer.state reporting "FREEZING" when read. The state will remain "FREEZING" until one of these things happens: 1) Userspace cancels the freezing operation by writing "RUNNING" to the freezer.state file 2) Userspace retries the freezing operation by writing "FROZEN" to the freezer.state file (writing "FREEZING" is not legal and returns EIO) 3) The tasks that blocked the cgroup from entering the "FROZEN" state disappear from the cgroup's set of tasks. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: export thaw_process] Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Matt Helsley <matthltc@us.ibm.com> Acked-by: Serge E. Hallyn <serue@us.ibm.com> Tested-by: Matt Helsley <matthltc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.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>