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

« back to all changes in this revision

Viewing changes to arch/powerpc/oprofile/op_model_cell.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
#define MAX_SPU_COUNT 0xFFFFFF  /* maximum 24 bit LFSR value */
69
69
 
70
 
/* Minumum HW interval timer setting to send value to trace buffer is 10 cycle.
 
70
/* Minimum HW interval timer setting to send value to trace buffer is 10 cycle.
71
71
 * To configure counter to send value every N cycles set counter to
72
72
 * 2^32 - 1 - N.
73
73
 */
1470
1470
 * trace buffer at the maximum rate possible.  The trace buffer is configured
1471
1471
 * to store the PCs, wrapping when it is full.  The performance counter is
1472
1472
 * initialized to the max hardware count minus the number of events, N, between
1473
 
 * samples.  Once the N events have occured, a HW counter overflow occurs
 
1473
 * samples.  Once the N events have occurred, a HW counter overflow occurs
1474
1474
 * causing the generation of a HW counter interrupt which also stops the
1475
1475
 * writing of the SPU PC values to the trace buffer.  Hence the last PC
1476
1476
 * written to the trace buffer is the SPU PC that we want.  Unfortunately,
1656
1656
                 * The counters were frozen by the interrupt.
1657
1657
                 * Reenable the interrupt and restart the counters.
1658
1658
                 * If there was a race between the interrupt handler and
1659
 
                 * the virtual counter routine.  The virutal counter
 
1659
                 * the virtual counter routine.  The virtual counter
1660
1660
                 * routine may have cleared the interrupts.  Hence must
1661
1661
                 * use the virt_cntr_inter_mask to re-enable the interrupts.
1662
1662
                 */