Skip to content

Commit

Permalink
virtcontainers: Tag unused functions and routines for ARM64
Browse files Browse the repository at this point in the history
ARM64 does not need all QEMU generic routines.

Fixes: kata-containers#1217

Signed-off-by: Samuel Ortiz <[email protected]>
  • Loading branch information
Samuel Ortiz committed Feb 7, 2019
1 parent a8ecdb4 commit 4e08885
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions virtcontainers/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,7 @@ func (q *qemu) resizeMemory(reqMemMB uint32, memoryBlockSizeMB uint32) (uint32,
}

// genericAppendBridges appends to devices the given bridges
// nolint: unused
func genericAppendBridges(devices []govmmQemu.Device, bridges []types.PCIBridge, machineType string) []govmmQemu.Device {
bus := defaultPCBridgeBus
switch machineType {
Expand Down Expand Up @@ -1437,6 +1438,7 @@ func genericAppendBridges(devices []govmmQemu.Device, bridges []types.PCIBridge,
return devices
}

// nolint: unused
func genericBridges(number uint32, machineType string) []types.PCIBridge {
var bridges []types.PCIBridge
var bt types.PCIType
Expand Down Expand Up @@ -1469,6 +1471,7 @@ func genericBridges(number uint32, machineType string) []types.PCIBridge {
return bridges
}

// nolint: unused
func genericMemoryTopology(memoryMb, hostMemoryMb uint64, slots uint8, memoryOffset uint32) govmmQemu.Memory {
// image NVDIMM device needs memory space 1024MB
// See https://github.com/clearcontainers/runtime/issues/380
Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/qemu_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const defaultQemuMachineType = QemuVirt
var defaultQemuMachineOptions = "usb=off,accel=kvm,gic-version=" + getGuestGICVersion()

// Not used
const defaultPCBridgeBus = ""
const defaultPCBridgeBus = "" // nolint: unused

var qemuPaths = map[string]string{
QemuVirt: defaultQemuPath,
Expand Down

0 comments on commit 4e08885

Please sign in to comment.