mirror of https://gitee.com/openkylin/linux.git
mn10300: Remove signal translation and exec_domain
As execution domain support is gone we can remove signal translation from the signal code and remove exec_domain from thread_info. Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
6140de5aae
commit
78d156b8d8
|
@ -40,7 +40,6 @@ typedef struct {
|
||||||
|
|
||||||
struct thread_info {
|
struct thread_info {
|
||||||
struct task_struct *task; /* main task structure */
|
struct task_struct *task; /* main task structure */
|
||||||
struct exec_domain *exec_domain; /* execution domain */
|
|
||||||
struct pt_regs *frame; /* current exception frame */
|
struct pt_regs *frame; /* current exception frame */
|
||||||
unsigned long flags; /* low level flags */
|
unsigned long flags; /* low level flags */
|
||||||
__u32 cpu; /* current CPU */
|
__u32 cpu; /* current CPU */
|
||||||
|
@ -74,7 +73,6 @@ struct thread_info {
|
||||||
#define INIT_THREAD_INFO(tsk) \
|
#define INIT_THREAD_INFO(tsk) \
|
||||||
{ \
|
{ \
|
||||||
.task = &tsk, \
|
.task = &tsk, \
|
||||||
.exec_domain = &default_exec_domain, \
|
|
||||||
.flags = 0, \
|
.flags = 0, \
|
||||||
.cpu = 0, \
|
.cpu = 0, \
|
||||||
.preempt_count = INIT_PREEMPT_COUNT, \
|
.preempt_count = INIT_PREEMPT_COUNT, \
|
||||||
|
|
|
@ -22,7 +22,6 @@ void foo(void)
|
||||||
BLANK();
|
BLANK();
|
||||||
|
|
||||||
OFFSET(TI_task, thread_info, task);
|
OFFSET(TI_task, thread_info, task);
|
||||||
OFFSET(TI_exec_domain, thread_info, exec_domain);
|
|
||||||
OFFSET(TI_frame, thread_info, frame);
|
OFFSET(TI_frame, thread_info, frame);
|
||||||
OFFSET(TI_flags, thread_info, flags);
|
OFFSET(TI_flags, thread_info, flags);
|
||||||
OFFSET(TI_cpu, thread_info, cpu);
|
OFFSET(TI_cpu, thread_info, cpu);
|
||||||
|
@ -85,7 +84,6 @@ void foo(void)
|
||||||
DEFINE(SIGCHLD_asm, SIGCHLD);
|
DEFINE(SIGCHLD_asm, SIGCHLD);
|
||||||
BLANK();
|
BLANK();
|
||||||
|
|
||||||
OFFSET(EXEC_DOMAIN_handler, exec_domain, handler);
|
|
||||||
OFFSET(RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext);
|
OFFSET(RT_SIGFRAME_sigcontext, rt_sigframe, uc.uc_mcontext);
|
||||||
|
|
||||||
DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
|
DEFINE(PAGE_SIZE_asm, PAGE_SIZE);
|
||||||
|
|
|
@ -202,20 +202,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
|
||||||
struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct sigframe __user *frame;
|
struct sigframe __user *frame;
|
||||||
int rsig, sig = ksig->sig;
|
int sig = ksig->sig;
|
||||||
|
|
||||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||||
|
|
||||||
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
rsig = sig;
|
if (__put_user(sig, &frame->sig) < 0 ||
|
||||||
if (sig < 32 &&
|
|
||||||
current_thread_info()->exec_domain &&
|
|
||||||
current_thread_info()->exec_domain->signal_invmap)
|
|
||||||
rsig = current_thread_info()->exec_domain->signal_invmap[sig];
|
|
||||||
|
|
||||||
if (__put_user(rsig, &frame->sig) < 0 ||
|
|
||||||
__put_user(&frame->sc, &frame->psc) < 0)
|
__put_user(&frame->sc, &frame->psc) < 0)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
@ -270,20 +264,14 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
|
||||||
struct pt_regs *regs)
|
struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct rt_sigframe __user *frame;
|
struct rt_sigframe __user *frame;
|
||||||
int rsig, sig = ksig->sig;
|
int sig = ksig->sig;
|
||||||
|
|
||||||
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
frame = get_sigframe(ksig, regs, sizeof(*frame));
|
||||||
|
|
||||||
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
rsig = sig;
|
if (__put_user(sig, &frame->sig) ||
|
||||||
if (sig < 32 &&
|
|
||||||
current_thread_info()->exec_domain &&
|
|
||||||
current_thread_info()->exec_domain->signal_invmap)
|
|
||||||
rsig = current_thread_info()->exec_domain->signal_invmap[sig];
|
|
||||||
|
|
||||||
if (__put_user(rsig, &frame->sig) ||
|
|
||||||
__put_user(&frame->info, &frame->pinfo) ||
|
__put_user(&frame->info, &frame->pinfo) ||
|
||||||
__put_user(&frame->uc, &frame->puc) ||
|
__put_user(&frame->uc, &frame->puc) ||
|
||||||
copy_siginfo_to_user(&frame->info, &ksig->info))
|
copy_siginfo_to_user(&frame->info, &ksig->info))
|
||||||
|
|
Loading…
Reference in New Issue