[PATCH 2/2] riscv: rewrite __kernel_map_pages() to fix sleeping in invalid context