Lines Matching defs:limit
380 u64 limit = buf->nr_pages * PAGE_SIZE;
384 * the limit to half of the buffer size in snapshot mode
388 if (head < limit >> 1)
389 limit >>= 1;
392 * If we're within max_record_sz of the limit, we must
393 * pad, move the head index and recompute the limit.
395 if (limit - head < spe_pmu->max_record_sz) {
396 arm_spe_pmu_pad_buf(handle, limit - head);
397 handle->head = PERF_IDX2OFF(limit, buf);
398 limit = ((buf->nr_pages * PAGE_SIZE) >> 1) + handle->head;
401 return limit;
409 u64 limit = bufsize;
450 limit = round_down(tail, PAGE_SIZE);
462 limit = min(limit, round_up(wakeup, PAGE_SIZE));
464 if (limit > head)
465 return limit;
478 u64 limit = __arm_spe_pmu_next_off(handle);
483 * then pad to the end and recompute the limit.
485 if (limit && (limit - head < spe_pmu->max_record_sz)) {
486 arm_spe_pmu_pad_buf(handle, limit - head);
487 limit = __arm_spe_pmu_next_off(handle);
490 return limit;
496 u64 base, limit;
504 * We still need to clear the limit pointer, since the
507 limit = 0;
511 limit = buf->snapshot ? arm_spe_pmu_next_snapshot_off(handle)
513 if (limit)
514 limit |= BIT(SYS_PMBLIMITR_EL1_E_SHIFT);
516 limit += (u64)buf->base;
521 write_sysreg_s(limit, SYS_PMBLIMITR_EL1);