From: Marek Szyprowski <m.szyprowski@samsung.com>
To: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
Prashant Malani <pmalani@chromium.org>,
Rob Barnes <robbarnes@google.com>,
dtor@chromium.org
Subject: [PATCH] platform/chrome: cros_ec: Fix panic notifier registration
Date: Tue, 10 Jan 2023 23:10:33 +0100 [thread overview]
Message-ID: <20230110221033.7441-1-m.szyprowski@samsung.com> (raw)
In-Reply-To: CGME20230110221051eucas1p26888130e7de454995a00918456c99bdb@eucas1p2.samsung.com
Initialize panic notifier to avoid the following lockdep warning:
--->8---
INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 62 Comm: kworker/u16:1 Not tainted 6.2.0-rc3-next-20230110-00037-g7c2b0426386a #6112
Hardware name: Samsung Exynos (Flattened Device Tree)
Workqueue: events_unbound async_run_entry_fn
unwind_backtrace from show_stack+0x10/0x14
show_stack from dump_stack_lvl+0x58/0x70
dump_stack_lvl from register_lock_class+0x998/0x9a8
register_lock_class from __lock_acquire+0x6c/0x2a80
__lock_acquire from lock_acquire+0x124/0x3f0
lock_acquire from down_write+0x40/0xd8
down_write from blocking_notifier_chain_register+0x28/0x58
blocking_notifier_chain_register from cros_ec_debugfs_probe+0x324/0x3b4
cros_ec_debugfs_probe from platform_probe+0x5c/0xb8
platform_probe from really_probe+0xe0/0x414
really_probe from __driver_probe_device+0x9c/0x200
__driver_probe_device from driver_probe_device+0x30/0xc0
driver_probe_device from __device_attach_driver+0xa8/0x120
__device_attach_driver from bus_for_each_drv+0x7c/0xc0
bus_for_each_drv from __device_attach_async_helper+0xa0/0xf4
__device_attach_async_helper from async_run_entry_fn+0x40/0x154
async_run_entry_fn from process_one_work+0x288/0x790
process_one_work from worker_thread+0x44/0x504
worker_thread from kthread+0xf0/0x124
kthread from ret_from_fork+0x14/0x2c
Exception stack(0xf0a6dfb0 to 0xf0a6dff8)
...
------------[ cut here ]------------
Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/platform/chrome/cros_ec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
index ec733f683f34..c4345dafec57 100644
--- a/drivers/platform/chrome/cros_ec.c
+++ b/drivers/platform/chrome/cros_ec.c
@@ -182,6 +182,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev)
int err = 0;
BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier);
+ BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->panic_notifier);
ec_dev->max_request = sizeof(struct ec_params_hello);
ec_dev->max_response = sizeof(struct ec_response_get_protocol_info);
--
2.39.0
next parent reply other threads:[~2023-01-10 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230110221051eucas1p26888130e7de454995a00918456c99bdb@eucas1p2.samsung.com>
2023-01-10 22:10 ` Marek Szyprowski [this message]
2023-01-11 3:30 ` [PATCH] platform/chrome: cros_ec: Fix panic notifier registration patchwork-bot+chrome-platform
2023-01-13 21:20 ` patchwork-bot+chrome-platform
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=20230110221033.7441-1-m.szyprowski@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=dtor@chromium.org \
--cc=groeck@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmalani@chromium.org \
--cc=robbarnes@google.com \
--cc=tzungbi@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox