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
2831300e
Commit
2831300e
authored
Aug 12, 2002
by
David Mosberger
Committed by
David Mosberger
Aug 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ia64: Make fph-restore lazy. Patch by Asit K. Mallick.
parent
5c8ee10d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
arch/ia64/kernel/traps.c
arch/ia64/kernel/traps.c
+1
-2
include/asm-ia64/processor.h
include/asm-ia64/processor.h
+1
-4
include/asm-ia64/system.h
include/asm-ia64/system.h
+17
-8
No files found.
arch/ia64/kernel/traps.c
View file @
2831300e
...
...
@@ -248,10 +248,9 @@ disabled_fph_fault (struct pt_regs *regs)
if
(
fpu_owner
)
ia64_flush_fph
(
fpu_owner
);
ia64_set_fpu_owner
(
current
);
}
#endif
/* !CONFIG_SMP */
ia64_set_fpu_owner
(
current
);
if
((
current
->
thread
.
flags
&
IA64_THREAD_FPH_VALID
)
!=
0
)
{
__ia64_load_fpu
(
current
->
thread
.
fph
);
psr
->
mfh
=
0
;
...
...
include/asm-ia64/processor.h
View file @
2831300e
...
...
@@ -223,6 +223,7 @@ struct thread_struct {
__u64
map_base
;
/* base address for get_unmapped_area() */
__u64
task_size
;
/* limit for task size */
struct
siginfo
*
siginfo
;
/* current siginfo struct for ptrace() */
__u64
last_fph_cpu
;
/* CPU that may hold the contents of f32-f127 */
#ifdef CONFIG_IA32_SUPPORT
__u64
eflag
;
/* IA32 EFLAGS reg */
...
...
@@ -389,8 +390,6 @@ ia64_set_kr (unsigned long regnum, unsigned long r)
}
}
#ifndef CONFIG_SMP
static
inline
struct
task_struct
*
ia64_get_fpu_owner
(
void
)
{
...
...
@@ -403,8 +402,6 @@ ia64_set_fpu_owner (struct task_struct *t)
ia64_set_kr
(
IA64_KR_FPU_OWNER
,
(
unsigned
long
)
t
);
}
#endif
/* !CONFIG_SMP */
extern
void
__ia64_init_fpu
(
void
);
extern
void
__ia64_save_fpu
(
struct
ia64_fpreg
*
fph
);
extern
void
__ia64_load_fpu
(
struct
ia64_fpreg
*
fph
);
...
...
include/asm-ia64/system.h
View file @
2831300e
...
...
@@ -396,14 +396,23 @@ extern void ia64_load_extra (struct task_struct *task);
* task->thread.fph, avoiding the complication of having to fetch
* the latest fph state from another CPU.
*/
# define switch_to(prev,next,last) do { \
if (ia64_psr(ia64_task_regs(prev))->mfh) { \
ia64_psr(ia64_task_regs(prev))->mfh = 0; \
(prev)->thread.flags |= IA64_THREAD_FPH_VALID; \
__ia64_save_fpu((prev)->thread.fph); \
} \
ia64_psr(ia64_task_regs(prev))->dfh = 1; \
__switch_to(prev,next,last); \
# define switch_to(prev,next,last) do { \
if (ia64_psr(ia64_task_regs(prev))->mfh) { \
ia64_psr(ia64_task_regs(prev))->mfh = 0; \
(prev)->thread.flags |= IA64_THREAD_FPH_VALID; \
__ia64_save_fpu((prev)->thread.fph); \
(prev)->thread.last_fph_cpu = smp_processor_id(); \
} \
if ((next)->thread.flags & IA64_THREAD_FPH_VALID) { \
if (((next)->thread.last_fph_cpu == smp_processor_id()) \
&& (ia64_get_fpu_owner() == next)) \
{ \
ia64_psr(ia64_task_regs(next))->dfh = 0; \
ia64_psr(ia64_task_regs(next))->mfh = 0; \
} else \
ia64_psr(ia64_task_regs(next))->dfh = 1; \
} \
__switch_to(prev,next,last); \
} while (0)
#else
# define switch_to(prev,next,last) do { \
...
...
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