mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 00:20:06 +00:00
[MIPS] Remove redundant r4k_blast_icache() calls
r4k_flush_cache_all() and r4k_flush_cache_mm() case: these are noop if the CPU did not have dc_aliases. It would mean we do not need to care about icache here. r4k_flush_cache_range case: if r4k_flush_cache_mm() did not need to care about icache, it would be same for this function. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
e567988244
commit
0550d9d13e
@ -323,7 +323,6 @@ static void __init r4k_blast_scache_setup(void)
|
|||||||
static inline void local_r4k_flush_cache_all(void * args)
|
static inline void local_r4k_flush_cache_all(void * args)
|
||||||
{
|
{
|
||||||
r4k_blast_dcache();
|
r4k_blast_dcache();
|
||||||
r4k_blast_icache();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r4k_flush_cache_all(void)
|
static void r4k_flush_cache_all(void)
|
||||||
@ -359,21 +358,19 @@ static void r4k___flush_cache_all(void)
|
|||||||
static inline void local_r4k_flush_cache_range(void * args)
|
static inline void local_r4k_flush_cache_range(void * args)
|
||||||
{
|
{
|
||||||
struct vm_area_struct *vma = args;
|
struct vm_area_struct *vma = args;
|
||||||
int exec;
|
|
||||||
|
|
||||||
if (!(cpu_context(smp_processor_id(), vma->vm_mm)))
|
if (!(cpu_context(smp_processor_id(), vma->vm_mm)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
exec = vma->vm_flags & VM_EXEC;
|
r4k_blast_dcache();
|
||||||
if (cpu_has_dc_aliases || exec)
|
|
||||||
r4k_blast_dcache();
|
|
||||||
if (exec)
|
|
||||||
r4k_blast_icache();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void r4k_flush_cache_range(struct vm_area_struct *vma,
|
static void r4k_flush_cache_range(struct vm_area_struct *vma,
|
||||||
unsigned long start, unsigned long end)
|
unsigned long start, unsigned long end)
|
||||||
{
|
{
|
||||||
|
if (!cpu_has_dc_aliases)
|
||||||
|
return;
|
||||||
|
|
||||||
r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
|
r4k_on_each_cpu(local_r4k_flush_cache_range, vma, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +382,6 @@ static inline void local_r4k_flush_cache_mm(void * args)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
r4k_blast_dcache();
|
r4k_blast_dcache();
|
||||||
r4k_blast_icache();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Kludge alert. For obscure reasons R4000SC and R4400SC go nuts if we
|
* Kludge alert. For obscure reasons R4000SC and R4400SC go nuts if we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user