aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-03-04 02:25:55 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-19 21:03:22 -0400
commitf6e17f9b0bf172a5813dfef0c03d0a25ba83b0de (patch)
tree8f817a0f6be5012dcf5b00fcb1fd9f9872871cf0 /arch/powerpc/sysdev
parent50fb8ebe7c4ad60d147700d253f78bd1e615a526 (diff)
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/xics/xics-common.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c
index a2be84de5237..e70175dfe322 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -57,7 +57,9 @@ void xics_update_irq_servers(void)
57 BUG_ON(!np); 57 BUG_ON(!np);
58 58
59 hcpuid = get_hard_smp_processor_id(boot_cpuid); 59 hcpuid = get_hard_smp_processor_id(boot_cpuid);
60 xics_default_server = hcpuid; 60 xics_default_server = xics_default_distrib_server = hcpuid;
61
62 pr_devel("xics: xics_default_server = 0x%x\n", xics_default_server);
61 63
62 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen); 64 ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
63 if (!ireg) { 65 if (!ireg) {
@@ -75,9 +77,11 @@ void xics_update_irq_servers(void)
75 for (j = 0; j < i; j += 2) { 77 for (j = 0; j < i; j += 2) {
76 if (ireg[j] == hcpuid) { 78 if (ireg[j] == hcpuid) {
77 xics_default_distrib_server = ireg[j+1]; 79 xics_default_distrib_server = ireg[j+1];
80 break;
78 } 81 }
79 } 82 }
80 83 pr_devel("xics: xics_default_distrib_server = 0x%x\n",
84 xics_default_distrib_server);
81 of_node_put(np); 85 of_node_put(np);
82} 86}
83 87
@@ -113,7 +117,7 @@ void xics_mask_unknown_vec(unsigned int vec)
113{ 117{
114 struct ics *ics; 118 struct ics *ics;
115 119
116 pr_err("Interrupt %u (real) is invalid, disabling it.\n", vec); 120 pr_err("Interrupt 0x%x (real) is invalid, disabling it.\n", vec);
117 121
118 list_for_each_entry(ics, &ics_list, link) 122 list_for_each_entry(ics, &ics_list, link)
119 ics->mask_unknown(ics, vec); 123 ics->mask_unknown(ics, vec);
@@ -293,6 +297,8 @@ unlock:
293 * If not we set it to the first cpu in the mask, even if multiple cpus 297 * If not we set it to the first cpu in the mask, even if multiple cpus
294 * are set. This is so things like irqbalance (which set core and package 298 * are set. This is so things like irqbalance (which set core and package
295 * wide affinities) do the right thing. 299 * wide affinities) do the right thing.
300 *
301 * We need to fix this to implement support for the links
296 */ 302 */
297int xics_get_irq_server(unsigned int virq, const struct cpumask *cpumask, 303int xics_get_irq_server(unsigned int virq, const struct cpumask *cpumask,
298 unsigned int strict_check) 304 unsigned int strict_check)