diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2012-05-19 16:02:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-20 02:27:38 -0400 |
commit | accf032cfa582ed95da130b06241637659210edb (patch) | |
tree | c00308c452c4d680f15cd922d591b815b24f6fe8 /arch/sparc/mm/srmmu.c | |
parent | f6678d3b4107c2ea254f4f4c78dfd4e5dfe04d6a (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.c | 83 |
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 | |||
51 | enum mbus_module srmmu_modtype; | 53 | enum mbus_module srmmu_modtype; |
52 | static unsigned int hwbug_bitmask; | 54 | static unsigned int hwbug_bitmask; |
53 | int vac_cache_size; | 55 | int 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 | ||
1483 | static void leon_flush_cache_mm(struct mm_struct *mm) | ||
1484 | { | ||
1485 | leon_flush_cache_all(); | ||
1486 | } | ||
1487 | |||
1488 | static void leon_flush_cache_page(struct vm_area_struct *vma, unsigned long page) | ||
1489 | { | ||
1490 | leon_flush_pcache_all(vma, page); | ||
1491 | } | ||
1492 | |||
1493 | static 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 | |||
1500 | static void leon_flush_tlb_mm(struct mm_struct *mm) | ||
1501 | { | ||
1502 | leon_flush_tlb_all(); | ||
1503 | } | ||
1504 | |||
1505 | static void leon_flush_tlb_page(struct vm_area_struct *vma, | ||
1506 | unsigned long page) | ||
1507 | { | ||
1508 | leon_flush_tlb_all(); | ||
1509 | } | ||
1510 | |||
1511 | static 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 | |||
1518 | static void leon_flush_page_to_ram(unsigned long page) | ||
1519 | { | ||
1520 | leon_flush_cache_all(); | ||
1521 | } | ||
1522 | |||
1523 | static void leon_flush_sig_insns(struct mm_struct *mm, unsigned long page) | ||
1524 | { | ||
1525 | leon_flush_cache_all(); | ||
1526 | } | ||
1527 | |||
1528 | static void leon_flush_page_for_dma(unsigned long page) | ||
1529 | { | ||
1530 | leon_flush_dcache_all(); | ||
1531 | } | ||
1532 | |||
1533 | void __init poke_leonsparc(void) | ||
1534 | { | ||
1535 | } | ||
1536 | |||
1537 | static 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 | |||
1551 | void __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. */ |
1564 | static void __init get_srmmu_type(void) | 1485 | static void __init get_srmmu_type(void) |
1565 | { | 1486 | { |