From 31f393cf2e12c9ee00532fccc48ee9ed18684dc7 Mon Sep 17 00:00:00 2001 From: goumin Date: Fri, 22 Nov 2024 17:54:08 +0800 Subject: [PATCH] Revert "Linux:To speed up the startup process by setting some modules to start in parallel." This reverts commit eb84064e14e8261be1aecc0b5bf77b5728902c31. Change-Id: I2ea6ea2e58de54142882324e44efa90d1c9ee639 --- drivers/dma/adma-spacemit.c | 6 ------ drivers/gpu/drm/spacemit/spacemit_hdmi.c | 5 ++--- drivers/i2c/busses/i2c-k1x.c | 6 ------ .../spacemit/camera/cam_ccic/ccic_drv.c | 3 --- drivers/mmc/host/sdhci-of-k1x.c | 3 --- drivers/pci/controller/dwc/pcie-k1x.c | 10 --------- drivers/remoteproc/k1x-rproc.c | 3 --- drivers/tty/serial/pxa_k1x.c | 3 --- init/Kconfig | 7 ------- lib/raid6/algos.c | 21 +------------------ net/ipv4/af_inet.c | 17 --------------- sound/soc/spacemit/spacemit-snd-pcm-dma.c | 3 --- 12 files changed, 3 insertions(+), 84 deletions(-) diff --git a/drivers/dma/adma-spacemit.c b/drivers/dma/adma-spacemit.c index ac55a0df1b08..1cf54992f232 100644 --- a/drivers/dma/adma-spacemit.c +++ b/drivers/dma/adma-spacemit.c @@ -610,9 +610,6 @@ static struct platform_driver adma_driver = { .driver = { .name = "k1x-adma", .of_match_table = adma_id_table, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_FORCE_SYNCHRONOUS, -#endif }, .probe = adma_probe, .remove = adma_remove, @@ -691,9 +688,6 @@ static void rpmsg_adma_client_remove(struct rpmsg_device *rpdev) static struct rpmsg_driver rpmsg_adma_client = { .drv.name = KBUILD_MODNAME, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .drv.probe_type = PROBE_FORCE_SYNCHRONOUS, -#endif .id_table = rpmsg_driver_adma_id_table, .probe = rpmsg_adma_client_probe, .callback = rpmsg_adma_client_cb, diff --git a/drivers/gpu/drm/spacemit/spacemit_hdmi.c b/drivers/gpu/drm/spacemit/spacemit_hdmi.c index f14904f079be..7531fe51cb45 100644 --- a/drivers/gpu/drm/spacemit/spacemit_hdmi.c +++ b/drivers/gpu/drm/spacemit/spacemit_hdmi.c @@ -1095,12 +1095,11 @@ struct platform_driver spacemit_hdmi_driver = { .name = "spacemit-hdmi-drv", .of_match_table = spacemit_hdmi_dt_ids, .pm = &hdmi_pm_ops, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, }; +// module_platform_driver(spacemit_hdmi_driver); + static int spacemit_hdmi_driver_init(void) { return platform_driver_register(&spacemit_hdmi_driver); diff --git a/drivers/i2c/busses/i2c-k1x.c b/drivers/i2c/busses/i2c-k1x.c index 6a85118e2906..f1761704f182 100644 --- a/drivers/i2c/busses/i2c-k1x.c +++ b/drivers/i2c/busses/i2c-k1x.c @@ -2078,9 +2078,6 @@ static struct platform_driver spacemit_i2c_driver = { .name = "i2c-spacemit-k1x", /* .pm = &spacemit_i2c_pm_ops, */ .of_match_table = spacemit_i2c_dt_match, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, }; @@ -2121,9 +2118,6 @@ static struct platform_driver r_spacemit_i2c_driver = { .name = "ri2c-spacemit-k1x", /* .pm = &spacemit_i2c_pm_ops, */ .of_match_table = r_spacemit_i2c_dt_match, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, }; diff --git a/drivers/media/platform/spacemit/camera/cam_ccic/ccic_drv.c b/drivers/media/platform/spacemit/camera/cam_ccic/ccic_drv.c index b6efdd34659e..2bcaa1a9f834 100644 --- a/drivers/media/platform/spacemit/camera/cam_ccic/ccic_drv.c +++ b/drivers/media/platform/spacemit/camera/cam_ccic/ccic_drv.c @@ -1264,9 +1264,6 @@ struct platform_driver k1x_ccic_driver = { .driver = { .name = K1X_CCIC_DRV_NAME, .of_match_table = of_match_ptr(k1x_ccic_dt_match), -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, .probe = k1x_ccic_probe, .remove = k1x_ccic_remove, diff --git a/drivers/mmc/host/sdhci-of-k1x.c b/drivers/mmc/host/sdhci-of-k1x.c index 604c6599d027..1c91e1a73431 100644 --- a/drivers/mmc/host/sdhci-of-k1x.c +++ b/drivers/mmc/host/sdhci-of-k1x.c @@ -1896,9 +1896,6 @@ static struct platform_driver spacemit_sdhci_driver = { .name = "sdhci-spacemit", .of_match_table = of_match_ptr(sdhci_spacemit_of_match), .pm = SDHCI_SPACEMIT_PMOPS, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, .probe = spacemit_sdhci_probe, .remove_new = spacemit_sdhci_remove, diff --git a/drivers/pci/controller/dwc/pcie-k1x.c b/drivers/pci/controller/dwc/pcie-k1x.c index e21284b66ba2..fe1281ad2629 100644 --- a/drivers/pci/controller/dwc/pcie-k1x.c +++ b/drivers/pci/controller/dwc/pcie-k1x.c @@ -1861,21 +1861,11 @@ static const struct dev_pm_ops k1x_pcie_pm_ops = { }; static struct platform_driver k1x_pcie_driver = { -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe = k1x_pcie_probe, -#endif .driver = { .name = "k1x-dwc-pcie", .of_match_table = of_k1x_pcie_match, .suppress_bind_attrs = true, .pm = &k1x_pcie_pm_ops, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, }; -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING -module_platform_driver(k1x_pcie_driver); -#else builtin_platform_driver_probe(k1x_pcie_driver, k1x_pcie_probe); -#endif diff --git a/drivers/remoteproc/k1x-rproc.c b/drivers/remoteproc/k1x-rproc.c index f363e7b84cb7..c878912c3f56 100644 --- a/drivers/remoteproc/k1x-rproc.c +++ b/drivers/remoteproc/k1x-rproc.c @@ -679,9 +679,6 @@ static struct platform_driver spacemit_rproc_driver = { .pm = &spacemit_rproc_pm_ops, #endif .of_match_table = spacemit_rproc_of_match, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_FORCE_SYNCHRONOUS, -#endif }, }; diff --git a/drivers/tty/serial/pxa_k1x.c b/drivers/tty/serial/pxa_k1x.c index f84b39260216..af1d2d0cad70 100644 --- a/drivers/tty/serial/pxa_k1x.c +++ b/drivers/tty/serial/pxa_k1x.c @@ -2369,9 +2369,6 @@ static struct platform_driver serial_pxa_driver = { #endif .suppress_bind_attrs = true, .of_match_table = serial_pxa_dt_ids, -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_PREFER_ASYNCHRONOUS, -#endif }, }; diff --git a/init/Kconfig b/init/Kconfig index a12dfb072267..6054ba684c53 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1469,13 +1469,6 @@ menuconfig EXPERT environments which can tolerate a "non-standard" kernel. Only use this if you really know what you are doing. -config SPACEMIT_PARALLEL_BOOTING - bool "Enable SPACEMIT parallel booting of kernel modules" if EXPERT - default n - help - Enable parallel booting of kernel modules under SPACEMIT to improve boot speed. - Enabling this option may cause boot deadlocks in certain conditions. - config UID16 bool "Enable 16-bit UID system calls" if EXPERT depends on HAVE_UID16 && MULTIUSER diff --git a/lib/raid6/algos.c b/lib/raid6/algos.c index 270e16fcdd12..0ec534faf019 100644 --- a/lib/raid6/algos.c +++ b/lib/raid6/algos.c @@ -22,11 +22,7 @@ const char raid6_empty_zero_page[PAGE_SIZE] __attribute__((aligned(256))); EXPORT_SYMBOL(raid6_empty_zero_page); #endif -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING -#include -#include -#include -#endif + struct raid6_calls raid6_call; EXPORT_SYMBOL_GPL(raid6_call); @@ -293,22 +289,7 @@ static void raid6_exit(void) do { } while (0); } -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING -static void raid6_select_algo_wrapper(void *data, long long unsigned int arg) -{ - raid6_select_algo(); -} - -static int __init raid6_select_algo_async_init(void) -{ - async_schedule(raid6_select_algo_wrapper, NULL); - return 0; -} - -subsys_initcall(raid6_select_algo_async_init); -#else subsys_initcall(raid6_select_algo); -#endif module_exit(raid6_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("RAID6 Q-syndrome calculations"); diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index dee3e96da9d1..3feff7f738a4 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -121,9 +121,6 @@ #include #include -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING -#include -#endif /* The inetsw table contains everything that inet_create needs to * build a new socket. @@ -2083,21 +2080,7 @@ out_unregister_tcp_proto: goto out; } -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING -static void __init inet_init_async(void *data, async_cookie_t cookie) -{ - inet_init(); -} - -static int __init inet_async_init(void) -{ - async_schedule(inet_init_async, NULL); - return 0; -} -subsys_initcall(inet_async_init); -#else fs_initcall(inet_init); -#endif /* ------------------------------------------------------------------------ */ diff --git a/sound/soc/spacemit/spacemit-snd-pcm-dma.c b/sound/soc/spacemit/spacemit-snd-pcm-dma.c index 61c7a8d7ae3b..b3be4a60842f 100644 --- a/sound/soc/spacemit/spacemit-snd-pcm-dma.c +++ b/sound/soc/spacemit/spacemit-snd-pcm-dma.c @@ -1382,9 +1382,6 @@ static struct platform_driver spacemit_snd_dma_pdrv = { .driver = { .name = "spacemit-snd-dma", .of_match_table = of_match_ptr(spacemit_snd_dma_ids), -#ifdef CONFIG_SPACEMIT_PARALLEL_BOOTING - .probe_type = PROBE_FORCE_SYNCHRONOUS, -#endif }, .probe = spacemit_snd_dma_pdev_probe, .remove = spacemit_snd_dma_pdev_remove,