Commit 407454ca authored by Nick Child's avatar Nick Child Committed by Michael Ellerman

powerpc/85xx: Add __init attribute to eligible functions

Some functions defined in 'arch/powerpc/platforms/85xx' 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: default avatarNick Child <nick.child@ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211216220035.605465-19-nick.child@ibm.com
parent f4a88b0e
...@@ -78,7 +78,7 @@ void __init ge_imp3a_pic_init(void) ...@@ -78,7 +78,7 @@ void __init ge_imp3a_pic_init(void)
of_node_put(cascade_node); of_node_put(cascade_node);
} }
static void ge_imp3a_pci_assign_primary(void) static void __init ge_imp3a_pci_assign_primary(void)
{ {
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
struct device_node *np; struct device_node *np;
......
...@@ -282,7 +282,7 @@ machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach); ...@@ -282,7 +282,7 @@ machine_device_initcall(mpc85xx_cds, mpc85xx_cds_8259_attach);
#endif /* CONFIG_PPC_I8259 */ #endif /* CONFIG_PPC_I8259 */
static void mpc85xx_cds_pci_assign_primary(void) static void __init mpc85xx_cds_pci_assign_primary(void)
{ {
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
struct device_node *np; struct device_node *np;
......
...@@ -271,7 +271,7 @@ static const struct irq_domain_ops socrates_fpga_pic_host_ops = { ...@@ -271,7 +271,7 @@ static const struct irq_domain_ops socrates_fpga_pic_host_ops = {
.xlate = socrates_fpga_pic_host_xlate, .xlate = socrates_fpga_pic_host_xlate,
}; };
void socrates_fpga_pic_init(struct device_node *pic) void __init socrates_fpga_pic_init(struct device_node *pic)
{ {
unsigned long flags; unsigned long flags;
int i; int i;
......
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
#ifndef SOCRATES_FPGA_PIC_H #ifndef SOCRATES_FPGA_PIC_H
#define SOCRATES_FPGA_PIC_H #define SOCRATES_FPGA_PIC_H
void socrates_fpga_pic_init(struct device_node *pic); void __init socrates_fpga_pic_init(struct device_node *pic);
#endif #endif
...@@ -45,7 +45,7 @@ void __init xes_mpc85xx_pic_init(void) ...@@ -45,7 +45,7 @@ void __init xes_mpc85xx_pic_init(void)
mpic_init(mpic); mpic_init(mpic);
} }
static void xes_mpc85xx_configure_l2(void __iomem *l2_base) static void __init xes_mpc85xx_configure_l2(void __iomem *l2_base)
{ {
volatile uint32_t ctl, tmp; volatile uint32_t ctl, tmp;
...@@ -72,7 +72,7 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base) ...@@ -72,7 +72,7 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
asm volatile("msync; isync"); asm volatile("msync; isync");
} }
static void xes_mpc85xx_fixups(void) static void __init xes_mpc85xx_fixups(void)
{ {
struct device_node *np; struct device_node *np;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment