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
nexedi
linux
Commits
8420aa16
Commit
8420aa16
authored
Feb 23, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: update for recent changes that require switch_to to return prev
parent
c8035a29
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
arch/ppc64/kernel/entry.S
arch/ppc64/kernel/entry.S
+2
-0
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+5
-3
include/asm-ppc64/system.h
include/asm-ppc64/system.h
+5
-3
No files found.
arch/ppc64/kernel/entry.S
View file @
8420aa16
...
@@ -301,6 +301,8 @@ _GLOBAL(_switch)
...
@@ -301,6 +301,8 @@ _GLOBAL(_switch)
REST_8GPRS
(14,
r1
)
REST_8GPRS
(14,
r1
)
REST_10GPRS
(22,
r1
)
REST_10GPRS
(22,
r1
)
/
*
convert
old
thread
to
its
task_struct
for
return
value
*/
addi
r3
,
r3
,-
THREAD
ld
r7
,
_NIP
(
r1
)
/*
Return
to
_switch
caller
in
new
task
*/
ld
r7
,
_NIP
(
r1
)
/*
Return
to
_switch
caller
in
new
task
*/
mtlr
r7
mtlr
r7
addi
r1
,
r1
,
SWITCH_FRAME_SIZE
addi
r1
,
r1
,
SWITCH_FRAME_SIZE
...
...
arch/ppc64/kernel/process.c
View file @
8420aa16
...
@@ -82,11 +82,12 @@ dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
...
@@ -82,11 +82,12 @@ dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)
return
1
;
return
1
;
}
}
void
struct
task_struct
*
__switch_to
(
struct
task_struct
*
prev
,
__switch_to
(
struct
task_struct
*
prev
,
struct
task_struct
*
new
)
struct
task_struct
*
new
)
{
{
struct
thread_struct
*
new_thread
,
*
old_thread
;
struct
thread_struct
*
new_thread
,
*
old_thread
;
unsigned
long
flags
;
unsigned
long
flags
;
struct
task_struct
*
last
;
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
/* avoid complexity of lazy save/restore of fpu
/* avoid complexity of lazy save/restore of fpu
...
@@ -106,8 +107,9 @@ __switch_to(struct task_struct *prev, struct task_struct *new)
...
@@ -106,8 +107,9 @@ __switch_to(struct task_struct *prev, struct task_struct *new)
old_thread
=
&
current
->
thread
;
old_thread
=
&
current
->
thread
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
_switch
(
old_thread
,
new_thread
);
last
=
_switch
(
old_thread
,
new_thread
);
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
return
last
;
}
}
static
void
show_tsk_stack
(
struct
task_struct
*
p
,
unsigned
long
sp
);
static
void
show_tsk_stack
(
struct
task_struct
*
p
,
unsigned
long
sp
);
...
...
include/asm-ppc64/system.h
View file @
8420aa16
...
@@ -89,11 +89,13 @@ extern void cvt_df(double *from, float *to, unsigned long *fpscr);
...
@@ -89,11 +89,13 @@ extern void cvt_df(double *from, float *to, unsigned long *fpscr);
extern
int
abs
(
int
);
extern
int
abs
(
int
);
struct
task_struct
;
struct
task_struct
;
extern
void
__switch_to
(
struct
task_struct
*
,
struct
task_struct
*
);
extern
struct
task_struct
*
__switch_to
(
struct
task_struct
*
,
#define switch_to(prev, next, last) __switch_to((prev), (next))
struct
task_struct
*
);
#define switch_to(prev, next, last) ((last) = __switch_to((prev), (next)))
struct
thread_struct
;
struct
thread_struct
;
extern
void
_switch
(
struct
thread_struct
*
prev
,
struct
thread_struct
*
next
);
extern
struct
task_struct
*
_switch
(
struct
thread_struct
*
prev
,
struct
thread_struct
*
next
);
struct
pt_regs
;
struct
pt_regs
;
extern
void
dump_regs
(
struct
pt_regs
*
);
extern
void
dump_regs
(
struct
pt_regs
*
);
...
...
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