tree 090ab8cabba6f08ac2b2487cc9210bf39c6a99ad
parent 087f902686beb6c02157c271e3fc95606dbdfdbf
author Dean Nelson <[EMAIL PROTECTED]> Thu, 08 Sep 2005 20:46:58 -0500
committer Tony Luck <[EMAIL PROTECTED]> Fri, 09 Sep 2005 03:53:09 -0700

[IA64] ensure XPC and XPNET are loaded on sn2 platforms only

These are SN2 only drivers.  They should have platform checks to prevent
them from doing evil stuff in GENERIC kernels.

Signed-off-by: Martin Hicks <[EMAIL PROTECTED]>
Acked-by: Dean Nelson <[EMAIL PROTECTED]>
Signed-off-by: Tony Luck <[EMAIL PROTECTED]>

 arch/ia64/sn/kernel/xpc_main.c |    4 ++++
 arch/ia64/sn/kernel/xpnet.c    |    4 ++++
 2 files changed, 8 insertions(+)

diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -885,6 +885,10 @@ xpc_init(void)
        pid_t pid;
 
 
+       if (!ia64_platform_is("sn2")) {
+               return -ENODEV;
+       }
+
        /*
         * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng
         * both a partition's reserved page and its XPC variables. Its size was
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c
--- a/arch/ia64/sn/kernel/xpnet.c
+++ b/arch/ia64/sn/kernel/xpnet.c
@@ -636,6 +636,10 @@ xpnet_init(void)
        int result = -ENOMEM;
 
 
+       if (!ia64_platform_is("sn2")) {
+               return -ENODEV;
+       }
+
        dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);
 
        /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to