From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: [RFC PATCH v1 06/11] powerpc/machdep: Add helpers to use ppc_md. functions
Date: Fri, 3 Sep 2021 11:18:41 +0000 (UTC) [thread overview]
Message-ID: <43ccebf0893885450083075ec985bac89d88532e.1630667612.git.christophe.leroy@csgroup.eu> (raw)
In-Reply-To: <cover.1630667612.git.christophe.leroy@csgroup.eu>
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@csgroup.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
next prev parent reply other threads:[~2021-09-03 11:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 11:18 [RFC PATCH v1 00/11] powerpc/machdep: Remove dust and convert to static calls Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 01/11] powerpc/time: Remove generic_suspend_{dis/en}able_irqs() Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 02/11] powerpc/machdep: Remove stale functions from ppc_md structure Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 03/11] powerpc/machdep: Remove CONFIG_PPC_HAS_FEATURE_CALLS Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 04/11] powerpc/machdep: Make probe_machine() static Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 05/11] powerpc/machdep: Move sys_ctrler_t definition into pmac.h Christophe Leroy
2022-02-07 11:18 ` Michael Ellerman
2021-09-03 11:18 ` Christophe Leroy [this message]
2021-09-03 11:18 ` [RFC PATCH v1 07/11] powerpc/mpc86xx_hpcn: Remove obsolete statement Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 08/11] powerpc/corenet: Change criteria to set MPIC_ENABLE_COREINT Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 09/11] powerpc/platforms: Use ppc_md. helpers Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 10/11] powerpc/platforms: Use ppc_md_update() instead of define_machine() Christophe Leroy
2021-09-03 11:18 ` [RFC PATCH v1 11/11] powerpc/machdep: Convert ppc_md to static calls Christophe Leroy
2022-02-16 12:25 ` [RFC PATCH v1 00/11] powerpc/machdep: Remove dust and convert " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43ccebf0893885450083075ec985bac89d88532e.1630667612.git.christophe.leroy@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).