diff options
author | BALATON Zoltan <balaton@eik.bme.hu> | 2022-10-28 13:56:19 +0200 |
---|---|---|
committer | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2022-10-31 18:48:23 +0000 |
commit | 6b924abe99902ef4fa5b74a24c251fb38fd1e528 (patch) | |
tree | bc348471a2c4595af5abd98d98369b54d3cc55fa /hw/ppc/mac_newworld.c | |
parent | 94c92e1a863b704df5b6c5160e88fd682efc4fe4 (diff) |
mac_{old|new}world: Set tbfreq at declaration
The tbfreq variable is only set once in an if-else which can be done
at the variable declaration saving some lines of code and making it
simpler.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <15668da8eb8bad4561428a5f25b02f91e16d9c1b.1666957578.git.balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Diffstat (limited to 'hw/ppc/mac_newworld.c')
-rw-r--r-- | hw/ppc/mac_newworld.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 27e4e8d136..6327694f85 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -130,7 +130,7 @@ static void ppc_core99_init(MachineState *machine) DeviceState *dev, *pic_dev; DeviceState *uninorth_internal_dev = NULL, *uninorth_agp_dev = NULL; hwaddr nvram_addr = 0xFFF04000; - uint64_t tbfreq; + uint64_t tbfreq = kvm_enabled() ? kvmppc_get_tbfreq() : TBFREQ; /* init CPUs */ for (i = 0; i < machine->smp.cpus; i++) { @@ -343,13 +343,6 @@ static void ppc_core99_init(MachineState *machine) has_adb = (core99_machine->via_config == CORE99_VIA_CONFIG_CUDA || core99_machine->via_config == CORE99_VIA_CONFIG_PMU_ADB); - /* Timebase Frequency */ - if (kvm_enabled()) { - tbfreq = kvmppc_get_tbfreq(); - } else { - tbfreq = TBFREQ; - } - /* init basic PC hardware */ pci_bus = PCI_HOST_BRIDGE(uninorth_pci)->bus; |