init: Import oplus changes

Change-Id: Ic8ee9c559fe059c0a8ba654f0fa036e664f8ec5b
Signed-off-by: Pranaya Deomani <pranayadeomani@protonmail.com>
This commit is contained in:
Pranaya Deomani
2021-12-25 18:04:04 +05:30
parent 0d8e9f34db
commit bef98fdb48
2 changed files with 60 additions and 1 deletions

View File

@@ -1055,6 +1055,18 @@ config SOCK_CGROUP_DATA
endif # CGROUPS
#ifdef OPLUS_FEATURE_CORE_CTL
config SCHED_CORE_CTL
bool "Sched Core Control"
depends on SMP
help
This options enables the core control functionality in
the scheduler. Core control automatically offline and
online cores based on cpu load and utilization.
If unsure, say N here.
#endif /* OPLUS_FEATURE_CORE_CTL */
config CHECKPOINT_RESTORE
bool "Checkpoint/restore support" if EXPERT
select PROC_CHILDREN
@@ -1869,7 +1881,7 @@ config HAVE_GENERIC_DMA_COHERENT
config SLABINFO
bool
depends on PROC_FS
depends on SLAB || SLUB_DEBUG
depends on SLAB || SLUB_DEBUG || KMALLOC_DEBUG
default y
config RT_MUTEXES

47
init/main.c Normal file → Executable file
View File

@@ -99,6 +99,11 @@
#include <mt-plat/mtk_ram_console.h>
#endif
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@TECH.BSP.Stability.PHOENIX_PROJECT 2019/06/11, Add for phoenix project
#include "../drivers/soc/oplus/system/oppo_phoenix/oppo_phoenix.h"
#endif
static int kernel_init(void *);
extern void init_IRQ(void);
@@ -598,6 +603,11 @@ asmlinkage __visible void __init start_kernel(void)
sort_main_extable();
trap_init();
mm_init();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@PSW.TECH.RELIABILTY, 2018/11/15, add for project phoenix(hang oppo)
if(phx_set_boot_stage)
phx_set_boot_stage(KERNEL_MM_INIT_DONE);
#endif
ftrace_init();
@@ -651,6 +661,12 @@ asmlinkage __visible void __init start_kernel(void)
WARN(!irqs_disabled(), "Interrupts were enabled early\n");
early_boot_irqs_disabled = false;
local_irq_enable();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@TECH.BSP.Stability.PHOENIX_PROJECT 2019/06/11, Add for phoenix project
if(phx_set_boot_stage) {
phx_set_boot_stage(KERNEL_LOCAL_IRQ_ENABLE);
}
#endif
kmem_cache_init_late();
@@ -721,6 +737,12 @@ asmlinkage __visible void __init start_kernel(void)
cgroup_init();
taskstats_init_early();
delayacct_init();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@PSW.TECH.RELIABILTY, 2018/11/15, add for project phoenix(hang oppo)
if(phx_set_boot_stage) {
phx_set_boot_stage(KERNEL_DELAYACCT_INIT_DONE);
}
#endif
check_bugs();
@@ -957,10 +979,21 @@ static void __init do_basic_setup(void)
cpuset_init_smp();
shmem_init();
driver_init();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@TECH.BSP.Stability.PHOENIX_PROJECT 2019/06/11, Add for phoenix project
if(phx_set_boot_stage) {
phx_set_boot_stage(KERNEL_DRIVER_INIT_DONE);
}
#endif
init_irq_proc();
do_ctors();
usermodehelper_enable();
do_initcalls();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@TECH.BSP.Stability.PHOENIX_PROJECT 2019/06/11, Add for phoenix project
if(phx_set_boot_stage)
phx_set_boot_stage(KERNEL_DO_INITCALLS_DONE);
#endif
}
static void __init do_pre_smp_initcalls(void)
@@ -1052,6 +1085,14 @@ static int __ref kernel_init(void *unused)
numa_default_policy();
rcu_end_inkernel_boot();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@TECH.BSP.Stability.PHOENIX_PROJECT 2019/06/11, Add for phoenix project
if(phx_set_boot_stage) {
phx_set_boot_stage(KERNEL_INIT_DONE);
}
#endif
#ifdef CONFIG_MTPROF
log_boot("Kernel_init_done");
#endif
@@ -1121,6 +1162,12 @@ static noinline void __init kernel_init_freeable(void)
do_basic_setup();
#ifdef OPLUS_FEATURE_PHOENIX
// Kun.Hu@TECH.BSP.Stability.PHOENIX_PROJECT 2019/06/11, Add for phoenix project
if(phx_set_boot_stage) {
phx_set_boot_stage(KERNEL_DO_BASIC_SETUP_DONE);
}
#endif
/* Open the /dev/console on the rootfs, this should never fail */
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
pr_err("Warning: unable to open an initial console.\n");