2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00
linux-next/arch/h8300/kernel/ptrace_s.c
Ingo Molnar 3f07c01441 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>
We are going to split <linux/sched/signal.h> out of <linux/sched.h>, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder <linux/sched/signal.h> file that just
maps to <linux/sched.h> to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:29 +01:00

45 lines
960 B
C

/*
* linux/arch/h8300/kernel/ptrace_h8s.c
* ptrace cpu depend helper functions
*
* Yoshinori Sato <ysato@users.sourceforge.jp>
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of
* this archive for more details.
*/
#include <linux/linkage.h>
#include <linux/sched/signal.h>
#include <linux/errno.h>
#include <asm/ptrace.h>
#define CCR_MASK 0x6f
#define EXR_TRACE 0x80
/* disable singlestep */
void user_disable_single_step(struct task_struct *child)
{
unsigned char exr;
exr = h8300_get_reg(child, PT_EXR);
exr &= ~EXR_TRACE;
h8300_put_reg(child, PT_EXR, exr);
}
/* enable singlestep */
void user_enable_single_step(struct task_struct *child)
{
unsigned char exr;
exr = h8300_get_reg(child, PT_EXR);
exr |= EXR_TRACE;
h8300_put_reg(child, PT_EXR, exr);
}
asmlinkage void trace_trap(unsigned long bp)
{
(void)bp;
force_sig(SIGTRAP, current);
}