topa 570 arch/x86/events/intel/pt.c ((PAGE_SIZE - sizeof(struct topa)) / sizeof(struct topa_entry)) topa 579 arch/x86/events/intel/pt.c struct topa topa; topa 582 arch/x86/events/intel/pt.c static inline struct topa_page *topa_to_page(struct topa *topa) topa 584 arch/x86/events/intel/pt.c return container_of(topa, struct topa_page, topa); topa 592 arch/x86/events/intel/pt.c static inline phys_addr_t topa_pfn(struct topa *topa) topa 594 arch/x86/events/intel/pt.c return PFN_DOWN(virt_to_phys(topa_to_page(topa))); topa 612 arch/x86/events/intel/pt.c static struct topa *topa_alloc(int cpu, gfp_t gfp) topa 623 arch/x86/events/intel/pt.c tp->topa.last = 0; topa 630 arch/x86/events/intel/pt.c TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT; topa 631 arch/x86/events/intel/pt.c TOPA_ENTRY(&tp->topa, 1)->end = 1; topa 634 arch/x86/events/intel/pt.c return &tp->topa; topa 641 arch/x86/events/intel/pt.c static void topa_free(struct topa *topa) topa 643 arch/x86/events/intel/pt.c free_page((unsigned long)topa); topa 655 arch/x86/events/intel/pt.c static void topa_insert_table(struct pt_buffer *buf, struct topa *topa) topa 657 arch/x86/events/intel/pt.c struct topa *last = buf->last; topa 659 arch/x86/events/intel/pt.c list_add_tail(&topa->list, &buf->tables); topa 662 arch/x86/events/intel/pt.c buf->first = buf->last = buf->cur = topa; topa 666 arch/x86/events/intel/pt.c topa->offset = last->offset + last->size; topa 667 arch/x86/events/intel/pt.c buf->last = topa; topa 674 arch/x86/events/intel/pt.c TOPA_ENTRY(last, -1)->base = topa_pfn(topa); topa 682 arch/x86/events/intel/pt.c static bool topa_table_full(struct topa *topa) topa 686 arch/x86/events/intel/pt.c return !!topa->last; topa 688 arch/x86/events/intel/pt.c return topa->last == TENTS_PER_PAGE - 1; topa 703 arch/x86/events/intel/pt.c struct topa *topa = buf->last; topa 711 arch/x86/events/intel/pt.c if (topa_table_full(topa)) { topa 712 arch/x86/events/intel/pt.c topa = topa_alloc(cpu, gfp); topa 713 arch/x86/events/intel/pt.c if (!topa) topa 716 arch/x86/events/intel/pt.c topa_insert_table(buf, topa); topa 719 arch/x86/events/intel/pt.c if (topa->z_count == topa->last - 1) { topa 720 arch/x86/events/intel/pt.c if (order == TOPA_ENTRY(topa, topa->last - 1)->size) topa 721 arch/x86/events/intel/pt.c topa->z_count++; topa 724 arch/x86/events/intel/pt.c TOPA_ENTRY(topa, -1)->base = page_to_phys(p) >> TOPA_SHIFT; topa 725 arch/x86/events/intel/pt.c TOPA_ENTRY(topa, -1)->size = order; topa 728 arch/x86/events/intel/pt.c TOPA_ENTRY(topa, -1)->intr = 1; topa 729 arch/x86/events/intel/pt.c TOPA_ENTRY(topa, -1)->stop = 1; topa 732 arch/x86/events/intel/pt.c topa->last++; topa 733 arch/x86/events/intel/pt.c topa->size += sizes(order); topa 746 arch/x86/events/intel/pt.c struct topa *topa; topa 748 arch/x86/events/intel/pt.c list_for_each_entry(topa, &buf->tables, list) { topa 749 arch/x86/events/intel/pt.c struct topa_page *tp = topa_to_page(topa); topa 753 arch/x86/events/intel/pt.c topa->offset, topa->size); topa 767 arch/x86/events/intel/pt.c if (!i && topa->z_count) topa 768 arch/x86/events/intel/pt.c i += topa->z_count; topa 788 arch/x86/events/intel/pt.c buf->cur = list_entry(buf->cur->list.next, struct topa, topa 911 arch/x86/events/intel/pt.c buf->cur = &tp->topa; topa 924 arch/x86/events/intel/pt.c struct topa *topa; topa 937 arch/x86/events/intel/pt.c list_for_each_entry(topa, &buf->tables, list) { topa 938 arch/x86/events/intel/pt.c if (topa->offset + topa->size > pg << PAGE_SHIFT) topa 954 arch/x86/events/intel/pt.c if (WARN_ON_ONCE(topa->last == -1)) topa 957 arch/x86/events/intel/pt.c tp = topa_to_page(topa); topa 958 arch/x86/events/intel/pt.c cur_pg = PFN_DOWN(topa->offset); topa 959 arch/x86/events/intel/pt.c if (topa->z_count) { topa 960 arch/x86/events/intel/pt.c z_pg = TOPA_ENTRY_PAGES(topa, 0) * (topa->z_count + 1); topa 961 arch/x86/events/intel/pt.c start_idx = topa->z_count + 1; topa 969 arch/x86/events/intel/pt.c idx = (pg - cur_pg) / TOPA_ENTRY_PAGES(topa, 0); topa 976 arch/x86/events/intel/pt.c for (idx = start_idx, cur_pg += z_pg; idx < topa->last; idx++) { topa 977 arch/x86/events/intel/pt.c if (cur_pg + TOPA_ENTRY_PAGES(topa, idx) > pg) topa 980 arch/x86/events/intel/pt.c cur_pg += TOPA_ENTRY_PAGES(topa, idx); topa 996 arch/x86/events/intel/pt.c struct topa *topa; topa 1002 arch/x86/events/intel/pt.c topa = &tp->topa; topa 1003 arch/x86/events/intel/pt.c if (topa == buf->first) topa 1004 arch/x86/events/intel/pt.c topa = buf->last; topa 1006 arch/x86/events/intel/pt.c topa = list_prev_entry(topa, list); topa 1008 arch/x86/events/intel/pt.c tp = topa_to_page(topa); topa 1010 arch/x86/events/intel/pt.c return &tp->table[topa->last - 1]; topa 1118 arch/x86/events/intel/pt.c buf->cur = &cur_tp->topa; topa 1132 arch/x86/events/intel/pt.c struct topa *topa, *iter; topa 1134 arch/x86/events/intel/pt.c list_for_each_entry_safe(topa, iter, &buf->tables, list) { topa 1139 arch/x86/events/intel/pt.c topa_free(topa); topa 1152 arch/x86/events/intel/pt.c struct topa *topa; topa 1155 arch/x86/events/intel/pt.c topa = topa_alloc(cpu, gfp); topa 1156 arch/x86/events/intel/pt.c if (!topa) topa 1159 arch/x86/events/intel/pt.c topa_insert_table(buf, topa); topa 1576 arch/x86/events/intel/pt.c BUILD_BUG_ON(sizeof(struct topa) > PAGE_SIZE); topa 76 arch/x86/events/intel/pt.h struct topa *first, *last, *cur;