All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Marcin Jabrzyk <m.jabrzyk@samsung.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	linux-kernel@vger.kernel.org, kyungmin.park@samsung.com,
	linux-samsung-soc@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	Mark Rutland <Mark.Rutland@arm.com>,
	Chander Kashyap <chander.kashyap@linaro.org>
Subject: Re: PROBLEM: BUG  appearing when trying to allocate interrupt on Exynos MCT after CPU hotplug
Date: Fri, 30 Jan 2015 17:08:40 -0800	[thread overview]
Message-ID: <54CC2B18.2070809@codeaurora.org> (raw)
In-Reply-To: <5450C391.2070007@samsung.com>

Kept meaning to get back to this thread. Have you resolved it?

On 10/29/14 03:38, Marcin Jabrzyk wrote:
> So I've tried this patch, it resolves one problem but introduces also
> new ones. As expected the BUG warning is not showing after applying
> this patch but there are some interesting side effects.

Well that's half good news.

> I was looking on /proc/interrupts output. IRQ for CPU0 have "MCT" name
> and IRQ for CPU1 has unexpectedly no name at all.

This is pretty confusing. I don't see how the patch could cause this to
happen.

> After making hotplug cycle of CPU1 I've observed that IRQs attached
> originally for that CPU are generating on really low count and not in
> order with IRQ for CPU0.
> What's more the interrupt for CPU1 is showing to me as being counted
> for both CPUs, so it's probably not being attached to CPU1.
>

yeah. Can you give the output of /proc/timer_list in addition to
/proc/interrupts? It may give some hints on what's going on. It may also
be interesting to see if irq_force_affinity() is failing. Please check
the return value and print an error


diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 1800053b4644..3c4538e26731 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -450,6 +450,7 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
 {
 	struct mct_clock_event_device *mevt;
 	unsigned int cpu = smp_processor_id();
+	int ret;
 
 	mevt = container_of(evt, struct mct_clock_event_device, evt);
 
@@ -468,7 +469,9 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
 	if (mct_int_type == MCT_INT_SPI) {
 		evt->irq = mct_irqs[MCT_L0_IRQ + cpu];
 		enable_irq(evt->irq);
-		irq_force_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu));
+		ret = irq_force_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu));
+		if (ret)
+			pr_err("force failed %d\n", ret);
 	} else {
 		enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0);
 	}

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: PROBLEM: BUG  appearing when trying to allocate interrupt on Exynos MCT after CPU hotplug
Date: Fri, 30 Jan 2015 17:08:40 -0800	[thread overview]
Message-ID: <54CC2B18.2070809@codeaurora.org> (raw)
In-Reply-To: <5450C391.2070007@samsung.com>

Kept meaning to get back to this thread. Have you resolved it?

On 10/29/14 03:38, Marcin Jabrzyk wrote:
> So I've tried this patch, it resolves one problem but introduces also
> new ones. As expected the BUG warning is not showing after applying
> this patch but there are some interesting side effects.

Well that's half good news.

> I was looking on /proc/interrupts output. IRQ for CPU0 have "MCT" name
> and IRQ for CPU1 has unexpectedly no name at all.

This is pretty confusing. I don't see how the patch could cause this to
happen.

> After making hotplug cycle of CPU1 I've observed that IRQs attached
> originally for that CPU are generating on really low count and not in
> order with IRQ for CPU0.
> What's more the interrupt for CPU1 is showing to me as being counted
> for both CPUs, so it's probably not being attached to CPU1.
>

yeah. Can you give the output of /proc/timer_list in addition to
/proc/interrupts? It may give some hints on what's going on. It may also
be interesting to see if irq_force_affinity() is failing. Please check
the return value and print an error


diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 1800053b4644..3c4538e26731 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -450,6 +450,7 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
 {
 	struct mct_clock_event_device *mevt;
 	unsigned int cpu = smp_processor_id();
+	int ret;
 
 	mevt = container_of(evt, struct mct_clock_event_device, evt);
 
@@ -468,7 +469,9 @@ static int exynos4_local_timer_setup(struct clock_event_device *evt)
 	if (mct_int_type == MCT_INT_SPI) {
 		evt->irq = mct_irqs[MCT_L0_IRQ + cpu];
 		enable_irq(evt->irq);
-		irq_force_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu));
+		ret = irq_force_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu));
+		if (ret)
+			pr_err("force failed %d\n", ret);
 	} else {
 		enable_percpu_irq(mct_irqs[MCT_L0_IRQ], 0);
 	}

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2015-01-31  1:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-23 13:51 PROBLEM: BUG appearing when trying to allocate interrupt on Exynos MCT after CPU hotplug Marcin Jabrzyk
2014-10-23 13:51 ` Marcin Jabrzyk
2014-10-23 14:06 ` Russell King - ARM Linux
2014-10-23 14:06   ` Russell King - ARM Linux
2014-10-23 18:41   ` Stephen Boyd
2014-10-23 18:41     ` Stephen Boyd
2014-10-24 13:22     ` Marcin Jabrzyk
2014-10-24 13:22       ` Marcin Jabrzyk
2014-10-27 20:16       ` Stephen Boyd
2014-10-27 20:16         ` Stephen Boyd
2014-10-29 10:38         ` Marcin Jabrzyk
2014-10-29 10:38           ` Marcin Jabrzyk
2015-01-31  1:08           ` Stephen Boyd [this message]
2015-01-31  1:08             ` Stephen Boyd
2015-01-31  9:21             ` Daniel Lezcano
2015-01-31  9:21               ` Daniel Lezcano
2015-02-02  8:47               ` Marcin Jabrzyk
2015-02-02  8:47                 ` Marcin Jabrzyk

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=54CC2B18.2070809@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=Mark.Rutland@arm.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=chander.kashyap@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.jabrzyk@samsung.com \
    --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 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.