From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
platform-driver-x86@vger.kernel.org,
Mark Gross <mgross@linux.intel.com>,
linux-watchdog@vger.kernel.org,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH v1 2/5] watchdog: intel-mid_wdt: Postpone IRQ handler registration till SCU is ready
Date: Fri, 22 Jan 2021 14:31:58 +0200 [thread overview]
Message-ID: <20210122123201.40935-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20210122123201.40935-1-andriy.shevchenko@linux.intel.com>
When SCU is not ready and CONFIG_DEBUG_SHIRQ=y we got deferred probe followed
by fired test IRQ which immediately makes kernel panic. Fix this by delaying
IRQ handler registration till SCU is ready.
Fixes: 80ae679b8f86 ("watchdog: intel-mid_wdt: Convert to use new SCU IPC API")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
drivers/watchdog/intel-mid_wdt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index 1ae03b64ef8b..9b2173f765c8 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -154,6 +154,10 @@ static int mid_wdt_probe(struct platform_device *pdev)
watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
watchdog_set_drvdata(wdt_dev, mid);
+ mid->scu = devm_intel_scu_ipc_dev_get(dev);
+ if (!mid->scu)
+ return -EPROBE_DEFER;
+
ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,
IRQF_SHARED | IRQF_NO_SUSPEND, "watchdog",
wdt_dev);
@@ -162,10 +166,6 @@ static int mid_wdt_probe(struct platform_device *pdev)
return ret;
}
- mid->scu = devm_intel_scu_ipc_dev_get(dev);
- if (!mid->scu)
- return -EPROBE_DEFER;
-
/*
* The firmware followed by U-Boot leaves the watchdog running
* with the default threshold which may vary. When we get here
--
2.29.2
next prev parent reply other threads:[~2021-01-22 12:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 12:31 [PATCH v1 1/5] watchdog: intel_scu_watchdog: Remove driver for deprecated platform Andy Shevchenko
2021-01-22 12:31 ` Andy Shevchenko [this message]
2021-01-22 14:17 ` [PATCH v1 2/5] watchdog: intel-mid_wdt: Postpone IRQ handler registration till SCU is ready Guenter Roeck
2021-01-22 12:31 ` [PATCH v1 3/5] platform/x86: intel_scu_wdt: Move driver from arch/x86 Andy Shevchenko
2021-01-22 14:21 ` Guenter Roeck
2021-01-22 12:32 ` [PATCH v1 4/5] platform/x86: intel_scu_wdt: Drop SCU notification Andy Shevchenko
2021-01-22 14:21 ` Guenter Roeck
2021-01-22 12:32 ` [PATCH v1 5/5] platform/x86: intel_scu_wdt: Get rid of custom x86 model comparison Andy Shevchenko
2021-01-22 14:23 ` Guenter Roeck
2021-01-22 14:16 ` [PATCH v1 1/5] watchdog: intel_scu_watchdog: Remove driver for deprecated platform Guenter Roeck
2021-01-22 14:59 ` Hans de Goede
2021-01-22 15:22 ` Andy Shevchenko
2021-01-22 15:45 ` Andy Shevchenko
2021-01-22 21:04 ` Hans de Goede
2021-01-23 0:27 ` Guenter Roeck
2021-01-23 12:05 ` Hans de Goede
2021-01-25 11:15 ` Andy Shevchenko
2021-01-25 11:23 ` Hans de Goede
2021-01-25 13:52 ` Andy Shevchenko
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=20210122123201.40935-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linus.walleij@linaro.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mgross@linux.intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=mingo@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=wim@linux-watchdog.org \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).