From: Cyril Bur <cyrilbur@gmail.com>
To: wei.guo.simon@gmail.com, linuxppc-dev@lists.ozlabs.org
Cc: Shuah Khan <shuah@kernel.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Chris Smart <chris@distroguy.com>,
Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
Michael Neuling <mikey@neuling.org>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
Jack Miller <jack@codezen.org>,
Rashmica Gupta <rashmicy@gmail.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v14 04/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers
Date: Wed, 14 Sep 2016 14:50:48 +1000 [thread overview]
Message-ID: <1473828648.2554.9.camel@gmail.com> (raw)
In-Reply-To: <1473665605-11890-5-git-send-email-wei.guo.simon@gmail.com>
On Mon, 2016-09-12 at 15:33 +0800, wei.guo.simon@gmail.com wrote:
> From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
>
> This patch adds ptrace interface test for GPR/FPR registers.
> This adds ptrace interface based helper functions related to
> GPR/FPR access and some assembly helper functions related to
> GPR/FPR registers.
>
> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
> Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
> ---
> tools/testing/selftests/powerpc/ptrace/Makefile | 3 +-
> .../testing/selftests/powerpc/ptrace/ptrace-gpr.c | 196
> +++++++++++++++++++
> .../testing/selftests/powerpc/ptrace/ptrace-gpr.h | 74 ++++++++
> tools/testing/selftests/powerpc/ptrace/ptrace.S | 131
> +++++++++++++
> tools/testing/selftests/powerpc/ptrace/ptrace.h | 211
> +++++++++++++++++++++
> 5 files changed, 614 insertions(+), 1 deletion(-)
> create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-
> gpr.c
> create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-
> gpr.h
> create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace.S
>
[snip]
> new file mode 100644
> index 0000000..193beea
> --- /dev/null
> +++ b/tools/testing/selftests/powerpc/ptrace/ptrace.S
> @@ -0,0 +1,131 @@
> +/*
> + * Ptrace interface test helper assembly functions
> + *
> + * Copyright (C) 2015 Anshuman Khandual, IBM Corporation.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + */
> +#include <ppc-asm.h>
> +#include "../reg.h"
> +
> +
> +/* Non volatile GPR - unsigned long buf[18] */
> +FUNC_START(load_gpr)
> + ld 14, 0*8(3)
> + ld 15, 1*8(3)
> + ld 16, 2*8(3)
> + ld 17, 3*8(3)
> + ld 18, 4*8(3)
> + ld 19, 5*8(3)
> + ld 20, 6*8(3)
> + ld 21, 7*8(3)
> + ld 22, 8*8(3)
> + ld 23, 9*8(3)
> + ld 24, 10*8(3)
> + ld 25, 11*8(3)
> + ld 26, 12*8(3)
> + ld 27, 13*8(3)
> + ld 28, 14*8(3)
> + ld 29, 15*8(3)
> + ld 30, 16*8(3)
> + ld 31, 17*8(3)
> + blr
> +FUNC_END(load_gpr)
> +
> +FUNC_START(store_gpr)
> + std 14, 0*8(3)
> + std 15, 1*8(3)
> + std 16, 2*8(3)
> + std 17, 3*8(3)
> + std 18, 4*8(3)
> + std 19, 5*8(3)
> + std 20, 6*8(3)
> + std 21, 7*8(3)
> + std 22, 8*8(3)
> + std 23, 9*8(3)
> + std 24, 10*8(3)
> + std 25, 11*8(3)
> + std 26, 12*8(3)
> + std 27, 13*8(3)
> + std 28, 14*8(3)
> + std 29, 15*8(3)
> + std 30, 16*8(3)
> + std 31, 17*8(3)
> + blr
> +FUNC_END(store_gpr)
> +
> +/* Single Precision Float - float buf[32] */
> +FUNC_START(load_fpr)
> + lfs 0, 0*4(3)
> + lfs 1, 1*4(3)
> + lfs 2, 2*4(3)
> + lfs 3, 3*4(3)
> + lfs 4, 4*4(3)
> + lfs 5, 5*4(3)
> + lfs 6, 6*4(3)
> + lfs 7, 7*4(3)
> + lfs 8, 8*4(3)
> + lfs 9, 9*4(3)
> + lfs 10, 10*4(3)
> + lfs 11, 11*4(3)
> + lfs 12, 12*4(3)
> + lfs 13, 13*4(3)
> + lfs 14, 14*4(3)
> + lfs 15, 15*4(3)
> + lfs 16, 16*4(3)
> + lfs 17, 17*4(3)
> + lfs 18, 18*4(3)
> + lfs 19, 19*4(3)
> + lfs 20, 20*4(3)
> + lfs 21, 21*4(3)
> + lfs 22, 22*4(3)
> + lfs 23, 23*4(3)
> + lfs 24, 24*4(3)
> + lfs 25, 25*4(3)
> + lfs 26, 26*4(3)
> + lfs 27, 27*4(3)
> + lfs 28, 28*4(3)
> + lfs 29, 29*4(3)
> + lfs 30, 30*4(3)
> + lfs 31, 31*4(3)
> + blr
> +FUNC_END(load_fpr)
> +
> +FUNC_START(store_fpr)
> + stfs 0, 0*4(3)
> + stfs 1, 1*4(3)
> + stfs 2, 2*4(3)
> + stfs 3, 3*4(3)
> + stfs 4, 4*4(3)
> + stfs 5, 5*4(3)
> + stfs 6, 6*4(3)
> + stfs 7, 7*4(3)
> + stfs 8, 8*4(3)
> + stfs 9, 9*4(3)
> + stfs 10, 10*4(3)
> + stfs 11, 11*4(3)
> + stfs 12, 12*4(3)
> + stfs 13, 13*4(3)
> + stfs 14, 14*4(3)
> + stfs 15, 15*4(3)
> + stfs 16, 16*4(3)
> + stfs 17, 17*4(3)
> + stfs 18, 18*4(3)
> + stfs 19, 19*4(3)
> + stfs 20, 20*4(3)
> + stfs 21, 21*4(3)
> + stfs 22, 22*4(3)
> + stfs 23, 23*4(3)
> + stfs 24, 24*4(3)
> + stfs 25, 25*4(3)
> + stfs 26, 26*4(3)
> + stfs 27, 27*4(3)
> + stfs 28, 28*4(3)
> + stfs 29, 29*4(3)
> + stfs 30, 30*4(3)
> + stfs 31, 31*4(3)
> + blr
> +FUNC_END(store_fpr)
I wrote similar functions in math/fpu_asm.S perhaps it would be time
consolidate those and these into an fpu_asm.S file at a higher level,
TM related tests would benefit as well.
> diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace.h
> b/tools/testing/selftests/powerpc/ptrace/ptrace.h
> index fbf73ca..1019004 100644
> --- a/tools/testing/selftests/powerpc/ptrace/ptrace.h
> +++ b/tools/testing/selftests/powerpc/ptrace/ptrace.h
> @@ -157,6 +157,214 @@ fail:
> return TEST_FAIL;
> }
>
[snip]
next prev parent reply other threads:[~2016-09-14 4:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 7:33 [PATCH v14 00/15] selftests/powerpc: Add ptrace tests for ppc registers wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 01/15] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h' wei.guo.simon
2016-09-14 4:48 ` Cyril Bur
2016-09-12 7:33 ` [PATCH v14 02/15] selftests/powerpc: Use the new SPRN_DSCR_PRIV definiton wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 03/15] selftests/powerpc: Add ptrace tests for EBB wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 04/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers wei.guo.simon
2016-09-14 4:50 ` Cyril Bur [this message]
2016-09-12 7:33 ` [PATCH v14 05/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers in TM wei.guo.simon
2016-09-14 4:51 ` Cyril Bur
2016-09-12 7:33 ` [PATCH v14 06/15] selftests/powerpc: Add ptrace tests for GPR/FPR registers in suspended TM wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 07/15] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers wei.guo.simon
2016-09-14 4:53 ` Cyril Bur
2016-09-12 7:33 ` [PATCH v14 08/15] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in TM wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 09/15] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR in suspended TM wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 10/15] selftests/powerpc: Add ptrace tests for VSX, VMX registers wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 11/15] selftests/powerpc: Add ptrace tests for VSX, VMX registers in TM wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 12/15] selftests/powerpc: Add ptrace tests for VSX, VMX registers in suspended TM wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 13/15] selftests/powerpc: Add ptrace tests for TM SPR registers wei.guo.simon
2016-09-14 5:04 ` Cyril Bur
2016-09-19 2:33 ` Simon Guo
2016-09-30 2:17 ` Simon Guo
2016-09-12 7:33 ` [PATCH v14 14/15] selftests/powerpc: Add .gitignore file for ptrace executables wei.guo.simon
2016-09-12 7:33 ` [PATCH v14 15/15] selftests/powerpc: Fix a build issue wei.guo.simon
2016-09-14 4:55 ` Cyril Bur
2016-09-13 5:49 ` [PATCH v14 00/15] selftests/powerpc: Add ptrace tests for ppc registers Cyril Bur
2016-09-12 17:01 ` Simon Guo
2016-09-14 4:09 ` Cyril Bur
2016-09-14 7:06 ` Michael Ellerman
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=1473828648.2554.9.camel@gmail.com \
--to=cyrilbur@gmail.com \
--cc=chris@distroguy.com \
--cc=jack@codezen.org \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=rashmicy@gmail.com \
--cc=shuah@kernel.org \
--cc=sjitindarsingh@gmail.com \
--cc=wei.guo.simon@gmail.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 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.