When we restrict the cpumask it probably means we are unable to
sent interrupts to CPUs outside the map. As such only return the
current CPU when it's within the mask otherwise return the first
valid CPU.
This is needed on ThunderX as, in a dual socket configuration, we
are unable to send MSI/MSI-X interrupts between sockets.