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

Commit b14726c5 authored by Michael Ellerman's avatar Michael Ellerman Committed by Benjamin Herrenschmidt
Browse files

powerpc/powernv: Switch powernv drivers to use machine_xxx_initcall()



A lot of the code in platforms/powernv is using non-machine initcalls.
That means if a kernel built with powernv support runs on another
platform, for example pseries, the initcalls will still run.

That is usually OK, because the initcalls will check for something in
the device tree or elsewhere before doing anything, so on other
platforms they will usually just return.

But it's fishy for powernv code to be running on other platforms, so
switch them all to be machine initcalls. If we want any of them to run
on other platforms in future they should move to sysdev.

Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 8d3c941e
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -398,9 +398,6 @@ static int __init eeh_powernv_init(void)
{
	int ret = -EINVAL;

	if (!machine_is(powernv))
		return ret;

	ret = eeh_ops_register(&powernv_eeh_ops);
	if (!ret)
		pr_info("EEH: PowerNV platform initialized\n");
@@ -409,5 +406,4 @@ static int __init eeh_powernv_init(void)

	return ret;
}

early_initcall(eeh_powernv_init);
machine_early_initcall(powernv, eeh_powernv_init);
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/wait.h>
#include <linux/gfp.h>
#include <linux/of.h>
#include <asm/machdep.h>
#include <asm/opal.h>

#define N_ASYNC_COMPLETIONS	64
@@ -201,4 +202,4 @@ out_opal_node:
out:
	return err;
}
subsys_initcall(opal_async_comp_init);
machine_subsys_initcall(powernv, opal_async_comp_init);
+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ static int opal_lpc_init_debugfs(void)
	rc |= opal_lpc_debugfs_create_type(root, "fw", OPAL_LPC_FW);
	return rc;
}
device_initcall(opal_lpc_init_debugfs);
machine_device_initcall(powernv, opal_lpc_init_debugfs);
#endif  /* CONFIG_DEBUG_FS */

void opal_lpc_init(void)
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/mm.h>
#include <linux/slab.h>

#include <asm/machdep.h>
#include <asm/opal.h>
#include <asm/cputable.h>

@@ -143,4 +144,4 @@ static int __init opal_mem_err_init(void)
	}
	return 0;
}
subsys_initcall(opal_mem_err_init);
machine_subsys_initcall(powernv, opal_mem_err_init);
+1 −1
Original line number Diff line number Diff line
@@ -130,4 +130,4 @@ static int opal_xscom_init(void)
		scom_init(&opal_scom_controller);
	return 0;
}
arch_initcall(opal_xscom_init);
machine_arch_initcall(powernv, opal_xscom_init);
Loading