@@ -144,12 +144,15 @@ static int eiointc_router_init(unsigned int cpu)
int i, bit;
uint32_t data;
uint32_t node = cpu_to_eio_node(cpu);
- uint32_t index = eiointc_index(node);
+ int index = eiointc_index(node);
- if (index < 0) {
- pr_err("Error: invalid nodemap!\n");
- return -1;
- }
+ /*
+ * Qemu virt-machine has only one eiointc and more than four cpus.
+ * Irq from eiointc can only be routed to cpu 0-3, cpus except 0-3
+ * need not initialize eiointc on virt-machine
+ */
+ if (index < 0)
+ return 0;
if ((cpu_logical_map(cpu) % CORES_PER_EIO_NODE) == 0) {
eiointc_enable();