aboutsummaryrefslogtreecommitdiff
path: root/arch/sh
AgeCommit message (Collapse)Author
2010-04-26sh: Fix FDPIC binary loaderAndrew Stubbs
commit d5ab780305bb6d60a7b5a74f18cf84eb6ad153b1 upstream. Ensure that the aux table is properly initialized, even when optional features are missing. Without this, the FDPIC loader did not work. Signed-off-by: Andrew Stubbs <ams@codesourcery.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-26sh: Enable the mmu in start_secondary()Matt Fleming
commit 4bea3418c737891894b9d3d3e9f8bbd67d66fa38 upstream. 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> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-01sh: Fix zImage boot using fixed PMB.Nobuhiro Iwamatsu
commit 319c2cc761505ee54a9536c5d0b9c2ee3fb33866 upstream. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-02-23sh: Couple kernel and user write page perm bits for CONFIG_X2TLBMatt Fleming
commit fcb4ebd678858850e8b029909064175cb627868d upstream. pte_write() should check whether the permissions include either the user or kernel write permission bits. Likewise, pte_wrprotect() needs to remove both the kernel and user write bits. Without this patch handle_tlbmiss() doesn't handle faulting in pages from the P3 area (our vmalloc space) because of a write. Mappings of the P3 space have the _PAGE_EXT_KERN_WRITE bit but not _PAGE_EXT_USER_WRITE. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-02-09Split 'flush_old_exec' into two functionsLinus Torvalds
commit 221af7f87b97431e3ee21ce4b0e77d5411cf1549 upstream. 'flush_old_exec()' is the point of no return when doing an execve(), and it is pretty badly misnamed. It doesn't just flush the old executable environment, it also starts up the new one. Which is very inconvenient for things like setting up the new personality, because we want the new personality to affect the starting of the new environment, but at the same time we do _not_ want the new personality to take effect if flushing the old one fails. As a result, the x86-64 '32-bit' personality is actually done using this insane "I'm going to change the ABI, but I haven't done it yet" bit (TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the personality, but just the "pending" bit, so that "flush_thread()" can do the actual personality magic. This patch in no way changes any of that insanity, but it does split the 'flush_old_exec()' function up into a preparatory part that can fail (still called flush_old_exec()), and a new part that will actually set up the new exec environment (setup_new_exec()). All callers are changed to trivially comply with the new world order. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-18untangle the do_mremap() messAl Viro
This backports the following upstream commits all as one patch: 54f5de709984bae0d31d823ff03de755f9dcac54 ecc1a8993751de4e82eb18640d631dae1f626bd6 1a0ef85f84feb13f07b604fcf5b90ef7c2b5c82f f106af4e90eadd76cfc0b5325f659619e08fb762 097eed103862f9c6a97f2e415e21d1134017b135 935874141df839c706cd6cdc438e85eb69d1525e 0ec62d290912bb4b989be7563851bc364ec73b56 c4caa778157dbbf04116f0ac2111e389b5cd7a29 2ea1d13f64efdf49319e86c87d9ba38c30902782 570dcf2c15463842e384eb597a87c1e39bead99b 564b3bffc619dcbdd160de597b0547a7017ea010 0067bd8a55862ac9dd212bd1c4f6f5bff1ca1301 f8b7256096a20436f6d0926747e3ac3d64c81d24 8c7b49b3ecd48923eb64ff57e07a1cdb74782970 9206de95b1ea68357996ec02be5db0638a0de2c1 2c6a10161d0b5fc047b5bd81b03693b9af99fab5 05d72faa6d13c9d857478a5d35c85db9adada685 bb52d6694002b9d632bb355f64daa045c6293a4e e77414e0aad6a1b063ba5e5750c582c75327ea6a aa65607373a4daf2010e8c3867b6317619f3c1a3 Backport done by Greg Kroah-Hartman. Only minor tweaks were needed. Cc: David S. Miller <davem@davemloft.net> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-18sh: Fixup last users of irq_chip->typenameThomas Gleixner
The typename member of struct irq_chip was kept for migration purposes and is obsolete since more than 2 years. Fix up the leftovers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-09sh: Replace old style lock initializerThomas Gleixner
SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-09sh: Account for cache aliases in flush_icache_range()Matt Fleming
The icache may also contain aliases so we must account for them just like we do when manipulating the dcache. We usually get away with aliases in the icache because the instructions that are read from memory are read-only, i.e. they never change. However, the place where this bites us is when the code has been modified. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-11-06sh: unwinder: Fix up invalid PC refetch in dwarf unwinder.Paul Mundt
The dwarf unwinder presently attempts to provide a sane PC value if none is provided, however the logic is broken and cases where a previous valid dwarf frame exists along with a bogus PC value can still proceed. This fixes up the test and prevents the unwinder from blowing up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27sh: Fix hugetlbfs dependencies for SH-3 && MMU configurations.Paul Mundt
The hugetlb dependencies presently depend on SUPERH && MMU while the hugetlb page size definitions depend on CPU_SH4 or CPU_SH5. This unfortunately allows SH-3 + MMU configurations to enable hugetlbfs without a corresponding HPAGE_SHIFT definition, resulting in the build blowing up. As SH-3 doesn't support variable page sizes, we tighten up the dependenies a bit to prevent hugetlbfs from being enabled. These days we also have a shiny new SYS_SUPPORTS_HUGETLBFS, so switch to using that rather than adding to the list of corner cases in fs/Kconfig. Reported-by: Kristoffer Ericson <kristoffer.ericson@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-27sh: Document uImage.bin target in archhelp.Paul Mundt
This was missing from the previous patch. Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26sh: add uImage.bin targetMagnus Damm
Add an uImage.bin target to allow uncompressed uImages. Useful for boards with busted u-boot decompression like the rsk7203 on my desk. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26sh: rsk7203 CONFIG_MTD=n fixMagnus Damm
Fix the rsk7203 board code to build with CONFIG_MTD=n. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26sh: Check for return_to_handler when unwinding the stackMatt Fleming
When CONFIG_FUNCTION_GRAPH_TRACER is enabled the function graph tracer may patch return addresses on the stack with the address of return_to_handler(). This really confuses the DWARF unwinder because it will try find the caller of return_to_handler(), not the caller of the real return address. So teach the DWARF unwinder how to find the real return address whenever it encounters return_to_handler(). This patch does not cope very well when multiple return addresses on the stack have been patched. To make it work properly it would require state to track how many return_to_handler()'s have been seen so that we'd know where to look in current->curr_ret_stack[]. So for now, instead of trying to handle this, just moan if more than one return address on the stack has been patched. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26sh: Build fix: define more __movmem* symbolsLubomir Rintel
ERROR: "__movmemSI12" [net/unix/unix.ko] undefined! ERROR: "__movmemSI52" [net/ipv6/sit.ko] undefined! ERROR: "__movmemSI24" [net/ipv6/ipv6.ko] undefined! ERROR: "__movmemSI60" [net/ipv6/ipv6.ko] undefined! ERROR: "__movmemSI16" [net/ipv6/ipv6.ko] undefined! ERROR: "__movmemSI20" [net/ipv6/ipv6.ko] undefined! ERROR: "__movmemSI32" [net/ipv6/ipv6.ko] undefined! Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-26sh: __irq_entry annotate do_IRQ().Paul Mundt
This adds an __irq_entry annotation for do_IRQ() so that the IRQ annotation in the function graph tracer works as advertized. We already have the IRQENTRY section wired up, so this is just a trivial addition to actually make use of it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-16sh: Kill off stray HAVE_FTRACE_SYSCALLS reference.Paul Mundt
This seems to have popped back in via some merge damage. Kill it off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-16sh: Remove BKL from landisk gio.Thomas Gleixner
The open function got the BKL via the big push down. Replace it by preempt_enable/disable as this is sufficient for an UP machine. The ioctl can be unlocked because there is no functionality which requires serialization. The usage by multiple callers is broken with and without the BKL due to the local static variable addr. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-16sh: disabled cache handling fix.Magnus Damm
Add code to handle the cache disabled case. Fixes breakage introduced by 37443ef3f0406e855e169c87ae3f4ffb4b6ff635 ("sh: Migrate SH-4 cacheflush ops to function pointers."). Without this patch configuring caches off with CONFIG_CACHE_OFF=y makes kfr2r09 and migo-r lock up in fbdev deferred io or early user space. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-16sh: Fix up single page flushing to use PAGE_SIZE.Valentin Sitdikov
Presently The SH-4 cache flushing code uses flush_cache_4096() for most of the real flushing work, which breaks down to a fixed 4096 unroll and increment. Not only is this sub-optimal for larger page sizes, it's also uncovered a bug in sh4_flush_dcache_page() when large page sizes are used and we have no cache aliases -- resulting in only a part of the page's D-cache lines being written back. Signed-off-by: Valentin Sitdikov <valentin.sitdikov@siemens.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14sh: Fix a TRACE_IRQS_OFF typo.Paul Mundt
The resume_userspace path had TRACE_IRQS_OFF written incorrectly and so never handled the transition properly. This was fixed once before but seems to have made it back in the tree. Fix it for good. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14sh: Optimize the setup_rt_frame() I-cache flush.Paul Mundt
This only needs to flush the return code via the legacy path, and just invalidates uselessly otherwise. This makes the behaviour consistent for all of the trampoline setup paths. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14sh: Populate initial secondary CPU info from boot_cpu_data.Paul Mundt
The secondary CPU info was seeing corrupted results due to not entering all of the setup paths taken by the boot CPU. So we just memcpy() the boot cpu data over directly, and then fix up the per-CPU bits. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14sh: Tidy up SMP cpuinfo.Paul Mundt
Trivial change for cleaning up the cpuinfo pretty printing on SMP, adds a newline between CPUs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-14sh: Use boot_cpu_data for FPU tests in sigcontext paths.Paul Mundt
We do not want to use smp_processor_id() from these paths, as they trip preempt BUGs. Switch the test over to the boot cpu directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-13sh: ftrace: Fix up syscall tracepoint support.Paul Mundt
Sync up with latest core changes in the syscalls tracing area: - tracing: Map syscall name to number (syscall_name_to_nr()) - tracing: Call arch_init_ftrace_syscalls at boot - tracing: add support tracepoint ids (set_syscall_{enter,exit}_id()) Taken from the s390 change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-13sh: force dcache flush if dcache_dirty bit set.Paul Mundt
This too follows the ARM change, given that the issue at hand applies to all platforms that implement lazy D-cache writeback. This fixes up the case when a page mapping disappears between the flush_dcache_page() call (when PG_dcache_dirty is set for the page) and the update_mmu_cache() call -- such as in the case of swap cache being freed early. This kills off the mapping test in update_mmu_cache() and switches to simply testing for PG_dcache_dirty. Reported-by: Nitin Gupta <ngupta@vflare.org> Reported-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-13sh: update die() output.Paul Mundt
This follows the ARM change, as SH had all of the same issues: Make die() better match x86: - add printing of the last accessed sysfs file - ensure console_verbose() is called under the lock - ensure we panic outside of oops_exit() Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-09sh: Don't allocate smaller sized mappings on every iterationMatt Fleming
Currently, we've got the less than ideal situation where if we need to allocate a 256MB mapping we'll allocate four entries like so, entry 1: 128MB entry 2: 64MB entry 3: 16MB entry 4: 16MB This is because as we execute the loop in pmb_remap() we will progressively try mapping the remaining address space with smaller and smaller sizes. This isn't good because the size we use on one iteration may be the perfect size to use on the next iteration, for instance when the initial size is divisible by one of the PMB mapping sizes. With this patch, we now only need two entries in the PMB to map 256MB of address space, entry 1: 128MB entry 2: 128MB Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-09sh: Try PMB mapping based on physical address, not mapping sizeMatt Fleming
We should favour PMB mappings when the physical address cannot be reached with 29-bits. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-09sh: Plug PMB alloc memory leakMatt Fleming
If we fail to allocate a PMB entry in pmb_remap() we must remember to clear and free any PMB entries that we may have previously allocated, e.g. if we were allocating a multiple entry mapping. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-09sh: Sprinkle __uses_jump_to_uncachedMatt Fleming
Fix some callers of jump_to_uncached() and back_to_cached() that were not annotated with __uses_jump_to_uncached. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-09sh: enable sleep state LEDs on Ecovec24Magnus Damm
Extend the ecovec24 board code to enable Power Management LEDs showing the current sh7724 sleep state. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-10-05sh: mach-ecovec24: Document DS2 switch settings.Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-30sh: Build fix: export __movmemLubomir Rintel
ERROR: "__movmem" [net/irda/irda.ko] undefined! ERROR: "__movmem" [fs/nfsd/nfsd.ko] undefined! ERROR: "__movmem" [fs/lockd/lockd.ko] undefined! ERROR: "__movmem" [crypto/sha1_generic.ko] undefined! Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-30sh: Disable unaligned kernel access printks by default.Paul Mundt
Certain networking and USB workloads generate floods of these accesses, so just disable it by default (thereby restoring the old behaviour). The option remains configurable from userspace, and can still be used as a debugging aid. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-30sh: mach-ecovec24: modify 1st MTD area to read onlyKuninori Morimoto
Tested-by: Yusuke Goda <goda.yusuke@renesas.com> Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-30sh: mach-ecovec24: Add TouchScreen supportKuninori Morimoto
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-28sh: magicpanelr2 and dreamcast can use the generic I/O base.Paul Mundt
There is now no need for the magicpanelr2 and dreamcast platforms to set their own I/O port bas values, given that the generic machvec code now sets this to P2SEG for everyone. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-28sh: Don't enable interrupts in the page fault pathMatt Fleming
There's already code in do_page_fault() to conditionally enable interrupts, so we don't need to unconditonally enable them before calling it. This fixes a lockdep warning where we called trace_hardirqs_off() but with irqs still enabled. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-28sh: Set the default I/O port base to P2SEG.Paul Mundt
This bumps up the default I/O base to P2SEG, which allows legacy probing to bail out gracefully rather than oopsing. Platforms that have a real PIO offset still need to fix this up on their own, although most platforms are content with P2SEG already. The previous change to teach ioport_map() about >= P1SEG offsets in combination with this patch allows both the already remapped and the legacy address probing to pass through and succeed. Fixes up an oops with i8042 on the sh7785lcr board. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-28sh: Handle ioport_map() cases for >= P1SEG addresses.Paul Mundt
This fixes up the case where certain drivers already do their own remapping and subsequently attempt to use the PIO calls for I/O. In this case there is no additional remapping that needs to be done, and the address can be casted in to the cookie directly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25sh: Add support DMA Engine to SH7780Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25sh: Add support DMA Engine to SH7722Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25Merge branch 'master' of ↵Paul Mundt
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
2009-09-25sh: enable onenand support in kfr2r09 defconfig.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25sh: update defconfigs.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-25sh: add FSI driver support for ms7724seKuninori Morimoto
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-09-24Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds
* 'for-linus' of git://neil.brown.name/md: (97 commits) md: raid-1/10: fix RW bits manipulation md: remove unnecessary memset from multipath. md: report device as congested when suspended md: Improve name of threads created by md_register_thread md: remove sparse warnings about lock context. md: remove sparse waring "symbol xxx shadows an earlier one" async_tx/raid6: add missing dma_unmap calls to the async fail case ioat3: fix uninitialized var warnings drivers/dma/ioat/dma_v2.c: fix warnings raid6test: fix stack overflow ioat2: clarify ring size limits md/raid6: cleanup ops_run_compute6_2 md/raid6: eliminate BUG_ON with side effect dca: module load should not be an error message ioat: driver version 4.0 dca: registering requesters in multiple dca domains async_tx: remove HIGHMEM64G restriction dmaengine: sh: Add Support SuperH DMA Engine driver dmaengine: Move all map_sg/unmap_sg for slave channel to its client fsldma: Add DMA_SLAVE support ...