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
1f865f72
Commit
1f865f72
authored
Jun 02, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: threaded coredump support
parent
8f98f591
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
14 deletions
+51
-14
arch/ppc64/kernel/process.c
arch/ppc64/kernel/process.c
+24
-8
include/asm-ppc64/elf.h
include/asm-ppc64/elf.h
+27
-6
No files found.
arch/ppc64/kernel/process.c
View file @
1f865f72
...
...
@@ -67,18 +67,34 @@ enable_kernel_fp(void)
#endif
/* CONFIG_SMP */
}
int
dump_fpu
(
struct
pt_regs
*
regs
,
elf_fpregset_t
*
fpregs
)
#ifdef CONFIG_SMP
static
void
smp_unlazy_onefpu
(
void
*
arg
)
{
/*
* XXX temporary workaround until threaded coredumps for ppc64
* are implemented - Anton
*/
struct
pt_regs
*
regs
=
current
->
thread
.
regs
;
if
(
!
regs
)
return
0
;
return
;
if
(
regs
->
msr
&
MSR_FP
)
giveup_fpu
(
current
);
memcpy
(
fpregs
,
&
current
->
thread
.
fpr
[
0
],
sizeof
(
*
fpregs
));
}
void
dump_smp_unlazy_fpu
(
void
)
{
smp_call_function
(
smp_unlazy_onefpu
,
NULL
,
1
,
1
);
}
#endif
int
dump_task_fpu
(
struct
task_struct
*
tsk
,
elf_fpregset_t
*
fpregs
)
{
struct
pt_regs
*
regs
=
tsk
->
thread
.
regs
;
if
(
!
regs
)
return
0
;
if
(
tsk
==
current
&&
(
regs
->
msr
&
MSR_FP
))
giveup_fpu
(
current
);
memcpy
(
fpregs
,
&
tsk
->
thread
.
fpr
[
0
],
sizeof
(
*
fpregs
));
return
1
;
}
...
...
include/asm-ppc64/elf.h
View file @
1f865f72
...
...
@@ -98,17 +98,38 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define ELF_ET_DYN_BASE (0x08000000)
/* Common routine for both 32-bit and 64-bit processes */
#define ELF_CORE_COPY_REGS(gregs, regs) ppc64_elf_core_copy_regs(gregs, regs);
static
inline
void
ppc64_elf_core_copy_regs
(
elf_gregset_t
dstRegs
,
struct
pt_regs
*
srcRegs
)
static
inline
void
ppc64_elf_core_copy_regs
(
elf_gregset_t
elf_regs
,
struct
pt_regs
*
regs
)
{
int
i
;
int
gprs
=
sizeof
(
struct
pt_regs
)
/
sizeof
(
elf_greg_t64
);
int
numGPRS
=
((
sizeof
(
struct
pt_regs
)
/
sizeof
(
elf_greg_t64
))
<
ELF_NGREG
)
?
(
sizeof
(
struct
pt_regs
)
/
sizeof
(
elf_greg_t64
))
:
ELF_NGREG
;
if
(
gprs
>
ELF_NGREG
)
gprs
=
ELF_NGREG
;
for
(
i
=
0
;
i
<
numGPRS
;
i
++
)
dstRegs
[
i
]
=
(
elf_greg_t
)((
elf_greg_t64
*
)
srcR
egs
)[
i
];
for
(
i
=
0
;
i
<
gprs
;
i
++
)
elf_regs
[
i
]
=
(
elf_greg_t
)((
elf_greg_t64
*
)
r
egs
)[
i
];
}
#define ELF_CORE_COPY_REGS(gregs, regs) ppc64_elf_core_copy_regs(gregs, regs);
static
inline
int
dump_task_regs
(
struct
task_struct
*
tsk
,
elf_gregset_t
*
elf_regs
)
{
struct
pt_regs
*
regs
=
tsk
->
thread
.
regs
;
if
(
regs
)
ppc64_elf_core_copy_regs
(
*
elf_regs
,
regs
);
return
1
;
}
#define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
extern
int
dump_task_fpu
(
struct
task_struct
*
,
elf_fpregset_t
*
);
#define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
#ifdef CONFIG_SMP
extern
void
dump_smp_unlazy_fpu
(
void
);
#define ELF_CORE_SYNC dump_smp_unlazy_fpu
#endif
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. This could be done in userspace,
...
...
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