#define MAX_IO_PICS 2
 #define NR_IRQS        (64 + (256 * MAX_IO_PICS))
 
+struct acpi_vector_group {
+       int node;
+       int pci_segment;
+       struct irq_domain *parent;
+};
+extern struct acpi_vector_group pch_group[MAX_IO_PICS];
+extern struct acpi_vector_group msi_group[MAX_IO_PICS];
+
 #define CORES_PER_EIO_NODE     4
 
 #define LOONGSON_CPU_UART0_VEC         10 /* CPU UART0 */
 
 struct irq_domain *pch_msi_domain[MAX_IO_PICS];
 struct irq_domain *pch_pic_domain[MAX_IO_PICS];
 
+struct acpi_vector_group pch_group[MAX_IO_PICS];
+struct acpi_vector_group msi_group[MAX_IO_PICS];
 /*
  * 'what should we do if we get a hw irq event on an illegal vector'.
  * each architecture has to answer this themselves.
        return 0;
 }
 
+static int __init early_pci_mcfg_parse(struct acpi_table_header *header)
+{
+       struct acpi_table_mcfg *mcfg;
+       struct acpi_mcfg_allocation *mptr;
+       int i, n;
+
+       if (header->length < sizeof(struct acpi_table_mcfg))
+               return -EINVAL;
+
+       n = (header->length - sizeof(struct acpi_table_mcfg)) /
+                                       sizeof(struct acpi_mcfg_allocation);
+       mcfg = (struct acpi_table_mcfg *)header;
+       mptr = (struct acpi_mcfg_allocation *) &mcfg[1];
+
+       for (i = 0; i < n; i++, mptr++) {
+               msi_group[i].pci_segment = mptr->pci_segment;
+               pch_group[i].node = msi_group[i].node = (mptr->address >> 44) & 0xf;
+       }
+
+       return 0;
+}
+
+static void __init init_vec_parent_group(void)
+{
+       int i;
+
+       for (i = 0; i < MAX_IO_PICS; i++) {
+               msi_group[i].pci_segment = -1;
+               msi_group[i].node = -1;
+               pch_group[i].node = -1;
+       }
+
+       acpi_table_parse(ACPI_SIG_MCFG, early_pci_mcfg_parse);
+}
+
 void __init init_IRQ(void)
 {
        int i;
        clear_csr_ecfg(ECFG0_IM);
        clear_csr_estat(ESTATF_IP);
 
+       init_vec_parent_group();
        irqchip_init();
 #ifdef CONFIG_SMP
        ipi_irq = EXCCODE_IPI - EXCCODE_INT_START;