[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87sfyfmzhh.fsf@mpe.ellerman.id.au>
Date: Wed, 08 Sep 2021 15:02:18 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Shivaprasad G Bhat <sbhat@...ux.ibm.com>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Cc: nvdimm@...ts.linux.dev, aneesh.kumar@...ux.ibm.com,
sbhat@...ux.ibm.com, vaibhav@...ux.ibm.com,
dan.j.williams@...el.com
Subject: Re: [RFC PATCH v2] powerpc/papr_scm: Move duplicate definitions to
common header files
Shivaprasad G Bhat <sbhat@...ux.ibm.com> writes:
> 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@...ux.ibm.com>
> Signed-off-by: Vaibhav Jain <vaibhav@...ux.ibm.com>
> Suggested-by: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
> ---
> Changelog:
>
> Since v1:
> Link: https://patchwork.kernel.org/project/linux-nvdimm/patch/162505488483.72147.12741153746322191381.stgit@56e104a48989/
> * Removed dependency on this patch for the other patches
>
> MAINTAINERS | 2
> arch/powerpc/include/uapi/asm/papr_pdsm.h | 165 -----------------------------
> arch/powerpc/platforms/pseries/papr_scm.c | 43 --------
> include/linux/papr_scm.h | 48 ++++++++
> include/uapi/linux/papr_pdsm.h | 165 +++++++++++++++++++++++++++++
This doesn't make sense to me.
Anything with papr (or PAPR) in the name is fundamentally powerpc
specific, it doesn't belong in a generic header, or in a generic
location.
What's the actual problem you're trying to solve?
If it's just including papr_scm bits into ndtest.c then that should be
as simple as:
#ifdef __powerpc__
#include <asm/papr_scm.h>
#endif
Shouldn't it?
cheers
Powered by blists - more mailing lists