#define CORE_EVNTSEL_INV_MASK          0x00800000ULL
 #define CORE_EVNTSEL_COUNTER_MASK      0xFF000000ULL
 
-#define CORE_EVNTSEL_MASK              \
+#define CORE_EVNTSEL_MASK              \
        (CORE_EVNTSEL_EVENT_MASK |      \
         CORE_EVNTSEL_UNIT_MASK  |      \
         CORE_EVNTSEL_EDGE_MASK  |      \
 
 
        if (!throttle) {
                counter->hw.interrupts++;
-       } else if (counter->hw.interrupts != MAX_INTERRUPTS) {
-               counter->hw.interrupts++;
-               if (HZ*counter->hw.interrupts > (u64)sysctl_perf_counter_limit) {
-                       counter->hw.interrupts = MAX_INTERRUPTS;
-                       perf_log_throttle(counter, 0);
+       } else {
+               if (counter->hw.interrupts != MAX_INTERRUPTS) {
+                       counter->hw.interrupts++;
+                       if (HZ*counter->hw.interrupts > (u64)sysctl_perf_counter_limit) {
+                               counter->hw.interrupts = MAX_INTERRUPTS;
+                               perf_log_throttle(counter, 0);
+                               ret = 1;
+                       }
+               } else {
+                       /*
+                        * Keep re-disabling counters even though on the previous
+                        * pass we disabled it - just in case we raced with a
+                        * sched-in and the counter got enabled again:
+                        */
                        ret = 1;
                }
        }