Skip to content

Commit

Permalink
perf/x86/intel/pt: Fix the 32-bit build
Browse files Browse the repository at this point in the history
On a 32-bit build I got:

  arch/x86/kernel/cpu/perf_event_intel_pt.c:413:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  arch/x86/kernel/cpu/perf_event_intel_bts.c:162:24: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Fix it. The code should probably be (re-)tested on 32-bit systems to make
sure all is fine.

Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kaixu Xia <kaixu.xia@linaro.org>
Cc: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Robert Richter <rric@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: acme@infradead.org
Cc: adrian.hunter@intel.com
Cc: kan.liang@intel.com
Cc: markus.t.metzger@intel.com
Cc: mathieu.poirier@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Apr 2, 2015
1 parent cd1f11d commit 2e54a5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/perf_event_intel_bts.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ bts_config_buffer(struct bts_buffer *buf)
thresh = end;
}

ds->bts_buffer_base = (u64)page_address(page) + phys->displacement;
ds->bts_buffer_base = (u64)(long)page_address(page) + phys->displacement;
ds->bts_index = ds->bts_buffer_base + index;
ds->bts_absolute_maximum = ds->bts_buffer_base + end;
ds->bts_interrupt_threshold = !buf->snapshot
Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/cpu/perf_event_intel_pt.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ static void pt_topa_dump(struct pt_buffer *buf)
list_for_each_entry(topa, &buf->tables, list) {
int i;

pr_debug("# table @%p (%p), off %llx size %zx\n", topa->table,
(void *)topa->phys, topa->offset, topa->size);
pr_debug("# table @%p (%016Lx), off %llx size %zx\n", topa->table,
topa->phys, topa->offset, topa->size);
for (i = 0; i < TENTS_PER_PAGE; i++) {
pr_debug("# entry @%p (%lx sz %u %c%c%c) raw=%16llx\n",
&topa->table[i],
Expand Down

0 comments on commit 2e54a5b

Please sign in to comment.