summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorbenno <benno@FreeBSD.org>2002-04-16 12:07:41 +0000
committerbenno <benno@FreeBSD.org>2002-04-16 12:07:41 +0000
commitf2d443a680d049fa4f5d4a363d4b966ef19e7451 (patch)
tree17ff0e05dcf5a416a7826c4d0762a69ace317112 /sys/powerpc
parent327177ba2e7dec88e52cca520fdb32e3c0b6b232 (diff)
downloadFreeBSD-src-f2d443a680d049fa4f5d4a363d4b966ef19e7451.zip
FreeBSD-src-f2d443a680d049fa4f5d4a363d4b966ef19e7451.tar.gz
Use mtsrin() instead of inline asm.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/mmu_oea.c5
-rw-r--r--sys/powerpc/powerpc/mmu_oea.c5
-rw-r--r--sys/powerpc/powerpc/pmap.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index 2ba2b33..c144a73 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -724,8 +724,7 @@ pmap_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend)
* Initialize hardware.
*/
for (i = 0; i < 16; i++) {
- __asm __volatile("mtsrin %0,%1"
- :: "r"(EMPTY_SEGMENT), "r"(i << ADDR_SR_SHFT));
+ mtsrin(i << ADDR_SR_SHFT, EMPTY_SEGMENT);
}
__asm __volatile ("mtsr %0,%1"
:: "n"(KERNEL_SR), "r"(KERNEL_SEGMENT));
@@ -1893,7 +1892,7 @@ pmap_pte_spill(vm_offset_t addr)
pmap_pte_spills++;
- __asm __volatile("mfsrin %0,%1" : "=r"(sr) : "r"(addr));
+ sr = mfsrin(addr);
ptegidx = va_to_pteg(sr, addr);
/*
diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c
index 2ba2b33..c144a73 100644
--- a/sys/powerpc/powerpc/mmu_oea.c
+++ b/sys/powerpc/powerpc/mmu_oea.c
@@ -724,8 +724,7 @@ pmap_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend)
* Initialize hardware.
*/
for (i = 0; i < 16; i++) {
- __asm __volatile("mtsrin %0,%1"
- :: "r"(EMPTY_SEGMENT), "r"(i << ADDR_SR_SHFT));
+ mtsrin(i << ADDR_SR_SHFT, EMPTY_SEGMENT);
}
__asm __volatile ("mtsr %0,%1"
:: "n"(KERNEL_SR), "r"(KERNEL_SEGMENT));
@@ -1893,7 +1892,7 @@ pmap_pte_spill(vm_offset_t addr)
pmap_pte_spills++;
- __asm __volatile("mfsrin %0,%1" : "=r"(sr) : "r"(addr));
+ sr = mfsrin(addr);
ptegidx = va_to_pteg(sr, addr);
/*
diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c
index 2ba2b33..c144a73 100644
--- a/sys/powerpc/powerpc/pmap.c
+++ b/sys/powerpc/powerpc/pmap.c
@@ -724,8 +724,7 @@ pmap_bootstrap(vm_offset_t kernelstart, vm_offset_t kernelend)
* Initialize hardware.
*/
for (i = 0; i < 16; i++) {
- __asm __volatile("mtsrin %0,%1"
- :: "r"(EMPTY_SEGMENT), "r"(i << ADDR_SR_SHFT));
+ mtsrin(i << ADDR_SR_SHFT, EMPTY_SEGMENT);
}
__asm __volatile ("mtsr %0,%1"
:: "n"(KERNEL_SR), "r"(KERNEL_SEGMENT));
@@ -1893,7 +1892,7 @@ pmap_pte_spill(vm_offset_t addr)
pmap_pte_spills++;
- __asm __volatile("mfsrin %0,%1" : "=r"(sr) : "r"(addr));
+ sr = mfsrin(addr);
ptegidx = va_to_pteg(sr, addr);
/*
OpenPOWER on IntegriCloud