aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorDmitry Safonov <dsafonov@virtuozzo.com>2016-09-05 09:33:06 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-14 15:28:10 -0400
commit90954e7b940778478754452f1ec8b23ea9a9ad42 (patch)
tree932c1f7de89b5a216d562677e99ccfd9d4d30300 /arch/x86
parent2eefd8789698e89c4a5d610921dc3c1b66e3bd0d (diff)
x86/coredump: Use pr_reg size, rather that TIF_IA32 flag
Killed PR_REG_SIZE and PR_REG_PTR macro as we can get regset size from regset view. I wish I could also kill PRSTATUS_SIZE nicely. Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: 0x7f454c46@gmail.com Cc: linux-mm@kvack.org Cc: luto@kernel.org Cc: gorcunov@openvz.org Cc: xemul@virtuozzo.com Link: http://lkml.kernel.org/r/20160905133308.28234-5-dsafonov@virtuozzo.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/compat.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h
index a18806165fe4..03d269bed941 100644
--- a/arch/x86/include/asm/compat.h
+++ b/arch/x86/include/asm/compat.h
@@ -275,10 +275,10 @@ struct compat_shmid64_ds {
275#ifdef CONFIG_X86_X32_ABI 275#ifdef CONFIG_X86_X32_ABI
276typedef struct user_regs_struct compat_elf_gregset_t; 276typedef struct user_regs_struct compat_elf_gregset_t;
277 277
278#define PR_REG_SIZE(S) (test_thread_flag(TIF_IA32) ? 68 : 216) 278/* Full regset -- prstatus on x32, otherwise on ia32 */
279#define PRSTATUS_SIZE(S) (test_thread_flag(TIF_IA32) ? 144 : 296) 279#define PRSTATUS_SIZE(S, R) (R != sizeof(S.pr_reg) ? 144 : 296)
280#define SET_PR_FPVALID(S,V) \ 280#define SET_PR_FPVALID(S, V, R) \
281 do { *(int *) (((void *) &((S)->pr_reg)) + PR_REG_SIZE(0)) = (V); } \ 281 do { *(int *) (((void *) &((S)->pr_reg)) + R) = (V); } \
282 while (0) 282 while (0)
283 283
284#define COMPAT_USE_64BIT_TIME \ 284#define COMPAT_USE_64BIT_TIME \