diff options
author | Robert Richter <robert.richter@amd.com> | 2009-06-03 14:54:56 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-06-11 14:16:00 -0400 |
commit | 51563a0e5650d0d76539625388d72d62b34c726e (patch) | |
tree | 17148f56578af8f7d7d67491f8b7eb05d99acdd9 /arch/x86/oprofile | |
parent | c572ae4efd1b0a5cc76c5e6aae05c1b182b6a69c (diff) |
x86/oprofile: introduce oprofile_add_data64()
The IBS implemention writes 64 bit register values to the cpu buffer
by writing two 32 values using oprofile_add_data(). This patch
introduces oprofile_add_data64() to write a single 64 bit value to the
buffer.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r-- | arch/x86/oprofile/op_model_amd.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c index 6493ef7ae9ad..cc930467575d 100644 --- a/arch/x86/oprofile/op_model_amd.c +++ b/arch/x86/oprofile/op_model_amd.c | |||
@@ -140,13 +140,10 @@ op_amd_handle_ibs(struct pt_regs * const regs, | |||
140 | rdmsrl(MSR_AMD64_IBSFETCHLINAD, val); | 140 | rdmsrl(MSR_AMD64_IBSFETCHLINAD, val); |
141 | oprofile_write_reserve(&entry, regs, val, | 141 | oprofile_write_reserve(&entry, regs, val, |
142 | IBS_FETCH_CODE, IBS_FETCH_SIZE); | 142 | IBS_FETCH_CODE, IBS_FETCH_SIZE); |
143 | oprofile_add_data(&entry, (u32)val); | 143 | oprofile_add_data64(&entry, val); |
144 | oprofile_add_data(&entry, (u32)(val >> 32)); | 144 | oprofile_add_data64(&entry, ctl); |
145 | oprofile_add_data(&entry, (u32)ctl); | ||
146 | oprofile_add_data(&entry, (u32)(ctl >> 32)); | ||
147 | rdmsrl(MSR_AMD64_IBSFETCHPHYSAD, val); | 145 | rdmsrl(MSR_AMD64_IBSFETCHPHYSAD, val); |
148 | oprofile_add_data(&entry, (u32)val); | 146 | oprofile_add_data64(&entry, val); |
149 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
150 | oprofile_write_commit(&entry); | 147 | oprofile_write_commit(&entry); |
151 | 148 | ||
152 | /* reenable the IRQ */ | 149 | /* reenable the IRQ */ |
@@ -162,23 +159,17 @@ op_amd_handle_ibs(struct pt_regs * const regs, | |||
162 | rdmsrl(MSR_AMD64_IBSOPRIP, val); | 159 | rdmsrl(MSR_AMD64_IBSOPRIP, val); |
163 | oprofile_write_reserve(&entry, regs, val, | 160 | oprofile_write_reserve(&entry, regs, val, |
164 | IBS_OP_CODE, IBS_OP_SIZE); | 161 | IBS_OP_CODE, IBS_OP_SIZE); |
165 | oprofile_add_data(&entry, (u32)val); | 162 | oprofile_add_data64(&entry, val); |
166 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
167 | rdmsrl(MSR_AMD64_IBSOPDATA, val); | 163 | rdmsrl(MSR_AMD64_IBSOPDATA, val); |
168 | oprofile_add_data(&entry, (u32)val); | 164 | oprofile_add_data64(&entry, val); |
169 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
170 | rdmsrl(MSR_AMD64_IBSOPDATA2, val); | 165 | rdmsrl(MSR_AMD64_IBSOPDATA2, val); |
171 | oprofile_add_data(&entry, (u32)val); | 166 | oprofile_add_data64(&entry, val); |
172 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
173 | rdmsrl(MSR_AMD64_IBSOPDATA3, val); | 167 | rdmsrl(MSR_AMD64_IBSOPDATA3, val); |
174 | oprofile_add_data(&entry, (u32)val); | 168 | oprofile_add_data64(&entry, val); |
175 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
176 | rdmsrl(MSR_AMD64_IBSDCLINAD, val); | 169 | rdmsrl(MSR_AMD64_IBSDCLINAD, val); |
177 | oprofile_add_data(&entry, (u32)val); | 170 | oprofile_add_data64(&entry, val); |
178 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
179 | rdmsrl(MSR_AMD64_IBSDCPHYSAD, val); | 171 | rdmsrl(MSR_AMD64_IBSDCPHYSAD, val); |
180 | oprofile_add_data(&entry, (u32)val); | 172 | oprofile_add_data64(&entry, val); |
181 | oprofile_add_data(&entry, (u32)(val >> 32)); | ||
182 | oprofile_write_commit(&entry); | 173 | oprofile_write_commit(&entry); |
183 | 174 | ||
184 | /* reenable the IRQ */ | 175 | /* reenable the IRQ */ |