Re: [Intel IOMMU 05/10] Intel IOMMU driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 19 Jun 2007 14:37:06 -0700 "Keshavamurthy, Anil S" <[email protected]> wrote:

> 	Actual intel IOMMU driver. Hardware spec can be found at:
> http://www.intel.com/technology/virtualization
> 
> This driver sets X86_64 'dma_ops', so hook into standard DMA APIs. In this way,
> PCI driver will get virtual DMA address. This change is transparent to PCI
> drivers.
> 
> Changes from previous postings:
> 1) Fixed all the coding style errors - checkpatches.pl passes this patch
> 2) Addressed all Andrew's comments
> 3) Removed resource pool ( a.k.a pre-allocate pool)
> 4) Now uses the standard kmem_cache_alloc functions to allocate memory
>    during dma map api calls.
> 
> 
> ...
> +#define context_set_translation_type(c, val) \
> +	do { \
> +		(c).lo &= (((u64)-1) << 4) | 3; \
> +		(c).lo |= ((val) & 3) << 2; \
> +	} while (0)

That evaluates `c' twice.  It's a little handgrenade waiting to go off.

> +#define context_clear_entry(c) do {(c).lo = 0; (c).hi = 0;} while (0)

Ditto


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux