}
 }
 
+#ifdef CONFIG_X86_IO_APIC
+
 static int bad_ioapic(unsigned long address)
 {
        if (nr_ioapics >= MAX_IO_APICS) {
                panic("Max # of irq sources exceeded!!\n");
 }
 
+#endif
+
 static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m)
 {
        Dprintk("Lint: type %d, pol %d, trig %d, bus %d,"
                        }
                        case MP_IOAPIC:
                        {
+#ifdef CONFIG_X86_IO_APIC
                                struct mpc_config_ioapic *m=
                                        (struct mpc_config_ioapic *)mpt;
                                MP_ioapic_info(m);
                                mpt+=sizeof(*m);
                                count+=sizeof(*m);
+#endif
                                break;
                        }
                        case MP_INTSRC:
                        {
+#ifdef CONFIG_X86_IO_APIC
                                struct mpc_config_intsrc *m=
                                        (struct mpc_config_intsrc *)mpt;
 
                                MP_intsrc_info(m);
                                mpt+=sizeof(*m);
                                count+=sizeof(*m);
+#endif
                                break;
                        }
                        case MP_LINTSRC:
        return num_processors;
 }
 
+#ifdef CONFIG_X86_IO_APIC
+
 static int __init ELCR_trigger(unsigned int irq)
 {
        unsigned int port;
        MP_intsrc_info(&intsrc);
 }
 
+#endif
+
 static inline void __init construct_default_ISA_mptable(int mpc_default_type)
 {
        struct mpc_config_processor processor;
        struct mpc_config_bus bus;
+#ifdef CONFIG_X86_IO_APIC
        struct mpc_config_ioapic ioapic;
+#endif
        struct mpc_config_lintsrc lintsrc;
        int linttypes[2] = { mp_ExtINT, mp_NMI };
        int i;
                MP_bus_info(&bus);
        }
 
+#ifdef CONFIG_X86_IO_APIC
        ioapic.mpc_type = MP_IOAPIC;
        ioapic.mpc_apicid = 2;
        ioapic.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
         * We set up most of the low 16 IO-APIC pins according to MPS rules.
         */
        construct_default_ioirq_mptable(mpc_default_type);
-
+#endif
        lintsrc.mpc_type = MP_LINTSRC;
        lintsrc.mpc_irqflag = 0;                /* conforming */
        lintsrc.mpc_srcbusid = 0;
                        printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n");
                        return;
                }
+
+#ifdef CONFIG_X86_IO_APIC
                /*
                 * If there are no explicit MP IRQ entries, then we are
                 * broken.  We set up most of the low 16 IO-APIC pins to
 
                        construct_default_ioirq_mptable(0);
                }
-
+#endif
        } else
                BUG();
 
        intsrc.mpc_type = MP_INTSRC;
        intsrc.mpc_irqflag = 0;                                 /* Conforming */
        intsrc.mpc_srcbus = MP_ISA_BUS;
+#ifdef CONFIG_X86_IO_APIC
        intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
-
+#endif
        /* 
         * Use the default configuration for the IRQs 0-15.  Unless
         * overridden by (MADT) interrupt source override entries.