Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757273AbXJYICh (ORCPT ); Thu, 25 Oct 2007 04:02:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752957AbXJYICY (ORCPT ); Thu, 25 Oct 2007 04:02:24 -0400 Received: from TYO202.gate.nec.co.jp ([202.32.8.206]:58436 "EHLO tyo202.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752514AbXJYICX (ORCPT ); Thu, 25 Oct 2007 04:02:23 -0400 Message-ID: <47204CFF.50709@ah.jp.nec.com> Date: Thu, 25 Oct 2007 16:59:59 +0900 From: Takenori Nagano User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Randy Dunlap CC: linux-kernel@vger.kernel.org, vgoyal@in.ibm.com, "Eric W. Biederman" , k-miyoshi@cb.jp.nec.com, kexec@lists.infradead.org, Bernhard Walle , Keith Owens , Andrew Morton , kdb@oss.sgi.com Subject: Re: [PATCH 2/2] implement new notifier function to panic_notifier_list ,take2 References: <4716FFDB.7090502@ah.jp.nec.com> <47171EEF.7030109@ah.jp.nec.com> <20071024111100.0f5d8b58.rdunlap@xenotime.net> In-Reply-To: <20071024111100.0f5d8b58.rdunlap@xenotime.net> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5848 Lines: 190 Randy Dunlap wrote: > On Thu, 18 Oct 2007 17:53:03 +0900 Takenori Nagano wrote: > >> This patch implements new notifier function to panic_notifier_list. We can >> change the list of order by debugfs. > > Should be sysfs IMO. debugfs isn't (should not be) required. OK. We try to find an appropriate place. http://lkml.org/lkml/2007/10/24/54 >> Thanks, >> >> --- >> >> Signed-off-by: Takenori Nagano >> >> --- >> diff -uprN linux-2.6.23.orig/arch/alpha/kernel/setup.c linux-2.6.23/arch/alpha/kernel/setup.c >> --- linux-2.6.23.orig/arch/alpha/kernel/setup.c 2007-10-10 05:31:38.000000000 +0900 >> +++ linux-2.6.23/arch/alpha/kernel/setup.c 2007-10-18 08:56:53.928000000 +0900 >> @@ -45,14 +45,22 @@ >> #include >> #include >> >> -extern struct atomic_notifier_head panic_notifier_list; >> +extern struct tunable_atomic_notifier_head panic_notifier_list; >> static int alpha_panic_event(struct notifier_block *, unsigned long, void *); >> -static struct notifier_block alpha_panic_block = { >> +static struct notifier_block alpha_panic_block_base = { >> alpha_panic_event, >> NULL, >> INT_MAX /* try to do it first */ >> }; >> >> +static struct tunable_atomic_notifier_block alpha_panic_block = { >> + &alpha_panic_block_base, > > Use C99-style initializer. and NULLs aren't needed. OK. I'll fix. Thanks, Takenori > >> + NULL, >> + NULL, >> + NULL, >> + NULL >> +}; >> + >> #include >> #include >> #include > >> diff -uprN linux-2.6.23.orig/arch/arm/mach-omap1/board-voiceblue.c linux-2.6.23/arch/arm/mach-omap1/board-voiceblue.c >> --- linux-2.6.23.orig/arch/arm/mach-omap1/board-voiceblue.c 2007-10-10 05:31:38.000000000 +0900 >> +++ linux-2.6.23/arch/arm/mach-omap1/board-voiceblue.c 2007-10-18 09:00:35.900000000 +0900 >> @@ -228,14 +228,23 @@ static int panic_event(struct notifier_b >> return NOTIFY_DONE; >> } >> >> -static struct notifier_block panic_block = { >> +static struct notifier_block panic_block_base = { >> .notifier_call = panic_event, >> }; >> >> +static struct tunable_atomic_notifier_block panic_block = { >> + .nb = &panic_block_base, >> + .head = NULL, >> + .dir = NULL, >> + .pri_dentry = NULL, >> + .desc_dentry = NULL > > Drop the NULLs. > >> +}; >> + >> static int __init voiceblue_setup(void) >> { >> /* Setup panic notifier */ >> - notifier_chain_register(&panic_notifier_list, &panic_block); >> + tunable_atomic_notifier_chain_register(&panic_notifier_list, >> + &panic_block, "VoiceBlue", NULL); >> >> return 0; >> } >> diff -uprN linux-2.6.23.orig/arch/mips/sgi-ip22/ip22-reset.c linux-2.6.23/arch/mips/sgi-ip22/ip22-reset.c >> --- linux-2.6.23.orig/arch/mips/sgi-ip22/ip22-reset.c 2007-10-10 05:31:38.000000000 +0900 >> +++ linux-2.6.23/arch/mips/sgi-ip22/ip22-reset.c 2007-10-18 09:01:33.408000000 +0900 >> @@ -226,10 +226,18 @@ static int panic_event(struct notifier_b >> return NOTIFY_DONE; >> } >> >> -static struct notifier_block panic_block = { >> +static struct notifier_block panic_block_base = { >> .notifier_call = panic_event, >> }; >> >> +static struct tunable_atomic_notifier_block panic_block = { >> + .nb = &panic_block_base, >> + .head = NULL, >> + .dir = NULL, >> + .pri_dentry = NULL, >> + .desc_dentry = NULL > > Ditto. > >> +}; >> + >> static int __init reboot_setup(void) >> { >> _machine_restart = sgi_machine_restart; > >> diff -uprN linux-2.6.23.orig/arch/mips/sgi-ip32/ip32-reset.c linux-2.6.23/arch/mips/sgi-ip32/ip32-reset.c >> --- linux-2.6.23.orig/arch/mips/sgi-ip32/ip32-reset.c 2007-10-10 05:31:38.000000000 +0900 >> +++ linux-2.6.23/arch/mips/sgi-ip32/ip32-reset.c 2007-10-18 09:02:20.496000000 +0900 >> @@ -175,10 +175,18 @@ static int panic_event(struct notifier_b >> return NOTIFY_DONE; >> } >> >> -static struct notifier_block panic_block = { >> +static struct notifier_block panic_block_base = { >> .notifier_call = panic_event, >> }; >> >> +static struct tunable_atomic_notifier_block panic_block = { >> + .nb = &panic_block_base, >> + .head = NULL, >> + .dir = NULL, >> + .pri_dentry = NULL, >> + .desc_dentry = NULL > > Ditto. > >> +}; >> + >> static __init int ip32_reboot_setup(void) >> { >> /* turn on the green led only */ > >> diff -uprN linux-2.6.23.orig/arch/parisc/kernel/pdc_chassis.c linux-2.6.23/arch/parisc/kernel/pdc_chassis.c >> --- linux-2.6.23.orig/arch/parisc/kernel/pdc_chassis.c 2007-10-10 05:31:38.000000000 +0900 >> +++ linux-2.6.23/arch/parisc/kernel/pdc_chassis.c 2007-10-18 08:56:54.052000000 +0900 >> @@ -101,11 +101,18 @@ static int pdc_chassis_panic_event(struc >> } >> >> >> -static struct notifier_block pdc_chassis_panic_block = { >> +static struct notifier_block pdc_chassis_panic_block_base = { >> .notifier_call = pdc_chassis_panic_event, >> .priority = INT_MAX, >> }; >> >> +static struct tunable_atomic_notifier_block pdc_chassis_panic_block = { >> + .nb = &pdc_chassis_panic_block_base, >> + .head = NULL, >> + .dir = NULL, >> + .pri_dentry = NULL, >> + .desc_dentry = NULL > > Ditto... (I'll skip mentioning the rest of these.) > >> +}; >> >> /** >> * parisc_reboot_event() - Called by the reboot handler. > > > --- > ~Randy > > -- +=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+ NEC コンピュータソフトウェア事業本部 OSSプラットフォーム開発本部 永野 武則 (Takenori Nagano) TEL:8-23-57270(MyLine) 042-333-5383(外線) e-mail:t-nagano@ah.jp.nec.com +=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+=-=+ - 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/