Commit 408865ce4829376120489ac8011b72125453dcff

Authored by Dean Nelson
Committed by Tony Luck
1 parent 087f902686

[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 <mort@sgi.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

Showing 2 changed files with 8 additions and 0 deletions Side-by-side Diff

arch/ia64/sn/kernel/xpc_main.c
... ... @@ -885,6 +885,10 @@
885 885 pid_t pid;
886 886  
887 887  
  888 + if (!ia64_platform_is("sn2")) {
  889 + return -ENODEV;
  890 + }
  891 +
888 892 /*
889 893 * xpc_remote_copy_buffer is used as a temporary buffer for bte_copy'ng
890 894 * both a partition's reserved page and its XPC variables. Its size was
arch/ia64/sn/kernel/xpnet.c
... ... @@ -636,6 +636,10 @@
636 636 int result = -ENOMEM;
637 637  
638 638  
  639 + if (!ia64_platform_is("sn2")) {
  640 + return -ENODEV;
  641 + }
  642 +
639 643 dev_info(xpnet, "registering network device %s\n", XPNET_DEVICE_NAME);
640 644  
641 645 /*