diff options
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index f3077c0ab181..69f4efec3449 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | /* Data structures. */ | 52 | /* Data structures. */ |
53 | 53 | ||
54 | static struct lock_class_key rcu_root_class; | ||
55 | |||
54 | #define RCU_STATE_INITIALIZER(name) { \ | 56 | #define RCU_STATE_INITIALIZER(name) { \ |
55 | .level = { &name.node[0] }, \ | 57 | .level = { &name.node[0] }, \ |
56 | .levelcnt = { \ | 58 | .levelcnt = { \ |
@@ -1685,8 +1687,7 @@ static void __init rcu_init_one(struct rcu_state *rsp) | |||
1685 | cpustride *= rsp->levelspread[i]; | 1687 | cpustride *= rsp->levelspread[i]; |
1686 | rnp = rsp->level[i]; | 1688 | rnp = rsp->level[i]; |
1687 | for (j = 0; j < rsp->levelcnt[i]; j++, rnp++) { | 1689 | for (j = 0; j < rsp->levelcnt[i]; j++, rnp++) { |
1688 | if (rnp != rcu_get_root(rsp)) | 1690 | spin_lock_init(&rnp->lock); |
1689 | spin_lock_init(&rnp->lock); | ||
1690 | rnp->gpnum = 0; | 1691 | rnp->gpnum = 0; |
1691 | rnp->qsmask = 0; | 1692 | rnp->qsmask = 0; |
1692 | rnp->qsmaskinit = 0; | 1693 | rnp->qsmaskinit = 0; |
@@ -1709,7 +1710,7 @@ static void __init rcu_init_one(struct rcu_state *rsp) | |||
1709 | INIT_LIST_HEAD(&rnp->blocked_tasks[1]); | 1710 | INIT_LIST_HEAD(&rnp->blocked_tasks[1]); |
1710 | } | 1711 | } |
1711 | } | 1712 | } |
1712 | spin_lock_init(&rcu_get_root(rsp)->lock); | 1713 | lockdep_set_class(&rcu_get_root(rsp)->lock, &rcu_root_class); |
1713 | } | 1714 | } |
1714 | 1715 | ||
1715 | /* | 1716 | /* |