ARM: KVM: vgic mmio should hold data as LE bytes array in BE case
authorVictor Kamensky <victor.kamensky@linaro.org>
Thu, 12 Jun 2014 16:30:04 +0000 (09:30 -0700)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:18:58 +0000 (17:18 +0200)
commitdf5bce90aca5ced2e4ccee2a9ef913b064a47aea
treebb527c0478f5d4f769df1e947163d07c7be10ba9
parentb76b02ab6245e8641cc4acdc16b0050132bd9065
ARM: KVM: vgic mmio should hold data as LE bytes array in BE case

According to recent clarifications of mmio.data array meaning -
the mmio.data array should hold bytes as they would appear in
memory. Vgic is little endian device. And in case of BE image
kernel side that emulates vgic, holds data in BE form. So we
need to byteswap cpu<->le32 vgic registers when we read/write them
from mmio.data[].

Change has no effect in LE case because cpu already runs in le32.

Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit 1c9f04717ca8326e8df759d5dda9cd1b3d968b5b)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic.c