lkml.org 
[lkml]   [2004]   [Feb]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 23 Feb 2004 05:54:15 +0000
From viro@parcelfa ...
SubjectRe: [PATCH] arch-specific callout in panic()
On Sun, Feb 22, 2004 at 11:13:34PM -0600, Mike Strosaker wrote:
> Hello, All:
> 
> There are some ppc64-specific actions that should be taken upon a
> kernel panic.  Rather than adding a new #ifdef in panic(), it seems to
> me that it would be worthwhile to add a single callout, and move the
> arch-specific code out to the arch subtrees.  Does this seem reasonable,
> or should another #ifdef be added in panic() to perform the ppc64-
> specific actions?

Don't do it that way.  Add a weak alias to empty function and override it
on ppc64 by defining a function with the same name.

See how cond_syscall() is done - similar trick will work here.  There's
no need to mess with the architectures that do not use your hook.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [from the cache]
©2003-2008