powerpc/papr_scm: Move duplicate definitions to common header files
authorShivaprasad G Bhat <sbhat@linux.ibm.com>
Sat, 27 Jan 2024 18:57:00 +0000 (12:57 -0600)
committerIra Weiny <ira.weiny@intel.com>
Thu, 25 Apr 2024 19:37:12 +0000 (12:37 -0700)
commitdbc8fc9d6de17b618591d4d2a6227dee27fe0f51
tree9504bf8909f31cc42a8c80caab201054bd3664a9
parented30a4a51bb196781c8058073ea720133a65596f
powerpc/papr_scm: Move duplicate definitions to common header files

papr_scm and ndtest share common PDSM payload structs like
nd_papr_pdsm_health. Presently these structs are duplicated across
papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially
arch independent and can run on platforms other than PPC64, a way
needs to be deviced to avoid redundancy and duplication of PDSM
structs in future.

So the patch proposes moving the PDSM header from arch/powerpc/include-
-/uapi/ to the generic include/uapi/linux directory. Also, there
are some #defines common between papr_scm and ndtest which are not
exported to the user space. So, move them to a header file which
can be shared across ndtest and papr_scm via newly introduced
include/linux/papr_scm.h.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Suggested-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Link: https://lore.kernel.org/r/170638176942.112443.2937254675538057083.stgit@ltcd48-lp2.aus.stglab.ibm.com
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
MAINTAINERS
arch/powerpc/include/uapi/asm/papr_pdsm.h [deleted file]
arch/powerpc/platforms/pseries/papr_scm.c
include/linux/papr_scm.h [new file with mode: 0644]
include/uapi/linux/papr_pdsm.h [new file with mode: 0644]
tools/testing/nvdimm/test/ndtest.c
tools/testing/nvdimm/test/ndtest.h