interrupt: Add interrupt_table__set helper

In case if some particular interrupt entry needs
to be modified we should use interrupt_table__set
helper.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov
2010-04-01 19:23:21 +04:00
committed by Will Deacon
parent 99d4754573
commit d1a26cf05d
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -26,5 +26,6 @@ struct interrupt_table {
void interrupt_table__copy(struct interrupt_table *self, void *dst, unsigned int size);
void interrupt_table__setup(struct interrupt_table *self, struct real_intr_desc *entry);
void interrupt_table__set(struct interrupt_table *self, struct real_intr_desc *entry, unsigned int num);
#endif /* KVM__INTERRUPT_H */
+6
View File
@@ -19,3 +19,9 @@ void interrupt_table__setup(struct interrupt_table *self, struct real_intr_desc
for (i = 0; i < REAL_INTR_VECTORS; i++)
self->entries[i] = *entry;
}
void interrupt_table__set(struct interrupt_table *self, struct real_intr_desc *entry, unsigned int num)
{
if (num < REAL_INTR_VECTORS)
self->entries[num] = *entry;
}