riscv: move switch_mm to its own file