summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-04-25 01:45:10 (GMT)
committerScott Wood <scottwood@freescale.com>2015-02-13 22:20:55 (GMT)
commit90c1dcb4c50cb1d9bc7985cffc264b0ab6787ed1 (patch)
tree60e30a6268abe9ebd4d065214055cb04834b7c0a /include
parentd569fcdb758b6bfdb8aed2fd0268f53beb9e89f3 (diff)
downloadlinux-fsl-qoriq-90c1dcb4c50cb1d9bc7985cffc264b0ab6787ed1.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