irqchip: gic: Fix core ID calculation when topology is read from DT