Files
Marc Zyngier cb87229be5 irq: add irq__get_nr_allocated_lines
The ARM GIC emulation needs to be told the number of interrupts
it has to support. As commit 1c262fa1dc7bc ("kvm tools: irq: make
irq__alloc_line generic") made the interrupt counter private,
add a new accessor returning the number of interrupt lines we've
allocated so far.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-07-08 17:39:32 +01:00

15 lines
217 B
C

#include "kvm/irq.h"
#include "kvm/kvm-arch.h"
static u8 next_line = KVM_IRQ_OFFSET;
int irq__alloc_line(void)
{
return next_line++;
}
int irq__get_nr_allocated_lines(void)
{
return next_line - KVM_IRQ_OFFSET;
}