Lines Matching refs:cpu_drcs
642 static int find_dlpar_cpus_to_remove(u32 *cpu_drcs, int cpus_to_remove) in find_dlpar_cpus_to_remove() argument
663 &cpu_drcs[cpus_found - 1]); in find_dlpar_cpus_to_remove()
684 u32 *cpu_drcs; in dlpar_cpu_remove_by_count() local
691 cpu_drcs = kcalloc(cpus_to_remove, sizeof(*cpu_drcs), GFP_KERNEL); in dlpar_cpu_remove_by_count()
692 if (!cpu_drcs) in dlpar_cpu_remove_by_count()
695 cpus_found = find_dlpar_cpus_to_remove(cpu_drcs, cpus_to_remove); in dlpar_cpu_remove_by_count()
697 kfree(cpu_drcs); in dlpar_cpu_remove_by_count()
702 rc = dlpar_cpu_remove_by_index(cpu_drcs[i]); in dlpar_cpu_remove_by_count()
713 dlpar_cpu_add(cpu_drcs[i]); in dlpar_cpu_remove_by_count()
720 kfree(cpu_drcs); in dlpar_cpu_remove_by_count()
724 static int find_dlpar_cpus_to_add(u32 *cpu_drcs, u32 cpus_to_add) in find_dlpar_cpus_to_add() argument
733 kfree(cpu_drcs); in find_dlpar_cpus_to_add()
754 cpu_drcs[cpus_found++] = drc; in find_dlpar_cpus_to_add()
763 u32 *cpu_drcs; in dlpar_cpu_add_by_count() local
770 cpu_drcs = kcalloc(cpus_to_add, sizeof(*cpu_drcs), GFP_KERNEL); in dlpar_cpu_add_by_count()
771 if (!cpu_drcs) in dlpar_cpu_add_by_count()
774 cpus_found = find_dlpar_cpus_to_add(cpu_drcs, cpus_to_add); in dlpar_cpu_add_by_count()
778 kfree(cpu_drcs); in dlpar_cpu_add_by_count()
783 rc = dlpar_cpu_add(cpu_drcs[i]); in dlpar_cpu_add_by_count()
794 dlpar_cpu_remove_by_index(cpu_drcs[i]); in dlpar_cpu_add_by_count()
801 kfree(cpu_drcs); in dlpar_cpu_add_by_count()