Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96e023e7 authored by Alistair Popple's avatar Alistair Popple Committed by Michael Ellerman
Browse files

powerpc/powernv: Reorder OPAL subsystem initialisation



Most of the OPAL subsystems are always compiled in for PowerNV and
many of them need to be initialised before or after other OPAL
subsystems. Rather than trying to control this ordering through
machine initcalls it is clearer and easier to control initialisation
order with explicit calls in opal_init.

Signed-off-by: default avatarAlistair Popple <alistair@popple.id.au>
Cc: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 5703d2f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -240,6 +240,9 @@ extern int opal_elog_init(void);
extern void opal_platform_dump_init(void);
extern void opal_sys_param_init(void);
extern void opal_msglog_init(void);
extern int opal_async_comp_init(void);
extern int opal_sensor_init(void);
extern int opal_hmi_handler_init(void);

extern int opal_machine_check(struct pt_regs *regs);
extern bool opal_mce_check_early_recovery(struct pt_regs *regs);
+1 −2
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ static struct notifier_block opal_async_comp_nb = {
		.priority	= 0,
};

static int __init opal_async_comp_init(void)
int __init opal_async_comp_init(void)
{
	struct device_node *opal_node;
	const __be32 *async;
@@ -205,4 +205,3 @@ static int __init opal_async_comp_init(void)
out:
	return err;
}
machine_subsys_initcall(powernv, opal_async_comp_init);
+1 −2
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ static struct notifier_block opal_hmi_handler_nb = {
	.priority	= 0,
};

static int __init opal_hmi_handler_init(void)
int __init opal_hmi_handler_init(void)
{
	int ret;

@@ -186,4 +186,3 @@ static int __init opal_hmi_handler_init(void)
	}
	return 0;
}
machine_subsys_initcall(powernv, opal_hmi_handler_init);
+1 −1
Original line number Diff line number Diff line
@@ -144,4 +144,4 @@ static int __init opal_mem_err_init(void)
	}
	return 0;
}
machine_subsys_initcall(powernv, opal_mem_err_init);
machine_device_initcall(powernv, opal_mem_err_init);
+1 −2
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data)
}
EXPORT_SYMBOL_GPL(opal_get_sensor_data);

static __init int opal_sensor_init(void)
int __init opal_sensor_init(void)
{
	struct platform_device *pdev;
	struct device_node *sensor;
@@ -93,4 +93,3 @@ static __init int opal_sensor_init(void)

	return PTR_ERR_OR_ZERO(pdev);
}
machine_subsys_initcall(powernv, opal_sensor_init);
Loading