mirror of https://github.com/torvalds/linux.git
We add support for reporting 'fuel-gauge' NVDIMM metric via PAPR_PDSM_HEALTH pdsm payload. 'fuel-gauge' metric indicates the usage life remaining of a papr-scm compatible NVDIMM. PHYP exposes this metric via the H_SCM_PERFORMANCE_STATS. The metric value is returned from the pdsm by extending the return payload 'struct nd_papr_pdsm_health' without breaking the ABI. A new field 'dimm_fuel_gauge' to hold the metric value is introduced at the end of the payload struct and its presence is indicated by by extension flag PDSM_DIMM_HEALTH_RUN_GAUGE_VALID. The patch introduces a new function papr_pdsm_fuel_gauge() that is called from papr_pdsm_health(). If fetching NVDIMM performance stats is supported then 'papr_pdsm_fuel_gauge()' allocated an output buffer large enough to hold the performance stat and passes it to drc_pmem_query_stats() that issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200731064153.182203-3-vaibhav@linux.ibm.com |
||
|---|---|---|
| .. | ||
| Kbuild | ||
| auxvec.h | ||
| bitsperlong.h | ||
| bootx.h | ||
| bpf_perf_event.h | ||
| byteorder.h | ||
| cputable.h | ||
| eeh.h | ||
| elf.h | ||
| epapr_hcalls.h | ||
| errno.h | ||
| fcntl.h | ||
| ioctl.h | ||
| ioctls.h | ||
| ipcbuf.h | ||
| kvm.h | ||
| kvm_para.h | ||
| mman.h | ||
| msgbuf.h | ||
| nvram.h | ||
| opal-prd.h | ||
| papr_pdsm.h | ||
| perf_event.h | ||
| perf_regs.h | ||
| posix_types.h | ||
| ps3fb.h | ||
| ptrace.h | ||
| sembuf.h | ||
| setup.h | ||
| shmbuf.h | ||
| sigcontext.h | ||
| signal.h | ||
| socket.h | ||
| spu_info.h | ||
| stat.h | ||
| swab.h | ||
| termbits.h | ||
| termios.h | ||
| tm.h | ||
| types.h | ||
| ucontext.h | ||
| unistd.h | ||
| vas-api.h | ||