aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-10sh: rework memory limits to work with LMB.Paul Mundt2-44/+39
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 Mundt2-13/+14
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 Mundt2-44/+50
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-26Merge branch 'sh/smp'Paul Mundt7-32/+263
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 Mundt4-3/+152
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 Mundt1-4/+9
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 Mundt1-4/+10
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-26Merge branch 'sh/stable-updates'Paul Mundt9-3/+6
Conflicts: arch/sh/kernel/dwarf.c drivers/dma/shdma.c 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 Mundt1-1/+4
* '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-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-21sh: Move platform smp ops in to their own structure.Paul Mundt4-16/+32
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 Mundt3-12/+12
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 Mundt6-18/+7
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 Mundt1-5/+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: 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-15sh: intc: IRQ auto-distribution support.Paul Mundt2-26/+59
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 Mundt1-0/+3
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 Mundt1-1/+81
Hook up DMAC0 on SH7786. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-04-05Merge branch 'sh/stable-updates'Paul Mundt1-0/+3
2010-04-05Merge branch 'master' into export-slabhTejun Heo3-2/+6
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>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo9-3/+6
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>
2010-03-30Merge branches 'sh/intc-extension', 'sh/dmaengine', 'sh/serial-dma' and 'sh/clkfwk'Paul Mundt36-492/+405
Conflicts: arch/sh/kernel/cpu/clock.c Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-30sh: sh7724 clkdev lookups.Paul Mundt2-10/+41
Conver to TMU clock lookups for SH7724. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7723 clkdev lookups.Paul Mundt2-11/+42
Convert to TMU clock lookups for SH7723. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7722 clock string death.Paul Mundt2-6/+2
Kills off clock string usage, using the new function clock definition instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7366 clock string death.Paul Mundt2-6/+2
Kills off clock string usage, using the new function clock definition instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7343 clock string death.Paul Mundt2-6/+2
Kills off clock string usage, using the new function clock definition instead. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: Kill off timer clock strings for legacy CPG parts.Paul Mundt18-77/+0
Now with the lookup aliases in place there is no longer any need to provide the clock string, kill it off for all legacy CPG CPUs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: provide some clock lookup aliases for legacy CPG parts.Paul Mundt1-0/+5
For the CPUs that have not yet been converted off of legacy CPG we provide some pclk aliases in order to make driver migration easier. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7785 clkdev lookups.Paul Mundt2-7/+38
Convert to TMU clock lookups for SH7785. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: sh7786 clkdev lookups.Paul Mundt2-12/+68
This plugs in clkdev lookups for the SH7786 clocks and migrates off of clock string usage for the TMU clocks. Previously the TMU clocks were aliased to the peripheral clock, so this gets the driver actually toggling the proper clocks now as well. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29sh: Enable the mmu in start_secondary()Matt Fleming1-0/+1
For the boot, enable_mmu() is called from setup_arch() but we don't call setup_arch() for any of the other cpus. So turn on the non-boot cpu's mmu inside of start_secondary(). I noticed this bug on an SMP board when trying to map I/O memory (smsc911x registers) into the kernel address space. Since the Address Translation bit in MMUCR wasn't set, accessing the virtual address where the smsc911x registers were supposedly mapped actually performed a physical address access. Signed-off-by: Matt Fleming <matt@console-pimps.org> Cc: stable@kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-29arch/sh/kernel: Use set_cpus_allowed_ptrJulia Lawall1-2/+2
Use set_cpus_allowed_ptr rather than set_cpus_allowed. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression E1,E2; @@ - set_cpus_allowed(E1, cpumask_of_cpu(E2)) + set_cpus_allowed_ptr(E1, cpumask_of(E2)) @@ expression E; identifier I; @@ - set_cpus_allowed(E, I) + set_cpus_allowed_ptr(E, &I) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23sh: Silence unintialized variable warnings in dwarf unwinder.Paul Mundt1-2/+2
The parent rb_node needs to be initialized to shut up the compiler, even though we're unlikely to ever hit this issue at run time. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23sh: Tidy up a couple of section mismatches.Paul Mundt2-2/+2
select_idle_routine() and register_sh_pmu() both needed their annotations fixed up to silence section mismatch warnings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-23sh64: Remove long unused mid_sched macroAndreas Bombe1-7/+0
interruptible_sleep_on() is referenced for use in the mid_sched macro which is not used anywhere. Remove reference and macro as well as the comment which appears to belong with them. Signed-off-by: Andreas Bombe <aeb@debian.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-03-18Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tipLinus Torvalds1-1/+19
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (35 commits) perf: Fix unexported generic perf_arch_fetch_caller_regs perf record: Don't try to find buildids in a zero sized file perf: export perf_trace_regs and perf_arch_fetch_caller_regs perf, x86: Fix hw_perf_enable() event assignment perf, ppc: Fix compile error due to new cpu notifiers perf: Make the install relative to DESTDIR if specified kprobes: Calculate the index correctly when freeing the out-of-line execution slot perf tools: Fix sparse CPU numbering related bugs perf_event: Fix oops triggered by cpu offline/online perf: Drop the obsolete profile naming for trace events perf: Take a hot regs snapshot for trace events perf: Introduce new perf_fetch_caller_regs() for hot regs snapshot perf/x86-64: Use frame pointer to walk on irq and process stacks lockdep: Move lock events under lockdep recursion protection perf report: Print the map table just after samples for which no map was found perf report: Add multiple event support perf session: Change perf_session post processing functions to take histogram tree perf session: Add storage for seperating event types in report perf session: Change add_hist_entry to take the tree root instead of session perf record: Add ID and to recorded event data when recording multiple events ...