Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 314ff527 authored by David S. Miller's avatar David S. Miller
Browse files

sparc: Don't do expensive hypervisor PCR write unless necessary.



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: default avatarDavid S. Miller <davem@davemloft.net>
parent 15e3608d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -80,9 +80,12 @@ static void n2_pcr_write(u64 val)
{
	unsigned long ret;

	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);
}

static const struct pcr_ops n2_pcr_ops = {