Skip to content

Commit

Permalink
Merge git://git.infradead.org/iommu-2.6
Browse files Browse the repository at this point in the history
* git://git.infradead.org/iommu-2.6:
  intel-iommu: Fix 32-bit build warning with __cmpxchg()
  intr-remap: allow disabling source id checking
  • Loading branch information
torvalds committed Aug 16, 2010
2 parents 7355a5a + 1a8bd48 commit e2e96c6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
20 changes: 20 additions & 0 deletions drivers/pci/intr_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,31 @@ 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;
return 0;
}
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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e2e96c6

Please sign in to comment.