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
7ac2ed28
Commit
7ac2ed28
authored
Aug 17, 2012
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sparc64: Specify user and supervisor trace PCR bits in sparc_pmu.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
5344303c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
arch/sparc/kernel/perf_event.c
arch/sparc/kernel/perf_event.c
+12
-4
No files found.
arch/sparc/kernel/perf_event.c
View file @
7ac2ed28
...
...
@@ -146,6 +146,8 @@ struct sparc_pmu {
int
upper_shift
;
int
lower_shift
;
int
event_mask
;
int
user_bit
;
int
priv_bit
;
int
hv_bit
;
int
irq_bit
;
int
upper_nop
;
...
...
@@ -306,6 +308,8 @@ static const struct sparc_pmu ultra3_pmu = {
.
upper_shift
=
11
,
.
lower_shift
=
4
,
.
event_mask
=
0x3f
,
.
user_bit
=
PCR_UTRACE
,
.
priv_bit
=
PCR_STRACE
,
.
upper_nop
=
0x1c
,
.
lower_nop
=
0x14
,
.
flags
=
(
SPARC_PMU_ALL_EXCLUDES_SAME
|
...
...
@@ -440,6 +444,8 @@ static const struct sparc_pmu niagara1_pmu = {
.
upper_shift
=
0
,
.
lower_shift
=
4
,
.
event_mask
=
0x7
,
.
user_bit
=
PCR_UTRACE
,
.
priv_bit
=
PCR_STRACE
,
.
upper_nop
=
0x0
,
.
lower_nop
=
0x0
,
.
flags
=
(
SPARC_PMU_ALL_EXCLUDES_SAME
|
...
...
@@ -571,7 +577,9 @@ static const struct sparc_pmu niagara2_pmu = {
.
upper_shift
=
19
,
.
lower_shift
=
6
,
.
event_mask
=
0xfff
,
.
hv_bit
=
0x8
,
.
user_bit
=
PCR_UTRACE
,
.
priv_bit
=
PCR_STRACE
,
.
hv_bit
=
PCR_N2_HTRACE
,
.
irq_bit
=
0x30
,
.
upper_nop
=
0x220
,
.
lower_nop
=
0x220
,
...
...
@@ -771,7 +779,7 @@ static void sparc_pmu_disable(struct pmu *pmu)
cpuc
->
n_added
=
0
;
val
=
cpuc
->
pcr
;
val
&=
~
(
PCR_UTRACE
|
PCR_STRACE
|
val
&=
~
(
sparc_pmu
->
user_bit
|
sparc_pmu
->
priv_bit
|
sparc_pmu
->
hv_bit
|
sparc_pmu
->
irq_bit
);
cpuc
->
pcr
=
val
;
...
...
@@ -1177,9 +1185,9 @@ static int sparc_pmu_event_init(struct perf_event *event)
/* We save the enable bits in the config_base. */
hwc
->
config_base
=
sparc_pmu
->
irq_bit
;
if
(
!
attr
->
exclude_user
)
hwc
->
config_base
|=
PCR_UTRACE
;
hwc
->
config_base
|=
sparc_pmu
->
user_bit
;
if
(
!
attr
->
exclude_kernel
)
hwc
->
config_base
|=
PCR_STRACE
;
hwc
->
config_base
|=
sparc_pmu
->
priv_bit
;
if
(
!
attr
->
exclude_hv
)
hwc
->
config_base
|=
sparc_pmu
->
hv_bit
;
...
...
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