From: mark gross <mgross@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH]iova-lockdep-false-alarm-fix.
Date: Wed, 20 Feb 2008 16:35:28 -0800 [thread overview]
Message-ID: <20080221003528.GA5566@linux.intel.com> (raw)
lockdep goes off on the iova copy_reserved_iova because it and a
function it calls grabs locks in the from, and the to of the copy
operation.
This patch gives the reserved_ioval_list locks special lockdep classes.
--mgross
Signed-off-by: <mgross@linux.intel.com>
Index: linux-2.6.24-mm1/drivers/pci/intel-iommu.c
===================================================================
--- linux-2.6.24-mm1.orig/drivers/pci/intel-iommu.c 2008-02-20 15:52:23.000000000 -0800
+++ linux-2.6.24-mm1/drivers/pci/intel-iommu.c 2008-02-20 16:08:27.000000000 -0800
@@ -1127,6 +1127,8 @@
}
static struct iova_domain reserved_iova_list;
+static struct lock_class_key reserved_alloc_key;
+static struct lock_class_key reserved_rbtree_key;
static void dmar_init_reserved_ranges(void)
{
@@ -1137,6 +1139,11 @@
init_iova_domain(&reserved_iova_list, DMA_32BIT_PFN);
+ lockdep_set_class(&reserved_iova_list.iova_alloc_lock,
+ &reserved_alloc_key);
+ lockdep_set_class(&reserved_iova_list.iova_rbtree_lock,
+ &reserved_rbtree_key);
+
/* IOAPIC ranges shouldn't be accessed by DMA */
iova = reserve_iova(&reserved_iova_list, IOVA_PFN(IOAPIC_RANGE_START),
IOVA_PFN(IOAPIC_RANGE_END));
next reply other threads:[~2008-02-21 0:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 0:35 mark gross [this message]
2008-02-23 8:05 ` [PATCH]iova-lockdep-false-alarm-fix Andrew Morton
2008-02-25 15:55 ` [PATCH]iova-lockdep-false-alarm-fix mark gross
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=20080221003528.GA5566@linux.intel.com \
--to=mgross@linux.intel.com \
--cc=akpm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox