Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KED Linux Kernel Fork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KED Software Projects
Miscellaneous
KED Linux Kernel Fork
Commits
36ac829e
Commit
36ac829e
authored
15 years ago
by
Ralf Baechle
Browse files
Options
Downloads
Patches
Plain Diff
MIPS: Sibyte: Get rid of BKL.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
553d6d5f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arch/mips/sibyte/common/sb_tbprof.c
+15
-18
15 additions, 18 deletions
arch/mips/sibyte/common/sb_tbprof.c
with
15 additions
and
18 deletions
arch/mips/sibyte/common/sb_tbprof.c
+
15
−
18
View file @
36ac829e
...
...
@@ -403,36 +403,31 @@ static int sbprof_zbprof_stop(void)
static
int
sbprof_tb_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
int
minor
;
int
err
=
0
;
lock_kernel
();
minor
=
iminor
(
inode
);
if
(
minor
!=
0
)
{
err
=
-
ENODEV
;
goto
out
;
}
if
(
minor
!=
0
)
return
-
ENODEV
;
if
(
xchg
(
&
sbp
.
open
,
SB_OPENING
)
!=
SB_CLOSED
)
{
err
=
-
EBUSY
;
goto
out
;
}
if
(
xchg
(
&
sbp
.
open
,
SB_OPENING
)
!=
SB_CLOSED
)
return
-
EBUSY
;
memset
(
&
sbp
,
0
,
sizeof
(
struct
sbprof_tb
));
sbp
.
sbprof_tbbuf
=
vmalloc
(
MAX_TBSAMPLE_BYTES
);
if
(
!
sbp
.
sbprof_tbbuf
)
{
err
=
-
ENOMEM
;
goto
out
;
sbp
.
open
=
SB_CLOSED
;
wmb
();
return
-
ENOMEM
;
}
memset
(
sbp
.
sbprof_tbbuf
,
0
,
MAX_TBSAMPLE_BYTES
);
init_waitqueue_head
(
&
sbp
.
tb_sync
);
init_waitqueue_head
(
&
sbp
.
tb_read
);
mutex_init
(
&
sbp
.
lock
);
sbp
.
open
=
SB_OPEN
;
wmb
();
out:
unlock_kernel
();
return
err
;
return
0
;
}
static
int
sbprof_tb_release
(
struct
inode
*
inode
,
struct
file
*
filp
)
...
...
@@ -440,7 +435,7 @@ static int sbprof_tb_release(struct inode *inode, struct file *filp)
int
minor
;
minor
=
iminor
(
inode
);
if
(
minor
!=
0
||
!
sbp
.
open
)
if
(
minor
!=
0
||
sbp
.
open
!=
SB_CLOSED
)
return
-
ENODEV
;
mutex_lock
(
&
sbp
.
lock
);
...
...
@@ -449,7 +444,8 @@ static int sbprof_tb_release(struct inode *inode, struct file *filp)
sbprof_zbprof_stop
();
vfree
(
sbp
.
sbprof_tbbuf
);
sbp
.
open
=
0
;
sbp
.
open
=
SB_CLOSED
;
wmb
();
mutex_unlock
(
&
sbp
.
lock
);
...
...
@@ -583,7 +579,8 @@ static int __init sbprof_tb_init(void)
}
tb_dev
=
dev
;
sbp
.
open
=
0
;
sbp
.
open
=
SB_CLOSED
;
wmb
();
tb_period
=
zbbus_mhz
*
10000LL
;
pr_info
(
DEVNAME
": initialized - tb_period = %lld
\n
"
,
(
long
long
)
tb_period
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment