Commit a6fc70e3 authored by Hongfei Cheng's avatar Hongfei Cheng Committed by Philippe Gerum
Browse files

arm64/ipipe: ipipe-core code for arm64/Aarch64: ipipe.c, ipipe.h, entry.S

parent b9fcc3cb
......@@ -234,7 +234,7 @@ static inline unsigned long __ipipe_ffnz(unsigned long ul)
#define __ipipe_syscall_watched_p(p, sc) \
(ipipe_notifier_enabled_p(p) || (unsigned long)sc >= __NR_syscalls)
#define __ipipe_root_tick_p(regs) (!arch_irqs_disabled_flags(regs->ARM_cpsr))
#define __ipipe_root_tick_p(regs) (!arch_irqs_disabled_flags(regs->pstate))
#else /* !CONFIG_IPIPE */
......
......@@ -189,6 +189,10 @@ tsk .req x28 // current thread_info
.macro irq_handler
adrp x1, handle_arch_irq
ldr x1, [x1, #:lo12:handle_arch_irq]
#ifdef CONFIG_IPIPE
bl __ipipe_check_root_interruptible
cmp x0, #1
#endif /* CONFIG_IPIPE */
mov x0, sp
blr x1
.endm
......
/* -*- linux-c -*-
* linux/arch/arm/kernel/ipipe.c
* linux/arch/arm64/kernel/ipipe.c
*
* Copyright (C) 2002-2005 Philippe Gerum.
* Copyright (C) 2004 Wolfgang Grandegger (Adeos/arm port over 2.4).
......@@ -43,7 +43,6 @@
#include <linux/cpu.h>
#include <linux/ipipe_domain.h>
#include <linux/ipipe_tickdev.h>
#include <asm/system.h>
#include <asm/atomic.h>
#include <asm/hardirq.h>
#include <asm/io.h>
......@@ -482,11 +481,11 @@ asmlinkage void __exception __ipipe_grab_irq(int irq, struct pt_regs *regs)
__ipipe_mach_hrtimer_debug(irq);
#endif /* CONFIG_IPIPE_DEBUG_INTERNAL */
copy_regs:
p->tick_regs.ARM_cpsr =
p->tick_regs.pstate =
(p->curr == &p->root
? regs->ARM_cpsr
: regs->ARM_cpsr | PSR_I_BIT);
p->tick_regs.ARM_pc = regs->ARM_pc;
? regs->pstate
: regs->pstate | PSR_I_BIT);
p->tick_regs.pc = regs->pc;
}
__ipipe_dispatch_irq(irq, 0);
......
......@@ -82,6 +82,11 @@ static void ptrace_hbptriggered(struct perf_event *bp,
.si_addr = (void __user *)(bkpt->trigger),
};
#ifdef CONFIG_IPIPE
if (__ipipe_report_trap(IPIPE_TRAP_BREAK,regs))
return;
#endif /* CONFIG_IPIPE */
#ifdef CONFIG_COMPAT
int i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment