[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <43ccebf0893885450083075ec985bac89d88532e.1630667612.git.christophe.leroy@csgroup.eu>
Date: Fri, 3 Sep 2021 11:18:41 +0000 (UTC)
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>
Cc: linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: [RFC PATCH v1 06/11] powerpc/machdep: Add helpers to use ppc_md.
functions
As a preparation to converting ppc_md functions to static
calls, add helpers to play with ppc_md. functions.
Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
---
arch/powerpc/include/asm/machdep.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 9f31281095ab..51949ab0abfe 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -203,6 +203,11 @@ struct machdep_calls {
#endif
};
+#define ppc_md_call(func) ppc_md.func
+#define ppc_md_has(func) (ppc_md.func)
+#define ppc_md_call_cond(func) if (ppc_md_has(func)) ppc_md_call(func)
+#define ppc_md_update(func, f) ppc_md.func = f
+
extern void e500_idle(void);
extern void power4_idle(void);
extern void ppc6xx_idle(void);
--
2.25.0
Powered by blists - more mailing lists