mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
arch: aarch64: drop unnecessary static lifetime
This also has the side effect for making access_redists_aux function strictly more useful. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -63,7 +63,7 @@ macro_rules! VGIC_DIST_REG {
|
|||||||
|
|
||||||
// List with relevant distributor registers that we will be restoring.
|
// List with relevant distributor registers that we will be restoring.
|
||||||
// Order is taken from qemu.
|
// Order is taken from qemu.
|
||||||
static VGIC_DIST_REGS: &'static [DistReg] = &[
|
static VGIC_DIST_REGS: &[DistReg] = &[
|
||||||
VGIC_DIST_REG!(GICD_STATUSR, 0, 4),
|
VGIC_DIST_REG!(GICD_STATUSR, 0, 4),
|
||||||
VGIC_DIST_REG!(GICD_ICENABLER, 1, 0),
|
VGIC_DIST_REG!(GICD_ICENABLER, 1, 0),
|
||||||
VGIC_DIST_REG!(GICD_ISENABLER, 1, 0),
|
VGIC_DIST_REG!(GICD_ISENABLER, 1, 0),
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ SYS_ICC_AP1Rn_EL1!(SYS_ICC_AP1R1_EL1, 1);
|
|||||||
SYS_ICC_AP1Rn_EL1!(SYS_ICC_AP1R2_EL1, 2);
|
SYS_ICC_AP1Rn_EL1!(SYS_ICC_AP1R2_EL1, 2);
|
||||||
SYS_ICC_AP1Rn_EL1!(SYS_ICC_AP1R3_EL1, 3);
|
SYS_ICC_AP1Rn_EL1!(SYS_ICC_AP1R3_EL1, 3);
|
||||||
|
|
||||||
static VGIC_ICC_REGS: &'static [u64] = &[
|
static VGIC_ICC_REGS: &[u64] = &[
|
||||||
SYS_ICC_SRE_EL1,
|
SYS_ICC_SRE_EL1,
|
||||||
SYS_ICC_CTLR_EL1,
|
SYS_ICC_CTLR_EL1,
|
||||||
SYS_ICC_IGRPEN0_EL1,
|
SYS_ICC_IGRPEN0_EL1,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ macro_rules! VGIC_RDIST_REG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// List with relevant distributor registers that we will be restoring.
|
// List with relevant distributor registers that we will be restoring.
|
||||||
static VGIC_RDIST_REGS: &'static [RdistReg] = &[
|
static VGIC_RDIST_REGS: &[RdistReg] = &[
|
||||||
VGIC_RDIST_REG!(GICR_STATUSR, 4),
|
VGIC_RDIST_REG!(GICR_STATUSR, 4),
|
||||||
VGIC_RDIST_REG!(GICR_WAKER, 4),
|
VGIC_RDIST_REG!(GICR_WAKER, 4),
|
||||||
VGIC_RDIST_REG!(GICR_PROPBASER, 8),
|
VGIC_RDIST_REG!(GICR_PROPBASER, 8),
|
||||||
@@ -70,7 +70,7 @@ static VGIC_RDIST_REGS: &'static [RdistReg] = &[
|
|||||||
];
|
];
|
||||||
|
|
||||||
// List with relevant distributor registers that we will be restoring.
|
// List with relevant distributor registers that we will be restoring.
|
||||||
static VGIC_SGI_REGS: &'static [RdistReg] = &[
|
static VGIC_SGI_REGS: &[RdistReg] = &[
|
||||||
VGIC_RDIST_REG!(GICR_IGROUPR0, 4),
|
VGIC_RDIST_REG!(GICR_IGROUPR0, 4),
|
||||||
VGIC_RDIST_REG!(GICR_ICENABLER0, 4),
|
VGIC_RDIST_REG!(GICR_ICENABLER0, 4),
|
||||||
VGIC_RDIST_REG!(GICR_ISENABLER0, 4),
|
VGIC_RDIST_REG!(GICR_ISENABLER0, 4),
|
||||||
@@ -109,7 +109,7 @@ fn access_redists_aux(
|
|||||||
gic: &Arc<dyn hypervisor::Device>,
|
gic: &Arc<dyn hypervisor::Device>,
|
||||||
gicr_typer: &[u64],
|
gicr_typer: &[u64],
|
||||||
state: &mut Vec<u32>,
|
state: &mut Vec<u32>,
|
||||||
reg_list: &'static [RdistReg],
|
reg_list: &[RdistReg],
|
||||||
idx: &mut usize,
|
idx: &mut usize,
|
||||||
set: bool,
|
set: bool,
|
||||||
) -> Result<()> {
|
) -> Result<()> {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
//! Implements platform specific functionality.
|
//! Implements platform specific functionality.
|
||||||
//! Supported platforms: x86_64, aarch64.
|
//! Supported platforms: x86_64, aarch64.
|
||||||
#![allow(clippy::transmute_ptr_to_ptr, clippy::redundant_static_lifetimes)]
|
#![allow(clippy::transmute_ptr_to_ptr)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|||||||
Reference in New Issue
Block a user