summaryrefslogtreecommitdiffstats
path: root/arch/sh
Commit message (Collapse)AuthorAgeFilesLines
* sh: Get the PGD right in oops case with 64-bit PTEs.Paul Mundt2006-12-061-4/+2
| | | | | | | | | | | | Previously this was using a static pgd shift in the reporting code, simply flip this to PGDIR_SHIFT which does the right thing depending on varying PTE magnitudes on the SH-X2 MMU. While we're at it, and since it's been recently added, use get_TTB() for fetching the TTB, rather than the open coded instructions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix store queue bitmap end.Paul Mundt2006-12-061-6/+5
| | | | | | | | | | | | | The end of the store queue bitmap is miscalculated when searching for a free range in sq_remap(), missing the PAGE_SHIFT shift that's done in sq_api_init(). This runs in to workloads where we can scan beyond the end of the bitmap. Spotted by Paul Jackson: http://marc.theaimsgroup.com/?l=linux-kernel&m=116493191224097&w Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: More flexible + SH7780 earlyprintk SCIF support.Paul Mundt2006-12-062-24/+38
| | | | | | | | | | | This makes the early printk support somewhat more flexible, moving the port definition to a config option, and making the port initialization configurable for sh-ipl+g users. At the same time, this allows us to trivially wire up the SH7780 SCIF0, so that's thrown in too more or less for free. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup various PAGE_SIZE == 4096 assumptions.Paul Mundt2006-12-068-34/+31
| | | | | | | | | | | | | | | | | | | | | | There were a number of places that made evil PAGE_SIZE == 4k assumptions that ended up breaking when trying to play with 8k and 64k page sizes, this fixes those up. The most significant change is the way we load THREAD_SIZE, previously this was done via: mov #(THREAD_SIZE >> 8), reg shll8 reg to avoid a memory access and allow the immediate load. With a 64k PAGE_SIZE, we're out of range for the immediate load size without resorting to special instructions available in later ISAs (movi20s and so on). The "workaround" for this is to bump up the shift to 10 and insert a shll2, which gives a bit more flexibility while still being much cheaper than a memory access. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup 4K irq stacks.Paul Mundt2006-12-061-7/+18
| | | | | | | | | | | There was a clobber issue with the register we were saving the stack in, so we switch to a register that we handle in the clobber list properly already. This also follows the x86 changes for allowing the softirq checks from hardirq context. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: dma-api channel capability extensions.Mark Glaisher2006-12-061-85/+189
| | | | | | | | | | | | | This extends the SH DMA API for allowing handling of DMA channels based off of their respective capabilities. A couple of functions are added to the existing API, the core bits are register_chan_caps() for registering channel capabilities, and request_dma_bycap() for fetching a channel dynamically based off of a capability set. Signed-off-by: Mark Glaisher <mark.glaisher@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Drop name overload in dma-sh.Paul Mundt2006-12-061-8/+1
| | | | | | | | | | | Pass along the dev_id from request_dma() all the way down, rather than inserting an artificial name relating to the TEI line that we were doing before. This makes the line a bit less obvious, but dev_id is the proper behaviour for this regardless. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Make dma-isa depend on ISA_DMA_API.Paul Mundt2006-12-061-2/+2
| | | | | | | | Previously we linked in the ISA DMA wrapper unconditionally. As there are very few users of this, it's better to make it conditional. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: dma-sysfs fixes.Paul Mundt2006-12-061-8/+15
| | | | | | | | Handle the case where no registered DMACs exist somewhat more gracefully. While we're at it, check for sysdev_create_file() failing. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix syscall tracing ordering.Stuart Menefy2006-12-061-23/+22
| | | | | | | | | | | | | | | | | | | | | The implementation of system call tracing in the kernel has a couple of ordering problems: - the validity of the system call number is checked before calling out to system call tracing code, and should be done after - the system call number used when tracing is the one the system call was invoked with, while the system call tracing code can legitimatly change the call number (for example strace permutes fork into clone) This patch fixes both of these problems, and also reoders the code slightly to make the direct path through the code the common case. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: TLB miss fast-path optimizations.Stuart Menefy2006-12-065-114/+201
| | | | | | | | Handle simple TLB miss faults which can be resolved completely from the page table in assembler. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: R7780RP push-switch support.Paul Mundt2006-12-062-1/+125
| | | | | | | This adds simple push-switch support for the RDBRP-1/RDBREVRP-1 debug boards found on the R7780RP-1. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: generic push-switch framework.Paul Mundt2006-12-064-1/+150
| | | | | | | | | | This adds support for a generic push switch framework. Adaptable for various switches, including GPIO switches and the push switches commonly found on Renesas debug boards. This allows switch states to be trivially reported through sysfs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: pmd rework.Stuart Menefy2006-12-062-17/+49
| | | | | | | | | Remove extra bits from the pmd structure and store a kernel logical address rather than a physical address. This allows it to be directly dereferenced. Another piece of wierdness inherited from x86. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Use MMU.TTB register as pointer to current pgd.Stuart Menefy2006-12-061-10/+8
| | | | | | | | | Add TTB accessor functions and give it a sensible default value. We will use this later for optimizing the fault path. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Set up correct siginfo structures for page faults.Stuart Menefy2006-12-063-49/+58
| | | | | | | | Remove the previous saving of fault codes into the thread_struct as they are never used, and appeared to be inherited from x86. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: gcc4 support.Stuart Menefy2006-12-068-64/+78
| | | | | | | | | | | | This fixes up the kernel for gcc4. The existing exception handlers needed some wrapping for pt_regs access, acessing the registers via a RELOC_HIDE() pointer. The strcpy() issues popped up here too, so add -ffreestanding and kill off the symbol export. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Explicit endian selection support.Paul Mundt2006-12-062-14/+21
| | | | | | | | | | | | Previously big endian was simply assumed if little endian was not set, which led to some cflags ordering issues. There's not much point to not having a big endian option, so shove one in a choice and wire it up in the Makefile. This lets us clean up some of the cflags ordering while we're at it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: p3map_sem sem2mutex conversion.Paul Mundt2006-12-062-26/+11
| | | | | | Simple sem2mutex conversion for the p3map semaphores. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Preliminary support for SH-X2 MMU.Paul Mundt2006-12-064-17/+52
| | | | | | | | | | | | | | | | | | | This adds some preliminary support for the SH-X2 MMU, used by newer SH-4A parts (particularly SH7785). This MMU implements a 'compat' mode with SH-X MMUs and an 'extended' mode for SH-X2 extended features. Extended features include additional page sizes (8kB, 4MB, 64MB), as well as the addition of page execute permissions. The extended mode attributes are placed in a second data array, which requires us to switch to 64-bit PTEs when in X2 mode. With the addition of the exec perms, we also overhaul the mmap prots somewhat, now that it's possible to handle them more intelligently. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Hook SH7785 in to the build system.Paul Mundt2006-12-062-1/+7
| | | | | | Simple 7785 placeholders to start hooking up other bits of code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Drop CPU subtype IRQ headers.Paul Mundt2006-12-065-31/+51
| | | | | | | | | | | | | This drops the various IRQ headers that were floating around and primarily providing hardcoded IRQ definitions for the various CPU subtypes. This quickly got to be an unmaintainable mess, made even more evident by the subtle breakage introduced by the SH-2 and SH-2A changes. Now that subtypes are able to register IRQ maps directly, just rip all of the headers out. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Configurable timer IRQ.Paul Mundt2006-12-065-4/+11
| | | | | | | | | All of the various CPU subtypes currently hardcode TIMER_IRQ, switch this to a config option in the few places we need this. This allows further removal of hardcoded IRQ headers.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fixup entry-common path breakage for SH-3.Paul Mundt2006-12-061-1/+1
| | | | | | | The nommu patches broke the path for the common bits, get it building for the SH-3/4 case again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: SE7206 build fixes.Paul Mundt2006-12-066-152/+34
| | | | | | | A number of API changes happened underneath the 7206 patches, update for everything that broke. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for Solution Engine 7206 and 7619 boards.Yoshinori Sato2006-12-069-0/+1404
| | | | | | | This adds support for the Solution Engine 7206 and 7619. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Exception vector rework and SH-2/SH-2A support.Yoshinori Sato2006-12-067-332/+767
| | | | | | | | | This splits out common bits from the existing exception handler for use between SH-2/SH-2A and SH-3/4, and adds support for the SH-2/2A exceptions. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up division and address error exceptions on SH-2A.Yoshinori Sato2006-12-061-9/+79
| | | | | | | | SH-2A has special division hardware as opposed to a full-fledged FPU, wire up the exception handlers for this. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add support for SH7206 and SH7619 CPU subtypes.Yoshinori Sato2006-12-0625-53/+1000
| | | | | | | | This implements initial support for the SH7206 (SH-2A) and SH7619 (SH-2) MMU-less CPUs. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [NET]: Kill direct includes of asm/checksum.hAl Viro2006-12-021-1/+0
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* Fix misc Kconfig typosMatt LaPlante2006-11-301-1/+1
| | | | | | | | Fix various Kconfig typos. Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* sh: Titan defconfig update.Jamie Lenehan2006-10-311-29/+72
| | | | | | | Small defconfig update for titan for 2.6.19-rc3, adding SH-RTC. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix IPR-IRQ's for IRQ-chip change breakage.Jamie Lenehan2006-10-3113-301/+331
| | | | | | | | | | | | | | | The conversion from IPR-IRQ to IRQ-chip resulted in the ipr data being allocated in a local variable in make_ipr_irq - breaking anything using IPR interrupts. This changes all of the callers of make_ipr_irq to allocate a static structure containing the IPR data which is then passed to make_ipr_irq. This removes the need for make_ipr_irq to allocate any additional space for the IPR information. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Update r7780rp_defconfig.Paul Mundt2006-10-311-76/+98
| | | | | | Small defconfig updates for R7780RP, enabling SH-RTC. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Wire up new syscalls.Paul Mundt2006-10-311-0/+3
| | | | | | This wires up sys_move_pages, sys_getcpu, and sys_epoll_pwait. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [PATCH] vmlinux.lds: consolidate initcall sectionsAndrew Morton2006-10-271-7/+1
| | | | | | | | | | | | | | Add a vmlinux.lds.h helper macro for defining the eight-level initcall table, teach all the architectures to use it. This is a prerequisite for a patch which performs initcall synchronisation for multithreaded-probing. Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> [ Added AVR32 as well ] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* sh: Convert INTC2 to IRQ table registration.Paul Mundt2006-10-203-140/+114
| | | | | | | | | | | | | Currently the INTC2 code contains a fixed IRQ table that it iterates through to set the handler type, we move this in to the CPU subtype setup code instead and allow for submitting the table that way. This drops the ST40 tables, as nothing has been happening with those processors, while converting the only existing users to use the new table directly (SH7760 and SH7780). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Updates for irq-flow-type naming changes.Paul Mundt2006-10-194-8/+10
| | | | | | | handle_irq_name() and set_irq_chip_and_handler() disappeared, update for desc->name and set_irq_chip_and_handler_name() use. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix exception_handling_table alignment.Paul Mundt2006-10-193-24/+37
| | | | | | | | | | | With the recent change ripping out interrupt_table, explicit padding of the table was missing, causing bad things to happen when manually inserting handlers in to the table. This problem particularly showed up in relation to do_fpu_state_restore() which was inserted quite deeply in to the table and ended up scribbling over a slab object. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Cleanup board header directories.Paul Mundt2006-10-1917-67/+34
| | | | | | | | Now with the ide.h mess sorted out, most of these boards don't need their own directory. Move the headers out, and update the driver paths. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Proper show_stack/show_trace() implementation.Paul Mundt2006-10-192-61/+75
| | | | | | | | | | This splits out some of the previous show_stack() implementation which was mostly doing the show_trace() work without actually dumping any of the stack contents. This now gets split in to two sections, where we do the fetching of the stack pointer and subsequent stack dumping in show_stack(), while moving the call trace in to show_trace(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: SH-4A UBC supportRyusuke Sakato2006-10-121-0/+30
| | | | | | | A simple patch to enable the UBC on SH-4A. Signed-off-by: Ryusuke Sakato <sakato@hsdv.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: interrupt exception handling reworkPaul Mundt2006-10-124-721/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Kill off interrupt_table for all of the CPU subtypes, we now default in to stepping in to do_IRQ() for _all_ IRQ exceptions and counting the spurious ones, rather than simply flipping on the ones we cared about. This and enabling the IRQ by default automatically has already uncovered a couple of bugs and IRQs that weren't being caught, as well as some that are being generated far too often (SCI Tx Data Empty, for example). The general rationale is to use a marker for interrupt exceptions, test for it in the handle_exception() path, and skip out to do_IRQ() if it's found. Everything else follows the same behaviour of finding the cached EXPEVT value in r2/r2_bank, we just rip out the INTEVT read from entry.S entirely (except for in the kGDB NMI case, which is another matter). Note that while this changes the do_IRQ() semantics regarding r4 handling, they were fundamentally broken anyways (relying entirely on r2_bank for the cached code). With this, we do the INTEVT read from do_IRQ() itself (in the CONFIG_CPU_HAS_INTEVT case), or fall back on r4 for the muxed IRQ number, which should also be closer to what SH-2 and SH-2A want anyways. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Default enable R7780RP IRQs.Paul Mundt2006-10-121-1/+1
| | | | | | | Now that we've started accounting for spurious IRQs, change the logic somewhat so that we have a better chance of catching them. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Zero-out coherent buffer in consistent_alloc().Paul Mundt2006-10-101-0/+1
| | | | | | | Be sure to zero out the buffer, this was causing occasional problems under heavier PCI tests. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Convert IPR-IRQ to IRQ chip.Paul Mundt2006-10-061-75/+27
| | | | | | One more initial conversion.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Convert INTC2 IRQ handler to irq_chip.Paul Mundt2006-10-061-114/+24
| | | | | | More struct irq_chip conversions, this time the INTC2 handlers. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix pr_debug statements for sh4Jamie Lenehan2006-10-061-2/+2
| | | | | | | | | Fix a problem uncovered by the recent change to always check the arguments to pr_debug. The sh7751 was using the wrong name for the PCI IO base address. Signed-off-by: Jamie Lenehan <lenehan@twibble.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Convert r7780rp IRQ handler to IRQ chip.Paul Mundt2006-10-061-83/+22
| | | | | | Simple conversion of the R7780RP IRQ handler to struct irq_chip. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Updates for IRQ handler changes.Paul Mundt2006-10-0615-30/+35
| | | | | | Trivial fixes for build breakage introduced by IRQ handler changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud