cpumask: factor out show_cpumap into separate helper function