diff options
Diffstat (limited to 'include/asm-ia64/sn/sn_sal.h')
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 60 |
1 files changed, 6 insertions, 54 deletions
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 27976d223186..e67825ad1930 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -55,7 +55,6 @@ | |||
55 | #define SN_SAL_BUS_CONFIG 0x02000037 | 55 | #define SN_SAL_BUS_CONFIG 0x02000037 |
56 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 | 56 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 |
57 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 | 57 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 |
58 | #define SN_SAL_SYSCTL_PARTITION_GET 0x0200003a | ||
59 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b | 58 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b |
60 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c | 59 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c |
61 | #define SN_SAL_COHERENCE 0x0200003d | 60 | #define SN_SAL_COHERENCE 0x0200003d |
@@ -78,7 +77,8 @@ | |||
78 | 77 | ||
79 | #define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 | 78 | #define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 |
80 | #define SN_SAL_BTE_RECOVER 0x02000061 | 79 | #define SN_SAL_BTE_RECOVER 0x02000061 |
81 | #define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000062 | 80 | #define SN_SAL_RESERVED_DO_NOT_USE 0x02000062 |
81 | #define SN_SAL_IOIF_GET_PCI_TOPOLOGY 0x02000064 | ||
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Service-specific constants | 84 | * Service-specific constants |
@@ -586,35 +586,6 @@ sn_partition_serial_number_val(void) { | |||
586 | } | 586 | } |
587 | 587 | ||
588 | /* | 588 | /* |
589 | * Returns the partition id of the nasid passed in as an argument, | ||
590 | * or INVALID_PARTID if the partition id cannot be retrieved. | ||
591 | */ | ||
592 | static inline partid_t | ||
593 | ia64_sn_sysctl_partition_get(nasid_t nasid) | ||
594 | { | ||
595 | struct ia64_sal_retval ret_stuff; | ||
596 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, | ||
597 | 0, 0, 0, 0, 0, 0); | ||
598 | if (ret_stuff.status != 0) | ||
599 | return INVALID_PARTID; | ||
600 | return ((partid_t)ret_stuff.v0); | ||
601 | } | ||
602 | |||
603 | /* | ||
604 | * Returns the partition id of the current processor. | ||
605 | */ | ||
606 | |||
607 | extern partid_t sn_partid; | ||
608 | |||
609 | static inline partid_t | ||
610 | sn_local_partid(void) { | ||
611 | if (unlikely(sn_partid < 0)) { | ||
612 | sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id())); | ||
613 | } | ||
614 | return sn_partid; | ||
615 | } | ||
616 | |||
617 | /* | ||
618 | * Returns the physical address of the partition's reserved page through | 589 | * Returns the physical address of the partition's reserved page through |
619 | * an iterative number of calls. | 590 | * an iterative number of calls. |
620 | * | 591 | * |
@@ -749,7 +720,8 @@ ia64_sn_power_down(void) | |||
749 | { | 720 | { |
750 | struct ia64_sal_retval ret_stuff; | 721 | struct ia64_sal_retval ret_stuff; |
751 | SAL_CALL(ret_stuff, SN_SAL_SYSTEM_POWER_DOWN, 0, 0, 0, 0, 0, 0, 0); | 722 | SAL_CALL(ret_stuff, SN_SAL_SYSTEM_POWER_DOWN, 0, 0, 0, 0, 0, 0, 0); |
752 | while(1); | 723 | while(1) |
724 | cpu_relax(); | ||
753 | /* never returns */ | 725 | /* never returns */ |
754 | } | 726 | } |
755 | 727 | ||
@@ -1018,24 +990,6 @@ ia64_sn_get_sn_info(int fc, u8 *shubtype, u16 *nasid_bitmask, u8 *nasid_shift, | |||
1018 | ret_stuff.v2 = 0; | 990 | ret_stuff.v2 = 0; |
1019 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); | 991 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); |
1020 | 992 | ||
1021 | /***** BEGIN HACK - temp til old proms no longer supported ********/ | ||
1022 | if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) { | ||
1023 | int nasid = get_sapicid() & 0xfff;; | ||
1024 | #define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL | ||
1025 | #define SH_SHUB_ID_NODES_PER_BIT_SHFT 48 | ||
1026 | if (shubtype) *shubtype = 0; | ||
1027 | if (nasid_bitmask) *nasid_bitmask = 0x7ff; | ||
1028 | if (nasid_shift) *nasid_shift = 38; | ||
1029 | if (systemsize) *systemsize = 11; | ||
1030 | if (sharing_domain_size) *sharing_domain_size = 9; | ||
1031 | if (partid) *partid = ia64_sn_sysctl_partition_get(nasid); | ||
1032 | if (coher) *coher = nasid >> 9; | ||
1033 | if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >> | ||
1034 | SH_SHUB_ID_NODES_PER_BIT_SHFT; | ||
1035 | return 0; | ||
1036 | } | ||
1037 | /***** END HACK *******/ | ||
1038 | |||
1039 | if (ret_stuff.status < 0) | 993 | if (ret_stuff.status < 0) |
1040 | return ret_stuff.status; | 994 | return ret_stuff.status; |
1041 | 995 | ||
@@ -1068,12 +1022,10 @@ ia64_sn_hwperf_op(nasid_t nasid, u64 opcode, u64 a0, u64 a1, u64 a2, | |||
1068 | } | 1022 | } |
1069 | 1023 | ||
1070 | static inline int | 1024 | static inline int |
1071 | ia64_sn_ioif_get_pci_topology(u64 rack, u64 bay, u64 slot, u64 slab, | 1025 | ia64_sn_ioif_get_pci_topology(u64 buf, u64 len) |
1072 | u64 buf, u64 len) | ||
1073 | { | 1026 | { |
1074 | struct ia64_sal_retval rv; | 1027 | struct ia64_sal_retval rv; |
1075 | SAL_CALL_NOLOCK(rv, SN_SAL_IOIF_GET_PCI_TOPOLOGY, | 1028 | SAL_CALL_NOLOCK(rv, SN_SAL_IOIF_GET_PCI_TOPOLOGY, buf, len, 0, 0, 0, 0, 0); |
1076 | rack, bay, slot, slab, buf, len, 0); | ||
1077 | return (int) rv.status; | 1029 | return (int) rv.status; |
1078 | } | 1030 | } |
1079 | 1031 | ||