[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081120191053.GA3955@elte.hu>
Date: Thu, 20 Nov 2008 20:10:53 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Mark McLoughlin <markmc@...hat.com>
Cc: David Woodhouse <dwmw2@...radead.org>,
linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
x86@...nel.org
Subject: Re: [PATCH 4/8] intel-iommu: move DMA PTE defs out of
dma_remapping.h
* Mark McLoughlin <markmc@...hat.com> wrote:
> +struct dma_pte {
> + u64 val;
> +};
> +#define dma_clear_pte(p) do {(p).val = 0;} while (0)
> +
> +#define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while (0)
> +#define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while (0)
> +#define dma_set_pte_prot(p, prot) \
> + do {(p).val = ((p).val & ~3) | ((prot) & 3); } while (0)
> +#define dma_pte_addr(p) ((p).val & VTD_PAGE_MASK)
> +#define dma_set_pte_addr(p, addr) do {\
> + (p).val |= ((addr) & VTD_PAGE_MASK); } while (0)
> +#define dma_pte_present(p) (((p).val & 3) != 0)
If you touch this, please also clean this up to use proper inlines,
not CPP macros.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists