From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Drew <pythondrew@gmail.com>, Philippe Gerum <rpm@xenomai.org>
Cc: "Xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] gdb / threads on beaglebone black
Date: Thu, 29 May 2014 00:27:37 +0200 [thread overview]
Message-ID: <538662D9.4050308@xenomai.org> (raw)
In-Reply-To: <5386505E.2030904@xenomai.org>
On 05/28/2014 11:08 PM, Gilles Chanteperdrix wrote:
> On 05/28/2014 11:01 PM, Drew wrote:
>> I've only been using the machinekit pre-built kernel so rebuilding might
>> take me a little while figure out.
>>
>> Gilles: you think you have this bug in a corner (entry.S?)
>
> I can reproduce the bug. It is most certainly related to system call
> restarting, but I am not quite sure of what happens yet. My BUG_ON
> trigs, but I do not understand why, and the reason of the BUG_ON is not
> what causes the -ENOSYS. I can not really use the I-pipe tracer, because
> everything happens in assembly code with very few function calls.
>
> So, it may be a while before I produce a fix.
>
The result is embarrassingly simple: the BUG_ON is wrong, and we simply
need to pass restarted syscalls through __ipipe_syscall_root.
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 68a80d3..8f29cb1 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -446,6 +446,7 @@ ENTRY(vector_swi)
eor scno, scno, #__NR_SYSCALL_BASE @ check OS number
#endif
+local_restart:
#ifdef CONFIG_IPIPE
mov r1, sp
mov r0, scno
@@ -457,7 +458,6 @@ ENTRY(vector_swi)
ldmia sp, { r0 - r3 }
#endif /* CONFIG_IPIPE */
-local_restart:
ldr r10, [tsk, #TI_FLAGS] @ check for syscall tracing
stmdb sp!, {r4, r5} @ push fifth and sixth args
diff --git a/arch/arm/kernel/ipipe.c b/arch/arm/kernel/ipipe.c
index abdbe29..3a2266c 100644
--- a/arch/arm/kernel/ipipe.c
+++ b/arch/arm/kernel/ipipe.c
@@ -440,10 +440,6 @@ asmlinkage int __ipipe_syscall_root(unsigned long scno, struct pt_regs *regs)
fast_irq_enable(flags);
out:
-#ifdef CONFIG_IPIPE_DEBUG_INTERNAL
- BUG_ON(ret > 0 && current_thread_info()->restart_block.fn !=
- do_no_restart_syscall);
-#endif
return ret;
}
--
Gilles.
prev parent reply other threads:[~2014-05-28 22:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 1:49 [Xenomai] gdb / threads on beaglebone black Drew
2014-05-26 7:09 ` Philippe Gerum
[not found] ` <CAO0fa7YQ0TxiAhbmFmt+41o+rugoLXKjXxtHygpthNOiu8gd9w@mail.gmail.com>
2014-05-26 13:23 ` Philippe Gerum
2014-05-27 12:05 ` Drew
2014-05-27 22:21 ` Drew
2014-05-28 14:08 ` Drew
2014-05-28 14:24 ` Philippe Gerum
2014-05-28 14:45 ` Michael Haberler
2014-05-28 17:54 ` Gilles Chanteperdrix
2014-05-28 19:19 ` Drew
2014-05-28 19:28 ` Philippe Gerum
2014-05-28 20:06 ` Gilles Chanteperdrix
2014-05-28 20:24 ` Gilles Chanteperdrix
2014-05-28 20:31 ` Michael Haberler
2014-05-28 20:36 ` Philippe Gerum
2014-05-28 21:01 ` Drew
2014-05-28 21:08 ` Gilles Chanteperdrix
2014-05-28 22:27 ` Gilles Chanteperdrix [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=538662D9.4050308@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=pythondrew@gmail.com \
--cc=rpm@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.