• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/mips/sibyte/common/

Lines Matching refs:sbp

82 static struct sbprof_tb sbp;
137 #define TB_FULL (sbp.next_tb_sample == MAX_TB_SAMPLES)
190 sbp.tb_armed = 1;
199 if (sbp.next_tb_sample < MAX_TB_SAMPLES) {
200 u64 *p = sbp.sbprof_tbbuf[sbp.next_tb_sample++];
222 if (!sbp.tb_enable) {
226 sbp.tb_armed = 0;
227 wake_up_interruptible(&sbp.tb_sync);
236 sbp.tb_armed = 0;
237 if (!sbp.tb_enable)
238 wake_up_interruptible(&sbp.tb_sync);
239 wake_up_interruptible(&sbp.tb_read);
261 if (xchg(&sbp.tb_enable, 1))
266 sbp.next_tb_sample = 0;
270 DEVNAME " trace freeze", &sbp);
286 if (request_irq(K_INT_PERF_CNT, sbprof_pc_intr, 0, DEVNAME " scd perfcnt", &sbp)) {
287 free_irq(K_INT_TRACE_FREEZE, &sbp);
369 if (sbp.tb_enable) {
376 err = wait_event_interruptible(sbp.tb_sync, !sbp.tb_armed);
382 sbp.tb_enable = 0;
383 free_irq(K_INT_TRACE_FREEZE, &sbp);
384 free_irq(K_INT_PERF_CNT, &sbp);
400 if (xchg(&sbp.open, SB_OPENING) != SB_CLOSED)
403 memset(&sbp, 0, sizeof(struct sbprof_tb));
404 sbp.sbprof_tbbuf = vmalloc(MAX_TBSAMPLE_BYTES);
405 if (!sbp.sbprof_tbbuf) {
406 sbp.open = SB_CLOSED;
411 memset(sbp.sbprof_tbbuf, 0, MAX_TBSAMPLE_BYTES);
412 init_waitqueue_head(&sbp.tb_sync);
413 init_waitqueue_head(&sbp.tb_read);
414 mutex_init(&sbp.lock);
416 sbp.open = SB_OPEN;
427 if (minor != 0 || sbp.open != SB_CLOSED)
430 mutex_lock(&sbp.lock);
432 if (sbp.tb_armed || sbp.tb_enable)
435 vfree(sbp.sbprof_tbbuf);
436 sbp.open = SB_CLOSED;
439 mutex_unlock(&sbp.lock);
456 mutex_lock(&sbp.lock);
463 while (size && (cur_sample < sbp.next_tb_sample)) {
467 src = (char *)(((long)sbp.sbprof_tbbuf[cur_sample])+sample_off);
471 mutex_unlock(&sbp.lock);
490 mutex_unlock(&sbp.lock);
503 mutex_lock(&sbp.lock);
505 mutex_unlock(&sbp.lock);
509 mutex_lock(&sbp.lock);
511 mutex_unlock(&sbp.lock);
515 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
571 sbp.open = SB_CLOSED;