diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-15 20:34:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-15 20:34:20 -0400 |
commit | e2e96c663639a3361bb1a84e666887d308c6c87e (patch) | |
tree | 7c28b1e5baaff4741d974193ba30f1c53992596f | |
parent | 7355a5a654ccbbfd2fd11bb1e2389910f786ea92 (diff) | |
parent | 1a8bd481bfba30515b54368d90a915db3faf302f (diff) |
Merge git://git.infradead.org/iommu-2.6
* git://git.infradead.org/iommu-2.6:
intel-iommu: Fix 32-bit build warning with __cmpxchg()
intr-remap: allow disabling source id checking
-rw-r--r-- | Documentation/kernel-parameters.txt | 7 | ||||
-rw-r--r-- | drivers/pci/intel-iommu.c | 2 | ||||
-rw-r--r-- | drivers/pci/intr_remapping.c | 20 |
3 files changed, 28 insertions, 1 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 4956686f99bf..2c85c0692b01 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -981,6 +981,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
981 | result in a hardware IOTLB flush operation as opposed | 981 | result in a hardware IOTLB flush operation as opposed |
982 | to batching them for performance. | 982 | to batching them for performance. |
983 | 983 | ||
984 | intremap= [X86-64, Intel-IOMMU] | ||
985 | Format: { on (default) | off | nosid } | ||
986 | on enable Interrupt Remapping (default) | ||
987 | off disable Interrupt Remapping | ||
988 | nosid disable Source ID checking | ||
989 | |||
984 | inttest= [IA64] | 990 | inttest= [IA64] |
985 | 991 | ||
986 | iomem= Disable strict checking of access to MMIO memory | 992 | iomem= Disable strict checking of access to MMIO memory |
@@ -1681,6 +1687,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1681 | 1687 | ||
1682 | nointremap [X86-64, Intel-IOMMU] Do not enable interrupt | 1688 | nointremap [X86-64, Intel-IOMMU] Do not enable interrupt |
1683 | remapping. | 1689 | remapping. |
1690 | [Deprecated - use intremap=off] | ||
1684 | 1691 | ||
1685 | nointroute [IA-64] | 1692 | nointroute [IA-64] |
1686 | 1693 | ||
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index b0de57947189..c3ceebb5be84 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -236,7 +236,7 @@ static inline u64 dma_pte_addr(struct dma_pte *pte) | |||
236 | return pte->val & VTD_PAGE_MASK; | 236 | return pte->val & VTD_PAGE_MASK; |
237 | #else | 237 | #else |
238 | /* Must have a full atomic 64-bit read */ | 238 | /* Must have a full atomic 64-bit read */ |
239 | return __cmpxchg64(pte, 0ULL, 0ULL) & VTD_PAGE_MASK; | 239 | return __cmpxchg64(&pte->val, 0ULL, 0ULL) & VTD_PAGE_MASK; |
240 | #endif | 240 | #endif |
241 | } | 241 | } |
242 | 242 | ||
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c index 1694a0e2845b..fd1d2867cdcc 100644 --- a/drivers/pci/intr_remapping.c +++ b/drivers/pci/intr_remapping.c | |||
@@ -21,6 +21,8 @@ static int ir_ioapic_num, ir_hpet_num; | |||
21 | int intr_remapping_enabled; | 21 | int intr_remapping_enabled; |
22 | 22 | ||
23 | static int disable_intremap; | 23 | static int disable_intremap; |
24 | static int disable_sourceid_checking; | ||
25 | |||
24 | static __init int setup_nointremap(char *str) | 26 | static __init int setup_nointremap(char *str) |
25 | { | 27 | { |
26 | disable_intremap = 1; | 28 | disable_intremap = 1; |
@@ -28,6 +30,22 @@ static __init int setup_nointremap(char *str) | |||
28 | } | 30 | } |
29 | early_param("nointremap", setup_nointremap); | 31 | early_param("nointremap", setup_nointremap); |
30 | 32 | ||
33 | static __init int setup_intremap(char *str) | ||
34 | { | ||
35 | if (!str) | ||
36 | return -EINVAL; | ||
37 | |||
38 | if (!strncmp(str, "on", 2)) | ||
39 | disable_intremap = 0; | ||
40 | else if (!strncmp(str, "off", 3)) | ||
41 | disable_intremap = 1; | ||
42 | else if (!strncmp(str, "nosid", 5)) | ||
43 | disable_sourceid_checking = 1; | ||
44 | |||
45 | return 0; | ||
46 | } | ||
47 | early_param("intremap", setup_intremap); | ||
48 | |||
31 | struct irq_2_iommu { | 49 | struct irq_2_iommu { |
32 | struct intel_iommu *iommu; | 50 | struct intel_iommu *iommu; |
33 | u16 irte_index; | 51 | u16 irte_index; |
@@ -453,6 +471,8 @@ int free_irte(int irq) | |||
453 | static void set_irte_sid(struct irte *irte, unsigned int svt, | 471 | static void set_irte_sid(struct irte *irte, unsigned int svt, |
454 | unsigned int sq, unsigned int sid) | 472 | unsigned int sq, unsigned int sid) |
455 | { | 473 | { |
474 | if (disable_sourceid_checking) | ||
475 | svt = SVT_NO_VERIFY; | ||
456 | irte->svt = svt; | 476 | irte->svt = svt; |
457 | irte->sq = sq; | 477 | irte->sq = sq; |
458 | irte->sid = sid; | 478 | irte->sid = sid; |