From owner-cvs-all@FreeBSD.ORG Tue Nov 23 22:26:44 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D443416A4CE; Tue, 23 Nov 2004 22:26:44 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A30CD43D39; Tue, 23 Nov 2004 22:26:44 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iANMQiuK077291; Tue, 23 Nov 2004 22:26:44 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iANMQioc077290; Tue, 23 Nov 2004 22:26:44 GMT (envelope-from jhb) Message-Id: <200411232226.iANMQioc077290@repoman.freebsd.org> From: John Baldwin Date: Tue, 23 Nov 2004 22:26:44 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/acpica acpi_pci_link.c acpi_pcib.c acpi_pcib_acpi.c acpi_pcib_pci.c acpi_pcibvar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 22:26:45 -0000 jhb 2004-11-23 22:26:44 UTC FreeBSD src repository Modified files: sys/dev/acpica acpi_pci_link.c acpi_pcib.c acpi_pcib_acpi.c acpi_pcib_pci.c acpi_pcibvar.h Log: Rework the ACPI PCI link code. - Use a new-bus device driver for the ACPI PCI link devices. The devices are called pci_linkX. The driver includes suspend/resume support so that the ACPI bridge drivers no longer have to poke the links to get them to handle suspend/resume. Also, the code to handle which IRQs a link is routed to and choosing an IRQ when a link is not already routed is all contained in the link driver. The PCI bridge drivers now ask the link driver which IRQ to use once they determine that a _PRT entry does not use a hardwired interrupt number. - The new link driver includes support for multiple IRQ resources per link device as well as preserving any non-IRQ resources when adjusting the IRQ that a link is routed to. - The entire approach to routing when using a link device is now link-centric rather than pci bus/device/pin specific. Thus, when using a tunable to override the default IRQ settings, one now uses a single tunable to route an entire link rather than routing a single device that uses the link (which has great foot-shooting potential if the user tries to route the same link to two different IRQs using two different pci bus/device/pin hints). For example, to adjust the IRQ that \_SB_.LNKA uses, one would set 'hw.pci.link.LNKA.irq=10' from the loader. - As a side effect of having the link driver, unused link devices will now be disabled when they are probed. - The algorithm for choosing an IRQ for a link that doesn't already have an IRQ assigned is now much closer to the one used in $PIR routing. When a link is routed via an ISA IRQ, only known-good IRQs that the BIOS has already used are used for routing instead of using probabilities to guess at which IRQs are probably not used by an ISA device. One change from $PIR is that the SCI is always considered a viable ISA IRQ, so that if the BIOS does not setup any IRQs the kernel will degenerate to routing all interrupts over the SCI. For non ISA IRQs, interrupts are picked from the possible pool using a simplistic weighting algorithm. Tested by: ru, scottl, others on acpi@ Reviewed by: njl Revision Changes Path 1.34 +574 -974 src/sys/dev/acpica/acpi_pci_link.c 1.52 +116 -54 src/sys/dev/acpica/acpi_pcib.c 1.46 +2 -1 src/sys/dev/acpica/acpi_pcib_acpi.c 1.11 +1 -1 src/sys/dev/acpica/acpi_pcib_pci.c 1.4 +5 -31 src/sys/dev/acpica/acpi_pcibvar.h