aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include
AgeCommit message (Collapse)AuthorFilesLines
2009-08-15sh: consolidate flush_dcache_mmap_lock/unlock() definitions.Paul Mundt6-17/+3
All of the flush_dcache_mmap_lock()/flush_dcache_mmap_unlock() definitions are identical across all CPUs, so just provide them generically in asm/cacheflush.h. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15sh: Don't export flush_dcache_all().Paul Mundt1-1/+0
flush_dcache_all() is used internally by the SH-4 cache code, it is not part of the exported cache API, so make it static and don't export it. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15sh: Centralize the CPU cache initialization routines.Paul Mundt6-10/+2
This provides a central point for CPU cache initialization routines. This replaces the antiquated p3_cache_init() method, which the vast majority of CPUs never cared about. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15sh: Track the CPU family in sh_cpuinfo.Paul Mundt2-13/+24
This adds a family member to struct sh_cpuinfo, which allows us to fall back more on the probe routines to work out what sort of subtype we are running on. This will be used by the CPU cache initialization code in order to first do family-level initialization, followed by subtype-level optimizations. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15sh: rework nommu for generic cache.c use.Paul Mundt4-10/+3
This does a bit of reorganizing for allowing nommu to use the new and generic cache.c, no functional changes. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15sh: rename pg-mmu.c -> cache.c, enable generically.Paul Mundt1-2/+0
This builds in the newly created cache.c (renamed from pg-mmu.c) for both MMU and NOMMU configurations. The kmap_coherent() stubs and alias information recorded by each CPU family takes care of doing the right thing while enabling the code to be commonly shared. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15sh: Provide the kmap_coherent() interface generically.Paul Mundt2-6/+4
This plugs in kmap_coherent() for the non-SH4 cases to permit the pg-mmu.c bits to be used generically across all CPUs. SH-5 is still in the TODO state, but will move over to fixmap and the generic interface gradually. Signed-off-by: Paul Mundt <[email protected]>
2009-08-15Merge branch 'master' into sh/cachetlbPaul Mundt18-87/+826
2009-08-15sh: Add register alignment helpers for shared flushers.Paul Mundt3-0/+12
This plugs in some register alignment helpers for the shared flushers, allowing them to also be used on SH-5. The main rationale here is that in the SH-5 case we have a variable ABI, where the pointer size may not equal the register width. This register extension is taken care of by the SH-5 code already today, and is otherwise unused on the SH-4 code. This combines the two and allows us to kill off the SH-5 implementation. Signed-off-by: Paul Mundt <[email protected]>
2009-08-14sh: Delete DWARF_ARCH_UNWIND_OFFSETMatt Fleming1-5/+0
Trying to figure out the best value for DWARF_ARCH_UNWIND_OFFSET is tricky at best. Various things can change the size (and offset from the beginning of the function) of the prologue. Notably, turning on ftrace adds calls to mcount at the beginning of functions, thereby pushing the prologue further into the function. So replace DWARF_ARCH_UNWIND_OFFSET with some code that continues to execute CFA instructions until the value of return address register is defined. This is safe to do because we know that the return address must have been pushed onto the frame before our first function call; we just can't figure out where at compile-time. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-14sh: Setup the frame register in asm codeMatt Fleming1-0/+12
In order to use DWARF unwinder info the frame register has to contain a valid value. Whilst GCC takes care of this for C code, we have to do it ourselves for assembly. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-14sh: dwarf unwinder support.Matt Fleming3-0/+425
This is a first cut at a generic DWARF unwinder for the kernel. It's still lacking DWARF64 support and the DWARF expression support hasn't been tested very well but it is generating proper stacktraces on SH for WARN_ON() and NULL dereferences. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-13sh: Allow multiple stack unwinders to be setupMatt Fleming1-0/+25
Provide an interface for registering stack unwinders, where each unwinder is given a rating that describes its accuracy and complexity. The more accurate an unwinder is, the more complex it is. If a the current stack unwinder faults, then the stack unwinder with the next highest accuracy will be used in its place (provided one is available). For example, this allows unwinders, such as the DWARF unwinder, to liberally sprinkle BUG()s to catch badly formed DWARF debug info. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-13sh: Use the generalized stacktrace opsMatt Fleming1-0/+25
Copy the stacktrace ops code from x86 and provide a central function for use by functions that need to dump a callstack. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-13Merge branch 'sh/stable-updates'Paul Mundt2-12/+4
2009-08-07sh: clean up Migo-R header fileMagnus Damm2-64/+14
This patch moves the Migo-R specific header file from mach-common/ into mach-migor/ and removes unused cruft. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-07sh: fix romImage mach dir usageMagnus Damm3-0/+0
This patch moves all the romImage related header files into the mach/ directory. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-07sh: kfr2r09 board support - LCDC panelMagnus Damm1-0/+21
This patch adds support for the WQVGA LCD display used by the KFR2R09 board. The LCD module is a TX07D34VM0AAA made by Hitachi, and this module is made up by a R61517 chip together with a 240x400 pixel display. The screen is attached to the SuperH Mobile LCDC using a 18-bit SYS bus. The register settings used by the SYS panel setup code are based on an out-of-tree driver which apart from duplicating all LCDC driver code and writing to non-existing hardware registers also never was posted for upstream merge. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-05sh: convert to asm-generic/hardirq.hChristoph Hellwig1-10/+3
Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-04sh: Tidy up NEFF-based sign extension for SH-5.Paul Mundt1-0/+6
This consolidates all of the NEFF-based sign extension for SH-5. In the future the other SH code will need to make use of this as well, so make it generic in preparation for more 32/64 consolidation. Signed-off-by: Paul Mundt <[email protected]>
2009-08-04sh: Provide __flush_anon_page().Paul Mundt1-0/+14
This provides a __flush_anon_page() that handles both the aliasing and non-aliasing cases. This fixes up some crashes with heavy get_user_pages() users. Signed-off-by: Paul Mundt <[email protected]>
2009-08-04sh: Runtime PM pdev hwblkMagnus Damm1-1/+6
These patches extend struct platform device data for a bunch of SuperH Mobile processors and embedded boards. The patches simply add hardware block ids to on-chip platform devices. Platform devices off chip (such as external ethernet controllers or flash chips) are left out which gives them a special case hardware block id of zero. Upcoming Runtime PM code will make use of the hardware block id to group devices together. The hardware block id can also be used to extend the SuperH Mobile clock framework implementation. This series of patches depend on the following: "Driver Core: Add platform device arch data V3". This patch adds a hwblk_id member to struct pdev_archdata. This member should be used to point out on-chip hardware block id. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-04Merge branch 'for-linus' of ↵Paul Mundt2-12/+4
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 into sh/hwblk
2009-08-04sh: Add SH7724 DMAC support.Kuninori Morimoto2-1/+3
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-08-04sh: hwblk support for sh7724Magnus Damm1-0/+17
This patch adds hwblk support for the sh7724 processor. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-30sh: kfr2r09 romImage support V2Magnus Damm2-0/+209
This patch is romImage support for the kfr2r09 board V2. The partner-jet-setup.txt file is converted into assembly code which becomes the first code to execute from the reset vector. The file partner-jet-setup.txt can also be used to setup the hardware using a JTAG debugger so booting from RAM can be done without burning the code to flash. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-30sh: romImage support V2Magnus Damm1-0/+1
This patch contains support for the romImage build target V2. The resulting romImage file should be burned to rom or flash and could be used as small boot loader. Board code should keep their setup code in the file romimage.h located in their mach include directory. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-29sh: Rework irqflags tracing to fix up CONFIG_PROVE_LOCKING.Stuart Menefy1-0/+72
This cleans up the irqflags tracing code quite a bit and ties it in to various missing callsites that caused an imbalance when CONFIG_PROVE_LOCKING was enabled. Previously this was catching on: 987 #ifdef CONFIG_PROVE_LOCKING 988 DEBUG_LOCKS_WARN_ON(!p->hardirqs_enabled); 989 DEBUG_LOCKS_WARN_ON(!p->softirqs_enabled); 990 #endif 991 retval = -EAGAIN; with hardirqs being doubly enabled, and subsequently bailing out with the following call trace: Call trace: [<88035224>] __lock_acquire+0x616/0x6a6 [<88015a8c>] do_fork+0xf8/0x2b0 [<880331ec>] trace_hardirqs_on_caller+0xd4/0x114 [<88241074>] _spin_unlock_irq+0x20/0x64 [<88035224>] __lock_acquire+0x616/0x6a6 [<8800386c>] kernel_thread+0x48/0x70 [<88024ecc>] ____call_usermodehelper+0x0/0x110 [<88024ecc>] ____call_usermodehelper+0x0/0x110 [<88003894>] kernel_thread_helper+0x0/0x14 [<88024bac>] __call_usermodehelper+0x38/0x70 [<88025dc0>] worker_thread+0x150/0x274 [<88035b9c>] lock_release+0x0/0x198 [<88024b74>] __call_usermodehelper+0x0/0x70 [<88028cf0>] autoremove_wake_function+0x0/0x30 [<88028bf2>] kthread+0x3e/0x70 [<88025c70>] worker_thread+0x0/0x274 [<8800389c>] kernel_thread_helper+0x8/0x14 [<88028bb4>] kthread+0x0/0x70 [<88003894>] kernel_thread_helper+0x0/0x14 Reported-by: Nobuhiro Iwamatsu <[email protected]> Signed-off-by: Stuart Menefy <[email protected]> Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-29sh: update_mmu_cache() consolidation.Paul Mundt1-2/+13
This splits out a separate __update_cache()/__update_tlb() for update_mmu_cache() to wrap in to. This lets us share the common __update_cache() bits while keeping special __update_tlb() handling broken out. Signed-off-by: Paul Mundt <[email protected]>
2009-07-27mm: Remove duplicate definitions in MIPS and SHBenjamin Herrenschmidt1-8/+0
Those definitions are already provided by asm-generic Signed-off-by: Benjamin Herrenschmidt <[email protected]> Acked-by: Paul Mundt <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-07-27mm: Pass virtual address to [__]p{te,ud,md}_free_tlb()Benjamin Herrenschmidt2-5/+5
mm: Pass virtual address to [__]p{te,ud,md}_free_tlb() Upcoming paches to support the new 64-bit "BookE" powerpc architecture will need to have the virtual address corresponding to PTE page when freeing it, due to the way the HW table walker works. Basically, the TLB can be loaded with "large" pages that cover the whole virtual space (well, sort-of, half of it actually) represented by a PTE page, and which contain an "indirect" bit indicating that this TLB entry RPN points to an array of PTEs from which the TLB can then create direct entries. Thus, in order to invalidate those when PTE pages are deleted, we need the virtual address to pass to tlbilx or tlbivax instructions. The old trick of sticking it somewhere in the PTE page struct page sucks too much, the address is almost readily available in all call sites and almost everybody implemets these as macros, so we may as well add the argument everywhere. I added it to the pmd and pud variants for consistency. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Acked-by: David Howells <[email protected]> [MN10300 & FRV] Acked-by: Nick Piggin <[email protected]> Acked-by: Martin Schwidefsky <[email protected]> [s390] Signed-off-by: Linus Torvalds <[email protected]>
2009-07-27sh: Use the now generic SH-4 clear/copy page ops for all MMU platforms.Paul Mundt3-22/+7
Now that the SH-4 page clear/copy ops are generic, they can be used for all platforms with CONFIG_MMU=y. SH-5 remains the odd one out, but it too will gradually be converted over to using this interface. SH-3 platforms which do not contain aliases will see no impact from this change, while aliasing SH-3 platforms will get the same interface as SH-4. Signed-off-by: Paul Mundt <[email protected]>
2009-07-27sh: wire up clear_user_highpage() for sh4, convert sh7705.Paul Mundt3-6/+11
This wires up clear_user_highpage() on SH-4 and subsequently converts the SH7705 32kB cache mode over to using it. Now that the SH-4 implementation handles all of the dcache purging directly in the aliasing case, there is no need to do this in the default clear_page() implementation. Signed-off-by: Paul Mundt <[email protected]>
2009-07-22sh: Migrate from PG_mapped to PG_dcache_dirty.Paul Mundt4-12/+8
This inverts the delayed dcache flush a bit to be more in line with other platforms. At the same time this also gives us the ability to do some more optimizations and cleanup. Now that the update_mmu_cache() callsite only tests for the bit, the implementation can gradually be split out and made generic, rather than relying on special implementations for each of the peculiar CPU types. SH7705 in 32kB mode and SH-4 still need slightly different handling, but this is something that can remain isolated in the varying page copy/clear routines. On top of that, SH-X3 is dcache coherent, so there is no need to bother with any of these tests in the PTEAEX version of update_mmu_cache(), so we kill that off too. Signed-off-by: Paul Mundt <[email protected]>
2009-07-22sh: Provide _PAGE_SPECIAL for 32-bit.Paul Mundt1-4/+10
Allocate one of the unused PTE bits for _PAGE_SPECIAL directly. This is prep work for fast gup and the zero page revival. Signed-off-by: Paul Mundt <[email protected]>
2009-07-20Merge branches 'sh/hwblk' and 'sh/platform-updates'Paul Mundt2-2/+28
2009-07-20sh: hwblk support for sh7723Magnus Damm1-0/+17
This patch adds hwblk support for the sh7723 processor. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-20sh: Add support for multiple hwblk countersMagnus Damm1-2/+11
Extend the SuperH hwblk code to support more than one counter. Contains ground work for the future Runtime PM implementation. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-11Merge branches 'sh/ftrace' and 'sh/stable-updates'Paul Mundt2-1/+4
2009-07-11sh: Function graph tracer supportMatt Fleming1-0/+3
Add both dynamic and static function graph tracer support for sh. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-10sched: INIT_PREEMPT_COUNTPeter Zijlstra1-1/+1
Pull the initial preempt_count value into a single definition site. Maintainers for: alpha, ia64 and m68k, please have a look, your arch code is funny. The header magic is a bit odd, but similar to the KERNEL_DS one, CPP waits with expanding these macros until the INIT_THREAD_INFO macro itself is expanded, which is in arch/*/kernel/init_task.c where we've already included sched.h so we're good. Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Peter Zijlstra <[email protected]> Acked-by: Matt Mackall <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-07-06Merge branches 'sh/ftrace' and 'sh/cachetlb'Paul Mundt5-0/+92
2009-07-06sh: Add ftrace syscall tracing supportMatt Fleming2-4/+8
Now that I've added TIF_SYSCALL_FTRACE the thread flags do not fit into a single byte any more. Code testing them now needs to be aware of the upper and lower bytes. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-06sh: Fix the value of MCOUNT_INSN_OFFSETMatt Fleming1-2/+2
It seems that MCOUNT_INSN_OFFSET was calculating the distance between the wrong functions. The value that should have actually been computed is the distance between ftrace_call and ftrace_stub. I discovered this when I added some code to ftrace_caller. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-05Merge branches 'sh/hwblk', 'sh/cpuidle' and 'sh/stable-updates'Paul Mundt3-0/+84
2009-07-05sh: cpuidle for SuperH Mobile using hwblkMagnus Damm1-0/+9
This patch adds cpuidle support for SuperH Mobile. The sleep mode selected by cpuidle is compared with the mode selected by the hwblk sleep code and the best allowed mode is entered. At this point "Sleep mode" and "Sleep mode + SF" are supported. This code can easily be extended to support "Software suspend mode", but the assembly code must first be updated to avoid loosing interrupts. Also, update the code to only copy the assembly snippet into internal memory once at bootup. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-05sh: hwblk for sh7722Magnus Damm1-0/+14
This patch contains the sh7722 specific hwblk implementation. Hwblk ids are added to the processor specific header file, module stop bits and areas are kept track of as hwblks, clocks are converted to make use of the shared hwblk code. Code to determine allowed sleep modes is also added. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-05sh: hwblk base implementationMagnus Damm1-0/+61
This patch is the hwblk base implementation, containing structures and shared functions dealing with hardware blocks. A each processor model should provide a list of hwblks and describe which module stop bit that is associated with each hwblck and how the hwblks are grouped together into areas. The shared code keeps track of the usage count for each hwblk and the areas. Fallback implementations for processor specific code are also kept as weak symbols. The clock framework, the runtime pm code and cpuidle will all tie into this hwblk implementation. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-03sh: Use bootmem ontop of lmbMatt Fleming1-0/+6
Rework the bootmem allocator to use the lmb framework. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2009-07-03sh: define PERF_COUNTER_INDEX_OFFSET.Paul Mundt1-0/+2
Fixes up recent build breakage. Signed-off-by: Paul Mundt <[email protected]>