mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
FROMGIT: KVM: arm64: Constify kvm_io_gic_ops
The only usage of kvm_io_gic_ops is to make a comparison with its
address and to pass its address to kvm_iodevice_init() which takes a
pointer to const kvm_io_device_ops as input. Make it const to allow the
compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211204213518.83642-1-rikard.falkeborn@gmail.com
(cherry picked from commit 636dcd0204
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next)
Bug: 209777660
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I057a166181bea5855dd19be14971ac086e02ec12
This commit is contained in:
committed by
Will Deacon
parent
a8ec5752e7
commit
8aefe3af04
@@ -1050,7 +1050,7 @@ static int dispatch_mmio_write(struct kvm_vcpu *vcpu, struct kvm_io_device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct kvm_io_device_ops kvm_io_gic_ops = {
|
||||
const struct kvm_io_device_ops kvm_io_gic_ops = {
|
||||
.read = dispatch_mmio_read,
|
||||
.write = dispatch_mmio_write,
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ struct vgic_register_region {
|
||||
};
|
||||
};
|
||||
|
||||
extern struct kvm_io_device_ops kvm_io_gic_ops;
|
||||
extern const struct kvm_io_device_ops kvm_io_gic_ops;
|
||||
|
||||
#define VGIC_ACCESS_8bit 1
|
||||
#define VGIC_ACCESS_32bit 2
|
||||
|
||||
Reference in New Issue
Block a user