]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
libperf: Fix alignment trap with xyarray contents in 'perf stat'
authorGerald BAEZA <gerald.baeza@st.com>
Thu, 22 Aug 2019 09:07:01 +0000 (09:07 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:25 +0000 (11:55 +0200)
commit3f8054746c2ed153b8d22527cea02f0973a5ba51
tree98119349748392cb79986643b6150af562492c8d
parent893dfb6cc909f1a59e3abb9738cb34808f188d9b
libperf: Fix alignment trap with xyarray contents in 'perf stat'

BugLink: https://bugs.launchpad.net/bugs/1847155
[ Upstream commit d9c5c083416500e95da098c01be092b937def7fa ]

Following the patch 'perf stat: Fix --no-scale', an alignment trap
happens in process_counter_values() on ARMv7 platforms due to the
attempt to copy non 64 bits aligned double words (pointed by 'count')
via a NEON vectored instruction ('vld1' with 64 bits alignment
constraint).

This patch sets a 64 bits alignment constraint on 'contents[]' field in
'struct xyarray' since the 'count' pointer used above points to such a
structure.

Signed-off-by: Gerald Baeza <gerald.baeza@st.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1566464769-16374-1-git-send-email-gerald.baeza@st.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
tools/perf/util/xyarray.h