smartactive: cherry-picked from iron kernel