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

From: Bjorn Helgaas <bjorn.helgaas_at_hp.com>
Date: 2005-12-14 04:14:58
On Tuesday 13 December 2005 8:42 am, Prarit Bhargava wrote:
> I spent the past day or so looking at a couple of solutions to this problem and 
> the only solution that appears viable is to (as stated previously) create new 
> initcalls of the form
> 
> platform_calltype_initcall(fn,platform)
> 
> ex)
> 	platform_device_initcall(sn_prarit_driver, "sn2");
> 
> which would check the platform type prior to loading a kernel.

I think this is too complicated.  Initcall ordering is fragile as it
is.  I don't think there are enough users of this sort of functionality
to justify complicating it even more with a platform identifier.

> Suggestions/comments?  Anyone think this is too much bother for the original 
> issue of avoiding
> 
> 	if (!ia64_platform_is("sn2"))
> 		return -ENOSYS;

But I still think it is important to keep these ia64_platform_is()
checks out of generic init functions.  There's just too much chance
of inadvertently breaking non-SN platforms.

Can you use the existing machine vector infrastructure to solve this
problem?  For example, what if you added a "platform_device_setup()"
hook that is a no-op on most platforms, but maps to sn_device_setup()
in the SN2 machine vector?  platform_device_setup() would itself be
called as a device_initcall().
-
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 Wed Dec 14 04:15:42 2005

This archive was generated by hypermail 2.1.8 : 2005-12-14 04:15:49 EST