cpufrequtils aperf: Fix MSR read on 32-bit

The cpufreq-aperf command does not work on 32-bit systems. The reason
for that is a wrong count argument passed to the read() call. Instead
of the buffer size, the size of the pointer to the buffer is used. On
64-bit systems this just happened to work, because we need to read an
8 byte value and a pointer has a size of 8 bytes on 64-bit. On 32-bit
systems only 4 bytes are read, which then triggers the error path.

Signed-off-by: Frank Arnold <frank.arnold@amd.com>
Reviewed-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
1 file changed