]> Git Repo - qemu.git/commit
target/arm: Don't clear supported PMU events when initializing PMCEID1
authorAaron Lindsay OS <[email protected]>
Tue, 29 Jan 2019 11:46:04 +0000 (11:46 +0000)
committerPeter Maydell <[email protected]>
Tue, 29 Jan 2019 11:46:04 +0000 (11:46 +0000)
commitbf8d09694ccc07487cd73d7562081fdaec3370c8
treeb03ad93fc25b3a9fcb6d88933d015ea36ffcf018
parentc8de3f5fd696db0e0a16062de4b9c75252401e4e
target/arm: Don't clear supported PMU events when initializing PMCEID1

A bug was introduced during a respin of:

commit 57a4a11b2b281bb548b419ca81bfafb214e4c77a
target/arm: Add array for supported PMU events, generate PMCEID[01]_EL0

This patch introduced two calls to get_pmceid() during CPU
initialization - one each for PMCEID0 and PMCEID1. In addition to
building the register values, get_pmceid() clears an internal array
mapping event numbers to their implementations (supported_event_map)
before rebuilding it. This is an optimization since much of the logic is
shared. However, since it was called twice, the contents of
supported_event_map reflect only the events in PMCEID1 (the second call
to get_pmceid()).

Fix this bug by moving the initialization of PMCEID0 and PMCEID1 back
into a single function call, and name it more appropriately since it is
doing more than simply generating the contents of the PMCEID[01]
registers.

Signed-off-by: Aaron Lindsay <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-id: 20190123195814[email protected]
Signed-off-by: Peter Maydell <[email protected]>
target/arm/cpu.c
target/arm/cpu.h
target/arm/helper.c
This page took 0.025159 seconds and 4 git commands to generate.