diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-07-05 11:48:12 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:33:08 -0400 |
commit | 70f93dae32aca8b3b7da66891aecd3ee0ee48060 (patch) | |
tree | 29f52c2179255b27fd067afbcce6d7e75bc23697 /virt/kvm/ioapic.c | |
parent | 0105d1a526404cfc9779552a6198bfd0e5fc937a (diff) |
KVM: Use temporary variable to shorten lines.
Cosmetic only. No logic is changed by this patch.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm/ioapic.c')
-rw-r--r-- | virt/kvm/ioapic.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 8a9c6cc382f8..92496ff3d82d 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c | |||
@@ -103,6 +103,7 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) | |||
103 | { | 103 | { |
104 | unsigned index; | 104 | unsigned index; |
105 | bool mask_before, mask_after; | 105 | bool mask_before, mask_after; |
106 | union kvm_ioapic_redirect_entry *e; | ||
106 | 107 | ||
107 | switch (ioapic->ioregsel) { | 108 | switch (ioapic->ioregsel) { |
108 | case IOAPIC_REG_VERSION: | 109 | case IOAPIC_REG_VERSION: |
@@ -122,19 +123,20 @@ static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val) | |||
122 | ioapic_debug("change redir index %x val %x\n", index, val); | 123 | ioapic_debug("change redir index %x val %x\n", index, val); |
123 | if (index >= IOAPIC_NUM_PINS) | 124 | if (index >= IOAPIC_NUM_PINS) |
124 | return; | 125 | return; |
125 | mask_before = ioapic->redirtbl[index].fields.mask; | 126 | e = &ioapic->redirtbl[index]; |
127 | mask_before = e->fields.mask; | ||
126 | if (ioapic->ioregsel & 1) { | 128 | if (ioapic->ioregsel & 1) { |
127 | ioapic->redirtbl[index].bits &= 0xffffffff; | 129 | e->bits &= 0xffffffff; |
128 | ioapic->redirtbl[index].bits |= (u64) val << 32; | 130 | e->bits |= (u64) val << 32; |
129 | } else { | 131 | } else { |
130 | ioapic->redirtbl[index].bits &= ~0xffffffffULL; | 132 | e->bits &= ~0xffffffffULL; |
131 | ioapic->redirtbl[index].bits |= (u32) val; | 133 | e->bits |= (u32) val; |
132 | ioapic->redirtbl[index].fields.remote_irr = 0; | 134 | e->fields.remote_irr = 0; |
133 | } | 135 | } |
134 | mask_after = ioapic->redirtbl[index].fields.mask; | 136 | mask_after = e->fields.mask; |
135 | if (mask_before != mask_after) | 137 | if (mask_before != mask_after) |
136 | kvm_fire_mask_notifiers(ioapic->kvm, index, mask_after); | 138 | kvm_fire_mask_notifiers(ioapic->kvm, index, mask_after); |
137 | if (ioapic->redirtbl[index].fields.trig_mode == IOAPIC_LEVEL_TRIG | 139 | if (e->fields.trig_mode == IOAPIC_LEVEL_TRIG |
138 | && ioapic->irr & (1 << index)) | 140 | && ioapic->irr & (1 << index)) |
139 | ioapic_service(ioapic, index); | 141 | ioapic_service(ioapic, index); |
140 | break; | 142 | break; |