aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/srmmu.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-05-19 16:02:49 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-20 02:27:38 -0400
commitaccf032cfa582ed95da130b06241637659210edb (patch)
treec00308c452c4d680f15cd922d591b815b24f6fe8 /arch/sparc/mm/srmmu.c
parentf6678d3b4107c2ea254f4f4c78dfd4e5dfe04d6a (diff)
sparc32,leon: move leon mmu functions to leon_mm.c
We already have a leaon specific file - so keep all the laon stuff in one place. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Konrad Eisele <konrad@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/srmmu.c')
-rw-r--r--arch/sparc/mm/srmmu.c83
1 files changed, 2 insertions, 81 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 4875fcd8fd7a..a02c56a4bdfb 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -48,6 +48,8 @@
48#include <asm/turbosparc.h> 48#include <asm/turbosparc.h>
49#include <asm/leon.h> 49#include <asm/leon.h>
50 50
51#include "srmmu.h"
52
51enum mbus_module srmmu_modtype; 53enum mbus_module srmmu_modtype;
52static unsigned int hwbug_bitmask; 54static unsigned int hwbug_bitmask;
53int vac_cache_size; 55int vac_cache_size;
@@ -1479,87 +1481,6 @@ static void __init init_viking(void)
1479 poke_srmmu = poke_viking; 1481 poke_srmmu = poke_viking;
1480} 1482}
1481 1483
1482#ifdef CONFIG_SPARC_LEON
1483static void leon_flush_cache_mm(struct mm_struct *mm)
1484{
1485 leon_flush_cache_all();
1486}
1487
1488static void leon_flush_cache_page(struct vm_area_struct *vma, unsigned long page)
1489{
1490 leon_flush_pcache_all(vma, page);
1491}
1492
1493static void leon_flush_cache_range(struct vm_area_struct *vma,
1494 unsigned long start,
1495 unsigned long end)
1496{
1497 leon_flush_cache_all();
1498}
1499
1500static void leon_flush_tlb_mm(struct mm_struct *mm)
1501{
1502 leon_flush_tlb_all();
1503}
1504
1505static void leon_flush_tlb_page(struct vm_area_struct *vma,
1506 unsigned long page)
1507{
1508 leon_flush_tlb_all();
1509}
1510
1511static void leon_flush_tlb_range(struct vm_area_struct *vma,
1512 unsigned long start,
1513 unsigned long end)
1514{
1515 leon_flush_tlb_all();
1516}
1517
1518static void leon_flush_page_to_ram(unsigned long page)
1519{
1520 leon_flush_cache_all();
1521}
1522
1523static void leon_flush_sig_insns(struct mm_struct *mm, unsigned long page)
1524{
1525 leon_flush_cache_all();
1526}
1527
1528static void leon_flush_page_for_dma(unsigned long page)
1529{
1530 leon_flush_dcache_all();
1531}
1532
1533void __init poke_leonsparc(void)
1534{
1535}
1536
1537static const struct sparc32_cachetlb_ops leon_ops = {
1538 .cache_all = leon_flush_cache_all,
1539 .cache_mm = leon_flush_cache_mm,
1540 .cache_page = leon_flush_cache_page,
1541 .cache_range = leon_flush_cache_range,
1542 .tlb_all = leon_flush_tlb_all,
1543 .tlb_mm = leon_flush_tlb_mm,
1544 .tlb_page = leon_flush_tlb_page,
1545 .tlb_range = leon_flush_tlb_range,
1546 .page_to_ram = leon_flush_page_to_ram,
1547 .sig_insns = leon_flush_sig_insns,
1548 .page_for_dma = leon_flush_page_for_dma,
1549};
1550
1551void __init init_leon(void)
1552{
1553 srmmu_name = "LEON";
1554 sparc32_cachetlb_ops = &leon_ops;
1555 poke_srmmu = poke_leonsparc;
1556
1557 srmmu_cache_pagetables = 0;
1558
1559 leon_flush_during_switch = leon_flush_needed();
1560}
1561#endif
1562
1563/* Probe for the srmmu chip version. */ 1484/* Probe for the srmmu chip version. */
1564static void __init get_srmmu_type(void) 1485static void __init get_srmmu_type(void)
1565{ 1486{