aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-01-16sh: Add fixed ioremap supportMatt Fleming6-3/+167
Some devices need to be ioremap'd and accessed very early in the boot process. It is not possible to use the standard ioremap() function in this case because that requires kmalloc()'ing some virtual address space and kmalloc() may not be available so early in boot. This patch provides fixmap mappings that allow physical address ranges to be remapped into the kernel address space during the early boot stages. Signed-off-by: Matt Fleming <matt@console-pimps.org>
2010-01-16sh: Generalise the pte handling code for the fixmap pathMatt Fleming2-4/+41
Generalise the code for setting and clearing pte's and allow TLB entries to be pinned and unpinned if the _PAGE_WIRED flag is present. Signed-off-by: Matt Fleming <matt@console-pimps.org>
2010-01-16sh: Acquire some more page flags for SH-5.Matt Fleming4-3/+57
We need some more page flags to hook up _PAGE_WIRED (and eventually other things). So use the unused PTE bits above the PPN field as no implementations use these for anything currently. Now that we have _PAGE_WIRED let's provide the SH-5 functions for wiring up TLB entries. Signed-off-by: Matt Fleming <matt@console-pimps.org>
2010-01-16sh: New extended page flag to wire/unwire TLB entriesMatt Fleming5-0/+156
Provide a new extended page flag, _PAGE_WIRED and an SH4 implementation for wiring TLB entries and use it in the fixmap code path so that we can wire the fixmap TLB entry. Signed-off-by: Matt Fleming <matt@console-pimps.org>
2010-01-15sh: Generalize SH7786 PCIe support.Paul Mundt2-2/+2
Previously this was only built in for Urquell boards, but the same approach can be used on SDK7786 now that the mode pin reading is supported, so make it generic to SH7786. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: mach-sdk7786: mode pins support.Paul Mundt1-0/+18
This wires up the mode pins support on the SDK7786. The pins are standard SH7786 pins, and all are fixed in software. Needed for the clock framework, PCIe, and so forth. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: Fix up the secondary CPU entry point for 32bit mode.Paul Mundt1-1/+4
Presently the secondary CPU entry point is only aimed at 29bit phys mode, causing it to point to a stray virtual address in 32bit mode. Fix it up after consulting with our shiny new __in_29bit_mode(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: Guard against early IPIs in flush_cache_all().Paul Mundt1-2/+11
flush_cache_all() gets called in to when we do some early ioremapping. Unfortunately on SDK7786 the interrupt controller itself requires ioremapping, leading to a bit of a chicken and egg scenario. For now, don't bother with IPI crosscalls if there aren't any other CPUs online. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: heartbeat: Update boards for access size hinting.Paul Mundt12-151/+74
This updates the existing boards that specify the register width through platform data to use the resource flags instead. This eliminates platform data completely in most cases, and permits further improvement in the heartbeat driver as well as shrinking the overall private data size. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: mach-sdk7786: heartbeat support.Paul Mundt1-0/+15
Hand off the user LEDs to the heartbeat driver. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: heartbeat: Support access size specification via resource flags.Paul Mundt1-5/+17
This permits the resource access size to be handed off through the resource flags, which saves platforms from having to establish platform data only to specify the register width. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-15sh: Fix CONFIG_PMB=n build.Matt Fleming1-1/+2
The last commit introduced the following breakage arch/sh/include/asm/mmu.h: In function 'pmb_remap': arch/sh/include/asm/mmu.h:79: error: expected ';' before '}' token and... arch/sh/include/asm/mmu.h:78: error: 'EINVAL' undeclared (first use in this function) arch/sh/include/asm/mmu.h:78: error: (Each undeclared identifier is reported only once arch/sh/include/asm/mmu.h:78: error: for each function it appears in.) arch/sh/include/asm/mmu.h: In function 'pmb_init': arch/sh/include/asm/mmu.h:87: error: 'ENODEV' undeclared (first use in this function) Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-14sh: Preliminary SDK7786 board support.Paul Mundt6-0/+1670
This stubs in some preliminary board support for the RTE SDK7786. This is quite stunted at the moment, and primarily builds on top of the system FPGA. FPGA IRQs are handled via CPU IRL masking for simplicity, with initial peripheral support restricted to the debug ethernet. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: Rename split-level pgtable headers.Paul Mundt3-8/+8
These were originally named _nopmd and _pmd to follow their asm-generic counterparts, but we rename them to -2level and -3level for general consistency. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: default to extended TLB support.Paul Mundt6-41/+17
All SH-X2 and SH-X3 parts support an extended TLB mode, which has been left as experimental since support was originally merged. Now that it's had some time to stabilize and get some exposure to various platforms, we can drop it as an option and default enable it across the board. This is also good future proofing for newer parts that will drop support for the legacy TLB mode completely. This will also force 3-level page tables for all newer parts, which is necessary both for the varying page sizes and larger memories. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: Make all PxSEGADDR() calls fatal for non-legacy configs.Paul Mundt1-1/+9
This stubs out all of the PxSEGADDR() wrappers for non-legacy code. 29-bit will continue to work with these, while 32-bit code will now blow up on compile rather than at runtime. The vast majority of the in-tree offenders are gone, with the only remaining culprits being unable to support 32-bit mode. Hopefully this will prevent anyone from ever using these again. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: Fix up L2 cache comment typo.Paul Mundt1-1/+1
Valid sizes include 256kB, not 258kB. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: fixed PMB mode refactoring.Paul Mundt11-97/+117
This introduces some much overdue chainsawing of the fixed PMB support. fixed PMB was introduced initially to work around the fact that dynamic PMB mode was relatively broken, though they were never intended to converge. The main areas where there are differences are whether the system is booted in 29-bit mode or 32-bit mode, and whether legacy mappings are to be preserved. Any system booting in true 32-bit mode will not care about legacy mappings, so these are roughly decoupled. Regardless of the entry point, PMB and 32BIT are directly related as far as the kernel is concerned, so we also switch back to having one select the other. With legacy mappings iterated through and applied in the initialization path it's now possible to finally merge the two implementations and permit dynamic remapping overtop of remaining entries regardless of whether boot mappings are crafted by hand or inherited from the boot loader. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: PVR detection for 2nd cut SH7786.Matt Fleming1-0/+1
The mass produced cuts use an updated PVR value, add them to the list. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: Add a vmlinux.bin target.Paul Mundt1-1/+3
This makes vmlinux.bin generation an explicit make target, as opposed to just a dependency for some of the other targets. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: Add support for LZO-compressed kernels.Paul Mundt5-8/+26
Plugs in LZO along with the others. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13Merge branches 'sh/xstate', 'sh/hw-breakpoints' and 'sh/stable-updates'Paul Mundt32-672/+1149
2010-01-13sh: Don't perform an icbi on a P2 addressMatt Fleming1-1/+1
The legacy P2 area may not always be mapped (for example when using PMB). So perform an icbi on an address that we know will always be mapped. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-13sh: Move over to dynamically allocated FPU context.Paul Mundt13-285/+292
This follows the x86 xstate changes and implements a task_xstate slab cache that is dynamically sized to match one of hard FP/soft FP/FPU-less. This also tidies up and consolidates some of the SH-2A/SH-4 FPU fragmentation. Now fpu state restorers are commonly defined, with the init_fpu()/fpu_init() mess reworked to follow the x86 convention. The fpu_init() register initialization has been replaced by xstate setup followed by writing out to hardware via the standard restore path. As init_fpu() now performs a slab allocation a secondary lighterweight restorer is also introduced for the context switch. In the future the DSP state will be rolled in here, too. More work remains for math emulation and the SH-5 FPU, which presently uses its own special (UP-only) interfaces. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Use SLAB_PANIC for thread_info slab cache.Paul Mundt1-2/+1
Presently this has a BUG_ON() for failure cases, as powerpc does. Switch this over to a SLAB_PANIC instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Always provide thread_info allocators.Paul Mundt4-35/+51
Presently the thread_info allocators are special cased, depending on THREAD_SHIFT < PAGE_SHIFT. This provides a sensible definition for them regardless of configuration, in preparation for extended CPU state. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Move start_thread() out of line.Paul Mundt2-11/+14
start_thread() will become a bit heavier with the xstate freeing to be added in, so move it out-of-line in preparation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: sh_bios detection.Paul Mundt1-4/+11
This adds some VBR sanity checks in the sh_bios code to ensure that the BIOS VBR is in range before blindly trapping in to it. This permits boards with varying boot loader configurations to always leave support for sh-bios enabled and it will just be disabled at run-time if not found. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Split out the unaligned counters and user bits.Paul Mundt4-135/+198
This splits out the unaligned access counters and userspace bits in to their own generic interface, which will allow them to be wired up on sh64 too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Consolidate the sh_bios earlyprintk code.Paul Mundt4-89/+79
Now that the sh-sci earlyprintk is taken care of by the sh-sci driver directly, there's no longer any reason for having a split-out early_printk framework. sh_bios is the only other thing that uses it, so we just migrate the leftovers in to there. As it's possible to have multiple early_param()'s for the same string, there's not much point in having this split out anymore anyways, particularly since the sh_bios dependencies are still special-cased within sh-sci itself. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Kill off more unused sh_bios callbacks.Paul Mundt2-6/+0
sh_bios_char_out() is not used by anything in-tree these days, so just get rid of it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh64: Fix up early serial fixmap.Paul Mundt1-2/+0
This was conditionalized on CONFIG_EARLY_PRINTK, which has subsequently gone away. Now that the serial driver always supports the early console, make sure we always establish the mapping. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: Tidy up the sh bios VBR handling.Paul Mundt4-33/+55
This moves the VBR handling out of the main trap handling code and in to the sh-bios helper code. A couple of accessors are added in order to permit other kernel code to get at the VBR value for state save/restore paths. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: default to sparseirq.Paul Mundt1-2/+3
As SH has a very sparse IRQ map by default, all new CPUs and boards benefit from using sparseirq by default. Despite this, there are still a few stragglers (mostly due to using a fixed IRQ range for their FPGA IRQ mappings), and these still need to be converted over one by one. As these are now in the minority, and we do not want to encourage this sort of brain-damage in newer board ports, we force sparseirq on. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-12sh: mach-se: Convert SE7343 FPGA to dynamic IRQ allocation.Paul Mundt3-50/+53
This gets rid of the arbitrary set of vectors used by the SE7722 FPGA interrupt controller and switches over to a completely dynamic set. No assumptions regarding a contiguous range are made, and the platform resources themselves need to be filled in lazily. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-08sh: consolidate atomic_cmpxchg()/atomic_add_unless() definitions.Paul Mundt3-117/+29
The LL/SC and IRQ versions were using generic stubs while the GRB version was just reimplementing what it already had for the standard cmpxchg() code. As we have optimized cmpxchg() implementations that are decoupled from the atomic code, simply falling back on the generic wrapper does the right thing. With this in place the GRB case is unaffected while the LL/SC case gets to use its optimized cmpxchg(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-06Merge branch 'master' into sh/hw-breakpointsPaul Mundt64-994/+3109
2010-01-06sh: select HAVE_HW_BREAKPOINT for all SUPERH32 CPUs.Paul Mundt1-1/+1
All SH CPUs (with the exception of sh64) support the UBC, so select HW_BREAKPOINT support by default. This fixes up the build for non-SH4A targets. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-06sh: Fix up nommu build for out-of-line pgtable changes.Paul Mundt1-0/+4
pgtable_cache_init() has been moved out-of-line, so we also need a dummy definition for it on nommu to fix up the build. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-05sh: Reclaim TIF_DEBUG.Paul Mundt1-2/+0
This was used by the old hw-breakpoints API, but now there is nothing is using it anymore, so just kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-05sh: Kill off dead UBC headers.Paul Mundt6-221/+8
Nothing is using these now, so kill them all off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-05sh: Abstracted SH-4A UBC support on hw-breakpoint core.Paul Mundt5-78/+254
This is the next big chunk of hw_breakpoint support. This decouples the SH-4A support from the core and moves it out in to its own stub, following many of the conventions established with the perf events layering. In addition to extending SH-4A support to encapsulate the remainder of the UBC channels, clock framework support for handling the UBC interface clock is added as well, allowing for dynamic clock gating. This also fixes up a regression introduced by the SIGTRAP handling that broke the ksym_tracer, to the extent that the current support works well with all of the ksym_tracer/ptrace/kgdb. The kprobes singlestep code will follow in turn. With this in place, the remaining UBC variants (SH-2A and SH-4) can now be trivially plugged in. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-05sh: Fix up breakpoint trap handler patching on SH-2A.Paul Mundt1-1/+1
SH-2A was referencing the old handler that no longer exists, fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-05sh: Drop down to a single quicklist.Paul Mundt1-1/+1
We previously had 2 quicklists, one for the PGD case and one for PTEs. Now that the PGD/PMD cases are handled through slab caches due to the multi-level configurability, only the PTE quicklist remains. As such, reduce NR_QUICK to its appropriate size and bump down the PTE quicklist index. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-05Merge branch 'sh/pgtable' of git://github.com/mfleming/linux-2.6Paul Mundt10-103/+73
2010-01-04Merge branch 'sh/stable-updates'Paul Mundt52-882/+3027
2010-01-04sh: update defconfigs.Paul Mundt49-871/+3005
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-04sh: Don't default enable PMB support.Paul Mundt1-1/+0
This has the adverse effect of converting many 29bit configs to 32bit mode, while this is a change that needs to be done manually for each platform. Turn it off by default in order to cut down on spurious bug reports. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-04sh: Disable PMB for SH4AL-DSP CPUs.Paul Mundt1-3/+3
While the PMB is available on SH-4A parts, SH4AL-DSP parts exclude it altogether. As such, explicitly disable PMB support for these parts. If this changes in the future for newer subtypes, this will have to be made more fine-grained. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-01-02sh: Move page table allocation out of lineMatt Fleming6-78/+66
We also switched away from quicklists and instead moved to slab caches. After benchmarking both implementations the difference is negligible. The slab caches suit us better though because the size of a pgd table is just 4 entries when we're using a 3-level page table layout and quicklists always deal with pages. Signed-off-by: Matt Fleming <matt@console-pimps.org>