diff options
author | Gautham R. Shenoy <[email protected]> | 2019-03-08 21:03:24 +0530 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2019-03-27 10:40:09 +1100 |
commit | ce9afe08e71e3f7d64f337a6e932e50849230fc2 (patch) | |
tree | 635284ce4f44c79dbe34d76d0d20d7d57a0ddd37 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | d9470757398a700d9450a43508000bcfd010c7a4 (diff) |
powerpc/pseries/energy: Use OF accessor functions to read ibm,drc-indexes
In cpu_to_drc_index() in the case when FW_FEATURE_DRC_INFO is absent,
we currently use of_read_property() to obtain the pointer to the array
corresponding to the property "ibm,drc-indexes". The elements of this
array are of type __be32, but are accessed without any conversion to
the OS-endianness, which is buggy on a Little Endian OS.
Fix this by using of_property_read_u32_index() accessor function to
safely read the elements of the array.
Fixes: e83636ac3334 ("pseries/drc-info: Search DRC properties for CPU indexes")
Cc: [email protected] # v4.16+
Reported-by: Pavithra R. Prakash <[email protected]>
Signed-off-by: Gautham R. Shenoy <[email protected]>
Reviewed-by: Vaidyanathan Srinivasan <[email protected]>
[mpe: Make the WARN_ON a WARN_ON_ONCE so it's not retriggerable]
Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions