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: Nick Child <nick.child@ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211216220035.605465-13-nick.child@ibm.com
This commit is contained in:
parent
e5913db1ef
commit
e14ff96d08
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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) {}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -714,7 +714,7 @@ void vpa_init(int cpu)
|
||||
|
||||
#ifdef CONFIG_PPC_BOOK3S_64
|
||||
|
||||
static int pseries_lpar_register_process_table(unsigned long base,
|
||||
static int __init pseries_lpar_register_process_table(unsigned long base,
|
||||
unsigned long page_size, unsigned long table_size)
|
||||
{
|
||||
long rc;
|
||||
@ -1737,7 +1737,7 @@ void __init hpte_init_pseries(void)
|
||||
#endif /* CONFIG_PPC_64S_HASH_MMU */
|
||||
|
||||
#ifdef CONFIG_PPC_RADIX_MMU
|
||||
void radix_init_pseries(void)
|
||||
void __init radix_init_pseries(void)
|
||||
{
|
||||
pr_info("Using radix MMU under hypervisor\n");
|
||||
|
||||
@ -1938,7 +1938,7 @@ int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PPC_64S_HASH_MMU
|
||||
static unsigned long vsid_unscramble(unsigned long vsid, int ssize)
|
||||
static unsigned long __init vsid_unscramble(unsigned long vsid, int ssize)
|
||||
{
|
||||
unsigned long protovsid;
|
||||
unsigned long va_bits = VA_BITS;
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
struct device_node;
|
||||
|
||||
extern 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);
|
||||
|
||||
#include <linux/of.h>
|
||||
|
@ -39,7 +39,7 @@ static void rtas_fadump_update_config(struct fw_dump *fadump_conf,
|
||||
* This function is called in the capture kernel to get configuration details
|
||||
* setup in the first kernel and passed to the f/w.
|
||||
*/
|
||||
static void rtas_fadump_get_config(struct fw_dump *fadump_conf,
|
||||
static void __init rtas_fadump_get_config(struct fw_dump *fadump_conf,
|
||||
const struct rtas_fadump_mem_struct *fdm)
|
||||
{
|
||||
fadump_conf->boot_mem_addr[0] =
|
||||
@ -247,7 +247,7 @@ static inline int rtas_fadump_gpr_index(u64 id)
|
||||
return i;
|
||||
}
|
||||
|
||||
static void rtas_fadump_set_regval(struct pt_regs *regs, u64 reg_id, u64 reg_val)
|
||||
static void __init rtas_fadump_set_regval(struct pt_regs *regs, u64 reg_id, u64 reg_val)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -272,7 +272,7 @@ static void rtas_fadump_set_regval(struct pt_regs *regs, u64 reg_id, u64 reg_val
|
||||
regs->dsisr = (unsigned long)reg_val;
|
||||
}
|
||||
|
||||
static struct rtas_fadump_reg_entry*
|
||||
static struct rtas_fadump_reg_entry* __init
|
||||
rtas_fadump_read_regs(struct rtas_fadump_reg_entry *reg_entry,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
|
@ -447,7 +447,7 @@ void pseries_big_endian_exceptions(void)
|
||||
panic("Could not enable big endian exceptions");
|
||||
}
|
||||
|
||||
void pseries_little_endian_exceptions(void)
|
||||
void __init pseries_little_endian_exceptions(void)
|
||||
{
|
||||
long rc;
|
||||
|
||||
@ -907,7 +907,7 @@ void pSeries_coalesce_init(void)
|
||||
* fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions,
|
||||
* handle that here. (Stolen from parse_system_parameter_string)
|
||||
*/
|
||||
static void pSeries_cmo_feature_init(void)
|
||||
static void __init pSeries_cmo_feature_init(void)
|
||||
{
|
||||
char *ptr, *key, *value, *end;
|
||||
int call_status;
|
||||
|
@ -489,7 +489,7 @@ EXPORT_SYMBOL_GPL(vas_unregister_api_pseries);
|
||||
* Get the specific capabilities based on the feature type.
|
||||
* Right now supports GZIP default and GZIP QoS capabilities.
|
||||
*/
|
||||
static int get_vas_capabilities(u8 feat, enum vas_cop_feat_type type,
|
||||
static int __init get_vas_capabilities(u8 feat, enum vas_cop_feat_type type,
|
||||
struct hv_vas_cop_feat_caps *hv_caps)
|
||||
{
|
||||
struct vas_cop_feat_caps *caps;
|
||||
|
@ -1061,7 +1061,7 @@ static struct attribute *vio_bus_attrs[] = {
|
||||
};
|
||||
ATTRIBUTE_GROUPS(vio_bus);
|
||||
|
||||
static void vio_cmo_sysfs_init(void)
|
||||
static void __init vio_cmo_sysfs_init(void)
|
||||
{
|
||||
vio_bus_type.dev_groups = vio_cmo_dev_groups;
|
||||
vio_bus_type.bus_groups = vio_bus_groups;
|
||||
@ -1073,7 +1073,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev) { return 0; }
|
||||
static void vio_cmo_bus_remove(struct vio_dev *viodev) {}
|
||||
static void vio_cmo_set_dma_ops(struct vio_dev *viodev) {}
|
||||
static void vio_cmo_bus_init(void) {}
|
||||
static void vio_cmo_sysfs_init(void) { }
|
||||
static void __init vio_cmo_sysfs_init(void) { }
|
||||
#endif /* CONFIG_PPC_SMLPAR */
|
||||
EXPORT_SYMBOL(vio_cmo_entitlement_update);
|
||||
EXPORT_SYMBOL(vio_cmo_set_dev_desired);
|
||||
@ -1479,7 +1479,7 @@ EXPORT_SYMBOL(vio_register_device_node);
|
||||
* Starting from the root node provide, register the device node for
|
||||
* each child beneath the root.
|
||||
*/
|
||||
static void vio_bus_scan_register_devices(char *root_name)
|
||||
static void __init vio_bus_scan_register_devices(char *root_name)
|
||||
{
|
||||
struct device_node *node_root, *node_child;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user