summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2008-04-28 03:04:41 +0000
committermarcel <marcel@FreeBSD.org>2008-04-28 03:04:41 +0000
commite0ba3f18787ea6343637dd8a742717554c772462 (patch)
tree9b1556bedcb14633a3b569a00772e9ff321cc425 /sys/powerpc
parent20ca53a7f4befa5e1618bc6a38ee628358d387fa (diff)
downloadFreeBSD-src-e0ba3f18787ea6343637dd8a742717554c772462.zip
FreeBSD-src-e0ba3f18787ea6343637dd8a742717554c772462.tar.gz
The first argment of mtdbatu or mtibatu is part of the encoding.
It needs to be constant, so eliminate the loop and "hand-unroll".
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/mmu_oea.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index d179b40..a425ccd 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -623,16 +623,17 @@ pmap_cpu_bootstrap(volatile uint32_t *trcp, int ap)
trcp[0] = 0x1001;
- for (i = 1; i < 4; i++) {
- __asm __volatile("mtdbatu %0,%1" :: "n"(i), "r"(0));
- __asm __volatile("mtibatu %0,%1" :: "n"(i), "r"(0));
- isync();
- }
+ __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
+ __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
+ isync();
trcp[0] = 0x1002;
- __asm __volatile("mtdbatu 1,%0" :: "r"(battable[8].batu));
- __asm __volatile("mtdbatl 1,%0" :: "r"(battable[8].batl));
+ __asm __volatile("mtibatu 1,%0" :: "r"(0));
+ __asm __volatile("mtdbatu 2,%0" :: "r"(0));
+ __asm __volatile("mtibatu 2,%0" :: "r"(0));
+ __asm __volatile("mtdbatu 3,%0" :: "r"(0));
+ __asm __volatile("mtibatu 3,%0" :: "r"(0));
isync();
trcp[0] = 0x1003;
OpenPOWER on IntegriCloud