]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - kernel/events/core.c
Apply preempt_rt patch-4.9-rt1.patch.xz
[zynq/linux.git] / kernel / events / core.c
index 0e292132efacaaa09fa4960b92315c9c967b0e82..3748cb7b2d6e317d2e22a9372923f17fcc08cdb1 100644 (file)
@@ -902,7 +902,15 @@ list_update_cgroup_event(struct perf_event *event,
         * this will always be called from the right CPU.
         */
        cpuctx = __get_cpu_context(ctx);
-       cpuctx->cgrp = add ? event->cgrp : NULL;
+
+       /*
+        * cpuctx->cgrp is NULL until a cgroup event is sched in or
+        * ctx->nr_cgroup == 0 .
+        */
+       if (add && perf_cgroup_from_task(current, ctx) == event->cgrp)
+               cpuctx->cgrp = event->cgrp;
+       else if (!add)
+               cpuctx->cgrp = NULL;
 }
 
 #else /* !CONFIG_CGROUP_PERF */
@@ -1042,6 +1050,7 @@ static void __perf_mux_hrtimer_init(struct perf_cpu_context *cpuctx, int cpu)
        raw_spin_lock_init(&cpuctx->hrtimer_lock);
        hrtimer_init(timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
        timer->function = perf_mux_hrtimer_handler;
+       timer->irqsafe = 1;
 }
 
 static int perf_mux_hrtimer_restart(struct perf_cpu_context *cpuctx)
@@ -8018,6 +8027,7 @@ restart:
  * if <size> is not specified, the range is treated as a single address.
  */
 enum {
+       IF_ACT_NONE = -1,
        IF_ACT_FILTER,
        IF_ACT_START,
        IF_ACT_STOP,
@@ -8041,6 +8051,7 @@ static const match_table_t if_tokens = {
        { IF_SRC_KERNEL,        "%u/%u" },
        { IF_SRC_FILEADDR,      "%u@%s" },
        { IF_SRC_KERNELADDR,    "%u" },
+       { IF_ACT_NONE,          NULL },
 };
 
 /*
@@ -8325,6 +8336,7 @@ static void perf_swevent_init_hrtimer(struct perf_event *event)
 
        hrtimer_init(&hwc->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
        hwc->hrtimer.function = perf_swevent_hrtimer;
+       hwc->hrtimer.irqsafe = 1;
 
        /*
         * Since hrtimers have a fixed rate, we can do a static freq->period