Commit 6e332df
PCI/ASPM: Stop caching device L0s, L1 acceptable exit latencies
Previously we calculated the device's acceptable L0s and L1 exit latencies
in pcie_aspm_cap_init() and cached them in struct pcie_link_state.
These values are only used in pcie_aspm_check_latency() where they are
compared with the actual exit latencies of the link. This path is used
when removing or changing the D state of the device, so it's relatively low
frequency.
To reduce the amount of per-link data we store, remove the acceptable[]
arrays from struct pcie_link_state and calculate them directly from the
already-cached Device Capabilities register when needed.
[bhelgaas: use endpoint->devcap instead of reading it again]
Link: https://lore.kernel.org/r/20211119193732.12343-4-refactormyself@gmail.com
Signed-off-by: Saheed O. Bolarinwa <refactormyself@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>1 parent 222578d commit 6e332df
1 file changed
Lines changed: 10 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | 68 | | |
75 | 69 | | |
76 | 70 | | |
| |||
389 | 383 | | |
390 | 384 | | |
391 | 385 | | |
392 | | - | |
| 386 | + | |
| 387 | + | |
393 | 388 | | |
394 | 389 | | |
395 | 390 | | |
| |||
400 | 395 | | |
401 | 396 | | |
402 | 397 | | |
403 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
| |||
666 | 668 | | |
667 | 669 | | |
668 | 670 | | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | 671 | | |
673 | 672 | | |
674 | 673 | | |
675 | 674 | | |
676 | 675 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | 676 | | |
686 | 677 | | |
687 | 678 | | |
| |||
0 commit comments