kernel: add a flags argument to LOCK_SYSINIT