From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/4] cpufreq: qcom-hw: drop affinity hint before freeing the IRQ
Date: Mon, 7 Mar 2022 13:51:14 -0800 [thread overview]
Message-ID: <YiZ+UuionW6DsLQX@ripper> (raw)
In-Reply-To: <20220307153050.3392700-1-dmitry.baryshkov@linaro.org>
On Mon 07 Mar 07:30 PST 2022, Dmitry Baryshkov wrote:
> Drop affinity hint before freeing the throttling IRQ to fix the
> following trace:
Rather than relying on the reader of the git log having to read the
free_irq() implementation to figure out what the problem is, this could
simply state that one isn't allowed to free_irq() something with
affinity set.
Regards,
Bjorn
>
> [ 185.114773] ------------[ cut here ]------------
> [ 185.119517] WARNING: CPU: 7 PID: 43 at kernel/irq/manage.c:1887 free_irq+0x3a4/0x3dc
> [ 185.127474] Modules linked in:
> [ 185.130618] CPU: 7 PID: 43 Comm: cpuhp/7 Tainted: G S W 5.17.0-rc6-00386-g67382a5b705d-dirty #690
> [ 185.147125] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [ 185.154269] pc : free_irq+0x3a4/0x3dc
> [ 185.158031] lr : free_irq+0x33c/0x3dc
> [ 185.161792] sp : ffff80000841bc90
> [ 185.165195] x29: ffff80000841bc90 x28: ffffa6edc5c3d000 x27: ffff6d93729e5908
> [ 185.172515] x26: 0000000000000000 x25: ffff6d910109fc00 x24: ffff6d91011490e0
> [ 185.179838] x23: ffff6d9101149218 x22: 0000000000000080 x21: 0000000000000000
> [ 185.187163] x20: ffff6d9101149000 x19: ffff6d910ab61500 x18: ffffffffffffffff
> [ 185.194487] x17: 2e35202020202020 x16: 2020202020202020 x15: ffff80008841b9a7
> [ 185.201805] x14: 00000000000003c9 x13: 0000000000000001 x12: 0000000000000040
> [ 185.209135] x11: ffff6d91005aab58 x10: ffff6d91005aab5a x9 : ffffc6a5ad1c5408
> [ 185.216455] x8 : ffff6d91005adb88 x7 : 0000000000000000 x6 : ffffc6a5ab5a91f4
> [ 185.223776] x5 : 0000000000000000 x4 : ffff6d91011490a8 x3 : ffffc6a5ad266108
> [ 185.231098] x2 : 0000000013033204 x1 : ffff6d9101149000 x0 : ffff6d910a9cc000
> [ 185.238421] Call trace:
> [ 185.240932] free_irq+0x3a4/0x3dc
> [ 185.244334] qcom_cpufreq_hw_cpu_exit+0x78/0xcc
> [ 185.248985] cpufreq_offline.isra.0+0x228/0x270
> [ 185.253639] cpuhp_cpufreq_offline+0x10/0x20
> [ 185.258027] cpuhp_invoke_callback+0x16c/0x2b0
> [ 185.262592] cpuhp_thread_fun+0x190/0x250
> [ 185.266710] smpboot_thread_fn+0x12c/0x230
> [ 185.270914] kthread+0xfc/0x100
> [ 185.274145] ret_from_fork+0x10/0x20
> [ 185.277820] irq event stamp: 212
> [ 185.281136] hardirqs last enabled at (211): [<ffffc6a5ac57973c>] _raw_spin_unlock_irqrestore+0x8c/0xa0
> [ 185.290775] hardirqs last disabled at (212): [<ffffc6a5ac572100>] __schedule+0x710/0xa10
> [ 185.299081] softirqs last enabled at (0): [<ffffc6a5ab50f7b0>] copy_process+0x7d0/0x1a14
> [ 185.307475] softirqs last disabled at (0): [<0000000000000000>] 0x0
>
> Fixes: 275157b367f4 ("cpufreq: qcom-cpufreq-hw: Add dcvs interrupt support")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/cpufreq/qcom-cpufreq-hw.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index effbb680b453..740518d8ae16 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -412,6 +412,7 @@ static void qcom_cpufreq_hw_lmh_exit(struct qcom_cpufreq_data *data)
> mutex_unlock(&data->throttle_lock);
>
> cancel_delayed_work_sync(&data->throttle_work);
> + irq_set_affinity_hint(data->throttle_irq, NULL);
> free_irq(data->throttle_irq, data);
> }
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2022-03-07 21:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 15:30 [PATCH 1/4] cpufreq: qcom-hw: drop affinity hint before freeing the IRQ Dmitry Baryshkov
2022-03-07 15:30 ` [PATCH 2/4] cpufreq: qcom-hw: fix the race between LMH worker and cpuhp Dmitry Baryshkov
2022-03-07 21:49 ` Bjorn Andersson
2022-03-09 18:45 ` Dmitry Baryshkov
2022-03-07 15:30 ` [PATCH 3/4] cpufreq: qcom-hw: fix the opp entries refcounting Dmitry Baryshkov
2022-03-07 22:16 ` Bjorn Andersson
2022-03-09 18:49 ` Dmitry Baryshkov
2022-03-07 15:30 ` [PATCH 4/4] cpufreq: qcom-hw: provide online/offline operations Dmitry Baryshkov
2022-03-07 22:40 ` Bjorn Andersson
2022-03-09 19:28 ` Dmitry Baryshkov
2022-03-07 21:51 ` Bjorn Andersson [this message]
2022-03-09 18:44 ` [PATCH 1/4] cpufreq: qcom-hw: drop affinity hint before freeing the IRQ Dmitry Baryshkov
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=YiZ+UuionW6DsLQX@ripper \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=viresh.kumar@linaro.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 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.