提交 f6e17f9b 编写于 作者: B Benjamin Herrenschmidt

powerpc/xics: Make sure we have a sensible default distribution server

Even when nothing is specified in the device tree, and despite the
fact that we don't setup links properly yet, we still need a reasonable
value in there or some interrupts won't be setup properly to point to
an existing processor.
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 50fb8ebe
...@@ -57,7 +57,9 @@ void xics_update_irq_servers(void) ...@@ -57,7 +57,9 @@ void xics_update_irq_servers(void)
BUG_ON(!np); BUG_ON(!np);
hcpuid = get_hard_smp_processor_id(boot_cpuid); hcpuid = get_hard_smp_processor_id(boot_cpuid);
xics_default_server = hcpuid; xics_default_server = xics_default_distrib_server = hcpuid;
pr_devel("xics: xics_default_server = 0x%x\n", xics_default_server);
ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
if (!ireg) { if (!ireg) {
...@@ -75,9 +77,11 @@ void xics_update_irq_servers(void) ...@@ -75,9 +77,11 @@ void xics_update_irq_servers(void)
for (j = 0; j < i; j += 2) { for (j = 0; j < i; j += 2) {
if (ireg[j] == hcpuid) { if (ireg[j] == hcpuid) {
xics_default_distrib_server = ireg[j+1]; xics_default_distrib_server = ireg[j+1];
break;
} }
} }
pr_devel("xics: xics_default_distrib_server = 0x%x\n",
xics_default_distrib_server);
of_node_put(np); of_node_put(np);
} }
...@@ -113,7 +117,7 @@ void xics_mask_unknown_vec(unsigned int vec) ...@@ -113,7 +117,7 @@ void xics_mask_unknown_vec(unsigned int vec)
{ {
struct ics *ics; struct ics *ics;
pr_err("Interrupt %u (real) is invalid, disabling it.\n", vec); pr_err("Interrupt 0x%x (real) is invalid, disabling it.\n", vec);
list_for_each_entry(ics, &ics_list, link) list_for_each_entry(ics, &ics_list, link)
ics->mask_unknown(ics, vec); ics->mask_unknown(ics, vec);
...@@ -293,6 +297,8 @@ void xics_migrate_irqs_away(void) ...@@ -293,6 +297,8 @@ void xics_migrate_irqs_away(void)
* If not we set it to the first cpu in the mask, even if multiple cpus * If not we set it to the first cpu in the mask, even if multiple cpus
* are set. This is so things like irqbalance (which set core and package * are set. This is so things like irqbalance (which set core and package
* wide affinities) do the right thing. * wide affinities) do the right thing.
*
* We need to fix this to implement support for the links
*/ */
int xics_get_irq_server(unsigned int virq, const struct cpumask *cpumask, int xics_get_irq_server(unsigned int virq, const struct cpumask *cpumask,
unsigned int strict_check) unsigned int strict_check)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册