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
d2ef5ebb
Commit
d2ef5ebb
authored
Nov 29, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge
parents
1a571986
ed1189b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
38 deletions
+26
-38
arch/powerpc/kernel/process.c
arch/powerpc/kernel/process.c
+25
-37
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/prom_init.c
+1
-1
No files found.
arch/powerpc/kernel/process.c
View file @
d2ef5ebb
...
@@ -201,6 +201,28 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
...
@@ -201,6 +201,28 @@ int dump_spe(struct pt_regs *regs, elf_vrregset_t *evrregs)
}
}
#endif
/* CONFIG_SPE */
#endif
/* CONFIG_SPE */
/*
* If we are doing lazy switching of CPU state (FP, altivec or SPE),
* and the current task has some state, discard it.
*/
static
inline
void
discard_lazy_cpu_state
(
void
)
{
#ifndef CONFIG_SMP
preempt_disable
();
if
(
last_task_used_math
==
current
)
last_task_used_math
=
NULL
;
#ifdef CONFIG_ALTIVEC
if
(
last_task_used_altivec
==
current
)
last_task_used_altivec
=
NULL
;
#endif
/* CONFIG_ALTIVEC */
#ifdef CONFIG_SPE
if
(
last_task_used_spe
==
current
)
last_task_used_spe
=
NULL
;
#endif
preempt_enable
();
#endif
/* CONFIG_SMP */
}
int
set_dabr
(
unsigned
long
dabr
)
int
set_dabr
(
unsigned
long
dabr
)
{
{
if
(
ppc_md
.
set_dabr
)
if
(
ppc_md
.
set_dabr
)
...
@@ -434,19 +456,7 @@ void show_regs(struct pt_regs * regs)
...
@@ -434,19 +456,7 @@ void show_regs(struct pt_regs * regs)
void
exit_thread
(
void
)
void
exit_thread
(
void
)
{
{
kprobe_flush_task
(
current
);
kprobe_flush_task
(
current
);
discard_lazy_cpu_state
();
#ifndef CONFIG_SMP
if
(
last_task_used_math
==
current
)
last_task_used_math
=
NULL
;
#ifdef CONFIG_ALTIVEC
if
(
last_task_used_altivec
==
current
)
last_task_used_altivec
=
NULL
;
#endif
/* CONFIG_ALTIVEC */
#ifdef CONFIG_SPE
if
(
last_task_used_spe
==
current
)
last_task_used_spe
=
NULL
;
#endif
#endif
/* CONFIG_SMP */
}
}
void
flush_thread
(
void
)
void
flush_thread
(
void
)
...
@@ -458,18 +468,7 @@ void flush_thread(void)
...
@@ -458,18 +468,7 @@ void flush_thread(void)
t
->
flags
^=
(
_TIF_ABI_PENDING
|
_TIF_32BIT
);
t
->
flags
^=
(
_TIF_ABI_PENDING
|
_TIF_32BIT
);
#endif
#endif
#ifndef CONFIG_SMP
discard_lazy_cpu_state
();
if
(
last_task_used_math
==
current
)
last_task_used_math
=
NULL
;
#ifdef CONFIG_ALTIVEC
if
(
last_task_used_altivec
==
current
)
last_task_used_altivec
=
NULL
;
#endif
/* CONFIG_ALTIVEC */
#ifdef CONFIG_SPE
if
(
last_task_used_spe
==
current
)
last_task_used_spe
=
NULL
;
#endif
#endif
/* CONFIG_SMP */
#ifdef CONFIG_PPC64
/* for now */
#ifdef CONFIG_PPC64
/* for now */
if
(
current
->
thread
.
dabr
)
{
if
(
current
->
thread
.
dabr
)
{
...
@@ -635,18 +634,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
...
@@ -635,18 +634,7 @@ void start_thread(struct pt_regs *regs, unsigned long start, unsigned long sp)
}
}
#endif
#endif
#ifndef CONFIG_SMP
discard_lazy_cpu_state
();
if
(
last_task_used_math
==
current
)
last_task_used_math
=
NULL
;
#ifdef CONFIG_ALTIVEC
if
(
last_task_used_altivec
==
current
)
last_task_used_altivec
=
NULL
;
#endif
#ifdef CONFIG_SPE
if
(
last_task_used_spe
==
current
)
last_task_used_spe
=
NULL
;
#endif
#endif
/* CONFIG_SMP */
memset
(
current
->
thread
.
fpr
,
0
,
sizeof
(
current
->
thread
.
fpr
));
memset
(
current
->
thread
.
fpr
,
0
,
sizeof
(
current
->
thread
.
fpr
));
current
->
thread
.
fpscr
.
val
=
0
;
current
->
thread
.
fpscr
.
val
=
0
;
#ifdef CONFIG_ALTIVEC
#ifdef CONFIG_ALTIVEC
...
...
arch/powerpc/kernel/prom_init.c
View file @
d2ef5ebb
...
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret,
...
@@ -265,7 +265,7 @@ static int __init call_prom_ret(const char *service, int nargs, int nret,
va_end
(
list
);
va_end
(
list
);
for
(
i
=
0
;
i
<
nret
;
i
++
)
for
(
i
=
0
;
i
<
nret
;
i
++
)
ret
s
[
nargs
+
i
]
=
0
;
args
.
arg
s
[
nargs
+
i
]
=
0
;
if
(
enter_prom
(
&
args
,
RELOC
(
prom_entry
))
<
0
)
if
(
enter_prom
(
&
args
,
RELOC
(
prom_entry
))
<
0
)
return
PROM_ERROR
;
return
PROM_ERROR
;
...
...
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