summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-04-10 00:19:47 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:47 (GMT)
commit0daa7bd247a2dc811a6ff3d211d4150f97a96200 (patch)
treef1363b5adaad93a12753b96c1125e3d5e052891a /include
parent24edfc10c27f9e772d160bc2b88ef6ab2d245766 (diff)
downloadlinux-fsl-qoriq-0daa7bd247a2dc811a6ff3d211d4150f97a96200.tar.xz
idr: Use local lock instead of preempt enable/disable
We need to protect the per cpu variable and prevent migration. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/idr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/idr.h b/include/linux/idr.h
index 871a213..267527b 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -92,10 +92,14 @@ void idr_init(struct idr *idp);
* Each idr_preload() should be matched with an invocation of this
* function. See idr_preload() for details.
*/
+#ifdef CONFIG_PREEMPT_RT_FULL
+void idr_preload_end(void);
+#else
static inline void idr_preload_end(void)
{
preempt_enable();
}
+#endif
/**
* idr_find - return pointer for given id