.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * pci_link.c - ACPI PCI Interrupt Link Device Driver ($Revision: 34 $) |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> |
---|
6 | 7 | * Copyright (C) 2002 Dominik Brodowski <devel@brodo.de> |
---|
7 | 8 | * |
---|
8 | | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License as published by |
---|
12 | | - * the Free Software Foundation; either version 2 of the License, or (at |
---|
13 | | - * your option) any later version. |
---|
14 | | - * |
---|
15 | | - * This program is distributed in the hope that it will be useful, but |
---|
16 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
18 | | - * General Public License for more details. |
---|
19 | | - * |
---|
20 | | - * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
21 | | - * |
---|
22 | | - * TBD: |
---|
23 | | - * 1. Support more than one IRQ resource entry per link device (index). |
---|
| 9 | + * TBD: |
---|
| 10 | + * 1. Support more than one IRQ resource entry per link device (index). |
---|
24 | 11 | * 2. Implement start/stop mechanism and use ACPI Bus Driver facilities |
---|
25 | 12 | * for IRQ management (e.g. start()->_SRS). |
---|
26 | 13 | */ |
---|
.. | .. |
---|
44 | 31 | ACPI_MODULE_NAME("pci_link"); |
---|
45 | 32 | #define ACPI_PCI_LINK_CLASS "pci_irq_routing" |
---|
46 | 33 | #define ACPI_PCI_LINK_DEVICE_NAME "PCI Interrupt Link" |
---|
47 | | -#define ACPI_PCI_LINK_FILE_INFO "info" |
---|
48 | | -#define ACPI_PCI_LINK_FILE_STATUS "state" |
---|
49 | 34 | #define ACPI_PCI_LINK_MAX_POSSIBLE 16 |
---|
50 | 35 | |
---|
51 | 36 | static int acpi_pci_link_add(struct acpi_device *device, |
---|
.. | .. |
---|
264 | 249 | } |
---|
265 | 250 | } |
---|
266 | 251 | |
---|
267 | | - /* |
---|
268 | | - * Query and parse _CRS to get the current IRQ assignment. |
---|
| 252 | + /* |
---|
| 253 | + * Query and parse _CRS to get the current IRQ assignment. |
---|
269 | 254 | */ |
---|
270 | 255 | |
---|
271 | 256 | status = acpi_walk_resources(link->device->handle, METHOD_NAME__CRS, |
---|
.. | .. |
---|
317 | 302 | resource->res.data.irq.polarity = |
---|
318 | 303 | link->irq.polarity; |
---|
319 | 304 | if (link->irq.triggering == ACPI_EDGE_SENSITIVE) |
---|
320 | | - resource->res.data.irq.sharable = |
---|
| 305 | + resource->res.data.irq.shareable = |
---|
321 | 306 | ACPI_EXCLUSIVE; |
---|
322 | 307 | else |
---|
323 | | - resource->res.data.irq.sharable = ACPI_SHARED; |
---|
| 308 | + resource->res.data.irq.shareable = ACPI_SHARED; |
---|
324 | 309 | resource->res.data.irq.interrupt_count = 1; |
---|
325 | 310 | resource->res.data.irq.interrupts[0] = irq; |
---|
326 | 311 | break; |
---|
.. | .. |
---|
335 | 320 | resource->res.data.extended_irq.polarity = |
---|
336 | 321 | link->irq.polarity; |
---|
337 | 322 | if (link->irq.triggering == ACPI_EDGE_SENSITIVE) |
---|
338 | | - resource->res.data.irq.sharable = |
---|
| 323 | + resource->res.data.extended_irq.shareable = |
---|
339 | 324 | ACPI_EXCLUSIVE; |
---|
340 | 325 | else |
---|
341 | | - resource->res.data.irq.sharable = ACPI_SHARED; |
---|
| 326 | + resource->res.data.extended_irq.shareable = ACPI_SHARED; |
---|
342 | 327 | resource->res.data.extended_irq.interrupt_count = 1; |
---|
343 | 328 | resource->res.data.extended_irq.interrupts[0] = irq; |
---|
344 | 329 | /* ignore resource_source, it's optional */ |
---|
.. | .. |
---|
411 | 396 | /* |
---|
412 | 397 | * "acpi_irq_balance" (default in APIC mode) enables ACPI to use PIC Interrupt |
---|
413 | 398 | * Link Devices to move the PIRQs around to minimize sharing. |
---|
414 | | - * |
---|
| 399 | + * |
---|
415 | 400 | * "acpi_irq_nobalance" (default in PIC mode) tells ACPI not to move any PIC IRQs |
---|
416 | 401 | * that the BIOS has already set to active. This is necessary because |
---|
417 | 402 | * ACPI has no automatic means of knowing what ISA IRQs are used. Note that |
---|
.. | .. |
---|
429 | 414 | * |
---|
430 | 415 | * Note that PCI IRQ routers have a list of possible IRQs, |
---|
431 | 416 | * which may not include the IRQs this table says are available. |
---|
432 | | - * |
---|
| 417 | + * |
---|
433 | 418 | * Since this heuristic can't tell the difference between a link |
---|
434 | 419 | * that no device will attach to, vs. a link which may be shared |
---|
435 | 420 | * by multiple active devices -- it is not optimal. |
---|
.. | .. |
---|
674 | 659 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
---|
675 | 660 | "Link %s is referenced\n", |
---|
676 | 661 | acpi_device_bid(link->device))); |
---|
677 | | - return (link->irq.active); |
---|
| 662 | + return link->irq.active; |
---|
678 | 663 | } |
---|
679 | 664 | |
---|
680 | 665 | /* |
---|
.. | .. |
---|
725 | 710 | acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL); |
---|
726 | 711 | |
---|
727 | 712 | mutex_unlock(&acpi_link_lock); |
---|
728 | | - return (link->irq.active); |
---|
| 713 | + return link->irq.active; |
---|
729 | 714 | } |
---|
730 | 715 | |
---|
731 | 716 | /* -------------------------------------------------------------------------- |
---|