From: Prarit Bhargava Date: Mon, 21 Nov 2005 18:00:38 +0000 (-0500) Subject: [IA64] Prevent sn2 ptc code from executing on all ia64 subarches X-Git-Tag: v2.6.15-rc3~129^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ad4f924ecd9c067a22a64699bcf4eaad1935a61;p=linux-2.6 [IA64] Prevent sn2 ptc code from executing on all ia64 subarches Patch to prevent sn2_ptc_init code from attempting to load on non-sn2 systems when sn2_smp.c is built-in to generic kernel. Signed-off-by: Prarit Bhargava Signed-off-by: Tony Luck --- diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c index 49b530c39a..5d54f5f4e9 100644 --- a/arch/ia64/sn/kernel/sn2/sn2_smp.c +++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c @@ -492,6 +492,9 @@ static struct proc_dir_entry *proc_sn2_ptc; static int __init sn2_ptc_init(void) { + if (!ia64_platform_is("sn2")) + return -ENOSYS; + if (!(proc_sn2_ptc = create_proc_entry(PTC_BASENAME, 0444, NULL))) { printk(KERN_ERR "unable to create %s proc entry", PTC_BASENAME); return -EINVAL;