swconfig: use a mutex instead of a spinlock, many swconfig calls sleep