All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Cc: Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 01/22] AMD IOMMU: add a domain flag for default domains
Date: Mon, 15 Dec 2008 15:17:44 +0100	[thread overview]
Message-ID: <1229350685-3816-2-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1229350685-3816-1-git-send-email-joerg.roedel@amd.com>

Impact: adds a new protection domain flag

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/include/asm/amd_iommu_types.h |    2 ++
 arch/x86/kernel/amd_iommu.c            |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h
index 1c769f4..6adc702 100644
--- a/arch/x86/include/asm/amd_iommu_types.h
+++ b/arch/x86/include/asm/amd_iommu_types.h
@@ -192,6 +192,8 @@
 
 /* Protection domain flags */
 #define PD_DMA_OPS_MASK		(1UL << 0) /* domain used for dma_ops */
+#define PD_DEFAULT_MASK		(1UL << 1) /* domain is a default dma_ops
+					      domain for an IOMMU */
 
 /*
  * This structure contains generic data for  IOMMU protection domains
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index cc78834..1694415 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1573,6 +1573,7 @@ int __init amd_iommu_init_dma_ops(void)
 		iommu->default_dom = dma_ops_domain_alloc(iommu, order);
 		if (iommu->default_dom == NULL)
 			return -ENOMEM;
+		iommu->default_dom->domain.flags |= PD_DEFAULT_MASK;
 		ret = iommu_init_unity_mappings(iommu);
 		if (ret)
 			goto free_domains;
-- 
1.5.6.4



  reply	other threads:[~2008-12-15 14:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 14:17 [PATCH 0/22] more AMD IOMMU updates for 2.6.29 Joerg Roedel
2008-12-15 14:17 ` Joerg Roedel [this message]
2008-12-15 14:17 ` [PATCH 02/22] AMD IOMMU: allocate a new protection for hotplugged devices Joerg Roedel
2008-12-15 14:17 ` [PATCH 03/22] AMD IOMMU: use dev_name instead of self-build print_devid Joerg Roedel
2008-12-15 15:16   ` David Vrabel
2008-12-15 15:26     ` Joerg Roedel
2008-12-15 14:17 ` [PATCH 04/22] AMD IOMMU: convert iommu->need_sync to bool Joerg Roedel
2008-12-15 14:17 ` [PATCH 05/22] AMD IOMMU: convert amd_iommu_isolate " Joerg Roedel
2008-12-15 14:17 ` [PATCH 06/22] AMD IOMMU: use calc_devid in prealloc_protection_domains Joerg Roedel
2008-12-15 14:17 ` [PATCH 07/22] AMD IOMMU: use dev_name in iommu_enable function Joerg Roedel
2008-12-15 14:17 ` [PATCH 08/22] AMD IOMMU: add Kconfig entry for statistic collection code Joerg Roedel
2008-12-15 14:17 ` [PATCH 09/22] AMD IOMMU: add necessary header defines for stats counting Joerg Roedel
2008-12-15 14:17 ` [PATCH 10/22] AMD IOMMU: add init code for statistic collection Joerg Roedel
2008-12-15 14:17 ` [PATCH 11/22] AMD IOMMU: add stats counter for completion wait events Joerg Roedel
2008-12-15 14:17 ` [PATCH 12/22] AMD IOMMU: add stats counter for map_single requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 13/22] AMD IOMMU: add stats counter for unmap_single requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 14/22] AMD IOMMU: add stats counter for map_sg requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 15/22] AMD IOMMU: add stats counter for unmap_sg requests Joerg Roedel
2008-12-15 14:17 ` [PATCH 16/22] AMD IOMMU: add stats counter for alloc_coherent requests Joerg Roedel
2008-12-15 14:18 ` [PATCH 17/22] AMD IOMMU: add stats counter for free_coherent requests Joerg Roedel
2008-12-15 14:18 ` [PATCH 18/22] AMD IOMMU: add stats counter for cross-page request Joerg Roedel
2008-12-15 14:18 ` [PATCH 19/22] AMD IOMMU: add stats counter for single iommu domain tlb flushes Joerg Roedel
2008-12-15 14:18 ` [PATCH 20/22] AMD IOMMU: add stats counter for " Joerg Roedel
2008-12-15 14:18 ` [PATCH 21/22] AMD IOMMU: add statistics about allocated io memory Joerg Roedel
2008-12-15 14:18 ` [PATCH 22/22] AMD IOMMU: add statistics about total number of map requests Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1229350685-3816-2-git-send-email-joerg.roedel@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.