summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
Commit message (Collapse)AuthorAgeFilesLines
* sh: Storage class should be before const qualifierTobias Klauser2009-02-121-2/+2
| | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix up spurious syscall restarting.Paul Mundt2009-01-292-6/+2
| | | | | | | | | The T-bit manipulation for syscall error checking had the side effect of spuriously returning ERESTART* errno values over EINTR. So, we simplify the error checking a bit and leave the T-bit alone. Reported-by: Kaz Kojima <kkojima@rr.iij4u.or.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fcnvds fix with denormalized numbers on SH-4 FPU.Carmelo AMOROSO2009-01-291-1/+1
| | | | | | | | | | | | | | | This fixes a bug in the FPU exception handler for the FCNVDS instruction. To get the register number the instruction is shifted right by 9, though it should be shifted right by 8. More information at ST Linux bugzilla: https://bugzilla.stlinux.com/show_bug.cgi?id=4892 Signed-off-by: Giuseppe Di Giore <giuseppe.di-giore@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Only reserve memory under CONFIG_ZERO_PAGE_OFFSET when it != 0.Christopher SMITH2009-01-291-4/+4
| | | | | | Signed-off-by: Chris Smith <chris.smith@st.com> Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix unaligned and nonexistent address handlingSUGIOKA Toshinobu2009-01-211-5/+4
| | | | | | | | | | | | | | | | | | unaligned and nonexistent address causes wrong exception handling in traps_32.c(handle_unaligned_access). 'handle_unalinged_ins' should return -EFAULT if address error is fixed up with kernel exception table, otherwise 'handle_unaligned_access' increases already fixed program counter and then crash. for example ioctl(fd, TCGETA, (struct termio *)-1) never return and stay in TASK_UNINTERRUPTIBLE state forever in my kernel. Signed-off-by: SUGIOKA Toshinobu <sugioka@itonet.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: export the sh7343 JPU to user spaceMagnus Damm2009-01-212-1/+32
| | | | | | | | | | This patch exports the sh7343 JPU to user space using uio_pdrv_genirq, very similar to the sh7722 JPU patch by Hayama-san. While at it fix up the end of the sh7722 JPU iomem resource. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Drop the BKL from sys_execve() on SH-5.Paul Mundt2009-01-211-2/+0
| | | | | | | Brings it in line with the SH implementation, the BKL is not necessary here. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2Heiko Carstens2009-01-142-2/+2
| | | | | | | | | | | | | Remove __attribute__((weak)) from common code sys_pipe implemantation. IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations with the same name. Just rename them. For sys_pipe2 there is no architecture specific implementation. Cc: Richard Henderson <rth@twiddle.net> Cc: David S. Miller <davem@davemloft.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* [CVE-2009-0029] Rename old_readdir to sys_old_readdirHeiko Carstens2009-01-142-2/+2
| | | | | | This way it matches the generic system call name convention. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* remove linux/hardirq.h from asm-generic/local.hRussell King2009-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While looking at reducing the amount of architecture namespace pollution in the generic kernel, I found that asm/irq.h is included in the vast majority of compilations on ARM (around 650 files.) Since asm/irq.h includes a sub-architecture include file on ARM, this causes a negative impact on the ccache's ability to re-use the build results from other sub-architectures, so we have a desire to reduce the dependencies on asm/irq.h. It turns out that a major cause of this is the needless include of linux/hardirq.h into asm-generic/local.h. The patch below removes this include, resulting in some 250 to 300 files (around half) of the kernel then omitting asm/irq.h. My test builds still succeed, provided two ARM files are fixed (arch/arm/kernel/traps.c and arch/arm/mm/fault.c) - so there may be negative impacts for this on other architectures. Note that x86 does not include asm/irq.h nor linux/hardirq.h in its asm/local.h, so this patch can be viewed as bringing the generic version into line with the x86 version. [kosaki.motohiro@jp.fujitsu.com: add #include <linux/irqflags.h> to acpi/processor_idle.c] [adobriyan@gmail.com: fix sparc64] Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'cpus4096-for-linus-2' of ↵Linus Torvalds2009-01-023-10/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'cpus4096-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (66 commits) x86: export vector_used_by_percpu_irq x86: use logical apicid in x2apic_cluster's x2apic_cpu_mask_to_apicid_and() sched: nominate preferred wakeup cpu, fix x86: fix lguest used_vectors breakage, -v2 x86: fix warning in arch/x86/kernel/io_apic.c sched: fix warning in kernel/sched.c sched: move test_sd_parent() to an SMP section of sched.h sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0 sched: activate active load balancing in new idle cpus sched: bias task wakeups to preferred semi-idle packages sched: nominate preferred wakeup cpu sched: favour lower logical cpu number for sched_mc balance sched: framework for sched_mc/smt_power_savings=N sched: convert BALANCE_FOR_xx_POWER to inline functions x86: use possible_cpus=NUM to extend the possible cpus allowed x86: fix cpu_mask_to_apicid_and to include cpu_online_mask x86: update io_apic.c to the new cpumask code x86: Introduce topology_core_cpumask()/topology_thread_cpumask() x86: xen: use smp_call_function_many() x86: use work_on_cpu in x86/kernel/cpu/mcheck/mce_amd_64.c ... Fixed up trivial conflict in kernel/time/tick-sched.c manually
| * cpumask: convert struct clock_event_device to cpumask pointers.Rusty Russell2008-12-133-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Impact: change calling convention of existing clock_event APIs struct clock_event_timer's cpumask field gets changed to take pointer, as does the ->broadcast function. Another single-patch change. For safety, we BUG_ON() in clockevents_register_device() if it's not set. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Ingo Molnar <mingo@elte.hu>
| * cpumask: centralize cpu_online_map and cpu_possible_mapRusty Russell2008-12-131-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impact: cleanup Each SMP arch defines these themselves. Move them to a central location. Twists: 1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a CONFIG_INIT_ALL_POSSIBLE for this rather than break them. 2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'. Those archs simply have phys_cpu_present_map replaced everywhere. 3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky so I just manipulate them both in sync. 4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map' declarations. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Grant Grundler <grundler@parisc-linux.org> Tested-by: Tony Luck <tony.luck@intel.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Mike Travis <travis@sgi.com> Cc: ink@jurassic.park.msu.ru Cc: rmk@arm.linux.org.uk Cc: starvik@axis.com Cc: tony.luck@intel.com Cc: takata@linux-m32r.org Cc: ralf@linux-mips.org Cc: grundler@parisc-linux.org Cc: paulus@samba.org Cc: schwidefsky@de.ibm.com Cc: lethal@linux-sh.org Cc: wli@holomorphy.com Cc: davem@davemloft.net Cc: jdike@addtoit.com Cc: mingo@redhat.com
* | take init_fs to saner placeAl Viro2008-12-311-1/+0
| | | | | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* | Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds2008-12-281-2/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (85 commits) [S390] provide documentation for hvc_iucv kernel parameter. [S390] convert ctcm printks to dev_xxx and pr_xxx macros. [S390] convert zfcp printks to pr_xxx macros. [S390] convert vmlogrdr printks to pr_xxx macros. [S390] convert zfcp dumper printks to pr_xxx macros. [S390] convert cpu related printks to pr_xxx macros. [S390] convert qeth printks to dev_xxx and pr_xxx macros. [S390] convert sclp printks to pr_xxx macros. [S390] convert iucv printks to dev_xxx and pr_xxx macros. [S390] convert ap_bus printks to pr_xxx macros. [S390] convert dcssblk and extmem printks messages to pr_xxx macros. [S390] convert monwriter printks to pr_xxx macros. [S390] convert s390 debug feature printks to pr_xxx macros. [S390] convert monreader printks to pr_xxx macros. [S390] convert appldata printks to pr_xxx macros. [S390] convert setup printks to pr_xxx macros. [S390] convert hypfs printks to pr_xxx macros. [S390] convert time printks to pr_xxx macros. [S390] convert cpacf printks to pr_xxx macros. [S390] convert cio printks to pr_xxx macros. ...
| * | [S390] arch_setup_additional_pages argumentsMartin Schwidefsky2008-12-251-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | sh: add UIO support for JPU on SH7722.Takanari Hayama2008-12-221-0/+31
| | | | | | | | | | | | | | | | | | Add JPU support on Migo-R via UIO. This make use of Magnus's generic UIO platform driver. Chunk of contiguous memory to hold intermediate image and compressed data during encode and decode. Signed-off-by: Takanari Hayama <taki@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Conditionalize the code dumper on CONFIG_DUMP_CODE.Paul Mundt2008-12-221-1/+2
| | | | | | | | | | | | | | | | We don't really want this enabled by default, but it is still quite useful for debugging. So, make it conditional and leave it off by default. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Enable skipping of bss on debug platforms for sh32 also.Paul Mundt2008-12-221-2/+10
| | | | | | | | | | | | | | | | | | This enables the same functionality that sh64 has for sh32. When running on simulated hardware or via remote memory via the debug interface, memory is gauranteed to be zero on boot already, and skipping the zeroing of BSS has measurable boot time benefits. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off cf-enabler with extreme prejudice.Paul Mundt2008-12-223-170/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the rest of the boards that were using cf-enabler "generically" have switched to setting up their mappings on their own, only the mach-se boards were left using it. All of the cf-enabler using mach-se boards use a special initialization of the MRSHPC windows rather than going through the special PTE as other SH-4 platforms do. This consolidates the MRSHPC setup logic, hooks it up on the boards that care, and gets rid of any and all remaining references to cf-enabler. This has been long overdue, as cf-enabler has been the bane of arch/sh/kernel for the last 7 years. Good riddance. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Simplify kernel_thread_helper() for sh32.Paul Mundt2008-12-221-15/+4
| | | | | | | | | | | | | | | | | | | | | | This can use the same implementation as sh64, the generated assembly is the same between the new and old version, so there is not much point in leaving it open coded in inline assembly. This is preparatory work for future consolidation of the _32/_64 variants. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off mv_heartbeat() from the machvec.Paul Mundt2008-12-222-10/+0
| | | | | | | | | | | | | | Nothing is using this any more, so get rid of it before anyone gets the bright idea to start using it again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off sh_bios_in_gdb_mode().Paul Mundt2008-12-221-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | With the reworked kgdb support, we always detach and reinitialize the stub. This was mostly a feature for handoffs between sh-ipl+g and the kgdb stub, but virtually no sh-ipl+g versions ever had this working right in the first place. Given that the sh-ipl+g stubs in general use today don't even support the GDB stub, and we have already killed off the special casing in the sh-sci serial driver, kill off this now unused symbol too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: export sh_bios_get_node_addr() symbol for stnic module.Paul Mundt2008-12-221-2/+2
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Run sh_bios through a long overdue Lindent.Paul Mundt2008-12-221-36/+34
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Provide sdivsi3/udivsi3/udivdi3 for sh64, kill off libgcc linking.Paul Mundt2008-12-221-2/+0
| | | | | | | | | | | | | | This moves in the necessary libgcc bits and kills off the libgcc linking for sh64 kernels as well. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add SH-5 optimized memcpy()/memset()/strcpy()/strlen().Paul Mundt2008-12-221-0/+3
| | | | | | | | | | | | Adopted from the uClibc optimized string versions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off remaining CONFIG_SH_KGDB bits.Paul Mundt2008-12-221-1/+0
| | | | | | | | | | | | | | Now that we use the generic stub, kill off all of the left over references. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Generic kgdb stub support.Paul Mundt2008-12-2210-1122/+306
| | | | | | | | | | | | | | | | This migrates from the old bitrotted kgdb stub implementation and moves to the generic stub. In the process support for SH-2/SH-2A is also added, which the old stub never provided. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Provide linux/regset.h interface for SH-5.Paul Mundt2008-12-221-1/+185
| | | | | | | | | | | | Plugs in general and FPU regsets. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Provide asm/syscall.h for SH-5.Paul Mundt2008-12-222-31/+33
| | | | | | | | | | | | This provides the asm/syscall.h implementation for sh64 parts. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Handle cases where setup{_rt,}_frame() fail on SH-5 signal delivery.Paul Mundt2008-12-221-45/+48
| | | | | | | | | | | | | | | | Presently these cases are not handled properly due to the return value not being passed back. This needs to be correct to get proper behaviour out of things like the tracehook signal notifier, amongst others. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Convert sh64 /proc/asids to debugfs and generic sh.Paul Mundt2008-12-221-39/+0
| | | | | | | | | | | | | | | | | | | | | | This converts the sh64 /proc/asids entry to debugfs and enables it for all SH parts that have debugfs enabled. On MMU systems this can be used to determine which processes are using which ASIDs which in turn can be used for finer grained cache tag analysis. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off sh64's unused alloc/free_task_struct() definitions.Paul Mundt2008-12-221-12/+0
| | | | | | | | | | | | | | | | These were left over from some time ago, sh64 never got around to defining __HAVE_ARCH_TASK_STRUCT_ALLOCATOR during the conversion, and it has no need to. Kill these off and use the generic versions instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Delete unnecessary mov in the interrupt exception entry point.Aoi Shinkai2008-12-221-2/+2
| | | | | | | | | | | | | | | | | | The INTEVT read at interrupt exception entry is uneccessary, as the read is deferred until we are ready to enter do_IRQ(). The kgdb nmi path still requires it, so move it there. Signed-off-by: Aoi Shinkai <shinkoi2005@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Provide ftrace_make_call()/ftrace_make_nop().Paul Mundt2008-12-221-0/+24
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: move the hp6xx pm codeMagnus Damm2008-12-223-90/+0
| | | | | | | | | | | | | | | | | | | | Move the not-so-generic pm code from arch/sh/kernel/pm.c to the platform directory together with the rest of the hp6xx pm code. This is done to let non-hp6xx platforms enable CONFIG_PM. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: sh7343 scif configuration updateMagnus Damm2008-12-221-2/+17
| | | | | | | | | | | | | | | | Fix interrupt values for the first sh7343 SCIF port and update the configuration to include the remaining 3 ones. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: propagate r_clkMagnus Damm2008-12-221-0/+2
| | | | | | | | | | | | | | | | Make sure the 32 KHz r_clk rate gets propagated correctly. Without this fix the clocks for RTC, CMT, KEYSC and RWDT are stuck at 0 Hz. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add support for SH7201 CPU subtype.Peter Griffin2008-12-226-4/+428
| | | | | | | | | | | | | | This patch adds support for the SH-2A FPU based SH7201 processor subtype. Signed-off-by: Peter Griffin <pgriffin@mpc-data.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Split out the idle loop for reuse between _32/_64 variants.Paul Mundt2008-12-225-123/+83
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: do not latency trace idle.Paul Mundt2008-12-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Description snipped from Steven Rostedt's PPC patch: When idle is called, interrupts are blocked, but the idle function will still wake up on an interrupt. The problem is that the interrupt disabled latency tracer will take this call to idle as a latency. This patch disables the latency tracing when going into idle. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Tidy up backtrace formatting with kallsyms disabled.Paul Mundt2008-12-222-6/+3
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add a simple code dumper for SUPERH32 show_regs().Paul Mundt2008-12-223-3/+578
| | | | | | | | | | | | | | | | | | | | This implements a simple show_code() that is in turn plugged in to show_regs() to provide minimal code dumping at the end of the trace. Built on top of a simple instruction disassembler derived from the binutils opcode table. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add a few more branch types to the branch emulator.Paul Mundt2008-12-221-6/+11
| | | | | | | | | | | | | | This plugs in some extra encodings for matching more bsr/bsrf/jsr branches. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: More movmem alias symbol exports for older compilers.Paul Mundt2008-12-221-0/+3
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add exports for __udivsi3/__sdivsi3 and the _i4 versions.Paul Mundt2008-12-221-0/+4
| | | | | | | | | | | | Needed by older compilers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32.Paul Mundt2008-12-221-31/+5
| | | | | | | | | | | | | | | | This moves in the necessary libgcc bits for SUPERH32 and drops the libgcc linking for the regular targets. This in turn allows us to rip out quite a few hacks both in sh_ksyms_32 and arch/sh/Makefile. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: __udivdi3 -> do_div() in softfloat lib.Paul Mundt2008-12-221-32/+41
| | | | | | | | | | | | | | Inhibit the generation of __udivdi3 for the softfloat lib, use do_div() outright. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Fix clock framework compiler warnings.Paul Mundt2008-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | CC arch/sh/kernel/cpu/clock.o arch/sh/kernel/cpu/clock.c: In function 'clk_disable': arch/sh/kernel/cpu/clock.c:156: warning: 'return' with a value, in function returning void Introduced by ("sh: enable and disable clocks recursively"). Signed-off-by: Paul Mundt <lethal@linux-sh.org>