aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
Commit message (Collapse)AuthorAge
...
| * sh: Fix problems with cache flushing when cache is in write-through modeStuart Menefy2009-08-24
| | | | | | | | | | | | | | | | Change the method used to flush the cache in write-through mode to avoid corrupted data being written back to memory. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Fix overzealous checking in __ioremap()Stuart Menefy2009-08-24
| | | | | | | | | | | | | | Allow peripherals before the start of RAM to be remapped. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Improve comments int SH4 cache flushing codeStuart Menefy2009-08-24
| | | | | | | | | | | | | | | | This is a pure documentation, to try to explain why the cache flushing code for the SH4 is implemented the way it is. Signed-off-by: Stuart Menefy <stuart.menefy@st.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add initial support for SH7757 CPU subtypeYoshihiro Shimoda2009-08-21
| | | | | | | | | | Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Better description of SH-4 PTEA register update.Michael Trimarchi2009-08-20
| | | | | | | | | | Signed-off-by: Michael Trimarchi <trimarchimichael@yahoo.it> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Fix up sh4_flush_dcache_page() build on UP.Paul Mundt2009-08-26
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off now redundant local irq disabling.Paul Mundt2009-08-21
| | | | | | | | | | | | | | on_each_cpu() takes care of IRQ and preempt handling, the localized handling in each of the called functions can be killed off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Make cache flushers SMP-aware.Paul Mundt2009-08-21
| | | | | | | | | | | | | | | | This does a bit of rework for making the cache flushers SMP-aware. The function pointer-based flushers are renamed to local variants with the exported interface being commonly implemented and wrapping as necessary. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Fix up cache-sh4 build on SMP.Paul Mundt2009-08-20
| | | | | | | | | | | | | | mapping is unused on the SMP build, trigger a build error. Move it under the ifdef. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Build fix for disabled caches.Paul Mundt2009-08-19
| | | | | | | | | | | | | | | | | | This fixes up the build when caches are disabled, by linking in all of the cache routines directly. This paves the way for splitting out separate I and D cache disabling, similar to what sh64 had, and which we want for SH-X3 anyways. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Merge the _32/_64 variants of arch/sh/mm/Makefile.Paul Mundt2009-08-15
| | | | | | | | | | | | Now that there is sufficient shared infrastructure, merge the Makefiles. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Wire up sh5_cache_init().Paul Mundt2009-08-15
| | | | | | | | | | | | | | Now that the SH-5 code is more or less behaving with the new cacheflush interface, wire up the initialization code. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh64: Kill off dead i/d-cache disabled bits.Paul Mundt2009-08-15
| | | | | | | | | | | | | | These will be handled through the shared cache interface instead, and they are presently undefined anyways. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Fix up the SH-5 build with caches enabled.Paul Mundt2009-08-15
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Convert cache disabled SH-5 over to new cache interface.Paul Mundt2009-08-15
| | | | | | | | | | | | | | The caches enabled case needs more work, but is presently broken regardless, so this can be done incrementally. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Convert SH7705 extended mode to new cacheflush interface.Paul Mundt2009-08-14
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Convert SH-3 to new cacheflush interface.Paul Mundt2009-08-14
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Convert SH-2A to new cacheflush interface.Paul Mundt2009-08-14
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Convert SH-2 to new cacheflush interface.Paul Mundt2009-08-14
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Migrate SH-4 cacheflush ops to function pointers.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | | | This paves the way for allowing individual CPUs to overload the individual flushing routines that they care about without having to depend on weak aliases. SH-4 is converted over initially, as it wires up pretty much everything. The majority of the other CPUs will simply use the default no-op implementation with their own region flushers wired up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Kill off unused flush_icache_user_range().Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | We use flush_cache_page() outright in copy_to_user_page(), and nothing else needs it, so just kill it off. SH-5 still defines its own version, but that too will go away in the same fashion once it converts over. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Don't export flush_dcache_all().Paul Mundt2009-08-14
| | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Move alias computation to shared cache init.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | | | | | This migrates the alias computation and printing of probed cache parameters from the SH-4 code to the shared cpu_cache_init(). This permits other platforms with aliases to make use of the same probe logic without having to roll their own, and also produces consistent output regardless of platform. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Centralize the CPU cache initialization routines.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: consolidate nommu stubs in arch/sh/mm/nommu.c.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | These were previous littered around tlb-nommu.c and pg-nommu.c, though at this point there are more stubs than are strictly TLB or page op related, so just consolidate them in a single nommu.c. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: rework nommu for generic cache.c use.Paul Mundt2009-08-14
| | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: rename pg-mmu.c -> cache.c, enable generically.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Provide the kmap_coherent() interface generically.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Bail from kmap_coherent_init() if we have no dcache aliases.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | This kills off the ifdef from kmap_coherent_init() and just bails if there are no cache aliases. This permits the kmap coherent code to be used on other CPUs. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge branch 'master' into sh/cachetlbPaul Mundt2009-08-14
|\|
| * sh: use printk_onceMarcin Slusarz2009-08-12
| | | | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: linux-sh@vger.kernel.org Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: TLB fast path optimizations for load/store exceptions.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | This only bothers with the TLB entry flush in the case of the initial page write exception, as it is unecessary in the case of the load/store exceptions. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: TLB protection violation exception optimizations.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | | | This adds a bit of rework to have the TLB protection violations skip the TLB miss fastpath and go directly in to do_page_fault(), as these require slow path handling. Based on an earlier patch by SUGIOKA Toshinobu. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: NO_CONTEXT ASID optimizations for SH-4 cache flush.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | This optimizes for the cases when a CPU does not yet have a valid ASID context associated with it, as in this case there is no work for any of flush_cache_mm()/flush_cache_page()/flush_cache_range() to do. Based on the the MIPS implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh64: Wire up the shared __flush_xxx_region() flushers.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | Now with all of the prep work out of the way, kill off the SH-5 variants and use the SH-4 version directly. This also takes advantage of the unrolling that was previously done for the new version. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add register alignment helpers for shared flushers.Paul Mundt2009-08-14
| | | | | | | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Partially unroll the SH-4 __flush_xxx_region() flushers.Paul Mundt2009-08-04
| | | | | | | | | | | | | | | | This does a bit of unrolling for the SH-4 region flushers. Based on an earlier patch by SUGIOKA Toshinobu. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Split out SH-4 __flush_xxx_region() ops.Paul Mundt2009-08-04
| | | | | | | | | | | | | | | | This splits out the SH-4 __flush_xxx_region() functions and defines them as weak symbols. This allows us to provide optimized versions without having to ifdef cache-sh4.c to death. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Tidy up NEFF-based sign extension for SH-5.Paul Mundt2009-08-04
| | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Provide __flush_anon_page().Paul Mundt2009-08-04
| | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Drop unused arguments for kunmap_coherent().Paul Mundt2009-08-04
| | | | | | | | | | | | | | kunmap_coherent() doesn't do anything with its arguments, so just kill them off. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Bring kmap_coherent() out-of-line.Paul Mundt2009-08-04
| | | | | | | | | | | | | | kmap_coherent() has gotten too big to leave as an inline, so we bring it out-of-line. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Add a PG_dcache_dirty sanity check in kmap_coherent().Paul Mundt2009-08-04
| | | | | | | | | | | | | | | | This plugs in a BUG_ON() in kmap_coherent() for PG_dcache_dirty pages to catch when things go horribly wrong. Copied from the MIPS implementation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: Handle a NULL vma in __update_tlb() for the fast-path.Paul Mundt2009-07-29
| | | | | | | | | | | | | | | | The TLB miss fast-path presently calls in to update_mmu_cache() to set up the entry, and does so with a NULL vma. Check for vma validity in the __update_tlb() ptrace checks. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | sh: update_mmu_cache() consolidation.Paul Mundt2009-07-28
| | | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Use the now generic SH-4 clear/copy page ops for all MMU platforms.Paul Mundt2009-07-27
| | | | | | | | | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: wire up clear_user_highpage() for sh4, convert sh7705.Paul Mundt2009-07-27
| | | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
* | sh: Migrate from PG_mapped to PG_dcache_dirty.Paul Mundt2009-07-22
|/ | | | | | | | | | | | | | | | | 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 <lethal@linux-sh.org>
*-. Merge branches 'sh/hwblk' and 'sh/platform-updates'Paul Mundt2009-07-19
|\ \
| | * headers: smp_lock.h reduxAlexey Dobriyan2009-07-12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | * Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>