diff options
author | marcel <marcel@FreeBSD.org> | 2008-04-27 17:13:22 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2008-04-27 17:13:22 +0000 |
commit | 33096044a363d67e9a617daa0566bf6bd097055c (patch) | |
tree | 6bd25e0fa394277199bd55df5fee51cbb1ac39c5 /sys/powerpc | |
parent | 88f4417272b5a87950a6094397747636c5da95d3 (diff) | |
download | FreeBSD-src-33096044a363d67e9a617daa0566bf6bd097055c.zip FreeBSD-src-33096044a363d67e9a617daa0566bf6bd097055c.tar.gz |
Remove mfsvr():
o The function is defined unconditionally but depends on SPR_SVR,
which is defined conditionally.
o spr.h defines mfspr() and mtspr(), which is no worse to use.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/include/cpufunc.h | 10 | ||||
-rw-r--r-- | sys/powerpc/mpc85xx/mpc85xx.c | 2 | ||||
-rw-r--r-- | sys/powerpc/mpc85xx/ocpbus.c | 2 |
3 files changed, 2 insertions, 12 deletions
diff --git a/sys/powerpc/include/cpufunc.h b/sys/powerpc/include/cpufunc.h index 3eb0ac0..a58d4c5 100644 --- a/sys/powerpc/include/cpufunc.h +++ b/sys/powerpc/include/cpufunc.h @@ -123,16 +123,6 @@ mfpvr(void) return (value); } -static __inline register_t -mfsvr(void) -{ - register_t value; - - __asm __volatile ("mfspr %0, %1" : "=r"(value) : "K"(SPR_SVR)); - - return (value); -} - static __inline void eieio(void) { diff --git a/sys/powerpc/mpc85xx/mpc85xx.c b/sys/powerpc/mpc85xx/mpc85xx.c index 144867e..62a47a6 100644 --- a/sys/powerpc/mpc85xx/mpc85xx.c +++ b/sys/powerpc/mpc85xx/mpc85xx.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); void cpu_reset() { - uint32_t svr = mfsvr(); + uint32_t svr = mfspr(SPR_SVR); if (svr == SVR_MPC8572E || svr == SVR_MPC8572) /* Systems with dedicated reset register */ diff --git a/sys/powerpc/mpc85xx/ocpbus.c b/sys/powerpc/mpc85xx/ocpbus.c index e85361e..9c1e583 100644 --- a/sys/powerpc/mpc85xx/ocpbus.c +++ b/sys/powerpc/mpc85xx/ocpbus.c @@ -233,7 +233,7 @@ ocpbus_probe (device_t dev) sc = device_get_softc(dev); - svr = mfsvr(); + svr = mfspr(SPR_SVR); if (svr == SVR_MPC8572E || svr == SVR_MPC8572) law_max = 12; else |