diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-16 02:34:20 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-16 02:34:20 +0200 |
commit | e2e96c663639a3361bb1a84e666887d308c6c87e (patch) | |
tree | 7c28b1e5baaff4741d974193ba30f1c53992596f | |
parent | Merge git://git.infradead.org/mtd-2.6 (diff) | |
parent | intel-iommu: Fix 32-bit build warning with __cmpxchg() (diff) | |
download | linux-e2e96c663639a3361bb1a84e666887d308c6c87e.tar.xz linux-e2e96c663639a3361bb1a84e666887d308c6c87e.zip |
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 result in a hardware IOTLB flush operation as opposed to batching them for performance. + intremap= [X86-64, Intel-IOMMU] + Format: { on (default) | off | nosid } + on enable Interrupt Remapping (default) + off disable Interrupt Remapping + nosid disable Source ID checking + inttest= [IA64] 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 nointremap [X86-64, Intel-IOMMU] Do not enable interrupt remapping. + [Deprecated - use intremap=off] nointroute [IA-64] 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) return pte->val & VTD_PAGE_MASK; #else /* Must have a full atomic 64-bit read */ - return __cmpxchg64(pte, 0ULL, 0ULL) & VTD_PAGE_MASK; + return __cmpxchg64(&pte->val, 0ULL, 0ULL) & VTD_PAGE_MASK; #endif } 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; int intr_remapping_enabled; static int disable_intremap; +static int disable_sourceid_checking; + static __init int setup_nointremap(char *str) { disable_intremap = 1; @@ -28,6 +30,22 @@ static __init int setup_nointremap(char *str) } early_param("nointremap", setup_nointremap); +static __init int setup_intremap(char *str) +{ + if (!str) + return -EINVAL; + + if (!strncmp(str, "on", 2)) + disable_intremap = 0; + else if (!strncmp(str, "off", 3)) + disable_intremap = 1; + else if (!strncmp(str, "nosid", 5)) + disable_sourceid_checking = 1; + + return 0; +} +early_param("intremap", setup_intremap); + struct irq_2_iommu { struct intel_iommu *iommu; u16 irte_index; @@ -453,6 +471,8 @@ int free_irte(int irq) static void set_irte_sid(struct irte *irte, unsigned int svt, unsigned int sq, unsigned int sid) { + if (disable_sourceid_checking) + svt = SVT_NO_VERIFY; irte->svt = svt; irte->sq = sq; irte->sid = sid; |