x86: mm: introduce helper function in fault.c