Merge branch 'linus' into perf/core
authorIngo Molnar <mingo@elte.hu>
Thu, 23 Sep 2010 06:02:09 +0000 (08:02 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 23 Sep 2010 06:02:09 +0000 (08:02 +0200)
Conflicts:
arch/sparc/kernel/perf_event.c

Merge reason: Resolve the conflict.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
arch/sparc/kernel/perf_event.c

@@@ -1073,16 -1047,18 +1073,27 @@@ static int sparc_pmu_event_init(struct 
                pmap = sparc_map_cache_event(attr->config);
                if (IS_ERR(pmap))
                        return PTR_ERR(pmap);
 -      } else if (attr->type != PERF_TYPE_RAW)
 -              return -EOPNOTSUPP;
 +              break;
 +
 +      case PERF_TYPE_RAW:
-               return -EOPNOTSUPP;
++              pmap = NULL;
++              break;
 +
 +      default:
 +              return -ENOENT;
 +
 +      }
  
 -              /* User gives us "(encoding << 16) | pic_mask" for
+       if (pmap) {
+               hwc->event_base = perf_event_encode(pmap);
+       } else {
++              /*
++               * User gives us "(encoding << 16) | pic_mask" for
+                * PERF_TYPE_RAW events.
+                */
+               hwc->event_base = attr->config;
+       }
        /* We save the enable bits in the config_base.  */
        hwc->config_base = sparc_pmu->irq_bit;
        if (!attr->exclude_user)