diff mbox

kvm tools: arm: fix GIC #defines to match latest kvm code

Message ID 1360152752-30044-1-git-send-email-will.deacon@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Will Deacon Feb. 6, 2013, 12:12 p.m. UTC
During the review process for the KVM ARM patches, the GIC device
registration was subjected to some minor renaming, so update kvm tool
appropriately.

Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 tools/kvm/arm/gic.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Pekka Enberg Feb. 6, 2013, 12:19 p.m. UTC | #1
On Wed, Feb 6, 2013 at 2:12 PM, Will Deacon <will.deacon@arm.com> wrote:
> During the review process for the KVM ARM patches, the GIC device
> registration was subjected to some minor renaming, so update kvm tool
> appropriately.
>
> Signed-off-by: Will Deacon <will.deacon@arm.com>

Applied, thanks Will!
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tools/kvm/arm/gic.c b/tools/kvm/arm/gic.c
index 3f42c3a..8d2ff87 100644
--- a/tools/kvm/arm/gic.c
+++ b/tools/kvm/arm/gic.c
@@ -22,15 +22,15 @@  int gic__alloc_irqnum(void)
 int gic__init_irqchip(struct kvm *kvm)
 {
 	int err;
-	struct kvm_device_address gic_addr[] = {
+	struct kvm_arm_device_addr gic_addr[] = {
 		[0] = {
-			.id = (KVM_ARM_DEVICE_VGIC_V2 << KVM_DEVICE_ID_SHIFT) |\
-			       KVM_VGIC_V2_ADDR_TYPE_DIST,
+			.id = KVM_VGIC_V2_ADDR_TYPE_DIST |
+			(KVM_ARM_DEVICE_VGIC_V2 << KVM_ARM_DEVICE_ID_SHIFT),
 			.addr = ARM_GIC_DIST_BASE,
 		},
 		[1] = {
-			.id = (KVM_ARM_DEVICE_VGIC_V2 << KVM_DEVICE_ID_SHIFT) |\
-			       KVM_VGIC_V2_ADDR_TYPE_CPU,
+			.id = KVM_VGIC_V2_ADDR_TYPE_CPU |
+			(KVM_ARM_DEVICE_VGIC_V2 << KVM_ARM_DEVICE_ID_SHIFT),
 			.addr = ARM_GIC_CPUI_BASE,
 		}
 	};
@@ -45,11 +45,11 @@  int gic__init_irqchip(struct kvm *kvm)
 	if (err)
 		return err;
 
-	err = ioctl(kvm->vm_fd, KVM_SET_DEVICE_ADDRESS, &gic_addr[0]);
+	err = ioctl(kvm->vm_fd, KVM_ARM_SET_DEVICE_ADDR, &gic_addr[0]);
 	if (err)
 		return err;
 
-	err = ioctl(kvm->vm_fd, KVM_SET_DEVICE_ADDRESS, &gic_addr[1]);
+	err = ioctl(kvm->vm_fd, KVM_ARM_SET_DEVICE_ADDR, &gic_addr[1]);
 	return err;
 }