Commit 7e3e12fd authored by Dongxu Sun's avatar Dongxu Sun
Browse files

mbigen: probe mbigen driver with arch_initcall

virt inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8URKX



--------------------------------

If we set kvm-arm.vtimer_irqbypass=1, we need to probe mbigen
driver before kvm_arm_init, since the vtimer mbigen regs should
be set before kvm_arm_init flush the value of vtimer_irqbypass.
Otherwise the regs of vtimer mbigen may not be set correctly,
and kvm will set vtimer_irqbypass=0.

Signed-off-by: default avatarDongxu Sun <sundongxu3@huawei.com>
parent db019283
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -897,7 +897,22 @@ static struct platform_driver mbigen_platform_driver = {
	.probe			= mbigen_device_probe,
};

#ifdef CONFIG_VIRT_VTIMER_IRQ_BYPASS
static int __init mbigen_init(void)
{
	return platform_driver_register(&mbigen_platform_driver);
}

static void __exit mbigen_exit(void)
{
	return platform_driver_unregister(&mbigen_platform_driver);
}

arch_initcall(mbigen_init);
module_exit(mbigen_exit);
#else
module_platform_driver(mbigen_platform_driver);
#endif

MODULE_AUTHOR("Jun Ma <majun258@huawei.com>");
MODULE_AUTHOR("Yun Wu <wuyun.wu@huawei.com>");