/* Hook to Linux PM */ void mtkpasr_phaseone_ops(void) { IS_MTKPASR_ENABLED_NORV; /* It means no need to apply this op (Simply for paging or other periodic wakeups) */ if (is_mtkpasr_triggered()) { return; } MTKPASR_START_PROFILE(); #ifdef CONFIG_MTKPASR_MAFL if (mtkpasr_no_phaseone_ops()) goto no_phaseone; #endif mtkpasr_info("\n"); /* Drop cache - linux/mm.h */ drop_pagecache(); #ifdef CONFIG_MTKPASR_MAFL no_phaseone: #endif MTKPASR_END_PROFILE(); }
/* Hook to Linux PM */ void mtkpasr_phaseone_ops(void) { MTKPASR_START_PROFILE(); #ifdef CONFIG_MTKPASR_MAFL if (mtkpasr_no_phaseone_ops()) goto no_phaseone; #endif mtkpasr_info("\n"); /* Drop cache - linux/mm.h */ drop_pagecache(); #ifdef CONFIG_MTKPASR_MAFL no_phaseone: #endif MTKPASR_END_PROFILE(); }
/* Hook to Linux PM */ void mtkpasr_phaseone_ops(void) { struct wd_api *wd_api = NULL; /* To restart wdt */ if (get_wd_api(&wd_api) == 0) { mtkpasr_log("PASR kicks WDT!\n"); wd_api->wd_restart(WD_TYPE_NORMAL); } IS_MTKPASR_ENABLED_NORV; /* It means no need to apply this op (Simply for paging or other periodic wakeups) */ if (is_mtkpasr_triggered()) { return; } MTKPASR_START_PROFILE(); /* It will go to MTKPASR stage */ current->flags |= PF_MTKPASR; /* Inform all other memory pools to release their memory */ try_to_shrink_slab(); /* It will leave MTKPASR stage */ current->flags &= ~PF_MTKPASR; #ifdef CONFIG_MTKPASR_MAFL if (mtkpasr_no_phaseone_ops()) goto no_phaseone; #endif mtkpasr_info("\n"); /* Drop cache - linux/mm.h */ drop_pagecache(); #ifdef CONFIG_MTKPASR_MAFL no_phaseone: #endif MTKPASR_END_PROFILE(); }