Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Fix PRI and PASID consistency

These are extended capabilities, rename and move to proper
group for consistency.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Alex Williamson and committed by
Jesse Barnes
cfa4d8cc da8d1c8b

+12 -12
+10 -10
drivers/pci/ats.c
··· 175 175 u32 max_requests; 176 176 int pos; 177 177 178 - pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 178 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); 179 179 if (!pos) 180 180 return -EINVAL; 181 181 ··· 206 206 u16 control; 207 207 int pos; 208 208 209 - pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 209 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); 210 210 if (!pos) 211 211 return; 212 212 ··· 227 227 u16 control; 228 228 int pos; 229 229 230 - pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 230 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); 231 231 if (!pos) 232 232 return false; 233 233 ··· 249 249 u16 control; 250 250 int pos; 251 251 252 - pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 252 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); 253 253 if (!pos) 254 254 return -EINVAL; 255 255 ··· 282 282 u16 control, status; 283 283 int pos; 284 284 285 - pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 285 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); 286 286 if (!pos) 287 287 return true; 288 288 ··· 311 311 u16 status, control; 312 312 int pos; 313 313 314 - pos = pci_find_ext_capability(pdev, PCI_PRI_CAP); 314 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI); 315 315 if (!pos) 316 316 return -EINVAL; 317 317 ··· 342 342 u16 control, supported; 343 343 int pos; 344 344 345 - pos = pci_find_ext_capability(pdev, PCI_PASID_CAP); 345 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); 346 346 if (!pos) 347 347 return -EINVAL; 348 348 ··· 376 376 u16 control = 0; 377 377 int pos; 378 378 379 - pos = pci_find_ext_capability(pdev, PCI_PASID_CAP); 379 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); 380 380 if (!pos) 381 381 return; 382 382 ··· 400 400 u16 supported; 401 401 int pos; 402 402 403 - pos = pci_find_ext_capability(pdev, PCI_PASID_CAP); 403 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); 404 404 if (!pos) 405 405 return -EINVAL; 406 406 ··· 426 426 u16 supported; 427 427 int pos; 428 428 429 - pos = pci_find_ext_capability(pdev, PCI_PASID_CAP); 429 + pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID); 430 430 if (!pos) 431 431 return -EINVAL; 432 432
+2 -2
include/linux/pci_regs.h
··· 537 537 #define PCI_EXT_CAP_ID_ARI 14 538 538 #define PCI_EXT_CAP_ID_ATS 15 539 539 #define PCI_EXT_CAP_ID_SRIOV 16 540 + #define PCI_EXT_CAP_ID_PRI 19 540 541 #define PCI_EXT_CAP_ID_LTR 24 542 + #define PCI_EXT_CAP_ID_PASID 27 541 543 542 544 /* Advanced Error Reporting */ 543 545 #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ ··· 666 664 #define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ 667 665 668 666 /* Page Request Interface */ 669 - #define PCI_PRI_CAP 0x13 /* PRI capability ID */ 670 667 #define PCI_PRI_CONTROL_OFF 0x04 /* Offset of control register */ 671 668 #define PCI_PRI_STATUS_OFF 0x06 /* Offset of status register */ 672 669 #define PCI_PRI_ENABLE 0x0001 /* Enable mask */ ··· 677 676 #define PCI_PRI_ALLOC_REQ_OFF 0x0c /* Cap offset for max reqs allowed */ 678 677 679 678 /* PASID capability */ 680 - #define PCI_PASID_CAP 0x1b /* PASID capability ID */ 681 679 #define PCI_PASID_CAP_OFF 0x04 /* PASID feature register */ 682 680 #define PCI_PASID_CONTROL_OFF 0x06 /* PASID control register */ 683 681 #define PCI_PASID_ENABLE 0x01 /* Enable/Supported bit */