Skip to content

Commit

Permalink
[IA64] prevent sn2 specific code to be run in generic kernels
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jes Sorensen authored and Tony Luck committed Feb 8, 2006
1 parent d6e56a2 commit f478af9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions arch/ia64/sn/kernel/mca.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
* Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
*/

#include <linux/types.h>
Expand Down Expand Up @@ -137,7 +137,8 @@ int sn_salinfo_platform_oemdata(const u8 *sect_header, u8 **oemdata, u64 *oemdat

static int __init sn_salinfo_init(void)
{
salinfo_platform_oemdata = &sn_salinfo_platform_oemdata;
if (ia64_platform_is("sn2"))
salinfo_platform_oemdata = &sn_salinfo_platform_oemdata;
return 0;
}

Expand Down
5 changes: 4 additions & 1 deletion arch/ia64/sn/kernel/sn2/sn_hwperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 2004-2005 Silicon Graphics, Inc. All rights reserved.
* Copyright (C) 2004-2006 Silicon Graphics, Inc. All rights reserved.
*
* SGI Altix topology and hardware performance monitoring API.
* Mark Goodwin <markgw@sgi.com>.
Expand Down Expand Up @@ -973,6 +973,9 @@ static int __devinit sn_hwperf_misc_register_init(void)
{
int e;

if (!ia64_platform_is("sn2"))
return 0;

sn_hwperf_init();

/*
Expand Down

0 comments on commit f478af9

Please sign in to comment.