Re: [Lse-tech] [PATCH 4/7]: changes notifier head of diechains and add notify_chain_unregister

From: Keith Owens
Date: Thu Nov 24 2005 - 23:31:45 EST


On Thu, 24 Nov 2005 00:57:28 +0100,
Andi Kleen <ak@xxxxxxx> wrote:
>> Index: l2615-rc1-notifiers/include/asm-x86_64/kdebug.h
>> ===================================================================
>> --- l2615-rc1-notifiers.orig/include/asm-x86_64/kdebug.h
>> +++ l2615-rc1-notifiers/include/asm-x86_64/kdebug.h
>> @@ -5,21 +5,20 @@
>>
>> struct pt_regs;
>>
>> -struct die_args {
>> +struct die_args {
>
>etc. lots more occurrences.
>
>Can you please repost the patch without arbitary white space changes
>everywhere?

Not everywhere, only include/asm-x86_64/kdebug.h has trailing white
space and there was not enough white space changes to justify splitting
its change into two patches. But since you insist ...

White space changes first.

Index: linux/include/asm-x86_64/kdebug.h
===================================================================
--- linux.orig/include/asm-x86_64/kdebug.h 2005-11-25 15:29:33.303590496 +1100
+++ linux/include/asm-x86_64/kdebug.h 2005-11-25 15:29:51.278657263 +1100
@@ -5,13 +5,13 @@

struct pt_regs;

-struct die_args {
+struct die_args {
struct pt_regs *regs;
const char *str;
- long err;
+ long err;
int trapnr;
int signr;
-};
+};

/* Note - you should never unregister because that can race with NMIs.
If you really want to do it first unregister - then synchronize_sched - then free.
@@ -19,7 +19,7 @@ struct die_args {
int register_die_notifier(struct notifier_block *nb);
extern struct notifier_block *die_chain;
/* Grossly misnamed. */
-enum die_val {
+enum die_val {
DIE_OOPS = 1,
DIE_INT3,
DIE_DEBUG,
@@ -33,13 +33,13 @@ enum die_val {
DIE_CALL,
DIE_NMI_IPI,
DIE_PAGE_FAULT,
-};
-
+};
+
static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig)
-{
- struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig };
- return notifier_call_chain(&die_chain, val, &args);
-}
+{
+ struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig };
+ return notifier_call_chain(&die_chain, val, &args);
+}

extern int printk_address(unsigned long address);
extern void die(const char *,struct pt_regs *,long);

This is what is really changed in include/asm-x86_64/kdebug.h, the same
basic change as in i386.

Index: linux/include/asm-x86_64/kdebug.h
===================================================================
--- linux.orig/include/asm-x86_64/kdebug.h 2005-10-28 10:02:08.000000000 +1000
+++ linux/include/asm-x86_64/kdebug.h 2005-11-25 15:20:16.553007734 +1100
@@ -13,11 +13,10 @@ struct die_args {
int signr;
};

-/* Note - you should never unregister because that can race with NMIs.
- If you really want to do it first unregister - then synchronize_sched - then free.
- */
-int register_die_notifier(struct notifier_block *nb);
-extern struct notifier_block *die_chain;
+extern int register_die_notifier(struct notifier_block *);
+extern int unregister_die_notifier(struct notifier_block *);
+extern struct notifier_head die_chain;
+
/* Grossly misnamed. */
enum die_val {
DIE_OOPS = 1,

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/