diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-06-16 18:33:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:47 -0400 |
commit | b08cd961cc3869e14d841a3ed1641f47b11348f3 (patch) | |
tree | e7c323fbfd938c9c07810367d1a6260c7ecf6f29 | |
parent | 276c974ac7965e7335f0f4ab945729d8f30f11b5 (diff) |
uml: bad macro expansion, parameter is member
`ELF_CORE_COPY_REGS(x, y)' will make expansions like:
`(y)[0] = (x)->x.gp[0]' but correct is `(y)[0] = (x)->regs.gp[0]'
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: WANG Cong <amwang@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/um/sys-x86_64/asm/elf.h | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/um/sys-x86_64/asm/elf.h b/arch/um/sys-x86_64/asm/elf.h index 6e8a9195e952..04b9e87c8dad 100644 --- a/arch/um/sys-x86_64/asm/elf.h +++ b/arch/um/sys-x86_64/asm/elf.h | |||
@@ -66,28 +66,28 @@ typedef struct user_i387_struct elf_fpregset_t; | |||
66 | PT_REGS_R15(regs) = 0; \ | 66 | PT_REGS_R15(regs) = 0; \ |
67 | } while (0) | 67 | } while (0) |
68 | 68 | ||
69 | #define ELF_CORE_COPY_REGS(pr_reg, regs) \ | 69 | #define ELF_CORE_COPY_REGS(pr_reg, _regs) \ |
70 | (pr_reg)[0] = (regs)->regs.gp[0]; \ | 70 | (pr_reg)[0] = (_regs)->regs.gp[0]; \ |
71 | (pr_reg)[1] = (regs)->regs.gp[1]; \ | 71 | (pr_reg)[1] = (_regs)->regs.gp[1]; \ |
72 | (pr_reg)[2] = (regs)->regs.gp[2]; \ | 72 | (pr_reg)[2] = (_regs)->regs.gp[2]; \ |
73 | (pr_reg)[3] = (regs)->regs.gp[3]; \ | 73 | (pr_reg)[3] = (_regs)->regs.gp[3]; \ |
74 | (pr_reg)[4] = (regs)->regs.gp[4]; \ | 74 | (pr_reg)[4] = (_regs)->regs.gp[4]; \ |
75 | (pr_reg)[5] = (regs)->regs.gp[5]; \ | 75 | (pr_reg)[5] = (_regs)->regs.gp[5]; \ |
76 | (pr_reg)[6] = (regs)->regs.gp[6]; \ | 76 | (pr_reg)[6] = (_regs)->regs.gp[6]; \ |
77 | (pr_reg)[7] = (regs)->regs.gp[7]; \ | 77 | (pr_reg)[7] = (_regs)->regs.gp[7]; \ |
78 | (pr_reg)[8] = (regs)->regs.gp[8]; \ | 78 | (pr_reg)[8] = (_regs)->regs.gp[8]; \ |
79 | (pr_reg)[9] = (regs)->regs.gp[9]; \ | 79 | (pr_reg)[9] = (_regs)->regs.gp[9]; \ |
80 | (pr_reg)[10] = (regs)->regs.gp[10]; \ | 80 | (pr_reg)[10] = (_regs)->regs.gp[10]; \ |
81 | (pr_reg)[11] = (regs)->regs.gp[11]; \ | 81 | (pr_reg)[11] = (_regs)->regs.gp[11]; \ |
82 | (pr_reg)[12] = (regs)->regs.gp[12]; \ | 82 | (pr_reg)[12] = (_regs)->regs.gp[12]; \ |
83 | (pr_reg)[13] = (regs)->regs.gp[13]; \ | 83 | (pr_reg)[13] = (_regs)->regs.gp[13]; \ |
84 | (pr_reg)[14] = (regs)->regs.gp[14]; \ | 84 | (pr_reg)[14] = (_regs)->regs.gp[14]; \ |
85 | (pr_reg)[15] = (regs)->regs.gp[15]; \ | 85 | (pr_reg)[15] = (_regs)->regs.gp[15]; \ |
86 | (pr_reg)[16] = (regs)->regs.gp[16]; \ | 86 | (pr_reg)[16] = (_regs)->regs.gp[16]; \ |
87 | (pr_reg)[17] = (regs)->regs.gp[17]; \ | 87 | (pr_reg)[17] = (_regs)->regs.gp[17]; \ |
88 | (pr_reg)[18] = (regs)->regs.gp[18]; \ | 88 | (pr_reg)[18] = (_regs)->regs.gp[18]; \ |
89 | (pr_reg)[19] = (regs)->regs.gp[19]; \ | 89 | (pr_reg)[19] = (_regs)->regs.gp[19]; \ |
90 | (pr_reg)[20] = (regs)->regs.gp[20]; \ | 90 | (pr_reg)[20] = (_regs)->regs.gp[20]; \ |
91 | (pr_reg)[21] = current->thread.arch.fs; \ | 91 | (pr_reg)[21] = current->thread.arch.fs; \ |
92 | (pr_reg)[22] = 0; \ | 92 | (pr_reg)[22] = 0; \ |
93 | (pr_reg)[23] = 0; \ | 93 | (pr_reg)[23] = 0; \ |