lkml.org 
[lkml]   [2019]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 6/8] perf/x86/rapl: Get msr values from new probe framework
On Sun, Jun 16, 2019 at 04:03:56PM +0200, Jiri Olsa wrote:

> + cfg = array_index_nospec(cfg, NR_RAPL_DOMAINS + 1);

This one fails to build on i386. Istr we had issues like that before.
This makes it build.

diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c
index ddad45ef8757..64ab51ffdf06 100644
--- a/arch/x86/events/intel/rapl.c
+++ b/arch/x86/events/intel/rapl.c
@@ -349,7 +349,7 @@ static int rapl_pmu_event_init(struct perf_event *event)
if (!cfg || cfg >= NR_RAPL_DOMAINS + 1)
return -EINVAL;

- cfg = array_index_nospec(cfg, NR_RAPL_DOMAINS + 1);
+ cfg = array_index_nospec((long)cfg, NR_RAPL_DOMAINS + 1);
bit = cfg - 1;

/* check event supported */
\
 
 \ /
  Last update: 2019-06-17 13:43    [W:0.121 / U:37.596 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site