[IA64] prevent sn2 specific code to be run in generic kernels

Prevent SN2 specific code to be executed on non SN2 platforms when
running a generic kernel.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by Jes Sorensen and committed by Tony Luck f478af9d d6e56a2a

+7 -3
+3 -2
arch/ia64/sn/kernel/mca.c
··· 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. 7 */ 8 9 #include <linux/types.h> ··· 137 138 static int __init sn_salinfo_init(void) 139 { 140 - salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; 141 return 0; 142 } 143
··· 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 + * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. 7 */ 8 9 #include <linux/types.h> ··· 137 138 static int __init sn_salinfo_init(void) 139 { 140 + if (ia64_platform_is("sn2")) 141 + salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; 142 return 0; 143 } 144
+4 -1
arch/ia64/sn/kernel/sn2/sn_hwperf.c
··· 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 - * Copyright (C) 2004-2005 Silicon Graphics, Inc. All rights reserved. 7 * 8 * SGI Altix topology and hardware performance monitoring API. 9 * Mark Goodwin <markgw@sgi.com>. ··· 972 static int __devinit sn_hwperf_misc_register_init(void) 973 { 974 int e; 975 976 sn_hwperf_init(); 977
··· 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 + * Copyright (C) 2004-2006 Silicon Graphics, Inc. All rights reserved. 7 * 8 * SGI Altix topology and hardware performance monitoring API. 9 * Mark Goodwin <markgw@sgi.com>. ··· 972 static int __devinit sn_hwperf_misc_register_init(void) 973 { 974 int e; 975 + 976 + if (!ia64_platform_is("sn2")) 977 + return 0; 978 979 sn_hwperf_init(); 980