From: Keith Packard <keithp@keithp.com>
To: intel-gfx@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Keith Packard <keithp@keithp.com>,
Eugeni Dodonov <eugeni.dodonov@intel.com>,
Ted Phelps <phelps@gnusto.com>, Peter <pab1612@gmail.com>,
Lukas Hejtmanek <xhejtman@fi.muni.cz>,
Andrew Lutomirski <luto@mit.edu>,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 1/2] iommu: Export intel_iommu_enabled to signal when iommu is in use
Date: Fri, 9 Dec 2011 15:53:48 -0800 [thread overview]
Message-ID: <1323474829-2501-2-git-send-email-keithp@keithp.com> (raw)
In-Reply-To: <1323474829-2501-1-git-send-email-keithp@keithp.com>
From: Eugeni Dodonov <eugeni.dodonov@intel.com>
In i915 driver, we do not enable either rc6 or semaphores on SNB when dmar
is enabled. The new 'intel_iommu_enabled' variable signals when the
iommu code is in operation.
Cc: Ted Phelps <phelps@gnusto.com>
Cc: Peter <pab1612@gmail.com>
Cc: Lukas Hejtmanek <xhejtman@fi.muni.cz>
Cc: Andrew Lutomirski <luto@mit.edu>
CC: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
---
drivers/iommu/intel-iommu.c | 5 +++++
include/linux/dma_remapping.h | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index c0c7820..8dc19b8 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -405,6 +405,9 @@ int dmar_disabled = 0;
int dmar_disabled = 1;
#endif /*CONFIG_INTEL_IOMMU_DEFAULT_ON*/
+int intel_iommu_enabled = 0;
+EXPORT_SYMBOL_GPL(intel_iommu_enabled);
+
static int dmar_map_gfx = 1;
static int dmar_forcedac;
static int intel_iommu_strict;
@@ -3647,6 +3650,8 @@ int __init intel_iommu_init(void)
bus_register_notifier(&pci_bus_type, &device_nb);
+ intel_iommu_enabled = 1;
+
return 0;
}
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index ef90cbd..57c9a8a 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -31,6 +31,7 @@ extern void free_dmar_iommu(struct intel_iommu *iommu);
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
extern int dmar_disabled;
+extern int intel_iommu_enabled;
#else
static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
{
@@ -44,6 +45,7 @@ static inline void free_dmar_iommu(struct intel_iommu *iommu)
{
}
#define dmar_disabled (1)
+#define intel_iommu_enabled (0)
#endif
--
1.7.7.3
next prev parent reply other threads:[~2011-12-09 23:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-19 6:41 [PATCH] drm/i915: By default, enable RC6 on IVB and SNB when reasonable Keith Packard
2011-11-19 7:37 ` [Intel-gfx] " Kenneth Graunke
2011-11-19 9:25 ` Eugeni Dodonov
2011-11-19 18:32 ` Keith Packard
2011-11-20 21:19 ` Eugeni Dodonov
2011-11-22 20:15 ` Matthew Garrett
[not found] ` <CAC7Lmnts+QwZ2XTvbTQa=aa3XO5_Sna0vk3KHWJJ6oi6+D5BXw@mail.gmail.com>
2011-11-22 20:51 ` Matthew Garrett
2011-11-23 3:31 ` Keith Packard
2011-11-23 10:26 ` Daniel Vetter
2011-11-23 14:01 ` David Woodhouse
2011-11-23 14:39 ` Daniel Vetter
2011-11-23 15:03 ` David Woodhouse
2011-11-23 15:31 ` Daniel Vetter
2011-11-23 15:36 ` David Woodhouse
2011-11-23 15:46 ` Daniel Vetter
2011-11-23 15:41 ` Daniel Vetter
2011-11-23 15:43 ` David Woodhouse
2011-11-23 20:35 ` Daniel Vetter
2011-11-23 18:42 ` [PATCH] iommu: export no_iommu and dmar_disabled symbols Eugeni Dodonov
2011-11-23 20:36 ` [Intel-gfx] " David Woodhouse
2011-11-23 20:48 ` Keith Packard
[not found] ` <1322526298-2746-1-git-send-email-eugeni.dodonov@intel.com>
2011-12-09 23:53 ` drm/i915: Enabling RC6 where possible Keith Packard
2011-12-09 23:53 ` Keith Packard [this message]
2011-12-09 23:53 ` [PATCH 2/2] drm/i915: By default, enable RC6 on IVB and SNB when reasonable Keith Packard
2011-12-13 3:45 ` Matthew Garrett
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=1323474829-2501-2-git-send-email-keithp@keithp.com \
--to=keithp@keithp.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=eugeni.dodonov@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@mit.edu \
--cc=pab1612@gmail.com \
--cc=phelps@gnusto.com \
--cc=xhejtman@fi.muni.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome