From: Guenter Roeck <linux@roeck-us.net>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-watchdog@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Ingo Molnar <mingo@kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Heiko Stuebner <heiko@sntech.de>, Arnd Bergmann <arnd@arndb.de>,
linux-doc@vger.kernel.org,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Tomasz Figa <t.figa@samsung.com>,
Randy Dunlap <rdunlap@infradead.org>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Jonas Jensen <jonas.jensen@gmail.com>,
Wim Van Sebroeck <wim@iguana.be>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
David Woodhouse <dwmw2@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v5 1/7] kernel: Add support for kernel restart handler call chain
Date: Wed, 30 Jul 2014 13:53:02 -0700 [thread overview]
Message-ID: <53D95B2E.6040308@roeck-us.net> (raw)
In-Reply-To: <53D95330.1050904@codeaurora.org>
On 07/30/2014 01:18 PM, Stephen Boyd wrote:
> On 07/18/14 00:34, Guenter Roeck wrote:
>> +/**
>> + * do_kernel_restart - Execute kernel restart handler call chain
>> + *
>> + * Calls functions registered with register_restart_handler.
>> + *
>> + * Expected to be called from machine_restart as last step of the restart
>> + * sequence.
>> + *
>> + * Restarts the system immediately if a restart handler function has been
>> + * registered. Otherwise does nothing.
>> + */
>> +void do_kernel_restart(char *cmd)
>> +{
>> + blocking_notifier_call_chain(&restart_handler_list, reboot_mode, cmd);
>> +}
>
> Has this been tested with scheduling while atomic checking
> (CONFIG_DEBUG_ATOMIC_SLEEP) or lockdep (CONFIG_PROVE_LOCKING)? ARM would
> call this with irqs disabled and blocking_notifier_call_chain() would
> spit out a warning when it tries to down_read() on it's semaphore. This
> should probably be an atomic notifier chain instead.
>
Good point. I'll update the code accordingly.
I'll wait for additional comments until early next week to avoid unnecessary
churn.
Thanks,
Guenter
WARNING: multiple messages have this Message-ID (diff)
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/7] kernel: Add support for kernel restart handler call chain
Date: Wed, 30 Jul 2014 13:53:02 -0700 [thread overview]
Message-ID: <53D95B2E.6040308@roeck-us.net> (raw)
In-Reply-To: <53D95330.1050904@codeaurora.org>
On 07/30/2014 01:18 PM, Stephen Boyd wrote:
> On 07/18/14 00:34, Guenter Roeck wrote:
>> +/**
>> + * do_kernel_restart - Execute kernel restart handler call chain
>> + *
>> + * Calls functions registered with register_restart_handler.
>> + *
>> + * Expected to be called from machine_restart as last step of the restart
>> + * sequence.
>> + *
>> + * Restarts the system immediately if a restart handler function has been
>> + * registered. Otherwise does nothing.
>> + */
>> +void do_kernel_restart(char *cmd)
>> +{
>> + blocking_notifier_call_chain(&restart_handler_list, reboot_mode, cmd);
>> +}
>
> Has this been tested with scheduling while atomic checking
> (CONFIG_DEBUG_ATOMIC_SLEEP) or lockdep (CONFIG_PROVE_LOCKING)? ARM would
> call this with irqs disabled and blocking_notifier_call_chain() would
> spit out a warning when it tries to down_read() on it's semaphore. This
> should probably be an atomic notifier chain instead.
>
Good point. I'll update the code accordingly.
I'll wait for additional comments until early next week to avoid unnecessary
churn.
Thanks,
Guenter
next prev parent reply other threads:[~2014-07-30 20:53 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 7:34 [PATCH v5 0/7] kernel: Add support for restart handler call chain Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 1/7] kernel: Add support for kernel " Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-30 20:18 ` Stephen Boyd
2014-07-30 20:18 ` Stephen Boyd
2014-07-30 20:53 ` Guenter Roeck [this message]
2014-07-30 20:53 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 2/7] arm64: Support restart through " Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 3/7] arm: " Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 4/7] power/restart: Call machine_restart instead of arm_pm_restart Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 5/7] watchdog: moxart: Register restart handler with kernel restart handler Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 6/7] watchdog: alim7101: " Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-18 7:34 ` [PATCH v5 7/7] arm/arm64: Unexport restart handlers Guenter Roeck
2014-07-18 7:34 ` Guenter Roeck
2014-07-21 12:30 ` [PATCH v5 0/7] kernel: Add support for restart handler call chain Catalin Marinas
2014-07-21 12:30 ` Catalin Marinas
2014-07-21 12:51 ` Guenter Roeck
2014-07-21 12:51 ` Guenter Roeck
2014-07-25 18:53 ` Guenter Roeck
2014-07-25 18:53 ` Guenter Roeck
2014-07-30 1:50 ` Guenter Roeck
2014-07-30 1:50 ` Guenter Roeck
2014-07-30 12:16 ` Heiko Stübner
2014-07-30 12:16 ` Heiko Stübner
2014-07-30 14:10 ` Guenter Roeck
2014-07-30 14:10 ` Guenter Roeck
2014-07-30 14:10 ` Guenter Roeck
2014-07-30 14:28 ` Guenter Roeck
2014-07-30 14:28 ` Guenter Roeck
2014-08-02 19:51 ` [PATCH v5.1 9/7] watchdog: s3c2410: add restart handler Heiko Stübner
2014-08-02 19:51 ` Heiko Stübner
2014-08-02 20:09 ` [PATCH v5.1 10/7] clk: samsung: register restart handlers for s3c2412 and s3c2443 Heiko Stübner
2014-08-02 20:09 ` Heiko Stübner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D95B2E.6040308@roeck-us.net \
--to=linux@roeck-us.net \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=heiko@sntech.de \
--cc=jonas.jensen@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=maxime.ripard@free-electrons.com \
--cc=mingo@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sboyd@codeaurora.org \
--cc=t.figa@samsung.com \
--cc=will.deacon@arm.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.