summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem)Atsushi Nemoto2006-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass ticks to do_timer() and update_times(), and adjust x86_64 and s390 timer interrupt handler with this change. Currently update_times() calculates ticks by "jiffies - wall_jiffies", but callers of do_timer() should know how many ticks to update. Passing ticks get rid of this redundant calculation. Also there are another redundancy pointed out by Martin Schwidefsky. This cleanup make a barrier added by 5aee405c662ca644980c184774277fc6d0769a84 needless. So this patch removes it. As a bonus, this cleanup make wall_jiffies can be removed easily, since now wall_jiffies is always synced with jiffies. (This patch does not really remove wall_jiffies. It would be another cleanup patch) Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Cc: Andi Kleen <ak@muc.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Acked-by: David Howells <dhowells@redhat.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Hirokazu Takata <takata.hirokazu@renesas.com> Acked-by: Ralf Baechle <ralf@linux-mips.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Cc: Richard Curnow <rc@rc0.org.uk> Cc: William Lee Irwin III <wli@holomorphy.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp> Cc: Chris Zankel <chris@zankel.net> Acked-by: "Luck, Tony" <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* sh: Calculate shm alignment at runtime.Paul Mundt2006-09-272-20/+39
| | | | | | | Set the SHM alignment at runtime, based off of probed cache desc. Optimize get_unmapped_area() to only colour align shared mappings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Initial vsyscall page support.Paul Mundt2006-09-2710-4/+392
| | | | | | | | | | This implements initial support for the vsyscall page on SH. At the moment we leave it configurable due to having nommu to support from the same code base. We hook it up for the signal trampoline return at present, with more to be added later, once uClibc catches up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: More intelligent entry_mask/way_size calculation.Paul Mundt2006-09-271-7/+13
| | | | | | | Figure out the cache desc entry_mask at runtime, and remove hard-coded assumption about the cacheline size. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Support for L2 cache on newer SH-4A CPUs.Paul Mundt2006-09-272-2/+51
| | | | | | | This implements preliminary support for the L2 caches found on newer SH-4A CPUs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Update kexec support for API changes.Paul Mundt2006-09-272-16/+0
| | | | | | This was falling a bit behind.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Optimized readsl()/writesl() support.Paul Mundt2006-09-271-0/+67
| | | | | | Implement optimized copies of readsl()/writesl(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Report movli.l/movco.l capabilities.Paul Mundt2006-09-271-1/+3
| | | | | | | Add llsc to cpu_flags[] and comment cpu-features.h. Signed-off-by: Jamie Lenehan <nynaeve@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: CPU flags in AT_HWCAP in ELF auxvt.Paul Mundt2006-09-271-3/+5
| | | | | | Encode processor flags in AT_HWCAP in the ELF auxiliary vector. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for 4K stacks.Paul Mundt2006-09-276-23/+160
| | | | | | | | | This enables support for 4K stacks on SH. Currently this depends on DEBUG_KERNEL, but likely all boards will switch to this as the default in the future. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: stack debugging support.Paul Mundt2006-09-273-8/+27
| | | | | | This adds a DEBUG_STACK_USAGE and DEBUG_STACKOVERFLOW for SH. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: machvec rework.Paul Mundt2006-09-271-43/+11
| | | | | | | | | Some more machvec overhauling and setup code cleanup. Kill off get_system_type() and platform_setup(), we can do these both through the machvec. While we're add it, kill off more useless mach.c's and drop some legacy cruft from setup.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Cleanup IRQ disabling for hardirq handlers.Paul Mundt2006-09-273-18/+4
| | | | | | | | The generic hardirq layer already takes care of a lot of the appropriate locking and disabling for us, no need to duplicate it in the handlers.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: maskreg IRQ support.Paul Mundt2006-09-272-2/+102
| | | | | | | Formerly implemented by ADX, we can use this generically, so move it over. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off the rest of the legacy rtc mess.Paul Mundt2006-09-274-153/+19
| | | | | | | With the new RTC class driver, we can get rid of most of the old left over cruft. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for SH7706/SH7710/SH7343 CPUs.Paul Mundt2006-09-2713-36/+267
| | | | | | | This adds support for the aforementioned CPU subtypes, and cleans up some build issues encountered as a result. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add setup code for various CPU subtypes.Paul Mundt2006-09-2711-0/+441
| | | | | | | This adds some simple setup code for most of the CPU subtypes, primarily simple platform device registration. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: sem2mutex conversion for clock framework.Paul Mundt2006-09-271-8/+9
| | | | | | Simple sem2mutex conversion. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: pselect6 and ppoll, along with signal trampoline rework.Paul Mundt2006-09-273-91/+85
| | | | | | This implements support for ppoll() and pselect6().. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: __addr_ok() and other misc nommu fixups.Yoshinori Sato2006-09-273-11/+14
| | | | | | | A few more outstanding nommu fixups.. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: __NR_restart_syscall support.Paul Mundt2006-09-273-7/+13
| | | | | | This implements support for __NR_restart_syscall. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Make PAGE_OFFSET configurable.Paul Mundt2006-09-271-1/+1
| | | | | | | | nommu needs to be able to shift PAGE_OFFSET, so we switch it to a non-user-visible CONFIG_PAGE_OFFSET and use that in the few places where it matters. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: math-emu supportTakashi YOSHII2006-09-271-39/+125
| | | | | | | This implements initial math-emu support, aimed primarily at SH-3. Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Rename rtc_get/set_time() to avoid RTC_CLASS conflict.Paul Mundt2006-09-272-10/+10
| | | | | | | We have a clash with RTC_CLASS over these names, so we change them.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup __strnlen_user() behaviour.Paul Mundt2006-09-271-0/+3
| | | | | | | | | | Drop TIF_USERSPACE and add addr_limit to the thread_info struct. Subsequently, use that for address checking in strnlen_user() to ward off bogus -EFAULTs. Make __strnlen_user() return 0 on exception, rather than -EFAULT. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: More cosmetic cleanups and trivial fixes.Paul Mundt2006-09-272-16/+1
| | | | | | Nothing exciting here, just trivial fixes.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Consolidated SH7751/SH7780 PCI support.Paul Mundt2006-09-272-0/+82
| | | | | | | | This cleans up quite a lot of the PCI mess that we currently have, and attempts to consolidate the duplication in the SH7780 and SH7751 PCI controllers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: kgdb stub cleanups.Paul Mundt2006-09-271-28/+5
| | | | | | | | Some kgdb cleanup. Move hexchars/highhex/lowhex to the header, so it can be reused by sh-sci. Also drop silly ctrl_inl/outl() overloading being done by the kgdb stub. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: APM/PM support.Andriy Skulysh2006-09-277-4/+676
| | | | | | | | | This adds some simple PM stubs and the basic APM interfaces, primarily for use by hp6xx, where the existing userland expects it. Signed-off-by: Andriy Skulysh <askulysh@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for R7780RP and R7780MP boards.Paul Mundt2006-09-271-3/+3
| | | | | | | This adds support for the Renesas SH7780 development boards, R7780RP and R7780MP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Store Queue API rework.Paul Mundt2006-09-271-296/+246
| | | | | | | | | | | | Rewrite the store queue API for a per-cpu interface in the driver model. The old miscdevice is dropped, due to TASK_SIZE limitations, and no one was using it anyways. Carve up and allocate store queue space with a bitmap, back sq mapping objects with a slab cache, and let userspace worry about its own prefetching. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Board updates for I/O routine rework.Paul Mundt2006-09-271-4/+3
| | | | | | | This updates the various boards for some of the recent I/O routine updates. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: ioremap() overhaul.Paul Mundt2006-09-272-5/+1
| | | | | | | | | | ioremap() overhaul. Add support for transparent PMB mapping, get rid of p3_ioremap(), etc. Also drop ioremap() and iounmap() routines from the machvec, as everyone can use the generic ioremap() API instead. For PCI memory apertures and other special cases, use the pci_iomap() API, as boards are already required to get the mapping right there. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: page table alloc cleanups and page fault optimizations.Paul Mundt2006-09-271-1/+1
| | | | | | | | | | | Cleanup of page table allocators, using generic folded PMD and PUD helpers. TLB flushing operations are moved to a more sensible spot. The page fault handler is also optimized slightly, we no longer waste cycles on IRQ disabling for flushing of the page from the ITLB, since we're already under CLI protection by the initial exception handler. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: export clear_user_page() for the modules that need it.Paul Mundt2006-09-271-0/+1
| | | | | | Some modules seem to need this, so we export it.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: BSS init bugfix and barrier in entry point.Paul Mundt2006-09-271-5/+31
| | | | | | | | | | A synco is needed before we jump to start_kernel(). While we're at it, also move the sh_cpu_init() jump until after we've zeroed BSS, as this has caused some undesirable results in sh_cpu_init(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add flag for MMU PTEA capability.Paul Mundt2006-09-272-13/+27
| | | | | | Add CPU_HAS_PTEA, refactor some of the cpu flag settings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up new syscalls.Paul Mundt2006-09-271-0/+28
| | | | | | The syscall table has lagged behind a bit, wire up the new ones.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Support for SH7770/SH7780 CPU subtypes.Paul Mundt2006-09-273-0/+181
| | | | | | Merge support for SH7770 and SH7780 SH-4A subtypes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: earlyprintk= support and cleanups.Paul Mundt2006-09-272-30/+98
| | | | | | | | | | Allow multiple early printk consoles via earlyprintk=. With this change earlyprintk is no longer enabled by default, it must be specified on the kernel command line. Optionally with ,keep to prevent unreg by tty_io. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Refactor PRR masking to catch newer SH7760 cuts.Paul Mundt2006-09-271-3/+9
| | | | | | Newer SH7760 cuts have a range of acceptable PRR values.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Optimized cache handling for SH-4/SH-4A caches.Richard Curnow2006-09-272-1/+26
| | | | | | | | | This reworks some of the SH-4 cache handling code to more easily accomodate newer-style caches (particularly for the > direct-mapped case), as well as optimizing some of the old code. Signed-off-by: Richard Curnow <richard.curnow@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Various cosmetic cleanups.Paul Mundt2006-09-275-21/+5
| | | | | | | | We had quite a bit of whitespace damage, clean most of it up.. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Kill off the .stack section.Paul Mundt2006-09-272-3/+1
| | | | | | | | | | We had a special .stack section in the ld script that was being used to position r15 initially. This is nonsensical, as we can just use a THREAD_SIZE offset from the init_thread_union instead (as every other arch does). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix kGDB NMI handling.Paul Mundt2006-09-271-1/+1
| | | | | | | in_nmi shifted down a few labels, so we were inadvertently clearing the lower byte of do_syscall_trace, badness ensues. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Move syscall table in to syscall.S.Paul Mundt2006-09-273-298/+325
| | | | | | | | Move the syscall table in to its own file, as per sh64. The entry.S bits will end up being considerably different in the sh2/sh2a cases, so this lets us keep things in sync somewhat.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup some uninitialized spinlocks.Paul Mundt2006-09-272-2/+2
| | | | | | Fix use of uninitialized spinlocks, caught with spinlock debugging.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Fix 'make headers_check' on shPaul Mundt2006-09-211-0/+1
| | | | | | | | | | Cleanup for user headers, as noted: asm-sh/page.h requires asm-generic/memory_model.h, which does not exist in exported headers asm-sh/ptrace.h requires asm/ubc.h, which does not exist in exported headers Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* [PATCH] sh: fix proc file removal for superh store queue moduleNeil Horman2006-08-061-3/+7
| | | | | | | | | | | | | Clean up proc file removal in sq module for superh arch. currently on a failed module load or on module unload a proc file is left registered which can cause a random memory execution or oopses if read after unload. This patch cleans up that deregistration. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] tty: Remove include of screen_info.h from tty.hJon Smirl2006-07-101-1/+1
| | | | | | | | | | | | | | | | screen_info.h doesn't have anything to do with the tty layer and shouldn't be included by tty.h. This patches removes the include and modifies all users to directly include screen_info.h. struct screen_info is mainly used to communicate with the console drivers in drivers/video/console. Note that this patch touches every arch and I have no way of testing it. If there is a mistake the worst thing that will happen is a compile error. [akpm@osdl.org: fix arm build] [akpm@osdl.org: fix alpha build] Signed-off-by: Jon Smirl <jonsmir@gmail.com> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>