diff options
-rw-r--r-- | arch/mips/mm/c-r4k.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index f749f687ee87..40dced23e768 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/preempt.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/smp.h> | 17 | #include <linux/smp.h> |
17 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
@@ -601,6 +602,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
601 | /* Catch bad driver code */ | 602 | /* Catch bad driver code */ |
602 | BUG_ON(size == 0); | 603 | BUG_ON(size == 0); |
603 | 604 | ||
605 | preempt_disable(); | ||
604 | if (cpu_has_inclusive_pcaches) { | 606 | if (cpu_has_inclusive_pcaches) { |
605 | if (size >= scache_size) | 607 | if (size >= scache_size) |
606 | r4k_blast_scache(); | 608 | r4k_blast_scache(); |
@@ -621,6 +623,7 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, unsigned long size) | |||
621 | R4600_HIT_CACHEOP_WAR_IMPL; | 623 | R4600_HIT_CACHEOP_WAR_IMPL; |
622 | blast_dcache_range(addr, addr + size); | 624 | blast_dcache_range(addr, addr + size); |
623 | } | 625 | } |
626 | preempt_enable(); | ||
624 | 627 | ||
625 | bc_wback_inv(addr, size); | 628 | bc_wback_inv(addr, size); |
626 | __sync(); | 629 | __sync(); |
@@ -631,6 +634,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
631 | /* Catch bad driver code */ | 634 | /* Catch bad driver code */ |
632 | BUG_ON(size == 0); | 635 | BUG_ON(size == 0); |
633 | 636 | ||
637 | preempt_disable(); | ||
634 | if (cpu_has_inclusive_pcaches) { | 638 | if (cpu_has_inclusive_pcaches) { |
635 | if (size >= scache_size) | 639 | if (size >= scache_size) |
636 | r4k_blast_scache(); | 640 | r4k_blast_scache(); |
@@ -655,6 +659,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
655 | R4600_HIT_CACHEOP_WAR_IMPL; | 659 | R4600_HIT_CACHEOP_WAR_IMPL; |
656 | blast_inv_dcache_range(addr, addr + size); | 660 | blast_inv_dcache_range(addr, addr + size); |
657 | } | 661 | } |
662 | preempt_enable(); | ||
658 | 663 | ||
659 | bc_inv(addr, size); | 664 | bc_inv(addr, size); |
660 | __sync(); | 665 | __sync(); |