powerpc/powernv: Include asm/powernv.h from the local powernv.h
authorOliver O'Halloran <oohall@gmail.com>
Tue, 4 Aug 2020 00:54:06 +0000 (10:54 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 24 Aug 2020 15:31:33 +0000 (01:31 +1000)
The asm/powernv.h header provides prototypes for functions which need to be
called by non-powernv platform code. Also include it in the powernv.h
that's local to the platform directory to squash some warnings about
non-static functions missing prototypes.

Also include powernv.h since from opal-memcons.c since it has the
prototypes for the memcons wrangling functions which are used for the opal
and ultravisor msglog.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200804005410.146094-3-oohall@gmail.com
arch/powerpc/platforms/powernv/opal-msglog.c
arch/powerpc/platforms/powernv/powernv.h

index d26da19a611f1dd1e3e4ff380bac7fe21511ca20..d3b6e135c18b17eff82ab90b90d2c3fbd3f3e031 100644 (file)
@@ -12,6 +12,8 @@
 #include <linux/types.h>
 #include <asm/barrier.h>
 
+#include "powernv.h"
+
 /* OPAL in-memory console. Defined in OPAL source at core/console.c */
 struct memcons {
        __be64 magic;
index 1aa51c4fa904569a1a3106143af28b673326e81e..11df4e16a1cc3b800780d8c9ef9dbb92e8113cdd 100644 (file)
@@ -2,6 +2,13 @@
 #ifndef _POWERNV_H
 #define _POWERNV_H
 
+/*
+ * There's various hacks scattered throughout the generic powerpc arch code
+ * that needs to call into powernv platform stuff. The prototypes for those
+ * functions are in asm/powernv.h
+ */
+#include <asm/powernv.h>
+
 #ifdef CONFIG_SMP
 extern void pnv_smp_init(void);
 #else