summaryrefslogtreecommitdiff
path: root/arch/sh
Commit message (Collapse)AuthorAgeFilesLines
* sh: tie in div6 clocks using clkdevMagnus Damm2010-05-115-19/+65
| | | | | | | | Use clkdev for div6 lookup on SH-Mobile processors: sh7343/sh7366/sh7722/sh7723/sh7724 Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: get rid of hwblk clock namesMagnus Damm2010-05-114-153/+133
| | | | | | | | Remove the clock name from sh7722/sh7723/sh7724 hwblk clocks. Lookup is handled by clkdev. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: allow registering clocks without nameMagnus Damm2010-05-111-3/+4
| | | | | | | | | Modify the SuperH clock code to support struct clk with NULL as name. Such clocks will not be hooked up to debugfs. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: tie in hwblk clocks using clkdevMagnus Damm2010-05-113-4/+119
| | | | | | | | Use clkdev for lookup of hwblk clocks on sh7722/sh7723/sh7724. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: scif and tmu clkdev changesMagnus Damm2010-05-113-15/+112
| | | | | | | | Modify sh7722/sh7723/sh7724 to use clkdev for TMU and SCIF clock lookups. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: hwblk index reworkMagnus Damm2010-05-115-18/+23
| | | | | | | | Rework the sh7722/sh7723/sh7724 hwblk code to use the hwblk id as index in the mstp clock array. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Make initrd detection more robust.Paul Mundt2010-05-061-20/+58
| | | | | | | | | | Various boot loaders go to various extents to thwart the initrd detection logic (mostly on account of not being able to be bothered with adhering to the established boot ABI), so we make the detection logic a bit more robust. This makes it possible to work around the SDK7786's firmware's attempts to thwart compressed image booting. Victory is mine. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: native_cpu_disable() build error when CONFIG_HOTPLUG_CPU=nMatt Fleming2010-04-291-1/+1
| | | | | | | | arch/sh/kernel/smp.c:164: error: conflicting types for 'native_cpu_disable' /home/matt/src/kernels/sh-2.6/arch/sh/include/asm/smp.h:48: error: previous declaration of 'native_cpu_disable' was here Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add CONFIG_VIRTUALIZATION for virtio supportMagnus Damm2010-04-291-0/+16
| | | | | | | | | Add CONFIG_VIRTUALIZATION to the SH architecture and include the virtio code there. Used to enable the virtio drivers under QEMU. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: make latencytop available on SMP, too.Paul Mundt2010-04-271-1/+0
| | | | | | | | | The UP dependency was inherited from ARM, which seems to have run in to it due to the stacktrace code not being available for SMP in certain cases, as we don't have this particular limitation there is no specific need to block on the SMP dependency. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* Merge branch 'sh/smp'Paul Mundt2010-04-2615-40/+373
|\
| * sh: CPU hotplug support for SH-X3 SMP.Paul Mundt2010-04-261-0/+47
| | | | | | | | | | | | | | | | | | This wires up CPU hotplug for SH-X3 SMP CPUs. Presently only secondary cores can be hotplugged given that the boot CPU has to contend with the broadcast timer. When real local timers are implemented this restriction can be lifted. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: CPU hotplug support.Paul Mundt2010-04-268-6/+194
| | | | | | | | | | | | This adds preliminary support for CPU hotplug for SH SMP systems. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: cache secondary CPUs idle loop.Paul Mundt2010-04-262-4/+13
| | | | | | | | | | | | | | | | This provides a cache of the secondary CPUs idle loop for the cases where hotplug simply enters a low power state instead of resetting or powering off the core. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: flag smp_store_cpu_info() __cpuinit.Paul Mundt2010-04-261-2/+2
| | | | | | | | | | | | | | smp_store_cpu_info() is presently flagged as __init, but is called by start_secondary() which is __cpuinit, fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: provide percpu CPU states for hotplug notifiers.Paul Mundt2010-04-262-4/+13
| | | | | | | | | | | | | | This provides percpu CPU states in preparation for CPU hotplug and the associated notifier chains. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Make sure all SH-X3 cores are populated in the present CPU map.Paul Mundt2010-04-261-0/+3
| | | | | | | | | | | | | | This iterates over the maximum number of CPUs we plan to support and makes sure they're all set in the present CPU map. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: convert online CPU map twiddling to cpumask.Paul Mundt2010-04-262-2/+2
| | | | | | | | | | | | | | | | | | This converts from cpu_set() for the online map to set_cpu_online(). The two online map modifiers were the last remaining manual map manipulation bits, with this in place everything now goes through cpumask. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: arch/sh/kernel/setup.c needs asm/smp.h.Paul Mundt2010-04-261-0/+1
| | | | | | | | | | | | | | | | With the platform ops migration, the definitions still need to be included in the CONFIG_SMP=n case, so make the asm/smp.h include explicit. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Flag present CPUs hotpluggable in topology registration.Paul Mundt2010-04-261-1/+5
| | | | | | | | | | | | | | When registering CPUs in the topology initialization ensure that all of the present CPUs are flagged as hotpluggable. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Move platform smp ops in to their own structure.Paul Mundt2010-04-219-23/+95
| | | | | | | | | | | | | | | | This cribs the MIPS plat_smp_ops approach for wrapping up the platform ops. This will allow for mixing and matching different ops on the same platform in the future. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: mach-sdk7786: update defconfig for compressed kernel image.Paul Mundt2010-04-262-193/+444
| | | | | | | | | | | | | | Now that compressed image loading is possible for sdk7786, drop the vmlinux.bin default image target and update the defconfig accordingly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off dangling goto labels from oom-killer rework.Paul Mundt2010-04-262-2/+0
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge branch 'sh/stable-updates'Paul Mundt2010-04-2625-11/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/sh/kernel/dwarf.c drivers/dma/shdma.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: sh7751 pci controller io port fixMagnus Damm2010-04-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the sh7751 pci code to handle io ports correctly. The code is based on the sh7788x implementation. Tested on a R2D-1 board with CONFIG_8139TOO_PIO=y. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh: Fix maximum number of SCIF ports in R2D defconfigsMagnus Damm2010-04-262-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the R2D defconfigs to bump up the maximum number of SCIF ports on the system. Fixes a broken serial console regression added by cd5f107628ab89c5dec5ad923f1c27f4cba41972. Reported-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> Signed-off-by: Magnus Damm <damm@opensource.se> Tested-by: Alexandre Courbot <alex@dcl.info.waseda.ac.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | SH: fix TS field shift calculation for DMA driversGuennadi Liakhovetski2010-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | CHCR_TS_HIGH_SHIFT is defined as a shift of TS high bits in CHCR register, relative to low bits. The TS_INDEX2VAL() macro has to take this into account. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | Merge branch 'master' into export-slabhTejun Heo2010-04-0511-83/+294
| |\ \
| * | | include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-3021-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* | | | Merge branch 'master' of ↵Paul Mundt2010-04-265-6/+24
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/mfleming/sh-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mfleming/sh-2.6: sh: Use correct mask when comparing PMB DATA array values sh: Do not try merging two 128MB PMB mappings sh: Fix zImage load address when CONFIG_32BIT=y sh: Fix address to decompress at when CONFIG_32BIT=y sh: Assembly friendly __pa and __va definitions
| * | | | sh: Use correct mask when comparing PMB DATA array valuesMatt Fleming2010-04-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were masking the PMB DATA array values with the value of __MEMORY_START | PMB_V, which misses some PFN bits off the mask. Signed-off-by: Matt Fleming <matt@console-pimps.org>
| * | | | sh: Do not try merging two 128MB PMB mappingsMatt Fleming2010-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a logic error in pmb_merge() that means we will incorrectly try to merge two 128MB PMB mappings into one mapping. However, 256MB isn't a valid PMB map size and pmb_merge() will actually drop the second 128MB mapping. This patch allows my SDK7786 board to boot when configured with CONFIG_MEMORY_SIZE=0x10000000. Signed-off-by: Matt Fleming <matt@console-pimps.org>
| * | | | sh: Fix zImage load address when CONFIG_32BIT=yMatt Fleming2010-04-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't necessarily use the P1SEG region to access RAM when running in 32BIT mode, so use CONFIG_MEMORY_START as the base address. Signed-off-by: Matt Fleming <matt@console-pimps.org>
| * | | | sh: Fix address to decompress at when CONFIG_32BIT=yMatt Fleming2010-04-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running in 32BIT mode the P1SEG region doesn't necessarily provide a window onto RAM (it depends how the bootloader setup the PMB). The correct location to place the decompressed kernel is the physical address of _text. Signed-off-by: Matt Fleming <matt@console-pimps.org>
| * | | | sh: Assembly friendly __pa and __va definitionsMatt Fleming2010-04-251-4/+9
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch defines ___pa and ___va which return the physical and virtual address of an address, respectively. These macros are suitable for calling from assembly because they don't include the C casts required by __pa and __va. Signed-off-by: Matt Fleming <matt@console-pimps.org>
* | | | SH: constify multiple DMA related objects and references to themGuennadi Liakhovetski2010-04-265-58/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lists of DMA channels and slaves are not changed, make them constant. Besides, SH7724 channel and slave configuration of both DMA controllers is identical, remove the extra copy of the configuration data. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | | sh: invoke oom-killer from page faultNick Piggin2010-04-262-24/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As explained in commit 1c0fe6e3bd, we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Cc: linux-sh@vger.kernel.org Cc: linux-arch@vger.kernel.org Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: __cpuinit annotate the CPU init path.Paul Mundt2010-04-215-14/+13
| | | | | | | | | | | | | | | | | | | | | All of the regular CPU init path needs to be __cpuinit annotated for CPU hotplug. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Tidy CPU probing and fixup section annotations.Paul Mundt2010-04-218-22/+9
| | | | | | | | | | | | | | | | | | | | | | | | This does a detect_cpu_and_cache_system() -> cpu_probe() rename, tidies up the unused return value, and stuffs it under __cpuinit in preparation for CPU hotplug. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: hw-breakpoints: Kill off stub unthrottle callback.Paul Mundt2010-04-212-6/+0
| | | | | | | | | | | | | | | | | | | | | This follows the x86 change and kills off the unthrottle stub. As the x86 change killed off the generic callback it isn't used anymore anyways. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Zero out aliases counter when using SH-X3 hardware assistance.Paul Mundt2010-04-201-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This zeroes out the number of cache aliases in the cache info descriptors when hardware alias avoidance is enabled. This cuts down on the amount of flushing taken care of by common code, and also permits coherency control to be disabled for the single CPU and 4k page size case. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: dwarf unwinder needs linux/module.h.Paul Mundt2010-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Previously the struct module definition was pulled in from other headers, but we want the reference to be explicit. Fixes up randconfig build issues. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Enable SH-X3 hardware synonym avoidance handling.Paul Mundt2010-04-193-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | This enables support for the hardware synonym avoidance handling on SH-X3 CPUs for the case where dcache aliases are possible. icache handling is retained, but we flip on broadcasting of the block invalidations due to the lack of coherency otherwise on SMP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: mach-sdk7786: pm_power_off support.Paul Mundt2010-04-192-0/+23
| | | | | | | | | | | | | | | | | | This wires up power-off support for the SDK7786 board. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: intc: IRQ auto-distribution support.Paul Mundt2010-04-153-26/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements support for hardware-managed IRQ balancing as implemented by SH-X3 cores (presently only hooked up for SH7786, but can probably be carried over to other SH-X3 cores, too). CPUs need to specify their distribution register along with the mask definitions, as these follow the same format. Peripheral IRQs that don't opt out of balancing will be automatically distributed at the whim of the hardware block, while each CPU needs to verify whether it is handling the IRQ or not, especially before clearing the mask. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Disable IRQ balancing for timer and IPI IRQs.Paul Mundt2010-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Make sure that the timer IRQs and IPIs aren't enabled for IRQ balancing. IPIs are disabled as a result of being percpu while the timers simply disable balancing outright. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: intc: userimask support.Paul Mundt2010-04-132-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for hardware-assisted userspace irq masking for special priority levels. Due to the SR.IMASK interactivity, only some platforms implement this in hardware (including but not limited to SH-4A interrupt controllers, and ARM-based SH-Mobile CPUs). Each CPU needs to wire this up on its own, for now only SH7786 is wired up as an example. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: dmaengine support for SH7786 DMAC0.Paul Mundt2010-04-132-2/+83
| | | | | | | | | | | | | | | | | | Hook up DMAC0 on SH7786. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | sh: Disable MMUCR_AT for SH-4 nommu.Paul Mundt2010-04-071-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Presently address translation is default-enabled regardless of whether CONFIG_MMU is set or not in the SH-4 case, this fixes it up, and also makes the control init word a bit more readable in the process. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | Merge branch 'sh/stable-updates'Paul Mundt2010-04-055-28/+78
|\ \ \ | | |/ | |/|