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
94934195
Commit
94934195
authored
Aug 14, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: Disable irqs in init_new_context, destroy_context
parent
53405a4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
include/asm-ppc64/mmu_context.h
include/asm-ppc64/mmu_context.h
+14
-13
No files found.
include/asm-ppc64/mmu_context.h
View file @
94934195
...
...
@@ -72,19 +72,19 @@ mmu_context_underflow(void)
panic
(
"mmu_context_underflow"
);
}
/*
* Set up the context for a new address space.
*/
static
inline
int
init_new_context
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
)
{
long
head
,
size
;
long
head
;
unsigned
long
flags
;
spin_lock
(
&
mmu_context_queue
.
lock
);
spin_lock
_irqsave
(
&
mmu_context_queue
.
lock
,
flags
);
if
(
(
size
=
mmu_context_queue
.
size
)
<=
0
)
{
spin_unlock
(
&
mmu_context_queue
.
lock
);
if
(
mmu_context_queue
.
size
<=
0
)
{
spin_unlock
_irqrestore
(
&
mmu_context_queue
.
lock
,
flags
);
return
-
ENOMEM
;
}
...
...
@@ -93,9 +93,9 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
head
=
(
head
<
LAST_USER_CONTEXT
-
1
)
?
head
+
1
:
0
;
mmu_context_queue
.
head
=
head
;
mmu_context_queue
.
size
=
size
-
1
;
mmu_context_queue
.
size
--
;
spin_unlock
(
&
mmu_context_queue
.
lock
);
spin_unlock
_irqrestore
(
&
mmu_context_queue
.
lock
,
flags
);
return
0
;
}
...
...
@@ -106,12 +106,13 @@ init_new_context(struct task_struct *tsk, struct mm_struct *mm)
static
inline
void
destroy_context
(
struct
mm_struct
*
mm
)
{
long
index
,
size
=
mmu_context_queue
.
size
;
long
index
;
unsigned
long
flags
;
spin_lock
(
&
mmu_context_queue
.
lock
);
spin_lock
_irqsave
(
&
mmu_context_queue
.
lock
,
flags
);
if
(
(
size
=
mmu_context_queue
.
size
)
>=
NUM_USER_CONTEXT
)
{
spin_unlock
(
&
mmu_context_queue
.
lock
);
if
(
mmu_context_queue
.
size
>=
NUM_USER_CONTEXT
)
{
spin_unlock
_irqrestore
(
&
mmu_context_queue
.
lock
,
flags
);
mmu_context_underflow
();
}
...
...
@@ -125,10 +126,10 @@ destroy_context(struct mm_struct *mm)
mmu_context_queue
.
tail
=
index
;
#endif
mmu_context_queue
.
size
=
size
+
1
;
mmu_context_queue
.
size
++
;
mmu_context_queue
.
elements
[
index
]
=
mm
->
context
;
spin_unlock
(
&
mmu_context_queue
.
lock
);
spin_unlock
_irqrestore
(
&
mmu_context_queue
.
lock
,
flags
);
}
extern
void
flush_stab
(
struct
task_struct
*
tsk
,
struct
mm_struct
*
mm
);
...
...
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