diff options
-rw-r--r-- | arch/ia64/sn/kernel/bte.c | 1 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn2_smp.c | 3 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_sal.h | 34 | ||||
-rw-r--r-- | include/asm-ia64/sn/tioce.h | 26 | ||||
-rw-r--r-- | include/asm-ia64/sn/tioce_provider.h | 17 |
6 files changed, 54 insertions, 30 deletions
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index d71f4de44f79..dd73c0cb754b 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -137,6 +137,7 @@ retry_bteop: | |||
137 | bte = bte_if_on_node(nasid_to_try[nasid_index],bte_if_index); | 137 | bte = bte_if_on_node(nasid_to_try[nasid_index],bte_if_index); |
138 | 138 | ||
139 | if (bte == NULL) { | 139 | if (bte == NULL) { |
140 | nasid_index++; | ||
140 | continue; | 141 | continue; |
141 | } | 142 | } |
142 | 143 | ||
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index 49b530c39a42..5d54f5f4e926 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c | |||
@@ -492,6 +492,9 @@ static struct proc_dir_entry *proc_sn2_ptc; | |||
492 | 492 | ||
493 | static int __init sn2_ptc_init(void) | 493 | static int __init sn2_ptc_init(void) |
494 | { | 494 | { |
495 | if (!ia64_platform_is("sn2")) | ||
496 | return -ENOSYS; | ||
497 | |||
495 | if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) { | 498 | if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) { |
496 | printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); | 499 | printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); |
497 | return -EINVAL; | 500 | return -EINVAL; |
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 6c6fbca3229c..19b54fbcd7ea 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
@@ -743,13 +743,14 @@ sn_hwperf_ioctl(struct inode *in, struct file *fp, u32 op, u64 arg) | |||
743 | if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) { | 743 | if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) { |
744 | memset(p, 0, a.sz); | 744 | memset(p, 0, a.sz); |
745 | for (i = 0; i < nobj; i++) { | 745 | for (i = 0; i < nobj; i++) { |
746 | int cpuobj_index = 0; | ||
746 | if (!SN_HWPERF_IS_NODE(objs + i)) | 747 | if (!SN_HWPERF_IS_NODE(objs + i)) |
747 | continue; | 748 | continue; |
748 | node = sn_hwperf_obj_to_cnode(objs + i); | 749 | node = sn_hwperf_obj_to_cnode(objs + i); |
749 | for_each_online_cpu(j) { | 750 | for_each_online_cpu(j) { |
750 | if (node != cpu_to_node(j)) | 751 | if (node != cpu_to_node(j)) |
751 | continue; | 752 | continue; |
752 | cpuobj = (struct sn_hwperf_object_info *) p + j; | 753 | cpuobj = (struct sn_hwperf_object_info *) p + cpuobj_index++; |
753 | slice = 'a' + cpuid_to_slice(j); | 754 | slice = 'a' + cpuid_to_slice(j); |
754 | cdata = cpu_data(j); | 755 | cdata = cpu_data(j); |
755 | cpuobj->id = j; | 756 | cpuobj->id = j; |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index 3f7564dc0aa9..2a8b0d92a5d6 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -56,6 +56,7 @@ | |||
56 | #define SN_SAL_BUS_CONFIG 0x02000037 | 56 | #define SN_SAL_BUS_CONFIG 0x02000037 |
57 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 | 57 | #define SN_SAL_SYS_SERIAL_GET 0x02000038 |
58 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 | 58 | #define SN_SAL_PARTITION_SERIAL_GET 0x02000039 |
59 | #define SN_SAL_SYSCTL_PARTITION_GET 0x0200003a | ||
59 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b | 60 | #define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b |
60 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c | 61 | #define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c |
61 | #define SN_SAL_COHERENCE 0x0200003d | 62 | #define SN_SAL_COHERENCE 0x0200003d |
@@ -581,6 +582,21 @@ sn_partition_serial_number_val(void) { | |||
581 | } | 582 | } |
582 | 583 | ||
583 | /* | 584 | /* |
585 | * Returns the partition id of the nasid passed in as an argument, | ||
586 | * or INVALID_PARTID if the partition id cannot be retrieved. | ||
587 | */ | ||
588 | static inline partid_t | ||
589 | ia64_sn_sysctl_partition_get(nasid_t nasid) | ||
590 | { | ||
591 | struct ia64_sal_retval ret_stuff; | ||
592 | SAL_CALL(ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, | ||
593 | 0, 0, 0, 0, 0, 0); | ||
594 | if (ret_stuff.status != 0) | ||
595 | return -1; | ||
596 | return ((partid_t)ret_stuff.v0); | ||
597 | } | ||
598 | |||
599 | /* | ||
584 | * Returns the physical address of the partition's reserved page through | 600 | * Returns the physical address of the partition's reserved page through |
585 | * an iterative number of calls. | 601 | * an iterative number of calls. |
586 | * | 602 | * |
@@ -1018,6 +1034,24 @@ ia64_sn_get_sn_info(int fc, u8 *shubtype, u16 *nasid_bitmask, u8 *nasid_shift, | |||
1018 | ret_stuff.v2 = 0; | 1034 | ret_stuff.v2 = 0; |
1019 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); | 1035 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0); |
1020 | 1036 | ||
1037 | /***** BEGIN HACK - temp til old proms no longer supported ********/ | ||
1038 | if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) { | ||
1039 | int nasid = get_sapicid() & 0xfff;; | ||
1040 | #define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL | ||
1041 | #define SH_SHUB_ID_NODES_PER_BIT_SHFT 48 | ||
1042 | if (shubtype) *shubtype = 0; | ||
1043 | if (nasid_bitmask) *nasid_bitmask = 0x7ff; | ||
1044 | if (nasid_shift) *nasid_shift = 38; | ||
1045 | if (systemsize) *systemsize = 10; | ||
1046 | if (sharing_domain_size) *sharing_domain_size = 8; | ||
1047 | if (partid) *partid = ia64_sn_sysctl_partition_get(nasid); | ||
1048 | if (coher) *coher = nasid >> 9; | ||
1049 | if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >> | ||
1050 | SH_SHUB_ID_NODES_PER_BIT_SHFT; | ||
1051 | return 0; | ||
1052 | } | ||
1053 | /***** END HACK *******/ | ||
1054 | |||
1021 | if (ret_stuff.status < 0) | 1055 | if (ret_stuff.status < 0) |
1022 | return ret_stuff.status; | 1056 | return ret_stuff.status; |
1023 | 1057 | ||
diff --git a/include/asm-ia64/sn/tioce.h b/include/asm-ia64/sn/tioce.h index 22879853e46c..ecaddf960086 100644 --- a/include/asm-ia64/sn/tioce.h +++ b/include/asm-ia64/sn/tioce.h | |||
@@ -1,22 +1,10 @@ | |||
1 | /************************************************************************** | 1 | /* |
2 | * * | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * Unpublished copyright (c) 2005, Silicon Graphics, Inc. * | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * THIS IS UNPUBLISHED CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF SGI. * | 4 | * for more details. |
5 | * * | 5 | * |
6 | * The copyright notice above does not evidence any actual or intended * | 6 | * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved. |
7 | * publication or disclosure of this source code, which includes * | 7 | */ |
8 | * information that is confidential and/or proprietary, and is a trade * | ||
9 | * secret, of Silicon Graphics, Inc. ANY REPRODUCTION, MODIFICATION, * | ||
10 | * DISTRIBUTION, PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH * | ||
11 | * USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF * | ||
12 | * SILICON GRAPHICS, INC. IS STRICTLY PROHIBITED, AND IN VIOLATION OF * | ||
13 | * APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR * | ||
14 | * POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION DOES NOT * | ||
15 | * CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS * | ||
16 | * CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY * | ||
17 | * DESCRIBE, IN WHOLE OR IN PART. * | ||
18 | * * | ||
19 | **************************************************************************/ | ||
20 | 8 | ||
21 | #ifndef __ASM_IA64_SN_TIOCE_H__ | 9 | #ifndef __ASM_IA64_SN_TIOCE_H__ |
22 | #define __ASM_IA64_SN_TIOCE_H__ | 10 | #define __ASM_IA64_SN_TIOCE_H__ |
diff --git a/include/asm-ia64/sn/tioce_provider.h b/include/asm-ia64/sn/tioce_provider.h index 7f63dec0a79a..cb414908671d 100644 --- a/include/asm-ia64/sn/tioce_provider.h +++ b/include/asm-ia64/sn/tioce_provider.h | |||
@@ -1,13 +1,10 @@ | |||
1 | /************************************************************************** | 1 | /* |
2 | * Copyright (C) 2005, Silicon Graphics, Inc. * | 2 | * This file is subject to the terms and conditions of the GNU General Public |
3 | * * | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * These coded instructions, statements, and computer programs contain * | 4 | * for more details. |
5 | * unpublished proprietary information of Silicon Graphics, Inc., and * | 5 | * |
6 | * are protected by Federal copyright law. They may not be disclosed * | 6 | * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved. |
7 | * to third parties or copied or duplicated in any form, in whole or * | 7 | */ |
8 | * in part, without the prior written consent of Silicon Graphics, Inc. * | ||
9 | * * | ||
10 | **************************************************************************/ | ||
11 | 8 | ||
12 | #ifndef _ASM_IA64_SN_CE_PROVIDER_H | 9 | #ifndef _ASM_IA64_SN_CE_PROVIDER_H |
13 | #define _ASM_IA64_SN_CE_PROVIDER_H | 10 | #define _ASM_IA64_SN_CE_PROVIDER_H |