Re: [PATCH 2/2] implement new notifier function to panic_notifier_list

Randy Dunlap <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.kernel.kexec,gmane.linux.kernel.debugging
Organization Oracle Linux Eng.
Message-ID <[email protected]>
On Thu, 04 Oct 2007 20:38:50 +0900 Takenori Nagano wrote:

> This patch implements new notifier function to panic_notifier_list. We can
> change the list of order by debugfs.
> 
> Thanks,
> 
> ---
> 
> Signed-off-by: Takenori Nagano <[email protected]>
> 
> ---

...

> diff -uprN linux-2.6.23-rc9.orig/kernel/softlockup.c
> linux-2.6.23-rc9/kernel/softlockup.c
> --- linux-2.6.23-rc9.orig/kernel/softlockup.c	2007-10-02 12:24:52.000000000 +0900
> +++ linux-2.6.23-rc9/kernel/softlockup.c	2007-10-04 09:46:25.784000000 +0900
> @@ -31,10 +31,18 @@ softlock_panic(struct notifier_block *th
>  	return NOTIFY_DONE;
>  }
> 
> -static struct notifier_block panic_block = {
> +static struct notifier_block panic_block_base = {
>  	.notifier_call = softlock_panic,
>  };
> 
> +static struct tunable_notifier_block panic_block = {
> +	.nb		= &panic_block_base,
> +	.head		= NULL,
> +	.dir		= NULL,
> +	.pri_dentry	= NULL,
> +	.desc_dentry	= NULL
> +};
> +
>  /*
>   * Returns seconds, approximately.  We don't need nanosecond
>   * resolution, and we don't need to waste time with a big divide when
> @@ -193,5 +201,6 @@ __init void spawn_softlockup_task(void)
>  	cpu_callback(&cpu_nfb, CPU_ONLINE, cpu);
>  	register_cpu_notifier(&cpu_nfb);
> 
> -	atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
> +	tunable_notifier_chain_register(&panic_notifier_list, &panic_block,
> +						"softlookup", NULL);
>  }

                                                "softlockup"

---
~Randy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.