aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel
Commit message (Collapse)AuthorAge
* modules: Fix module_bug_list list corruption raceLinus Torvalds2010-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With all the recent module loading cleanups, we've minimized the code that sits under module_mutex, fixing various deadlocks and making it possible to do most of the module loading in parallel. However, that whole conversion totally missed the rather obscure code that adds a new module to the list for BUG() handling. That code was doubly obscure because (a) the code itself lives in lib/bugs.c (for dubious reasons) and (b) it gets called from the architecture-specific "module_finalize()" rather than from generic code. Calling it from arch-specific code makes no sense what-so-ever to begin with, and is now actively wrong since that code isn't protected by the module loading lock any more. So this commit moves the "module_bug_{finalize,cleanup}()" calls away from the arch-specific code, and into the generic code - and in the process protects it with the module_mutex so that the list operations are now safe. Future fixups: - move the module list handling code into kernel/module.c where it belongs. - get rid of 'module_bug_list' and just use the regular list of modules (called 'modules' - imagine that) that we already create and maintain for other reasons. Reported-and-tested-by: Thomas Gleixner <tglx@linutronix.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Adrian Bunk <bunk@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make do_execve() take a const filename pointerDavid Howells2010-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Make do_execve() take a const filename pointer so that kernel_execve() compiles correctly on ARM: arch/arm/kernel/sys_arm.c:88: warning: passing argument 1 of 'do_execve' discards qualifiers from pointer target type This also requires the argv and envp arguments to be consted twice, once for the pointer array and once for the strings the array points to. This is because do_execve() passes a pointer to the filename (now const) to copy_strings_kernel(). A simpler alternative would be to cast the filename pointer in do_execve() when it's passed to copy_strings_kernel(). do_execve() may not change any of the strings it is passed as part of the argv or envp lists as they are some of them in .rodata, so marking these strings as const should be fine. Further kernel_execve() and sys_execve() need to be changed to match. This has been test built on x86_64, frv, arm and mips. Signed-off-by: David Howells <dhowells@redhat.com> Tested-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Mark arguments to certain syscalls as being constDavid Howells2010-08-13
| | | | | | | | | | | | | | | | Mark arguments to certain system calls as being const where they should be but aren't. The list includes: (*) The filename arguments of various stat syscalls, execve(), various utimes syscalls and some mount syscalls. (*) The filename arguments of some syscall helpers relating to the above. (*) The buffer argument of various write syscalls. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'perf-core-for-linus' of ↵Linus Torvalds2010-08-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (162 commits) tracing/kprobes: unregister_trace_probe needs to be called under mutex perf: expose event__process function perf events: Fix mmap offset determination perf, powerpc: fsl_emb: Restore setting perf_sample_data.period perf, powerpc: Convert the FSL driver to use local64_t perf tools: Don't keep unreferenced maps when unmaps are detected perf session: Invalidate last_match when removing threads from rb_tree perf session: Free the ref_reloc_sym memory at the right place x86,mmiotrace: Add support for tracing STOS instruction perf, sched migration: Librarize task states and event headers helpers perf, sched migration: Librarize the GUI class perf, sched migration: Make the GUI class client agnostic perf, sched migration: Make it vertically scrollable perf, sched migration: Parameterize cpu height and spacing perf, sched migration: Fix key bindings perf, sched migration: Ignore unhandled task states perf, sched migration: Handle ignored migrate out events perf: New migration tool overview tracing: Drop cpparg() macro perf: Use tracepoint_synchronize_unregister() to flush any pending tracepoint call ... Fix up trivial conflicts in Makefile and drivers/cpufreq/cpufreq.c
| * Merge branch 'linus' into perf/coreIngo Molnar2010-07-21
| |\ | | | | | | | | | | | | | | | Merge reason: Pick up the latest perf fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
| * \ Merge commit 'v2.6.35-rc3' into perf/coreIngo Molnar2010-06-18
| |\ \ | | | | | | | | | | | | Merge reason: Go from -rc1 base to -rc3 base, merge in fixes.
| * | | perf: Convert perf_event to local_tPeter Zijlstra2010-06-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since now all modification to event->count (and ->prev_count and ->period_left) are local to a cpu, change then to local64_t so we avoid the LOCK'ed ops. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
* | | | Merge branch 'master' into for-nextJiri Kosina2010-08-04
|\ \ \ \ | | |_|/ | |/| |
| * | | lmb: rename to memblockYinghai Lu2010-07-14
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via following scripts FILES=$(find * -type f | grep -vE 'oprofile|[^K]config') sed -i \ -e 's/lmb/memblock/g' \ -e 's/LMB/MEMBLOCK/g' \ $FILES for N in $(find . -name lmb.[ch]); do M=$(echo $N | sed 's/lmb/memblock/g') mv $N $M done and remove some wrong change like lmbench and dlmb etc. also move memblock.c from lib/ to mm/ Suggested-by: Ingo Molnar <mingo@elte.hu> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* / | fix typos concerning "precedence"Uwe Kleine-König2010-06-17
|/ / | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'sh/iomap'Paul Mundt2010-06-02
|\ \
| * | sh: support for platforms without PIO.Paul Mundt2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends some of the existing special casing for HAS_IOPORT platforms and gets it to the point where platforms can begin to conditionally select it. The major changes here are that the PIO routines themselves go away completely, including all of the machvec port mapping wrappers. With this in place it's possible for any non-machvec abusing platform to disable PIO completely. At present this is left as an opt-in until the abusers are the odd ones out instead of the majority. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | Merge branch 'master' of ↵Paul Mundt2010-05-30
|\ \ \ | |/ / |/| / | |/ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * ptrace: unify FDPIC implementationsMike Frysinger2010-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Blackfin/FRV/SuperH guys all have the same exact FDPIC ptrace code in their arch handlers (since they were probably copied & pasted). Since these ptrace interfaces are an arch independent aspect of the FDPIC code, unify them in the common ptrace code so new FDPIC ports don't need to copy and paste this fundamental stuff yet again. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Roland McGrath <roland@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | sh: handle early calls to return_address() when using dwarf unwinder.Paul Mundt2010-05-25
|/ | | | | | | | | | | | | The dwarf unwinder ties in to an early initcall, but it's possible that return_address() calls will be made prior to that. This implements some additional error handling in to the dwarf unwinder as well as an exit path in the return_address() case to bail out if the unwinder hasn't come up yet. This fixes a NULL pointer deref in early boot when mempool_alloc() blows up on the not-yet-ready mempool via dwarf_unwind_stack(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix up sh7786 dmaengine build.Paul Mundt2010-05-22
| | | | | | The asm/dmaengine.h header is gone now, update accordingly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add DMA slave definitions to sh7724Guennadi Liakhovetski2010-05-22
| | | | | | | Add a list of SCIF and SDHI DMA slave definitions to sh7724. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: add DMA slaves for two SDHI controllers to sh7722Guennadi Liakhovetski2010-05-22
| | | | | | | SuperH SDHI controllers can use DMA, add slave definitions to sh7722. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: define DMA slaves per CPU type, remove now redundant headerGuennadi Liakhovetski2010-05-22
| | | | | | | | | Now that DMA slave IDs are only used used in platform specific code and have become opaque cookies for the rest of the code, we can make the, CPU specific too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: fix up the dwarf unwinder build for MODULES=n.Paul Mundt2010-05-22
| | | | | | | Presently the dwarf unwinder build blows up if modules are disabled, fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: remove duplicated #includeHuang Weiyi2010-05-22
| | | | | | | | Remove duplicated #include('s) in arch/sh/kernel/cpu/sh4a/clock-sh7786.c Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* kgdb,sh: update superh kgdb exception handlingJason Wessel2010-05-20
| | | | | | | | | | | | | | | Implement kgdb_arch_pc() which adjusts the pc if it needs to be adjusted after a software breakpoint trap. Implement kgdb_arch_set_pc() which is a new required function in the kgdb debug core. When processing a single step return zero in the error exception field so that the debug core can distinguish between a single step trap and a breakpoint trap generically. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-by: Paul Mundt <lethal@linux-sh.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds2010-05-19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (127 commits) sh: update defconfigs. sh: Fix up the NUMA build for recent LMB changes. sh64: provide a stub per_cpu_trap_init() definition. sh: fix up CONFIG_KEXEC=n build. sh: fixup the docbook paths for clock framework shuffling. driver core: Early dev_name() depends on slab_is_available(). sh: simplify WARN usage in SH clock driver sh: Check return value of clk_get on ms7724 sh: Check return value of clk_get on ecovec24 sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.c sh: move sh clock.c contents to drivers/sh/clk. sh: move sh asm/clock.h contents to linux/sh_clk.h V2 sh: remove unused clock lookup sh: switch boards to clkdev sh: switch sh4-202 to clkdev sh: switch shx3 to clkdev sh: switch sh7757 to clkdev sh: switch sh7763 to clkdev sh: switch sh7780 to clkdev sh: switch sh7786 to clkdev ...
| * sh64: provide a stub per_cpu_trap_init() definition.Paul Mundt2010-05-18
| | | | | | | | | | | | | | | | This is needed to fix up the build at the moment. Gradually this will be reworked to follow the 32-bit initialization path and deal with delayed VBR initialization. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * Merge branch 'sh/lmb'Paul Mundt2010-05-13
| |\ | | | | | | | | | | | | Conflicts: arch/sh/kernel/setup.c
| | * sh: Ensure active regions have a backing PMB entry.Paul Mundt2010-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the NUMA or memory hot-add case where system memory has been partitioned up, we immediately run in to a situation where the existing PMB entry doesn't cover the new range (primarily as a result of the entry size being shrunk to match the node size early in the initialization). In order to fix this up it's necessary to preload a PMB mapping for the new range prior to activation in order to circumvent reset by MMU. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: bootmem refactoring.Paul Mundt2010-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks much of the bootmem setup and initialization code allowing us to get rid of duplicate work between the NUMA and non-NUMA cases. The end result is that we end up with a much more flexible interface for supporting more complex topologies (fake NUMA, highmem, etc, etc.) which is entirely LMB backed. This is an incremental step for more NUMA work as well as gradually enabling migration off of bootmem entirely. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: rework memory limits to work with LMB.Paul Mundt2010-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * sh: enable LMB region setup via machvec.Paul Mundt2010-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * sh: bump up extra LMB reservations in bootmem init.Paul Mundt2010-05-07
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * sh: convert initrd reservation to LMB.Paul Mundt2010-05-07
| | | | | | | | | | | | | | | | | | This switches over from bootmem -> LMB for the initrd area reservation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * sh: convert kexec crash kernel management to LMB.Paul Mundt2010-05-07
| | | | | | | | | | | | | | | | | | This migrates the crash kernel handling off of bootmem and over to LMB. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | Merge branch 'sh/clkfwk'Paul Mundt2010-05-13
| |\ \
| | * | sh: move sh clock-cpg.c contents to drivers/sh/clk-cpg.cMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the CPG helpers to drivers/sh/clk-cpg.c V2. This to allow SH-Mobile ARM to share the code with SH. All functions except the legacy CPG stuff is moved. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: move sh clock.c contents to drivers/sh/clk.Magnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is V2 of the SH clock framework move from arch/sh/kernel/cpu/clock.c to drivers/sh/clk.c. All code except the following functions are moved: clk_init(), clk_get() and clk_put(). The init function is still kept in clock.c since it depends on the SH-specific machvec implementation. The symbols clk_get() and clk_put() already exist in the common ARM clkdev code, those symbols are left in the SH tree to avoid duplicating them for SH-Mobile ARM. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: remove unused clock lookupMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now when all clocks are registered using clkdev, get rid of the special SH-specific clock lookup. Also ditch the unused module ref counting code. This patch syncs the SH behaviour with ARM. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh4-202 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh4-202 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch shx3 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining shx3 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7757 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7757 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7763 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7763 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7780 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7780 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7786 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7786 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7785 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7785 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7366 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7366 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7343 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7343 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7722 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7722 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7723 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7723 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch sh7724 to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the remaining sh7724 clocks to use clkdev for lookup. The now unused name and id from struct clk are also removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: switch legacy clocks to clkdevMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts the legacy clocks to register using clkdev. Also the clock name is removed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| | * | sh: get rid of div4 clock nameMagnus Damm2010-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the name parameter from SH_CLK_DIV4() and adjust the processor specific code. The lookup happens using clkdev so the name is unused. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>