diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 08d453d43456..f095885e5305 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5067,9 +5067,4 @@ eipv6= [KNL] Sets ipv6 address at boot up for early ethernet. - ermac= [KNL] Sets mac address at boot up for early ethernet. - - early_userspace [KNL] - Enable early userspace feature where we adjust the - normal booting sequence and get rootfs mounted and - other subsystems ready much earlier. + ermac= [KNL] Sets mac address at boot up for early ethernet. \ No newline at end of file diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,early-devices.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,early-devices.txt deleted file mode 100644 index 50e1a8dca74b..000000000000 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,early-devices.txt +++ /dev/null @@ -1,35 +0,0 @@ -* early-devices - -Some initcall stage takes long time to finish and it's better we launch some -of our userspace applications earlier before these initcalls. This way, the -userspace applications we care after system booting can start to work earlier -and provide better user experience. -To achieve this, we need to populate and probe some platform devices earlier -(thus its name early-devices) since these devices are commonly needed by all -other subsystems. Usually this list of devices includes clock, regulator, -bus components, iommu, crypto device, etc. and it's soc related(depends on -how these devices are connected in hardware in specific soc). - -Required properties: -- compatible: - Usage: required for early-devices - Value type: - Definition: must be "qcom,early-devices" -- devices: - Usage: required - Value type: - Definition: nodes handle for early devices. - -Example: - early-devices { - compatible = "qcom,early-devices"; - devices = <&ufs_phy_gdsc &clock_rpmh &clock_gcc - &ad_hoc_bus &ufs_ice &ufsphy_mem - &ufshc_mem &apps_rsc &cmd_db - &ldoa10 &ldoc5 &ldoc8 - &smpa4 &tlmm &ldoa5 - &cxlvl &mxlvl &bps_gdsc - &ipe_0_gdsc &ipe_1_gdsc &ife_0_gdsc - &ife_1_gdsc &titan_top_gdsc &mvsc_gdsc - &mvs0_gdsc &mvs1_gdsc>; - }; diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index f0e62bd2dce9..1845a5affb44 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -219,7 +219,6 @@ SECTIONS INIT_DATA INIT_SETUP(16) INIT_CALLS - EARLY_INIT_CALLS CON_INITCALL SECURITY_INITCALL INIT_RAM_FS diff --git a/arch/arm64/boot/dts/qcom/sa8195p-regulator.dtsi b/arch/arm64/boot/dts/qcom/sa8195p-regulator.dtsi index ecd6a1968095..9d3ff0740904 100644 --- a/arch/arm64/boot/dts/qcom/sa8195p-regulator.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8195p-regulator.dtsi @@ -44,7 +44,7 @@ }; /* PM8195_1 S2 = VDDCX_MM supply */ - mmcxlvl: rpmh-regulator-mmcxlvl { + rpmh-regulator-mmcxlvl { compatible = "qcom,rpmh-arc-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "mmcx.lvl"; @@ -145,7 +145,7 @@ }; /* PM8195_1 S10 = VDD_MX supply */ - mxlvl: rpmh-regulator-mxlvl { + rpmh-regulator-mxlvl { compatible = "qcom,rpmh-arc-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "mx.lvl"; @@ -213,7 +213,7 @@ }; }; - ldoa5: rpmh-regulator-ldoa5 { + rpmh-regulator-ldoa5 { compatible = "qcom,rpmh-vrm-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "ldoa5"; @@ -252,7 +252,7 @@ }; }; - ldoa10: rpmh-regulator-ldoa10 { + rpmh-regulator-ldoa10 { compatible = "qcom,rpmh-vrm-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "ldoa10"; @@ -459,7 +459,7 @@ }; /* PM8195_2 S10 + S9 + S8 + S7 + S6 = VDD_GFX supply */ - gfxlvl: rpmh-regulator-gfxlvl { + rpmh-regulator-gfxlvl { compatible = "qcom,rpmh-arc-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "gfx.lvl"; @@ -495,7 +495,7 @@ }; }; - ldoc5: rpmh-regulator-ldoc5 { + rpmh-regulator-ldoc5 { compatible = "qcom,rpmh-vrm-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "ldoc5"; @@ -592,7 +592,7 @@ /* PM8195_3 S3 + S2 + S1 = VDD_CX supply */ - cxlvl: rpmh-regulator-cxlvl { + rpmh-regulator-cxlvl { compatible = "qcom,rpmh-arc-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "cx.lvl"; @@ -708,7 +708,7 @@ }; /* pm8195_3 L8 - LPI_CX supply */ - lcxlvl: rpmh-regulator-lcxlvl { + rpmh-regulator-lcxlvl { compatible = "qcom,rpmh-arc-regulator"; mboxes = <&apps_rsc 0>; qcom,resource-name = "lcx.lvl"; diff --git a/arch/arm64/boot/dts/qcom/sa8195p.dtsi b/arch/arm64/boot/dts/qcom/sa8195p.dtsi index eb96c63e19a0..3e31e5d48b2a 100644 --- a/arch/arm64/boot/dts/qcom/sa8195p.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8195p.dtsi @@ -774,28 +774,3 @@ }; }; }; - -&early_devices { - devices = <&qmp_aop &ufs_phy_gdsc &clock_rpmh &clock_gcc &ad_hoc_bus - &ufs_ice &ufsphy_mem &ufshc_mem &apps_rsc &cmd_db &ldoa10 &ldoc5 - &tlmm &ldoa5 &mxlvl &cxlvl &gfxlvl &bps_gdsc &ipe_0_gdsc - &ipe_1_gdsc &ife_0_gdsc &ife_1_gdsc &titan_top_gdsc &mvsc_gdsc - &mvs0_gdsc &mvs1_gdsc &qupv3_se4_i2c &qupv3_se10_i2c - &qupv3_se15_i2c &qupv3_se20_i2c &qupv3_2 &qupv3_1 &qupv3_0 - &qupv3_3 &clock_cpucc &clock_camcc &clock_aop &clock_dispcc - &clock_gpucc &clock_scc &clock_videocc &gmu &gfx_2_tbu - &apps_smmu &kgsl_smmu &anoc_1_tbu &anoc_2_tbu &mnoc_hf_1_tbu - &compute_dsp_0_tbu &mnoc_hf_0_tbu &compute_dsp_1_tbu &adsp_tbu - &mnoc_sf_0_tbu &gfx_0_tbu &gfx_1_tbu &emac_gdsc &anoc_pcie - &pcie_0_gdsc &pcie_1_gdsc &ufs_card_gdsc &usb30_prim_gdsc - &usb30_sec_gdsc &hlos1_vote_aggre_noc_mmu_audio_tbu_gdsc - &hlos1_vote_aggre_noc_mmu_tbu1_gdsc &tcsr_mutex &smem - &hlos1_vote_aggre_noc_mmu_tbu2_gdsc &pcie_2_gdsc &pcie_3_gdsc - &hlos1_vote_aggre_noc_mmu_pcie_tbu_gdsc &ufs_card_2_gdsc - &hlos1_vote_mmnoc_mmu_tbu_hf0_gdsc &usb30_mp_gdsc &ife_2_gdsc - &hlos1_vote_mmnoc_mmu_tbu_sf_gdsc &ife_3_gdsc &gfx_3_tbu - &hlos1_vote_mmnoc_mmu_tbu_hf1_gdsc &mmcxlvl &lcxlvl - &hlos1_vote_turing_mmu_tbu0_gdsc - &hlos1_vote_turing_mmu_tbu1_gdsc - &mdss_core_gdsc &gpu_cx_gdsc &gpu_gx_gdsc &npu_core_gdsc>; -}; diff --git a/arch/arm64/boot/dts/qcom/sdmshrike.dtsi b/arch/arm64/boot/dts/qcom/sdmshrike.dtsi index 483d60c8146b..a737a5321d4a 100644 --- a/arch/arm64/boot/dts/qcom/sdmshrike.dtsi +++ b/arch/arm64/boot/dts/qcom/sdmshrike.dtsi @@ -735,12 +735,6 @@ }; -&soc { - early_devices: early-devices { - compatible = "qcom,early-devices"; - }; -}; - #include "sdmshrike-gdsc.dtsi" #include "sdmshrike-sde-pll.dtsi" #include "sdmshrike-sde.dtsi" diff --git a/arch/arm64/crypto/sha2-ce-glue.c b/arch/arm64/crypto/sha2-ce-glue.c index da4844640a07..9141184d89e4 100644 --- a/arch/arm64/crypto/sha2-ce-glue.c +++ b/arch/arm64/crypto/sha2-ce-glue.c @@ -153,6 +153,5 @@ static void __exit sha2_ce_mod_fini(void) crypto_unregister_shashes(algs, ARRAY_SIZE(algs)); } -early_module_cpu_feature_match(SHA2, sha2_ce_mod_init, EARLY_SUBSYS_1, -EARLY_INIT_LEVEL4); +module_cpu_feature_match(SHA2, sha2_ce_mod_init); module_exit(sha2_ce_mod_fini); diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index f1bfe8e64adf..9844a4ae6196 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -174,7 +174,6 @@ SECTIONS INIT_DATA INIT_SETUP(16) INIT_CALLS - EARLY_INIT_CALLS CON_INITCALL SECURITY_INITCALL INIT_RAM_FS diff --git a/arch/um/include/asm/common.lds.S b/arch/um/include/asm/common.lds.S index aa244ad2a6a7..b30d73ca29d0 100644 --- a/arch/um/include/asm/common.lds.S +++ b/arch/um/include/asm/common.lds.S @@ -49,10 +49,6 @@ INIT_CALLS } - .early_initcall.init : { - EARLY_INIT_CALLS - } - .con_initcall.init : { CON_INITCALL } diff --git a/block/bio.c b/block/bio.c index 2b73d8b6c97f..0e9e16764586 100644 --- a/block/bio.c +++ b/block/bio.c @@ -2222,4 +2222,4 @@ static int __init init_bio(void) return 0; } -early_subsys_initcall(init_bio, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +subsys_initcall(init_bio); diff --git a/block/blk-ioc.c b/block/blk-ioc.c index 20d67f42a6d8..e56a480b6f92 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c @@ -445,4 +445,4 @@ static int __init blk_ioc_init(void) sizeof(struct io_context), 0, SLAB_PANIC, NULL); return 0; } -early_subsys_initcall(blk_ioc_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +subsys_initcall(blk_ioc_init); diff --git a/block/blk-settings.c b/block/blk-settings.c index 554a69c10390..e0a744921ed3 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -915,5 +915,4 @@ static int __init blk_settings_init(void) blk_max_pfn = max_pfn - 1; return 0; } -early_subsys_initcall(blk_settings_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL8); +subsys_initcall(blk_settings_init); diff --git a/block/blk-softirq.c b/block/blk-softirq.c index 13a9866434f4..01e2b353a2b9 100644 --- a/block/blk-softirq.c +++ b/block/blk-softirq.c @@ -178,5 +178,4 @@ static __init int blk_softirq_init(void) blk_softirq_cpu_dead); return 0; } -early_subsys_initcall(blk_softirq_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL8); +subsys_initcall(blk_softirq_init); diff --git a/block/bsg.c b/block/bsg.c index 715752a91979..ee1335c68de7 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1089,4 +1089,4 @@ MODULE_AUTHOR("Jens Axboe"); MODULE_DESCRIPTION(BSG_DESCRIPTION); MODULE_LICENSE("GPL"); -early_device_initcall(bsg_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +device_initcall(bsg_init); diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 0b502e99abc8..29e5345c44e5 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -4980,7 +4980,7 @@ static void __exit cfq_exit(void) kmem_cache_destroy(cfq_pool); } -early_module_init(cfq_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(cfq_init); module_exit(cfq_exit); MODULE_AUTHOR("Jens Axboe"); diff --git a/block/genhd.c b/block/genhd.c index de13dcf22636..7568c16b83d4 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1016,8 +1016,7 @@ static int __init genhd_device_init(void) return 0; } -early_subsys_initcall(genhd_device_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL8); +subsys_initcall(genhd_device_init); static ssize_t disk_range_show(struct device *dev, struct device_attribute *attr, char *buf) diff --git a/crypto/crc32c_generic.c b/crypto/crc32c_generic.c index 744f496bf97c..372320399622 100644 --- a/crypto/crc32c_generic.c +++ b/crypto/crc32c_generic.c @@ -165,7 +165,7 @@ static void __exit crc32c_mod_fini(void) crypto_unregister_shash(&alg); } -early_module_init(crc32c_mod_init, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +module_init(crc32c_mod_init); module_exit(crc32c_mod_fini); MODULE_AUTHOR("Clay Haapala "); diff --git a/drivers/base/dd.c b/drivers/base/dd.c index b33dac70510f..57c14a5df666 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -261,7 +261,6 @@ arch_initcall_sync(deferred_probe_initcall); subsys_initcall_sync(deferred_probe_initcall); fs_initcall_sync(deferred_probe_initcall); device_initcall_sync(deferred_probe_initcall); -early_init(deferred_probe_initcall, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL6); static int deferred_probe_enable_fn(void) { @@ -847,15 +846,13 @@ static int __driver_attach(struct device *dev, void *data) return ret; } /* ret > 0 means positive match */ - if (!(is_early_userspace && (dev->bus == &platform_bus_type)) - && lock_parent(dev)) /* Needed for USB */ + if (lock_parent(dev)) /* Needed for USB */ device_lock(dev->parent); device_lock(dev); if (!dev->driver) driver_probe_device(drv, dev); device_unlock(dev); - if (!(is_early_userspace && (dev->bus == &platform_bus_type)) - && lock_parent(dev)) + if (lock_parent(dev)) device_unlock(dev->parent); return 0; diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index cc7106631298..364181591f77 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -1852,6 +1852,5 @@ static void __exit firmware_class_exit(void) #endif } -early_fs_initcall(firmware_class_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL8); +fs_initcall(firmware_class_init); module_exit(firmware_class_exit); diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 8f5fd8f455d0..125404773646 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -959,4 +959,4 @@ static int __init chr_dev_init(void) return tty_init(); } -early_fs_initcall(chr_dev_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +fs_initcall(chr_dev_init); diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index bd7c3a7c3b77..7a4714aafcdc 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2010-2011 Canonical Ltd * Copyright (C) 2011-2012 Linaro Ltd - * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -27,7 +27,6 @@ #include #include #include -#include #include "clk.h" @@ -3460,22 +3459,6 @@ void clock_debug_print_enabled(bool print_parent) } EXPORT_SYMBOL_GPL(clock_debug_print_enabled); -static DECLARE_COMPLETION(clk_debug_init_start); - -static int __init clk_debug_init_sync_start(void) -{ - complete(&clk_debug_init_start); - return 0; -} -late_initcall(clk_debug_init_sync_start); - -static int __init clk_debug_init_wait_start(void) -{ - wait_for_completion(&clk_debug_init_start); - return 0; -} -early_init(clk_debug_init_wait_start, EARLY_SUBSYS_6, EARLY_INIT_LEVEL3); - /** * clk_debug_init - lazily populate the debugfs clk directory * @@ -3539,32 +3522,7 @@ static int __init clk_debug_init(void) return 0; } -early_late_initcall(clk_debug_init, EARLY_SUBSYS_6, EARLY_INIT_LEVEL3); - -static DECLARE_COMPLETION(clk_debug_init_end); -static bool is_clk_debug_sync; - -static int __init clk_debug_init_sync_end(void) -{ - complete(&clk_debug_init_end); - return 0; -} -early_init(clk_debug_init_sync_end, EARLY_SUBSYS_6, EARLY_INIT_LEVEL3); - -static int __init clk_debug_sync(char *p) -{ - is_clk_debug_sync = true; - return 0; -} -early_param("clk_debug_sync", clk_debug_sync); - -static int __init clk_debug_init_wait_end(void) -{ - if (is_early_userspace && is_clk_debug_sync) - wait_for_completion(&clk_debug_init_end); - return 0; -} -late_initcall(clk_debug_init_wait_end); +late_initcall(clk_debug_init); #else static inline int clk_debug_register(struct clk_core *core) { return 0; } static inline void clk_debug_reparent(struct clk_core *core, diff --git a/drivers/clk/qcom/camcc-sdmshrike.c b/drivers/clk/qcom/camcc-sdmshrike.c index 3a2248a36a10..55c9c1b9576c 100644 --- a/drivers/clk/qcom/camcc-sdmshrike.c +++ b/drivers/clk/qcom/camcc-sdmshrike.c @@ -3252,8 +3252,7 @@ static int __init cam_cc_sdmshrike_init(void) { return platform_driver_register(&cam_cc_sdmshrike_driver); } -early_subsys_initcall(cam_cc_sdmshrike_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(cam_cc_sdmshrike_init); static void __exit cam_cc_sdmshrike_exit(void) { diff --git a/drivers/clk/qcom/camcc-sm8150.c b/drivers/clk/qcom/camcc-sm8150.c index 861e6821f097..b44c1fe938a2 100644 --- a/drivers/clk/qcom/camcc-sm8150.c +++ b/drivers/clk/qcom/camcc-sm8150.c @@ -2578,8 +2578,7 @@ static int __init cam_cc_sm8150_init(void) { return platform_driver_register(&cam_cc_sm8150_driver); } -early_subsys_initcall(cam_cc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(cam_cc_sm8150_init); static void __exit cam_cc_sm8150_exit(void) { diff --git a/drivers/clk/qcom/clk-aop-qmp.c b/drivers/clk/qcom/clk-aop-qmp.c index 74d72eb34393..d8b54b841d38 100644 --- a/drivers/clk/qcom/clk-aop-qmp.c +++ b/drivers/clk/qcom/clk-aop-qmp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -351,5 +351,4 @@ static int __init aop_qmp_clk_init(void) { return platform_driver_register(&aop_qmp_clk_driver); } -early_subsys_initcall(aop_qmp_clk_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(aop_qmp_clk_init); diff --git a/drivers/clk/qcom/clk-cpu-osm.c b/drivers/clk/qcom/clk-cpu-osm.c index ed3fbb903dea..ef6cbe663ddf 100644 --- a/drivers/clk/qcom/clk-cpu-osm.c +++ b/drivers/clk/qcom/clk-cpu-osm.c @@ -1299,8 +1299,7 @@ static int __init clk_cpu_osm_init(void) { return platform_driver_register(&clk_cpu_osm_driver); } -early_subsys_initcall(clk_cpu_osm_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(clk_cpu_osm_init); static void __exit clk_cpu_osm_exit(void) { diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index e786ea6c78a3..b7e69b449d80 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -673,7 +673,7 @@ static int __init clk_rpmh_init(void) { return platform_driver_register(&clk_rpmh_driver); } -early_subsys_initcall(clk_rpmh_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL0); +subsys_initcall(clk_rpmh_init); static void __exit clk_rpmh_exit(void) { diff --git a/drivers/clk/qcom/dispcc-sm8150.c b/drivers/clk/qcom/dispcc-sm8150.c index 6faada4df9e8..5f8d9fca53b9 100644 --- a/drivers/clk/qcom/dispcc-sm8150.c +++ b/drivers/clk/qcom/dispcc-sm8150.c @@ -1793,8 +1793,7 @@ static int __init disp_cc_sm8150_init(void) { return platform_driver_register(&disp_cc_sm8150_driver); } -early_subsys_initcall(disp_cc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(disp_cc_sm8150_init); static void __exit disp_cc_sm8150_exit(void) { diff --git a/drivers/clk/qcom/gcc-sdmshrike.c b/drivers/clk/qcom/gcc-sdmshrike.c index e01add9e9142..ce6f1575a30b 100644 --- a/drivers/clk/qcom/gcc-sdmshrike.c +++ b/drivers/clk/qcom/gcc-sdmshrike.c @@ -5275,8 +5275,7 @@ static int __init gcc_sdmshrike_init(void) { return platform_driver_register(&gcc_sdmshrike_driver); } -early_subsys_initcall(gcc_sdmshrike_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL0); +subsys_initcall(gcc_sdmshrike_init); static void __exit gcc_sdmshrike_exit(void) { diff --git a/drivers/clk/qcom/gcc-sm8150.c b/drivers/clk/qcom/gcc-sm8150.c index 2082f53dfa4b..07ba723bcec0 100644 --- a/drivers/clk/qcom/gcc-sm8150.c +++ b/drivers/clk/qcom/gcc-sm8150.c @@ -4355,8 +4355,7 @@ static int __init gcc_sm8150_init(void) { return platform_driver_register(&gcc_sm8150_driver); } -early_subsys_initcall(gcc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL0); +subsys_initcall(gcc_sm8150_init); static void __exit gcc_sm8150_exit(void) { diff --git a/drivers/clk/qcom/gdsc-regulator.c b/drivers/clk/qcom/gdsc-regulator.c index 1ff0b7a2c292..f689661cfc3d 100644 --- a/drivers/clk/qcom/gdsc-regulator.c +++ b/drivers/clk/qcom/gdsc-regulator.c @@ -1072,7 +1072,7 @@ static int __init gdsc_init(void) { return platform_driver_register(&gdsc_driver); } -early_subsys_initcall(gdsc_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL0); +subsys_initcall(gdsc_init); static void __exit gdsc_exit(void) { diff --git a/drivers/clk/qcom/gpucc-sm8150.c b/drivers/clk/qcom/gpucc-sm8150.c index ddbb883ee215..181dc00ba68e 100644 --- a/drivers/clk/qcom/gpucc-sm8150.c +++ b/drivers/clk/qcom/gpucc-sm8150.c @@ -541,8 +541,7 @@ static int __init gpu_cc_sm8150_init(void) { return platform_driver_register(&gpu_cc_sm8150_driver); } -early_subsys_initcall(gpu_cc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(gpu_cc_sm8150_init); static void __exit gpu_cc_sm8150_exit(void) { diff --git a/drivers/clk/qcom/mdss/mdss-pll.c b/drivers/clk/qcom/mdss/mdss-pll.c index 5a19f8e1e4db..ffba32f83a5a 100644 --- a/drivers/clk/qcom/mdss/mdss-pll.c +++ b/drivers/clk/qcom/mdss/mdss-pll.c @@ -426,7 +426,7 @@ static int __init mdss_pll_driver_init(void) return rc; } -early_fs_initcall(mdss_pll_driver_init, EARLY_SUBSYS_2, EARLY_INIT_LEVEL2); +fs_initcall(mdss_pll_driver_init); static void __exit mdss_pll_driver_deinit(void) { diff --git a/drivers/clk/qcom/npucc-sm8150.c b/drivers/clk/qcom/npucc-sm8150.c index 6e4189c58ff6..6c947f04c669 100644 --- a/drivers/clk/qcom/npucc-sm8150.c +++ b/drivers/clk/qcom/npucc-sm8150.c @@ -822,8 +822,7 @@ static int __init npu_cc_sm8150_init(void) { return platform_driver_register(&npu_cc_sm8150_driver); } -early_subsys_initcall(npu_cc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(npu_cc_sm8150_init); static void __exit npu_cc_sm8150_exit(void) { diff --git a/drivers/clk/qcom/scc-sm8150.c b/drivers/clk/qcom/scc-sm8150.c index 09336d64ef62..bc7ea09c07db 100644 --- a/drivers/clk/qcom/scc-sm8150.c +++ b/drivers/clk/qcom/scc-sm8150.c @@ -732,8 +732,7 @@ static int __init scc_sm8150_init(void) { return platform_driver_register(&scc_sm8150_driver); } -early_subsys_initcall(scc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(scc_sm8150_init); static void __exit scc_sm8150_exit(void) { diff --git a/drivers/clk/qcom/videocc-sm8150.c b/drivers/clk/qcom/videocc-sm8150.c index b9ec8e1e7b72..f4845d0176f5 100644 --- a/drivers/clk/qcom/videocc-sm8150.c +++ b/drivers/clk/qcom/videocc-sm8150.c @@ -443,8 +443,7 @@ static int __init video_cc_sm8150_init(void) { return platform_driver_register(&video_cc_sm8150_driver); } -early_subsys_initcall(video_cc_sm8150_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL5); +subsys_initcall(video_cc_sm8150_init); static void __exit video_cc_sm8150_exit(void) { diff --git a/drivers/crypto/msm/ice.c b/drivers/crypto/msm/ice.c index 5c5840295c2f..90238a5299bc 100644 --- a/drivers/crypto/msm/ice.c +++ b/drivers/crypto/msm/ice.c @@ -1835,8 +1835,7 @@ static struct platform_driver qcom_ice_driver = { .probe_type = PROBE_FORCE_SYNCHRONOUS, }, }; -early_module_platform_driver(qcom_ice_driver, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL8); +module_platform_driver(qcom_ice_driver); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("QTI Inline Crypto Engine driver"); diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 4b32c511373e..cf000d78e8e9 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -1322,7 +1322,7 @@ static int __init devfreq_init(void) return 0; } -early_subsys_initcall(devfreq_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL7); +subsys_initcall(devfreq_init); /* * The following are helper functions for devfreq user device drivers with diff --git a/drivers/devfreq/devfreq_devbw.c b/drivers/devfreq/devfreq_devbw.c index fce7dc457c5e..497958024f19 100644 --- a/drivers/devfreq/devfreq_devbw.c +++ b/drivers/devfreq/devfreq_devbw.c @@ -295,7 +295,6 @@ static struct platform_driver devbw_driver = { }, }; -early_module_platform_driver(devbw_driver, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +module_platform_driver(devbw_driver); MODULE_DESCRIPTION("Device DDR bandwidth voting driver MSM SoCs"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/devfreq/governor_bw_vbif.c b/drivers/devfreq/governor_bw_vbif.c index f360a530d389..a19503e7662d 100644 --- a/drivers/devfreq/governor_bw_vbif.c +++ b/drivers/devfreq/governor_bw_vbif.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017, 2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -122,8 +122,7 @@ static int __init devfreq_vbif_init(void) { return devfreq_add_governor(&devfreq_vbif); } -early_subsys_initcall(devfreq_vbif_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +subsys_initcall(devfreq_vbif_init); static void __exit devfreq_vbif_exit(void) { diff --git a/drivers/devfreq/governor_gpubw_mon.c b/drivers/devfreq/governor_gpubw_mon.c index 5b80dc17cf08..e17cf0de19ef 100644 --- a/drivers/devfreq/governor_gpubw_mon.c +++ b/drivers/devfreq/governor_gpubw_mon.c @@ -257,8 +257,7 @@ static int __init devfreq_gpubw_init(void) { return devfreq_add_governor(&devfreq_gpubw); } -early_subsys_initcall(devfreq_gpubw_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +subsys_initcall(devfreq_gpubw_init); static void __exit devfreq_gpubw_exit(void) { diff --git a/drivers/devfreq/governor_msm_adreno_tz.c b/drivers/devfreq/governor_msm_adreno_tz.c index 1a87a3e68429..551823bf5d12 100644 --- a/drivers/devfreq/governor_msm_adreno_tz.c +++ b/drivers/devfreq/governor_msm_adreno_tz.c @@ -565,8 +565,7 @@ static int __init msm_adreno_tz_init(void) { return devfreq_add_governor(&msm_adreno_tz); } -early_subsys_initcall(msm_adreno_tz_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +subsys_initcall(msm_adreno_tz_init); static void __exit msm_adreno_tz_exit(void) { diff --git a/drivers/devfreq/governor_performance.c b/drivers/devfreq/governor_performance.c index 5ec3f5271ef6..c72f942f30a8 100644 --- a/drivers/devfreq/governor_performance.c +++ b/drivers/devfreq/governor_performance.c @@ -51,8 +51,7 @@ static int __init devfreq_performance_init(void) { return devfreq_add_governor(&devfreq_performance); } -early_subsys_initcall(devfreq_performance_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +subsys_initcall(devfreq_performance_init); static void __exit devfreq_performance_exit(void) { diff --git a/drivers/devfreq/governor_powersave.c b/drivers/devfreq/governor_powersave.c index aef154ebc856..0c6bed567e6d 100644 --- a/drivers/devfreq/governor_powersave.c +++ b/drivers/devfreq/governor_powersave.c @@ -48,8 +48,7 @@ static int __init devfreq_powersave_init(void) { return devfreq_add_governor(&devfreq_powersave); } -early_subsys_initcall(devfreq_powersave_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +subsys_initcall(devfreq_powersave_init); static void __exit devfreq_powersave_exit(void) { diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c index 79a9fa4ae535..2cbd87b7fbdb 100644 --- a/drivers/devfreq/governor_simpleondemand.c +++ b/drivers/devfreq/governor_simpleondemand.c @@ -148,8 +148,7 @@ static int __init devfreq_simple_ondemand_init(void) { return devfreq_add_governor(&devfreq_simple_ondemand); } -early_subsys_initcall(devfreq_simple_ondemand_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL7); +subsys_initcall(devfreq_simple_ondemand_init); static void __exit devfreq_simple_ondemand_exit(void) { diff --git a/drivers/gpu/drm/bridge/analogix-anx7625.c b/drivers/gpu/drm/bridge/analogix-anx7625.c index 49da83fd3efe..8a45ad58d3f9 100644 --- a/drivers/gpu/drm/bridge/analogix-anx7625.c +++ b/drivers/gpu/drm/bridge/analogix-anx7625.c @@ -1595,7 +1595,6 @@ static struct i2c_driver anx7625_driver = { .id_table = anx7625_id, }; -early_module_i2c_driver(anx7625_driver, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL3); +module_i2c_driver(anx7625_driver); MODULE_DESCRIPTION("anx7625 driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 33fbe536a398..11901e686d18 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -1004,5 +1004,5 @@ error: return ret; } -early_module_init(drm_core_init, EARLY_SUBSYS_2, EARLY_INIT_LEVEL4); +module_init(drm_core_init); module_exit(drm_core_exit); diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index e3655778a886..9ec73038b8c4 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -4115,7 +4115,7 @@ static void __exit kgsl_3d_exit(void) platform_driver_unregister(&kgsl_bus_platform_driver); } -early_module_init(kgsl_3d_init, EARLY_SUBSYS_2, EARLY_INIT_LEVEL4); +module_init(kgsl_3d_init); module_exit(kgsl_3d_exit); MODULE_DESCRIPTION("3D Graphics driver"); diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c index b13098158a17..f75e68e86d73 100644 --- a/drivers/gpu/msm/kgsl.c +++ b/drivers/gpu/msm/kgsl.c @@ -5212,7 +5212,7 @@ err: return result; } -early_module_init(kgsl_core_init, EARLY_SUBSYS_2, EARLY_INIT_LEVEL4); +module_init(kgsl_core_init); module_exit(kgsl_core_exit); MODULE_DESCRIPTION("MSM GPU driver"); diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index c439eedcc191..26d4978c6df5 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #define SE_I2C_TX_TRANS_LEN (0x26C) @@ -1119,10 +1118,7 @@ static struct platform_driver geni_i2c_driver = { }, }; -early_module_platform_driver_async(geni_i2c_driver, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL4); - -early_init(_geni_i2c_driver_init_sync, EARLY_SUBSYS_2, EARLY_INIT_LEVEL0); +module_platform_driver(geni_i2c_driver); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("platform:i2c_geni"); diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 60dc37642801..7b992db38021 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -472,8 +472,7 @@ static struct i2c_driver pca954x_driver = { .id_table = pca954x_id, }; -early_module_i2c_driver(pca954x_driver, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL3); +module_i2c_driver(pca954x_driver); MODULE_AUTHOR("Rodolfo Giometti "); MODULE_DESCRIPTION("PCA954x I2C mux/switch driver"); diff --git a/drivers/iio/imu/st_asm330lhh/st_asm330lhh_i2c.c b/drivers/iio/imu/st_asm330lhh/st_asm330lhh_i2c.c index a950147633b3..eb2bcc6ce739 100644 --- a/drivers/iio/imu/st_asm330lhh/st_asm330lhh_i2c.c +++ b/drivers/iio/imu/st_asm330lhh/st_asm330lhh_i2c.c @@ -106,7 +106,7 @@ static struct i2c_driver st_asm330lhh_driver = { .probe = st_asm330lhh_i2c_probe, .id_table = st_asm330lhh_i2c_id_table, }; -early_module_i2c_driver(st_asm330lhh_driver, EARLY_SUBSYS_6, EARLY_INIT_LEVEL2); +module_i2c_driver(st_asm330lhh_driver); MODULE_AUTHOR("Lorenzo Bianconi "); MODULE_DESCRIPTION("STMicroelectronics st_asm330lhh i2c driver"); diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index d8eb50e16eaf..01c7f73b7714 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -5414,7 +5414,7 @@ static void __exit arm_smmu_exit(void) return platform_driver_unregister(&arm_smmu_driver); } -early_subsys_initcall(arm_smmu_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL2); +subsys_initcall(arm_smmu_init); module_exit(arm_smmu_exit); static int __init arm_smmu_of_init(struct device_node *np) diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index f245fc6759a0..b2088e1f3e45 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -2033,7 +2033,7 @@ static void __exit dm_bufio_exit(void) BUG_ON(bug); } -early_module_init(dm_bufio_init, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +module_init(dm_bufio_init) module_exit(dm_bufio_exit) module_param_named(max_cache_size_bytes, dm_bufio_cache_size, ulong, S_IRUGO | S_IWUSR); diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c index aa91219324cb..23399c7131ee 100644 --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -1262,7 +1262,7 @@ static void __exit dm_verity_exit(void) dm_unregister_target(&verity_target); } -early_module_init(dm_verity_init, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +module_init(dm_verity_init); module_exit(dm_verity_exit); MODULE_AUTHOR("Mikulas Patocka "); diff --git a/drivers/md/dm.c b/drivers/md/dm.c index ca416e7f74e8..6e741f19a732 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -3013,7 +3013,7 @@ static const struct dax_operations dm_dax_ops = { /* * module hooks */ -early_module_init(dm_init, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +module_init(dm_init); module_exit(dm_exit); module_param(major, uint, 0); diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index cf0464fd9f19..423248f577b6 100644 --- a/drivers/media/media-devnode.c +++ b/drivers/media/media-devnode.c @@ -326,7 +326,7 @@ static void __exit media_devnode_exit(void) unregister_chrdev_region(media_dev_t, MEDIA_NUM_DEVICES); } -early_subsys_initcall(media_devnode_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL1); +subsys_initcall(media_devnode_init); module_exit(media_devnode_exit) MODULE_AUTHOR("Laurent Pinchart "); diff --git a/drivers/media/platform/msm/ais/ais_isp/ais_ife_dev.c b/drivers/media/platform/msm/ais/ais_isp/ais_ife_dev.c index f4a068b375d8..5ff489592c9e 100644 --- a/drivers/media/platform/msm/ais/ais_isp/ais_ife_dev.c +++ b/drivers/media/platform/msm/ais/ais_isp/ais_ife_dev.c @@ -693,7 +693,7 @@ static void __exit ais_ife_dev_exit_module(void) platform_driver_unregister(&ife_driver); } -early_module_init(ais_ife_dev_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(ais_ife_dev_init_module); module_exit(ais_ife_dev_exit_module); MODULE_DESCRIPTION("AIS IFE driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid17x.c b/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid17x.c index f7debf94365d..e5005bef0b7b 100644 --- a/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid17x.c +++ b/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid17x.c @@ -76,8 +76,7 @@ static void __exit ais_ife_csid17x_exit_module(void) platform_driver_unregister(&ais_ife_csid17x_driver); } -early_module_init(ais_ife_csid17x_init_module, EARLY_SUBSYS_3, -EARLY_INIT_LEVEL2); +module_init(ais_ife_csid17x_init_module); module_exit(ais_ife_csid17x_exit_module); MODULE_DESCRIPTION("AIS IFE_CSID17X driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid_lite17x.c b/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid_lite17x.c index 70bcac88b6af..90530829b394 100644 --- a/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid_lite17x.c +++ b/drivers/media/platform/msm/ais/ais_isp/csid_hw/ais_ife_csid_lite17x.c @@ -55,8 +55,7 @@ static void __exit ais_ife_csid_lite_exit_module(void) platform_driver_unregister(&ais_ife_csid_lite_driver); } -early_module_init(ais_ife_csid_lite_init_module, EARLY_SUBSYS_3, -EARLY_INIT_LEVEL2); +module_init(ais_ife_csid_lite_init_module); module_exit(ais_ife_csid_lite_exit_module); MODULE_DESCRIPTION("CAM IFE_CSID_LITE driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/ais_isp/vfe_hw/vfe17x/ais_vfe17x.c b/drivers/media/platform/msm/ais/ais_isp/vfe_hw/vfe17x/ais_vfe17x.c index 12fca4c48c38..7e75089f7724 100644 --- a/drivers/media/platform/msm/ais/ais_isp/vfe_hw/vfe17x/ais_vfe17x.c +++ b/drivers/media/platform/msm/ais/ais_isp/vfe_hw/vfe17x/ais_vfe17x.c @@ -65,7 +65,7 @@ static void __exit ais_vfe_exit_module(void) platform_driver_unregister(&ais_vfe_driver); } -early_module_init(ais_vfe_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(ais_vfe_init_module); module_exit(ais_vfe_exit_module); MODULE_DESCRIPTION("AIS VFE17X driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_hw_core.c b/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_hw_core.c index 0f1cba8e0cb2..5999ef829d0b 100644 --- a/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_hw_core.c +++ b/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_hw_core.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1182,7 +1182,7 @@ static void __exit cam_hw_cdm_exit_module(void) platform_driver_unregister(&cam_hw_cdm_driver); } -early_module_init(cam_hw_cdm_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_hw_cdm_init_module); module_exit(cam_hw_cdm_exit_module); MODULE_DESCRIPTION("MSM Camera HW CDM driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_intf.c b/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_intf.c index 004e1418f9c8..871276170ac4 100644 --- a/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_intf.c +++ b/drivers/media/platform/msm/ais/cam_cdm/cam_cdm_intf.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -576,7 +576,7 @@ static void __exit cam_cdm_intf_exit_module(void) platform_driver_unregister(&cam_cdm_intf_driver); } -early_module_init(cam_cdm_intf_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_cdm_intf_init_module); module_exit(cam_cdm_intf_exit_module); MODULE_DESCRIPTION("MSM Camera CDM Intf driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_cpas/cam_cpas_intf.c b/drivers/media/platform/msm/ais/cam_cpas/cam_cpas_intf.c index 74af0f819c53..a9f1e4f8364e 100644 --- a/drivers/media/platform/msm/ais/cam_cpas/cam_cpas_intf.c +++ b/drivers/media/platform/msm/ais/cam_cpas/cam_cpas_intf.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -656,7 +656,7 @@ static void __exit cam_cpas_dev_exit_module(void) platform_driver_unregister(&cam_cpas_driver); } -early_module_init(cam_cpas_dev_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_cpas_dev_init_module); module_exit(cam_cpas_dev_exit_module); MODULE_DESCRIPTION("MSM CPAS driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_fd/cam_fd_dev.c b/drivers/media/platform/msm/ais/cam_fd/cam_fd_dev.c index c0446884e4ad..d5068ca26971 100644 --- a/drivers/media/platform/msm/ais/cam_fd/cam_fd_dev.c +++ b/drivers/media/platform/msm/ais/cam_fd/cam_fd_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -208,7 +208,7 @@ static void __exit cam_fd_dev_exit_module(void) platform_driver_unregister(&cam_fd_driver); } -early_module_init(cam_fd_dev_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_fd_dev_init_module); module_exit(cam_fd_dev_exit_module); MODULE_DESCRIPTION("MSM FD driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_dev.c b/drivers/media/platform/msm/ais/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_dev.c index f2bd15f31d8a..083041c21dff 100644 --- a/drivers/media/platform/msm/ais/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_dev.c +++ b/drivers/media/platform/msm/ais/cam_fd/fd_hw_mgr/fd_hw/cam_fd_hw_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -231,7 +231,7 @@ static void __exit cam_fd_hw_exit_module(void) platform_driver_unregister(&cam_fd_hw_driver); } -early_module_init(cam_fd_hw_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_fd_hw_init_module); module_exit(cam_fd_hw_exit_module); MODULE_DESCRIPTION("CAM FD HW driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_hyp_intf/cam_hyp_intf.c b/drivers/media/platform/msm/ais/cam_hyp_intf/cam_hyp_intf.c index a4f6fea07384..193a5f060234 100644 --- a/drivers/media/platform/msm/ais/cam_hyp_intf/cam_hyp_intf.c +++ b/drivers/media/platform/msm/ais/cam_hyp_intf/cam_hyp_intf.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -518,7 +518,7 @@ static void __exit cam_hyp_intf_exit_module(void) platform_driver_unregister(&cam_hyp_intf_driver); } -early_module_init(cam_hyp_intf_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_hyp_intf_init_module); module_exit(cam_hyp_intf_exit_module); MODULE_DESCRIPTION("MSM Camera Hypervisor Interface"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_icp/cam_icp_subdev.c b/drivers/media/platform/msm/ais/cam_icp/cam_icp_subdev.c index 6e8be4d8e031..699ad5f2a0b4 100644 --- a/drivers/media/platform/msm/ais/cam_icp/cam_icp_subdev.c +++ b/drivers/media/platform/msm/ais/cam_icp/cam_icp_subdev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -276,7 +276,7 @@ static void __exit cam_icp_exit_module(void) { platform_driver_unregister(&cam_icp_driver); } -early_module_init(cam_icp_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_icp_init_module); module_exit(cam_icp_exit_module); MODULE_DESCRIPTION("MSM ICP driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_icp/icp_hw/a5_hw/a5_dev.c b/drivers/media/platform/msm/ais/cam_icp/icp_hw/a5_hw/a5_dev.c index 7769f5806dbf..3b652e72466e 100644 --- a/drivers/media/platform/msm/ais/cam_icp/icp_hw/a5_hw/a5_dev.c +++ b/drivers/media/platform/msm/ais/cam_icp/icp_hw/a5_hw/a5_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -229,7 +229,7 @@ static void __exit cam_a5_exit_module(void) platform_driver_unregister(&cam_a5_driver); } -early_module_init(cam_a5_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_a5_init_module); module_exit(cam_a5_exit_module); MODULE_DESCRIPTION("CAM A5 driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_icp/icp_hw/bps_hw/bps_dev.c b/drivers/media/platform/msm/ais/cam_icp/icp_hw/bps_hw/bps_dev.c index 1bbac1328598..56abb4b8e6e9 100644 --- a/drivers/media/platform/msm/ais/cam_icp/icp_hw/bps_hw/bps_dev.c +++ b/drivers/media/platform/msm/ais/cam_icp/icp_hw/bps_hw/bps_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -208,7 +208,7 @@ static void __exit cam_bps_exit_module(void) platform_driver_unregister(&cam_bps_driver); } -early_module_init(cam_bps_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_bps_init_module); module_exit(cam_bps_exit_module); MODULE_DESCRIPTION("CAM BPS driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_icp/icp_hw/ipe_hw/ipe_dev.c b/drivers/media/platform/msm/ais/cam_icp/icp_hw/ipe_hw/ipe_dev.c index 1d10693e7b90..a01d114bae7b 100644 --- a/drivers/media/platform/msm/ais/cam_icp/icp_hw/ipe_hw/ipe_dev.c +++ b/drivers/media/platform/msm/ais/cam_icp/icp_hw/ipe_hw/ipe_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -200,7 +200,7 @@ static void __exit cam_ipe_exit_module(void) platform_driver_unregister(&cam_ipe_driver); } -early_module_init(cam_ipe_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_ipe_init_module); module_exit(cam_ipe_exit_module); MODULE_DESCRIPTION("CAM IPE driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_isp/cam_isp_dev.c b/drivers/media/platform/msm/ais/cam_isp/cam_isp_dev.c index bae3f80b7789..d8b7a7b5e73e 100644 --- a/drivers/media/platform/msm/ais/cam_isp/cam_isp_dev.c +++ b/drivers/media/platform/msm/ais/cam_isp/cam_isp_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -199,7 +199,7 @@ static void __exit cam_isp_dev_exit_module(void) platform_driver_unregister(&isp_driver); } -early_module_init(cam_isp_dev_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_isp_dev_init_module); module_exit(cam_isp_dev_exit_module); MODULE_DESCRIPTION("MSM ISP driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_csid_ppi170.c b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_csid_ppi170.c index 02ef549ebe75..2051292be5be 100644 --- a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_csid_ppi170.c +++ b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_csid_ppi170.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -53,7 +53,6 @@ static void __exit cam_csid_ppi170_exit_module(void) platform_driver_unregister(&cam_csid_ppi170_driver); } -early_module_init(cam_csid_ppi170_init_module, EARLY_SUBSYS_3, -EARLY_INIT_LEVEL2); +module_init(cam_csid_ppi170_init_module); MODULE_DESCRIPTION("CAM CSID_PPI170 driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid17x.c b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid17x.c index 70a6563475d1..80701bf6f8d0 100644 --- a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid17x.c +++ b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid17x.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -76,8 +76,7 @@ static void __exit cam_ife_csid17x_exit_module(void) platform_driver_unregister(&cam_ife_csid17x_driver); } -early_module_init(cam_ife_csid17x_init_module, EARLY_SUBSYS_3, -EARLY_INIT_LEVEL2); +module_init(cam_ife_csid17x_init_module); module_exit(cam_ife_csid17x_exit_module); MODULE_DESCRIPTION("CAM IFE_CSID17X driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.c b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.c index 2b542e17ae7b..5fdb52a2d9f0 100644 --- a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.c +++ b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -55,8 +55,7 @@ static void __exit cam_ife_csid_lite_exit_module(void) platform_driver_unregister(&cam_ife_csid_lite_driver); } -early_module_init(cam_ife_csid_lite_init_module, EARLY_SUBSYS_3, -EARLY_INIT_LEVEL2); +module_init(cam_ife_csid_lite_init_module); module_exit(cam_ife_csid_lite_exit_module); MODULE_DESCRIPTION("CAM IFE_CSID_LITE driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe17x.c b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe17x.c index 77dedf2db613..2e11dc40d5a3 100644 --- a/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe17x.c +++ b/drivers/media/platform/msm/ais/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe17x.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -65,7 +65,7 @@ static void __exit cam_vfe_exit_module(void) platform_driver_unregister(&cam_vfe_driver); } -early_module_init(cam_vfe_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_vfe_init_module); module_exit(cam_vfe_exit_module); MODULE_DESCRIPTION("CAM VFE17X driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_jpeg/cam_jpeg_dev.c b/drivers/media/platform/msm/ais/cam_jpeg/cam_jpeg_dev.c index 0536d9dbc4ed..14892224e412 100644 --- a/drivers/media/platform/msm/ais/cam_jpeg/cam_jpeg_dev.c +++ b/drivers/media/platform/msm/ais/cam_jpeg/cam_jpeg_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -203,7 +203,7 @@ static void __exit cam_jpeg_dev_exit_module(void) platform_driver_unregister(&jpeg_driver); } -early_module_init(cam_jpeg_dev_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_jpeg_dev_init_module); module_exit(cam_jpeg_dev_exit_module); MODULE_DESCRIPTION("MSM JPEG driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_dev.c b/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_dev.c index b66603ac100c..fd4fdab19fa7 100644 --- a/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_dev.c +++ b/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_dma_hw/jpeg_dma_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -234,7 +234,7 @@ static void __exit cam_jpeg_dma_exit_module(void) platform_driver_unregister(&cam_jpeg_dma_driver); } -early_module_init(cam_jpeg_dma_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_jpeg_dma_init_module); module_exit(cam_jpeg_dma_exit_module); MODULE_DESCRIPTION("CAM JPEG_DMA driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_dev.c b/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_dev.c index fdb5c05fce00..d4daa6dde308 100644 --- a/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_dev.c +++ b/drivers/media/platform/msm/ais/cam_jpeg/jpeg_hw/jpeg_enc_hw/jpeg_enc_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -232,7 +232,7 @@ static void __exit cam_jpeg_enc_exit_module(void) platform_driver_unregister(&cam_jpeg_enc_driver); } -early_module_init(cam_jpeg_enc_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_jpeg_enc_init_module); module_exit(cam_jpeg_enc_exit_module); MODULE_DESCRIPTION("CAM JPEG_ENC driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_lrme/cam_lrme_dev.c b/drivers/media/platform/msm/ais/cam_lrme/cam_lrme_dev.c index 593bc9d84565..6b1250aea714 100644 --- a/drivers/media/platform/msm/ais/cam_lrme/cam_lrme_dev.c +++ b/drivers/media/platform/msm/ais/cam_lrme/cam_lrme_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -236,7 +236,7 @@ static void __exit cam_lrme_dev_exit_module(void) platform_driver_unregister(&cam_lrme_driver); } -early_module_init(cam_lrme_dev_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_lrme_dev_init_module); module_exit(cam_lrme_dev_exit_module); MODULE_DESCRIPTION("MSM LRME driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_dev.c b/drivers/media/platform/msm/ais/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_dev.c index 51b868cb9e40..ec4297822fb7 100644 --- a/drivers/media/platform/msm/ais/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_dev.c +++ b/drivers/media/platform/msm/ais/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -314,7 +314,7 @@ static void __exit cam_lrme_hw_exit_module(void) platform_driver_unregister(&cam_lrme_hw_driver); } -early_module_init(cam_lrme_hw_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_lrme_hw_init_module); module_exit(cam_lrme_hw_exit_module); MODULE_DESCRIPTION("CAM LRME HW driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_req_mgr/cam_req_mgr_dev.c b/drivers/media/platform/msm/ais/cam_req_mgr/cam_req_mgr_dev.c index 21a71957ae9f..89a48d58073d 100644 --- a/drivers/media/platform/msm/ais/cam_req_mgr/cam_req_mgr_dev.c +++ b/drivers/media/platform/msm/ais/cam_req_mgr/cam_req_mgr_dev.c @@ -869,8 +869,8 @@ static void __exit cam_req_mgr_exit(void) platform_driver_unregister(&cam_req_mgr_driver); } -early_module_init(cam_req_mgr_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); -early_late_initcall(cam_req_mgr_late_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL4); +module_init(cam_req_mgr_init); +late_initcall(cam_req_mgr_late_init); module_exit(cam_req_mgr_exit); MODULE_DESCRIPTION("Camera Request Manager"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_actuator/cam_actuator_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_actuator/cam_actuator_dev.c index 215378b5c560..228ccb8a39b3 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_actuator/cam_actuator_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_actuator/cam_actuator_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -445,7 +445,7 @@ static void __exit cam_actuator_driver_exit(void) i2c_del_driver(&cam_actuator_driver_i2c); } -early_module_init(cam_actuator_driver_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_actuator_driver_init); module_exit(cam_actuator_driver_exit); MODULE_DESCRIPTION("cam_actuator_driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_cci/cam_cci_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_cci/cam_cci_dev.c index aeb1e3dfd3a4..3cd3227799fe 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_cci/cam_cci_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_cci/cam_cci_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -527,8 +527,8 @@ static void __exit cam_cci_exit_module(void) platform_driver_unregister(&cci_driver); } -early_module_init(cam_cci_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); -early_late_initcall(cam_cci_late_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL4); +module_init(cam_cci_init_module); +late_initcall(cam_cci_late_init); module_exit(cam_cci_exit_module); MODULE_DESCRIPTION("MSM CCI driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_csiphy/cam_csiphy_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_csiphy/cam_csiphy_dev.c index 7c93ba15c2f7..972b0a549f30 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_csiphy/cam_csiphy_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_csiphy/cam_csiphy_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -254,7 +254,7 @@ static void __exit cam_csiphy_exit_module(void) platform_driver_unregister(&csiphy_driver); } -early_module_init(cam_csiphy_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_csiphy_init_module); module_exit(cam_csiphy_exit_module); MODULE_DESCRIPTION("CAM CSIPHY driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_eeprom/cam_eeprom_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_eeprom/cam_eeprom_dev.c index 5370517841d1..cf6854c7a527 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_eeprom/cam_eeprom_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_eeprom/cam_eeprom_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -590,7 +590,7 @@ static void __exit cam_eeprom_driver_exit(void) i2c_del_driver(&cam_eeprom_i2c_driver); } -early_module_init(cam_eeprom_driver_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_eeprom_driver_init); module_exit(cam_eeprom_driver_exit); MODULE_DESCRIPTION("CAM EEPROM driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_flash/cam_flash_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_flash/cam_flash_dev.c index e3b6fffbd939..f4c9d254df7c 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_flash/cam_flash_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_flash/cam_flash_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -647,7 +647,7 @@ static void __exit cam_flash_exit_module(void) i2c_del_driver(&cam_flash_i2c_driver); } -early_module_init(cam_flash_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_flash_init_module); module_exit(cam_flash_exit_module); MODULE_DESCRIPTION("CAM FLASH"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_ois/cam_ois_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_ois/cam_ois_dev.c index 026980e767e6..db583340dad4 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_ois/cam_ois_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_ois/cam_ois_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -423,7 +423,7 @@ static void __exit cam_ois_driver_exit(void) i2c_del_driver(&cam_ois_i2c_driver); } -early_module_init(cam_ois_driver_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_ois_driver_init); module_exit(cam_ois_driver_exit); MODULE_DESCRIPTION("CAM OIS driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_res_mgr/cam_res_mgr.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_res_mgr/cam_res_mgr.c index aed6417020a7..91b19c8f7ff0 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_res_mgr/cam_res_mgr.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_res_mgr/cam_res_mgr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -740,7 +740,7 @@ static void __exit cam_res_mgr_exit(void) platform_driver_unregister(&cam_res_mgr_driver); } -early_module_init(cam_res_mgr_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_res_mgr_init); module_exit(cam_res_mgr_exit); MODULE_DESCRIPTION("Camera resource manager driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sensor_module/cam_sensor/cam_sensor_dev.c b/drivers/media/platform/msm/ais/cam_sensor_module/cam_sensor/cam_sensor_dev.c index 56596f2ad4a6..d29a58f65a47 100644 --- a/drivers/media/platform/msm/ais/cam_sensor_module/cam_sensor/cam_sensor_dev.c +++ b/drivers/media/platform/msm/ais/cam_sensor_module/cam_sensor/cam_sensor_dev.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -414,7 +414,7 @@ static void __exit cam_sensor_driver_exit(void) i2c_del_driver(&cam_sensor_driver_i2c); } -early_module_init(cam_sensor_driver_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_sensor_driver_init); module_exit(cam_sensor_driver_exit); MODULE_DESCRIPTION("cam_sensor_driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_smmu/cam_smmu_api.c b/drivers/media/platform/msm/ais/cam_smmu/cam_smmu_api.c index ec353cd2648c..e00b1f4ec0a7 100644 --- a/drivers/media/platform/msm/ais/cam_smmu/cam_smmu_api.c +++ b/drivers/media/platform/msm/ais/cam_smmu/cam_smmu_api.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2014-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -3615,7 +3615,7 @@ static void __exit cam_smmu_exit_module(void) platform_driver_unregister(&cam_smmu_driver); } -early_module_init(cam_smmu_init_module, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_smmu_init_module); module_exit(cam_smmu_exit_module); MODULE_DESCRIPTION("MSM Camera SMMU driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/platform/msm/ais/cam_sync/cam_sync.c b/drivers/media/platform/msm/ais/cam_sync/cam_sync.c index 305c2e50066f..b76e7c9e2f5a 100644 --- a/drivers/media/platform/msm/ais/cam_sync/cam_sync.c +++ b/drivers/media/platform/msm/ais/cam_sync/cam_sync.c @@ -1265,7 +1265,7 @@ static void __exit cam_sync_exit(void) kfree(sync_dev); } -early_module_init(cam_sync_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL2); +module_init(cam_sync_init); module_exit(cam_sync_exit); MODULE_DESCRIPTION("Camera sync driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index a86e5a1ea9b0..c647ba648805 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c @@ -1063,7 +1063,7 @@ static void __exit videodev_exit(void) unregister_chrdev_region(dev, VIDEO_NUM_DEVICES); } -early_subsys_initcall(videodev_init, EARLY_SUBSYS_3, EARLY_INIT_LEVEL1); +subsys_initcall(videodev_init); module_exit(videodev_exit) MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab "); diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 2dc9a066ab85..295721efefbe 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1982,5 +1982,5 @@ static void __exit phy_exit(void) mdio_bus_exit(); } -early_subsys_initcall(phy_init, EARLY_SUBSYS_4, EARLY_INIT_LEVEL1); +subsys_initcall(phy_init); module_exit(phy_exit); diff --git a/drivers/net/wireless/cnss2/main.c b/drivers/net/wireless/cnss2/main.c index 6579f57ab3a9..c17089d79ec3 100644 --- a/drivers/net/wireless/cnss2/main.c +++ b/drivers/net/wireless/cnss2/main.c @@ -2194,14 +2194,7 @@ static void __exit cnss_exit(void) cnss_debug_deinit(); } -static int __init cnss_set_sync(void) -{ - cnss_platform_driver.driver.probe_type = 0; - return 0; -} -early_init(cnss_set_sync, EARLY_SUBSYS_5, EARLY_INIT_LEVEL4); - -early_module_init(cnss_initialize, EARLY_SUBSYS_5, EARLY_INIT_LEVEL5); +module_init(cnss_initialize); module_exit(cnss_exit); MODULE_LICENSE("GPL v2"); diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 578e51a80670..5a4963060b85 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -441,13 +441,6 @@ int of_platform_bus_probe(struct device_node *root, } EXPORT_SYMBOL(of_platform_bus_probe); -int of_platform_node_probe(struct device_node *np, - struct device *parent) -{ - return of_platform_bus_create(np, of_default_bus_match_table, NULL, - parent, true); -} - /** * of_platform_populate() - Populate platform_devices from device tree data * @root: parent of the first level to probe or NULL for the root of the tree diff --git a/drivers/pci/host/pci-msm.c b/drivers/pci/host/pci-msm.c index a9607057d1bb..e2c452ceabd2 100644 --- a/drivers/pci/host/pci-msm.c +++ b/drivers/pci/host/pci-msm.c @@ -6788,23 +6788,7 @@ static void __exit pcie_exit(void) msm_pcie_sysfs_exit(&msm_pcie_dev[i]); } -static DECLARE_COMPLETION(pcie_init_start); - -static int __init pcie_init_sync(void) -{ - complete(&pcie_init_start); - return 0; -} -subsys_initcall_sync(pcie_init_sync); - -static int __init pcie_init_wait(void) -{ - wait_for_completion(&pcie_init_start); - return 0; -} -early_init(pcie_init_wait, EARLY_SUBSYS_5, EARLY_INIT_LEVEL3); - -early_subsys_initcall_sync(pcie_init, EARLY_SUBSYS_5, EARLY_INIT_LEVEL4); +subsys_initcall_sync(pcie_init); module_exit(pcie_exit); diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index dda362fd1b3a..1a306664324e 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -1017,7 +1017,7 @@ static int __init phy_core_init(void) return 0; } -early_module_init(phy_core_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(phy_core_init); static void __exit phy_core_exit(void) { diff --git a/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v4.c b/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v4.c index 9b17a9fa12cf..28e87424c153 100644 --- a/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v4.c +++ b/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v4.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. - * Copyright (C) 2019 XiaoMi, Inc. +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -12,9 +11,6 @@ * */ -#include -#include - #include "phy-qcom-ufs-qmp-v4.h" #define UFS_PHY_NAME "ufs_phy_qmp_v4" @@ -294,8 +290,7 @@ static struct platform_driver ufs_qcom_phy_qmp_v4_driver = { }, }; -early_module_platform_driver(ufs_qcom_phy_qmp_v4_driver, EARLY_SUBSYS_1, -EARLY_INIT_LEVEL2); +module_platform_driver(ufs_qcom_phy_qmp_v4_driver); MODULE_DESCRIPTION("Universal Flash Storage (UFS) QCOM PHY QMP v4"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/pinctrl/pinctrl-sx150x.c b/drivers/pinctrl/pinctrl-sx150x.c index 3fad50a438fb..75d5a096676d 100644 --- a/drivers/pinctrl/pinctrl-sx150x.c +++ b/drivers/pinctrl/pinctrl-sx150x.c @@ -1303,4 +1303,4 @@ static int __init sx150x_init(void) { return i2c_add_driver(&sx150x_driver); } -early_subsys_initcall(sx150x_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL3); +subsys_initcall(sx150x_init); diff --git a/drivers/platform/msm/qcom-geni-se.c b/drivers/platform/msm/qcom-geni-se.c index 1acda038b774..66a8d3f45274 100644 --- a/drivers/platform/msm/qcom-geni-se.c +++ b/drivers/platform/msm/qcom-geni-se.c @@ -2098,8 +2098,7 @@ static int __init geni_se_driver_init(void) { return platform_driver_register(&geni_se_driver); } -early_subsys_initcall(geni_se_driver_init, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL3); +subsys_initcall(geni_se_driver_init); static void __exit geni_se_driver_exit(void) { diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 72c299042a4f..a7e4fba724b7 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -842,5 +842,5 @@ static void __exit exit_scsi(void) async_unregister_domain(&scsi_sd_probe_domain); } -early_subsys_initcall(init_scsi, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +subsys_initcall(init_scsi); module_exit(exit_scsi); diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9d9fb6afa1c2..303c257480e1 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3699,7 +3699,7 @@ static void __exit exit_sd(void) } } -early_module_init(init_sd, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(init_sd); module_exit(exit_sd); static void sd_print_sense_hdr(struct scsi_disk *sdkp, @@ -3726,9 +3726,3 @@ static void sd_print_result(const struct scsi_disk *sdkp, const char *msg, msg, host_byte(result), driver_byte(result)); } -static int __init early_rootdev_wait(void) -{ - async_synchronize_full_domain(&scsi_sd_probe_domain); - return 0; -} -early_init(early_rootdev_wait, EARLY_SUBSYS_1, EARLY_INIT_LEVEL5); diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c index aa6d48904d31..becb6ae75a33 100644 --- a/drivers/scsi/ufs/ufs-qcom.c +++ b/drivers/scsi/ufs/ufs-qcom.c @@ -2933,14 +2933,6 @@ static struct platform_driver ufs_qcom_pltform = { .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, }; -early_module_platform_driver(ufs_qcom_pltform, EARLY_SUBSYS_1, -EARLY_INIT_LEVEL3); - -static int __init ufs_qti_pltform_sync(void) -{ - ufs_qcom_pltform.driver.probe_type = PROBE_DEFAULT_STRATEGY; - return 0; -} -early_init(ufs_qti_pltform_sync, EARLY_SUBSYS_1, EARLY_INIT_LEVEL2); +module_platform_driver(ufs_qcom_pltform); MODULE_LICENSE("GPL v2"); diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ceb794be590c..2548451bf726 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -37,7 +37,6 @@ * license terms, and distributes only under these terms. */ -#include #include #include #include @@ -11380,10 +11379,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) ufshcd_cmd_log_init(hba); - if (is_early_userspace) - ufshcd_async_scan(hba, (async_cookie_t)0); - else - async_schedule(ufshcd_async_scan, hba); + async_schedule(ufshcd_async_scan, hba); ufsdbg_add_debugfs(hba); diff --git a/drivers/soc/qcom/boot_marker.c b/drivers/soc/qcom/boot_marker.c index 45408ecda5d8..a4c7d85ff028 100644 --- a/drivers/soc/qcom/boot_marker.c +++ b/drivers/soc/qcom/boot_marker.c @@ -302,7 +302,7 @@ static int __init init_bootkpi(void) set_bootloader_stats(false); return 0; } -early_subsys_initcall(init_bootkpi, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL0); +subsys_initcall(init_bootkpi); static void __exit exit_bootkpi(void) { diff --git a/drivers/soc/qcom/fsa4480-i2c.c b/drivers/soc/qcom/fsa4480-i2c.c index 912d61ba8770..cddb520ac4cf 100644 --- a/drivers/soc/qcom/fsa4480-i2c.c +++ b/drivers/soc/qcom/fsa4480-i2c.c @@ -470,7 +470,7 @@ static int __init fsa4480_init(void) return rc; } -early_module_init(fsa4480_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL3); +module_init(fsa4480_init); static void __exit fsa4480_exit(void) { diff --git a/drivers/soc/qcom/msm_bus/msm_bus_fabric_rpmh.c b/drivers/soc/qcom/msm_bus/msm_bus_fabric_rpmh.c index 2184328cdcca..708713f92762 100644 --- a/drivers/soc/qcom/msm_bus/msm_bus_fabric_rpmh.c +++ b/drivers/soc/qcom/msm_bus/msm_bus_fabric_rpmh.c @@ -2005,6 +2005,5 @@ int __init msm_bus_device_late_init(void) init_time = false; return commit_late_init_data(false); } -early_subsys_initcall(msm_bus_device_init_driver, EARLY_SUBSYS_PLATFORM, -EARLY_INIT_LEVEL1); +subsys_initcall(msm_bus_device_init_driver); late_initcall_sync(msm_bus_device_late_init); diff --git a/drivers/soc/qcom/msm_bus/msm_bus_proxy_client.c b/drivers/soc/qcom/msm_bus/msm_bus_proxy_client.c index 399f93897990..cdf61f6c8644 100644 --- a/drivers/soc/qcom/msm_bus/msm_bus_proxy_client.c +++ b/drivers/soc/qcom/msm_bus/msm_bus_proxy_client.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -89,6 +89,5 @@ static int __init msm_bus_proxy_client_unvote(void) return 0; } -early_subsys_initcall_sync(msm_bus_proxy_client_init_driver, -EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL2); +subsys_initcall_sync(msm_bus_proxy_client_init_driver); late_initcall_sync(msm_bus_proxy_client_unvote); diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 20f98fa09eaf..13042d0ef07f 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -1625,7 +1625,7 @@ static int __init socinfo_init_sysfs(void) return 0; } -early_late_initcall(socinfo_init_sysfs, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +late_initcall(socinfo_init_sysfs); static void socinfo_print(void) { @@ -1933,4 +1933,4 @@ int __init socinfo_init(void) return 0; } -early_subsys_initcall(socinfo_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL0); +subsys_initcall(socinfo_init); diff --git a/drivers/soc/qcom/subsys-pil-tz.c b/drivers/soc/qcom/subsys-pil-tz.c index c87ecf9ba163..e267ceadf41a 100644 --- a/drivers/soc/qcom/subsys-pil-tz.c +++ b/drivers/soc/qcom/subsys-pil-tz.c @@ -1329,7 +1329,7 @@ static int __init pil_tz_init(void) { return platform_driver_register(&pil_tz_driver); } -early_module_init(pil_tz_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(pil_tz_init); static void __exit pil_tz_exit(void) { diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 313cc69cd2d8..6c1c2d543d1a 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1946,6 +1946,6 @@ exit_netlink: return ret; } -early_subsys_initcall(thermal_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL7); +subsys_initcall(thermal_init); fs_initcall(thermal_netlink_init); module_exit(thermal_exit); diff --git a/drivers/usb/pd/policy_engine.c b/drivers/usb/pd/policy_engine.c index 944e75794309..af98245a3e95 100644 --- a/drivers/usb/pd/policy_engine.c +++ b/drivers/usb/pd/policy_engine.c @@ -5138,7 +5138,7 @@ static int __init usbpd_init(void) usbpd_ipc_log = ipc_log_context_create(NUM_LOG_PAGES, "usb_pd", 0); return class_register(&usbpd_class); } -early_module_init(usbpd_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(usbpd_init); static void __exit usbpd_exit(void) { diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 2c46b92f244f..3168ee4e77f4 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -175,4 +175,5 @@ static int __init anon_inode_init(void) return 0; } -early_fs_initcall(anon_inode_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +fs_initcall(anon_inode_init); + diff --git a/fs/eventpoll.c b/fs/eventpoll.c index bc88f6951191..a05c6a17d8a9 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -2347,4 +2347,4 @@ static int __init eventpoll_init(void) return 0; } -early_fs_initcall(eventpoll_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +fs_initcall(eventpoll_init); diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 7129dc61da81..0de79c943be0 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6155,5 +6155,5 @@ MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodo MODULE_DESCRIPTION("Fourth Extended Filesystem"); MODULE_LICENSE("GPL"); MODULE_SOFTDEP("pre: crc32c"); -early_module_init(ext4_init_fs, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +module_init(ext4_init_fs) module_exit(ext4_exit_fs) diff --git a/fs/filesystems.c b/fs/filesystems.c index 9829317d39c8..8fb7cda40997 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c @@ -221,25 +221,6 @@ int __init get_filesystem_list(char *buf) return len; } -#ifdef CONFIG_EARLY_SERVICES -int get_filesystem_list_runtime(char *buf) -{ - int len = 0; - struct file_system_type *tmp; - - read_lock(&file_systems_lock); - tmp = file_systems; - while (tmp && len < PAGE_SIZE - 80) { - len += scnprintf(buf+len, PAGE_SIZE, "%s\t%s\n", - (tmp->fs_flags & FS_REQUIRES_DEV) ? "" : "nodev", - tmp->name); - tmp = tmp->next; - } - read_unlock(&file_systems_lock); - return len; -} -#endif - #ifdef CONFIG_PROC_FS static int filesystems_proc_show(struct seq_file *m, void *v) { diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index e82d20244caa..6e054b368b5f 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -2719,6 +2719,6 @@ static void __exit journal_exit(void) } MODULE_LICENSE("GPL"); -early_module_init(journal_init, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +module_init(journal_init); module_exit(journal_exit); diff --git a/fs/pipe.c b/fs/pipe.c index edb86b4d03b9..fa3c2c25cec5 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -1240,4 +1240,4 @@ static int __init init_pipe_fs(void) return err; } -early_fs_initcall(init_pipe_fs, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +fs_initcall(init_pipe_fs); diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index a13eaa488075..3972a2a90268 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -761,35 +761,6 @@ INIT_CALLS_LEVEL(7) \ VMLINUX_SYMBOL(__initcall_end) = .; -#define EARLY_INIT_CALLS_LEVEL(subsys, level) \ - VMLINUX_SYMBOL(__early##subsys##_initcall##level##_start) = .; \ - KEEP(*(.early##subsys##.initcall##level##.init)) \ - -#define EARLY_INIT_CALLS_SUBSYS(subsys) \ - VMLINUX_SYMBOL(__early##subsys##_initcall_start) = .; \ - EARLY_INIT_CALLS_LEVEL(subsys, 0) \ - EARLY_INIT_CALLS_LEVEL(subsys, 1) \ - EARLY_INIT_CALLS_LEVEL(subsys, 2) \ - EARLY_INIT_CALLS_LEVEL(subsys, 3) \ - EARLY_INIT_CALLS_LEVEL(subsys, 4) \ - EARLY_INIT_CALLS_LEVEL(subsys, 5) \ - EARLY_INIT_CALLS_LEVEL(subsys, 6) \ - EARLY_INIT_CALLS_LEVEL(subsys, 7) \ - EARLY_INIT_CALLS_LEVEL(subsys, 8) \ - VMLINUX_SYMBOL(__early##subsys##_initcall_end) = .; \ - -#define EARLY_INIT_CALLS \ - VMLINUX_SYMBOL(__early_initcall_start) = .; \ - EARLY_INIT_CALLS_SUBSYS(0) \ - EARLY_INIT_CALLS_SUBSYS(1) \ - EARLY_INIT_CALLS_SUBSYS(2) \ - EARLY_INIT_CALLS_SUBSYS(3) \ - EARLY_INIT_CALLS_SUBSYS(4) \ - EARLY_INIT_CALLS_SUBSYS(5) \ - EARLY_INIT_CALLS_SUBSYS(6) \ - EARLY_INIT_CALLS_SUBSYS(7) \ - VMLINUX_SYMBOL(__early_initcall_end) = .; - #define CON_INITCALL \ VMLINUX_SYMBOL(__con_initcall_start) = .; \ KEEP(*(.con_initcall.init)) \ diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h index 295864168063..84d3c81b5978 100644 --- a/include/linux/cpufeature.h +++ b/include/linux/cpufeature.h @@ -57,18 +57,5 @@ static int __init cpu_feature_match_ ## x ## _init(void) \ } \ module_init(cpu_feature_match_ ## x ## _init) -#define early_module_cpu_feature_match(x, __initfunc, subsys, level) \ -static struct cpu_feature const __maybe_unused cpu_feature_match_ ## x[] = \ - { { .feature = cpu_feature(x) }, { } }; \ -MODULE_DEVICE_TABLE(cpu, cpu_feature_match_ ## x); \ - \ -static int __init cpu_feature_match_ ## x ## _init(void) \ -{ \ - if (!cpu_have_feature(cpu_feature(x))) \ - return -ENODEV; \ - return __initfunc(); \ -} \ -early_module_init(cpu_feature_match_ ## x ## _init, subsys, level) - #endif #endif diff --git a/include/linux/device.h b/include/linux/device.h index 300d0e10a749..b52773b0598d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1523,31 +1523,6 @@ static void __exit __driver##_exit(void) \ } \ module_exit(__driver##_exit); -#define early_module_driver(__driver, subsys, level, __register, __unregister) \ -static int __init __driver##_init(void) \ -{ \ - return __register(&(__driver)); \ -} \ -early_module_init(__driver##_init, subsys, level); \ -static void __exit __driver##_exit(void) \ -{ \ - __unregister(&(__driver)); \ -} \ -module_exit(__driver##_exit) - -#define early_module_driver_async(__driver, subsys, level, __register, \ - __unregister) \ -static int __init __driver##_init(void) \ -{ \ - return __register(&(__driver)); \ -} \ -early_module_init_async(__driver##_init, subsys, level); \ -static void __exit __driver##_exit(void) \ -{ \ - __unregister(&(__driver)); \ -} \ -module_exit(__driver##_exit) - /** * builtin_driver() - Helper macro for drivers that don't do anything * special in init and have no exit. This eliminates some boilerplate. diff --git a/include/linux/early_async.h b/include/linux/early_async.h deleted file mode 100644 index 1187bc9d7d74..000000000000 --- a/include/linux/early_async.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2019, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef _LINUX_INIT_ASYNC_H -#define _LINUX_INIT_ASYNC_H - -#include -#include -#include - - -#define _early_initcall_async(fn, subsys, level) \ - static DECLARE_COMPLETION(_##fn##done); \ - static void __init _##fn##_work(struct work_struct *w) \ - { \ - fn(); \ - complete(&_##fn##done); \ - kfree(w); \ - } \ - static int __init _##fn##_sync(void) \ - { \ - wait_for_completion(&_##fn##done); \ - return 0; \ - } \ - static int __init _##fn##_async(void) \ - { \ - struct work_struct *work; \ - work = kzalloc(sizeof(struct work_struct), GFP_KERNEL); \ - if (work) { \ - INIT_WORK(work, _##fn##_work); \ - queue_work_on(WORK_CPU_UNBOUND, system_highpri_wq, \ - work); \ - } \ - return 0; \ - } \ - __define_early_initcall(_##fn##_async, subsys, level) - -#define early_initcall_type_async(type, fn, subsys, level) \ - static int __init _##fn(void) \ - { \ - if (is_early_userspace) \ - return 0; \ - return fn(); \ - } \ - type(_##fn); \ - _early_initcall_async(fn, subsys, level) - -#define early_device_initcall_async(fn, subsys, level) \ - early_initcall_type_async(device_initcall, fn, subsys, level) - -#define __early_initcall_async(fn, subsys, level) \ - early_device_initcall_async(fn, subsys, level) - -#endif /* _LINUX_INIT_ASYNC_H */ diff --git a/include/linux/fs.h b/include/linux/fs.h index 83eabae7bf37..b2eb020eb7e2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3361,7 +3361,6 @@ int proc_nr_dentry(struct ctl_table *table, int write, int proc_nr_inodes(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos); int __init get_filesystem_list(char *buf); -int get_filesystem_list_runtime(char *buf); #define __FMODE_EXEC ((__force int) FMODE_EXEC) #define __FMODE_NONOTIFY ((__force int) FMODE_NONOTIFY) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index d970f23b6b83..e55d85ba1772 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -781,10 +781,6 @@ int i2c_handle_smbus_host_notify(struct i2c_adapter *adap, unsigned short addr); module_driver(__i2c_driver, i2c_add_driver, \ i2c_del_driver) -#define early_module_i2c_driver(__i2c_driver, subsys, level) \ - early_module_driver(__i2c_driver, subsys, level, i2c_add_driver, \ - i2c_del_driver) - /** * builtin_i2c_driver() - Helper macro for registering a builtin I2C driver * @__i2c_driver: i2c_driver struct diff --git a/include/linux/init.h b/include/linux/init.h index 8dc115f61abc..b0c077fd882c 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -158,16 +158,8 @@ extern bool initcall_debug; #define ___initcall_name2(c, fn, id) __initcall_##c##_##fn##id #define ___initcall_name1(c, fn, id) ___initcall_name2(c, fn, id) #define __initcall_name(fn, id) ___initcall_name1(__COUNTER__, fn, id) - #define ___early_initcall_name2(c, fn, subsys, level) \ - __early##subsys_initcall_##c##_##fn##level - #define ___early_initcall_name1(c, fn, subsys, level) \ - ___early_initcall_name2(c, fn, subsys, level) - #define __early_initcall_name(fn, subsys, level) \ - ___early_initcall_name1(__COUNTER__, fn, subsys, level) #else #define __initcall_name(fn, id) __initcall_##fn##id - #define __early_initcall_name(fn, subsys, level) \ - __early##subsys_initcall_##fn##level #endif /* @@ -213,11 +205,6 @@ extern bool initcall_debug; #define __define_initcall(fn, id) ___define_initcall(fn, id, .initcall##id) -#define __define_early_initcall(fn, subsys, level) \ - static initcall_t __early_initcall_name(fn, subsys, level) __used \ - __attribute__((__section__(".early" #subsys ".initcall" #level ".init"\ - ))) = fn - /* * Early initcalls run before initializing SMP. * @@ -250,66 +237,6 @@ extern bool initcall_debug; #define late_initcall(fn) __define_initcall(fn, 7) #define late_initcall_sync(fn) __define_initcall(fn, 7s) -extern void early_subsys_finish(void); -extern initcall_t __early0_initcall_start[]; -extern initcall_t __early1_initcall_start[]; -extern initcall_t __early2_initcall_start[]; -extern initcall_t __early3_initcall_start[]; -extern initcall_t __early4_initcall_start[]; -extern initcall_t __early5_initcall_start[]; -extern initcall_t __early6_initcall_start[]; -extern initcall_t __early7_initcall_start[]; -extern initcall_t __early_initcall_end[]; -extern bool is_early_userspace; - -#define early_initcall_type(type, fn, subsys, level) \ - static int __init _##fn(void) \ - { \ - if (is_early_userspace) \ - return 0; \ - return fn(); \ - } \ - type(_##fn); \ - __define_early_initcall(fn, subsys, level) - -#define early_subsys_initcall(fn, subsys, level) \ - early_initcall_type(subsys_initcall, fn, subsys, level) -#define early_device_initcall(fn, subsys, level) \ - early_initcall_type(device_initcall, fn, subsys, level) -#define early_rootfs_initcall(fn, subsys, level) \ - early_initcall_type(rootfs_initcall, fn, subsys, level) -#define early_fs_initcall(fn, subsys, level) \ - early_initcall_type(fs_initcall, fn, subsys, level) -#define early_late_initcall(fn, subsys, level) \ - early_initcall_type(late_initcall, fn, subsys, level) -#define early_subsys_initcall_sync(fn, subsys, level) \ - early_initcall_type(subsys_initcall_sync, fn, subsys, level) - -#define early_init(fn, subsys, level) \ - __define_early_initcall(fn, subsys, level) -#define __early_initcall(fn, subsys, level) \ - early_device_initcall(fn, subsys, level) - -#define EARLY_SUBSYS_PLATFORM 0 -#define EARLY_SUBSYS_1 1 -#define EARLY_SUBSYS_2 2 -#define EARLY_SUBSYS_3 3 -#define EARLY_SUBSYS_4 4 -#define EARLY_SUBSYS_5 5 -#define EARLY_SUBSYS_6 6 -#define EARLY_SUBSYS_7 7 -#define EARLY_SUBSYS_NUM 8 - -#define EARLY_INIT_LEVEL0 0 -#define EARLY_INIT_LEVEL1 1 -#define EARLY_INIT_LEVEL2 2 -#define EARLY_INIT_LEVEL3 3 -#define EARLY_INIT_LEVEL4 4 -#define EARLY_INIT_LEVEL5 5 -#define EARLY_INIT_LEVEL6 6 -#define EARLY_INIT_LEVEL7 7 -#define EARLY_INIT_LEVEL8 8 - #define __initcall(fn) device_initcall(fn) #define __exitcall(fn) \ diff --git a/include/linux/module.h b/include/linux/module.h index df3ba710f511..f3fbbdcd981f 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -85,12 +85,6 @@ extern void cleanup_module(void); */ #define module_init(x) __initcall(x); -#define early_module_init(x, subsys, level) \ - __early_initcall(x, subsys, level) - -#define early_module_init_async(x, subsys, level) \ - __early_initcall_async(x, subsys, level) - /** * module_exit() - driver exit entry point * @x: function to be run when driver is removed @@ -131,16 +125,6 @@ extern void cleanup_module(void); #define console_initcall(fn) module_init(fn) #define security_initcall(fn) module_init(fn) -#define early_subsys_initcall(fn, subsys, level) module_init(fn) -#define early_device_initcall(fn, subsys, level) module_init(fn) -#define early_rootfs_initcall(fn, subsys, level) module_init(fn) -#define early_fs_initcall(fn, subsys, level) module_init(fn) -#define early_late_initcall(fn, subsys, level) module_init(fn) -#define early_subsys_initcall_sync(fn, subsys, level) module_init(fn) -#define early_init(fn, subsys, level) -#define early_module_init(fn, subsys, level) module_init(fn) -#define early_module_init_async(fn, subsys, level) module_init(fn) - /* Each module must use one module_init(). */ #define module_init(initfn) \ static inline initcall_t __maybe_unused __inittest(void) \ diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 9998220ec456..fb908e598348 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -75,8 +75,6 @@ extern int of_platform_device_destroy(struct device *dev, void *data); extern int of_platform_bus_probe(struct device_node *root, const struct of_device_id *matches, struct device *parent); -extern int of_platform_node_probe(struct device_node *np, - struct device *parent); #ifdef CONFIG_OF_ADDRESS extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index b5f6dad99cb0..49f634d96118 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -228,14 +228,6 @@ static inline void platform_set_drvdata(struct platform_device *pdev, module_driver(__platform_driver, platform_driver_register, \ platform_driver_unregister) -#define early_module_platform_driver(__platform_driver, subsys, level) \ - early_module_driver(__platform_driver, subsys, level, \ - platform_driver_register, platform_driver_unregister) - -#define early_module_platform_driver_async(__platform_driver, subsys, level) \ - early_module_driver_async(__platform_driver, subsys, level, \ - platform_driver_register, platform_driver_unregister) - /* builtin_platform_driver() - Helper macro for builtin drivers that * don't do anything special in driver init. This eliminates some * boilerplate. Each driver may only use this macro once, and diff --git a/init/Makefile b/init/Makefile index 230853115245..62d8be1cee07 100644 --- a/init/Makefile +++ b/init/Makefile @@ -9,7 +9,6 @@ obj-y := main.o version.o mounts.o obj-y += noinitramfs.o obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o -obj-y += early_userspace.o ifneq ($(CONFIG_ARCH_INIT_TASK),y) obj-y += init_task.o diff --git a/init/do_mounts.c b/init/do_mounts.c index 4a7024685d50..4977a57459cd 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -42,7 +42,6 @@ int root_mountflags = MS_RDONLY | MS_SILENT; static char * __initdata root_device_name; static char __initdata saved_root_name[64] = "PARTLABEL=system"; static int root_wait; - dev_t ROOT_DEV; static int __init load_ramdisk(char *str) @@ -446,26 +445,6 @@ static void __init get_fs_names(char *page) *s = '\0'; } -#ifdef CONFIG_EARLY_SERVICES -static void get_fs_names_runtime(char *page) -{ - char *s = page; - int len = get_filesystem_list_runtime(page); - char *p, *next; - - page[len] = '\0'; - - for (p = page-1; p; p = next) { - next = strnchr(++p, len, '\n'); - if (*p++ != '\t') - continue; - while ((*s++ = *p++) != '\n') - ; - s[-1] = '\0'; - } - *s = '\0'; -} -#endif static int __init do_mount_root(char *name, char *fs, int flags, void *data) { struct super_block *s; @@ -663,44 +642,25 @@ void __init mount_root(void) void __init prepare_namespace(void) { int is_floppy; - static int first_time = 1; - if ((!is_early_userspace) || (is_early_userspace && (!first_time))) { - if (root_delay) { - pr_info( - "Waiting %d sec before mounting root device...\n", - root_delay); - ssleep(root_delay); - } - - /* - * wait for the known devices to complete their probing - * - * Note: this is a potential source of long boot delays. - * For example, it is not atypical to wait 5 seconds here - * for the touchpad of a laptop to initialize. - */ - if (!is_early_userspace) - wait_for_device_probe(); + if (root_delay) { + printk(KERN_INFO "Waiting %d sec before mounting root device...\n", + root_delay); + ssleep(root_delay); } - if ((!is_early_userspace) || (is_early_userspace && first_time)) { - md_run_setup(); - dm_run_setup(); - dm_verity_setup(); + /* + * wait for the known devices to complete their probing + * + * Note: this is a potential source of long boot delays. + * For example, it is not atypical to wait 5 seconds here + * for the touchpad of a laptop to initialize. + */ + wait_for_device_probe(); - if (saved_root_name[0]) { - root_device_name = saved_root_name; - if (!memcmp(root_device_name, "mtd", 3) || - !memcmp(root_device_name, "ubi", 3)) { - mount_block_root(root_device_name, - root_mountflags); - goto out; - } - ROOT_DEV = name_to_dev_t(root_device_name); - if (memcmp(root_device_name, "/dev/", 5) == 0) - root_device_name += 5; - } + md_run_setup(); + dm_run_setup(); + dm_verity_setup(); // Try to mount partition labeled "system" first ROOT_DEV = name_to_dev_t("PARTLABEL=system"); @@ -712,33 +672,39 @@ void __init prepare_namespace(void) if (initrd_load()) goto out; - /* wait for any asynchronous scanning to complete */ - if ((ROOT_DEV == 0) && root_wait) { - pr_info("Waiting for root device %s...\n", - saved_root_name); - while (driver_probe_done() != 0 || - (ROOT_DEV = name_to_dev_t(saved_root_name)) - == 0) - msleep(20); - async_synchronize_full(); + if (saved_root_name[0]) { + root_device_name = saved_root_name; + if (!strncmp(root_device_name, "mtd", 3) || + !strncmp(root_device_name, "ubi", 3)) { + mount_block_root(root_device_name, root_mountflags); + goto out; } + ROOT_DEV = name_to_dev_t(root_device_name); + if (strncmp(root_device_name, "/dev/", 5) == 0) + root_device_name += 5; + } - is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; + if (initrd_load()) + goto out; - if (is_floppy && rd_doload && rd_load_disk(0)) - ROOT_DEV = Root_RAM0; + /* wait for any asynchronous scanning to complete */ + if ((ROOT_DEV == 0) && root_wait) { + printk(KERN_INFO "Waiting for root device %s...\n", + saved_root_name); + while (driver_probe_done() != 0 || + (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) + msleep(5); + async_synchronize_full(); + } + + is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; mount: - mount_root(); - } + mount_root(); out: - if ((!is_early_userspace) || (is_early_userspace && first_time)) { - devtmpfs_mount("dev"); - sys_mount((char __user *)".", (char __user *)"/", - NULL, MS_MOVE, NULL); - sys_chroot((char __user *)"."); - } - first_time = 0; + devtmpfs_mount("dev"); + sys_mount(".", "/", NULL, MS_MOVE, NULL); + sys_chroot("."); } static bool is_tmpfs; @@ -783,26 +749,3 @@ int __init init_rootfs(void) return err; } - -static int __init early_prepare_namespace(void) -{ - prepare_namespace(); - return 0; -} -early_init(early_prepare_namespace, EARLY_SUBSYS_1, EARLY_INIT_LEVEL6); - -static char init_prog[128] = "/usr/sbin/early_init"; -static char *init_prog_argv[2] = { init_prog, NULL }; - -static int __init early_userspace_start(void) -{ - int rc; - - rc = call_usermodehelper(init_prog, init_prog_argv, NULL, 0); - if (!rc) - pr_info("early_init launched\n"); - else - pr_err("early_init failed\n"); - return rc; -} -early_init(early_userspace_start, EARLY_SUBSYS_1, EARLY_INIT_LEVEL8); diff --git a/init/early_userspace.c b/init/early_userspace.c deleted file mode 100644 index e47b954d3d74..000000000000 --- a/init/early_userspace.c +++ /dev/null @@ -1,196 +0,0 @@ -/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct subsystem_work { - struct work_struct work; - int id; -}; - -static DECLARE_COMPLETION(populate_done); -static DECLARE_COMPLETION(subsys_done); -static DECLARE_COMPLETION(plat_subsys_done); -static atomic_t subsys_finish = ATOMIC_INIT(EARLY_SUBSYS_NUM); -bool is_early_userspace; -EXPORT_SYMBOL(is_early_userspace); - -static int __init early_userspace(char *p) -{ - is_early_userspace = true; - return 0; -} -early_param("early_userspace", early_userspace); - -static initcall_t *early_initcall_levels[] = { - __early0_initcall_start, - __early1_initcall_start, - __early2_initcall_start, - __early3_initcall_start, - __early4_initcall_start, - __early5_initcall_start, - __early6_initcall_start, - __early7_initcall_start, - __early_initcall_end, -}; - -static void do_early_subsys_init(int id) -{ - int ret; - initcall_t *fn; - - for (fn = early_initcall_levels[id]; fn < early_initcall_levels[id+1]; - fn++) { - ret = (*fn)(); - if (ret) { - print_ip_sym(*((unsigned long *)fn)); - pr_err("fails with %d\n", ret); - } - } -} - -void __ref early_subsys_finish(void) -{ - if (atomic_dec_and_test(&subsys_finish)) { - ftrace_free_init_mem(); - free_initmem(); - } -} - -static void early_subsys_init(struct work_struct *w) -{ - struct subsystem_work *subsys_work = - container_of(w, struct subsystem_work, work); - - do_early_subsys_init(subsys_work->id); - early_subsys_finish(); - kfree(subsys_work); -} - -static void early_system_init(struct work_struct *w) -{ - struct subsystem_work *subsys_work; - int id; - - do_early_subsys_init(EARLY_SUBSYS_PLATFORM); - complete(&plat_subsys_done); - pr_info("early_common_platform initialized\n"); - wait_for_completion(&populate_done); - pr_info("early_subsystems starting\n"); - - for (id = EARLY_SUBSYS_1; id < EARLY_SUBSYS_NUM; id++) { - subsys_work = kzalloc(sizeof(struct subsystem_work), - GFP_KERNEL); - if (subsys_work) { - subsys_work->id = id; - INIT_WORK(&subsys_work->work, early_subsys_init); - queue_work_on(WORK_CPU_UNBOUND, system_unbound_wq, - &subsys_work->work); - } else { - pr_err("no mem to start early_subsys_init\n"); - } - } - kfree(w); -} - -static const struct of_device_id early_devices_match_table[] = { - { .compatible = "qcom,early-devices" }, - { } -}; -MODULE_DEVICE_TABLE(of, early_devices_match_table); - -static int early_devices_probe(struct platform_device *pdev) -{ - struct device_node *early_node; - int i, len = 0; - struct work_struct *work; - struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; - - of_find_property(np, "devices", &len); - for (i = 0; i < len / sizeof(u32); i++) { - early_node = of_parse_phandle(np, "devices", i); - of_platform_node_probe(early_node, pdev->dev.parent); - of_node_put(early_node); - } - work = kzalloc(sizeof(struct work_struct), GFP_KERNEL); - if (work) { - INIT_WORK(work, early_system_init); - queue_work_on(WORK_CPU_UNBOUND, system_unbound_wq, work); - } else { - pr_err("no mem to start early_system_init\n"); - } - - return 0; -} - -static struct platform_driver early_devices_driver = { - .probe = early_devices_probe, - .driver = { - .name = "early-devices", - .of_match_table = early_devices_match_table, - }, -}; - -static int __init early_devices_init(void) -{ - if (is_early_userspace) - return platform_driver_register(&early_devices_driver); - else - return 0; -} -arch_initcall(early_devices_init); - -static void __exit early_devices_exit(void) -{ - if (is_early_userspace) - platform_driver_unregister(&early_devices_driver); -} -module_exit(early_devices_exit); - -static int __init early_populate_sync(void) -{ - complete(&populate_done); - pr_info("early populate_sync start\n"); - if (is_early_userspace) - wait_for_completion(&plat_subsys_done); - pr_info("early populate_sync end\n"); - return 0; -} -subsys_initcall(early_populate_sync); - -static int __init early_subsys_sync(void) -{ - complete(&subsys_done); - return 0; -} -subsys_initcall_sync(early_subsys_sync); - -static int __init early_subsys_wait(void) -{ - pr_info("early subsys wait start\n"); - wait_for_completion(&subsys_done); - pr_info("early subsys wait end\n"); - return 0; -} -early_init(early_subsys_wait, EARLY_SUBSYS_1, EARLY_INIT_LEVEL7); diff --git a/init/initramfs.c b/init/initramfs.c index 9c25a15ec888..87d27f4e1d4c 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -682,4 +682,4 @@ static int __init populate_rootfs(void) return 0; } -early_rootfs_initcall(populate_rootfs, EARLY_SUBSYS_1, EARLY_INIT_LEVEL4); +rootfs_initcall(populate_rootfs); diff --git a/init/main.c b/init/main.c index 2f0d9323ea66..805853c2fb63 100644 --- a/init/main.c +++ b/init/main.c @@ -97,8 +97,6 @@ #include #include -#include "do_mounts.h" - static int kernel_init(void *); extern void init_IRQ(void); @@ -1015,8 +1013,7 @@ static void mark_readonly(void) * flushed so that we don't hit false positives looking for * insecure pages which are W+X. */ - if (!is_early_userspace) - rcu_barrier_sched(); + rcu_barrier_sched(); mark_rodata_ro(); rodata_test(); } else @@ -1032,18 +1029,12 @@ static inline void mark_readonly(void) static int __ref kernel_init(void *unused) { int ret; -#ifdef CONFIG_EARLY_SERVICES - int status = get_early_services_status(); -#endif + kernel_init_freeable(); /* need to finish all async __init code before freeing the memory */ async_synchronize_full(); - if (!is_early_userspace) { - ftrace_free_init_mem(); - free_initmem(); - } else { - early_subsys_finish(); - } + ftrace_free_init_mem(); + free_initmem(); mark_readonly(); system_state = SYSTEM_RUNNING; numa_default_policy(); @@ -1051,14 +1042,6 @@ static int __ref kernel_init(void *unused) rcu_end_inkernel_boot(); place_marker("M - DRIVER Kernel Boot Done"); -#ifdef CONFIG_EARLY_SERVICES - if (status) { - struct kstat stat; - /* Wait for early services SE policy load completion signal */ - while (vfs_stat("/dev/sedone", &stat) != 0) - ; - } -#endif if (ramdisk_execute_command) { ret = run_init_process(ramdisk_execute_command); if (!ret) diff --git a/lib/sg_pool.c b/lib/sg_pool.c index 6c5a1389478c..6dd30615a201 100644 --- a/lib/sg_pool.c +++ b/lib/sg_pool.c @@ -168,5 +168,5 @@ static __exit void sg_pool_exit(void) } } -early_module_init(sg_pool_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(sg_pool_init); module_exit(sg_pool_exit); diff --git a/net/core/dev.c b/net/core/dev.c index 98280e4deba3..4af3fa399e22 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8912,4 +8912,4 @@ out: return rc; } -early_subsys_initcall(net_dev_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +subsys_initcall(net_dev_init); diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 83e0c5f4a8ec..091e93798eac 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2973,7 +2973,7 @@ static void __exit af_unix_exit(void) request_module() don't end up in a loop when modprobe tries to use a UNIX socket. But later than subsys_initcall() because we depend on stuff initialised there */ -early_fs_initcall(af_unix_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +fs_initcall(af_unix_init); module_exit(af_unix_exit); MODULE_LICENSE("GPL"); diff --git a/security/pfe/pfk.c b/security/pfe/pfk.c index 2419404d5c13..e7f5b5a578f1 100644 --- a/security/pfe/pfk.c +++ b/security/pfe/pfk.c @@ -564,7 +564,7 @@ void pfk_clear_on_reset(void) pfk_kc_clear_on_reset(); } -early_module_init(pfk_init, EARLY_SUBSYS_PLATFORM, EARLY_INIT_LEVEL8); +module_init(pfk_init); module_exit(pfk_exit); MODULE_LICENSE("GPL v2");