Re: [PATCH]: Prevent sn2 ptc code from executing on all ia64 subarches

From: Bjorn Helgaas <bjorn.helgaas_at_hp.com>
Date: 2005-12-10 04:46:15
On Friday 09 December 2005 10:11 am, Robin Holt wrote:
> Prarit, I don't think your patch catches all the cases.  Try
> this one.
> 
> Index: linux-2.6/arch/ia64/sn/kernel/sn2/sn_hwperf.c
> ===================================================================
> --- linux-2.6.orig/arch/ia64/sn/kernel/sn2/sn_hwperf.c	2005-11-21 20:05:40.000000000 -0600
> +++ linux-2.6/arch/ia64/sn/kernel/sn2/sn_hwperf.c	2005-12-09 10:53:19.159948227 -0600
> @@ -973,6 +973,9 @@ static int __devinit sn_hwperf_misc_regi
>  {
>  	int e;
>  
> +	if (!ia64_platform_is("sn2"))
> +		return -ENODEV;

I'm not thrilled about this approach.

I'd *like* to be able to assume that "changes in arch/ia64/sn/* clearly
don't affect non-SN platforms".  But this style breaks that.  Every ia64
box calls all these SN init functions, and if somebody forgets the
ia64_platform_is("sn2") check, bad things will happen.

I'd like it a whole lot better if all these initialization-type things
could be hidden inside sn_setup() or some other machine vector.

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Dec 10 04:50:37 2005

This archive was generated by hypermail 2.1.8 : 2005-12-10 04:50:46 EST