From: chrubis@suse.cz
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 3/3] ltp_rt_sigaction: added SPARC support
Date: Wed, 4 Jun 2014 17:49:39 +0200 [thread overview]
Message-ID: <20140604154939.GA7913@rei> (raw)
In-Reply-To: <1400667887-5188-3-git-send-email-stanislav.kholmanskikh@oracle.com>
Hi!
> Based on patches by Jose E. Marchesi <jose.marchesi@oracle.com>.
>
> Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
> ---
> include/ltp_signal.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 59 insertions(+), 0 deletions(-)
>
> diff --git a/include/ltp_signal.h b/include/ltp_signal.h
> index 31bb0b0..a60ee7c 100644
> --- a/include/ltp_signal.h
> +++ b/include/ltp_signal.h
> @@ -122,6 +122,46 @@ static inline int sig_initial(int sig)
>
> #endif /* __x86_64__ */
>
> +#ifdef __sparc__
> +#if defined __arch64__ || defined __sparcv9
It's a bit more readable if we indent the innter ifdefs as:
#ifdef __sparc__
# if defined __arch64__ || defined __sparcv9
# endif
#endif /* __sparc__ */
> +/*
> + * From glibc/sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c
> + */
> +
> +static void __rt_sigreturn_stub(void)
> +{
> + __asm__ ("mov %0, %%g1\n\t"
> + "ta 0x6d\n\t"
> + : /* no outputs */
> + : "i" (__NR_rt_sigreturn));
> +}
> +
> +#else /* sparc32 */
> +
> +/*
> + * From glibc/sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c
> + */
> +
> +static void __rt_sigreturn_stub(void)
> +{
> + __asm__ ("mov %0, %%g1\n\t"
> + "ta 0x10\n\t"
> + : /* no outputs */
> + : "i" (__NR_rt_sigreturn));
> +}
> +
> +static void __sigreturn_stub(void)
> +{
> + __asm__ ("mov %0, %%g1\n\t"
> + "ta 0x10\n\t"
> + : /* no outputs */
> + : "i" (__NR_sigreturn));
> +}
> +
> +#endif
> +#endif /* __sparc__ */
> +
> /* This is a wrapper for __NR_rt_sigaction syscall.
> * act/oact values of INVAL_SA_PTR is used to pass
> * an invalid pointer to syscall(__NR_rt_sigaction)
> @@ -159,9 +199,28 @@ static int ltp_rt_sigaction(int signum, const struct sigaction *act,
> kact.sa_restorer = restore_rt;
> #endif
>
> +#ifdef __sparc__
> + unsigned long stub = 0;
> +# if defined __arch64__ || defined __sparcv9
> + stub = ((unsigned long) &__rt_sigreturn_stub) - 8;
> +# else /* sparc32 */
> + if ((kact.sa_flags & SA_SIGINFO) != 0)
> + stub = ((unsigned long) &__rt_sigreturn_stub) - 8;
> + else
> + stub = ((unsigned long) &__sigreturn_stub) - 8;
> +# endif
> +#endif
Here they are intended correctly.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-06-04 15:49 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 9:06 [LTP] SPARC fixes Stanislav Kholmanskikh
2014-05-08 9:06 ` [LTP] [PATCH 1/4] linux syscall numbers: fixed the checkings for SPARC Stanislav Kholmanskikh
2014-05-08 9:06 ` [LTP] [PATCH 2/4] linux syscall numbers: removed unimplemented syscalls for sparc64 Stanislav Kholmanskikh
2014-05-08 9:06 ` [LTP] [PATCH 3/4] syscalls: corrected the rest of __sparc64__ defines Stanislav Kholmanskikh
2014-05-12 12:59 ` chrubis
2014-05-13 6:20 ` [LTP] [PATCH 1/2] sendmsg, recvmsg: moved MSG_CMSG_COMPAT definition to a header Stanislav Kholmanskikh
2014-05-13 6:20 ` [LTP] [PATCH 2/2] msg_common.h: corrected __sparc64__ definition Stanislav Kholmanskikh
2014-05-15 12:30 ` chrubis
2014-05-08 9:06 ` [LTP] [PATCH 4/4] rt_sigaction*, rt_sigprocmask01, rt_sigsuspend01: SPARC support Stanislav Kholmanskikh
2014-05-12 13:08 ` chrubis
[not found] ` <5371C09F.7050205@oracle.com>
2014-05-13 11:39 ` chrubis
2014-05-20 12:24 ` [LTP] [RFC PATCH] A draft of the rt_sigaction syscall wrapper Stanislav Kholmanskikh
2014-05-20 14:42 ` chrubis
2014-05-21 10:24 ` [LTP] [PATCH 1/3] rt_sigaction, rt_sigprocmask, rt_sigsuspend: cleanup Stanislav Kholmanskikh
2014-05-21 10:24 ` [LTP] [PATCH 2/3] rt_sigaction, rt_sigprocmask01, rt_sigsuspend: use rt_sigaction wrapper Stanislav Kholmanskikh
2014-06-04 15:53 ` chrubis
2014-05-21 10:24 ` [LTP] [PATCH 3/3] ltp_rt_sigaction: added SPARC support Stanislav Kholmanskikh
2014-05-21 10:31 ` Stanislav Kholmanskikh
2014-06-04 15:49 ` chrubis [this message]
2014-06-17 9:08 ` [LTP] [PATCH V2 1/3] rt_sigaction, rt_sigprocmask, rt_sigsuspend: cleanup Stanislav Kholmanskikh
2014-06-17 9:08 ` [LTP] [PATCH V2 2/3] rt_sigaction, rt_sigprocmask01, rt_sigsuspend: use rt_sigaction wrapper Stanislav Kholmanskikh
2014-06-17 9:08 ` [LTP] [PATCH V2 3/3] ltp_rt_sigaction.h: added SPARC support Stanislav Kholmanskikh
2014-06-23 15:21 ` chrubis
2014-08-11 15:04 ` chrubis
[not found] ` <53E9C7B8.1040504@oracle.com>
2014-08-12 9:04 ` chrubis
[not found] ` <53E9F644.5000101@oracle.com>
2014-08-12 11:26 ` chrubis
2014-08-12 11:59 ` [LTP] [PATCH] rt_sigaction.h: define HAVE_SA_RESTORER for most platforms Stanislav Kholmanskikh
2014-08-12 12:24 ` chrubis
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=20140604154939.GA7913@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox