From: Marek Szyprowski <m.szyprowski@samsung.com>
To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Chanwoo Choi <cw00.choi@samsung.com>,
Thomas Gleixner <tglx@linutronix.de>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: [PATCH v4 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization
Date: Fri, 15 Feb 2019 13:52:26 +0100 [thread overview]
Message-ID: <20190215125229.30180-3-m.szyprowski@samsung.com> (raw)
In-Reply-To: <20190215125229.30180-1-m.szyprowski@samsung.com>
While freeing interrupt handlers in error path, don't assume that all
requested interrupts are per-processor interrupts and properly release
standard interrupts too.
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Fixes: 56a94f13919c ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/clocksource/exynos_mct.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index ef18bbf8d20c..49413900b24c 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -561,7 +561,19 @@ static int __init exynos4_timer_resources(struct device_node *np, void __iomem *
return 0;
out_irq:
- free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
+ if (mct_int_type == MCT_INT_PPI) {
+ free_percpu_irq(mct_irqs[MCT_L0_IRQ], &percpu_mct_tick);
+ } else {
+ for_each_possible_cpu(cpu) {
+ struct mct_clock_event_device *pcpu_mevt =
+ per_cpu_ptr(&percpu_mct_tick, cpu);
+
+ if (pcpu_mevt->evt.irq != -1) {
+ free_irq(pcpu_mevt->evt.irq, pcpu_mevt);
+ pcpu_mevt->evt.irq = -1;
+ }
+ }
+ }
return err;
}
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-15 12:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190215125238eucas1p2f56fe48600aedcec048bc378ed184419@eucas1p2.samsung.com>
2019-02-15 12:52 ` [PATCH 0/5] Exynos SoCs: enable support for ARM Architected Timers Marek Szyprowski
2019-02-15 12:52 ` [PATCH 1/5] clocksource: exynos_mct: Remove dead code Marek Szyprowski
2019-02-15 12:52 ` Marek Szyprowski [this message]
2019-02-15 12:52 ` [PATCH 3/5] clocksource: exynos_mct: Increase priority over ARM arch timer Marek Szyprowski
2019-02-15 12:59 ` Krzysztof Kozlowski
2019-02-15 16:35 ` Daniel Lezcano
2019-02-18 7:41 ` Marek Szyprowski
2019-02-18 9:24 ` Daniel Lezcano
2019-02-18 9:49 ` Marek Szyprowski
2019-02-18 10:21 ` Daniel Lezcano
2019-02-18 8:53 ` Krzysztof Kozlowski
2019-02-18 8:55 ` Daniel Lezcano
2019-02-15 12:52 ` [PATCH 4/5] ARM: dts: exynos: Add support ARM architected timers Marek Szyprowski
2019-02-18 11:58 ` Chanwoo Choi
2019-02-18 12:24 ` Marek Szyprowski
2019-02-19 0:03 ` Chanwoo Choi
2019-02-15 12:52 ` [PATCH 5/5] ARM: exynos: Enable support for " Marek Szyprowski
2019-02-19 0:06 ` Chanwoo Choi
2019-02-15 16:36 ` [PATCH 0/5] Exynos SoCs: enable support for ARM Architected Timers Daniel Lezcano
[not found] <CGME20181018095716eucas1p103fb0d1a19c6122e885b15526c176967@eucas1p1.samsung.com>
2018-10-18 9:57 ` [PATCH v4 0/6] Proper arch timer support for Exynos5433-based TM2(e) boards Marek Szyprowski
2018-10-18 9:57 ` [PATCH v4 2/6] clocksource: exynos_mct: Fix error path in timer resources initialization Marek Szyprowski
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=20190215125229.30180-3-m.szyprowski@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=cw00.choi@samsung.com \
--cc=daniel.lezcano@linaro.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=tglx@linutronix.de \
/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