···492492493493static int __init sn2_ptc_init(void)494494{495495+ if (!ia64_platform_is("sn2"))496496+ return -ENOSYS;497497+495498 if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) {496499 printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME);497500 return -EINVAL;
+2-1
arch/ia64/sn/kernel/sn2/sn_hwperf.c
···743743 if ((r = sn_hwperf_enum_objects(&nobj, &objs)) == 0) {744744 memset(p, 0, a.sz);745745 for (i = 0; i < nobj; i++) {746746+ int cpuobj_index = 0;746747 if (!SN_HWPERF_IS_NODE(objs + i))747748 continue;748749 node = sn_hwperf_obj_to_cnode(objs + i);749750 for_each_online_cpu(j) {750751 if (node != cpu_to_node(j))751752 continue;752752- cpuobj = (struct sn_hwperf_object_info *) p + j;753753+ cpuobj = (struct sn_hwperf_object_info *) p + cpuobj_index++;753754 slice = 'a' + cpuid_to_slice(j);754755 cdata = cpu_data(j);755756 cpuobj->id = j;
+34
include/asm-ia64/sn/sn_sal.h
···5656#define SN_SAL_BUS_CONFIG 0x020000375757#define SN_SAL_SYS_SERIAL_GET 0x020000385858#define SN_SAL_PARTITION_SERIAL_GET 0x020000395959+#define SN_SAL_SYSCTL_PARTITION_GET 0x0200003a5960#define SN_SAL_SYSTEM_POWER_DOWN 0x0200003b6061#define SN_SAL_GET_MASTER_BASEIO_NASID 0x0200003c6162#define SN_SAL_COHERENCE 0x0200003d···582581}583582584583/*584584+ * Returns the partition id of the nasid passed in as an argument,585585+ * or INVALID_PARTID if the partition id cannot be retrieved.586586+ */587587+static inline partid_t588588+ia64_sn_sysctl_partition_get(nasid_t nasid)589589+{590590+ struct ia64_sal_retval ret_stuff;591591+ SAL_CALL(ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid,592592+ 0, 0, 0, 0, 0, 0);593593+ if (ret_stuff.status != 0)594594+ return -1;595595+ return ((partid_t)ret_stuff.v0);596596+}597597+598598+/*585599 * Returns the physical address of the partition's reserved page through586600 * an iterative number of calls.587601 *···10331017 ret_stuff.v1 = 0;10341018 ret_stuff.v2 = 0;10351019 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_GET_SN_INFO, fc, 0, 0, 0, 0, 0, 0);10201020+10211021+/***** BEGIN HACK - temp til old proms no longer supported ********/10221022+ if (ret_stuff.status == SALRET_NOT_IMPLEMENTED) {10231023+ int nasid = get_sapicid() & 0xfff;;10241024+#define SH_SHUB_ID_NODES_PER_BIT_MASK 0x001f000000000000UL10251025+#define SH_SHUB_ID_NODES_PER_BIT_SHFT 4810261026+ if (shubtype) *shubtype = 0;10271027+ if (nasid_bitmask) *nasid_bitmask = 0x7ff;10281028+ if (nasid_shift) *nasid_shift = 38;10291029+ if (systemsize) *systemsize = 10;10301030+ if (sharing_domain_size) *sharing_domain_size = 8;10311031+ if (partid) *partid = ia64_sn_sysctl_partition_get(nasid);10321032+ if (coher) *coher = nasid >> 9;10331033+ if (reg) *reg = (HUB_L((u64 *) LOCAL_MMR_ADDR(SH1_SHUB_ID)) & SH_SHUB_ID_NODES_PER_BIT_MASK) >>10341034+ SH_SHUB_ID_NODES_PER_BIT_SHFT;10351035+ return 0;10361036+ }10371037+/***** END HACK *******/1036103810371039 if (ret_stuff.status < 0)10381040 return ret_stuff.status;
+7-19
include/asm-ia64/sn/tioce.h
···11-/**************************************************************************22- * *33- * Unpublished copyright (c) 2005, Silicon Graphics, Inc. *44- * THIS IS UNPUBLISHED CONFIDENTIAL AND PROPRIETARY SOURCE CODE OF SGI. *55- * *66- * The copyright notice above does not evidence any actual or intended *77- * publication or disclosure of this source code, which includes *88- * information that is confidential and/or proprietary, and is a trade *99- * secret, of Silicon Graphics, Inc. ANY REPRODUCTION, MODIFICATION, *1010- * DISTRIBUTION, PUBLIC PERFORMANCE, OR PUBLIC DISPLAY OF OR THROUGH *1111- * USE OF THIS SOURCE CODE WITHOUT THE EXPRESS WRITTEN CONSENT OF *1212- * SILICON GRAPHICS, INC. IS STRICTLY PROHIBITED, AND IN VIOLATION OF *1313- * APPLICABLE LAWS AND INTERNATIONAL TREATIES. THE RECEIPT OR *1414- * POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION DOES NOT *1515- * CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS *1616- * CONTENTS, OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY *1717- * DESCRIBE, IN WHOLE OR IN PART. *1818- * *1919- **************************************************************************/11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved.77+ */208219#ifndef __ASM_IA64_SN_TIOCE_H__2210#define __ASM_IA64_SN_TIOCE_H__
+7-10
include/asm-ia64/sn/tioce_provider.h
···11-/**************************************************************************22- * Copyright (C) 2005, Silicon Graphics, Inc. *33- * *44- * These coded instructions, statements, and computer programs contain *55- * unpublished proprietary information of Silicon Graphics, Inc., and *66- * are protected by Federal copyright law. They may not be disclosed *77- * to third parties or copied or duplicated in any form, in whole or *88- * in part, without the prior written consent of Silicon Graphics, Inc. *99- * *1010- **************************************************************************/11+/*22+ * This file is subject to the terms and conditions of the GNU General Public33+ * License. See the file "COPYING" in the main directory of this archive44+ * for more details.55+ *66+ * Copyright (c) 2003-2005 Silicon Graphics, Inc. All rights reserved.77+ */118129#ifndef _ASM_IA64_SN_CE_PROVIDER_H1310#define _ASM_IA64_SN_CE_PROVIDER_H