From: Qais Yousef <qsyousef@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org
Subject: Re: linux-next: Tree for Mar 14 (mips qemu failure bisected)
Date: Wed, 16 Mar 2016 22:17:41 +0000 [thread overview]
Message-ID: <56E9DB85.9090405@gmail.com> (raw)
In-Reply-To: <56E9C1CA.7050208@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]
On 16/03/2016 20:27, Qais Yousef wrote:
>
>
> On 16/03/2016 13:22, Guenter Roeck wrote:
>> On Tue, Mar 15, 2016 at 05:17:13PM -0700, Guenter Roeck wrote:
>>> On Tue, Mar 15, 2016 at 09:55:06PM +0000, Qais Yousef wrote:
>>>> Hi Guenter,
>>>>
>> [ ... ]
>>>>>> Qemu test results:
>>>>>> total: 96 pass: 69 fail: 27
>>>>>> Failed tests:
>>>>> [ ... ]
>>>>>> mips:mips_malta_smp_defconfig
>>>>> I bisected this failure to commit bb11cff327e54 ("MIPS: Make smp
>>>>> CMP, CPS and MT
>>>>> use the new generic IPI functions". Bisect log is attached.
>>>> Thanks for bisecting this. I tested this on a real Malta system but
>>>> not
>>>> qemu. I'll try to reproduce.
>>>>
>>> I run the tests with only a single CPU core enabled. Maybe that causes
>>> problems with your code ?
>>>
>> I ran another qemu test (this time on mainline) with "-smp 2", but
>> the only
>> difference is that the image now gets stuck even earlier.
>>
>> Also, I ran another set of bisects, this time with both mips and mips64
>> on mainline (after your patch landed), with the same results.
>>
>> Guenter
>>
>
> OK thanks for the info. The offending commit just enables using quite
> a few of the newly added code before that. So the problem could be in
> any of the newly added code.
>
> Unfortunately I can only look at this during my limited time in the
> evening and I have to setup my system to compile and run this, so I
> won't be able to get to the bottom of this as fast as I'd like to.
>
> Qais
OK I was up and running faster than I thought I would be. Can you
confirm that you're hitting a BUG_ON() in mips_smp_ipi_init()?
What I see is that BUG_ON() is hit because we couldn't find an ipidomain
to allocate the ipis from. The reason of whih is that the qemu malta
machine doesn't have a GIC though the config is compiled with GIC on.
Also if I remember correctly qemu malta doesn't really support SMP. I
think that was the reason I never ran this on qemu.
I'm not sure what's the best way forward here. I can add a check to
verify gic_present inside this function and return early. Patch attached.
Ralf, thoughts?
Thanks,
Qais
[-- Attachment #2: 0001-MIPS-Fix-broken-malta-qemu.patch --]
[-- Type: text/plain, Size: 1409 bytes --]
>From fca2323ade4dd67e5fed6933a32e6739d3707ff7 Mon Sep 17 00:00:00 2001
From: Qais Yousef <qsyousef@gmail.com>
Date: Wed, 16 Mar 2016 21:55:04 +0000
Subject: [PATCH] MIPS: Fix broken malta qemu
Malta defconfig compile with GIC on. Hence when compiling for SMP it causes the
new IPI code to be activated. But on qemu malta there's no GIC causing a
BUG_ON(!ipidomain) to be hit in mips_smp_ipi_init().
Introduce an extra check that gic_preset is true and skip initialising IPIs if
it's not.
Signed-off-by: Qais Yousef <qsyousef@gmail.com>
---
arch/mips/kernel/smp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 37708d9..972f64d 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -33,6 +33,7 @@
#include <linux/cpu.h>
#include <linux/err.h>
#include <linux/ftrace.h>
+#include <linux/irqchip/mips-gic.h>
#include <linux/irqdomain.h>
#include <linux/of.h>
#include <linux/of_irq.h>
@@ -243,6 +244,13 @@ static int __init mips_smp_ipi_init(void)
struct irq_domain *ipidomain;
struct device_node *node;
+ /*
+ * If the config says GIC is present, but the harware doesn't actually
+ * have it we could get stuffed, so double check that GIC is present
+ */
+ if (WARN_ON(!gic_present))
+ return 0;
+
node = of_irq_find_parent(of_root);
ipidomain = irq_find_matching_host(node, DOMAIN_BUS_IPI);
--
1.9.1
next prev parent reply other threads:[~2016-03-16 22:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 6:40 linux-next: Tree for Mar 14 Stephen Rothwell
2016-03-14 14:37 ` Guenter Roeck
2016-03-14 16:51 ` James Morse
2016-03-14 19:18 ` Guenter Roeck
2016-03-14 23:55 ` Michael Ellerman
2016-03-15 2:31 ` Guenter Roeck
2016-03-15 5:26 ` linux-next: Tree for Mar 14 (mips qemu failure bisected) Guenter Roeck
2016-03-15 21:55 ` Qais Yousef
2016-03-16 0:17 ` Guenter Roeck
2016-03-16 13:22 ` Guenter Roeck
2016-03-16 20:27 ` Qais Yousef
2016-03-16 22:17 ` Qais Yousef [this message]
2016-03-17 2:10 ` Guenter Roeck
2016-03-17 2:36 ` Guenter Roeck
[not found] ` <CA+mqd+5AUfGSh1WvLa5bOt-HQM=eA+BmLeb7_xZo+-tswLcqiQ@mail.gmail.com>
2016-03-17 12:43 ` Guenter Roeck
2016-03-15 0:30 ` linux-next: Tree for Mar 14 Sergey Senozhatsky
2016-03-15 6:43 ` Wolfram Sang
2016-03-15 6:52 ` Sergey Senozhatsky
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=56E9DB85.9090405@gmail.com \
--to=qsyousef@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-next@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=ralf@linux-mips.org \
--cc=sfr@canb.auug.org.au \
/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).