x86: move pgalloc pud and pgd operations into common place