diff options
author | Andrew Donnellan <ajd@linux.ibm.com> | 2023-02-10 11:03:54 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-02-12 14:12:38 +0300 |
commit | 0cf2cc1fe4e2e7a37da077cdd3fba5cfd9a6a36c (patch) | |
tree | a739af1f6b2163d2c1280f15be581c68c6acc613 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ebdcd42347157647ffe6c4d2808e4e5c146475d3 (diff) | |
download | linux-0cf2cc1fe4e2e7a37da077cdd3fba5cfd9a6a36c.tar.xz |
powerpc/pseries: Make caller pass buffer to plpks_read_var()
Currently, plpks_read_var() allocates a buffer to pass to the
H_PKS_READ_OBJECT hcall, then allocates another buffer into which the data
is copied, and returns that buffer to the caller.
This is a bit over the top - while we probably still want to allocate a
separate buffer to pass to the hypervisor in the hcall, we can let the
caller allocate the final buffer and specify the size.
Don't allocate var->data in plpks_read_var(), instead expect the caller to
allocate it. If the caller needs to discover the size, it can set
var->data to NULL and var->datalen will be populated. Update header file
to document this.
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230210080401.345462-20-ajd@linux.ibm.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions