http://linux-acpi.bkbits.net/linux-acpi-test-mm len.brown@intel.com|ChangeSet|20041111084208|09024 len.brown # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/11/15 20:44:07-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # arch/i386/kernel/apic.c # 2004/11/15 20:44:03-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/14 21:11:19-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # arch/x86_64/kernel/io_apic.c # 2004/11/14 21:11:14-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/14 21:11:14-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/13 14:17:17-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # arch/i386/kernel/acpi/boot.c # 2004/11/13 14:17:13-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/13 14:17:13-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/11 14:52:04-08:00 akpm@bix.(none) # Merge http://linux-acpi.bkbits.net/linux-acpi-test-mm # into bix.(none):/usr/src/bk-acpi # # include/asm-x86_64/processor.h # 2004/11/11 14:51:59-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pnp/pnpbios/core.c # 2004/11/11 14:51:59-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/acpi/sleep/main.c # 2004/11/11 14:51:59-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/process.c # 2004/11/11 14:51:59-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/11/11 14:51:59-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/11 14:51:59-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/11 03:42:08-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # include/asm-i386/acpi.h # 2004/11/11 03:42:04-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/11/11 03:42:04-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/Makefile # 2004/11/11 03:42:04-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/11 03:33:51-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # include/asm-i386/acpi.h # 2004/11/11 03:33:47-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/11/11 03:33:47-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/11 03:29:23-05:00 len.brown@intel.com # [ACPI] clean up the NFORCE BIOS bug workaround # delete now obsolete dmi_scan entries # fix build for ACPI & !IOAPIC # # Signed-off-by: Len Brown # # include/asm-i386/acpi.h # 2004/11/11 03:29:15-05:00 len.brown@intel.com +2 -2 # acpi_skip_timer_override # # arch/i386/kernel/dmi_scan.c # 2004/11/11 03:29:15-05:00 len.brown@intel.com +0 -56 # acpi_skip_timer_override # # arch/i386/kernel/acpi/Makefile # 2004/11/11 03:29:14-05:00 len.brown@intel.com +2 -1 # acpi_skip_timer_override # # ChangeSet # 2004/11/11 02:58:05-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-hotplug # into intel.com:/home/lenb/bk/26-latest-mm # # include/linux/acpi.h # 2004/11/11 02:58:02-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/11/11 02:58:02-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/11 02:58:02-05:00 len.brown@intel.com +0 -5 # Auto merged # # drivers/acpi/pci_irq.c # 2004/11/11 02:58:01-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/bus.c # 2004/11/11 02:58:01-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/11/11 02:58:01-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/11 02:56:38-05:00 len.brown@intel.com # [ACPI] CPU hotplug, use kobject_hotplug(), kobject_register() # # Signed-off-by: Anil S. Keshavamurthy # Signed-off-by: Len Brown # # drivers/acpi/scan.c # 2004/11/11 02:56:31-05:00 len.brown@intel.com +1 -2 # Use kobject_register() # # drivers/acpi/processor.c # 2004/11/11 02:56:31-05:00 len.brown@intel.com +4 -54 # Use kobject_hotplug() # # drivers/acpi/container.c # 2004/11/11 02:56:31-05:00 len.brown@intel.com +3 -49 # Use kobject_hotplug() # # ChangeSet # 2004/11/11 02:44:40-05:00 len.brown@intel.com # merge # # include/linux/acpi.h # 2004/11/11 02:44:32-05:00 len.brown@intel.com +0 -0 # merge # # drivers/acpi/scan.c # 2004/11/11 02:44:32-05:00 len.brown@intel.com +0 -0 # merge # # drivers/acpi/processor.c # 2004/11/11 02:44:32-05:00 len.brown@intel.com +5 -4 # merge # # ChangeSet # 2004/11/11 02:35:00-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # include/asm-i386/acpi.h # 2004/11/11 02:34:56-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/11/11 02:34:56-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/Makefile # 2004/11/11 02:34:56-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/11 02:22:23-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # include/asm-i386/acpi.h # 2004/11/11 02:22:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/11/11 02:22:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/11 00:59:04-05:00 len.brown@intel.com # [ACPI] automatic workaround for NFORCE timer-override BIOS bug # http://bugzilla.kernel.org/show_bug.cgi?id=3551 # # Signed-off-by: Andi Kleen # Signed-off-by: Len Brown # # include/asm-i386/pci-direct.h # 2004/11/11 00:58:57-05:00 len.brown@intel.com +1 -0 # # include/asm-i386/pci-direct.h # 2004/11/11 00:58:57-05:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/include/asm-i386/pci-direct.h # # arch/i386/kernel/acpi/earlyquirk.c # 2004/11/11 00:58:56-05:00 len.brown@intel.com +51 -0 # # include/asm-i386/acpi.h # 2004/11/11 00:58:56-05:00 len.brown@intel.com +2 -0 # workaround NFORCE timer-override bug # # arch/i386/kernel/acpi/earlyquirk.c # 2004/11/11 00:58:56-05:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-stable-dev/arch/i386/kernel/acpi/earlyquirk.c # # arch/i386/kernel/acpi/boot.c # 2004/11/11 00:58:56-05:00 len.brown@intel.com +4 -0 # workaround NFORCE timer-override bug # # arch/i386/kernel/acpi/Makefile # 2004/11/11 00:58:56-05:00 len.brown@intel.com +1 -1 # workaround NFORCE timer-override bug # # ChangeSet # 2004/11/11 00:38:20-05:00 len.brown@intel.com # [ACPI] migrate to seq_file() interface # http://bugzilla.kernel.org/show_bug.cgi?id=3333 # # Signed-off-by: David Shaohua Li # Signed-off-by: Len Brown # # drivers/acpi/system.c # 2004/09/19 21:59:22-04:00 len.brown@intel.com +20 -25 # use seq_file() # # drivers/acpi/fan.c # 2004/09/19 21:59:00-04:00 len.brown@intel.com +24 -26 # use seq_file() # # drivers/acpi/ec.c # 2004/09/19 21:56:23-04:00 len.brown@intel.com +26 -24 # use seq_file() # # drivers/acpi/battery.c # 2004/09/19 21:12:24-04:00 len.brown@intel.com +99 -106 # use seq_file() # # ChangeSet # 2004/11/11 00:15:31-05:00 len.brown@intel.com # [ACPI] handle out of spec EC bit width # http://bugzilla.kernel.org/show_bug.cgi?id=1744 # # Signed-off-by: Luming Yu # Signed-off-by: Len Brown # # drivers/acpi/ec.c # 2004/11/11 00:15:23-05:00 len.brown@intel.com +8 -1 # continue even when bit_width != 8 # # drivers/acpi/pci_irq.c # 2004/11/10 23:16:23-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/bus.c # 2004/11/10 23:16:23-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/11/10 23:16:17-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/10 17:19:45-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # arch/i386/kernel/io_apic.c # 2004/11/10 17:19:40-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/10 18:30:19-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # include/asm-i386/acpi.h # 2004/11/10 18:30:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/11/10 18:30:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/10 18:30:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/11/10 18:30:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/11/10 18:30:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/10 18:30:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/10 17:57:44-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # include/asm-x86_64/processor.h # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-ia64/processor.h # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/processor.h # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/acpi.h # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/acpi/acpiosxf.h # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/pnpbios/rsparser.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/pnpbios/core.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/isapnp/core.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/interface.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/thermal.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/sleep/main.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/osl.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/motherboard.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/process.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/process.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/mach-es7000/es7000plat.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +3 -1 # Auto merged # # arch/i386/kernel/process.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/apic.c # 2004/11/10 17:57:35-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/10 17:57:34-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/10 17:33:48-05:00 len.brown@intel.com # Merge # # include/asm-x86_64/processor.h # 2004/11/10 17:33:47-05:00 len.brown@intel.com +0 -0 # SCCS merged # # include/asm-i386/processor.h # 2004/11/10 17:33:47-05:00 len.brown@intel.com +0 -0 # SCCS merged # # ChangeSet # 2004/11/10 15:50:27-05:00 len.brown@intel.com # merge # # arch/i386/mach-es7000/es7000plat.c # 2004/11/10 15:50:17-05:00 len.brown@intel.com +0 -63 # merge # # Documentation/kernel-parameters.txt # 2004/11/10 15:50:17-05:00 len.brown@intel.com +0 -0 # merge # # include/asm-ia64/processor.h # 2004/11/10 15:40:30-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/acpi.h # 2004/11/10 15:40:30-05:00 len.brown@intel.com +0 -0 # Auto merged # # include/acpi/acpiosxf.h # 2004/11/10 15:40:30-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/pnpbios/rsparser.c # 2004/11/10 15:40:30-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/pnpbios/core.c # 2004/11/10 15:40:30-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/isapnp/core.c # 2004/11/10 15:40:30-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/pnp/interface.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/thermal.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/sleep/main.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/osl.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/motherboard.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/process.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/process.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/process.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/apic.c # 2004/11/10 15:40:29-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/09 04:12:53-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # include/asm-i386/acpi.h # 2004/11/09 04:12:50-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/pci_irq.c # 2004/11/09 04:12:50-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/mpparse.c # 2004/11/09 04:12:50-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/09 04:09:53-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-stable-dev # into intel.com:/home/lenb/src/26-latest-dev # # include/asm-i386/acpi.h # 2004/11/09 04:09:49-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/mpparse.c # 2004/11/09 04:09:49-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/apic.c # 2004/11/09 04:09:49-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/09 03:56:20-05:00 len.brown@intel.com # [ACPI] fix LAPIC-mode poweroff on D600 # http://bugzilla.kernel.org/show_bug.cgi?id=3643 # # Signed-off-by: Alexey Starikovskiy # Signed-off-by: Len Brown # # arch/i386/kernel/apic.c # 2004/10/20 04:56:42-04:00 len.brown@intel.com +17 -5 # fix LAPIC-mode poweroff on D600 # # ChangeSet # 2004/11/09 03:55:46-05:00 len.brown@intel.com # fix non-ACPI IOAPIC build # # include/asm-i386/acpi.h # 2004/11/09 03:55:39-05:00 len.brown@intel.com +2 -1 # fix non-ACPI IOAPIC build # # arch/i386/kernel/mpparse.c # 2004/11/09 03:55:39-05:00 len.brown@intel.com +1 -2 # fix non-ACPI IOAPIC build # # ChangeSet # 2004/11/09 00:16:29-08:00 akpm@bix.(none) # Merge http://linux-acpi.bkbits.net/linux-acpi-test-mm # into bix.(none):/usr/src/bk-acpi # # include/asm-x86_64/processor.h # 2004/11/09 00:16:25-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/11/09 00:16:25-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/process.c # 2004/11/09 00:16:25-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/09 00:16:24-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/09 03:08:42-05:00 len.brown@intel.com # [ACPI] acpi_pci_irq_enable() now returns 0 on success. # This bubbles all the way up to pci_enable_device(). # This allows IRQ0 to be used as a legal PCI device IRQ. # # The ES7000 uses an interrupt source override to assign pin20 to IRQ0. # Then platform_rename_gsi assigns pin0 a high-numbered IRQ -- available # for PCI devices. But IRQ0 needs to be a legal PCI IRQ in the lookup code # to make it as far as the re-name code. # # Signed-off-by: Natalie Protasevich # Signed-off-by: Len Brown # # drivers/acpi/pci_link.c # 2004/11/09 03:08:36-05:00 len.brown@intel.com +10 -5 # Import patch irq0_checks3.patch # # drivers/acpi/pci_irq.c # 2004/11/09 03:08:36-05:00 len.brown@intel.com +28 -13 # Import patch irq0_checks3.patch # # ChangeSet # 2004/11/08 17:03:27-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # arch/i386/kernel/process.c # 2004/11/08 17:03:22-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/08 15:53:36-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # arch/x86_64/kernel/Makefile # 2004/11/08 15:53:27-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/08 15:53:27-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/07 21:09:20-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # arch/x86_64/kernel/Makefile # 2004/11/07 21:09:16-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/07 21:09:16-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/07 12:08:49-08:00 akpm@bix.(none) # Merge http://linux-acpi.bkbits.net/linux-acpi-test-mm # into bix.(none):/usr/src/bk-acpi # # include/asm-x86_64/processor.h # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/serial/8250_pnp.c # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pnp/pnpbios/core.c # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/acpi/sleep/main.c # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/07 12:08:44-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/07 12:07:07-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-acpi # # include/asm-x86_64/processor.h # 2004/11/07 12:07:02-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/05 23:13:12-05:00 len.brown@intel.com # merge # # include/linux/acpi.h # 2004/11/05 23:13:06-05:00 len.brown@intel.com +9 -8 # merge # # drivers/acpi/processor.c # 2004/11/05 23:13:05-05:00 len.brown@intel.com +5 -4 # merge # # arch/x86_64/kernel/setup.c # 2004/11/05 23:07:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/11/05 23:07:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/11/05 23:07:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/05 23:07:24-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/11/03 13:05:03-08:00 akpm@bix.(none) # kk # # drivers/serial/8250_pnp.c # 2004/11/03 13:04:56-08:00 akpm@bix.(none) +0 -1 # ss # # include/asm-x86_64/processor.h # 2004/11/03 13:01:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pnp/pnpbios/core.c # 2004/11/03 13:01:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/acpi/sleep/main.c # 2004/11/03 13:01:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/11/03 13:01:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/11/03 13:01:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/03 13:01:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/11/02 03:52:41-05:00 len.brown@intel.com # Merge # # drivers/acpi/scan.c # 2004/11/02 03:52:39-05:00 len.brown@intel.com +0 -0 # SCCS merged # # include/asm-x86_64/mpspec.h # 2004/11/02 03:43:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/11/02 03:43:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/bus.c # 2004/11/02 03:43:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/mpparse.c # 2004/11/02 03:43:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/io_apic.c # 2004/11/02 03:43:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/11/02 03:43:15-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/11/02 03:43:14-05:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/11/02 03:43:14-05:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/11/02 03:43:14-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/31 01:17:23-05:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-hotplug # into intel.com:/home/lenb/bk/26-latest-mm # # drivers/acpi/processor.c # 2004/10/31 01:17:19-05:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/31 01:14:20-05:00 len.brown@intel.com # [ACPI] fix mis-merge in processor.c # # drivers/acpi/processor.c # 2004/10/31 01:14:09-05:00 len.brown@intel.com +2 -60 # delete dupe acpi_processor_start() definition # # ChangeSet # 2004/10/28 05:02:07-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-hotplug # into intel.com:/home/lenb/bk/26-latest-mm # # include/linux/acpi.h # 2004/10/28 05:02:03-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/acpi/acpi_bus.h # 2004/10/28 05:02:03-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/10/28 05:02:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/10/28 05:01:56-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/28 05:00:02-04:00 len.brown@intel.com # merge # # include/acpi/acpi_bus.h # 2004/10/28 04:59:55-04:00 len.brown@intel.com +0 -0 # merge # # drivers/acpi/processor.c # 2004/10/28 04:59:55-04:00 len.brown@intel.com +66 -2 # merge # # include/linux/acpi.h # 2004/10/28 04:45:11-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/scan.c # 2004/10/28 04:45:11-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/28 04:05:58-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-hotplug # into intel.com:/home/lenb/bk/26-latest-mm # # include/linux/acpi.h # 2004/10/28 04:05:54-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/acpi/acpi_drivers.h # 2004/10/28 04:05:54-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/acpi/acpi_bus.h # 2004/10/28 04:05:54-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/10/28 04:05:54-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/acpi_ksyms.c # 2004/10/28 04:05:54-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Makefile # 2004/10/28 04:05:54-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Kconfig # 2004/10/28 04:05:53-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/acpi.c # 2004/10/28 04:05:53-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/10/28 04:05:53-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/28 04:01:25-04:00 len.brown@intel.com # [ACPI] Initial container driver to support hotplug notifications # on ACPI0004, PNP0A05 and PNP0A06 devices. # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Len Brown # # include/acpi/container.h # 2004/09/24 18:26:34-04:00 len.brown@intel.com +13 -0 # Import patch container_drv.patch # # drivers/acpi/container.c # 2004/09/24 18:26:34-04:00 len.brown@intel.com +344 -0 # Import patch container_drv.patch # # include/acpi/container.h # 2004/09/24 18:26:34-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-latest-hotplug/include/acpi/container.h # # drivers/acpi/container.c # 2004/09/24 18:26:34-04:00 len.brown@intel.com +0 -0 # BitKeeper file /home/lenb/src/26-latest-hotplug/drivers/acpi/container.c # # drivers/acpi/Makefile # 2004/09/24 18:26:34-04:00 len.brown@intel.com +1 -0 # Import patch container_drv.patch # # drivers/acpi/Kconfig # 2004/09/24 18:26:34-04:00 len.brown@intel.com +9 -1 # Import patch container_drv.patch # # ChangeSet # 2004/10/28 03:55:03-04:00 len.brown@intel.com # [ACPI] Extend processor driver to support ACPI-based Physical CPU hotplug # # Signed-off-by Anil S Keshavamurthy # Signed-off-by: Len Brown # # drivers/acpi/processor.c # 2004/10/28 03:54:49-04:00 len.brown@intel.com +414 -66 # Import patch processor_drv.patch # # drivers/acpi/Kconfig # 2004/09/24 18:26:31-04:00 len.brown@intel.com +8 -0 # Import patch processor_drv.patch # # ChangeSet # 2004/10/28 03:41:43-04:00 len.brown@intel.com # IA64 CPU hotplug topology # # Extend support for dynamic registration and unregistration of the cpu, # by implementing and exporting arch_register_cpu()/arch_unregister_cpu(). # Also combine multiple implementation of topology_init() functions to # single topology_init() in case of ia64 architecture. # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Len Brown # # include/linux/cpu.h # 2004/09/24 18:26:27-04:00 len.brown@intel.com +3 -0 # Import patch topology.patch # # include/asm-ia64/cpu.h # 2004/09/24 18:26:27-04:00 len.brown@intel.com +5 -0 # Import patch topology.patch # # include/asm-i386/cpu.h # 2004/09/24 18:26:27-04:00 len.brown@intel.com +4 -13 # Import patch topology.patch # # drivers/base/cpu.c # 2004/09/24 18:26:27-04:00 len.brown@intel.com +18 -2 # Import patch topology.patch # # arch/ia64/mm/numa.c # 2004/10/28 03:36:29-04:00 len.brown@intel.com +0 -36 # Import patch topology.patch # # arch/ia64/kernel/topology.c # 2004/09/24 18:26:27-04:00 len.brown@intel.com +70 -23 # Import patch topology.patch # # arch/ia64/kernel/Makefile # 2004/09/24 18:26:27-04:00 len.brown@intel.com +2 -1 # Import patch topology.patch # # arch/ia64/dig/Makefile # 2004/09/24 18:26:27-04:00 len.brown@intel.com +0 -5 # Import patch topology.patch # # arch/i386/mach-default/topology.c # 2004/09/24 18:26:27-04:00 len.brown@intel.com +31 -0 # Import patch topology.patch # # ChangeSet # 2004/10/28 03:28:17-04:00 len.brown@intel.com # [ACPI] IA64-specific support for mapping lsapic to cpu array. # analogous i386 and x86_64 code TBD # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Len Brown # # include/linux/acpi.h # 2004/09/27 12:55:27-04:00 len.brown@intel.com +14 -0 # Import patch acpi_hotplug_arch.patch # # include/asm-ia64/acpi.h # 2004/09/27 13:00:17-04:00 len.brown@intel.com +1 -1 # Import patch acpi_hotplug_arch.patch # # drivers/acpi/numa.c # 2004/09/27 13:04:23-04:00 len.brown@intel.com +20 -1 # Import patch acpi_hotplug_arch.patch # # arch/ia64/kernel/acpi.c # 2004/10/28 03:26:31-04:00 len.brown@intel.com +106 -2 # Import patch acpi_hotplug_arch.patch # # arch/i386/kernel/acpi/boot.c # 2004/09/27 12:55:27-04:00 len.brown@intel.com +22 -0 # Import patch acpi_hotplug_arch.patch # # ChangeSet # 2004/10/28 03:14:52-04:00 len.brown@intel.com # [ACPI] create ACPI hotplug eject interface # # The kernel when it receives an hardware sci eject request it simply passes this # to user mode agent and the agent in turn will offline all the child devices and # then echo's 1 onto the eject file for that acpi device. # # This patch provides the sysfs "eject" interface for the user mode agent # to notify the core acpi so that the core acpi can trim its bus which # causes .remove function to be called for all child devices. # # For example for LSB0 which is an ejectable device, we will see # /sys/firmware/acpi/namespace/ACPI/_SB/LSB/eject. # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Len Brown # # drivers/acpi/scan.c # 2004/09/24 18:26:20-04:00 len.brown@intel.com +153 -0 # Import patch acpi_core_eject.patch # # ChangeSet # 2004/10/28 02:59:39-04:00 len.brown@intel.com # [ACPI] Provide core hotplug support in ACPI # # Create acpi_bus_trim(), acpi_bus_remove() and acpi_pci_unbind(), # The reverse of of acpi_bus_scan(), acpi_bus_add() and acpi_pci_bind() # # Signed-off-by: Anil S Keshavamurthy # Signed-off-by: Len Brown # # include/acpi/acpi_drivers.h # 2004/09/24 18:26:17-04:00 len.brown@intel.com +2 -0 # Import patch acpi_core.patch # # include/acpi/acpi_bus.h # 2004/10/28 02:59:06-04:00 len.brown@intel.com +9 -1 # Import patch acpi_core.patch # # drivers/acpi/scan.c # 2004/09/24 18:26:17-04:00 len.brown@intel.com +122 -9 # Import patch acpi_core.patch # # drivers/acpi/pci_irq.c # 2004/09/24 18:26:17-04:00 len.brown@intel.com +39 -3 # Import patch acpi_core.patch # # drivers/acpi/pci_bind.c # 2004/09/24 18:26:17-04:00 len.brown@intel.com +45 -0 # Import patch acpi_core.patch # # drivers/acpi/bus.c # 2004/09/24 18:26:17-04:00 len.brown@intel.com +0 -4 # Import patch acpi_core.patch # # drivers/acpi/acpi_ksyms.c # 2004/09/24 18:26:17-04:00 len.brown@intel.com +3 -0 # Import patch acpi_core.patch # # ChangeSet # 2004/10/26 02:34:54-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # include/acpi/acpi_bus.h # 2004/10/26 02:34:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Makefile # 2004/10/26 02:34:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Kconfig # 2004/10/26 02:34:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/Makefile # 2004/10/26 02:34:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/10/26 02:34:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/10/26 02:34:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/10/26 02:34:49-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/23 02:53:12-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # sound/drivers/mpu401/mpu401.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-x86_64/mpspec.h # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-x86_64/acpi.h # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/mpspec.h # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/char/ipmi/ipmi_si_intf.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/processor.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Makefile # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Kconfig # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/Makefile # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/mpparse.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/io_apic.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/Kconfig # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/acpi.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/mpparse.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/10/23 02:47:28-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/Kconfig # 2004/10/23 02:47:27-04:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/10/23 02:47:27-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/19 13:36:18-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # drivers/acpi/processor.c # 2004/10/19 13:36:14-04:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/10/19 13:36:14-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/19 12:22:10-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # include/asm-i386/io_apic.h # 2004/10/19 12:22:03-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/10/19 12:22:03-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/10/19 12:22:03-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/Kconfig # 2004/10/19 12:22:03-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/10/19 12:22:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/Kconfig # 2004/10/19 12:22:02-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/14 14:05:31-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/26-latest-mm # # arch/i386/kernel/io_apic.c # 2004/10/14 14:05:27-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/10 04:34:32-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-dominik # into intel.com:/home/lenb/bk/26-latest-mm # # drivers/acpi/acpi_ksyms.c # 2004/10/10 04:34:29-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/08 18:51:45-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-dev # into intel.com:/home/lenb/bk/26-latest-mm # # drivers/acpi/Kconfig # 2004/10/08 18:51:41-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/10/08 18:51:41-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/08 18:44:00-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/src/26-latest-dominik # into intel.com:/home/lenb/bk/26-latest-mm # # arch/x86_64/kernel/io_apic.c # 2004/10/08 18:43:56-04:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/10/08 18:43:56-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/10/08 18:01:04-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-ref # into intel.com:/home/lenb/bk/26-latest-mm # # drivers/Makefile # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/io_apic.c # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/Kconfig # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/setup.c # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/acpi.c # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # Documentation/kernel-parameters.txt # 2004/10/08 18:01:00-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/17 00:29:39-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/linux-acpi-test-mm # # drivers/Makefile # 2004/09/17 00:29:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/Kconfig # 2004/09/17 00:29:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/09/17 00:29:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/Kconfig # 2004/09/17 00:29:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/10 16:26:55-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/linux-acpi-test-mm # # include/asm-x86_64/mpspec.h # 2004/09/10 16:26:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/Makefile # 2004/09/10 16:26:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/09/10 16:26:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/ia64/kernel/acpi.c # 2004/09/10 16:26:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/02 03:39:43-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/linux-acpi-test-mm # # include/linux/acpi.h # 2004/09/02 03:39:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/acpi/acpi_drivers.h # 2004/09/02 03:39:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/acpi/Kconfig # 2004/09/02 03:39:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/io_apic.c # 2004/09/02 03:39:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/09/02 03:39:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/09/02 03:39:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/09/02 03:39:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/02 03:25:49-04:00 len.brown@intel.com # merge # # arch/x86_64/Kconfig # 2004/09/02 03:25:42-04:00 len.brown@intel.com +1 -0 # merge # # sound/drivers/mpu401/mpu401.c # 2004/09/02 03:20:35-04:00 len.brown@intel.com +3 -3 # Auto merged # # include/asm-x86_64/mpspec.h # 2004/09/02 03:20:35-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-x86_64/acpi.h # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/fixmap.h # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/acpi.h # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/char/ipmi/ipmi_si_intf.c # 2004/09/02 03:20:34-04:00 len.brown@intel.com +1 -2 # Auto merged # # drivers/Makefile # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/Kconfig # 2004/09/02 03:20:34-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/02 03:00:54-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/linux-acpi-test-mm # # sound/drivers/mpu401/mpu401.c # 2004/09/02 03:00:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/setup.c # 2004/09/02 03:00:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/09/02 03:00:50-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/09/02 03:00:49-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/09/01 20:28:43-04:00 len.brown@intel.com # Cset exclude: len.brown@intel.com|ChangeSet|20040817220851|52337 # # arch/i386/kernel/dmi_scan.c # 2004/09/01 20:28:41-04:00 len.brown@intel.com +0 -0 # Exclude # # ChangeSet # 2004/09/01 20:26:54-04:00 len.brown@intel.com # Cset exclude: len.brown@intel.com|ChangeSet|20040826050001|40089 # # sound/drivers/mpu401/mpu401.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # include/linux/acpi.h # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-i386/mpspec.h # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-i386/io_apic.h # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-i386/fixmap.h # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # drivers/acpi/acpi_ksyms.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # drivers/acpi/Makefile # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # drivers/acpi/Kconfig # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # drivers/Makefile # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/x86_64/Kconfig # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/ia64/kernel/setup.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/ia64/kernel/acpi.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/setup.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/mpparse.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/io_apic.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/dmi_scan.c # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/acpi/Makefile # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/Makefile # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/Kconfig # 2004/09/01 20:26:43-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-x86_64/mpspec.h # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-x86_64/io_apic.h # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-x86_64/acpi.h # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # include/asm-i386/acpi.h # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # include/acpi/acpi_drivers.h # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # include/acpi/acpi_bus.h # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # drivers/char/ipmi/ipmi_si_intf.c # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/x86_64/kernel/setup.c # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/x86_64/kernel/mpparse.c # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/x86_64/kernel/io_apic.c # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/x86_64/kernel/acpi/Makefile # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/x86_64/kernel/Makefile # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # arch/i386/kernel/acpi/boot.c # 2004/09/01 20:26:42-04:00 len.brown@intel.com +0 -0 # Exclude # # ChangeSet # 2004/08/27 01:25:27-04:00 len.brown@intel.com # Merge intel.com:/home/lenb/bk/26-latest-test # into intel.com:/home/lenb/bk/linux-acpi-test-mm # # include/asm-i386/acpi.h # 2004/08/27 01:25:23-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/acpi/boot.c # 2004/08/27 01:25:23-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/08/27 01:25:23-04:00 len.brown@intel.com +0 -0 # Auto merged # # ChangeSet # 2004/08/26 01:04:55-04:00 len.brown@intel.com # merge # # arch/x86_64/Kconfig # 2004/08/26 01:04:50-04:00 len.brown@intel.com +0 -1 # merge # # include/asm-x86_64/mpspec.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-x86_64/acpi.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/fixmap.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # include/asm-i386/acpi.h # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # drivers/char/ipmi/ipmi_si_intf.c # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -3 # Auto merged # # drivers/Makefile # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/setup.c # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/x86_64/kernel/Makefile # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/io_apic.c # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/kernel/Makefile # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # # arch/i386/Kconfig # 2004/08/26 01:01:12-04:00 len.brown@intel.com +0 -0 # Auto merged # diff -Nru a/arch/i386/kernel/acpi/Makefile b/arch/i386/kernel/acpi/Makefile --- a/arch/i386/kernel/acpi/Makefile 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/kernel/acpi/Makefile 2004-11-15 20:47:22 -08:00 @@ -1,3 +1,4 @@ obj-$(CONFIG_ACPI_BOOT) := boot.o +obj-$(CONFIG_X86_IO_APIC) += earlyquirk.o obj-$(CONFIG_ACPI_SLEEP) += sleep.o wakeup.o diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/kernel/acpi/boot.c 2004-11-15 20:47:22 -08:00 @@ -474,6 +474,28 @@ } EXPORT_SYMBOL(acpi_register_gsi); +/* + * ACPI based hotplug support for CPU + */ +#ifdef CONFIG_ACPI_HOTPLUG_CPU +int +acpi_map_lsapic(acpi_handle handle, int *pcpu) +{ + /* TBD */ + return -EINVAL; +} +EXPORT_SYMBOL(acpi_map_lsapic); + + +int +acpi_unmap_lsapic(int cpu) +{ + /* TBD */ + return -EINVAL; +} +EXPORT_SYMBOL(acpi_unmap_lsapic); +#endif /* CONFIG_ACPI_HOTPLUG_CPU */ + static unsigned long __init acpi_scan_rsdp ( unsigned long start, @@ -817,6 +839,10 @@ disable_acpi(); return error; } + +#ifdef __i386__ + check_acpi_pci(); +#endif acpi_table_parse(ACPI_BOOT, acpi_parse_sbf); diff -Nru a/arch/i386/kernel/acpi/earlyquirk.c b/arch/i386/kernel/acpi/earlyquirk.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/arch/i386/kernel/acpi/earlyquirk.c 2004-11-15 20:47:22 -08:00 @@ -0,0 +1,51 @@ +/* + * Do early PCI probing for bug detection when the main PCI subsystem is + * not up yet. + */ +#include +#include +#include +#include +#include + +static int __init check_bridge(int vendor, int device) +{ + /* According to Nvidia all timer overrides are bogus. Just ignore + them all. */ + if (vendor == PCI_VENDOR_ID_NVIDIA) { + acpi_skip_timer_override = 1; + } + return 0; +} + +void __init check_acpi_pci(void) +{ + int num,slot,func; + + /* Assume the machine supports type 1. If not it will + always read ffffffff and should not have any side effect. */ + + /* Poor man's PCI discovery */ + for (num = 0; num < 32; num++) { + for (slot = 0; slot < 32; slot++) { + for (func = 0; func < 8; func++) { + u32 class; + u32 vendor; + class = read_pci_config(num,slot,func, + PCI_CLASS_REVISION); + if (class == 0xffffffff) + break; + + if ((class >> 16) != PCI_CLASS_BRIDGE_PCI) + continue; + + vendor = read_pci_config(num, slot, func, + PCI_VENDOR_ID); + + if (check_bridge(vendor&0xffff, vendor >> 16)) + return; + } + + } + } +} diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c --- a/arch/i386/kernel/apic.c 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/kernel/apic.c 2004-11-15 20:47:22 -08:00 @@ -536,13 +536,27 @@ unsigned int apic_thmr; } apic_pm_state; -static int lapic_suspend(struct sys_device *dev, u32 state) +static int lapic_shutdown(struct sys_device *dev) { unsigned long flags; if (!apic_pm_state.active) return 0; + + local_irq_save(flags); + disable_local_APIC(); + local_irq_restore(flags); + + return 0; +} + +static int lapic_suspend(struct sys_device *dev, u32 state) +{ + + if (!apic_pm_state.active) + return 0; + apic_pm_state.apic_id = apic_read(APIC_ID); apic_pm_state.apic_taskpri = apic_read(APIC_TASKPRI); apic_pm_state.apic_ldr = apic_read(APIC_LDR); @@ -557,10 +571,7 @@ apic_pm_state.apic_tdcr = apic_read(APIC_TDCR); apic_pm_state.apic_thmr = apic_read(APIC_LVTTHMR); - local_irq_save(flags); - disable_local_APIC(); - local_irq_restore(flags); - return 0; + return lapic_shutdown(dev); } static int lapic_resume(struct sys_device *dev) @@ -609,6 +620,7 @@ static struct sysdev_class lapic_sysclass = { set_kset_name("lapic"), + .shutdown = lapic_shutdown, .resume = lapic_resume, .suspend = lapic_suspend, }; diff -Nru a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c --- a/arch/i386/kernel/dmi_scan.c 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/kernel/dmi_scan.c 2004-11-15 20:47:22 -08:00 @@ -214,20 +214,6 @@ } return 0; } - -/* - * early nForce2 reference BIOS shipped with a - * bogus ACPI IRQ0 -> pin2 interrupt override -- ignore it - */ -static __init int ignore_timer_override(struct dmi_blacklist *d) -{ - extern int acpi_skip_timer_override; - printk(KERN_NOTICE "%s detected: BIOS IRQ0 pin2 override" - " will be ignored\n", d->ident); - - acpi_skip_timer_override = 1; - return 0; -} #endif #ifdef CONFIG_ACPI_PCI @@ -353,48 +339,6 @@ MATCH(DMI_PRODUCT_NAME, "eserver xSeries 440"), NO_MATCH, NO_MATCH }}, - /* - * Systems with nForce2 BIOS timer override bug - * nVidia claims all nForce have timer on pin0, - * and applying this workaround is a NOP on fixed BIOS, - * so prospects are good for replacing these entries - * with something to key of chipset PCI-ID. - */ - { ignore_timer_override, "Abit NF7-S v2", { - MATCH(DMI_BOARD_VENDOR, "http://www.abit.com.tw/"), - MATCH(DMI_BOARD_NAME, "NF7-S/NF7,NF7-V (nVidia-nForce2)"), - MATCH(DMI_BIOS_VERSION, "6.00 PG"), - MATCH(DMI_BIOS_DATE, "03/24/2004") }}, - - { ignore_timer_override, "Asus A7N8X v2", { - MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), - MATCH(DMI_BOARD_NAME, "A7N8X2.0"), - MATCH(DMI_BIOS_VERSION, "ASUS A7N8X2.0 Deluxe ACPI BIOS Rev 1007"), - MATCH(DMI_BIOS_DATE, "10/06/2003") }}, - - { ignore_timer_override, "Asus A7N8X-X", { - MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), - MATCH(DMI_BOARD_NAME, "A7N8X-X"), - MATCH(DMI_BIOS_VERSION, "ASUS A7N8X-X ACPI BIOS Rev 1009"), - MATCH(DMI_BIOS_DATE, "2/3/2004") }}, - - { ignore_timer_override, "MSI K7N2-Delta", { - MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), - MATCH(DMI_BOARD_NAME, "MS-6570"), - MATCH(DMI_BIOS_VERSION, "6.00 PG"), - MATCH(DMI_BIOS_DATE, "03/29/2004") }}, - - { ignore_timer_override, "Shuttle SN41G2", { - MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"), - MATCH(DMI_BOARD_NAME, "FN41"), - MATCH(DMI_BIOS_VERSION, "6.00 PG"), - MATCH(DMI_BIOS_DATE, "01/14/2004") }}, - - { ignore_timer_override, "Shuttle AN35N", { - MATCH(DMI_BOARD_VENDOR, "Shuttle Inc"), - MATCH(DMI_BOARD_NAME, "AN35"), - MATCH(DMI_BIOS_VERSION, "6.00 PG"), - MATCH(DMI_BIOS_DATE, "12/05/2003") }}, #endif // CONFIG_ACPI_BOOT #ifdef CONFIG_ACPI_PCI diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/kernel/mpparse.c 2004-11-15 20:47:22 -08:00 @@ -808,6 +808,7 @@ smp_scan_config(address, 0x400); } +int (*platform_rename_gsi)(int ioapic, int gsi); /* -------------------------------------------------------------------------- ACPI-based MP Configuration @@ -1054,8 +1055,6 @@ panic("Max # of irq sources exceeded!\n"); } } - -int (*platform_rename_gsi)(int ioapic, int gsi); int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) { diff -Nru a/arch/i386/mach-default/topology.c b/arch/i386/mach-default/topology.c --- a/arch/i386/mach-default/topology.c 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/mach-default/topology.c 2004-11-15 20:47:22 -08:00 @@ -32,6 +32,37 @@ struct i386_cpu cpu_devices[NR_CPUS]; +int arch_register_cpu(int num){ + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + int node = cpu_to_node(num); + if (node_online(node)) + parent = &node_devices[node].node; +#endif /* CONFIG_NUMA */ + + return register_cpu(&cpu_devices[num].cpu, num, parent); +} + +#ifdef CONFIG_HOTPLUG_CPU + +void arch_unregister_cpu(int num) { + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + int node = cpu_to_node(num); + if (node_online(node)) + parent = &node_devices[node].node; +#endif /* CONFIG_NUMA */ + + return unregister_cpu(&cpu_devices[num].cpu, parent); +} +EXPORT_SYMBOL(arch_register_cpu); +EXPORT_SYMBOL(arch_unregister_cpu); +#endif /*CONFIG_HOTPLUG_CPU*/ + + + #ifdef CONFIG_NUMA #include #include diff -Nru a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c --- a/arch/i386/mach-es7000/es7000plat.c 2004-11-15 20:47:22 -08:00 +++ b/arch/i386/mach-es7000/es7000plat.c 2004-11-15 20:47:22 -08:00 @@ -195,7 +195,7 @@ } } } - printk("ES7000: did not find Unisys ACPI OEM table!\n"); + Dprintk("ES7000: did not find Unisys ACPI OEM table!\n"); return -1; } diff -Nru a/arch/ia64/dig/Makefile b/arch/ia64/dig/Makefile --- a/arch/ia64/dig/Makefile 2004-11-15 20:47:22 -08:00 +++ b/arch/ia64/dig/Makefile 2004-11-15 20:47:22 -08:00 @@ -6,9 +6,4 @@ # obj-y := setup.o - -ifndef CONFIG_NUMA -obj-$(CONFIG_IA64_DIG) += topology.o -endif - obj-$(CONFIG_IA64_GENERIC) += machvec.o diff -Nru a/arch/ia64/dig/topology.c b/arch/ia64/dig/topology.c --- a/arch/ia64/dig/topology.c 2004-11-15 20:47:22 -08:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,43 +0,0 @@ -/* - * arch/ia64/dig/topology.c - * Popuate driverfs with topology information. - * Derived entirely from i386/mach-default.c - * Intel Corporation - Ashok Raj - */ -#include -#include -#include -#include -#include -#include -#include - -static DEFINE_PER_CPU(struct ia64_cpu, cpu_devices); - -/* - * First Pass: simply borrowed code for now. Later should hook into - * hotplug notification for node/cpu/memory as applicable - */ - -static int arch_register_cpu(int num) -{ - struct node *parent = NULL; - -#ifdef CONFIG_NUMA - //parent = &node_devices[cpu_to_node(num)].node; -#endif - - return register_cpu(&per_cpu(cpu_devices,num).cpu, num, parent); -} - -static int __init topology_init(void) -{ - int i; - - for_each_cpu(i) { - arch_register_cpu(i); - } - return 0; -} - -subsys_initcall(topology_init); diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile --- a/arch/ia64/kernel/Makefile 2004-11-15 20:47:22 -08:00 +++ b/arch/ia64/kernel/Makefile 2004-11-15 20:47:22 -08:00 @@ -6,7 +6,8 @@ obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \ - salinfo.o semaphore.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o unwind.o mca.o mca_asm.o + salinfo.o semaphore.o setup.o signal.o sys_ia64.o time.o traps.o unaligned.o \ + unwind.o mca.o mca_asm.o topology.o obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o obj-$(CONFIG_IA64_GENERIC) += acpi-ext.o diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c --- a/arch/ia64/kernel/acpi.c 2004-11-15 20:47:22 -08:00 +++ b/arch/ia64/kernel/acpi.c 2004-11-15 20:47:22 -08:00 @@ -355,11 +355,11 @@ #define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) static int __initdata srat_num_cpus; /* number of cpus */ -static u32 __initdata pxm_flag[PXM_FLAG_LEN]; +static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; #define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) #define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) /* maps to convert between proximity domain and logical node ID */ -int __initdata pxm_to_nid_map[MAX_PXM_DOMAINS]; +int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; int __initdata nid_to_pxm_map[MAX_NUMNODES]; static struct acpi_table_slit __initdata *slit_table; @@ -651,6 +651,110 @@ } return 0; } + +/* + * ACPI based hotplug CPU support + */ +#ifdef CONFIG_ACPI_HOTPLUG_CPU +static +int +acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) +{ +#ifdef CONFIG_ACPI_NUMA + int pxm_id; + + pxm_id = acpi_get_pxm(handle); + + /* + * Assuming that the container driver would have set the proximity + * domain and would have initialized pxm_to_nid_map[pxm_id] && pxm_flag + */ + node_cpuid[cpu].nid = (pxm_id < 0) ? 0: + pxm_to_nid_map[pxm_id]; + + node_cpuid[cpu].phys_id = physid; +#endif + return(0); +} + + +int +acpi_map_lsapic(acpi_handle handle, int *pcpu) +{ + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + union acpi_object *obj; + struct acpi_table_lsapic *lsapic; + cpumask_t tmp_map; + long physid; + int cpu; + + if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) + return -EINVAL; + + if (!buffer.length || !buffer.pointer) + return -EINVAL; + + obj = buffer.pointer; + if (obj->type != ACPI_TYPE_BUFFER || + obj->buffer.length < sizeof(*lsapic)) { + acpi_os_free(buffer.pointer); + return -EINVAL; + } + + lsapic = (struct acpi_table_lsapic *)obj->buffer.pointer; + + if ((lsapic->header.type != ACPI_MADT_LSAPIC) || + (!lsapic->flags.enabled)) { + acpi_os_free(buffer.pointer); + return -EINVAL; + } + + physid = ((lsapic->id <<8) | (lsapic->eid)); + + acpi_os_free(buffer.pointer); + buffer.length = ACPI_ALLOCATE_BUFFER; + buffer.pointer = NULL; + + cpus_complement(tmp_map, cpu_present_map); + cpu = first_cpu(tmp_map); + if(cpu >= NR_CPUS) + return -EINVAL; + + acpi_map_cpu2node(handle, cpu, physid); + + cpu_set(cpu, cpu_present_map); + ia64_cpu_to_sapicid[cpu] = physid; + ia64_acpiid_to_sapicid[lsapic->acpi_id] = ia64_cpu_to_sapicid[cpu]; + + *pcpu = cpu; + return(0); +} +EXPORT_SYMBOL(acpi_map_lsapic); + + +int +acpi_unmap_lsapic(int cpu) +{ + int i; + + for (i=0; i + * Populate cpu entries in sysfs for non-numa systems as well + * Intel Corporation - Ashok Raj + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_NUMA +static struct node *sysfs_nodes; +#endif +static struct ia64_cpu *sysfs_cpus; + +int arch_register_cpu(int num) +{ + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + parent = &sysfs_nodes[cpu_to_node(num)]; +#endif /* CONFIG_NUMA */ + + return register_cpu(&sysfs_cpus[num].cpu, num, parent); +} + +#ifdef CONFIG_HOTPLUG_CPU + +void arch_unregister_cpu(int num) +{ + struct node *parent = NULL; + +#ifdef CONFIG_NUMA + int node = cpu_to_node(num); + parent = &sysfs_nodes[node]; +#endif /* CONFIG_NUMA */ + + return unregister_cpu(&sysfs_cpus[num].cpu, parent); +} +EXPORT_SYMBOL(arch_register_cpu); +EXPORT_SYMBOL(arch_unregister_cpu); +#endif /*CONFIG_HOTPLUG_CPU*/ + + +static int __init topology_init(void) +{ + int i, err = 0; + +#ifdef CONFIG_NUMA + sysfs_nodes = kmalloc(sizeof(struct node) * MAX_NUMNODES, GFP_KERNEL); + if (!sysfs_nodes) { + err = -ENOMEM; + goto out; + } + memset(sysfs_nodes, 0, sizeof(struct node) * MAX_NUMNODES); + + for (i = 0; i < numnodes; i++) + if ((err = register_node(&sysfs_nodes[i], i, 0))) + goto out; +#endif + + sysfs_cpus = kmalloc(sizeof(struct ia64_cpu) * NR_CPUS, GFP_KERNEL); + if (!sysfs_cpus) { + err = -ENOMEM; + goto out; + } + memset(sysfs_cpus, 0, sizeof(struct ia64_cpu) * NR_CPUS); + + for_each_present_cpu(i) + if((err = arch_register_cpu(i))) + goto out; +out: + return err; +} + +__initcall(topology_init); diff -Nru a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c --- a/arch/ia64/mm/numa.c 2004-11-15 20:47:22 -08:00 +++ b/arch/ia64/mm/numa.c 2004-11-15 20:47:22 -08:00 @@ -20,8 +20,6 @@ #include #include -static struct node *sysfs_nodes; -static struct cpu *sysfs_cpus; /* * The following structures are usually initialized by ACPI or @@ -49,37 +47,3 @@ return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0); } - -static int __init topology_init(void) -{ - int i, err = 0; - - sysfs_nodes = kmalloc(sizeof(struct node) * numnodes, GFP_KERNEL); - if (!sysfs_nodes) { - err = -ENOMEM; - goto out; - } - memset(sysfs_nodes, 0, sizeof(struct node) * numnodes); - - sysfs_cpus = kmalloc(sizeof(struct cpu) * NR_CPUS, GFP_KERNEL); - if (!sysfs_cpus) { - kfree(sysfs_nodes); - err = -ENOMEM; - goto out; - } - memset(sysfs_cpus, 0, sizeof(struct cpu) * NR_CPUS); - - for (i = 0; i < numnodes; i++) - if ((err = register_node(&sysfs_nodes[i], i, NULL))) - goto out; - - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) - if((err = register_cpu(&sysfs_cpus[i], i, - &sysfs_nodes[cpu_to_node(i)]))) - goto out; - out: - return err; -} - -__initcall(topology_init); diff -Nru a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig --- a/arch/x86_64/Kconfig 2004-11-15 20:47:22 -08:00 +++ b/arch/x86_64/Kconfig 2004-11-15 20:47:22 -08:00 @@ -170,7 +170,7 @@ bool depends on SMP && !MK8 default y - + config MATH_EMULATION bool diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig --- a/drivers/acpi/Kconfig 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/Kconfig 2004-11-15 20:47:22 -08:00 @@ -144,6 +144,15 @@ ACPI C2 and C3 processor states to save power, on systems that support it. +config ACPI_HOTPLUG_CPU + bool "Processor Hotplug (EXPERIMENTAL)" + depends on ACPI_PROCESSOR && HOTPLUG_CPU && EXPERIMENTAL + depends on !IA64_SGI_SN + select ACPI_CONTAINER + default n + ---help--- + Select this option if your platform support physical CPU hotplug. + config ACPI_THERMAL tristate "Thermal Zone" depends on ACPI_PROCESSOR @@ -325,5 +334,12 @@ kernel logs, and/or you are using this on a notebook which does not yet have an HPET, you should say "Y" here. -endmenu +config ACPI_CONTAINER + tristate "ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)" + depends on ACPI && EXPERIMENTAL + default (ACPI_HOTPLUG_MEMORY || ACPI_HOTPLUG_CPU || ACPI_HOTPLUG_IO) + ---help--- + This is the ACPI generic container driver which supports + ACPI0004, PNP0A05 and PNP0A06 devices +endmenu diff -Nru a/drivers/acpi/Makefile b/drivers/acpi/Makefile --- a/drivers/acpi/Makefile 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/Makefile 2004-11-15 20:47:22 -08:00 @@ -42,6 +42,7 @@ obj-$(CONFIG_ACPI_PCI) += pci_root.o pci_link.o pci_irq.o pci_bind.o obj-$(CONFIG_ACPI_POWER) += power.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o +obj-$(CONFIG_ACPI_CONTAINER) += container.o obj-$(CONFIG_ACPI_THERMAL) += thermal.o obj-$(CONFIG_ACPI_SYSTEM) += system.o event.o obj-$(CONFIG_ACPI_DEBUG) += debug.o diff -Nru a/drivers/acpi/acpi_ksyms.c b/drivers/acpi/acpi_ksyms.c --- a/drivers/acpi/acpi_ksyms.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/acpi_ksyms.c 2004-11-15 20:47:22 -08:00 @@ -138,6 +138,9 @@ EXPORT_SYMBOL(acpi_bus_receive_event); EXPORT_SYMBOL(acpi_bus_register_driver); EXPORT_SYMBOL(acpi_bus_unregister_driver); +EXPORT_SYMBOL(acpi_bus_scan); +EXPORT_SYMBOL(acpi_bus_trim); +EXPORT_SYMBOL(acpi_bus_add); #endif /*CONFIG_ACPI_BUS*/ diff -Nru a/drivers/acpi/battery.c b/drivers/acpi/battery.c --- a/drivers/acpi/battery.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/battery.c 2004-11-15 20:47:22 -08:00 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -341,32 +342,22 @@ -------------------------------------------------------------------------- */ struct proc_dir_entry *acpi_battery_dir; - -static int -acpi_battery_read_info ( - char *page, - char **start, - off_t off, - int count, - int *eof, - void *data) +static int acpi_battery_read_info(struct seq_file *seq, void *offset) { int result = 0; - struct acpi_battery *battery = (struct acpi_battery *) data; + struct acpi_battery *battery = (struct acpi_battery *) seq->private; struct acpi_battery_info *bif = NULL; char *units = "?"; - char *p = page; - int len = 0; ACPI_FUNCTION_TRACE("acpi_battery_read_info"); - if (!battery || (off != 0)) + if (!battery) goto end; if (battery->flags.present) - p += sprintf(p, "present: yes\n"); + seq_printf(seq, "present: yes\n"); else { - p += sprintf(p, "present: no\n"); + seq_printf(seq, "present: no\n"); goto end; } @@ -374,98 +365,88 @@ result = acpi_battery_get_info(battery, &bif); if (result || !bif) { - p += sprintf(p, "ERROR: Unable to read battery information\n"); + seq_printf(seq, "ERROR: Unable to read battery information\n"); goto end; } units = bif->power_unit ? ACPI_BATTERY_UNITS_AMPS : ACPI_BATTERY_UNITS_WATTS; if (bif->design_capacity == ACPI_BATTERY_VALUE_UNKNOWN) - p += sprintf(p, "design capacity: unknown\n"); + seq_printf(seq, "design capacity: unknown\n"); else - p += sprintf(p, "design capacity: %d %sh\n", + seq_printf(seq, "design capacity: %d %sh\n", (u32) bif->design_capacity, units); if (bif->last_full_capacity == ACPI_BATTERY_VALUE_UNKNOWN) - p += sprintf(p, "last full capacity: unknown\n"); + seq_printf(seq, "last full capacity: unknown\n"); else - p += sprintf(p, "last full capacity: %d %sh\n", + seq_printf(seq, "last full capacity: %d %sh\n", (u32) bif->last_full_capacity, units); switch ((u32) bif->battery_technology) { case 0: - p += sprintf(p, "battery technology: non-rechargeable\n"); + seq_printf(seq, "battery technology: non-rechargeable\n"); break; case 1: - p += sprintf(p, "battery technology: rechargeable\n"); + seq_printf(seq, "battery technology: rechargeable\n"); break; default: - p += sprintf(p, "battery technology: unknown\n"); + seq_printf(seq, "battery technology: unknown\n"); break; } if (bif->design_voltage == ACPI_BATTERY_VALUE_UNKNOWN) - p += sprintf(p, "design voltage: unknown\n"); + seq_printf(seq, "design voltage: unknown\n"); else - p += sprintf(p, "design voltage: %d mV\n", + seq_printf(seq, "design voltage: %d mV\n", (u32) bif->design_voltage); - p += sprintf(p, "design capacity warning: %d %sh\n", + seq_printf(seq, "design capacity warning: %d %sh\n", (u32) bif->design_capacity_warning, units); - p += sprintf(p, "design capacity low: %d %sh\n", + seq_printf(seq, "design capacity low: %d %sh\n", (u32) bif->design_capacity_low, units); - p += sprintf(p, "capacity granularity 1: %d %sh\n", + seq_printf(seq, "capacity granularity 1: %d %sh\n", (u32) bif->battery_capacity_granularity_1, units); - p += sprintf(p, "capacity granularity 2: %d %sh\n", + seq_printf(seq, "capacity granularity 2: %d %sh\n", (u32) bif->battery_capacity_granularity_2, units); - p += sprintf(p, "model number: %s\n", + seq_printf(seq, "model number: %s\n", bif->model_number); - p += sprintf(p, "serial number: %s\n", + seq_printf(seq, "serial number: %s\n", bif->serial_number); - p += sprintf(p, "battery type: %s\n", + seq_printf(seq, "battery type: %s\n", bif->battery_type); - p += sprintf(p, "OEM info: %s\n", + seq_printf(seq, "OEM info: %s\n", bif->oem_info); end: kfree(bif); - len = (p - page); - if (len <= off+count) *eof = 1; - *start = page + off; - len -= off; - if (len>count) len = count; - if (len<0) len = 0; + return_VALUE(0); +} - return_VALUE(len); +static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) +{ + return single_open(file, acpi_battery_read_info, PDE(inode)->data); } static int -acpi_battery_read_state ( - char *page, - char **start, - off_t off, - int count, - int *eof, - void *data) +acpi_battery_read_state (struct seq_file *seq, void *offset) { int result = 0; - struct acpi_battery *battery = (struct acpi_battery *) data; + struct acpi_battery *battery = (struct acpi_battery *) seq->private; struct acpi_battery_status *bst = NULL; char *units = "?"; - char *p = page; - int len = 0; ACPI_FUNCTION_TRACE("acpi_battery_read_state"); - if (!battery || (off != 0)) + if (!battery) goto end; if (battery->flags.present) - p += sprintf(p, "present: yes\n"); + seq_printf(seq, "present: yes\n"); else { - p += sprintf(p, "present: no\n"); + seq_printf(seq, "present: no\n"); goto end; } @@ -477,81 +458,71 @@ result = acpi_battery_get_status(battery, &bst); if (result || !bst) { - p += sprintf(p, "ERROR: Unable to read battery status\n"); + seq_printf(seq, "ERROR: Unable to read battery status\n"); goto end; } if (!(bst->state & 0x04)) - p += sprintf(p, "capacity state: ok\n"); + seq_printf(seq, "capacity state: ok\n"); else - p += sprintf(p, "capacity state: critical\n"); + seq_printf(seq, "capacity state: critical\n"); if ((bst->state & 0x01) && (bst->state & 0x02)){ - p += sprintf(p, "charging state: charging/discharging\n"); + seq_printf(seq, "charging state: charging/discharging\n"); ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Battery Charging and Discharging?\n")); } else if (bst->state & 0x01) - p += sprintf(p, "charging state: discharging\n"); + seq_printf(seq, "charging state: discharging\n"); else if (bst->state & 0x02) - p += sprintf(p, "charging state: charging\n"); + seq_printf(seq, "charging state: charging\n"); else { - p += sprintf(p, "charging state: charged\n"); + seq_printf(seq, "charging state: charged\n"); } if (bst->present_rate == ACPI_BATTERY_VALUE_UNKNOWN) - p += sprintf(p, "present rate: unknown\n"); + seq_printf(seq, "present rate: unknown\n"); else - p += sprintf(p, "present rate: %d %s\n", + seq_printf(seq, "present rate: %d %s\n", (u32) bst->present_rate, units); if (bst->remaining_capacity == ACPI_BATTERY_VALUE_UNKNOWN) - p += sprintf(p, "remaining capacity: unknown\n"); + seq_printf(seq, "remaining capacity: unknown\n"); else - p += sprintf(p, "remaining capacity: %d %sh\n", + seq_printf(seq, "remaining capacity: %d %sh\n", (u32) bst->remaining_capacity, units); if (bst->present_voltage == ACPI_BATTERY_VALUE_UNKNOWN) - p += sprintf(p, "present voltage: unknown\n"); + seq_printf(seq, "present voltage: unknown\n"); else - p += sprintf(p, "present voltage: %d mV\n", + seq_printf(seq, "present voltage: %d mV\n", (u32) bst->present_voltage); end: kfree(bst); - len = (p - page); - if (len <= off+count) *eof = 1; - *start = page + off; - len -= off; - if (len>count) len = count; - if (len<0) len = 0; + return_VALUE(0); +} - return_VALUE(len); +static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) +{ + return single_open(file, acpi_battery_read_state, PDE(inode)->data); } static int -acpi_battery_read_alarm ( - char *page, - char **start, - off_t off, - int count, - int *eof, - void *data) +acpi_battery_read_alarm (struct seq_file *seq, void *offset) { - struct acpi_battery *battery = (struct acpi_battery *) data; + struct acpi_battery *battery = (struct acpi_battery *) seq->private; char *units = "?"; - char *p = page; - int len = 0; ACPI_FUNCTION_TRACE("acpi_battery_read_alarm"); - if (!battery || (off != 0)) + if (!battery) goto end; if (!battery->flags.present) { - p += sprintf(p, "present: no\n"); + seq_printf(seq, "present: no\n"); goto end; } @@ -561,34 +532,28 @@ /* Battery Alarm */ - p += sprintf(p, "alarm: "); + seq_printf(seq, "alarm: "); if (!battery->alarm) - p += sprintf(p, "unsupported\n"); + seq_printf(seq, "unsupported\n"); else - p += sprintf(p, "%d %sh\n", (u32) battery->alarm, units); + seq_printf(seq, "%d %sh\n", (u32) battery->alarm, units); end: - len = (p - page); - if (len <= off+count) *eof = 1; - *start = page + off; - len -= off; - if (len>count) len = count; - if (len<0) len = 0; - - return_VALUE(len); + return_VALUE(0); } -static int +static ssize_t acpi_battery_write_alarm ( - struct file *file, - const char __user *buffer, - unsigned long count, - void *data) + struct file *file, + const char __user *buffer, + size_t count, + loff_t *ppos) { int result = 0; - struct acpi_battery *battery = (struct acpi_battery *) data; char alarm_string[12] = {'\0'}; + struct seq_file *m = (struct seq_file *)file->private_data; + struct acpi_battery *battery = (struct acpi_battery *)m->private; ACPI_FUNCTION_TRACE("acpi_battery_write_alarm"); @@ -611,6 +576,35 @@ return_VALUE(count); } +static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) +{ + return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); +} + +static struct file_operations acpi_battery_info_ops = { + .open = acpi_battery_info_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .owner = THIS_MODULE, +}; + +static struct file_operations acpi_battery_state_ops = { + .open = acpi_battery_state_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .owner = THIS_MODULE, +}; + +static struct file_operations acpi_battery_alarm_ops = { + .open = acpi_battery_alarm_open_fs, + .read = seq_read, + .write = acpi_battery_write_alarm, + .llseek = seq_lseek, + .release = single_release, + .owner = THIS_MODULE, +}; static int acpi_battery_add_fs ( @@ -636,7 +630,7 @@ "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_INFO)); else { - entry->read_proc = acpi_battery_read_info; + entry->proc_fops = &acpi_battery_info_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } @@ -649,7 +643,7 @@ "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_STATUS)); else { - entry->read_proc = acpi_battery_read_state; + entry->proc_fops = &acpi_battery_state_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } @@ -662,8 +656,7 @@ "Unable to create '%s' fs entry\n", ACPI_BATTERY_FILE_ALARM)); else { - entry->read_proc = acpi_battery_read_alarm; - entry->write_proc = acpi_battery_write_alarm; + entry->proc_fops = &acpi_battery_alarm_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } diff -Nru a/drivers/acpi/bus.c b/drivers/acpi/bus.c --- a/drivers/acpi/bus.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/bus.c 2004-11-15 20:47:22 -08:00 @@ -53,10 +53,6 @@ Device Management -------------------------------------------------------------------------- */ -extern void acpi_bus_data_handler ( - acpi_handle handle, - u32 function, - void *context); int acpi_bus_get_device ( acpi_handle handle, diff -Nru a/drivers/acpi/container.c b/drivers/acpi/container.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/acpi/container.c 2004-11-15 20:47:22 -08:00 @@ -0,0 +1,298 @@ +/* + * acpi_container.c - ACPI Generic Container Driver + * ($Revision: ) + * + * Copyright (C) 2004 Anil S Keshavamurthy (anil.s.keshavamurthy@intel.com) + * Copyright (C) 2004 Keiichiro Tokunaga (tokunaga.keiich@jp.fujitsu.com) + * Copyright (C) 2004 Motoyuki Ito (motoyuki@soft.fujitsu.com) + * Copyright (C) 2004 Intel Corp. + * Copyright (C) 2004 FUJITSU LIMITED + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ +#include +#include +#include +#include +#include +#include +#include +#include + +#define ACPI_CONTAINER_DRIVER_NAME "ACPI container driver" +#define ACPI_CONTAINER_DEVICE_NAME "ACPI container device" +#define ACPI_CONTAINER_CLASS "container" + +#define INSTALL_NOTIFY_HANDLER 1 +#define UNINSTALL_NOTIFY_HANDLER 2 + +#define ACPI_CONTAINER_COMPONENT 0x01000000 +#define _COMPONENT ACPI_CONTAINER_COMPONENT +ACPI_MODULE_NAME ("acpi_container") + +MODULE_AUTHOR("Anil S Keshavamurthy"); +MODULE_DESCRIPTION(ACPI_CONTAINER_DRIVER_NAME); +MODULE_LICENSE("GPL"); + +#define ACPI_STA_PRESENT (0x00000001) + +static int acpi_container_add(struct acpi_device *device); +static int acpi_container_remove(struct acpi_device *device, int type); + +static struct acpi_driver acpi_container_driver = { + .name = ACPI_CONTAINER_DRIVER_NAME, + .class = ACPI_CONTAINER_CLASS, + .ids = "ACPI0004,PNP0A05,PNP0A06", + .ops = { + .add = acpi_container_add, + .remove = acpi_container_remove, + }, +}; + + +/*******************************************************************/ + +static int +is_device_present(acpi_handle handle) +{ + acpi_handle temp; + acpi_status status; + unsigned long sta; + + ACPI_FUNCTION_TRACE("is_device_present"); + + status = acpi_get_handle(handle, "_STA", &temp); + if (ACPI_FAILURE(status)) + return_VALUE(1); /* _STA not found, assmue device present */ + + status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); + if (ACPI_FAILURE(status)) + return_VALUE(0); /* Firmware error */ + + return_VALUE((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); +} + +/*******************************************************************/ +static int +acpi_container_add(struct acpi_device *device) +{ + struct acpi_container *container; + + ACPI_FUNCTION_TRACE("acpi_container_add"); + + if (!device) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "device is NULL\n")); + return_VALUE(-EINVAL); + } + + container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL); + if(!container) + return_VALUE(-ENOMEM); + + memset(container, 0, sizeof(struct acpi_container)); + container->handle = device->handle; + strcpy(acpi_device_name(device), ACPI_CONTAINER_DEVICE_NAME); + strcpy(acpi_device_class(device), ACPI_CONTAINER_CLASS); + acpi_driver_data(device) = container; + + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n", \ + acpi_device_name(device), acpi_device_bid(device))); + + + return_VALUE(0); +} + +static int +acpi_container_remove(struct acpi_device *device, int type) +{ + acpi_status status = AE_OK; + struct acpi_container *pc = NULL; + pc = (struct acpi_container*) acpi_driver_data(device); + + if (pc) + kfree(pc); + + return status; +} + + +static int +container_device_add(struct acpi_device **device, acpi_handle handle) +{ + acpi_handle phandle; + struct acpi_device *pdev; + int result; + + ACPI_FUNCTION_TRACE("container_device_add"); + + if (acpi_get_parent(handle, &phandle)) { + return_VALUE(-ENODEV); + } + + if (acpi_bus_get_device(phandle, &pdev)) { + return_VALUE(-ENODEV); + } + + if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) { + return_VALUE(-ENODEV); + } + + result = acpi_bus_scan(*device); + + return_VALUE(result); +} + +static void +container_notify_cb(acpi_handle handle, u32 type, void *context) +{ + struct acpi_device *device = NULL; + int result; + int present; + acpi_status status; + + ACPI_FUNCTION_TRACE("container_notify_cb"); + + present = is_device_present(handle); + + switch (type) { + case ACPI_NOTIFY_BUS_CHECK: + /* Fall through */ + case ACPI_NOTIFY_DEVICE_CHECK: + printk("Container driver received %s event\n", + (type == ACPI_NOTIFY_BUS_CHECK)? + "ACPI_NOTIFY_BUS_CHECK":"ACPI_NOTIFY_DEVICE_CHECK"); + if (present) { + status = acpi_bus_get_device(handle, &device); + if (ACPI_FAILURE(status) || !device) { + result = container_device_add(&device, handle); + if (!result) + kobject_hotplug(&device->kobj, KOBJ_ONLINE); + } else { + /* device exist and this is a remove request */ + kobject_hotplug(&device->kobj, KOBJ_OFFLINE); + } + } + break; + case ACPI_NOTIFY_EJECT_REQUEST: + if (!acpi_bus_get_device(handle, &device) && device) { + kobject_hotplug(&device->kobj, KOBJ_OFFLINE); + } + break; + default: + break; + } + return_VOID; +} + +static acpi_status +container_walk_namespace_cb(acpi_handle handle, + u32 lvl, + void *context, + void **rv) +{ + char *hid = NULL; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + struct acpi_device_info *info; + acpi_status status; + int *action = context; + + ACPI_FUNCTION_TRACE("container_walk_namespace_cb"); + + status = acpi_get_object_info(handle, &buffer); + if (ACPI_FAILURE(status) || !buffer.pointer) { + return_ACPI_STATUS(AE_OK); + } + + info = buffer.pointer; + if (info->valid & ACPI_VALID_HID) + hid = info->hardware_id.value; + + if (hid == NULL) { + goto end; + } + + if (strcmp(hid, "ACPI0004") && strcmp(hid, "PNP0A05") && + strcmp(hid, "PNP0A06")) { + goto end; + } + + switch(*action) { + case INSTALL_NOTIFY_HANDLER: + acpi_install_notify_handler(handle, + ACPI_SYSTEM_NOTIFY, + container_notify_cb, + NULL); + break; + case UNINSTALL_NOTIFY_HANDLER: + acpi_remove_notify_handler(handle, + ACPI_SYSTEM_NOTIFY, + container_notify_cb); + break; + default: + break; + } + +end: + acpi_os_free(buffer.pointer); + + return_ACPI_STATUS(AE_OK); +} + + +int __init +acpi_container_init(void) +{ + int result = 0; + int action = INSTALL_NOTIFY_HANDLER; + + result = acpi_bus_register_driver(&acpi_container_driver); + if (result < 0) { + return(result); + } + + /* register notify handler to every container device */ + acpi_walk_namespace(ACPI_TYPE_DEVICE, + ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, + container_walk_namespace_cb, + &action, NULL); + + return(0); +} + +void __exit +acpi_container_exit(void) +{ + int action = UNINSTALL_NOTIFY_HANDLER; + + ACPI_FUNCTION_TRACE("acpi_container_exit"); + + acpi_walk_namespace(ACPI_TYPE_DEVICE, + ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, + container_walk_namespace_cb, + &action, NULL); + + acpi_bus_unregister_driver(&acpi_container_driver); + + return_VOID; +} + +module_init(acpi_container_init); +module_exit(acpi_container_exit); diff -Nru a/drivers/acpi/ec.c b/drivers/acpi/ec.c --- a/drivers/acpi/ec.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/ec.c 2004-11-15 20:47:22 -08:00 @@ -1,6 +1,7 @@ /* * acpi_ec.c - ACPI Embedded Controller Driver ($Revision: 38 $) * + * Copyright (C) 2004 Luming Yu * Copyright (C) 2001, 2002 Andy Grover * Copyright (C) 2001, 2002 Paul Diefenbaugh * @@ -29,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -441,9 +443,15 @@ ACPI_FUNCTION_TRACE("acpi_ec_space_handler"); - if ((address > 0xFF) || (bit_width != 8) || !value || !handler_context) + if ((address > 0xFF) || !value || !handler_context) return_VALUE(AE_BAD_PARAMETER); + if(bit_width != 8) { + printk(KERN_WARNING PREFIX "acpi_ec_space_handler: bit_width should be 8\n"); + if (acpi_strict) + return_VALUE(AE_BAD_PARAMETER); + } + ec = (struct acpi_ec *) handler_context; switch (function) { @@ -484,41 +492,38 @@ static int -acpi_ec_read_info ( - char *page, - char **start, - off_t off, - int count, - int *eof, - void *data) +acpi_ec_read_info (struct seq_file *seq, void *offset) { - struct acpi_ec *ec = (struct acpi_ec *) data; - char *p = page; - int len = 0; + struct acpi_ec *ec = (struct acpi_ec *) seq->private; ACPI_FUNCTION_TRACE("acpi_ec_read_info"); - if (!ec || (off != 0)) + if (!ec) goto end; - p += sprintf(p, "gpe bit: 0x%02x\n", + seq_printf(seq, "gpe bit: 0x%02x\n", (u32) ec->gpe_bit); - p += sprintf(p, "ports: 0x%02x, 0x%02x\n", + seq_printf(seq, "ports: 0x%02x, 0x%02x\n", (u32) ec->status_addr.address, (u32) ec->data_addr.address); - p += sprintf(p, "use global lock: %s\n", + seq_printf(seq, "use global lock: %s\n", ec->global_lock?"yes":"no"); end: - len = (p - page); - if (len <= off+count) *eof = 1; - *start = page + off; - len -= off; - if (len>count) len = count; - if (len<0) len = 0; + return_VALUE(0); +} - return_VALUE(len); +static int acpi_ec_info_open_fs(struct inode *inode, struct file *file) +{ + return single_open(file, acpi_ec_read_info, PDE(inode)->data); } +static struct file_operations acpi_ec_info_ops = { + .open = acpi_ec_info_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + .owner = THIS_MODULE, +}; static int acpi_ec_add_fs ( @@ -535,13 +540,17 @@ return_VALUE(-ENODEV); } - entry = create_proc_read_entry(ACPI_EC_FILE_INFO, S_IRUGO, - acpi_device_dir(device), acpi_ec_read_info, - acpi_driver_data(device)); + entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO, + acpi_device_dir(device)); if (!entry) ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Unable to create '%s' fs entry\n", ACPI_EC_FILE_INFO)); + else { + entry->proc_fops = &acpi_ec_info_ops; + entry->data = acpi_driver_data(device); + entry->owner = THIS_MODULE; + } return_VALUE(0); } diff -Nru a/drivers/acpi/fan.c b/drivers/acpi/fan.c --- a/drivers/acpi/fan.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/fan.c 2004-11-15 20:47:22 -08:00 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -75,51 +76,41 @@ static int -acpi_fan_read_state ( - char *page, - char **start, - off_t off, - int count, - int *eof, - void *data) +acpi_fan_read_state (struct seq_file *seq, void *offset) { - struct acpi_fan *fan = (struct acpi_fan *) data; - char *p = page; - int len = 0; + struct acpi_fan *fan = (struct acpi_fan *) seq->private; int state = 0; ACPI_FUNCTION_TRACE("acpi_fan_read_state"); - if (!fan || (off != 0)) + if (!fan) goto end; if (acpi_bus_get_power(fan->handle, &state)) goto end; - p += sprintf(p, "status: %s\n", + seq_printf(seq, "status: %s\n", !state?"on":"off"); end: - len = (p - page); - if (len <= off+count) *eof = 1; - *start = page + off; - len -= off; - if (len>count) len = count; - if (len<0) len = 0; - - return_VALUE(len); + return_VALUE(0); } +static int acpi_fan_state_open_fs(struct inode *inode, struct file *file) +{ + return single_open(file, acpi_fan_read_state, PDE(inode)->data); +} -static int +static ssize_t acpi_fan_write_state ( struct file *file, const char __user *buffer, - unsigned long count, - void *data) + size_t count, + loff_t *ppos) { int result = 0; - struct acpi_fan *fan = (struct acpi_fan *) data; + struct seq_file *m = (struct seq_file *)file->private_data; + struct acpi_fan *fan = (struct acpi_fan *) m->private; char state_string[12] = {'\0'}; ACPI_FUNCTION_TRACE("acpi_fan_write_state"); @@ -140,6 +131,14 @@ return_VALUE(count); } +static struct file_operations acpi_fan_state_ops = { + .open = acpi_fan_state_open_fs, + .read = seq_read, + .write = acpi_fan_write_state, + .llseek = seq_lseek, + .release = single_release, + .owner = THIS_MODULE, +}; static int acpi_fan_add_fs ( @@ -168,8 +167,7 @@ "Unable to create '%s' fs entry\n", ACPI_FAN_FILE_STATE)); else { - entry->read_proc = acpi_fan_read_state; - entry->write_proc = acpi_fan_write_state; + entry->proc_fops = &acpi_fan_state_ops; entry->data = acpi_driver_data(device); entry->owner = THIS_MODULE; } diff -Nru a/drivers/acpi/numa.c b/drivers/acpi/numa.c --- a/drivers/acpi/numa.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/numa.c 2004-11-15 20:47:22 -08:00 @@ -22,7 +22,7 @@ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * */ - +#include #include #include #include @@ -199,3 +199,22 @@ acpi_numa_arch_fixup(); return 0; } + +int +acpi_get_pxm(acpi_handle h) +{ + unsigned long pxm; + acpi_status status; + acpi_handle handle; + acpi_handle phandle = h; + + do { + handle = phandle; + status = acpi_evaluate_integer(handle, "_PXM", NULL, &pxm); + if (ACPI_SUCCESS(status)) + return (int)pxm; + status = acpi_get_parent(handle, &phandle); + } while(ACPI_SUCCESS(status)); + return -1; +} +EXPORT_SYMBOL(acpi_get_pxm); diff -Nru a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c --- a/drivers/acpi/pci_bind.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/pci_bind.c 2004-11-15 20:47:22 -08:00 @@ -214,6 +214,7 @@ data->id.device, data->id.function)); data->bus = data->dev->subordinate; device->ops.bind = acpi_pci_bind; + device->ops.unbind = acpi_pci_unbind; } /* @@ -257,6 +258,49 @@ return_VALUE(result); } +int acpi_pci_unbind( + struct acpi_device *device) +{ + int result = 0; + acpi_status status = AE_OK; + struct acpi_pci_data *data = NULL; + char pathname[ACPI_PATHNAME_MAX] = {0}; + struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname}; + + ACPI_FUNCTION_TRACE("acpi_pci_unbind"); + + if (!device || !device->parent) + return_VALUE(-EINVAL); + + acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer); + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unbinding PCI device [%s]...\n", + pathname)); + + status = acpi_get_data(device->handle, acpi_pci_data_handler, (void**)&data); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to get data from device %s\n", + acpi_device_bid(device))); + result = -ENODEV; + goto end; + } + + status = acpi_detach_data(device->handle, acpi_pci_data_handler); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to detach data from device %s\n", + acpi_device_bid(device))); + result = -ENODEV; + goto end; + } + if (data->dev->subordinate) { + acpi_pci_irq_del_prt(data->id.segment, data->bus->number); + } + kfree(data); + +end: + return_VALUE(result); +} int acpi_pci_bind_root ( @@ -283,6 +327,7 @@ data->id = *id; data->bus = bus; device->ops.bind = acpi_pci_bind; + device->ops.unbind = acpi_pci_unbind; acpi_get_name(device->handle, ACPI_FULL_PATHNAME, &buffer); diff -Nru a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c --- a/drivers/acpi/pci_irq.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/pci_irq.c 2004-11-15 20:47:22 -08:00 @@ -43,7 +43,7 @@ ACPI_MODULE_NAME ("pci_irq") struct acpi_prt_list acpi_prt; - +spinlock_t acpi_prt_lock = SPIN_LOCK_UNLOCKED; /* -------------------------------------------------------------------------- PCI IRQ Routing Table (PRT) Support @@ -68,18 +68,20 @@ * Parse through all PRT entries looking for a match on the specified * PCI device's segment, bus, device, and pin (don't care about func). * - * TBD: Acquire/release lock */ + spin_lock(&acpi_prt_lock); list_for_each(node, &acpi_prt.entries) { entry = list_entry(node, struct acpi_prt_entry, node); if ((segment == entry->id.segment) && (bus == entry->id.bus) && (device == entry->id.device) && (pin == entry->pin)) { + spin_unlock(&acpi_prt_lock); return_PTR(entry); } } + spin_unlock(&acpi_prt_lock); return_PTR(NULL); } @@ -141,14 +143,29 @@ entry->id.segment, entry->id.bus, entry->id.device, ('A' + entry->pin), prt->source, entry->link.index)); - /* TBD: Acquire/release lock */ + spin_lock(&acpi_prt_lock); list_add_tail(&entry->node, &acpi_prt.entries); acpi_prt.count++; + spin_unlock(&acpi_prt_lock); return_VALUE(0); } +static void +acpi_pci_irq_del_entry ( + int segment, + int bus, + struct acpi_prt_entry *entry) +{ + if (segment == entry->id.segment && bus == entry->id.bus){ + acpi_prt.count--; + list_del(&entry->node); + kfree(entry); + } +} + + int acpi_pci_irq_add_prt ( acpi_handle handle, @@ -222,11 +239,35 @@ return_VALUE(0); } +void +acpi_pci_irq_del_prt (int segment, int bus) +{ + struct list_head *node = NULL, *n = NULL; + struct acpi_prt_entry *entry = NULL; + + if (!acpi_prt.count) { + return; + } + printk(KERN_DEBUG "ACPI: Delete PCI Interrupt Routing Table for %x:%x\n", + segment, bus); + spin_lock(&acpi_prt_lock); + list_for_each_safe(node, n, &acpi_prt.entries) { + entry = list_entry(node, struct acpi_prt_entry, node); + + acpi_pci_irq_del_entry(segment, bus, entry); + } + spin_unlock(&acpi_prt_lock); +} /* -------------------------------------------------------------------------- PCI Interrupt Routing Support -------------------------------------------------------------------------- */ +/* + * acpi_pci_irq_lookup + * success: return IRQ >= 0 + * failure: return -1 + */ static int acpi_pci_irq_lookup ( struct pci_bus *bus, @@ -249,14 +290,14 @@ entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin); if (!entry) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n")); - return_VALUE(0); + return_VALUE(-1); } if (entry->link.handle) { irq = acpi_pci_link_get_irq(entry->link.handle, entry->link.index, edge_level, active_high_low); - if (!irq) { + if (irq < 0) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid IRQ link routing entry\n")); - return_VALUE(0); + return_VALUE(-1); } } else { irq = entry->link.index; @@ -269,6 +310,11 @@ return_VALUE(irq); } +/* + * acpi_pci_irq_derive + * success: return IRQ >= 0 + * failure: return < 0 + */ static int acpi_pci_irq_derive ( struct pci_dev *dev, @@ -277,7 +323,7 @@ int *active_high_low) { struct pci_dev *bridge = dev; - int irq = 0; + int irq = -1; u8 bridge_pin = 0; ACPI_FUNCTION_TRACE("acpi_pci_irq_derive"); @@ -289,7 +335,7 @@ * Attempt to derive an IRQ for this device from a parent bridge's * PCI interrupt routing entry (eg. yenta bridge and add-in card bridge). */ - while (!irq && bridge->bus->self) { + while (irq < 0 && bridge->bus->self) { pin = (pin + PCI_SLOT(bridge->devfn)) % 4; bridge = bridge->bus->self; @@ -299,7 +345,7 @@ if (!bridge_pin) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No interrupt pin configured for device %s\n", pci_name(bridge))); - return_VALUE(0); + return_VALUE(-1); } /* Pin is from 0 to 3 */ bridge_pin --; @@ -310,9 +356,9 @@ pin, edge_level, active_high_low); } - if (!irq) { + if (irq < 0) { ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Unable to derive IRQ for device %s\n", pci_name(dev))); - return_VALUE(0); + return_VALUE(-1); } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n", @@ -321,6 +367,11 @@ return_VALUE(irq); } +/* + * acpi_pci_irq_enable + * success: return 0 + * failure: return < 0 + */ int acpi_pci_irq_enable ( @@ -358,20 +409,20 @@ * If no PRT entry was found, we'll try to derive an IRQ from the * device's parent bridge. */ - if (!irq) + if (irq < 0) irq = acpi_pci_irq_derive(dev, pin, &edge_level, &active_high_low); /* * No IRQ known to the ACPI subsystem - maybe the BIOS / * driver reported one, then use it. Exit in any case. */ - if (!irq) { + if (irq < 0) { printk(KERN_WARNING PREFIX "PCI interrupt %s[%c]: no GSI", pci_name(dev), ('A' + pin)); /* Interrupt Line values above 0xF are forbidden */ - if (dev->irq && (dev->irq <= 0xF)) { + if (dev->irq >= 0 && (dev->irq <= 0xF)) { printk(" - using IRQ %d\n", dev->irq); - return_VALUE(dev->irq); + return_VALUE(0); } else { printk("\n"); @@ -388,5 +439,5 @@ (active_high_low == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); - return_VALUE(dev->irq); + return_VALUE(0); } diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c --- a/drivers/acpi/pci_link.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/pci_link.c 2004-11-15 20:47:22 -08:00 @@ -577,6 +577,11 @@ return_VALUE(0); } +/* + * acpi_pci_link_get_irq + * success: return IRQ >= 0 + * failure: return -1 + */ int acpi_pci_link_get_irq ( @@ -594,27 +599,27 @@ result = acpi_bus_get_device(handle, &device); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); - return_VALUE(0); + return_VALUE(-1); } link = (struct acpi_pci_link *) acpi_driver_data(device); if (!link) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); - return_VALUE(0); + return_VALUE(-1); } /* TBD: Support multiple index (IRQ) entries per Link Device */ if (index) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid index %d\n", index)); - return_VALUE(0); + return_VALUE(-1); } if (acpi_pci_link_allocate(link)) - return_VALUE(0); + return_VALUE(-1); if (!link->irq.active) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link active IRQ is 0!\n")); - return_VALUE(0); + return_VALUE(-1); } if (edge_level) *edge_level = link->irq.edge_level; diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c --- a/drivers/acpi/processor.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/processor.c 2004-11-15 20:47:22 -08:00 @@ -4,6 +4,8 @@ * Copyright (C) 2001, 2002 Andy Grover * Copyright (C) 2001, 2002 Paul Diefenbaugh * Copyright (C) 2004 Dominik Brodowski + * Copyright (C) 2004 Anil S Keshavamurthy + * - Added processor hotplug support * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * @@ -37,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -44,6 +47,7 @@ #include #include +#include #include #include #include @@ -71,10 +75,11 @@ #define C2_OVERHEAD 4 /* 1us (3.579 ticks per us) */ #define C3_OVERHEAD 4 /* 1us (3.579 ticks per us) */ - #define ACPI_PROCESSOR_LIMIT_USER 0 #define ACPI_PROCESSOR_LIMIT_THERMAL 1 +#define ACPI_STA_PRESENT 0x00000001 + #define _COMPONENT ACPI_PROCESSOR_COMPONENT ACPI_MODULE_NAME ("acpi_processor") @@ -84,12 +89,16 @@ static int acpi_processor_add (struct acpi_device *device); +static int acpi_processor_start (struct acpi_device *device); static int acpi_processor_remove (struct acpi_device *device, int type); static int acpi_processor_info_open_fs(struct inode *inode, struct file *file); static int acpi_processor_throttling_open_fs(struct inode *inode, struct file *file); static int acpi_processor_power_open_fs(struct inode *inode, struct file *file); static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file); static int acpi_processor_get_limit_info(struct acpi_processor *pr); +static void acpi_processor_notify ( acpi_handle handle, u32 event, void *data); +static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu); +static int acpi_processor_handle_eject(struct acpi_processor *pr); static struct acpi_driver acpi_processor_driver = { .name = ACPI_PROCESSOR_DRIVER_NAME, @@ -98,9 +107,13 @@ .ops = { .add = acpi_processor_add, .remove = acpi_processor_remove, + .start = acpi_processor_start, }, }; +#define INSTALL_NOTIFY_HANDLER 1 +#define UNINSTALL_NOTIFY_HANDLER 2 + static int c2 = -1; static int c3 = -1; @@ -2342,23 +2355,30 @@ cpu_index = convert_acpiid_to_cpu(pr->acpi_id); - if ( !cpu0_initialized && (cpu_index == 0xff)) { - /* Handle UP system running SMP kernel, with no LAPIC in MADT */ - cpu_index = 0; - } else if (cpu_index > num_online_cpus()) { - /* - * Extra Processor objects may be enumerated on MP systems with - * less than the max # of CPUs. They should be ignored. - */ - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error getting cpuindex for acpiid 0x%x\n", - pr->acpi_id)); - return_VALUE(-ENODEV); - } - cpu0_initialized = 1; - - pr->id = cpu_index; - + /* Handle UP system running SMP kernel, with no LAPIC in MADT */ + if ( !cpu0_initialized && (cpu_index == 0xff) && + (num_online_cpus() == 1)) { + cpu_index = 0; + } + + cpu0_initialized = 1; + + pr->id = cpu_index; + + /* + * Extra Processor objects may be enumerated on MP systems with + * less than the max # of CPUs. They should be ignored _iff + * they are physically not present. + */ + if (cpu_index >= NR_CPUS) { + if (ACPI_FAILURE(acpi_processor_hotadd_init(pr->handle, &pr->id))) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error getting cpuindex for acpiid 0x%x\n", + pr->acpi_id)); + return_VALUE(-ENODEV); + } + } + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Processor [%d:%d]\n", pr->id, pr->acpi_id)); @@ -2396,6 +2416,71 @@ return_VALUE(0); } +static int +acpi_processor_start( + struct acpi_device *device) +{ + int result = 0; + acpi_status status = AE_OK; + u32 i = 0; + struct acpi_processor *pr; + + ACPI_FUNCTION_TRACE("acpi_processor_start"); + + pr = acpi_driver_data(device); + + result = acpi_processor_get_info(pr); + if (result) { + /* Processor is physically not present */ + return_VALUE(0); + } + + BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); + + processors[pr->id] = pr; + + result = acpi_processor_add_fs(device); + if (result) + goto end; + + status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, + acpi_processor_notify, pr); + if (ACPI_FAILURE(status)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Error installing device notify handler\n")); + } + + /* + * Install the idle handler if processor power management is supported. + * Note that we use previously set idle handler will be used on + * platforms that only support C1. + */ + if ((pr->flags.power) && (!boot_option_idle_override)) { + printk(KERN_INFO PREFIX "%s [%s] (supports", + acpi_device_name(device), acpi_device_bid(device)); + for (i = 1; i < ACPI_C_STATE_COUNT; i++) + if (pr->power.states[i].valid) + printk(" C%d", i); + printk(")\n"); + if (pr->id == 0) { + pm_idle_save = pm_idle; + pm_idle = acpi_processor_idle; + } + } + + if (pr->flags.throttling) { + printk(KERN_INFO PREFIX "%s [%s] (supports", + acpi_device_name(device), acpi_device_bid(device)); + printk(" %d throttling states", pr->throttling.state_count); + printk(")\n"); + } + +end: + + return_VALUE(result); +} + + static void acpi_processor_notify ( @@ -2438,10 +2523,7 @@ acpi_processor_add ( struct acpi_device *device) { - int result = 0; - acpi_status status = AE_OK; struct acpi_processor *pr = NULL; - u32 i = 0; ACPI_FUNCTION_TRACE("acpi_processor_add"); @@ -2458,57 +2540,7 @@ strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); acpi_driver_data(device) = pr; - result = acpi_processor_get_info(pr); - if (result) - goto end; - - result = acpi_processor_add_fs(device); - if (result) - goto end; - - status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, - acpi_processor_notify, pr); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_ERROR, - "Error installing notify handler\n")); - result = -ENODEV; - goto end; - } - - processors[pr->id] = pr; - - /* - * Install the idle handler if processor power management is supported. - * Note that we use previously set idle handler will be used on - * platforms that only support C1. - */ - if ((pr->flags.power) && (!boot_option_idle_override)) { - printk(KERN_INFO PREFIX "%s [%s] (supports", - acpi_device_name(device), acpi_device_bid(device)); - for (i = 1; i < ACPI_C_STATE_COUNT; i++) - if (pr->power.states[i].valid) - printk(" C%d", i); - printk(")\n"); - if (pr->id == 0) { - pm_idle_save = pm_idle; - pm_idle = acpi_processor_idle; - } - } - - if (pr->flags.throttling) { - printk(KERN_INFO PREFIX "%s [%s] (supports", - acpi_device_name(device), acpi_device_bid(device)); - printk(" %d throttling states", pr->throttling.state_count); - printk(")\n"); - } - -end: - if (result) { - acpi_processor_remove_fs(device); - kfree(pr); - } - - return_VALUE(result); + return_VALUE(0); } @@ -2527,6 +2559,16 @@ pr = (struct acpi_processor *) acpi_driver_data(device); + if (pr->id >= NR_CPUS) { + kfree(pr); + return_VALUE(0); + } + + if (type == ACPI_BUS_REMOVAL_EJECT) { + if (acpi_processor_handle_eject(pr)) + return_VALUE(-EINVAL); + } + /* Unregister the idle handler when processor #0 is removed. */ if (pr->id == 0) { pm_idle = pm_idle_save; @@ -2578,9 +2620,262 @@ {}, }; -/* We keep the driver loaded even when ACPI is not running. - This is needed for the powernow-k8 driver, that works even without - ACPI, but needs symbols from this driver */ +#ifdef CONFIG_ACPI_HOTPLUG_CPU +/**************************************************************************** + * Acpi processor hotplug support * + ****************************************************************************/ + +static int is_processor_present(acpi_handle handle); + +static int +is_processor_present( + acpi_handle handle) +{ + acpi_status status; + unsigned long sta = 0; + + ACPI_FUNCTION_TRACE("is_processor_present"); + + status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); + if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Processor Device is not present\n")); + return_VALUE(0); + } + return_VALUE(1); +} + + +static +int acpi_processor_device_add( + acpi_handle handle, + struct acpi_device **device) +{ + acpi_handle phandle; + struct acpi_device *pdev; + struct acpi_processor *pr; + + ACPI_FUNCTION_TRACE("acpi_processor_device_add"); + + if (acpi_get_parent(handle, &phandle)) { + return_VALUE(-ENODEV); + } + + if (acpi_bus_get_device(phandle, &pdev)) { + return_VALUE(-ENODEV); + } + + if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_PROCESSOR)) { + return_VALUE(-ENODEV); + } + + acpi_bus_scan(*device); + + pr = acpi_driver_data(*device); + if (!pr) + return_VALUE(-ENODEV); + + if ((pr->id >=0) && (pr->id < NR_CPUS)) { + kobject_hotplug(&(*device)->kobj, KOBJ_ONLINE); + } + return_VALUE(0); +} + + +static void +acpi_processor_hotplug_notify ( + acpi_handle handle, + u32 event, + void *data) +{ + struct acpi_processor *pr; + struct acpi_device *device = NULL; + int result; + + ACPI_FUNCTION_TRACE("acpi_processor_hotplug_notify"); + + switch (event) { + case ACPI_NOTIFY_BUS_CHECK: + case ACPI_NOTIFY_DEVICE_CHECK: + printk("Processor driver received %s event\n", + (event==ACPI_NOTIFY_BUS_CHECK)? + "ACPI_NOTIFY_BUS_CHECK":"ACPI_NOTIFY_DEVICE_CHECK"); + + if (!is_processor_present(handle)) + break; + + if (acpi_bus_get_device(handle, &device)) { + result = acpi_processor_device_add(handle, &device); + if (result) + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Unable to add the device\n")); + break; + } + + pr = acpi_driver_data(device); + if (!pr) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Driver data is NULL\n")); + break; + } + + if (pr->id >= 0 && (pr->id < NR_CPUS)) { + kobject_hotplug(&device->kobj, KOBJ_OFFLINE); + break; + } + + result = acpi_processor_start(device); + if ((!result) && ((pr->id >=0) && (pr->id < NR_CPUS))) { + kobject_hotplug(&device->kobj, KOBJ_ONLINE); + } else { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, + "Device [%s] failed to start\n", + acpi_device_bid(device))); + } + break; + case ACPI_NOTIFY_EJECT_REQUEST: + ACPI_DEBUG_PRINT((ACPI_DB_INFO,"received ACPI_NOTIFY_EJECT_REQUEST\n")); + + if (acpi_bus_get_device(handle, &device)) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR,"Device don't exist, dropping EJECT\n")); + break; + } + pr = acpi_driver_data(device); + if (!pr) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR,"Driver data is NULL, dropping EJECT\n")); + return_VOID; + } + + if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) + kobject_hotplug(&device->kobj, KOBJ_OFFLINE); + break; + default: + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Unsupported event [0x%x]\n", event)); + break; + } + + return_VOID; +} + +static acpi_status +processor_walk_namespace_cb(acpi_handle handle, + u32 lvl, + void *context, + void **rv) +{ + acpi_status status; + int *action = context; + acpi_object_type type = 0; + + status = acpi_get_type(handle, &type); + if (ACPI_FAILURE(status)) + return(AE_OK); + + if (type != ACPI_TYPE_PROCESSOR) + return(AE_OK); + + switch(*action) { + case INSTALL_NOTIFY_HANDLER: + acpi_install_notify_handler(handle, + ACPI_SYSTEM_NOTIFY, + acpi_processor_hotplug_notify, + NULL); + break; + case UNINSTALL_NOTIFY_HANDLER: + acpi_remove_notify_handler(handle, + ACPI_SYSTEM_NOTIFY, + acpi_processor_hotplug_notify); + break; + default: + break; + } + + return(AE_OK); +} + + +static acpi_status +acpi_processor_hotadd_init( + acpi_handle handle, + int *p_cpu) +{ + ACPI_FUNCTION_TRACE("acpi_processor_hotadd_init"); + + if (!is_processor_present(handle)) { + return_VALUE(AE_ERROR); + } + + if (acpi_map_lsapic(handle, p_cpu)) + return_VALUE(AE_ERROR); + + if (arch_register_cpu(*p_cpu)) { + acpi_unmap_lsapic(*p_cpu); + return_VALUE(AE_ERROR); + } + + return_VALUE(AE_OK); +} + + +static int +acpi_processor_handle_eject(struct acpi_processor *pr) +{ + if (cpu_online(pr->id)) { + return(-EINVAL); + } + arch_unregister_cpu(pr->id); + acpi_unmap_lsapic(pr->id); + return(0); +} +#else +static acpi_status +acpi_processor_hotadd_init( + acpi_handle handle, + int *p_cpu) +{ + return AE_ERROR; +} +static int +acpi_processor_handle_eject(struct acpi_processor *pr) +{ + return(-EINVAL); +} +#endif + + +static +void acpi_processor_install_hotplug_notify(void) +{ +#ifdef CONFIG_ACPI_HOTPLUG_CPU + int action = INSTALL_NOTIFY_HANDLER; + acpi_walk_namespace(ACPI_TYPE_PROCESSOR, + ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, + processor_walk_namespace_cb, + &action, NULL); +#endif +} + + +static +void acpi_processor_uninstall_hotplug_notify(void) +{ +#ifdef CONFIG_ACPI_HOTPLUG_CPU + int action = UNINSTALL_NOTIFY_HANDLER; + acpi_walk_namespace(ACPI_TYPE_PROCESSOR, + ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, + processor_walk_namespace_cb, + &action, NULL); +#endif +} + +/* + * We keep the driver loaded even when ACPI is not running. + * This is needed for the powernow-k8 driver, that works even without + * ACPI, but needs symbols from this driver + */ static int __init acpi_processor_init (void) @@ -2603,6 +2898,8 @@ return_VALUE(0); } + acpi_processor_install_hotplug_notify(); + acpi_thermal_cpufreq_init(); acpi_processor_ppc_init(); @@ -2621,6 +2918,8 @@ acpi_processor_ppc_exit(); acpi_thermal_cpufreq_exit(); + + acpi_processor_uninstall_hotplug_notify(); acpi_bus_unregister_driver(&acpi_processor_driver); diff -Nru a/drivers/acpi/scan.c b/drivers/acpi/scan.c --- a/drivers/acpi/scan.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/scan.c 2004-11-15 20:47:22 -08:00 @@ -2,6 +2,7 @@ * scan.c - support for transforming the ACPI namespace into individual objects */ +#include #include #include @@ -34,7 +35,49 @@ kfree(dev); } +struct acpi_device_attribute { + struct attribute attr; + ssize_t (*show)(struct acpi_device *, char *); + ssize_t (*store)(struct acpi_device *, const char *, size_t); +}; + +typedef void acpi_device_sysfs_files(struct kobject *, + const struct attribute *); + +static void setup_sys_fs_device_files(struct acpi_device *dev, + acpi_device_sysfs_files *func); + +#define create_sysfs_device_files(dev) \ + setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_create_file) +#define remove_sysfs_device_files(dev) \ + setup_sys_fs_device_files(dev, (acpi_device_sysfs_files *)&sysfs_remove_file) + + +#define to_acpi_device(n) container_of(n, struct acpi_device, kobj) +#define to_handle_attr(n) container_of(n, struct acpi_device_attribute, attr); + +static ssize_t acpi_device_attr_show(struct kobject *kobj, + struct attribute *attr, char *buf) +{ + struct acpi_device *device = to_acpi_device(kobj); + struct acpi_device_attribute *attribute = to_handle_attr(attr); + return attribute->show ? attribute->show(device, buf) : 0; +} +static ssize_t acpi_device_attr_store(struct kobject *kobj, + struct attribute *attr, const char *buf, size_t len) +{ + struct acpi_device *device = to_acpi_device(kobj); + struct acpi_device_attribute *attribute = to_handle_attr(attr); + return attribute->store ? attribute->store(device, buf, len) : len; +} + +static struct sysfs_ops acpi_device_sysfs_ops = { + .show = acpi_device_attr_show, + .store = acpi_device_attr_store, +}; + static struct kobj_type ktype_acpi_ns = { + .sysfs_ops = &acpi_device_sysfs_ops, .release = acpi_device_release, }; @@ -57,6 +100,7 @@ INIT_LIST_HEAD(&device->children); INIT_LIST_HEAD(&device->node); INIT_LIST_HEAD(&device->g_list); + INIT_LIST_HEAD(&device->wakeup_list); spin_lock(&acpi_device_lock); if (device->parent) { @@ -64,15 +108,17 @@ list_add_tail(&device->g_list,&device->parent->g_list); } else list_add_tail(&device->g_list,&acpi_device_list); + if (device->wakeup.flags.valid) + list_add_tail(&device->wakeup_list,&acpi_wakeup_device_list); spin_unlock(&acpi_device_lock); - kobject_init(&device->kobj); strlcpy(device->kobj.name,device->pnp.bus_id,KOBJ_NAME_LEN); if (parent) device->kobj.parent = &parent->kobj; device->kobj.ktype = &ktype_acpi_ns; device->kobj.kset = &acpi_namespace_kset; - kobject_add(&device->kobj); + kobject_register(&device->kobj); + create_sysfs_device_files(device); } static int @@ -80,6 +126,19 @@ struct acpi_device *device, int type) { + spin_lock(&acpi_device_lock); + if (device->parent) { + list_del(&device->node); + list_del(&device->g_list); + } else + list_del(&device->g_list); + + list_del(&device->wakeup_list); + + spin_unlock(&acpi_device_lock); + + acpi_detach_data(device->handle, acpi_bus_data_handler); + remove_sysfs_device_files(device); kobject_unregister(&device->kobj); return 0; } @@ -271,12 +330,6 @@ if (!acpi_match_ids(device, "PNP0C0D,PNP0C0C,PNP0C0E")) device->wakeup.flags.run_wake = 1; - /* TBD: lock */ - INIT_LIST_HEAD(&device->wakeup_list); - spin_lock(&acpi_device_lock); - list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list); - spin_unlock(&acpi_device_lock); - end: if (ACPI_FAILURE(status)) device->flags.wake_capable = 0; @@ -284,6 +337,114 @@ } /* -------------------------------------------------------------------------- + ACPI hotplug sysfs device file support + -------------------------------------------------------------------------- */ +static ssize_t acpi_eject_store(struct acpi_device *device, + const char *buf, size_t count); + +#define ACPI_DEVICE_ATTR(_name,_mode,_show,_store) \ +static struct acpi_device_attribute acpi_device_attr_##_name = \ + __ATTR(_name, _mode, _show, _store) + +ACPI_DEVICE_ATTR(eject, 0200, NULL, acpi_eject_store); + +/** + * setup_sys_fs_device_files - sets up the device files under device namespace + * @@dev: acpi_device object + * @@func: function pointer to create or destroy the device file + */ +static void +setup_sys_fs_device_files ( + struct acpi_device *dev, + acpi_device_sysfs_files *func) +{ + if (dev->flags.ejectable == 1) + (*(func))(&dev->kobj,&acpi_device_attr_eject.attr); +} + +static int +acpi_eject_operation(acpi_handle handle, int lockable) +{ + struct acpi_object_list arg_list; + union acpi_object arg; + acpi_status status = AE_OK; + + /* + * TBD: evaluate _PS3? + */ + + if (lockable) { + arg_list.count = 1; + arg_list.pointer = &arg; + arg.type = ACPI_TYPE_INTEGER; + arg.integer.value = 0; + acpi_evaluate_object(handle, "_LCK", &arg_list, NULL); + } + + arg_list.count = 1; + arg_list.pointer = &arg; + arg.type = ACPI_TYPE_INTEGER; + arg.integer.value = 1; + + /* + * TBD: _EJD support. + */ + + status = acpi_evaluate_object(handle, "_EJ0", &arg_list, NULL); + if (ACPI_FAILURE(status)) { + return(-ENODEV); + } + + return(0); +} + + +static ssize_t +acpi_eject_store(struct acpi_device *device, const char *buf, size_t count) +{ + int result; + int ret = count; + int islockable; + acpi_status status; + acpi_handle handle; + acpi_object_type type = 0; + + if ((!count) || (buf[0] != '1')) { + return -EINVAL; + } + +#ifndef FORCE_EJECT + if (device->driver == NULL) { + ret = -ENODEV; + goto err; + } +#endif + status = acpi_get_type(device->handle, &type); + if (ACPI_FAILURE(status) || (!device->flags.ejectable) ) { + ret = -ENODEV; + goto err; + } + + islockable = device->flags.lockable; + handle = device->handle; + + if (type == ACPI_TYPE_PROCESSOR) + result = acpi_bus_trim(device, 0); + else + result = acpi_bus_trim(device, 1); + + if (!result) + result = acpi_eject_operation(handle, islockable); + + if (result) { + ret = -EBUSY; + } +err: + return ret; +} + + +/* -------------------------------------------------------------------------- Performance Management -------------------------------------------------------------------------- */ @@ -724,7 +885,7 @@ #ifdef CONFIG_ACPI_DEBUG_OUTPUT char *type_string = NULL; char name[80] = {'?','\0'}; - acpi_buffer buffer = {sizeof(name), name}; + struct acpi_buffer buffer = {sizeof(name), name}; switch (type) { case ACPI_BUS_TYPE_DEVICE: @@ -761,7 +922,55 @@ #endif /*CONFIG_ACPI_DEBUG_OUTPUT*/ } -static int + +int +acpi_bus_remove ( + struct acpi_device *dev, + int rmdevice) +{ + int result = 0; + struct acpi_driver *driver; + + ACPI_FUNCTION_TRACE("acpi_bus_remove"); + + if (!dev) + return_VALUE(-EINVAL); + + driver = dev->driver; + + if ((driver) && (driver->ops.remove)) { + + if (driver->ops.stop) { + result = driver->ops.stop(dev, ACPI_BUS_REMOVAL_EJECT); + if (result) + return_VALUE(result); + } + + result = dev->driver->ops.remove(dev, ACPI_BUS_REMOVAL_EJECT); + if (result) { + return_VALUE(result); + } + + atomic_dec(&dev->driver->references); + dev->driver = NULL; + acpi_driver_data(dev) = NULL; + } + + if (!rmdevice) + return_VALUE(0); + + if (dev->flags.bus_address) { + if ((dev->parent) && (dev->parent->ops.unbind)) + dev->parent->ops.unbind(dev); + } + + acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); + + return_VALUE(0); +} + + +int acpi_bus_add ( struct acpi_device **child, struct acpi_device *parent, @@ -908,7 +1117,7 @@ -static int acpi_bus_scan (struct acpi_device *start) +int acpi_bus_scan (struct acpi_device *start) { acpi_status status = AE_OK; struct acpi_device *parent = NULL; @@ -1010,6 +1219,62 @@ return_VALUE(0); } + +int +acpi_bus_trim(struct acpi_device *start, + int rmdevice) +{ + acpi_status status; + struct acpi_device *parent, *child; + acpi_handle phandle, chandle; + acpi_object_type type; + u32 level = 1; + int err = 0; + + parent = start; + phandle = start->handle; + child = chandle = NULL; + + while ((level > 0) && parent && (!err)) { + status = acpi_get_next_object(ACPI_TYPE_ANY, phandle, + chandle, &chandle); + + /* + * If this scope is exhausted then move our way back up. + */ + if (ACPI_FAILURE(status)) { + level--; + chandle = phandle; + acpi_get_parent(phandle, &phandle); + child = parent; + parent = parent->parent; + + if (level == 0) + err = acpi_bus_remove(child, rmdevice); + else + err = acpi_bus_remove(child, 1); + + continue; + } + + status = acpi_get_type(chandle, &type); + if (ACPI_FAILURE(status)) { + continue; + } + /* + * If there is a device corresponding to chandle then + * parse it (depth-first). + */ + if (acpi_bus_get_device(chandle, &child) == 0) { + level++; + phandle = chandle; + chandle = NULL; + parent = child; + } + continue; + } + return err; +} static int acpi_bus_scan_fixed ( diff -Nru a/drivers/acpi/system.c b/drivers/acpi/system.c --- a/drivers/acpi/system.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/acpi/system.c 2004-11-15 20:47:22 -08:00 @@ -24,6 +24,7 @@ */ #include +#include #include #include @@ -48,35 +49,26 @@ -------------------------------------------------------------------------- */ static int -acpi_system_read_info ( - char *page, - char **start, - off_t off, - int count, - int *eof, - void *data) +acpi_system_read_info (struct seq_file *seq, void *offset) { - char *p = page; - int size = 0; - ACPI_FUNCTION_TRACE("acpi_system_read_info"); - if (off != 0) - goto end; - - p += sprintf(p, "version: %x\n", ACPI_CA_VERSION); - -end: - size = (p - page); - if (size <= off+count) *eof = 1; - *start = page + off; - size -= off; - if (size>count) size = count; - if (size<0) size = 0; + seq_printf(seq, "version: %x\n", ACPI_CA_VERSION); + return_VALUE(0); +} - return_VALUE(size); +static int acpi_system_info_open_fs(struct inode *inode, struct file *file) +{ + return single_open(file, acpi_system_read_info, PDE(inode)->data); } +static struct file_operations acpi_system_info_ops = { + .open = acpi_system_info_open_fs, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + static ssize_t acpi_system_read_dsdt (struct file*, char __user *, size_t, loff_t*); static struct file_operations acpi_system_dsdt_ops = { @@ -152,10 +144,13 @@ /* 'info' [R] */ name = ACPI_SYSTEM_FILE_INFO; - entry = create_proc_read_entry(name, - S_IRUGO, acpi_root_dir, acpi_system_read_info,NULL); + entry = create_proc_entry(name, + S_IRUGO, acpi_root_dir); if (!entry) goto Error; + else { + entry->proc_fops = &acpi_system_info_ops; + } /* 'dsdt' [R] */ name = ACPI_SYSTEM_FILE_DSDT; diff -Nru a/drivers/base/cpu.c b/drivers/base/cpu.c --- a/drivers/base/cpu.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/base/cpu.c 2004-11-15 20:47:22 -08:00 @@ -48,10 +48,23 @@ } static SYSDEV_ATTR(online, 0600, show_online, store_online); -static void __init register_cpu_control(struct cpu *cpu) +static void __devinit register_cpu_control(struct cpu *cpu) { sysdev_create_file(&cpu->sysdev, &attr_online); } +void unregister_cpu(struct cpu *cpu, struct node *root) +{ + + if (root) + sysfs_remove_link(&root->sysdev.kobj, + kobject_name(&cpu->sysdev.kobj)); + sysdev_remove_file(&cpu->sysdev, &attr_online); + + sysdev_unregister(&cpu->sysdev); + + return; +} +EXPORT_SYMBOL(unregister_cpu); #else /* ... !CONFIG_HOTPLUG_CPU */ static inline void register_cpu_control(struct cpu *cpu) { @@ -66,7 +79,7 @@ * * Initialize and register the CPU device. */ -int __init register_cpu(struct cpu *cpu, int num, struct node *root) +int __devinit register_cpu(struct cpu *cpu, int num, struct node *root) { int error; @@ -83,6 +96,9 @@ register_cpu_control(cpu); return error; } +#ifdef CONFIG_HOTPLUG_CPU +EXPORT_SYMBOL(register_cpu); +#endif diff -Nru a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c --- a/drivers/char/ipmi/ipmi_si_intf.c 2004-11-15 20:47:22 -08:00 +++ b/drivers/char/ipmi/ipmi_si_intf.c 2004-11-15 20:47:22 -08:00 @@ -1331,7 +1331,7 @@ static int acpi_failure = 0; /* For GPE-type interrupts. */ -u32 ipmi_acpi_gpe(void *context) +void ipmi_acpi_gpe(void *context) { struct smi_info *smi_info = context; unsigned long flags; @@ -1355,8 +1355,6 @@ smi_event_handler(smi_info, 0); out: spin_unlock_irqrestore(&(smi_info->si_lock), flags); - - return ACPI_INTERRUPT_HANDLED; } static int acpi_gpe_irq_setup(struct smi_info *info) diff -Nru a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h --- a/include/acpi/acpi_bus.h 2004-11-15 20:47:22 -08:00 +++ b/include/acpi/acpi_bus.h 2004-11-15 20:47:22 -08:00 @@ -104,6 +104,7 @@ typedef int (*acpi_op_resume) (struct acpi_device *device, int state); typedef int (*acpi_op_scan) (struct acpi_device *device); typedef int (*acpi_op_bind) (struct acpi_device *device); +typedef int (*acpi_op_unbind) (struct acpi_device *device); typedef int (*acpi_op_match) (struct acpi_device *device, struct acpi_driver *driver); @@ -117,6 +118,7 @@ acpi_op_resume resume; acpi_op_scan scan; acpi_op_bind bind; + acpi_op_unbind unbind; acpi_op_match match; }; @@ -316,7 +318,8 @@ * External Functions */ -int acpi_bus_get_device(acpi_handle, struct acpi_device **device); +int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); +void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); int acpi_bus_get_status (struct acpi_device *device); int acpi_bus_get_power (acpi_handle handle, int *state); int acpi_bus_set_power (acpi_handle handle, int state); @@ -324,6 +327,11 @@ int acpi_bus_receive_event (struct acpi_bus_event *event); int acpi_bus_register_driver (struct acpi_driver *driver); int acpi_bus_unregister_driver (struct acpi_driver *driver); +int acpi_bus_scan (struct acpi_device *start); +int acpi_bus_trim(struct acpi_device *start, int rmdevice); +int acpi_bus_add (struct acpi_device **child, struct acpi_device *parent, + acpi_handle handle, int type); + int acpi_match_ids (struct acpi_device *device, char *ids); int acpi_create_dir(struct acpi_device *); diff -Nru a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h --- a/include/acpi/acpi_drivers.h 2004-11-15 20:47:22 -08:00 +++ b/include/acpi/acpi_drivers.h 2004-11-15 20:47:22 -08:00 @@ -61,12 +61,14 @@ /* ACPI PCI Interrupt Routing (pci_irq.c) */ int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus); +void acpi_pci_irq_del_prt (int segment, int bus); /* ACPI PCI Device Binding (pci_bind.c) */ struct pci_bus; int acpi_pci_bind (struct acpi_device *device); +int acpi_pci_unbind (struct acpi_device *device); int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus); /* Arch-defined function to add a bus to the system */ diff -Nru a/include/acpi/container.h b/include/acpi/container.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/acpi/container.h 2004-11-15 20:47:22 -08:00 @@ -0,0 +1,13 @@ +#ifndef __ACPI_CONTAINER_H +#define __ACPI_CONTAINER_H + +#include + +struct acpi_container { + acpi_handle handle; + unsigned long sun; + int state; +}; + +#endif /* __ACPI_CONTAINER_H */ + diff -Nru a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h --- a/include/asm-i386/acpi.h 2004-11-15 20:47:22 -08:00 +++ b/include/asm-i386/acpi.h 2004-11-15 20:47:22 -08:00 @@ -133,12 +133,13 @@ #define FIX_ACPI_PAGES 4 extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); -extern int (*platform_rename_gsi)(int ioapic, int gsi); #ifdef CONFIG_X86_IO_APIC extern int skip_ioapic_setup; extern int acpi_skip_timer_override; +extern void check_acpi_pci(void); + static inline void disable_ioapic_setup(void) { skip_ioapic_setup = 1; @@ -150,8 +151,8 @@ } #else -static inline void disable_ioapic_setup(void) -{ } +static inline void disable_ioapic_setup(void) { } +static inline void check_acpi_pci(void) { } #endif @@ -160,6 +161,8 @@ # define acpi_ioapic 0 #endif + +extern int (*platform_rename_gsi)(int ioapic, int gsi); #ifdef CONFIG_ACPI_PCI static inline void acpi_noirq_set(void) { acpi_noirq = 1; } diff -Nru a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h --- a/include/asm-i386/cpu.h 2004-11-15 20:47:22 -08:00 +++ b/include/asm-i386/cpu.h 2004-11-15 20:47:22 -08:00 @@ -12,18 +12,9 @@ struct cpu cpu; }; extern struct i386_cpu cpu_devices[NR_CPUS]; - - -static inline int arch_register_cpu(int num){ - struct node *parent = NULL; - -#ifdef CONFIG_NUMA - int node = cpu_to_node(num); - if (node_online(node)) - parent = &node_devices[node].node; -#endif /* CONFIG_NUMA */ - - return register_cpu(&cpu_devices[num].cpu, num, parent); -} +extern int arch_register_cpu(int num); +#ifdef CONFIG_HOTPLUG_CPU +extern void arch_unregister_cpu(int); +#endif #endif /* _ASM_I386_CPU_H_ */ diff -Nru a/include/asm-i386/pci-direct.h b/include/asm-i386/pci-direct.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/asm-i386/pci-direct.h 2004-11-15 20:47:22 -08:00 @@ -0,0 +1 @@ +#include "asm-x86_64/pci-direct.h" diff -Nru a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h --- a/include/asm-ia64/acpi.h 2004-11-15 20:47:22 -08:00 +++ b/include/asm-ia64/acpi.h 2004-11-15 20:47:22 -08:00 @@ -101,7 +101,7 @@ #ifdef CONFIG_ACPI_NUMA /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ #define MAX_PXM_DOMAINS (256) -extern int __initdata pxm_to_nid_map[MAX_PXM_DOMAINS]; +extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; #endif diff -Nru a/include/asm-ia64/cpu.h b/include/asm-ia64/cpu.h --- a/include/asm-ia64/cpu.h 2004-11-15 20:47:22 -08:00 +++ b/include/asm-ia64/cpu.h 2004-11-15 20:47:22 -08:00 @@ -14,4 +14,9 @@ DECLARE_PER_CPU(int, cpu_state); +extern int arch_register_cpu(int num); +#ifdef CONFIG_HOTPLUG_CPU +extern void arch_unregister_cpu(int); +#endif + #endif /* _ASM_IA64_CPU_H_ */ diff -Nru a/include/linux/acpi.h b/include/linux/acpi.h --- a/include/linux/acpi.h 2004-11-15 20:47:22 -08:00 +++ b/include/linux/acpi.h 2004-11-15 20:47:22 -08:00 @@ -396,6 +396,12 @@ void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); void acpi_numa_arch_fixup(void); +#ifdef CONFIG_ACPI_HOTPLUG_CPU +/* Arch dependent functions for cpu hotplug support */ +int acpi_map_lsapic(acpi_handle handle, int *pcpu); +int acpi_unmap_lsapic(int cpu); +#endif /* CONFIG_ACPI_HOTPLUG_CPU */ + extern int acpi_mp_config; extern u32 pci_mmcfg_base_addr; @@ -472,6 +478,15 @@ } #endif /*!CONFIG_ACPI_INTERPRETER*/ + +#ifdef CONFIG_ACPI_NUMA +int acpi_get_pxm(acpi_handle handle); +#else +static inline int acpi_get_pxm(acpi_handle handle) +{ + return 0; +} +#endif #define ACPI_CSTATE_LIMIT_DEFINED /* for driver builds */ #ifdef CONFIG_ACPI diff -Nru a/include/linux/cpu.h b/include/linux/cpu.h --- a/include/linux/cpu.h 2004-11-15 20:47:22 -08:00 +++ b/include/linux/cpu.h 2004-11-15 20:47:22 -08:00 @@ -32,6 +32,9 @@ }; extern int register_cpu(struct cpu *, int, struct node *); +#ifdef CONFIG_HOTPLUG_CPU +extern void unregister_cpu(struct cpu *, struct node *); +#endif struct notifier_block; #ifdef CONFIG_SMP