# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1482  -> 1.1483 
#	arch/x86_64/kernel/setup.c	1.24    -> 1.25   
#	arch/x86_64/kernel/acpi/boot.c	1.9     -> 1.10   
#	arch/i386/kernel/dmi_scan.c	1.50    -> 1.51   
#	arch/i386/pci/common.c	1.41    -> 1.42   
#	arch/i386/kernel/setup.c	1.102   -> 1.103  
#	 arch/i386/pci/pci.h	1.15    -> 1.16   
#	arch/i386/pci/acpi.c	1.11    -> 1.12   
#	include/asm-x86_64/acpi.h	1.3     -> 1.4    
#	arch/i386/kernel/acpi/boot.c	1.37    -> 1.38   
#	include/asm-i386/acpi.h	1.10    -> 1.11   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/12/11	len.brown@intel.com	1.1483
# [ACPI] replace multiple flags with acpi_noirq -- ala 2.4
# --------------------------------------------
#
diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
--- a/arch/i386/kernel/acpi/boot.c	Thu Dec 11 21:19:57 2003
+++ b/arch/i386/kernel/acpi/boot.c	Thu Dec 11 21:19:57 2003
@@ -40,9 +40,8 @@
 
 #define PREFIX			"ACPI: "
 
-extern int acpi_disabled;
-extern int acpi_irq;
-extern int acpi_ht;
+int acpi_noirq __initdata = 0;	/* skip ACPI IRQ initialization */
+int acpi_ht __initdata = 1;	/* enable HT */
 
 int acpi_lapic = 0;
 int acpi_ioapic = 0;
@@ -499,7 +498,7 @@
 	 * If MPS is present, it will handle them,
 	 * otherwise the system will stay in PIC mode
 	 */
-	if (acpi_disabled || !acpi_irq) {
+	if (acpi_disabled || acpi_noirq) {
 		return 1;
         }
 
diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c
--- a/arch/i386/kernel/dmi_scan.c	Thu Dec 11 21:19:57 2003
+++ b/arch/i386/kernel/dmi_scan.c	Thu Dec 11 21:19:57 2003
@@ -6,6 +6,7 @@
 #include <linux/module.h>
 #include <linux/apm_bios.h>
 #include <linux/slab.h>
+#include <asm/acpi.h>
 #include <asm/io.h>
 #include <linux/pm.h>
 #include <asm/system.h>
@@ -505,6 +506,7 @@
 }
 
 
+#ifdef	CONFIG_ACPI_BOOT
 extern int acpi_disabled, acpi_force;
 
 static __init __attribute__((unused)) int acpi_disable(struct dmi_blacklist *d) 
@@ -519,8 +521,6 @@
 	return 0;
 } 
 
-
-#ifdef	CONFIG_ACPI_BOOT
 extern int acpi_ht;
 
 /*
@@ -543,10 +543,8 @@
 #ifdef	CONFIG_ACPI_PCI
 static __init int disable_acpi_pci(struct dmi_blacklist *d) 
 { 
-	extern __init void pci_disable_acpi(void) ;
-
 	printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident); 	
-	pci_disable_acpi();
+	acpi_noirq_set();
 	return 0;
 } 
 #endif
diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c	Thu Dec 11 21:19:57 2003
+++ b/arch/i386/kernel/setup.c	Thu Dec 11 21:19:57 2003
@@ -72,13 +72,10 @@
 EXPORT_SYMBOL(acpi_disabled);
 
 #ifdef	CONFIG_ACPI_BOOT
-	int acpi_irq __initdata = 1;	/* enable IRQ */
-	int acpi_ht __initdata = 1;	/* enable HT */
+extern int __initdata acpi_ht;
+int __initdata acpi_force = 0;
 #endif
 
-int acpi_force __initdata = 0;
-
-
 int MCA_bus;
 /* for MCA, but anyone else can use it if they want */
 unsigned int machine_id;
