]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - lib/radix-tree.c
Apply preempt_rt patch-4.9-rt1.patch.xz
[zynq/linux.git] / lib / radix-tree.c
index 8e6d552c40ddfc7fa745a8a8acf34ee17f02bc3d..881cc195d85f5810003d21fdf090a25aacb64d85 100644 (file)
@@ -290,13 +290,14 @@ radix_tree_node_alloc(struct radix_tree_root *root)
                 * succeed in getting a node here (and never reach
                 * kmem_cache_alloc)
                 */
-               rtp = this_cpu_ptr(&radix_tree_preloads);
+               rtp = &get_cpu_var(radix_tree_preloads);
                if (rtp->nr) {
                        ret = rtp->nodes;
                        rtp->nodes = ret->private_data;
                        ret->private_data = NULL;
                        rtp->nr--;
                }
+               put_cpu_var(radix_tree_preloads);
                /*
                 * Update the allocation stack trace as this is more useful
                 * for debugging.
@@ -336,6 +337,7 @@ radix_tree_node_free(struct radix_tree_node *node)
        call_rcu(&node->rcu_head, radix_tree_node_rcu_free);
 }
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 /*
  * Load up this CPU's radix_tree_node buffer with sufficient objects to
  * ensure that the addition of a single element in the tree cannot fail.  On
@@ -455,6 +457,7 @@ int radix_tree_maybe_preload_order(gfp_t gfp_mask, int order)
 
        return __radix_tree_preload(gfp_mask, nr_nodes);
 }
+#endif
 
 /*
  * The maximum index which can be stored in a radix tree