From: Jes Sorensen <jes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch] prevent sn2 specific code to be run in generic kernels
Date: Wed, 08 Feb 2006 15:19:28 +0000 [thread overview]
Message-ID: <yq08xslnain.fsf@jaguar.mkp.net> (raw)
Hi,
Last two cases where sn2 specific init calls would execute on any
platform when running a generic kernel.
Both cases are non fatal, which is why we didn't notice it
before. Still shouldn't be run.
Cheers,
Jes
Prevent SN2 specific code to be executed on non SN2 platforms when
compiling a generic kernel.
Signed-off-by: Jes Sorensen <jes@sgi.com>
----
arch/ia64/sn/kernel/mca.c | 5 +++--
arch/ia64/sn/kernel/sn2/sn_hwperf.c | 5 ++++-
2 files changed, 7 insertions(+), 3 deletions(-)
Index: linux-2.6/arch/ia64/sn/kernel/mca.c
=================================--- linux-2.6.orig/arch/ia64/sn/kernel/mca.c
+++ linux-2.6/arch/ia64/sn/kernel/mca.c
@@ -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>
@@ -137,7 +137,8 @@
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;
}
Index: linux-2.6/arch/ia64/sn/kernel/sn2/sn_hwperf.c
=================================--- linux-2.6.orig/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ linux-2.6/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -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>.
@@ -973,6 +973,9 @@
{
int e;
+ if (!ia64_platform_is("sn2"))
+ return 0;
+
sn_hwperf_init();
/*
reply other threads:[~2006-02-08 15:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq08xslnain.fsf@jaguar.mkp.net \
--to=jes@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox