Exemplo n.º 1
0
static void cmd_host_irq_stats(struct vmm_chardev *cdev)
{
    const char *irq_name;
    u32 num, cpu, stats, count = vmm_host_irq_count();
    struct vmm_host_irq *irq;
    struct vmm_host_irq_chip *chip;

    vmm_cprintf(cdev, "-----------------------------------");
    for_each_online_cpu(cpu) {
        vmm_cprintf(cdev, "------------");
    }
    vmm_cprintf(cdev, "\n");
    vmm_cprintf(cdev, " %-7s %-15s %-10s",
                "IRQ#", "Name", "Chip");
    for_each_online_cpu(cpu) {
        vmm_cprintf(cdev, " CPU%-8d", cpu);
    }
    vmm_cprintf(cdev, "\n");
    vmm_cprintf(cdev, "-----------------------------------");
    for_each_online_cpu(cpu) {
        vmm_cprintf(cdev, "------------");
    }
    vmm_cprintf(cdev, "\n");
    for (num = 0; num < count; num++) {
        irq = vmm_host_irq_get(num);
        irq_name = vmm_host_irq_get_name(irq);
        if (vmm_host_irq_is_disabled(irq) || !irq_name) {
            continue;
        }
        chip = vmm_host_irq_get_chip(irq);
        if (!chip || !chip->name) {
            continue;
        }
        vmm_cprintf(cdev, " %-7d %-15s %-10s",
                    num, irq_name, chip->name);
        for_each_online_cpu(cpu) {
            stats = vmm_host_irq_get_count(irq, cpu);
            vmm_cprintf(cdev, " %-11d", stats);
        }
        vmm_cprintf(cdev, "\n");
    }
    vmm_cprintf(cdev, "-----------------------------------");
    for_each_online_cpu(cpu) {
        vmm_cprintf(cdev, "------------");
    }
    vmm_cprintf(cdev, "\n");
}
Exemplo n.º 2
0
static void cmd_host_irq_stats(struct vmm_chardev *cdev)
{
	u32 num, cpu, irq_count, irqext_count;

	vmm_cprintf(cdev, "----------------------------------------");
	for_each_online_cpu(cpu) {
		vmm_cprintf(cdev, "------------");
	}
	vmm_cprintf(cdev, "\n");
	vmm_cprintf(cdev, " %-5s %-20s %-13s",
			  "IRQ#", "Name", "Chip");
	for_each_online_cpu(cpu) {
		vmm_cprintf(cdev, " CPU%-7d", cpu);
	}
	vmm_cprintf(cdev, "\n");
	vmm_cprintf(cdev, "----------------------------------------");
	for_each_online_cpu(cpu) {
		vmm_cprintf(cdev, "------------");
	}
	vmm_cprintf(cdev, "\n");

	irq_count = vmm_host_irq_count();
	for (num = 0; num < irq_count; num++) {
		irq_stats_print(cdev, num);
	}
	irqext_count = vmm_host_irqext_count();
	for (num = irq_count; num < irq_count + irqext_count; num++) {
		irq_stats_print(cdev, num);
	}

	vmm_cprintf(cdev, "----------------------------------------");
	for_each_online_cpu(cpu) {
		vmm_cprintf(cdev, "------------");
	}
	vmm_cprintf(cdev, "\n");
}