aboutsummaryrefslogtreecommitdiffstats
path: root/arch/metag/mm/cache.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-06-13metag/mm/cache: Restrict scope for metag_lnkget_probeMarkos Chandras1-1/+1
Hide symbol since it's only used within the cache.c file Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: export metag_code_cache_flush_allJames Hogan1-0/+1
Various file systems indirectly use metag_code_cache_flush_all(), so when they're built as modules we get build errors like the following: ERROR: "metag_code_cache_flush_all" [fs/xfs/xfs.ko] undefined! Therefore export this function to modules to fix the errors. This was hit by a randconfig build. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: add boot time LNKGET/LNKSET checkJames Hogan1-0/+79
Add boot time check for whether LNKGET/LNKSET go through or around the cache. Depending on the configuration an info message (no harm), warning (technically wrong but no harm), or big WARN (expect failure in either kernel or userland) may be emitted if the behaviour is not as expected: Configuration Hardware Response ------------------------------------------ -------- -------- AROUND_CACHE through pr_info !AROUND_CACHE && ATOMICITY_LNKGET around WARN (kernel) " && !ATOMICITY_LNKGET && SMP around WARN (user) " " && !SMP around pr_warn Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: add __init to metag_cache_probe()James Hogan1-1/+1
metag_cache_probe() is only called from setup_arch(), so add the __init attribute to it. Signed-off-by: James Hogan <james.hogan@imgtec.com>
2013-03-02metag: Cache/TLB handlingJames Hogan1-0/+441
Add cache and TLB handling code for metag, including the required callbacks used by MM switches and DMA operations. Caches can be partitioned between the hardware threads and the global space, however this is usually configured by the bootloader so Linux doesn't make any changes to this configuration. TLBs aren't configurable, so only need consideration to flush them. On Meta1 the L1 cache was VIVT which required a full flush on MM switch. Meta2 has a VIPT L1 cache so it doesn't require the full flush on MM switch. Meta2 can also have a writeback L2 with hardware prefetch which requires some special handling. Support is optional, and the L2 can be detected and initialised by Linux. Signed-off-by: James Hogan <james.hogan@imgtec.com>