Symbol: topa
arch/x86/events/intel/pt.c
1007
struct topa *topa;
arch/x86/events/intel/pt.c
1020
list_for_each_entry(topa, &buf->tables, list) {
arch/x86/events/intel/pt.c
1021
if (topa->offset + topa->size > (unsigned long)pg << PAGE_SHIFT)
arch/x86/events/intel/pt.c
1037
if (WARN_ON_ONCE(topa->last == -1))
arch/x86/events/intel/pt.c
1040
tp = topa_to_page(topa);
arch/x86/events/intel/pt.c
1041
cur_pg = PFN_DOWN(topa->offset);
arch/x86/events/intel/pt.c
1042
if (topa->z_count) {
arch/x86/events/intel/pt.c
1043
z_pg = TOPA_ENTRY_PAGES(topa, 0) * (topa->z_count + 1);
arch/x86/events/intel/pt.c
1044
start_idx = topa->z_count + 1;
arch/x86/events/intel/pt.c
1052
idx = (pg - cur_pg) / TOPA_ENTRY_PAGES(topa, 0);
arch/x86/events/intel/pt.c
1059
for (idx = start_idx, cur_pg += z_pg; idx < topa->last; idx++) {
arch/x86/events/intel/pt.c
1060
if (cur_pg + TOPA_ENTRY_PAGES(topa, idx) > pg)
arch/x86/events/intel/pt.c
1063
cur_pg += TOPA_ENTRY_PAGES(topa, idx);
arch/x86/events/intel/pt.c
1079
struct topa *topa;
arch/x86/events/intel/pt.c
1085
topa = &tp->topa;
arch/x86/events/intel/pt.c
1086
if (topa == buf->first)
arch/x86/events/intel/pt.c
1087
topa = buf->last;
arch/x86/events/intel/pt.c
1089
topa = list_prev_entry(topa, list);
arch/x86/events/intel/pt.c
1091
tp = topa_to_page(topa);
arch/x86/events/intel/pt.c
1093
return &tp->table[topa->last - 1];
arch/x86/events/intel/pt.c
1205
buf->cur = &cur_tp->topa;
arch/x86/events/intel/pt.c
1222
struct topa *topa, *iter;
arch/x86/events/intel/pt.c
1227
list_for_each_entry_safe(topa, iter, &buf->tables, list) {
arch/x86/events/intel/pt.c
1232
topa_free(topa);
arch/x86/events/intel/pt.c
1248
struct topa *topa;
arch/x86/events/intel/pt.c
1251
topa = topa_alloc(cpu, gfp);
arch/x86/events/intel/pt.c
1252
if (!topa)
arch/x86/events/intel/pt.c
1255
topa_insert_table(buf, topa);
arch/x86/events/intel/pt.c
1835
BUILD_BUG_ON(sizeof(struct topa) > PAGE_SIZE);
arch/x86/events/intel/pt.c
611
((PAGE_SIZE - sizeof(struct topa)) / sizeof(struct topa_entry))
arch/x86/events/intel/pt.c
620
struct topa topa;
arch/x86/events/intel/pt.c
623
static inline struct topa_page *topa_to_page(struct topa *topa)
arch/x86/events/intel/pt.c
625
return container_of(topa, struct topa_page, topa);
arch/x86/events/intel/pt.c
633
static inline phys_addr_t topa_pfn(struct topa *topa)
arch/x86/events/intel/pt.c
635
return PFN_DOWN(virt_to_phys(topa_to_page(topa)));
arch/x86/events/intel/pt.c
680
static struct topa *topa_alloc(int cpu, gfp_t gfp)
arch/x86/events/intel/pt.c
691
tp->topa.last = 0;
arch/x86/events/intel/pt.c
698
TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT;
arch/x86/events/intel/pt.c
699
TOPA_ENTRY(&tp->topa, 1)->end = 1;
arch/x86/events/intel/pt.c
702
return &tp->topa;
arch/x86/events/intel/pt.c
709
static void topa_free(struct topa *topa)
arch/x86/events/intel/pt.c
711
free_page((unsigned long)topa);
arch/x86/events/intel/pt.c
723
static void topa_insert_table(struct pt_buffer *buf, struct topa *topa)
arch/x86/events/intel/pt.c
725
struct topa *last = buf->last;
arch/x86/events/intel/pt.c
727
list_add_tail(&topa->list, &buf->tables);
arch/x86/events/intel/pt.c
730
buf->first = buf->last = buf->cur = topa;
arch/x86/events/intel/pt.c
734
topa->offset = last->offset + last->size;
arch/x86/events/intel/pt.c
735
buf->last = topa;
arch/x86/events/intel/pt.c
742
TOPA_ENTRY(last, -1)->base = topa_pfn(topa);
arch/x86/events/intel/pt.c
750
static bool topa_table_full(struct topa *topa)
arch/x86/events/intel/pt.c
754
return !!topa->last;
arch/x86/events/intel/pt.c
756
return topa->last == TENTS_PER_PAGE - 1;
arch/x86/events/intel/pt.c
772
struct topa *topa = buf->last;
arch/x86/events/intel/pt.c
780
if (topa_table_full(topa)) {
arch/x86/events/intel/pt.c
781
topa = topa_alloc(cpu, gfp);
arch/x86/events/intel/pt.c
782
if (!topa)
arch/x86/events/intel/pt.c
785
topa_insert_table(buf, topa);
arch/x86/events/intel/pt.c
788
if (topa->z_count == topa->last - 1) {
arch/x86/events/intel/pt.c
789
if (order == TOPA_ENTRY(topa, topa->last - 1)->size)
arch/x86/events/intel/pt.c
790
topa->z_count++;
arch/x86/events/intel/pt.c
793
TOPA_ENTRY(topa, -1)->base = page_to_phys(p) >> TOPA_SHIFT;
arch/x86/events/intel/pt.c
794
TOPA_ENTRY(topa, -1)->size = order;
arch/x86/events/intel/pt.c
797
TOPA_ENTRY(topa, -1)->intr = 1;
arch/x86/events/intel/pt.c
798
TOPA_ENTRY(topa, -1)->stop = 1;
arch/x86/events/intel/pt.c
801
topa->last++;
arch/x86/events/intel/pt.c
802
topa->size += sizes(order);
arch/x86/events/intel/pt.c
815
struct topa *topa;
arch/x86/events/intel/pt.c
817
list_for_each_entry(topa, &buf->tables, list) {
arch/x86/events/intel/pt.c
818
struct topa_page *tp = topa_to_page(topa);
arch/x86/events/intel/pt.c
822
topa->offset, topa->size);
arch/x86/events/intel/pt.c
836
if (!i && topa->z_count)
arch/x86/events/intel/pt.c
837
i += topa->z_count;
arch/x86/events/intel/pt.c
858
buf->cur = list_entry(buf->cur->list.next, struct topa,
arch/x86/events/intel/pt.c
992
buf->cur = &tp->topa;
arch/x86/events/intel/pt.h
75
struct topa *first, *last, *cur;