powerpc/mm: factor out creating/removing linear mapping