~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to arch/arm/kernel/perf_event_v6.c

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich, Stefan Bader, Tim Gardner, Luke Yelavich, Upstream Kernel Changes, Andy Whitcroft, Colin Watson, John Johansen, Leann Ogasawara, Eugeni Dodonov, Seth Forshee, Wu Fengguang
  • Date: 2012-03-21 23:51:57 UTC
  • Revision ID: package-import@ubuntu.com-20120321235157-rqb6rpvyitir8dpj
Tags: 3.2.0-19.27
[ Stefan Bader ]

* d-i: Add dm-multipath and scsi device handlers
  - LP: #959749
* d-i: Move multipath modules into their own udeb
  - LP: #598251, #959749

[ Tim Gardner ]

* [Config] Auto-detect do_tools setting
* [Config] correctly specify CROSS_COMPILE for tools build
* [Config] CONFIG_DRM_PSB_CDV=n
* Rebase to v3.2.12

[ Luke Yelavich ]
* UBUNTU: Look for releases marked Lowlatency instead of Ubuntu
* UBUNTU: [Config] Adjust Poulsbo config options to match precise mainline,
  to satisfy enforcer

[ Upstream Kernel Changes ]

* powerpc/pmac: Fix SMP kernels on pre-core99 UP machines
  - LP: #959959
* rebase to v3.2.12

[ Andy Whitcroft ]

* [Config] Fix typeo in the Hyper-V module names

[ Colin Watson ]

* [Config] Move kernels to "Section: kernel"
  - LP: #499557

[ John Johansen ]

* SAUCE: AppArmor: Add ability to load extended policy
* SAUCE: AppArmor: Add the ability to mediate mount
* SAUCE: AppArmor: Add profile introspection file to interface
* SAUCE: AppArmor: basic networking rules

[ Leann Ogasawara ]

* [Config] Disable CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER
  - LP: #952035
* Rebase to v3.2.10
* [Config] Update configs after rebase to v3.2.10
* Rebase to v3.2.11
* [Config] Disable CONFIG_STUB_POULSBO
  - LP: #899244
* [Config] Add CONFIG_DRM_PSB check to enforcer
  - LP: #899244

[ Tim Gardner ]

* [Config] Drop non-SMP powerpc

[ Upstream Kernel Changes ]

* net/hyperv: Use the built-in macro KBUILD_MODNAME for this driver
* x86: Derandom delay_tsc for 64 bit
* Bluetooth: Fix l2cap conn failures for ssp devices
  - LP: #872044
* KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
  - LP: #917842
  - CVE-2012-0045
* KVM: x86: fix missing checks in syscall emulation
  - LP: #917842
  - CVE-2012-0045
* rebase to v3.2.11
* rebase to v3.2.10

[ Andy Whitcroft ]

* [Config] restore build-% shortcut
* SAUCE: ata_piix: defer disks to the Hyper-V drivers by default
  - LP: #929545, #942316

[ Eugeni Dodonov ]

* SAUCE: drm: give up on edid retries when i2c bus is not responding
  - LP: #855124

[ Seth Forshee ]

* SAUCE: (drop after 3.3) platform/x86: Add driver for Apple gmux device
  - LP: #925544

[ Upstream Kernel Changes ]

* bsg: fix sysfs link remove warning
  - LP: #946928
* regset: Prevent null pointer reference on readonly regsets
  - LP: #949905
  - CVE-2012-1097
* regset: Return -EFAULT, not -EIO, on host-side memory fault
  - LP: #949905
  - CVE-2012-1097

[ Wu Fengguang ]

* SAUCE: (drop after 3.4) ALSA: hda - add id for Atom Cedar Trail HDMI
  codec

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
        raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
464
464
}
465
465
 
466
 
static int counter_is_active(unsigned long pmcr, int idx)
467
 
{
468
 
        unsigned long mask = 0;
469
 
        if (idx == ARMV6_CYCLE_COUNTER)
470
 
                mask = ARMV6_PMCR_CCOUNT_IEN;
471
 
        else if (idx == ARMV6_COUNTER0)
472
 
                mask = ARMV6_PMCR_COUNT0_IEN;
473
 
        else if (idx == ARMV6_COUNTER1)
474
 
                mask = ARMV6_PMCR_COUNT1_IEN;
475
 
 
476
 
        if (mask)
477
 
                return pmcr & mask;
478
 
 
479
 
        WARN_ONCE(1, "invalid counter number (%d)\n", idx);
480
 
        return 0;
481
 
}
482
 
 
483
466
static irqreturn_t
484
467
armv6pmu_handle_irq(int irq_num,
485
468
                    void *dev)
509
492
                struct perf_event *event = cpuc->events[idx];
510
493
                struct hw_perf_event *hwc;
511
494
 
512
 
                if (!counter_is_active(pmcr, idx))
 
495
                /* Ignore if we don't have an event. */
 
496
                if (!event)
513
497
                        continue;
514
498
 
515
499
                /*
520
504
                        continue;
521
505
 
522
506
                hwc = &event->hw;
523
 
                armpmu_event_update(event, hwc, idx, 1);
 
507
                armpmu_event_update(event, hwc, idx);
524
508
                data.period = event->hw.last_period;
525
509
                if (!armpmu_event_set_period(event, hwc, idx))
526
510
                        continue;