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

index f9a70675936450239b7c7cc77d1a3a110f57f115,6318e622cfb065d9da81e40b766c12dc0a6e2e7b..0d6deb55a2ae7e4189b5ab60aec81cd8df28adb6
@@@ -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)