Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
3178a07c
Commit
3178a07c
authored
Nov 28, 2008
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Add performance counter hypervisor calls for sun4v.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
6a5726dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
arch/sparc/include/asm/hypervisor.h
arch/sparc/include/asm/hypervisor.h
+24
-0
arch/sparc64/kernel/hvcalls.S
arch/sparc64/kernel/hvcalls.S
+32
-0
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/kernel/sparc64_ksyms.c
+6
-0
No files found.
arch/sparc/include/asm/hypervisor.h
View file @
3178a07c
...
...
@@ -2713,6 +2713,30 @@ extern unsigned long sun4v_ldc_revoke(unsigned long channel,
*/
#define HV_FAST_SET_PERFREG 0x101
#define HV_N2_PERF_SPARC_CTL 0x0
#define HV_N2_PERF_DRAM_CTL0 0x1
#define HV_N2_PERF_DRAM_CNT0 0x2
#define HV_N2_PERF_DRAM_CTL1 0x3
#define HV_N2_PERF_DRAM_CNT1 0x4
#define HV_N2_PERF_DRAM_CTL2 0x5
#define HV_N2_PERF_DRAM_CNT2 0x6
#define HV_N2_PERF_DRAM_CTL3 0x7
#define HV_N2_PERF_DRAM_CNT3 0x8
#define HV_FAST_N2_GET_PERFREG 0x104
#define HV_FAST_N2_SET_PERFREG 0x105
#ifndef __ASSEMBLY__
extern
unsigned
long
sun4v_niagara_getperf
(
unsigned
long
reg
,
unsigned
long
*
val
);
extern
unsigned
long
sun4v_niagara_setperf
(
unsigned
long
reg
,
unsigned
long
val
);
extern
unsigned
long
sun4v_niagara2_getperf
(
unsigned
long
reg
,
unsigned
long
*
val
);
extern
unsigned
long
sun4v_niagara2_setperf
(
unsigned
long
reg
,
unsigned
long
val
);
#endif
/* MMU statistics services.
*
* The hypervisor maintains MMU statistics and privileged code provides
...
...
arch/sparc64/kernel/hvcalls.S
View file @
3178a07c
...
...
@@ -766,3 +766,35 @@ ENTRY(sun4v_mmu_demap_all)
retl
nop
ENDPROC
(
sun4v_mmu_demap_all
)
ENTRY
(
sun4v_niagara_getperf
)
mov
%
o0
,
%
o4
mov
HV_FAST_GET_PERFREG
,
%
o5
ta
HV_FAST_TRAP
stx
%
o1
,
[%
o4
]
retl
nop
ENDPROC
(
sun4v_niagara_getperf
)
ENTRY
(
sun4v_niagara_setperf
)
mov
HV_FAST_SET_PERFREG
,
%
o5
ta
HV_FAST_TRAP
retl
nop
ENDPROC
(
sun4v_niagara_setperf
)
ENTRY
(
sun4v_niagara2_getperf
)
mov
%
o0
,
%
o4
mov
HV_FAST_N2_GET_PERFREG
,
%
o5
ta
HV_FAST_TRAP
stx
%
o1
,
[%
o4
]
retl
nop
ENDPROC
(
sun4v_niagara2_getperf
)
ENTRY
(
sun4v_niagara2_setperf
)
mov
HV_FAST_N2_SET_PERFREG
,
%
o5
ta
HV_FAST_TRAP
retl
nop
ENDPROC
(
sun4v_niagara2_setperf
)
arch/sparc64/kernel/sparc64_ksyms.c
View file @
3178a07c
...
...
@@ -49,6 +49,7 @@
#include <asm/timer.h>
#include <asm/cpudata.h>
#include <asm/ftrace.h>
#include <asm/hypervisor.h>
struct
poll
{
int
fd
;
...
...
@@ -148,6 +149,11 @@ EXPORT_SYMBOL(flush_dcache_page);
EXPORT_SYMBOL
(
__flush_dcache_range
);
#endif
EXPORT_SYMBOL
(
sun4v_niagara_getperf
);
EXPORT_SYMBOL
(
sun4v_niagara_setperf
);
EXPORT_SYMBOL
(
sun4v_niagara2_getperf
);
EXPORT_SYMBOL
(
sun4v_niagara2_setperf
);
#ifdef CONFIG_SUN_AUXIO
EXPORT_SYMBOL
(
auxio_set_led
);
EXPORT_SYMBOL
(
auxio_set_lte
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment