Lines Matching refs:sdbt

44 static inline int require_table_link(const void *sdbt)
46 return ((unsigned long)sdbt & ~PAGE_MASK) == CPUM_SF_SDBT_TL_OFFSET;
72 unsigned long *sdbt; /* Sample-data-block-table origin */
140 * Return true if the entry in the sample data block table (sdbt)
141 * is a link to the next sdbt
148 /* Return pointer to the linked sdbt */
170 return !!cpuhw->sfb.sdbt;
178 unsigned long *sdbt, *curr;
180 if (!sfb->sdbt)
183 sdbt = sfb->sdbt;
184 curr = sdbt;
188 if (!*curr || !sdbt)
194 if (sdbt)
195 free_page((unsigned long)sdbt);
198 if (curr == sfb->sdbt)
201 sdbt = curr;
211 debug_sprintf_event(sfdbg, 5, "%s: freed sdbt %#lx\n", __func__,
212 (unsigned long)sfb->sdbt);
216 static int alloc_sample_data_block(unsigned long *sdbt, gfp_t gfp_flags)
229 *sdbt = virt_to_phys((void *)sdb);
251 if (!sfb->sdbt || !sfb->tail)
267 if (sfb->sdbt != get_next_sdbt(tail)) {
271 (unsigned long)sfb->sdbt,
318 *tail = virt_to_phys(sfb->sdbt) + 1;
322 " settings: sdbt %lu sdb %lu\n", __func__,
342 if (sfb->sdbt)
346 sfb->sdbt = (unsigned long *)get_zeroed_page(GFP_KERNEL);
347 if (!sfb->sdbt)
355 sfb->tail = sfb->sdbt;
356 *sfb->tail = virt_to_phys((void *)sfb->sdbt) + 1;
368 (unsigned long)sfb->sdbt, (unsigned long)*sfb->sdbt);
393 if (!sfb->sdbt)
422 if (cpuhw->sfb.sdbt)
1187 * @sdbt: Sample-data-block table
1205 static void hw_collect_samples(struct perf_event *event, unsigned long *sdbt,
1211 te = trailer_entry_ptr((unsigned long)sdbt);
1212 sample = (struct hws_basic_entry *)sdbt;
1280 unsigned long *sdbt, sdb;
1290 sdbt = (unsigned long *)TEAR_REG(hwc);
1294 sdb = (unsigned long)phys_to_virt(*sdbt);
1313 debug_sprintf_event(sfdbg, 6, "%s: sdbt %#lx/%#lx "
1315 __func__, sdb, (unsigned long)sdbt,
1338 sdbt++;
1339 if (is_link_entry(sdbt))
1340 sdbt = get_next_sdbt(sdbt);
1343 TEAR_REG(hwc) = (unsigned long) sdbt;
1793 sfb->sdbt = (unsigned long *)get_zeroed_page(GFP_KERNEL);
1794 if (!sfb->sdbt)
1796 aux->sdbt_index[sfb->num_sdbt++] = (unsigned long)sfb->sdbt;
1797 tail = sfb->tail = sfb->sdbt;
1821 *tail = virt_to_phys(sfb->sdbt) + 1;
1944 if (!SAMPL_DIAG_MODE(&event->hw) && !cpuhw->sfb.sdbt)
1961 cpuhw->lsctl.tear = virt_to_phys(cpuhw->sfb.sdbt);
1962 cpuhw->lsctl.dear = *(unsigned long *)cpuhw->sfb.sdbt;
1963 TEAR_REG(&event->hw) = (unsigned long)cpuhw->sfb.sdbt;