Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
129bc8f7
Commit
129bc8f7
authored
Jul 11, 2005
by
Ralf Baechle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setup_frame is now returning a success value.
Signed-off-by:
Ralf Baechle
<
ralf@linux-mips.org
>
parent
b490ff42
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
25 deletions
+32
-25
arch/mips/kernel/process.c
arch/mips/kernel/process.c
+5
-5
arch/mips/kernel/signal.c
arch/mips/kernel/signal.c
+15
-11
arch/mips/kernel/signal32.c
arch/mips/kernel/signal32.c
+9
-7
arch/mips/kernel/signal_n32.c
arch/mips/kernel/signal_n32.c
+3
-2
No files found.
arch/mips/kernel/process.c
View file @
129bc8f7
...
@@ -62,9 +62,9 @@ extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
...
@@ -62,9 +62,9 @@ extern int do_signal32(sigset_t *oldset, struct pt_regs *regs);
/*
/*
* Native o32 and N64 ABI without DSP ASE
* Native o32 and N64 ABI without DSP ASE
*/
*/
extern
void
setup_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
extern
int
setup_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
);
int
signr
,
sigset_t
*
set
);
extern
void
setup_rt_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
extern
int
setup_rt_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
struct
mips_abi
mips_abi
=
{
struct
mips_abi
mips_abi
=
{
...
@@ -79,9 +79,9 @@ struct mips_abi mips_abi = {
...
@@ -79,9 +79,9 @@ struct mips_abi mips_abi = {
/*
/*
* o32 compatibility on 64-bit kernels, without DSP ASE
* o32 compatibility on 64-bit kernels, without DSP ASE
*/
*/
extern
void
setup_frame_32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
extern
int
setup_frame_32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
);
int
signr
,
sigset_t
*
set
);
extern
void
setup_rt_frame_32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
extern
int
setup_rt_frame_32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
struct
mips_abi
mips_abi_32
=
{
struct
mips_abi
mips_abi_32
=
{
...
@@ -95,7 +95,7 @@ struct mips_abi mips_abi_32 = {
...
@@ -95,7 +95,7 @@ struct mips_abi mips_abi_32 = {
/*
/*
* N32 on 64-bit kernels, without DSP ASE
* N32 on 64-bit kernels, without DSP ASE
*/
*/
extern
void
setup_rt_frame_n32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
extern
int
setup_rt_frame_n32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
struct
mips_abi
mips_abi_n32
=
{
struct
mips_abi
mips_abi_n32
=
{
...
...
arch/mips/kernel/signal.c
View file @
129bc8f7
...
@@ -278,7 +278,7 @@ badframe:
...
@@ -278,7 +278,7 @@ badframe:
}
}
#ifdef CONFIG_TRAD_SIGNALS
#ifdef CONFIG_TRAD_SIGNALS
void
setup_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
setup_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
)
int
signr
,
sigset_t
*
set
)
{
{
struct
sigframe
*
frame
;
struct
sigframe
*
frame
;
...
@@ -317,14 +317,15 @@ void setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
...
@@ -317,14 +317,15 @@ void setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
current
->
comm
,
current
->
pid
,
current
->
comm
,
current
->
pid
,
frame
,
regs
->
cp0_epc
,
frame
->
regs
[
31
]);
frame
,
regs
->
cp0_epc
,
frame
->
regs
[
31
]);
#endif
#endif
return
;
return
1
;
give_sigsegv:
give_sigsegv:
force_sigsegv
(
signr
,
current
);
force_sigsegv
(
signr
,
current
);
return
0
;
}
}
#endif
#endif
void
setup_rt_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
setup_rt_frame
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
)
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
)
{
{
struct
rt_sigframe
*
frame
;
struct
rt_sigframe
*
frame
;
...
@@ -376,18 +377,21 @@ void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
...
@@ -376,18 +377,21 @@ void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
current
->
comm
,
current
->
pid
,
current
->
comm
,
current
->
pid
,
frame
,
regs
->
cp0_epc
,
regs
->
regs
[
31
]);
frame
,
regs
->
cp0_epc
,
regs
->
regs
[
31
]);
#endif
#endif
return
;
return
1
;
give_sigsegv:
give_sigsegv:
force_sigsegv
(
signr
,
current
);
force_sigsegv
(
signr
,
current
);
return
0
;
}
}
extern
void
setup_rt_frame_n32
(
struct
k_sigaction
*
ka
,
extern
void
setup_rt_frame_n32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
);
static
inline
void
handle_signal
(
unsigned
long
sig
,
siginfo_t
*
info
,
static
inline
int
handle_signal
(
unsigned
long
sig
,
siginfo_t
*
info
,
struct
k_sigaction
*
ka
,
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
struct
k_sigaction
*
ka
,
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
{
{
int
ret
;
switch
(
regs
->
regs
[
0
])
{
switch
(
regs
->
regs
[
0
])
{
case
ERESTART_RESTARTBLOCK
:
case
ERESTART_RESTARTBLOCK
:
case
ERESTARTNOHAND
:
case
ERESTARTNOHAND
:
...
@@ -407,9 +411,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
...
@@ -407,9 +411,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
regs
->
regs
[
0
]
=
0
;
/* Don't deal with this again. */
regs
->
regs
[
0
]
=
0
;
/* Don't deal with this again. */
if
(
sig_uses_siginfo
(
ka
))
if
(
sig_uses_siginfo
(
ka
))
current
->
thread
.
abi
->
setup_rt_frame
(
ka
,
regs
,
sig
,
oldset
,
info
);
ret
=
current
->
thread
.
abi
->
setup_rt_frame
(
ka
,
regs
,
sig
,
oldset
,
info
);
else
else
current
->
thread
.
abi
->
setup_frame
(
ka
,
regs
,
sig
,
oldset
);
ret
=
current
->
thread
.
abi
->
setup_frame
(
ka
,
regs
,
sig
,
oldset
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
...
@@ -417,6 +421,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
...
@@ -417,6 +421,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
sigaddset
(
&
current
->
blocked
,
sig
);
sigaddset
(
&
current
->
blocked
,
sig
);
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
return
ret
;
}
}
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
int
do_signal
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
...
@@ -440,10 +446,8 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
...
@@ -440,10 +446,8 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
oldset
=
&
current
->
blocked
;
oldset
=
&
current
->
blocked
;
signr
=
get_signal_to_deliver
(
&
info
,
&
ka
,
regs
,
NULL
);
signr
=
get_signal_to_deliver
(
&
info
,
&
ka
,
regs
,
NULL
);
if
(
signr
>
0
)
{
if
(
signr
>
0
)
handle_signal
(
signr
,
&
info
,
&
ka
,
oldset
,
regs
);
return
handle_signal
(
signr
,
&
info
,
&
ka
,
oldset
,
regs
);
return
1
;
}
no_signal:
no_signal:
/*
/*
...
...
arch/mips/kernel/signal32.c
View file @
129bc8f7
...
@@ -769,9 +769,11 @@ give_sigsegv:
...
@@ -769,9 +769,11 @@ give_sigsegv:
force_sigsegv
(
signr
,
current
);
force_sigsegv
(
signr
,
current
);
}
}
static
inline
void
handle_signal
(
unsigned
long
sig
,
siginfo_t
*
info
,
static
inline
int
handle_signal
(
unsigned
long
sig
,
siginfo_t
*
info
,
struct
k_sigaction
*
ka
,
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
struct
k_sigaction
*
ka
,
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
{
{
int
ret
;
switch
(
regs
->
regs
[
0
])
{
switch
(
regs
->
regs
[
0
])
{
case
ERESTART_RESTARTBLOCK
:
case
ERESTART_RESTARTBLOCK
:
case
ERESTARTNOHAND
:
case
ERESTARTNOHAND
:
...
@@ -791,9 +793,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
...
@@ -791,9 +793,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
regs
->
regs
[
0
]
=
0
;
/* Don't deal with this again. */
regs
->
regs
[
0
]
=
0
;
/* Don't deal with this again. */
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
if
(
ka
->
sa
.
sa_flags
&
SA_SIGINFO
)
current
->
thread
.
abi
->
setup_rt_frame
(
ka
,
regs
,
sig
,
oldset
,
info
);
ret
=
current
->
thread
.
abi
->
setup_rt_frame
(
ka
,
regs
,
sig
,
oldset
,
info
);
else
else
current
->
thread
.
abi
->
setup_frame
(
ka
,
regs
,
sig
,
oldset
);
ret
=
current
->
thread
.
abi
->
setup_frame
(
ka
,
regs
,
sig
,
oldset
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
sigorsets
(
&
current
->
blocked
,
&
current
->
blocked
,
&
ka
->
sa
.
sa_mask
);
...
@@ -801,6 +803,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
...
@@ -801,6 +803,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
sigaddset
(
&
current
->
blocked
,
sig
);
sigaddset
(
&
current
->
blocked
,
sig
);
recalc_sigpending
();
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
return
ret
;
}
}
int
do_signal32
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
int
do_signal32
(
sigset_t
*
oldset
,
struct
pt_regs
*
regs
)
...
@@ -824,10 +828,8 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
...
@@ -824,10 +828,8 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
oldset
=
&
current
->
blocked
;
oldset
=
&
current
->
blocked
;
signr
=
get_signal_to_deliver
(
&
info
,
&
ka
,
regs
,
NULL
);
signr
=
get_signal_to_deliver
(
&
info
,
&
ka
,
regs
,
NULL
);
if
(
signr
>
0
)
{
if
(
signr
>
0
)
handle_signal
(
signr
,
&
info
,
&
ka
,
oldset
,
regs
);
return
handle_signal
(
signr
,
&
info
,
&
ka
,
oldset
,
regs
);
return
1
;
}
no_signal:
no_signal:
/*
/*
...
...
arch/mips/kernel/signal_n32.c
View file @
129bc8f7
...
@@ -130,7 +130,7 @@ badframe:
...
@@ -130,7 +130,7 @@ badframe:
force_sig
(
SIGSEGV
,
current
);
force_sig
(
SIGSEGV
,
current
);
}
}
void
setup_rt_frame_n32
(
struct
k_sigaction
*
ka
,
int
setup_rt_frame_n32
(
struct
k_sigaction
*
ka
,
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
)
struct
pt_regs
*
regs
,
int
signr
,
sigset_t
*
set
,
siginfo_t
*
info
)
{
{
struct
rt_sigframe_n32
*
frame
;
struct
rt_sigframe_n32
*
frame
;
...
@@ -184,8 +184,9 @@ void setup_rt_frame_n32(struct k_sigaction * ka,
...
@@ -184,8 +184,9 @@ void setup_rt_frame_n32(struct k_sigaction * ka,
current
->
comm
,
current
->
pid
,
current
->
comm
,
current
->
pid
,
frame
,
regs
->
cp0_epc
,
regs
->
regs
[
31
]);
frame
,
regs
->
cp0_epc
,
regs
->
regs
[
31
]);
#endif
#endif
return
;
return
1
;
give_sigsegv:
give_sigsegv:
force_sigsegv
(
signr
,
current
);
force_sigsegv
(
signr
,
current
);
return
0
;
}
}
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