powerpc/perf/hv-24x7: Fix return value of hcalls
authorThiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Thu, 29 Jun 2017 21:55:35 +0000 (18:55 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 2 Jul 2017 10:40:32 +0000 (20:40 +1000)
commit38d81846106bb1e14fcf2cf390f7cdeb7fdab550
tree1e7abc783ac03f8f2cced4553d376954bfed64a7
parent62714a14928061f496308a9d4635bf986642046d
powerpc/perf/hv-24x7: Fix return value of hcalls

The H_GET_24X7_CATALOG_PAGE hcall can return a signed error code, so fix
this in the code.

The H_GET_24X7_DATA hcall can return a signed error code, so fix this in
the code. Also, don't truncate it to 32 bit to use as return value for
make_24x7_request. In case of error h_24x7_event_commit_txn passes that
return value to generic code, so it should be a proper errno. The other
caller of make_24x7_request is single_24x7_request, whose callers don't
actually care which error code is returned so they are not affected by this
change.

Finally, h_24x7_get_value doesn't use the error code from
single_24x7_request, so there's no need to store it.

Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/perf/hv-24x7.c