diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-11-20 10:44:01 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-11-27 08:16:27 -0500 |
commit | aeb26f55337d4310840c8adc3ec7d6aebb714472 (patch) | |
tree | 9ce73b81101613adf42fcee68860dc4e767e0fee /arch/x86/include/asm | |
parent | 601367d76bd19b7eea2286ae99e5b1cb5d74f38d (diff) |
x86/amd-iommu: Implement protection domain list
This patch adds code to keep a global list of all protection
domains. This allows to simplify the resume code.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/amd_iommu_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h index e68b14811380..b332b7f7d8d6 100644 --- a/arch/x86/include/asm/amd_iommu_types.h +++ b/arch/x86/include/asm/amd_iommu_types.h | |||
@@ -231,6 +231,7 @@ extern bool amd_iommu_dump; | |||
231 | * independent of their use. | 231 | * independent of their use. |
232 | */ | 232 | */ |
233 | struct protection_domain { | 233 | struct protection_domain { |
234 | struct list_head list; /* for list of all protection domains */ | ||
234 | spinlock_t lock; /* mostly used to lock the page table*/ | 235 | spinlock_t lock; /* mostly used to lock the page table*/ |
235 | u16 id; /* the domain id written to the device table */ | 236 | u16 id; /* the domain id written to the device table */ |
236 | int mode; /* paging mode (0-6 levels) */ | 237 | int mode; /* paging mode (0-6 levels) */ |
@@ -376,6 +377,12 @@ extern struct amd_iommu *amd_iommus[MAX_IOMMUS]; | |||
376 | extern int amd_iommus_present; | 377 | extern int amd_iommus_present; |
377 | 378 | ||
378 | /* | 379 | /* |
380 | * Declarations for the global list of all protection domains | ||
381 | */ | ||
382 | extern spinlock_t amd_iommu_pd_lock; | ||
383 | extern struct list_head amd_iommu_pd_list; | ||
384 | |||
385 | /* | ||
379 | * Structure defining one entry in the device table | 386 | * Structure defining one entry in the device table |
380 | */ | 387 | */ |
381 | struct dev_table_entry { | 388 | struct dev_table_entry { |