Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1451189
| From | wei.guo.simon@gmail.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v12 17/30] selftests/powerpc: Use the new SPRN_DSCR_PRIV definiton |
| Date | 2016-07-27 11:40 +0200 |
| Message-ID | <rZttM-5ZR-47@gated-at.bofh.it> (permalink) |
| References | <rZtk6-5Wg-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Now that the new DSCR register definitions (SPRN_DSCR_PRIV and
SPRN_DSCR) are defined outside this directory, use them instead.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Cyril Bur <cyrilbur@gmail.com>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Simon Guo <wei.guo.simon@gmail.com>
Cc: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Cc: Michael Neuling <mikey@neuling.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Rashmica Gupta <rashmicy@gmail.com>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Jessica Yu <jeyu@redhat.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Cc: Chris Smart <chris@distroguy.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
---
tools/testing/selftests/powerpc/dscr/dscr.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/powerpc/dscr/dscr.h b/tools/testing/selftests/powerpc/dscr/dscr.h
index a36af1b..18ea223b 100644
--- a/tools/testing/selftests/powerpc/dscr/dscr.h
+++ b/tools/testing/selftests/powerpc/dscr/dscr.h
@@ -28,8 +28,6 @@
#include "utils.h"
-#define SPRN_DSCR 0x11 /* Privilege state SPR */
-#define SPRN_DSCR_USR 0x03 /* Problem state SPR */
#define THREADS 100 /* Max threads */
#define COUNT 100 /* Max iterations */
#define DSCR_MAX 16 /* Max DSCR value */
@@ -48,14 +46,14 @@ inline unsigned long get_dscr(void)
{
unsigned long ret;
- asm volatile("mfspr %0,%1" : "=r" (ret): "i" (SPRN_DSCR));
+ asm volatile("mfspr %0,%1" : "=r" (ret) : "i" (SPRN_DSCR_PRIV));
return ret;
}
inline void set_dscr(unsigned long val)
{
- asm volatile("mtspr %1,%0" : : "r" (val), "i" (SPRN_DSCR));
+ asm volatile("mtspr %1,%0" : : "r" (val), "i" (SPRN_DSCR_PRIV));
}
/* Problem state DSCR access */
@@ -63,14 +61,14 @@ inline unsigned long get_dscr_usr(void)
{
unsigned long ret;
- asm volatile("mfspr %0,%1" : "=r" (ret): "i" (SPRN_DSCR_USR));
+ asm volatile("mfspr %0,%1" : "=r" (ret) : "i" (SPRN_DSCR));
return ret;
}
inline void set_dscr_usr(unsigned long val)
{
- asm volatile("mtspr %1,%0" : : "r" (val), "i" (SPRN_DSCR_USR));
+ asm volatile("mtspr %1,%0" : : "r" (val), "i" (SPRN_DSCR));
}
/* Default DSCR access */
--
1.8.3.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v12 00/30] Add new powerpc specific ELF core notes wei.guo.simon@gmail.com - 2016-07-27 11:30 +0200 [PATCH v12 09/30] powerpc/ptrace: Enable support for NT_PPC_CVMX wei.guo.simon@gmail.com - 2016-07-27 11:30 +0200 [PATCH v12 10/30] powerpc/ptrace: Enable support for NT_PPC_CVSX wei.guo.simon@gmail.com - 2016-07-27 11:30 +0200 [PATCH v12 19/30] selftests/powerpc: Add ptrace tests for GPR/FPR registers wei.guo.simon@gmail.com - 2016-07-27 11:30 +0200 [PATCH v12 16/30] selftests/powerpc: Add more SPR numbers, TM & VMX instructions to 'reg.h' wei.guo.simon@gmail.com - 2016-07-27 11:30 +0200 [PATCH v12 27/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers in suspended TM wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 22/30] selftests/powerpc: Add ptrace tests for TAR, PPR, DSCR registers wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 26/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers in TM wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 03/30] powerpc/ptrace: Enable in transaction NT_PRFPREG ptrace requests wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 30/30] selftests/powerpc: Fix a build issue wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 07/30] powerpc/ptrace: Enable support for NT_PPC_CGPR wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 29/30] selftests/powerpc: Add .gitignore file for ptrace executables wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 18/30] selftests/powerpc: Add ptrace tests for EBB wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 28/30] selftests/powerpc: Add ptrace tests for TM SPR registers wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 17/30] selftests/powerpc: Use the new SPRN_DSCR_PRIV definiton wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200 [PATCH v12 25/30] selftests/powerpc: Add ptrace tests for VSX, VMX registers wei.guo.simon@gmail.com - 2016-07-27 11:40 +0200
csiph-web