projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15e3608
)
sparc: Don't do expensive hypervisor PCR write unless necessary.
author
David S. Miller
<davem@davemloft.net>
Thu, 28 Jul 2011 03:46:25 +0000
(20:46 -0700)
committer
David S. Miller
<davem@davemloft.net>
Thu, 28 Jul 2011 03:46:25 +0000
(20:46 -0700)
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>
arch/sparc/kernel/pcr.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/sparc/kernel/pcr.c
b/arch/sparc/kernel/pcr.c
index 8ac23e6600804a7975ed59e238dfe707087e807c..878c6824c732bde2799bc9bae0e9d8858135a065 100644
(file)
--- a/
arch/sparc/kernel/pcr.c
+++ b/
arch/sparc/kernel/pcr.c
@@
-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);
}