From: Christoph Hellwig <hch@lst.de>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] fix intr_heuristic()
Date: Sun, 28 Sep 2003 11:09:30 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106474754102037@msgid-missing> (raw)
One of the earlier patches missed to call intr_reserve_level()
for certain cases.
--- 1.6/arch/ia64/sn/io/sn2/ml_SN_intr.c Fri Sep 26 13:38:25 2003
+++ edited/arch/ia64/sn/io/sn2/ml_SN_intr.c Sun Sep 28 10:26:47 2003
@@ -285,7 +273,6 @@
cpuid_t intr_heuristic(vertex_hdl_t dev, int req_bit, int *resp_bit)
{
cpuid_t cpuid;
- cpuid_t candidate = CPU_NONE;
vertex_hdl_t pconn_vhdl;
pcibr_soft_t pcibr_soft;
int bit;
@@ -293,30 +280,32 @@
/* XXX: gross layering violation.. */
if (hwgraph_edge_get(dev, EDGE_LBL_PCI, &pconn_vhdl) = GRAPH_SUCCESS) {
pcibr_soft = pcibr_soft_get(pconn_vhdl);
- if (pcibr_soft && pcibr_soft->bsi_err_intr)
- candidate = ((hub_intr_t)pcibr_soft->bsi_err_intr)->i_cpuid;
- }
-
- if (candidate != CPU_NONE) {
- /*
- * The cpu was chosen already when we assigned
- * the error interrupt.
- */
- bit = intr_reserve_level(candidate, req_bit);
- if (bit >= 0) {
- *resp_bit = bit;
- return candidate;
+ if (pcibr_soft && pcibr_soft->bsi_err_intr) {
+ /*
+ * The cpu was chosen already when we assigned
+ * the error interrupt.
+ */
+ cpuid = ((hub_intr_t)pcibr_soft->bsi_err_intr)->i_cpuid;
+ goto done;
}
-
- printk("Cannot target interrupt to target node (%ld).\n",candidate);
- return CPU_NONE;
}
/*
* Need to choose one. Try the controlling c-brick first.
*/
cpuid = intr_cpu_choose_from_node(master_node_get(dev));
- if (cpuid != CPU_NONE)
- return cpuid;
- return intr_cpu_choose_node();
+ if (cpuid = CPU_NONE)
+ cpuid = intr_cpu_choose_node();
+
+ done:
+ if (cpuid != CPU_NONE) {
+ bit = intr_reserve_level(req_bit);
+ if (bit >= 0) {
+ *resp_bit = bit;
+ return cpuid;
+ }
+ }
+
+ printk("Cannot target interrupt to target cpu (%ld).\n", cpuid);
+ return CPU_NONE;
}
reply other threads:[~2003-09-28 11:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-106474754102037@msgid-missing \
--to=hch@lst.de \
--cc=linux-ia64@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox