x86: put get_kernel_rpl in a common location