Not a comment, but a question: why do we need nr_cpu_ids at all?
num_possible_cpus() looks more "correct" if cpu_possible_map has
holes (not sure this can happen in practice).
Another off-topic question: shouldn't we kill the unused "retry"
parameter of on_each_cpu() instead of mirroring it here?
Small nit, kfree(NULL) is OK.
Oleg.
-