@@ -550,7 +547,7 @@
 
 		/* "pci=noacpi" disables ACPI interrupt routing */
 		else if (!memcmp(from, "pci=noacpi", 10)) {
-			acpi_irq = 0;
+			acpi_noirq_set();
 		}
 
 #ifdef CONFIG_X86_LOCAL_APIC
diff -Nru a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
--- a/arch/i386/pci/acpi.c	Thu Dec 11 21:19:57 2003
+++ b/arch/i386/pci/acpi.c	Thu Dec 11 21:19:57 2003
@@ -18,7 +18,7 @@
 	if (pcibios_scanned)
 		return 0;
 
-	if (!(pci_probe & PCI_NO_ACPI_ROUTING)) {
+	if (!acpi_noirq) {
 		if (!acpi_pci_irq_init()) {
 			printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
 			printk(KERN_INFO "PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'\n");
@@ -31,15 +31,4 @@
 
 	return 0;
 }
-
-/*
- * pci_disable_acpi()
- * act like pci=noacpi seen on command line
- * called by DMI blacklist code
- */
-__init void pci_disable_acpi(void)
-{
-        pci_probe |= PCI_NO_ACPI_ROUTING;
-}
-
 subsys_initcall(pci_acpi_init);
diff -Nru a/arch/i386/pci/common.c b/arch/i386/pci/common.c
--- a/arch/i386/pci/common.c	Thu Dec 11 21:19:57 2003
+++ b/arch/i386/pci/common.c	Thu Dec 11 21:19:57 2003
@@ -9,6 +9,7 @@
 #include <linux/ioport.h>
 #include <linux/init.h>
 
+#include <asm/acpi.h>
 #include <asm/segment.h>
 #include <asm/io.h>
 #include <asm/smp.h>
@@ -197,12 +198,10 @@
 		return NULL;
 	}
 #endif
-#ifdef CONFIG_ACPI_PCI
 	else if (!strcmp(str, "noacpi")) {
-		pci_probe |= PCI_NO_ACPI_ROUTING;
+		acpi_noirq_set();
 		return NULL;
 	}
-#endif
 #ifndef CONFIG_X86_VISWS
 	else if (!strcmp(str, "usepirqmask")) {
 		pci_probe |= PCI_USE_PIRQ_MASK;
diff -Nru a/arch/i386/pci/pci.h b/arch/i386/pci/pci.h
--- a/arch/i386/pci/pci.h	Thu Dec 11 21:19:57 2003
+++ b/arch/i386/pci/pci.h	Thu Dec 11 21:19:57 2003
@@ -22,7 +22,6 @@
 #define PCI_ASSIGN_ROMS		0x1000
 #define PCI_BIOS_IRQ_SCAN	0x2000
 #define PCI_ASSIGN_ALL_BUSSES	0x4000
-#define PCI_NO_ACPI_ROUTING	0x8000
 
 extern unsigned int pci_probe;
 
diff -Nru a/arch/x86_64/kernel/acpi/boot.c b/arch/x86_64/kernel/acpi/boot.c
--- a/arch/x86_64/kernel/acpi/boot.c	Thu Dec 11 21:19:57 2003
+++ b/arch/x86_64/kernel/acpi/boot.c	Thu Dec 11 21:19:57 2003
@@ -46,11 +46,13 @@
 #include <asm/proto.h>
 #include <asm/tlbflush.h>
 
-int acpi_lapic = 0;
-int acpi_ioapic = 0;
-
 #define PREFIX			"ACPI: "
 
+int acpi_noirq __initdata = 0;	/* skip ACPI IRQ initialization */
+int acpi_ht __initdata = 1;	/* enable HT */
+
+int acpi_lapic = 0;
+int acpi_ioapic = 0;
 
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
@@ -267,7 +269,7 @@
  * ECLR2 is IRQ's 8-15 (IRQ 8, 13 must be 0)
  */
 
-static __initdata	acpi_pic_sci_trigger;	/* 0: level, 1: edge */
+static int __initdata	acpi_pic_sci_trigger;	/* 0: level, 1: edge */
 
 void __init
 acpi_pic_sci_set_trigger(unsigned int irq)
@@ -479,7 +481,7 @@
         * If MPS is present, it will handle them,
         * otherwise the system will stay in PIC mode
         */
-        if (acpi_disabled) {
+        if (acpi_disabled || acpi_noirq) {
                return 1;
 	}
 
diff -Nru a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
--- a/arch/x86_64/kernel/setup.c	Thu Dec 11 21:19:57 2003
+++ b/arch/x86_64/kernel/setup.c	Thu Dec 11 21:19:57 2003
@@ -65,7 +65,11 @@
 EXPORT_SYMBOL_GPL(mmu_cr4_features);
 
 int acpi_disabled = 0;
-int acpi_ht = 0;
+
+#ifdef	CONFIG_ACPI_BOOT
+extern int __initdata acpi_ht;
+/* int __initdata acpi_force = 0; */
+#endif
 
 /* For PCI or other memory-mapped resources */
 unsigned long pci_mem_start = 0x10000000;
@@ -195,6 +199,7 @@
 		if (c != ' ') 
 			goto next_char; 
  
+#ifdef CONFIG_ACPI_BOOT
 		/* "acpi=off" disables both ACPI table parsing and interpreter init */
 		if (!memcmp(from, "acpi=off", 8))
 			acpi_disabled = 1;
@@ -210,6 +215,7 @@
 		if (!memcmp(from, "acpi=ht", 7)) { 
 			acpi_ht = 1; 
 		}
+#endif
 
 		if (!memcmp(from, "nolapic", 7) ||
 		    !memcmp(from, "disableapic", 11))
diff -Nru a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h
--- a/include/asm-i386/acpi.h	Thu Dec 11 21:19:57 2003
+++ b/include/asm-i386/acpi.h	Thu Dec 11 21:19:57 2003
@@ -109,7 +109,7 @@
 #ifdef CONFIG_ACPI_BOOT 
 extern int acpi_lapic;
 extern int acpi_ioapic;
-
+extern int acpi_noirq;
 
 /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
 #define FIX_ACPI_PAGES 4
@@ -140,8 +140,10 @@
 #endif
 
 #ifdef CONFIG_ACPI_PCI
+static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
 extern int acpi_irq_balance_set(char *str);
 #else
+static inline void acpi_noirq_set(void) { }
 static inline int acpi_irq_balance_set(char *str) { return 0; }
 #endif
 
diff -Nru a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h
--- a/include/asm-x86_64/acpi.h	Thu Dec 11 21:19:57 2003
+++ b/include/asm-x86_64/acpi.h	Thu Dec 11 21:19:57 2003
@@ -104,29 +104,24 @@
         :"0"(n_hi), "1"(n_lo))
 
 
-#ifndef CONFIG_ACPI_BOOT
-#define acpi_lapic 0
-#define acpi_ioapic 0
-#else
-#ifdef CONFIG_X86_LOCAL_APIC
+#ifdef CONFIG_ACPI_BOOT
 extern int acpi_lapic;
-#else
-#define acpi_lapic 0
-#endif
-#ifdef CONFIG_X86_IO_APIC
 extern int acpi_ioapic;
-#else
-#define acpi_ioapic 0
-#endif
+extern int acpi_noirq;
 
 /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
 #define FIX_ACPI_PAGES 4
 
-#endif /*CONFIG_ACPI_BOOT*/
+#else	/* !CONFIG_ACPI_BOOT */
+#define acpi_lapic 0
+#define acpi_ioapic 0
+#endif /* !CONFIG_ACPI_BOOT */
 
 #ifdef CONFIG_ACPI_PCI
+static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
 extern int acpi_irq_balance_set(char *str);
 #else
+static inline void acpi_noirq_set(void) { }
 static inline int acpi_irq_balance_set(char *str) { return 0; }
 #endif