summaryrefslogtreecommitdiffstats
path: root/arch/mips64
diff options
context:
space:
mode:
authorKanoj Sarcar <kanoj@engr.sgi.com>2000-06-13 20:42:48 +0000
committerKanoj Sarcar <kanoj@engr.sgi.com>2000-06-13 20:42:48 +0000
commit2b8295855d98d74c709e56f05949fd7cc9130fb8 (patch)
tree1f52e88955fc507105b6a4dd97992a1f68d3a6b9 /arch/mips64
parentd994392b29cdb629304b8e0dcefb5bd9dec870b9 (diff)
Fix a possible race in the initialization code.
Diffstat (limited to 'arch/mips64')
-rw-r--r--arch/mips64/sgi-ip27/ip27-init.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/mips64/sgi-ip27/ip27-init.c b/arch/mips64/sgi-ip27/ip27-init.c
index 83df50dba..42f51d241 100644
--- a/arch/mips64/sgi-ip27/ip27-init.c
+++ b/arch/mips64/sgi-ip27/ip27-init.c
@@ -295,14 +295,10 @@ void per_hub_init(cnodeid_t cnode)
if (!(done = CNODEMASK_TSTB(hub_init_mask, cnode))) {
/* Turn our bit on in the mask. */
CNODEMASK_SETB(hub_init_mask, cnode);
- }
- spin_unlock(&hub_mask_lock);
-
- /*
- * Do the actual initialization if it hasn't been done yet.
- * We don't need to hold a lock for this work.
- */
- if (!done) {
+ /*
+ * Do the actual initialization if it hasn't been done yet.
+ * We don't need to hold a lock for this work.
+ */
hub_rtc_init(cnode);
pcibr_setup(cnode);
#ifdef CONFIG_REPLICATE_EXHANDLERS
@@ -327,6 +323,7 @@ void per_hub_init(cnodeid_t cnode)
}
#endif
}
+ spin_unlock(&hub_mask_lock);
}
/*