Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
0ef0a8e3
Commit
0ef0a8e3
authored
Jul 25, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oprofile: Covert to atomic_spinlock
Signed-off-by:
Thomas Gleixner
<
tglx@linutronix.de
>
parent
87f163a2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
arch/arm/oprofile/common.c
arch/arm/oprofile/common.c
+2
-2
arch/x86/oprofile/nmi_int.c
arch/x86/oprofile/nmi_int.c
+2
-2
drivers/oprofile/event_buffer.c
drivers/oprofile/event_buffer.c
+2
-2
drivers/oprofile/oprofilefs.c
drivers/oprofile/oprofilefs.c
+3
-3
include/linux/oprofile.h
include/linux/oprofile.h
+1
-1
No files found.
arch/arm/oprofile/common.c
View file @
0ef0a8e3
...
...
@@ -48,9 +48,9 @@ static int op_arm_setup(void)
{
int
ret
;
spin_lock
(
&
oprofilefs_lock
);
atomic_
spin_lock
(
&
oprofilefs_lock
);
ret
=
op_arm_model
->
setup_ctrs
();
spin_unlock
(
&
oprofilefs_lock
);
atomic_
spin_unlock
(
&
oprofilefs_lock
);
return
ret
;
}
...
...
arch/x86/oprofile/nmi_int.c
View file @
0ef0a8e3
...
...
@@ -125,9 +125,9 @@ static void nmi_cpu_setup(void *dummy)
{
int
cpu
=
smp_processor_id
();
struct
op_msrs
*
msrs
=
&
per_cpu
(
cpu_msrs
,
cpu
);
spin_lock
(
&
oprofilefs_lock
);
atomic_
spin_lock
(
&
oprofilefs_lock
);
model
->
setup_ctrs
(
msrs
);
spin_unlock
(
&
oprofilefs_lock
);
atomic_
spin_unlock
(
&
oprofilefs_lock
);
per_cpu
(
saved_lvtpc
,
cpu
)
=
apic_read
(
APIC_LVTPC
);
apic_write
(
APIC_LVTPC
,
APIC_DM_NMI
);
}
...
...
drivers/oprofile/event_buffer.c
View file @
0ef0a8e3
...
...
@@ -72,10 +72,10 @@ int alloc_event_buffer(void)
int
err
=
-
ENOMEM
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
oprofilefs_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
oprofilefs_lock
,
flags
);
buffer_size
=
oprofile_buffer_size
;
buffer_watershed
=
oprofile_buffer_watershed
;
spin_unlock_irqrestore
(
&
oprofilefs_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
oprofilefs_lock
,
flags
);
if
(
buffer_watershed
>=
buffer_size
)
return
-
EINVAL
;
...
...
drivers/oprofile/oprofilefs.c
View file @
0ef0a8e3
...
...
@@ -21,7 +21,7 @@
#define OPROFILEFS_MAGIC 0x6f70726f
DEFINE_SPINLOCK
(
oprofilefs_lock
);
DEFINE_
ATOMIC_
SPINLOCK
(
oprofilefs_lock
);
static
struct
inode
*
oprofilefs_get_inode
(
struct
super_block
*
sb
,
int
mode
)
{
...
...
@@ -75,9 +75,9 @@ int oprofilefs_ulong_from_user(unsigned long *val, char const __user *buf, size_
if
(
copy_from_user
(
tmpbuf
,
buf
,
count
))
return
-
EFAULT
;
spin_lock_irqsave
(
&
oprofilefs_lock
,
flags
);
atomic_
spin_lock_irqsave
(
&
oprofilefs_lock
,
flags
);
*
val
=
simple_strtoul
(
tmpbuf
,
NULL
,
0
);
spin_unlock_irqrestore
(
&
oprofilefs_lock
,
flags
);
atomic_
spin_unlock_irqrestore
(
&
oprofilefs_lock
,
flags
);
return
0
;
}
...
...
include/linux/oprofile.h
View file @
0ef0a8e3
...
...
@@ -153,7 +153,7 @@ ssize_t oprofilefs_ulong_to_user(unsigned long val, char __user * buf, size_t co
int
oprofilefs_ulong_from_user
(
unsigned
long
*
val
,
char
const
__user
*
buf
,
size_t
count
);
/** lock for read/write safety */
extern
spinlock_t
oprofilefs_lock
;
extern
atomic_
spinlock_t
oprofilefs_lock
;
/**
* Add the contents of a circular buffer to the event buffer.
...
...
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