diff options
author | Russ Anderson <(rja@sgi.com)> | 2005-08-17 13:00:00 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-08-24 19:26:13 -0400 |
commit | 5b9021bc5800796e23e4994f8cf2dc61536be0a7 (patch) | |
tree | fdc500b570471049213c1ba623b7f8c5645768d7 /include/asm-ia64 | |
parent | 5390970d1c11b6d5d6a8253a718ed100e2178e14 (diff) |
[IA64] SGI SN remove redundant partition SAL call
Clean up of SGI SN partitioning related code.
The SN_SAL_GET_SN_INFO SAL call returns the partition ID, making
the SN_SAL_SYSCTL_PARTITION_GET SAL call redundant. Remove sn_partid
and use sn_partition_id.
Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/sn/geo.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 48 |
2 files changed, 1 insertions, 50 deletions
diff --git a/include/asm-ia64/sn/geo.h b/include/asm-ia64/sn/geo.h index 84b254603b8d..f083c9434066 100644 --- a/include/asm-ia64/sn/geo.h +++ b/include/asm-ia64/sn/geo.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ASM_IA64_SN_GEO_H | 9 | #ifndef _ASM_IA64_SN_GEO_H |
@@ -108,7 +108,6 @@ typedef union geoid_u { | |||
108 | #define INVALID_SLAB (slabid_t)-1 | 108 | #define INVALID_SLAB (slabid_t)-1 |
109 | #define INVALID_SLOT (slotid_t)-1 | 109 | #define INVALID_SLOT (slotid_t)-1 |
110 | #define INVALID_MODULE ((moduleid_t)-1) | 110 | #define INVALID_MODULE ((moduleid_t)-1) |
111 | #define INVALID_PARTID ((partid_t)-1) | ||
112 | 111 | ||
113 | static inline slabid_t geo_slab(geoid_t g) | 112 | static inline slabid_t geo_slab(geoid_t g) |
114 | { | 113 | { |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 02d16e34fd0c..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 |
@@ -587,35 +586,6 @@ sn_partition_serial_number_val(void) { | |||
587 | } | 586 | } |
588 | 587 | ||
589 | /* | 588 | /* |
590 | * Returns the partition id of the nasid passed in as an argument, | ||
591 | * or INVALID_PARTID if the partition id cannot be retrieved. | ||
592 | */ | ||
593 | static inline partid_t | ||
594 | ia64_sn_sysctl_partition_get(nasid_t nasid) | ||
595 | { | ||
596 | struct ia64_sal_retval ret_stuff; | ||
597 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, | ||
598 | 0, 0, 0, 0, 0, 0); | ||
599 | if (ret_stuff.status != 0) | ||
600 | return INVALID_PARTID; | ||
601 | return ((partid_t)ret_stuff.v0); | ||
602 | } | ||
603 | |||
604 | /* | ||
605 | * Returns the partition id of the current processor. | ||
606 | */ | ||
607 | |||
608 | extern partid_t sn_partid; | ||
609 | |||
610 | static inline partid_t | ||
611 | sn_local_partid(void) { | ||
612 | if (unlikely(sn_partid < 0)) { | ||
613 | sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id())); | ||
614 | } | ||
615 | return sn_partid; | ||
616 | } | ||
617 | |||
618 | /* | ||
619 | * Returns the physical address of the partition's reserved page through | 589 | * Returns the physical address of the partition's reserved page through |
620 | * an iterative number of calls. | 590 | * an iterative number of calls. |
621 | * | 591 | * |
@@ -1020,24 +990,6 @@ ia64_sn_get_sn_info(int fc, u8 *shubtype, u16 *nasid_bitmask, u8 *nasid_shift, | |||
1020 | ret_stuff.v2 = 0; | 990 | ret_stuff.v2 = 0; |
1021 | 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); |
1022 | 992 | ||
1023 | /***** BEGIN HACK - temp til old proms no longer supported ********/ | ||
1024 | if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) { | ||
1025 | int nasid = get_sapicid() & 0xfff;; | ||
1026 | #define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL | ||
1027 | #define SH_SHUB_ID_NODES_PER_BIT_SHFT 48 | ||
1028 | if (shubtype) *shubtype = 0; | ||
1029 | if (nasid_bitmask) *nasid_bitmask = 0x7ff; | ||
1030 | if (nasid_shift) *nasid_shift = 38; | ||
1031 | if (systemsize) *systemsize = 11; | ||
1032 | if (sharing_domain_size) *sharing_domain_size = 9; | ||
1033 | if (partid) *partid = ia64_sn_sysctl_partition_get(nasid); | ||
1034 | if (coher) *coher = nasid >> 9; | ||
1035 | if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >> | ||
1036 | SH_SHUB_ID_NODES_PER_BIT_SHFT; | ||
1037 | return 0; | ||
1038 | } | ||
1039 | /***** END HACK *******/ | ||
1040 | |||
1041 | if (ret_stuff.status < 0) | 993 | if (ret_stuff.status < 0) |
1042 | return ret_stuff.status; | 994 | return ret_stuff.status; |
1043 | 995 | ||