diff options
Diffstat (limited to 'arch/sparc/include/asm/hypervisor.h')
-rw-r--r-- | arch/sparc/include/asm/hypervisor.h | 325 |
1 files changed, 164 insertions, 161 deletions
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index ca121f0fa3ec..94b39caea3eb 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h | |||
@@ -98,7 +98,7 @@ | |||
98 | #define HV_FAST_MACH_EXIT 0x00 | 98 | #define HV_FAST_MACH_EXIT 0x00 |
99 | 99 | ||
100 | #ifndef __ASSEMBLY__ | 100 | #ifndef __ASSEMBLY__ |
101 | extern void sun4v_mach_exit(unsigned long exit_code); | 101 | void sun4v_mach_exit(unsigned long exit_code); |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | /* Domain services. */ | 104 | /* Domain services. */ |
@@ -127,9 +127,9 @@ extern void sun4v_mach_exit(unsigned long exit_code); | |||
127 | #define HV_FAST_MACH_DESC 0x01 | 127 | #define HV_FAST_MACH_DESC 0x01 |
128 | 128 | ||
129 | #ifndef __ASSEMBLY__ | 129 | #ifndef __ASSEMBLY__ |
130 | extern unsigned long sun4v_mach_desc(unsigned long buffer_pa, | 130 | unsigned long sun4v_mach_desc(unsigned long buffer_pa, |
131 | unsigned long buf_len, | 131 | unsigned long buf_len, |
132 | unsigned long *real_buf_len); | 132 | unsigned long *real_buf_len); |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | /* mach_sir() | 135 | /* mach_sir() |
@@ -148,7 +148,7 @@ extern unsigned long sun4v_mach_desc(unsigned long buffer_pa, | |||
148 | #define HV_FAST_MACH_SIR 0x02 | 148 | #define HV_FAST_MACH_SIR 0x02 |
149 | 149 | ||
150 | #ifndef __ASSEMBLY__ | 150 | #ifndef __ASSEMBLY__ |
151 | extern void sun4v_mach_sir(void); | 151 | void sun4v_mach_sir(void); |
152 | #endif | 152 | #endif |
153 | 153 | ||
154 | /* mach_set_watchdog() | 154 | /* mach_set_watchdog() |
@@ -204,8 +204,8 @@ extern void sun4v_mach_sir(void); | |||
204 | #define HV_FAST_MACH_SET_WATCHDOG 0x05 | 204 | #define HV_FAST_MACH_SET_WATCHDOG 0x05 |
205 | 205 | ||
206 | #ifndef __ASSEMBLY__ | 206 | #ifndef __ASSEMBLY__ |
207 | extern unsigned long sun4v_mach_set_watchdog(unsigned long timeout, | 207 | unsigned long sun4v_mach_set_watchdog(unsigned long timeout, |
208 | unsigned long *orig_timeout); | 208 | unsigned long *orig_timeout); |
209 | #endif | 209 | #endif |
210 | 210 | ||
211 | /* CPU services. | 211 | /* CPU services. |
@@ -250,10 +250,10 @@ extern unsigned long sun4v_mach_set_watchdog(unsigned long timeout, | |||
250 | #define HV_FAST_CPU_START 0x10 | 250 | #define HV_FAST_CPU_START 0x10 |
251 | 251 | ||
252 | #ifndef __ASSEMBLY__ | 252 | #ifndef __ASSEMBLY__ |
253 | extern unsigned long sun4v_cpu_start(unsigned long cpuid, | 253 | unsigned long sun4v_cpu_start(unsigned long cpuid, |
254 | unsigned long pc, | 254 | unsigned long pc, |
255 | unsigned long rtba, | 255 | unsigned long rtba, |
256 | unsigned long arg0); | 256 | unsigned long arg0); |
257 | #endif | 257 | #endif |
258 | 258 | ||
259 | /* cpu_stop() | 259 | /* cpu_stop() |
@@ -278,7 +278,7 @@ extern unsigned long sun4v_cpu_start(unsigned long cpuid, | |||
278 | #define HV_FAST_CPU_STOP 0x11 | 278 | #define HV_FAST_CPU_STOP 0x11 |
279 | 279 | ||
280 | #ifndef __ASSEMBLY__ | 280 | #ifndef __ASSEMBLY__ |
281 | extern unsigned long sun4v_cpu_stop(unsigned long cpuid); | 281 | unsigned long sun4v_cpu_stop(unsigned long cpuid); |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | /* cpu_yield() | 284 | /* cpu_yield() |
@@ -295,7 +295,7 @@ extern unsigned long sun4v_cpu_stop(unsigned long cpuid); | |||
295 | #define HV_FAST_CPU_YIELD 0x12 | 295 | #define HV_FAST_CPU_YIELD 0x12 |
296 | 296 | ||
297 | #ifndef __ASSEMBLY__ | 297 | #ifndef __ASSEMBLY__ |
298 | extern unsigned long sun4v_cpu_yield(void); | 298 | unsigned long sun4v_cpu_yield(void); |
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | /* cpu_qconf() | 301 | /* cpu_qconf() |
@@ -341,9 +341,9 @@ extern unsigned long sun4v_cpu_yield(void); | |||
341 | #define HV_CPU_QUEUE_NONRES_ERROR 0x3f | 341 | #define HV_CPU_QUEUE_NONRES_ERROR 0x3f |
342 | 342 | ||
343 | #ifndef __ASSEMBLY__ | 343 | #ifndef __ASSEMBLY__ |
344 | extern unsigned long sun4v_cpu_qconf(unsigned long type, | 344 | unsigned long sun4v_cpu_qconf(unsigned long type, |
345 | unsigned long queue_paddr, | 345 | unsigned long queue_paddr, |
346 | unsigned long num_queue_entries); | 346 | unsigned long num_queue_entries); |
347 | #endif | 347 | #endif |
348 | 348 | ||
349 | /* cpu_qinfo() | 349 | /* cpu_qinfo() |
@@ -394,7 +394,9 @@ extern unsigned long sun4v_cpu_qconf(unsigned long type, | |||
394 | #define HV_FAST_CPU_MONDO_SEND 0x42 | 394 | #define HV_FAST_CPU_MONDO_SEND 0x42 |
395 | 395 | ||
396 | #ifndef __ASSEMBLY__ | 396 | #ifndef __ASSEMBLY__ |
397 | extern unsigned long sun4v_cpu_mondo_send(unsigned long cpu_count, unsigned long cpu_list_pa, unsigned long mondo_block_pa); | 397 | unsigned long sun4v_cpu_mondo_send(unsigned long cpu_count, |
398 | unsigned long cpu_list_pa, | ||
399 | unsigned long mondo_block_pa); | ||
398 | #endif | 400 | #endif |
399 | 401 | ||
400 | /* cpu_myid() | 402 | /* cpu_myid() |
@@ -425,7 +427,7 @@ extern unsigned long sun4v_cpu_mondo_send(unsigned long cpu_count, unsigned long | |||
425 | #define HV_CPU_STATE_ERROR 0x03 | 427 | #define HV_CPU_STATE_ERROR 0x03 |
426 | 428 | ||
427 | #ifndef __ASSEMBLY__ | 429 | #ifndef __ASSEMBLY__ |
428 | extern long sun4v_cpu_state(unsigned long cpuid); | 430 | long sun4v_cpu_state(unsigned long cpuid); |
429 | #endif | 431 | #endif |
430 | 432 | ||
431 | /* cpu_set_rtba() | 433 | /* cpu_set_rtba() |
@@ -625,8 +627,8 @@ struct hv_fault_status { | |||
625 | #define HV_FAST_MMU_TSB_CTX0 0x20 | 627 | #define HV_FAST_MMU_TSB_CTX0 0x20 |
626 | 628 | ||
627 | #ifndef __ASSEMBLY__ | 629 | #ifndef __ASSEMBLY__ |
628 | extern unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions, | 630 | unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions, |
629 | unsigned long tsb_desc_ra); | 631 | unsigned long tsb_desc_ra); |
630 | #endif | 632 | #endif |
631 | 633 | ||
632 | /* mmu_tsb_ctxnon0() | 634 | /* mmu_tsb_ctxnon0() |
@@ -710,7 +712,7 @@ extern unsigned long sun4v_mmu_tsb_ctx0(unsigned long num_descriptions, | |||
710 | #define HV_FAST_MMU_DEMAP_ALL 0x24 | 712 | #define HV_FAST_MMU_DEMAP_ALL 0x24 |
711 | 713 | ||
712 | #ifndef __ASSEMBLY__ | 714 | #ifndef __ASSEMBLY__ |
713 | extern void sun4v_mmu_demap_all(void); | 715 | void sun4v_mmu_demap_all(void); |
714 | #endif | 716 | #endif |
715 | 717 | ||
716 | /* mmu_map_perm_addr() | 718 | /* mmu_map_perm_addr() |
@@ -740,10 +742,10 @@ extern void sun4v_mmu_demap_all(void); | |||
740 | #define HV_FAST_MMU_MAP_PERM_ADDR 0x25 | 742 | #define HV_FAST_MMU_MAP_PERM_ADDR 0x25 |
741 | 743 | ||
742 | #ifndef __ASSEMBLY__ | 744 | #ifndef __ASSEMBLY__ |
743 | extern unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr, | 745 | unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr, |
744 | unsigned long set_to_zero, | 746 | unsigned long set_to_zero, |
745 | unsigned long tte, | 747 | unsigned long tte, |
746 | unsigned long flags); | 748 | unsigned long flags); |
747 | #endif | 749 | #endif |
748 | 750 | ||
749 | /* mmu_fault_area_conf() | 751 | /* mmu_fault_area_conf() |
@@ -945,7 +947,7 @@ extern unsigned long sun4v_mmu_map_perm_addr(unsigned long vaddr, | |||
945 | #define HV_FAST_TOD_GET 0x50 | 947 | #define HV_FAST_TOD_GET 0x50 |
946 | 948 | ||
947 | #ifndef __ASSEMBLY__ | 949 | #ifndef __ASSEMBLY__ |
948 | extern unsigned long sun4v_tod_get(unsigned long *time); | 950 | unsigned long sun4v_tod_get(unsigned long *time); |
949 | #endif | 951 | #endif |
950 | 952 | ||
951 | /* tod_set() | 953 | /* tod_set() |
@@ -962,7 +964,7 @@ extern unsigned long sun4v_tod_get(unsigned long *time); | |||
962 | #define HV_FAST_TOD_SET 0x51 | 964 | #define HV_FAST_TOD_SET 0x51 |
963 | 965 | ||
964 | #ifndef __ASSEMBLY__ | 966 | #ifndef __ASSEMBLY__ |
965 | extern unsigned long sun4v_tod_set(unsigned long time); | 967 | unsigned long sun4v_tod_set(unsigned long time); |
966 | #endif | 968 | #endif |
967 | 969 | ||
968 | /* Console services */ | 970 | /* Console services */ |
@@ -1038,14 +1040,14 @@ extern unsigned long sun4v_tod_set(unsigned long time); | |||
1038 | #define HV_FAST_CONS_WRITE 0x63 | 1040 | #define HV_FAST_CONS_WRITE 0x63 |
1039 | 1041 | ||
1040 | #ifndef __ASSEMBLY__ | 1042 | #ifndef __ASSEMBLY__ |
1041 | extern long sun4v_con_getchar(long *status); | 1043 | long sun4v_con_getchar(long *status); |
1042 | extern long sun4v_con_putchar(long c); | 1044 | long sun4v_con_putchar(long c); |
1043 | extern long sun4v_con_read(unsigned long buffer, | 1045 | long sun4v_con_read(unsigned long buffer, |
1044 | unsigned long size, | 1046 | unsigned long size, |
1045 | unsigned long *bytes_read); | 1047 | unsigned long *bytes_read); |
1046 | extern unsigned long sun4v_con_write(unsigned long buffer, | 1048 | unsigned long sun4v_con_write(unsigned long buffer, |
1047 | unsigned long size, | 1049 | unsigned long size, |
1048 | unsigned long *bytes_written); | 1050 | unsigned long *bytes_written); |
1049 | #endif | 1051 | #endif |
1050 | 1052 | ||
1051 | /* mach_set_soft_state() | 1053 | /* mach_set_soft_state() |
@@ -1080,8 +1082,8 @@ extern unsigned long sun4v_con_write(unsigned long buffer, | |||
1080 | #define HV_SOFT_STATE_TRANSITION 0x02 | 1082 | #define HV_SOFT_STATE_TRANSITION 0x02 |
1081 | 1083 | ||
1082 | #ifndef __ASSEMBLY__ | 1084 | #ifndef __ASSEMBLY__ |
1083 | extern unsigned long sun4v_mach_set_soft_state(unsigned long soft_state, | 1085 | unsigned long sun4v_mach_set_soft_state(unsigned long soft_state, |
1084 | unsigned long msg_string_ra); | 1086 | unsigned long msg_string_ra); |
1085 | #endif | 1087 | #endif |
1086 | 1088 | ||
1087 | /* mach_get_soft_state() | 1089 | /* mach_get_soft_state() |
@@ -1159,20 +1161,20 @@ extern unsigned long sun4v_mach_set_soft_state(unsigned long soft_state, | |||
1159 | #define HV_FAST_SVC_CLRSTATUS 0x84 | 1161 | #define HV_FAST_SVC_CLRSTATUS 0x84 |
1160 | 1162 | ||
1161 | #ifndef __ASSEMBLY__ | 1163 | #ifndef __ASSEMBLY__ |
1162 | extern unsigned long sun4v_svc_send(unsigned long svc_id, | 1164 | unsigned long sun4v_svc_send(unsigned long svc_id, |
1163 | unsigned long buffer, | 1165 | unsigned long buffer, |
1164 | unsigned long buffer_size, | 1166 | unsigned long buffer_size, |
1165 | unsigned long *sent_bytes); | 1167 | unsigned long *sent_bytes); |
1166 | extern unsigned long sun4v_svc_recv(unsigned long svc_id, | 1168 | unsigned long sun4v_svc_recv(unsigned long svc_id, |
1167 | unsigned long buffer, | 1169 | unsigned long buffer, |
1168 | unsigned long buffer_size, | 1170 | unsigned long buffer_size, |
1169 | unsigned long *recv_bytes); | 1171 | unsigned long *recv_bytes); |
1170 | extern unsigned long sun4v_svc_getstatus(unsigned long svc_id, | 1172 | unsigned long sun4v_svc_getstatus(unsigned long svc_id, |
1171 | unsigned long *status_bits); | 1173 | unsigned long *status_bits); |
1172 | extern unsigned long sun4v_svc_setstatus(unsigned long svc_id, | 1174 | unsigned long sun4v_svc_setstatus(unsigned long svc_id, |
1173 | unsigned long status_bits); | 1175 | unsigned long status_bits); |
1174 | extern unsigned long sun4v_svc_clrstatus(unsigned long svc_id, | 1176 | unsigned long sun4v_svc_clrstatus(unsigned long svc_id, |
1175 | unsigned long status_bits); | 1177 | unsigned long status_bits); |
1176 | #endif | 1178 | #endif |
1177 | 1179 | ||
1178 | /* Trap trace services. | 1180 | /* Trap trace services. |
@@ -1458,8 +1460,8 @@ struct hv_trap_trace_entry { | |||
1458 | #define HV_FAST_INTR_DEVINO2SYSINO 0xa0 | 1460 | #define HV_FAST_INTR_DEVINO2SYSINO 0xa0 |
1459 | 1461 | ||
1460 | #ifndef __ASSEMBLY__ | 1462 | #ifndef __ASSEMBLY__ |
1461 | extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle, | 1463 | unsigned long sun4v_devino_to_sysino(unsigned long devhandle, |
1462 | unsigned long devino); | 1464 | unsigned long devino); |
1463 | #endif | 1465 | #endif |
1464 | 1466 | ||
1465 | /* intr_getenabled() | 1467 | /* intr_getenabled() |
@@ -1476,7 +1478,7 @@ extern unsigned long sun4v_devino_to_sysino(unsigned long devhandle, | |||
1476 | #define HV_FAST_INTR_GETENABLED 0xa1 | 1478 | #define HV_FAST_INTR_GETENABLED 0xa1 |
1477 | 1479 | ||
1478 | #ifndef __ASSEMBLY__ | 1480 | #ifndef __ASSEMBLY__ |
1479 | extern unsigned long sun4v_intr_getenabled(unsigned long sysino); | 1481 | unsigned long sun4v_intr_getenabled(unsigned long sysino); |
1480 | #endif | 1482 | #endif |
1481 | 1483 | ||
1482 | /* intr_setenabled() | 1484 | /* intr_setenabled() |
@@ -1492,7 +1494,8 @@ extern unsigned long sun4v_intr_getenabled(unsigned long sysino); | |||
1492 | #define HV_FAST_INTR_SETENABLED 0xa2 | 1494 | #define HV_FAST_INTR_SETENABLED 0xa2 |
1493 | 1495 | ||
1494 | #ifndef __ASSEMBLY__ | 1496 | #ifndef __ASSEMBLY__ |
1495 | extern unsigned long sun4v_intr_setenabled(unsigned long sysino, unsigned long intr_enabled); | 1497 | unsigned long sun4v_intr_setenabled(unsigned long sysino, |
1498 | unsigned long intr_enabled); | ||
1496 | #endif | 1499 | #endif |
1497 | 1500 | ||
1498 | /* intr_getstate() | 1501 | /* intr_getstate() |
@@ -1508,7 +1511,7 @@ extern unsigned long sun4v_intr_setenabled(unsigned long sysino, unsigned long i | |||
1508 | #define HV_FAST_INTR_GETSTATE 0xa3 | 1511 | #define HV_FAST_INTR_GETSTATE 0xa3 |
1509 | 1512 | ||
1510 | #ifndef __ASSEMBLY__ | 1513 | #ifndef __ASSEMBLY__ |
1511 | extern unsigned long sun4v_intr_getstate(unsigned long sysino); | 1514 | unsigned long sun4v_intr_getstate(unsigned long sysino); |
1512 | #endif | 1515 | #endif |
1513 | 1516 | ||
1514 | /* intr_setstate() | 1517 | /* intr_setstate() |
@@ -1528,7 +1531,7 @@ extern unsigned long sun4v_intr_getstate(unsigned long sysino); | |||
1528 | #define HV_FAST_INTR_SETSTATE 0xa4 | 1531 | #define HV_FAST_INTR_SETSTATE 0xa4 |
1529 | 1532 | ||
1530 | #ifndef __ASSEMBLY__ | 1533 | #ifndef __ASSEMBLY__ |
1531 | extern unsigned long sun4v_intr_setstate(unsigned long sysino, unsigned long intr_state); | 1534 | unsigned long sun4v_intr_setstate(unsigned long sysino, unsigned long intr_state); |
1532 | #endif | 1535 | #endif |
1533 | 1536 | ||
1534 | /* intr_gettarget() | 1537 | /* intr_gettarget() |
@@ -1546,7 +1549,7 @@ extern unsigned long sun4v_intr_setstate(unsigned long sysino, unsigned long int | |||
1546 | #define HV_FAST_INTR_GETTARGET 0xa5 | 1549 | #define HV_FAST_INTR_GETTARGET 0xa5 |
1547 | 1550 | ||
1548 | #ifndef __ASSEMBLY__ | 1551 | #ifndef __ASSEMBLY__ |
1549 | extern unsigned long sun4v_intr_gettarget(unsigned long sysino); | 1552 | unsigned long sun4v_intr_gettarget(unsigned long sysino); |
1550 | #endif | 1553 | #endif |
1551 | 1554 | ||
1552 | /* intr_settarget() | 1555 | /* intr_settarget() |
@@ -1563,7 +1566,7 @@ extern unsigned long sun4v_intr_gettarget(unsigned long sysino); | |||
1563 | #define HV_FAST_INTR_SETTARGET 0xa6 | 1566 | #define HV_FAST_INTR_SETTARGET 0xa6 |
1564 | 1567 | ||
1565 | #ifndef __ASSEMBLY__ | 1568 | #ifndef __ASSEMBLY__ |
1566 | extern unsigned long sun4v_intr_settarget(unsigned long sysino, unsigned long cpuid); | 1569 | unsigned long sun4v_intr_settarget(unsigned long sysino, unsigned long cpuid); |
1567 | #endif | 1570 | #endif |
1568 | 1571 | ||
1569 | /* vintr_get_cookie() | 1572 | /* vintr_get_cookie() |
@@ -1647,30 +1650,30 @@ extern unsigned long sun4v_intr_settarget(unsigned long sysino, unsigned long cp | |||
1647 | #define HV_FAST_VINTR_SET_TARGET 0xae | 1650 | #define HV_FAST_VINTR_SET_TARGET 0xae |
1648 | 1651 | ||
1649 | #ifndef __ASSEMBLY__ | 1652 | #ifndef __ASSEMBLY__ |
1650 | extern unsigned long sun4v_vintr_get_cookie(unsigned long dev_handle, | 1653 | unsigned long sun4v_vintr_get_cookie(unsigned long dev_handle, |
1651 | unsigned long dev_ino, | 1654 | unsigned long dev_ino, |
1652 | unsigned long *cookie); | 1655 | unsigned long *cookie); |
1653 | extern unsigned long sun4v_vintr_set_cookie(unsigned long dev_handle, | 1656 | unsigned long sun4v_vintr_set_cookie(unsigned long dev_handle, |
1654 | unsigned long dev_ino, | 1657 | unsigned long dev_ino, |
1655 | unsigned long cookie); | 1658 | unsigned long cookie); |
1656 | extern unsigned long sun4v_vintr_get_valid(unsigned long dev_handle, | 1659 | unsigned long sun4v_vintr_get_valid(unsigned long dev_handle, |
1657 | unsigned long dev_ino, | 1660 | unsigned long dev_ino, |
1658 | unsigned long *valid); | 1661 | unsigned long *valid); |
1659 | extern unsigned long sun4v_vintr_set_valid(unsigned long dev_handle, | 1662 | unsigned long sun4v_vintr_set_valid(unsigned long dev_handle, |
1660 | unsigned long dev_ino, | 1663 | unsigned long dev_ino, |
1661 | unsigned long valid); | 1664 | unsigned long valid); |
1662 | extern unsigned long sun4v_vintr_get_state(unsigned long dev_handle, | 1665 | unsigned long sun4v_vintr_get_state(unsigned long dev_handle, |
1663 | unsigned long dev_ino, | 1666 | unsigned long dev_ino, |
1664 | unsigned long *state); | 1667 | unsigned long *state); |
1665 | extern unsigned long sun4v_vintr_set_state(unsigned long dev_handle, | 1668 | unsigned long sun4v_vintr_set_state(unsigned long dev_handle, |
1666 | unsigned long dev_ino, | 1669 | unsigned long dev_ino, |
1667 | unsigned long state); | 1670 | unsigned long state); |
1668 | extern unsigned long sun4v_vintr_get_target(unsigned long dev_handle, | 1671 | unsigned long sun4v_vintr_get_target(unsigned long dev_handle, |
1669 | unsigned long dev_ino, | 1672 | unsigned long dev_ino, |
1670 | unsigned long *cpuid); | 1673 | unsigned long *cpuid); |
1671 | extern unsigned long sun4v_vintr_set_target(unsigned long dev_handle, | 1674 | unsigned long sun4v_vintr_set_target(unsigned long dev_handle, |
1672 | unsigned long dev_ino, | 1675 | unsigned long dev_ino, |
1673 | unsigned long cpuid); | 1676 | unsigned long cpuid); |
1674 | #endif | 1677 | #endif |
1675 | 1678 | ||
1676 | /* PCI IO services. | 1679 | /* PCI IO services. |
@@ -2627,50 +2630,50 @@ struct ldc_mtable_entry { | |||
2627 | #define HV_FAST_LDC_REVOKE 0xef | 2630 | #define HV_FAST_LDC_REVOKE 0xef |
2628 | 2631 | ||
2629 | #ifndef __ASSEMBLY__ | 2632 | #ifndef __ASSEMBLY__ |
2630 | extern unsigned long sun4v_ldc_tx_qconf(unsigned long channel, | 2633 | unsigned long sun4v_ldc_tx_qconf(unsigned long channel, |
2631 | unsigned long ra, | 2634 | unsigned long ra, |
2632 | unsigned long num_entries); | 2635 | unsigned long num_entries); |
2633 | extern unsigned long sun4v_ldc_tx_qinfo(unsigned long channel, | 2636 | unsigned long sun4v_ldc_tx_qinfo(unsigned long channel, |
2634 | unsigned long *ra, | 2637 | unsigned long *ra, |
2635 | unsigned long *num_entries); | 2638 | unsigned long *num_entries); |
2636 | extern unsigned long sun4v_ldc_tx_get_state(unsigned long channel, | 2639 | unsigned long sun4v_ldc_tx_get_state(unsigned long channel, |
2637 | unsigned long *head_off, | 2640 | unsigned long *head_off, |
2638 | unsigned long *tail_off, | 2641 | unsigned long *tail_off, |
2639 | unsigned long *chan_state); | 2642 | unsigned long *chan_state); |
2640 | extern unsigned long sun4v_ldc_tx_set_qtail(unsigned long channel, | 2643 | unsigned long sun4v_ldc_tx_set_qtail(unsigned long channel, |
2641 | unsigned long tail_off); | 2644 | unsigned long tail_off); |
2642 | extern unsigned long sun4v_ldc_rx_qconf(unsigned long channel, | 2645 | unsigned long sun4v_ldc_rx_qconf(unsigned long channel, |
2643 | unsigned long ra, | 2646 | unsigned long ra, |
2644 | unsigned long num_entries); | 2647 | unsigned long num_entries); |
2645 | extern unsigned long sun4v_ldc_rx_qinfo(unsigned long channel, | 2648 | unsigned long sun4v_ldc_rx_qinfo(unsigned long channel, |
2646 | unsigned long *ra, | 2649 | unsigned long *ra, |
2647 | unsigned long *num_entries); | 2650 | unsigned long *num_entries); |
2648 | extern unsigned long sun4v_ldc_rx_get_state(unsigned long channel, | 2651 | unsigned long sun4v_ldc_rx_get_state(unsigned long channel, |
2649 | unsigned long *head_off, | 2652 | unsigned long *head_off, |
2650 | unsigned long *tail_off, | 2653 | unsigned long *tail_off, |
2651 | unsigned long *chan_state); | 2654 | unsigned long *chan_state); |
2652 | extern unsigned long sun4v_ldc_rx_set_qhead(unsigned long channel, | 2655 | unsigned long sun4v_ldc_rx_set_qhead(unsigned long channel, |
2653 | unsigned long head_off); | 2656 | unsigned long head_off); |
2654 | extern unsigned long sun4v_ldc_set_map_table(unsigned long channel, | 2657 | unsigned long sun4v_ldc_set_map_table(unsigned long channel, |
2655 | unsigned long ra, | 2658 | unsigned long ra, |
2656 | unsigned long num_entries); | 2659 | unsigned long num_entries); |
2657 | extern unsigned long sun4v_ldc_get_map_table(unsigned long channel, | 2660 | unsigned long sun4v_ldc_get_map_table(unsigned long channel, |
2658 | unsigned long *ra, | 2661 | unsigned long *ra, |
2659 | unsigned long *num_entries); | 2662 | unsigned long *num_entries); |
2660 | extern unsigned long sun4v_ldc_copy(unsigned long channel, | 2663 | unsigned long sun4v_ldc_copy(unsigned long channel, |
2661 | unsigned long dir_code, | 2664 | unsigned long dir_code, |
2662 | unsigned long tgt_raddr, | 2665 | unsigned long tgt_raddr, |
2663 | unsigned long lcl_raddr, | 2666 | unsigned long lcl_raddr, |
2664 | unsigned long len, | 2667 | unsigned long len, |
2665 | unsigned long *actual_len); | 2668 | unsigned long *actual_len); |
2666 | extern unsigned long sun4v_ldc_mapin(unsigned long channel, | 2669 | unsigned long sun4v_ldc_mapin(unsigned long channel, |
2667 | unsigned long cookie, | 2670 | unsigned long cookie, |
2668 | unsigned long *ra, | 2671 | unsigned long *ra, |
2669 | unsigned long *perm); | 2672 | unsigned long *perm); |
2670 | extern unsigned long sun4v_ldc_unmap(unsigned long ra); | 2673 | unsigned long sun4v_ldc_unmap(unsigned long ra); |
2671 | extern unsigned long sun4v_ldc_revoke(unsigned long channel, | 2674 | unsigned long sun4v_ldc_revoke(unsigned long channel, |
2672 | unsigned long cookie, | 2675 | unsigned long cookie, |
2673 | unsigned long mte_cookie); | 2676 | unsigned long mte_cookie); |
2674 | #endif | 2677 | #endif |
2675 | 2678 | ||
2676 | /* Performance counter services. */ | 2679 | /* Performance counter services. */ |
@@ -2727,14 +2730,14 @@ extern unsigned long sun4v_ldc_revoke(unsigned long channel, | |||
2727 | #define HV_FAST_N2_SET_PERFREG 0x105 | 2730 | #define HV_FAST_N2_SET_PERFREG 0x105 |
2728 | 2731 | ||
2729 | #ifndef __ASSEMBLY__ | 2732 | #ifndef __ASSEMBLY__ |
2730 | extern unsigned long sun4v_niagara_getperf(unsigned long reg, | 2733 | unsigned long sun4v_niagara_getperf(unsigned long reg, |
2731 | unsigned long *val); | 2734 | unsigned long *val); |
2732 | extern unsigned long sun4v_niagara_setperf(unsigned long reg, | 2735 | unsigned long sun4v_niagara_setperf(unsigned long reg, |
2733 | unsigned long val); | 2736 | unsigned long val); |
2734 | extern unsigned long sun4v_niagara2_getperf(unsigned long reg, | 2737 | unsigned long sun4v_niagara2_getperf(unsigned long reg, |
2735 | unsigned long *val); | 2738 | unsigned long *val); |
2736 | extern unsigned long sun4v_niagara2_setperf(unsigned long reg, | 2739 | unsigned long sun4v_niagara2_setperf(unsigned long reg, |
2737 | unsigned long val); | 2740 | unsigned long val); |
2738 | #endif | 2741 | #endif |
2739 | 2742 | ||
2740 | /* MMU statistics services. | 2743 | /* MMU statistics services. |
@@ -2829,8 +2832,8 @@ struct hv_mmu_statistics { | |||
2829 | #define HV_FAST_MMUSTAT_INFO 0x103 | 2832 | #define HV_FAST_MMUSTAT_INFO 0x103 |
2830 | 2833 | ||
2831 | #ifndef __ASSEMBLY__ | 2834 | #ifndef __ASSEMBLY__ |
2832 | extern unsigned long sun4v_mmustat_conf(unsigned long ra, unsigned long *orig_ra); | 2835 | unsigned long sun4v_mmustat_conf(unsigned long ra, unsigned long *orig_ra); |
2833 | extern unsigned long sun4v_mmustat_info(unsigned long *ra); | 2836 | unsigned long sun4v_mmustat_info(unsigned long *ra); |
2834 | #endif | 2837 | #endif |
2835 | 2838 | ||
2836 | /* NCS crypto services */ | 2839 | /* NCS crypto services */ |
@@ -2919,9 +2922,9 @@ struct hv_ncs_qtail_update_arg { | |||
2919 | #define HV_FAST_NCS_REQUEST 0x110 | 2922 | #define HV_FAST_NCS_REQUEST 0x110 |
2920 | 2923 | ||
2921 | #ifndef __ASSEMBLY__ | 2924 | #ifndef __ASSEMBLY__ |
2922 | extern unsigned long sun4v_ncs_request(unsigned long request, | 2925 | unsigned long sun4v_ncs_request(unsigned long request, |
2923 | unsigned long arg_ra, | 2926 | unsigned long arg_ra, |
2924 | unsigned long arg_size); | 2927 | unsigned long arg_size); |
2925 | #endif | 2928 | #endif |
2926 | 2929 | ||
2927 | #define HV_FAST_FIRE_GET_PERFREG 0x120 | 2930 | #define HV_FAST_FIRE_GET_PERFREG 0x120 |
@@ -2930,18 +2933,18 @@ extern unsigned long sun4v_ncs_request(unsigned long request, | |||
2930 | #define HV_FAST_REBOOT_DATA_SET 0x172 | 2933 | #define HV_FAST_REBOOT_DATA_SET 0x172 |
2931 | 2934 | ||
2932 | #ifndef __ASSEMBLY__ | 2935 | #ifndef __ASSEMBLY__ |
2933 | extern unsigned long sun4v_reboot_data_set(unsigned long ra, | 2936 | unsigned long sun4v_reboot_data_set(unsigned long ra, |
2934 | unsigned long len); | 2937 | unsigned long len); |
2935 | #endif | 2938 | #endif |
2936 | 2939 | ||
2937 | #define HV_FAST_VT_GET_PERFREG 0x184 | 2940 | #define HV_FAST_VT_GET_PERFREG 0x184 |
2938 | #define HV_FAST_VT_SET_PERFREG 0x185 | 2941 | #define HV_FAST_VT_SET_PERFREG 0x185 |
2939 | 2942 | ||
2940 | #ifndef __ASSEMBLY__ | 2943 | #ifndef __ASSEMBLY__ |
2941 | extern unsigned long sun4v_vt_get_perfreg(unsigned long reg_num, | 2944 | unsigned long sun4v_vt_get_perfreg(unsigned long reg_num, |
2942 | unsigned long *reg_val); | 2945 | unsigned long *reg_val); |
2943 | extern unsigned long sun4v_vt_set_perfreg(unsigned long reg_num, | 2946 | unsigned long sun4v_vt_set_perfreg(unsigned long reg_num, |
2944 | unsigned long reg_val); | 2947 | unsigned long reg_val); |
2945 | #endif | 2948 | #endif |
2946 | 2949 | ||
2947 | /* Function numbers for HV_CORE_TRAP. */ | 2950 | /* Function numbers for HV_CORE_TRAP. */ |
@@ -2978,21 +2981,21 @@ extern unsigned long sun4v_vt_set_perfreg(unsigned long reg_num, | |||
2978 | #define HV_GRP_DIAG 0x0300 | 2981 | #define HV_GRP_DIAG 0x0300 |
2979 | 2982 | ||
2980 | #ifndef __ASSEMBLY__ | 2983 | #ifndef __ASSEMBLY__ |
2981 | extern unsigned long sun4v_get_version(unsigned long group, | 2984 | unsigned long sun4v_get_version(unsigned long group, |
2982 | unsigned long *major, | 2985 | unsigned long *major, |
2983 | unsigned long *minor); | 2986 | unsigned long *minor); |
2984 | extern unsigned long sun4v_set_version(unsigned long group, | 2987 | unsigned long sun4v_set_version(unsigned long group, |
2985 | unsigned long major, | 2988 | unsigned long major, |
2986 | unsigned long minor, | 2989 | unsigned long minor, |
2987 | unsigned long *actual_minor); | 2990 | unsigned long *actual_minor); |
2988 | 2991 | ||
2989 | extern int sun4v_hvapi_register(unsigned long group, unsigned long major, | 2992 | int sun4v_hvapi_register(unsigned long group, unsigned long major, |
2990 | unsigned long *minor); | 2993 | unsigned long *minor); |
2991 | extern void sun4v_hvapi_unregister(unsigned long group); | 2994 | void sun4v_hvapi_unregister(unsigned long group); |
2992 | extern int sun4v_hvapi_get(unsigned long group, | 2995 | int sun4v_hvapi_get(unsigned long group, |
2993 | unsigned long *major, | 2996 | unsigned long *major, |
2994 | unsigned long *minor); | 2997 | unsigned long *minor); |
2995 | extern void sun4v_hvapi_init(void); | 2998 | void sun4v_hvapi_init(void); |
2996 | #endif | 2999 | #endif |
2997 | 3000 | ||
2998 | #endif /* !(_SPARC64_HYPERVISOR_H) */ | 3001 | #endif /* !(_SPARC64_HYPERVISOR_H) */ |