Commit e14ff96d authored by Nick Child's avatar Nick Child Committed by Michael Ellerman
Browse files

powerpc/pseries: Add __init attribute to eligible functions



Some functions defined in 'arch/powerpc/platforms/pseries' 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-13-nick.child@ibm.com
parent e5913db1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ static inline void setup_initial_memory_limit(phys_addr_t first_memblock_base,
}

#ifdef CONFIG_PPC_PSERIES
extern void radix_init_pseries(void);
void __init radix_init_pseries(void);
#else
static inline void radix_init_pseries(void) { }
#endif
+1 −1
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ extern void iommu_unmap_page(struct iommu_table *tbl, dma_addr_t dma_handle,
			     size_t size, enum dma_data_direction direction,
			     unsigned long attrs);

extern void iommu_init_early_pSeries(void);
void __init iommu_init_early_pSeries(void);
extern void iommu_init_early_dart(struct pci_controller_ops *controller_ops);
extern void iommu_init_early_pasemi(void);

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ void setup_panic(void);
extern bool pseries_enable_reloc_on_exc(void);
extern void pseries_disable_reloc_on_exc(void);
extern void pseries_big_endian_exceptions(void);
extern void pseries_little_endian_exceptions(void);
void __init pseries_little_endian_exceptions(void);
#else
static inline bool pseries_enable_reloc_on_exc(void) { return false; }
static inline void pseries_disable_reloc_on_exc(void) {}
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

#include "pseries.h"

void request_event_sources_irqs(struct device_node *np,
void __init request_event_sources_irqs(struct device_node *np,
				irq_handler_t handler,
				const char *name)
{
+1 −1
Original line number Diff line number Diff line
@@ -1654,7 +1654,7 @@ static struct notifier_block iommu_reconfig_nb = {
};

/* These are called very early. */
void iommu_init_early_pSeries(void)
void __init iommu_init_early_pSeries(void)
{
	if (of_chosen && of_get_property(of_chosen, "linux,iommu-off", NULL))
		return;
Loading