mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-01 18:53:02 +09:00
sparc: Don't do expensive hypervisor PCR write unless necessary.
[ Upstream commit 314ff52727 ]
The hypervisor call is only necessary if hypervisor events are
being requested.
So if we're not tracking hypervisor events, simply do a direct
register write.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7cc3d70509
commit
ce840177aa
@@ -80,8 +80,11 @@ static void n2_pcr_write(u64 val)
|
||||
{
|
||||
unsigned long ret;
|
||||
|
||||
ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val);
|
||||
if (ret != HV_EOK)
|
||||
if (val & PCR_N2_HTRACE) {
|
||||
ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val);
|
||||
if (ret != HV_EOK)
|
||||
write_pcr(val);
|
||||
} else
|
||||
write_pcr(val);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user