[v5,14/25] powerpc/pseries: Move plpks.h to include directory

Message ID 20230131063928.388035-15-ajd@linux.ibm.com
State New
Headers
Series pSeries dynamic secure boot secvar interface + platform keyring loading |

Commit Message

Andrew Donnellan Jan. 31, 2023, 6:39 a.m. UTC
  From: Russell Currey <ruscur@russell.cc>

Move plpks.h from platforms/pseries/ to include/asm/. This is necessary
for later patches to make use of the PLPKS from code in other subsystems.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>

---

v3: New patch
---
 .../powerpc/{platforms/pseries => include/asm}/plpks.h | 10 +++++++---
 arch/powerpc/platforms/pseries/plpks.c                 |  3 +--
 2 files changed, 8 insertions(+), 5 deletions(-)
 rename arch/powerpc/{platforms/pseries => include/asm}/plpks.h (89%)
  

Comments

Stefan Berger Jan. 31, 2023, 3:59 p.m. UTC | #1
On 1/31/23 01:39, Andrew Donnellan wrote:
> From: Russell Currey <ruscur@russell.cc>
> 
> Move plpks.h from platforms/pseries/ to include/asm/. This is necessary
> for later patches to make use of the PLPKS from code in other subsystems.
> 
> Signed-off-by: Russell Currey <ruscur@russell.cc>
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> 
> ---
> 
> v3: New patch
> ---
>   .../powerpc/{platforms/pseries => include/asm}/plpks.h | 10 +++++++---
>   arch/powerpc/platforms/pseries/plpks.c                 |  3 +--
>   2 files changed, 8 insertions(+), 5 deletions(-)
>   rename arch/powerpc/{platforms/pseries => include/asm}/plpks.h (89%)
> 
> diff --git a/arch/powerpc/platforms/pseries/plpks.h b/arch/powerpc/include/asm/plpks.h
> similarity index 89%
> rename from arch/powerpc/platforms/pseries/plpks.h
> rename to arch/powerpc/include/asm/plpks.h
> index 275ccd86bfb5..8295502ee93b 100644
> --- a/arch/powerpc/platforms/pseries/plpks.h
> +++ b/arch/powerpc/include/asm/plpks.h
> @@ -6,8 +6,10 @@
>    * Platform keystore for pseries LPAR(PLPKS).
>    */
>   
> -#ifndef _PSERIES_PLPKS_H
> -#define _PSERIES_PLPKS_H
> +#ifndef _ASM_POWERPC_PLPKS_H
> +#define _ASM_POWERPC_PLPKS_H
> +
> +#ifdef CONFIG_PSERIES_PLPKS
>   
>   #include <linux/types.h>
>   #include <linux/list.h>
> @@ -68,4 +70,6 @@ int plpks_read_fw_var(struct plpks_var *var);
>    */
>   int plpks_read_bootloader_var(struct plpks_var *var);
>   
> -#endif
> +#endif // CONFIG_PSERIES_PLPKS
> +
> +#endif // _ASM_POWERPC_PLPKS_H
> diff --git a/arch/powerpc/platforms/pseries/plpks.c b/arch/powerpc/platforms/pseries/plpks.c
> index a01cf2ff140a..13e6daadb179 100644
> --- a/arch/powerpc/platforms/pseries/plpks.c
> +++ b/arch/powerpc/platforms/pseries/plpks.c
> @@ -18,8 +18,7 @@
>   #include <linux/types.h>
>   #include <asm/hvcall.h>
>   #include <asm/machdep.h>
> -
> -#include "plpks.h"
> +#include <asm/plpks.h>
>   
>   #define PKS_FW_OWNER	     0x1
>   #define PKS_BOOTLOADER_OWNER 0x2


Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
  

Patch

diff --git a/arch/powerpc/platforms/pseries/plpks.h b/arch/powerpc/include/asm/plpks.h
similarity index 89%
rename from arch/powerpc/platforms/pseries/plpks.h
rename to arch/powerpc/include/asm/plpks.h
index 275ccd86bfb5..8295502ee93b 100644
--- a/arch/powerpc/platforms/pseries/plpks.h
+++ b/arch/powerpc/include/asm/plpks.h
@@ -6,8 +6,10 @@ 
  * Platform keystore for pseries LPAR(PLPKS).
  */
 
-#ifndef _PSERIES_PLPKS_H
-#define _PSERIES_PLPKS_H
+#ifndef _ASM_POWERPC_PLPKS_H
+#define _ASM_POWERPC_PLPKS_H
+
+#ifdef CONFIG_PSERIES_PLPKS
 
 #include <linux/types.h>
 #include <linux/list.h>
@@ -68,4 +70,6 @@  int plpks_read_fw_var(struct plpks_var *var);
  */
 int plpks_read_bootloader_var(struct plpks_var *var);
 
-#endif
+#endif // CONFIG_PSERIES_PLPKS
+
+#endif // _ASM_POWERPC_PLPKS_H
diff --git a/arch/powerpc/platforms/pseries/plpks.c b/arch/powerpc/platforms/pseries/plpks.c
index a01cf2ff140a..13e6daadb179 100644
--- a/arch/powerpc/platforms/pseries/plpks.c
+++ b/arch/powerpc/platforms/pseries/plpks.c
@@ -18,8 +18,7 @@ 
 #include <linux/types.h>
 #include <asm/hvcall.h>
 #include <asm/machdep.h>
-
-#include "plpks.h"
+#include <asm/plpks.h>
 
 #define PKS_FW_OWNER	     0x1
 #define PKS_BOOTLOADER_OWNER 0x2