Merge "hal: Add performance lock during device switch"