From: ebiederm@xmission.com (Eric W. Biederman)
To: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Yinghai Lu <yinghai.lu@amd.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@suse.de>
Subject: Re: [PATCH] x86-64: typo in __assign_irq_vector when updating pos for vector and offset
Date: Sun, 22 Oct 2006 02:35:19 -0600 [thread overview]
Message-ID: <m1psck21fc.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20061022035109.GM5211@rhun.haifa.ibm.com> (Muli Ben-Yehuda's message of "Sun, 22 Oct 2006 05:51:09 +0200")
Muli Ben-Yehuda <muli@il.ibm.com> writes:
> On Sat, Oct 21, 2006 at 09:00:17PM +0000, Linux Kernel Mailing List wrote:
>
>> commit 45edfd1db02f818b3dc7e4743ee8585af6b78f78
>> tree cc7a524069ee23c49237c417299e5aa2f93205e0
>> parent 926fafebc48a3218fac675f12974f9a46473bd40
>> author Yinghai Lu <yinghai.lu@amd.com> 1161448621 +0200
>> committer Andi Kleen <andi@basil.nowhere.org> 1161448621 +0200
>>
>> [PATCH] x86-64: typo in __assign_irq_vector when updating pos for vector and
> offset
>>
>> typo with cpu instead of new_cpu
>
> This patch breaks my x366 machine:
>
> aic94xx: device 0000:01:02.0: SAS addr 5005076a0112df00, PCBA SN , 8 phys, 8
> enabled phys, flash present, BIOS build 1323
> aic94xx: couldn't get irq 25 for 0000:01:02.0
> ACPI: PCI interrupt for device 0000:01:02.0 disabled
> aic94xx: probe of 0000:01:02.0 failed with error -38
>
> Reverting it allows it to boot again. Since the patch is "obviously
> correct", it must be uncovering some other problem with the genirq
> code.
>
Ugh. This is no fun at all. I am assuming this is with cpu hotplug
disabled in flat mode.
I need to step back and read the code but it appears that
request_irq(25) is failing.
Which implies that the vector assignment is failing for some strange
reason.
So what we need to do is figure out what those data structures
look like on your machine and see if we can figure out a plausible
explanation for why there would be no free vectors.
Taking a wild stab in the dark my hunch it is this bit of code that is
failing.
for_each_cpu_mask(new_cpu, domain)
if (per_cpu(vector_irq, new_cpu)[vector] != -1)
goto next;
Which would suggest that vector_irq is improperly setup on one of the cpus
I am looking at. It might be something stupid like I need to filter
domain with cpu_online_map.
If my wild set of hypothesis are true the patch below might make those
symptoms go away. It isn't a real fix by any means but it is an
easy test patch I can generate to generate these giant leaps
of deduction, I'm taking in the middle of the night :)
Eric
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c
index 7c01db8..986fa4b 100644
--- a/arch/x86_64/kernel/genapic_flat.c
+++ b/arch/x86_64/kernel/genapic_flat.c
@@ -33,7 +33,7 @@ static cpumask_t flat_vector_allocation_
* hyperthread was specified in the interrupt desitination.
*/
cpumask_t domain = { { [0] = APIC_ALL_CPUS, } };
- return domain;
+ return cpu_online_map;
}
/*
next prev parent reply other threads:[~2006-10-22 8:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200610212100.k9LL0GtC018787@hera.kernel.org>
2006-10-22 3:51 ` [PATCH] x86-64: typo in __assign_irq_vector when updating pos for vector and offset Muli Ben-Yehuda
2006-10-22 5:13 ` Yinghai Lu
2006-10-22 6:55 ` yhlu
2006-10-22 8:50 ` Muli Ben-Yehuda
2006-10-22 8:50 ` Eric W. Biederman
2006-10-22 8:28 ` Yinghai Lu
2006-10-22 8:50 ` Muli Ben-Yehuda
2006-10-22 8:58 ` Eric W. Biederman
2006-10-22 16:02 ` yhlu
2006-10-22 16:19 ` yhlu
2006-10-22 21:33 ` Andi Kleen
2006-10-22 16:20 ` Muli Ben-Yehuda
2006-10-22 16:28 ` yhlu
2006-10-22 8:35 ` Eric W. Biederman [this message]
2006-10-22 8:52 ` Muli Ben-Yehuda
2006-10-22 9:10 ` Eric W. Biederman
2006-10-23 4:32 ` [PATCH 1/2] x86_64 irq: Simplify the vector allocator Eric W. Biederman
2006-10-23 4:35 ` [PATCH 2/2] x86_64 irq: Only look at per_cpu data for online cpus Eric W. Biederman
2006-10-23 6:17 ` yhlu
2006-10-23 8:14 ` Muli Ben-Yehuda
2006-10-23 6:15 ` [PATCH 1/2] x86_64 irq: Simplify the vector allocator yhlu
2006-10-24 5:29 ` Andi Kleen
2006-10-22 13:29 ` [PATCH] x86-64: typo in __assign_irq_vector when updating pos for vector and offset Andi Kleen
2006-10-22 16:31 ` Muli Ben-Yehuda
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=m1psck21fc.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=muli@il.ibm.com \
--cc=yinghai.lu@amd.com \
/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