summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/setup.h
diff options
context:
space:
mode:
authorNick Child <nick.child@ibm.com>2021-12-16 17:00:16 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2021-12-23 22:33:10 +1100
commitd276960d9296b6a9074795fe60a513abf8474e35 (patch)
treead78d75bcbe616149886648a4312accce6eb2637 /arch/powerpc/include/asm/setup.h
parenta8968521cfdc3e339fe69473d6632e0aa8d7202a (diff)
powerpc/kernel: Add __init attribute to eligible functions
Some functions defined in `arch/powerpc/kernel` (and one in `arch/powerpc/ kexec`) are deserving of an `__init` macro attribute. These functions are only called by other initialization functions and therefore should inherit the attribute. Also, change function declarations in header files to include `__init`. Signed-off-by: Nick Child <nick.child@ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211216220035.605465-2-nick.child@ibm.com
Diffstat (limited to 'arch/powerpc/include/asm/setup.h')
-rw-r--r--arch/powerpc/include/asm/setup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index 6c1a7d217d1a..cff58db6130f 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/asm/setup.h
@@ -55,7 +55,7 @@ void setup_entry_flush(bool enable);
void setup_uaccess_flush(bool enable);
void do_rfi_flush_fixups(enum l1d_flush_type types);
#ifdef CONFIG_PPC_BARRIER_NOSPEC
-void setup_barrier_nospec(void);
+void __init setup_barrier_nospec(void);
#else
static inline void setup_barrier_nospec(void) { }
#endif
@@ -71,7 +71,7 @@ static inline void do_barrier_nospec_fixups_range(bool enable, void *start, void
#endif
#ifdef CONFIG_PPC_FSL_BOOK3E
-void setup_spectre_v2(void);
+void __init setup_spectre_v2(void);
#else
static inline void setup_spectre_v2(void) {}
#endif