diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/cpu.h | 5 | ||||
| -rw-r--r-- | include/linux/dma_remapping.h | 9 | ||||
| -rw-r--r-- | include/linux/dmar.h | 9 | ||||
| -rw-r--r-- | include/linux/firewire.h | 87 | ||||
| -rw-r--r-- | include/linux/intel-iommu.h | 35 | ||||
| -rw-r--r-- | include/linux/mnt_namespace.h | 10 | ||||
| -rw-r--r-- | include/linux/pci.h | 2 | ||||
| -rw-r--r-- | include/linux/pci_regs.h | 10 |
8 files changed, 144 insertions, 23 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 2643d848df90..4d668e05d458 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -69,7 +69,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
| 69 | 69 | ||
| 70 | int cpu_up(unsigned int cpu); | 70 | int cpu_up(unsigned int cpu); |
| 71 | void notify_cpu_starting(unsigned int cpu); | 71 | void notify_cpu_starting(unsigned int cpu); |
| 72 | extern void cpu_hotplug_init(void); | ||
| 73 | extern void cpu_maps_update_begin(void); | 72 | extern void cpu_maps_update_begin(void); |
| 74 | extern void cpu_maps_update_done(void); | 73 | extern void cpu_maps_update_done(void); |
| 75 | 74 | ||
| @@ -84,10 +83,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
| 84 | { | 83 | { |
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | static inline void cpu_hotplug_init(void) | ||
| 88 | { | ||
| 89 | } | ||
| 90 | |||
| 91 | static inline void cpu_maps_update_begin(void) | 86 | static inline void cpu_maps_update_begin(void) |
| 92 | { | 87 | { |
| 93 | } | 88 | } |
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h index 1a455f1f86d7..5619f8522738 100644 --- a/include/linux/dma_remapping.h +++ b/include/linux/dma_remapping.h | |||
| @@ -13,6 +13,10 @@ | |||
| 13 | #define DMA_PTE_WRITE (2) | 13 | #define DMA_PTE_WRITE (2) |
| 14 | #define DMA_PTE_SNP (1 << 11) | 14 | #define DMA_PTE_SNP (1 << 11) |
| 15 | 15 | ||
| 16 | #define CONTEXT_TT_MULTI_LEVEL 0 | ||
| 17 | #define CONTEXT_TT_DEV_IOTLB 1 | ||
| 18 | #define CONTEXT_TT_PASS_THROUGH 2 | ||
| 19 | |||
| 16 | struct intel_iommu; | 20 | struct intel_iommu; |
| 17 | struct dmar_domain; | 21 | struct dmar_domain; |
| 18 | struct root_entry; | 22 | struct root_entry; |
| @@ -21,11 +25,16 @@ extern void free_dmar_iommu(struct intel_iommu *iommu); | |||
| 21 | 25 | ||
| 22 | #ifdef CONFIG_DMAR | 26 | #ifdef CONFIG_DMAR |
| 23 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); | 27 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); |
| 28 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); | ||
| 24 | #else | 29 | #else |
| 25 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) | 30 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) |
| 26 | { | 31 | { |
| 27 | return 0; | 32 | return 0; |
| 28 | } | 33 | } |
| 34 | static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu) | ||
| 35 | { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 29 | #endif | 38 | #endif |
| 30 | 39 | ||
| 31 | extern int dmar_disabled; | 40 | extern int dmar_disabled; |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 10ff5c498824..1731fb5fd775 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -188,6 +188,15 @@ struct dmar_rmrr_unit { | |||
| 188 | 188 | ||
| 189 | #define for_each_rmrr_units(rmrr) \ | 189 | #define for_each_rmrr_units(rmrr) \ |
| 190 | list_for_each_entry(rmrr, &dmar_rmrr_units, list) | 190 | list_for_each_entry(rmrr, &dmar_rmrr_units, list) |
| 191 | |||
| 192 | struct dmar_atsr_unit { | ||
| 193 | struct list_head list; /* list of ATSR units */ | ||
| 194 | struct acpi_dmar_header *hdr; /* ACPI header */ | ||
| 195 | struct pci_dev **devices; /* target devices */ | ||
| 196 | int devices_cnt; /* target device count */ | ||
| 197 | u8 include_all:1; /* include all ports */ | ||
| 198 | }; | ||
| 199 | |||
| 191 | /* Intel DMAR initialization functions */ | 200 | /* Intel DMAR initialization functions */ |
| 192 | extern int intel_iommu_init(void); | 201 | extern int intel_iommu_init(void); |
| 193 | #else | 202 | #else |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index e584b7215e8b..9823946adbc5 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/completion.h> | 4 | #include <linux/completion.h> |
| 5 | #include <linux/device.h> | 5 | #include <linux/device.h> |
| 6 | #include <linux/dma-mapping.h> | ||
| 6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
| 7 | #include <linux/kref.h> | 8 | #include <linux/kref.h> |
| 8 | #include <linux/list.h> | 9 | #include <linux/list.h> |
| @@ -355,4 +356,90 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, | |||
| 355 | int generation, int speed, unsigned long long offset, | 356 | int generation, int speed, unsigned long long offset, |
| 356 | void *payload, size_t length); | 357 | void *payload, size_t length); |
| 357 | 358 | ||
| 359 | static inline int fw_stream_packet_destination_id(int tag, int channel, int sy) | ||
| 360 | { | ||
| 361 | return tag << 14 | channel << 8 | sy; | ||
| 362 | } | ||
| 363 | |||
| 364 | struct fw_descriptor { | ||
| 365 | struct list_head link; | ||
| 366 | size_t length; | ||
| 367 | u32 immediate; | ||
| 368 | u32 key; | ||
| 369 | const u32 *data; | ||
| 370 | }; | ||
| 371 | |||
| 372 | int fw_core_add_descriptor(struct fw_descriptor *desc); | ||
| 373 | void fw_core_remove_descriptor(struct fw_descriptor *desc); | ||
| 374 | |||
| 375 | /* | ||
| 376 | * The iso packet format allows for an immediate header/payload part | ||
| 377 | * stored in 'header' immediately after the packet info plus an | ||
| 378 | * indirect payload part that is pointer to by the 'payload' field. | ||
| 379 | * Applications can use one or the other or both to implement simple | ||
| 380 | * low-bandwidth streaming (e.g. audio) or more advanced | ||
| 381 | * scatter-gather streaming (e.g. assembling video frame automatically). | ||
| 382 | */ | ||
| 383 | struct fw_iso_packet { | ||
| 384 | u16 payload_length; /* Length of indirect payload. */ | ||
| 385 | u32 interrupt:1; /* Generate interrupt on this packet */ | ||
| 386 | u32 skip:1; /* Set to not send packet at all. */ | ||
| 387 | u32 tag:2; | ||
| 388 | u32 sy:4; | ||
| 389 | u32 header_length:8; /* Length of immediate header. */ | ||
| 390 | u32 header[0]; | ||
| 391 | }; | ||
| 392 | |||
| 393 | #define FW_ISO_CONTEXT_TRANSMIT 0 | ||
| 394 | #define FW_ISO_CONTEXT_RECEIVE 1 | ||
| 395 | |||
| 396 | #define FW_ISO_CONTEXT_MATCH_TAG0 1 | ||
| 397 | #define FW_ISO_CONTEXT_MATCH_TAG1 2 | ||
| 398 | #define FW_ISO_CONTEXT_MATCH_TAG2 4 | ||
| 399 | #define FW_ISO_CONTEXT_MATCH_TAG3 8 | ||
| 400 | #define FW_ISO_CONTEXT_MATCH_ALL_TAGS 15 | ||
| 401 | |||
| 402 | /* | ||
| 403 | * An iso buffer is just a set of pages mapped for DMA in the | ||
| 404 | * specified direction. Since the pages are to be used for DMA, they | ||
| 405 | * are not mapped into the kernel virtual address space. We store the | ||
| 406 | * DMA address in the page private. The helper function | ||
| 407 | * fw_iso_buffer_map() will map the pages into a given vma. | ||
| 408 | */ | ||
| 409 | struct fw_iso_buffer { | ||
| 410 | enum dma_data_direction direction; | ||
| 411 | struct page **pages; | ||
| 412 | int page_count; | ||
| 413 | }; | ||
| 414 | |||
| 415 | int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, | ||
| 416 | int page_count, enum dma_data_direction direction); | ||
| 417 | void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card); | ||
| 418 | |||
| 419 | struct fw_iso_context; | ||
| 420 | typedef void (*fw_iso_callback_t)(struct fw_iso_context *context, | ||
| 421 | u32 cycle, size_t header_length, | ||
| 422 | void *header, void *data); | ||
| 423 | struct fw_iso_context { | ||
| 424 | struct fw_card *card; | ||
| 425 | int type; | ||
| 426 | int channel; | ||
| 427 | int speed; | ||
| 428 | size_t header_size; | ||
| 429 | fw_iso_callback_t callback; | ||
| 430 | void *callback_data; | ||
| 431 | }; | ||
| 432 | |||
| 433 | struct fw_iso_context *fw_iso_context_create(struct fw_card *card, | ||
| 434 | int type, int channel, int speed, size_t header_size, | ||
| 435 | fw_iso_callback_t callback, void *callback_data); | ||
| 436 | int fw_iso_context_queue(struct fw_iso_context *ctx, | ||
| 437 | struct fw_iso_packet *packet, | ||
| 438 | struct fw_iso_buffer *buffer, | ||
| 439 | unsigned long payload); | ||
| 440 | int fw_iso_context_start(struct fw_iso_context *ctx, | ||
| 441 | int cycle, int sync, int tags); | ||
| 442 | int fw_iso_context_stop(struct fw_iso_context *ctx); | ||
| 443 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | ||
| 444 | |||
| 358 | #endif /* _LINUX_FIREWIRE_H */ | 445 | #endif /* _LINUX_FIREWIRE_H */ |
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index aa8c53171233..482dc91fd53a 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #define DMAR_PHMLIMIT_REG 0x78 /* pmrr high limit */ | 53 | #define DMAR_PHMLIMIT_REG 0x78 /* pmrr high limit */ |
| 54 | #define DMAR_IQH_REG 0x80 /* Invalidation queue head register */ | 54 | #define DMAR_IQH_REG 0x80 /* Invalidation queue head register */ |
| 55 | #define DMAR_IQT_REG 0x88 /* Invalidation queue tail register */ | 55 | #define DMAR_IQT_REG 0x88 /* Invalidation queue tail register */ |
| 56 | #define DMAR_IQ_SHIFT 4 /* Invalidation queue head/tail shift */ | ||
| 56 | #define DMAR_IQA_REG 0x90 /* Invalidation queue addr register */ | 57 | #define DMAR_IQA_REG 0x90 /* Invalidation queue addr register */ |
| 57 | #define DMAR_ICS_REG 0x98 /* Invalidation complete status register */ | 58 | #define DMAR_ICS_REG 0x98 /* Invalidation complete status register */ |
| 58 | #define DMAR_IRTA_REG 0xb8 /* Interrupt remapping table addr register */ | 59 | #define DMAR_IRTA_REG 0xb8 /* Interrupt remapping table addr register */ |
| @@ -120,8 +121,10 @@ static inline void dmar_writeq(void __iomem *addr, u64 val) | |||
| 120 | (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16) | 121 | (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16) |
| 121 | #define ecap_coherent(e) ((e) & 0x1) | 122 | #define ecap_coherent(e) ((e) & 0x1) |
| 122 | #define ecap_qis(e) ((e) & 0x2) | 123 | #define ecap_qis(e) ((e) & 0x2) |
| 124 | #define ecap_pass_through(e) ((e >> 6) & 0x1) | ||
| 123 | #define ecap_eim_support(e) ((e >> 4) & 0x1) | 125 | #define ecap_eim_support(e) ((e >> 4) & 0x1) |
| 124 | #define ecap_ir_support(e) ((e >> 3) & 0x1) | 126 | #define ecap_ir_support(e) ((e >> 3) & 0x1) |
| 127 | #define ecap_dev_iotlb_support(e) (((e) >> 2) & 0x1) | ||
| 125 | #define ecap_max_handle_mask(e) ((e >> 20) & 0xf) | 128 | #define ecap_max_handle_mask(e) ((e >> 20) & 0xf) |
| 126 | #define ecap_sc_support(e) ((e >> 7) & 0x1) /* Snooping Control */ | 129 | #define ecap_sc_support(e) ((e >> 7) & 0x1) /* Snooping Control */ |
| 127 | 130 | ||
| @@ -197,6 +200,8 @@ static inline void dmar_writeq(void __iomem *addr, u64 val) | |||
| 197 | #define DMA_FSTS_PPF ((u32)2) | 200 | #define DMA_FSTS_PPF ((u32)2) |
| 198 | #define DMA_FSTS_PFO ((u32)1) | 201 | #define DMA_FSTS_PFO ((u32)1) |
| 199 | #define DMA_FSTS_IQE (1 << 4) | 202 | #define DMA_FSTS_IQE (1 << 4) |
| 203 | #define DMA_FSTS_ICE (1 << 5) | ||
| 204 | #define DMA_FSTS_ITE (1 << 6) | ||
| 200 | #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) | 205 | #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) |
| 201 | 206 | ||
| 202 | /* FRCD_REG, 32 bits access */ | 207 | /* FRCD_REG, 32 bits access */ |
| @@ -225,7 +230,8 @@ do { \ | |||
| 225 | enum { | 230 | enum { |
| 226 | QI_FREE, | 231 | QI_FREE, |
| 227 | QI_IN_USE, | 232 | QI_IN_USE, |
| 228 | QI_DONE | 233 | QI_DONE, |
| 234 | QI_ABORT | ||
| 229 | }; | 235 | }; |
| 230 | 236 | ||
| 231 | #define QI_CC_TYPE 0x1 | 237 | #define QI_CC_TYPE 0x1 |
| @@ -254,6 +260,12 @@ enum { | |||
| 254 | #define QI_CC_DID(did) (((u64)did) << 16) | 260 | #define QI_CC_DID(did) (((u64)did) << 16) |
| 255 | #define QI_CC_GRAN(gran) (((u64)gran) >> (DMA_CCMD_INVL_GRANU_OFFSET-4)) | 261 | #define QI_CC_GRAN(gran) (((u64)gran) >> (DMA_CCMD_INVL_GRANU_OFFSET-4)) |
| 256 | 262 | ||
| 263 | #define QI_DEV_IOTLB_SID(sid) ((u64)((sid) & 0xffff) << 32) | ||
| 264 | #define QI_DEV_IOTLB_QDEP(qdep) (((qdep) & 0x1f) << 16) | ||
| 265 | #define QI_DEV_IOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK) | ||
| 266 | #define QI_DEV_IOTLB_SIZE 1 | ||
| 267 | #define QI_DEV_IOTLB_MAX_INVS 32 | ||
| 268 | |||
| 257 | struct qi_desc { | 269 | struct qi_desc { |
| 258 | u64 low, high; | 270 | u64 low, high; |
| 259 | }; | 271 | }; |
| @@ -280,10 +292,10 @@ struct ir_table { | |||
| 280 | #endif | 292 | #endif |
| 281 | 293 | ||
| 282 | struct iommu_flush { | 294 | struct iommu_flush { |
| 283 | int (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, u8 fm, | 295 | void (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, |
| 284 | u64 type, int non_present_entry_flush); | 296 | u8 fm, u64 type); |
| 285 | int (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr, | 297 | void (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr, |
| 286 | unsigned int size_order, u64 type, int non_present_entry_flush); | 298 | unsigned int size_order, u64 type); |
| 287 | }; | 299 | }; |
| 288 | 300 | ||
| 289 | enum { | 301 | enum { |
| @@ -302,6 +314,7 @@ struct intel_iommu { | |||
| 302 | spinlock_t register_lock; /* protect register handling */ | 314 | spinlock_t register_lock; /* protect register handling */ |
| 303 | int seq_id; /* sequence id of the iommu */ | 315 | int seq_id; /* sequence id of the iommu */ |
| 304 | int agaw; /* agaw of this iommu */ | 316 | int agaw; /* agaw of this iommu */ |
| 317 | int msagaw; /* max sagaw of this iommu */ | ||
| 305 | unsigned int irq; | 318 | unsigned int irq; |
| 306 | unsigned char name[13]; /* Device Name */ | 319 | unsigned char name[13]; /* Device Name */ |
| 307 | 320 | ||
| @@ -329,6 +342,7 @@ static inline void __iommu_flush_cache( | |||
| 329 | } | 342 | } |
| 330 | 343 | ||
| 331 | extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); | 344 | extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); |
| 345 | extern int dmar_find_matched_atsr_unit(struct pci_dev *dev); | ||
| 332 | 346 | ||
| 333 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); | 347 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); |
| 334 | extern void free_iommu(struct intel_iommu *iommu); | 348 | extern void free_iommu(struct intel_iommu *iommu); |
| @@ -337,11 +351,12 @@ extern void dmar_disable_qi(struct intel_iommu *iommu); | |||
| 337 | extern int dmar_reenable_qi(struct intel_iommu *iommu); | 351 | extern int dmar_reenable_qi(struct intel_iommu *iommu); |
| 338 | extern void qi_global_iec(struct intel_iommu *iommu); | 352 | extern void qi_global_iec(struct intel_iommu *iommu); |
| 339 | 353 | ||
| 340 | extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, | 354 | extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, |
| 341 | u8 fm, u64 type, int non_present_entry_flush); | 355 | u8 fm, u64 type); |
| 342 | extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, | 356 | extern void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, |
| 343 | unsigned int size_order, u64 type, | 357 | unsigned int size_order, u64 type); |
| 344 | int non_present_entry_flush); | 358 | extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep, |
| 359 | u64 addr, unsigned mask); | ||
| 345 | 360 | ||
| 346 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); | 361 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); |
| 347 | 362 | ||
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 3a059298cc19..3beb2592b03f 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
| @@ -24,16 +24,10 @@ struct proc_mounts { | |||
| 24 | 24 | ||
| 25 | struct fs_struct; | 25 | struct fs_struct; |
| 26 | 26 | ||
| 27 | extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt); | ||
| 27 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 28 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
| 28 | struct fs_struct *); | 29 | struct fs_struct *); |
| 29 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 30 | extern void put_mnt_ns(struct mnt_namespace *ns); |
| 30 | |||
| 31 | static inline void put_mnt_ns(struct mnt_namespace *ns) | ||
| 32 | { | ||
| 33 | if (atomic_dec_and_lock(&ns->count, &vfsmount_lock)) | ||
| 34 | /* releases vfsmount_lock */ | ||
| 35 | __put_mnt_ns(ns); | ||
| 36 | } | ||
| 37 | 31 | ||
| 38 | static inline void exit_mnt_ns(struct task_struct *p) | 32 | static inline void exit_mnt_ns(struct task_struct *p) |
| 39 | { | 33 | { |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 1365c745bdb7..d304ddf412d0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -196,6 +196,7 @@ struct pci_cap_saved_state { | |||
| 196 | struct pcie_link_state; | 196 | struct pcie_link_state; |
| 197 | struct pci_vpd; | 197 | struct pci_vpd; |
| 198 | struct pci_sriov; | 198 | struct pci_sriov; |
| 199 | struct pci_ats; | ||
| 199 | 200 | ||
| 200 | /* | 201 | /* |
| 201 | * The pci_dev structure is used to describe PCI devices. | 202 | * The pci_dev structure is used to describe PCI devices. |
| @@ -293,6 +294,7 @@ struct pci_dev { | |||
| 293 | struct pci_sriov *sriov; /* SR-IOV capability related */ | 294 | struct pci_sriov *sriov; /* SR-IOV capability related */ |
| 294 | struct pci_dev *physfn; /* the PF this VF is associated with */ | 295 | struct pci_dev *physfn; /* the PF this VF is associated with */ |
| 295 | }; | 296 | }; |
| 297 | struct pci_ats *ats; /* Address Translation Service */ | ||
| 296 | #endif | 298 | #endif |
| 297 | }; | 299 | }; |
| 298 | 300 | ||
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 83b02f5a25b2..fcaee42c7ac2 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -502,6 +502,7 @@ | |||
| 502 | #define PCI_EXT_CAP_ID_DSN 3 | 502 | #define PCI_EXT_CAP_ID_DSN 3 |
| 503 | #define PCI_EXT_CAP_ID_PWR 4 | 503 | #define PCI_EXT_CAP_ID_PWR 4 |
| 504 | #define PCI_EXT_CAP_ID_ARI 14 | 504 | #define PCI_EXT_CAP_ID_ARI 14 |
| 505 | #define PCI_EXT_CAP_ID_ATS 15 | ||
| 505 | #define PCI_EXT_CAP_ID_SRIOV 16 | 506 | #define PCI_EXT_CAP_ID_SRIOV 16 |
| 506 | 507 | ||
| 507 | /* Advanced Error Reporting */ | 508 | /* Advanced Error Reporting */ |
| @@ -620,6 +621,15 @@ | |||
| 620 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ | 621 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ |
| 621 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ | 622 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ |
| 622 | 623 | ||
| 624 | /* Address Translation Service */ | ||
| 625 | #define PCI_ATS_CAP 0x04 /* ATS Capability Register */ | ||
| 626 | #define PCI_ATS_CAP_QDEP(x) ((x) & 0x1f) /* Invalidate Queue Depth */ | ||
| 627 | #define PCI_ATS_MAX_QDEP 32 /* Max Invalidate Queue Depth */ | ||
| 628 | #define PCI_ATS_CTRL 0x06 /* ATS Control Register */ | ||
| 629 | #define PCI_ATS_CTRL_ENABLE 0x8000 /* ATS Enable */ | ||
| 630 | #define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ | ||
| 631 | #define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ | ||
| 632 | |||
| 623 | /* Single Root I/O Virtualization */ | 633 | /* Single Root I/O Virtualization */ |
| 624 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ | 634 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ |
| 625 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ | 635 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ |
