aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-13 03:23:32 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:37 -0500
commit6c0f402f6cc62314ef83b975f3430350dcb6055f (patch)
tree394a2e981ee8fff3e6eda7aec2d20be8542ecae1
parent85dfa19ba92f88fa1c1482f655c7247119dfdcd5 (diff)
[SPARC64]: Implement rest of generic interrupt hypervisor calls.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/entry.S66
-rw-r--r--include/asm-sparc64/hypervisor.h24
2 files changed, 89 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index fa185f227055..a2842a72f8e6 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -1701,9 +1701,73 @@ hard_smp_processor_id:
1701 * 1701 *
1702 * returns %o0: sysino 1702 * returns %o0: sysino
1703 */ 1703 */
1704 .globl pci_sun4v_devino_to_sysino 1704 .globl sun4v_devino_to_sysino
1705sun4v_devino_to_sysino: 1705sun4v_devino_to_sysino:
1706 mov HV_FAST_INTR_DEVINO2SYSINO, %o5 1706 mov HV_FAST_INTR_DEVINO2SYSINO, %o5
1707 ta HV_FAST_TRAP 1707 ta HV_FAST_TRAP
1708 retl 1708 retl
1709 mov %o1, %o0 1709 mov %o1, %o0
1710
1711 /* %o0: sysino
1712 *
1713 * returns %o0: intr_enabled (HV_INTR_{DISABLED,ENABLED})
1714 */
1715 .globl sun4v_intr_getenabled
1716sun4v_intr_getenabled:
1717 mov HV_FAST_INTR_GETENABLED, %o5
1718 ta HV_FAST_TRAP
1719 retl
1720 mov %o1, %o0
1721
1722 /* %o0: sysino
1723 * %o1: intr_enabled (HV_INTR_{DISABLED,ENABLED})
1724 */
1725 .globl sun4v_intr_setenabled
1726sun4v_intr_setenabled:
1727 mov HV_FAST_INTR_SETENABLED, %o5
1728 ta HV_FAST_TRAP
1729 retl
1730 nop
1731
1732 /* %o0: sysino
1733 *
1734 * returns %o0: intr_state (HV_INTR_STATE_*)
1735 */
1736 .globl sun4v_intr_getstate
1737sun4v_intr_getstate:
1738 mov HV_FAST_INTR_GETSTATE, %o5
1739 ta HV_FAST_TRAP
1740 retl
1741 mov %o1, %o0
1742
1743 /* %o0: sysino
1744 * %o1: intr_state (HV_INTR_STATE_*)
1745 */
1746 .globl sun4v_intr_setstate
1747sun4v_intr_setstate:
1748 mov HV_FAST_INTR_SETSTATE, %o5
1749 ta HV_FAST_TRAP
1750 retl
1751 nop
1752
1753 /* %o0: sysino
1754 *
1755 * returns %o0: cpuid
1756 */
1757 .globl sun4v_intr_gettarget
1758sun4v_intr_gettarget:
1759 mov HV_FAST_INTR_GETTARGET, %o5
1760 ta HV_FAST_TRAP
1761 retl
1762 mov %o1, %o0
1763
1764 /* %o0: sysino
1765 * %o1: cpuid
1766 */
1767 .globl sun4v_intr_settarget
1768sun4v_intr_settarget:
1769 mov HV_FAST_INTR_SETTARGET, %o5
1770 ta HV_FAST_TRAP
1771 retl
1772 nop
1773
diff --git a/include/asm-sparc64/hypervisor.h b/include/asm-sparc64/hypervisor.h
index 16a40f48beb3..587a0f6a0a74 100644
--- a/include/asm-sparc64/hypervisor.h
+++ b/include/asm-sparc64/hypervisor.h
@@ -1221,6 +1221,10 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle,
1221 */ 1221 */
1222#define HV_FAST_INTR_GETENABLED 0xa1 1222#define HV_FAST_INTR_GETENABLED 0xa1
1223 1223
1224#ifndef __ASSEMBLY__
1225extern unsigned long sun4v_intr_getenabled(unsigned long sysino);
1226#endif
1227
1224/* intr_setenabled() 1228/* intr_setenabled()
1225 * TRAP: HV_FAST_TRAP 1229 * TRAP: HV_FAST_TRAP
1226 * FUNCTION: HV_FAST_INTR_SETENABLED 1230 * FUNCTION: HV_FAST_INTR_SETENABLED
@@ -1233,6 +1237,10 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle,
1233 */ 1237 */
1234#define HV_FAST_INTR_SETENABLED 0xa2 1238#define HV_FAST_INTR_SETENABLED 0xa2
1235 1239
1240#ifndef __ASSEMBLY__
1241extern void sun4v_intr_setenabled(unsigned long sysino, unsigned long intr_enabled);
1242#endif
1243
1236/* intr_getstate() 1244/* intr_getstate()
1237 * TRAP: HV_FAST_TRAP 1245 * TRAP: HV_FAST_TRAP
1238 * FUNCTION: HV_FAST_INTR_GETSTATE 1246 * FUNCTION: HV_FAST_INTR_GETSTATE
@@ -1245,6 +1253,10 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle,
1245 */ 1253 */
1246#define HV_FAST_INTR_GETSTATE 0xa3 1254#define HV_FAST_INTR_GETSTATE 0xa3
1247 1255
1256#ifndef __ASSEMBLY__
1257extern unsigned long sun4v_intr_getstate(unsigned long sysino);
1258#endif
1259
1248/* intr_setstate() 1260/* intr_setstate()
1249 * TRAP: HV_FAST_TRAP 1261 * TRAP: HV_FAST_TRAP
1250 * FUNCTION: HV_FAST_INTR_SETSTATE 1262 * FUNCTION: HV_FAST_INTR_SETSTATE
@@ -1261,6 +1273,10 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle,
1261 */ 1273 */
1262#define HV_FAST_INTR_SETSTATE 0xa4 1274#define HV_FAST_INTR_SETSTATE 0xa4
1263 1275
1276#ifndef __ASSEMBLY__
1277extern void sun4v_intr_setstate(unsigned long sysino, unsigned long intr_state);
1278#endif
1279
1264/* intr_gettarget() 1280/* intr_gettarget()
1265 * TRAP: HV_FAST_TRAP 1281 * TRAP: HV_FAST_TRAP
1266 * FUNCTION: HV_FAST_INTR_GETTARGET 1282 * FUNCTION: HV_FAST_INTR_GETTARGET
@@ -1275,6 +1291,10 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle,
1275 */ 1291 */
1276#define HV_FAST_INTR_GETTARGET 0xa5 1292#define HV_FAST_INTR_GETTARGET 0xa5
1277 1293
1294#ifndef __ASSEMBLY__
1295extern unsigned long sun4v_intr_gettarget(unsigned long sysino);
1296#endif
1297
1278/* intr_settarget() 1298/* intr_settarget()
1279 * TRAP: HV_FAST_TRAP 1299 * TRAP: HV_FAST_TRAP
1280 * FUNCTION: HV_FAST_INTR_SETTARGET 1300 * FUNCTION: HV_FAST_INTR_SETTARGET
@@ -1288,6 +1308,10 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle,
1288 */ 1308 */
1289#define HV_FAST_INTR_SETTARGET 0xa6 1309#define HV_FAST_INTR_SETTARGET 0xa6
1290 1310
1311#ifndef __ASSEMBLY__
1312extern void sun4v_intr_settarget(unsigned long sysino, unsigned long cpuid);
1313#endif
1314
1291/* PCI IO services. 1315/* PCI IO services.
1292 * 1316 *
1293 * See the terminology descriptions in the device interrupt services 1317 * See the terminology descriptions in the device interrupt services