Revert an accedintal commit.

This commit is contained in:
Andrew Turner 2016-09-30 14:00:23 +00:00
parent 6cd8c11ba5
commit 7efd943a95

View File

@ -345,18 +345,12 @@ tlb_flush_range_local(vm_offset_t va, vm_size_t size)
/* Broadcasting operations. */
#if __ARM_ARCH >= 7 && defined SMP
/* Used to detect SMP */
extern int mp_ncpus;
static __inline void
tlb_flush_all(void)
{
dsb();
if (mp_ncpus == 1)
_CP15_TLBIALL();
else
_CP15_TLBIALLIS();
_CP15_TLBIALLIS();
dsb();
}
@ -365,10 +359,7 @@ tlb_flush_all_ng(void)
{
dsb();
if (mp_ncpus == 1)
_CP15_TLBIASID(CPU_ASID_KERNEL);
else
_CP15_TLBIASIDIS(CPU_ASID_KERNEL);
_CP15_TLBIASIDIS(CPU_ASID_KERNEL);
dsb();
}
@ -379,10 +370,7 @@ tlb_flush(vm_offset_t va)
KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va));
dsb();
if (mp_ncpus == 1)
_CP15_TLBIMVA(va | CPU_ASID_KERNEL);
else
_CP15_TLBIMVAAIS(va);
_CP15_TLBIMVAAIS(va);
dsb();
}
@ -396,13 +384,8 @@ tlb_flush_range(vm_offset_t va, vm_size_t size)
size));
dsb();
if (mp_ncpus == 1) {
for (; va < eva; va += PAGE_SIZE)
_CP15_TLBIMVA(va | CPU_ASID_KERNEL);
} else {
for (; va < eva; va += PAGE_SIZE)
_CP15_TLBIMVAAIS(va);
}
for (; va < eva; va += PAGE_SIZE)
_CP15_TLBIMVAAIS(va);
dsb();
}
#else /* SMP */
@ -428,19 +411,17 @@ icache_sync(vm_offset_t va, vm_size_t size)
va &= ~cpuinfo.dcache_line_mask;
for ( ; va < eva; va += cpuinfo.dcache_line_size) {
#if __ARM_ARCH >= 7 && defined SMP
if (mp_ncpus > 1)
_CP15_DCCMVAU(va);
else
_CP15_DCCMVAU(va);
#else
_CP15_DCCMVAC(va);
#endif
_CP15_DCCMVAC(va);
}
dsb();
#if __ARM_ARCH >= 7 && defined SMP
if (mp_ncpus > 1)
_CP15_ICIALLUIS();
else
_CP15_ICIALLUIS();
#else
_CP15_ICIALLU();
#endif
_CP15_ICIALLU();
dsb();
isb();
}
@ -450,11 +431,10 @@ static __inline void
icache_inv_all(void)
{
#if __ARM_ARCH >= 7 && defined SMP
if (mp_ncpus > 1)
_CP15_ICIALLUIS();
else
_CP15_ICIALLUIS();
#else
_CP15_ICIALLU();
#endif
_CP15_ICIALLU();
dsb();
isb();
}
@ -464,11 +444,10 @@ static __inline void
bpb_inv_all(void)
{
#if __ARM_ARCH >= 7 && defined SMP
if (mp_ncpus > 1)
_CP15_BPIALLIS();
else
_CP15_BPIALLIS();
#else
_CP15_BPIALL();
#endif
_CP15_BPIALL();
dsb();
isb();
}
@ -483,11 +462,10 @@ dcache_wb_pou(vm_offset_t va, vm_size_t size)
va &= ~cpuinfo.dcache_line_mask;
for ( ; va < eva; va += cpuinfo.dcache_line_size) {
#if __ARM_ARCH >= 7 && defined SMP
if (mp_ncpus > 1)
_CP15_DCCMVAU(va);
else
_CP15_DCCMVAU(va);
#else
_CP15_DCCMVAC(va);
#endif
_CP15_DCCMVAC(va);
}
dsb();
}