提交 4a5e3638 编写于 作者: B Bjorn Helgaas 提交者: Andi Kleen

ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors

Silently ignore _PRS End Tags.  We already ignore Start Dependent Functions in
_PRS, and we already ignore End Tags in _CRS, so we might as well ignore End
Tags in _PRS as well.

Silently ignore _PRS IRQ descriptors that mention no interrupts.  The spec
allows this (section 6.4.2.1 in ACPI 3.0b spec), and it probably means the
interrupt link can't be configured at all.

This patch doesn't change any functional behavior; it just removes confusing
complaints like these:

    ACPI: Blank IRQ resource
    ACPI: Resource is not an IRQ entry

when parsing _PRS data "23 00 00 18 79 00" from an IBM xSeries 335 dual
Pentium IV Xeon 2.40 GHz machine.  For more details, see
    http://bugzilla.kernel.org/show_bug.cgi?id=11049

The "23 00 00 18" part is a three-byte-long small IRQ resource with no bits set
in the IRQ mask ("00 00"), and level-triggered, active low, shareable ("18").

The "79 00" is an End Tag (type 0x7).  It is superfluous since there is no
Start Dependent Function tag and there are no resources after it, but it is
harmless.

Thanks to Gabriele Trombetti <g.trombetti.lkrnl1213@logicschema.com>
(aka Kurk) for reporting this and testing the patch.
Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
上级 5b664cb2
...@@ -113,19 +113,22 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) ...@@ -113,19 +113,22 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
switch (resource->type) { switch (resource->type) {
case ACPI_RESOURCE_TYPE_START_DEPENDENT: case ACPI_RESOURCE_TYPE_START_DEPENDENT:
case ACPI_RESOURCE_TYPE_END_TAG:
return AE_OK; return AE_OK;
case ACPI_RESOURCE_TYPE_IRQ: case ACPI_RESOURCE_TYPE_IRQ:
{ {
struct acpi_resource_irq *p = &resource->data.irq; struct acpi_resource_irq *p = &resource->data.irq;
if (!p || !p->interrupt_count) { if (!p || !p->interrupt_count) {
printk(KERN_WARNING PREFIX "Blank IRQ resource\n"); ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Blank _PRS IRQ resource\n"));
return AE_OK; return AE_OK;
} }
for (i = 0; for (i = 0;
(i < p->interrupt_count (i < p->interrupt_count
&& i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
if (!p->interrupts[i]) { if (!p->interrupts[i]) {
printk(KERN_WARNING PREFIX "Invalid IRQ %d\n", printk(KERN_WARNING PREFIX
"Invalid _PRS IRQ %d\n",
p->interrupts[i]); p->interrupts[i]);
continue; continue;
} }
...@@ -143,14 +146,15 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) ...@@ -143,14 +146,15 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
&resource->data.extended_irq; &resource->data.extended_irq;
if (!p || !p->interrupt_count) { if (!p || !p->interrupt_count) {
printk(KERN_WARNING PREFIX printk(KERN_WARNING PREFIX
"Blank EXT IRQ resource\n"); "Blank _PRS EXT IRQ resource\n");
return AE_OK; return AE_OK;
} }
for (i = 0; for (i = 0;
(i < p->interrupt_count (i < p->interrupt_count
&& i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
if (!p->interrupts[i]) { if (!p->interrupts[i]) {
printk(KERN_WARNING PREFIX "Invalid IRQ %d\n", printk(KERN_WARNING PREFIX
"Invalid _PRS IRQ %d\n",
p->interrupts[i]); p->interrupts[i]);
continue; continue;
} }
...@@ -163,7 +167,8 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) ...@@ -163,7 +167,8 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
break; break;
} }
default: default:
printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n"); printk(KERN_ERR PREFIX "_PRS resource type 0x%x isn't an IRQ\n",
resource->type);
return AE_OK; return AE_OK;
} }
...@@ -199,6 +204,9 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) ...@@ -199,6 +204,9 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
switch (resource->type) { switch (resource->type) {
case ACPI_RESOURCE_TYPE_START_DEPENDENT:
case ACPI_RESOURCE_TYPE_END_TAG:
return AE_OK;
case ACPI_RESOURCE_TYPE_IRQ: case ACPI_RESOURCE_TYPE_IRQ:
{ {
struct acpi_resource_irq *p = &resource->data.irq; struct acpi_resource_irq *p = &resource->data.irq;
...@@ -208,7 +216,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) ...@@ -208,7 +216,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
* particularly those those w/ _STA disabled * particularly those those w/ _STA disabled
*/ */
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Blank IRQ resource\n")); "Blank _CRS IRQ resource\n"));
return AE_OK; return AE_OK;
} }
*irq = p->interrupts[0]; *irq = p->interrupts[0];
...@@ -224,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) ...@@ -224,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
* return at least 1 IRQ * return at least 1 IRQ
*/ */
printk(KERN_WARNING PREFIX printk(KERN_WARNING PREFIX
"Blank EXT IRQ resource\n"); "Blank _CRS EXT IRQ resource\n");
return AE_OK; return AE_OK;
} }
*irq = p->interrupts[0]; *irq = p->interrupts[0];
...@@ -232,10 +240,11 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context) ...@@ -232,10 +240,11 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
} }
break; break;
default: default:
printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type); printk(KERN_ERR PREFIX "_CRS resource type 0x%x isn't an IRQ\n",
case ACPI_RESOURCE_TYPE_END_TAG: resource->type);
return AE_OK; return AE_OK;
} }
return AE_CTRL_TERMINATE; return AE_CTRL_TERMINATE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册