[PATCH] powerpc/perf/hv-gpci: Fix the logic to compute counter value from the hcall result buffer.

Michael Ellerman patch-notifications at ellerman.id.au
Fri Aug 27 23:15:42 AEST 2021


On Fri, 13 Aug 2021 13:51:58 +0530, Kajol Jain wrote:
> H_GetPerformanceCounterInfo (0xF080) hcall returns the counter data in the
> result buffer. Result buffer has specific format defined in the PAPR
> specification. One of the field is counter offset and width of the counter
> data returned.
> 
> Counter data are returned in a unsigned char array. To
> get the final counter data, these values should be left shifted
> byte at a time. But commit 220a0c609ad17 ("powerpc/perf: Add support
> for the hv gpci (get performance counter info) interface") made the
> shifting bitwise. Because of this, hcall counters values could end up
> in lower side, which messes the counter prev vs now calculation. This
> lead to huge counter value reporting
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/perf/hv-gpci: Fix the logic to compute counter value from the hcall result buffer.
      https://git.kernel.org/powerpc/c/f9addd85fbfacf0d155e83dbee8696d6df5ed0c7

cheers


More information about the Linuxppc-dev mailing list