mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-07 03:18:31 +00:00
powerpc/powermac: Add __init attribute to eligible functions
Some functions defined in 'arch/powerpc/platforms/powermac` 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-11-nick.child@ibm.com
This commit is contained in:
parent
e37e06af9b
commit
b346f57100
8 changed files with 11 additions and 11 deletions
|
@ -456,7 +456,7 @@ extern void smu_poll(void);
|
||||||
/*
|
/*
|
||||||
* Init routine, presence check....
|
* Init routine, presence check....
|
||||||
*/
|
*/
|
||||||
extern int smu_init(void);
|
int __init smu_init(void);
|
||||||
extern int smu_present(void);
|
extern int smu_present(void);
|
||||||
struct platform_device;
|
struct platform_device;
|
||||||
extern struct platform_device *smu_get_ofdev(void);
|
extern struct platform_device *smu_get_ofdev(void);
|
||||||
|
|
|
@ -30,7 +30,7 @@ void __init udbg_uart_setup(unsigned int speed, unsigned int clock);
|
||||||
unsigned int __init udbg_probe_uart_speed(unsigned int clock);
|
unsigned int __init udbg_probe_uart_speed(unsigned int clock);
|
||||||
|
|
||||||
struct device_node;
|
struct device_node;
|
||||||
extern void udbg_scc_init(int force_scc);
|
void __init udbg_scc_init(int force_scc);
|
||||||
extern int udbg_adb_init(int force_btext);
|
extern int udbg_adb_init(int force_btext);
|
||||||
extern void udbg_adb_init_early(void);
|
extern void udbg_adb_init_early(void);
|
||||||
|
|
||||||
|
|
|
@ -1530,7 +1530,7 @@ static long g5_reset_cpu(struct device_node *node, long param, long value)
|
||||||
* This takes the second CPU off the bus on dual CPU machines
|
* This takes the second CPU off the bus on dual CPU machines
|
||||||
* running UP
|
* running UP
|
||||||
*/
|
*/
|
||||||
void g5_phy_disable_cpu1(void)
|
void __init g5_phy_disable_cpu1(void)
|
||||||
{
|
{
|
||||||
if (uninorth_maj == 3)
|
if (uninorth_maj == 3)
|
||||||
UN_OUT(U3_API_PHY_CONFIG_1, 0);
|
UN_OUT(U3_API_PHY_CONFIG_1, 0);
|
||||||
|
|
|
@ -258,7 +258,7 @@ static u32 core99_calc_adler(u8 *buffer)
|
||||||
return (high << 16) | low;
|
return (high << 16) | low;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 core99_check(u8* datas)
|
static u32 __init core99_check(u8 *datas)
|
||||||
{
|
{
|
||||||
struct core99_header* hdr99 = (struct core99_header*)datas;
|
struct core99_header* hdr99 = (struct core99_header*)datas;
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ static struct pmf_handlers macio_gpio_handlers = {
|
||||||
.delay = macio_do_delay,
|
.delay = macio_do_delay,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void macio_gpio_init_one(struct macio_chip *macio)
|
static void __init macio_gpio_init_one(struct macio_chip *macio)
|
||||||
{
|
{
|
||||||
struct device_node *gparent, *gp;
|
struct device_node *gparent, *gp;
|
||||||
|
|
||||||
|
@ -265,7 +265,7 @@ static struct pmf_handlers macio_mmio_handlers = {
|
||||||
.delay = macio_do_delay,
|
.delay = macio_do_delay,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void macio_mmio_init_one(struct macio_chip *macio)
|
static void __init macio_mmio_init_one(struct macio_chip *macio)
|
||||||
{
|
{
|
||||||
DBG("Installing MMIO functions for macio %pOF\n",
|
DBG("Installing MMIO functions for macio %pOF\n",
|
||||||
macio->of_node);
|
macio->of_node);
|
||||||
|
@ -294,7 +294,7 @@ static struct pmf_handlers unin_mmio_handlers = {
|
||||||
.delay = macio_do_delay,
|
.delay = macio_do_delay,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void uninorth_install_pfunc(void)
|
static void __init uninorth_install_pfunc(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ int find_via_pmu(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_PMAC_SMU
|
#ifndef CONFIG_PMAC_SMU
|
||||||
int smu_init(void)
|
int __init smu_init(void)
|
||||||
{
|
{
|
||||||
/* should check and warn if SMU is present */
|
/* should check and warn if SMU is present */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -186,7 +186,7 @@ static const struct irq_domain_ops psurge_host_ops = {
|
||||||
.map = psurge_host_map,
|
.map = psurge_host_map,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int psurge_secondary_ipi_init(void)
|
static int __init psurge_secondary_ipi_init(void)
|
||||||
{
|
{
|
||||||
int rc = -ENOMEM;
|
int rc = -ENOMEM;
|
||||||
|
|
||||||
|
@ -875,7 +875,7 @@ static int smp_core99_cpu_online(unsigned int cpu)
|
||||||
|
|
||||||
static void __init smp_core99_bringup_done(void)
|
static void __init smp_core99_bringup_done(void)
|
||||||
{
|
{
|
||||||
extern void g5_phy_disable_cpu1(void);
|
extern void __init g5_phy_disable_cpu1(void);
|
||||||
|
|
||||||
/* Close i2c bus if it was used for tb sync */
|
/* Close i2c bus if it was used for tb sync */
|
||||||
if (pmac_tb_clock_chip_host)
|
if (pmac_tb_clock_chip_host)
|
||||||
|
|
|
@ -62,7 +62,7 @@ static unsigned char scc_inittab[] = {
|
||||||
3, 0xc1, /* rx enable, 8 bits */
|
3, 0xc1, /* rx enable, 8 bits */
|
||||||
};
|
};
|
||||||
|
|
||||||
void udbg_scc_init(int force_scc)
|
void __init udbg_scc_init(int force_scc)
|
||||||
{
|
{
|
||||||
const u32 *reg;
|
const u32 *reg;
|
||||||
unsigned long addr;
|
unsigned long addr;
|
||||||
|
|
Loading…
Reference in a new issue