~ubuntu-branches/ubuntu/quantal/linux-ti-omap4/quantal

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.2.0-19.31, Ubuntu: 3.2.0-19.30
  • Date: 2012-03-21 15:23:51 UTC
  • Revision ID: package-import@ubuntu.com-20120321152351-ya52awpl9cmqlwrs
Tags: 3.2.0-1410.13
[ Paolo Pisati ]

* rebased on Ubuntu-3.2.0-19.31

[ Ubuntu: 3.2.0-19.31 ]

* d-i: Add dm-multipath and scsi device handlers
  - LP: #959749
* d-i: Move multipath modules into their own udeb
  - LP: #598251, #959749
* [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
* powerpc/pmac: Fix SMP kernels on pre-core99 UP machines
  - LP: #959959
* rebase to v3.2.12

[ Ubuntu: 3.2.0-19.30 ]

* [Config] Fix typeo in the Hyper-V module names
* [Config] Move kernels to "Section: kernel"
  - LP: #499557
* 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
* [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
* [Config] Drop non-SMP powerpc
* 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

Show diffs side-by-side

added added

removed removed

Lines of Context:
253
253
                struct perf_event *event = cpuc->events[idx];
254
254
                struct hw_perf_event *hwc;
255
255
 
 
256
                if (!event)
 
257
                        continue;
 
258
 
256
259
                if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx))
257
260
                        continue;
258
261
 
259
262
                hwc = &event->hw;
260
 
                armpmu_event_update(event, hwc, idx, 1);
 
263
                armpmu_event_update(event, hwc, idx);
261
264
                data.period = event->hw.last_period;
262
265
                if (!armpmu_event_set_period(event, hwc, idx))
263
266
                        continue;
590
593
                struct perf_event *event = cpuc->events[idx];
591
594
                struct hw_perf_event *hwc;
592
595
 
593
 
                if (!xscale2_pmnc_counter_has_overflowed(pmnc, idx))
 
596
                if (!event)
 
597
                        continue;
 
598
 
 
599
                if (!xscale2_pmnc_counter_has_overflowed(of_flags, idx))
594
600
                        continue;
595
601
 
596
602
                hwc = &event->hw;
597
 
                armpmu_event_update(event, hwc, idx, 1);
 
603
                armpmu_event_update(event, hwc, idx);
598
604
                data.period = event->hw.last_period;
599
605
                if (!armpmu_event_set_period(event, hwc, idx))
600
606
                        continue;
661
667
static void
662
668
xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)
663
669
{
664
 
        unsigned long flags, ien, evtsel;
 
670
        unsigned long flags, ien, evtsel, of_flags;
665
671
        struct pmu_hw_events *events = cpu_pmu->get_hw_events();
666
672
 
667
673
        ien = xscale2pmu_read_int_enable();
670
676
        switch (idx) {
671
677
        case XSCALE_CYCLE_COUNTER:
672
678
                ien &= ~XSCALE2_CCOUNT_INT_EN;
 
679
                of_flags = XSCALE2_CCOUNT_OVERFLOW;
673
680
                break;
674
681
        case XSCALE_COUNTER0:
675
682
                ien &= ~XSCALE2_COUNT0_INT_EN;
676
683
                evtsel &= ~XSCALE2_COUNT0_EVT_MASK;
677
684
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT;
 
685
                of_flags = XSCALE2_COUNT0_OVERFLOW;
678
686
                break;
679
687
        case XSCALE_COUNTER1:
680
688
                ien &= ~XSCALE2_COUNT1_INT_EN;
681
689
                evtsel &= ~XSCALE2_COUNT1_EVT_MASK;
682
690
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT;
 
691
                of_flags = XSCALE2_COUNT1_OVERFLOW;
683
692
                break;
684
693
        case XSCALE_COUNTER2:
685
694
                ien &= ~XSCALE2_COUNT2_INT_EN;
686
695
                evtsel &= ~XSCALE2_COUNT2_EVT_MASK;
687
696
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT;
 
697
                of_flags = XSCALE2_COUNT2_OVERFLOW;
688
698
                break;
689
699
        case XSCALE_COUNTER3:
690
700
                ien &= ~XSCALE2_COUNT3_INT_EN;
691
701
                evtsel &= ~XSCALE2_COUNT3_EVT_MASK;
692
702
                evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT;
 
703
                of_flags = XSCALE2_COUNT3_OVERFLOW;
693
704
                break;
694
705
        default:
695
706
                WARN_ONCE(1, "invalid counter number (%d)\n", idx);
699
710
        raw_spin_lock_irqsave(&events->pmu_lock, flags);
700
711
        xscale2pmu_write_event_select(evtsel);
701
712
        xscale2pmu_write_int_enable(ien);
 
713
        xscale2pmu_write_overflow_flags(of_flags);
702
714
        raw_spin_unlock_irqrestore(&events->pmu_lock, flags);
703
715
}
704
716