aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-10sh: rework memory limits to work with LMB.Paul Mundt3-45/+40
This reworks the memory limit handling to tie in through the available LMB infrastructure. This requires a bit of reordering as we need to have all of the LMB reservations taken care of prior to establishing the limits. While we're at it, the crash kernel reservation semantics are reworked so that we allocate from the bottom up and reduce the risk of having to disable the memory limit due to a clash with the crash kernel reservation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-10sh: enable LMB region setup via machvec.Paul Mundt6-15/+24
This plugs in a memory init callback in the machvec to permit boards to wire up various bits of memory directly in to LMB. A generic machvec implementation is provided that simply wraps around the normal Kconfig-derived memory start/size. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07sh: bump up extra LMB reservations in bootmem init.Paul Mundt1-4/+6
This bumps up the extra LMB reservations in ordering so that they're accounted for prior to iterating over the region list. This ensures that reservations are visible both within the LMB and bootmem context. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07sh: convert initrd reservation to LMB.Paul Mundt1-1/+1
This switches over from bootmem -> LMB for the initrd area reservation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-07sh: convert kexec crash kernel management to LMB.Paul Mundt3-44/+58
This migrates the crash kernel handling off of bootmem and over to LMB. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-05-06sh: Make initrd detection more robust.Paul Mundt1-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>
2010-04-29sh: native_cpu_disable() build error when CONFIG_HOTPLUG_CPU=nMatt Fleming1-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>
2010-04-29sh: add CONFIG_VIRTUALIZATION for virtio supportMagnus Damm1-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>
2010-04-27sh: make latencytop available on SMP, too.Paul Mundt1-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>
2010-04-26Merge branch 'sh/smp'Paul Mundt15-40/+373
2010-04-26sh: CPU hotplug support for SH-X3 SMP.Paul Mundt1-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>
2010-04-26sh: CPU hotplug support.Paul Mundt8-6/+194
This adds preliminary support for CPU hotplug for SH SMP systems. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-26sh: cache secondary CPUs idle loop.Paul Mundt2-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>
2010-04-26sh: flag smp_store_cpu_info() __cpuinit.Paul Mundt1-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>
2010-04-26sh: provide percpu CPU states for hotplug notifiers.Paul Mundt2-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>
2010-04-26sh: Make sure all SH-X3 cores are populated in the present CPU map.Paul Mundt1-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>
2010-04-26sh: convert online CPU map twiddling to cpumask.Paul Mundt2-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>
2010-04-26sh: arch/sh/kernel/setup.c needs asm/smp.h.Paul Mundt1-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>
2010-04-26sh: Flag present CPUs hotpluggable in topology registration.Paul Mundt1-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>
2010-04-26sh: mach-sdk7786: update defconfig for compressed kernel image.Paul Mundt2-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>
2010-04-26sh: Kill off dangling goto labels from oom-killer rework.Paul Mundt2-2/+0
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-26Merge branch 'sh/stable-updates'Paul Mundt25-11/+21
Conflicts: arch/sh/kernel/dwarf.c drivers/dma/shdma.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-26sh: sh7751 pci controller io port fixMagnus Damm1-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>
2010-04-26sh: Fix maximum number of SCIF ports in R2D defconfigsMagnus Damm2-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>
2010-04-26SH: fix TS field shift calculation for DMA driversGuennadi Liakhovetski1-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>
2010-04-26Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/mfleming/sh-2.6Paul Mundt5-6/+24
* '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
2010-04-26SH: constify multiple DMA related objects and references to themGuennadi Liakhovetski5-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>
2010-04-26sh: invoke oom-killer from page faultNick Piggin2-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>
2010-04-25sh: Use correct mask when comparing PMB DATA array valuesMatt Fleming1-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>
2010-04-25sh: Do not try merging two 128MB PMB mappingsMatt Fleming1-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>
2010-04-25sh: Fix zImage load address when CONFIG_32BIT=yMatt Fleming1-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>
2010-04-25sh: Fix address to decompress at when CONFIG_32BIT=yMatt Fleming1-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>
2010-04-25sh: Assembly friendly __pa and __va definitionsMatt Fleming1-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>
2010-04-21sh: Move platform smp ops in to their own structure.Paul Mundt9-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>
2010-04-21sh: __cpuinit annotate the CPU init path.Paul Mundt5-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>
2010-04-21sh: Tidy CPU probing and fixup section annotations.Paul Mundt8-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>
2010-04-21sh: hw-breakpoints: Kill off stub unthrottle callback.Paul Mundt2-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>
2010-04-20sh: Zero out aliases counter when using SH-X3 hardware assistance.Paul Mundt1-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>
2010-04-20sh: dwarf unwinder needs linux/module.h.Paul Mundt1-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>
2010-04-19sh: Enable SH-X3 hardware synonym avoidance handling.Paul Mundt3-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>
2010-04-19sh: mach-sdk7786: pm_power_off support.Paul Mundt2-0/+23
This wires up power-off support for the SDK7786 board. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-15sh: intc: IRQ auto-distribution support.Paul Mundt3-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>
2010-04-15sh: Disable IRQ balancing for timer and IPI IRQs.Paul Mundt1-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>
2010-04-13sh: intc: userimask support.Paul Mundt2-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>
2010-04-13sh: dmaengine support for SH7786 DMAC0.Paul Mundt2-2/+83
Hook up DMAC0 on SH7786. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-07sh: Disable MMUCR_AT for SH-4 nommu.Paul Mundt1-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>
2010-04-05Merge branch 'sh/stable-updates'Paul Mundt5-28/+78
2010-04-05Merge branch 'master' into export-slabhTejun Heo11-83/+294
2010-04-02sh: Fix up the SH-3 build for recent TLB changes.Paul Mundt4-28/+75
While the MMUCR.URB and ITLB/UTLB differentiation works fine for all SH-4 and later TLBs, these features are absent on SH-3. This splits out local_flush_tlb_all() in to SH-4 and PTEAEX copies while restoring the old SH-3 one, subsequently fixing up the build. This will probably want some further reordering and tidying in the future, but that's out of scope at present. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-02sh: export return_address() symbol.Paul Mundt1-0/+3
This is needed with some of the tracing code built as modules, so provide the export. Signed-off-by: Paul Mundt <lethal@linux-sh.org>