watcher
static inline void cvmx_pip_config_watcher(uint64_t watcher,
cvmx_write_csr(CVMX_PIP_QOS_WATCHX(watcher), watcher_config.u64);
int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
list_add(&watcher->link, &smi_watchers);
watcher->new_smi(interfaces[i], devices[i]);
int ipmi_smi_watcher_unregister(struct ipmi_smi_watcher *watcher)
list_del(&watcher->link);
for (i = 0; i < ARRAY_SIZE(watcher); i++) {
err = setup_watcher(&watcher[i], gt, tl);
err = create_watcher(&watcher[1], engine, SZ_512K);
err = create_watcher(&watcher[0], engine, SZ_4K);
&watcher[0].rq->fence, 0,
switch_tl_lock(rq, watcher[0].rq);
err = intel_timeline_read_hwsp(rq, watcher[0].rq, &hwsp);
err = emit_read_hwsp(watcher[0].rq, /* before */
&watcher[0].addr);
switch_tl_lock(watcher[0].rq, rq);
switch_tl_lock(rq, watcher[1].rq);
err = intel_timeline_read_hwsp(rq, watcher[1].rq, &hwsp);
err = emit_read_hwsp(watcher[1].rq, /* after */
&watcher[1].addr);
switch_tl_lock(watcher[1].rq, rq);
err = i915_sw_fence_await_dma_fence(&watcher[1].rq->submit,
err = check_watcher(&watcher[0], "before", cmp_lt);
if (8 * watcher[1].rq->ring->emit >
3 * watcher[1].rq->ring->size)
err = check_watcher(&watcher[1], "after", cmp_gte);
for (i = 0; i < ARRAY_SIZE(watcher); i++)
cleanup_watcher(&watcher[i]);
struct hwsp_watcher watcher[2] = {};
static struct watcher *get_watcher(struct feature *feature)
return &feature->table.rmid.watcher;
return &feature->table.watcher;
return &feature->table.rmid.watcher.command;
return &feature->table.watcher.command;
struct watcher *watcher = get_watcher(feature);
if (IS_ERR(watcher))
return PTR_ERR(watcher);
return sysfs_emit(buf, "%u\n", watcher->period);
struct watcher watcher;
struct watcher watcher;
int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher);
int ipmi_smi_watcher_unregister(struct ipmi_smi_watcher *watcher);
struct xt_target *watcher;
w->u.watcher->name, w->data, sizeof(*w),
w->u.watcher->usersize, w->watcher_size,
w->u.watcher->revision);
*off += xt_compat_target_offset(w->u.watcher);
struct xt_target *watcher;
watcher = xt_request_find_target(NFPROTO_BRIDGE, w->u.name, 0);
if (IS_ERR(watcher))
return PTR_ERR(watcher);
if (watcher->family != NFPROTO_BRIDGE) {
module_put(watcher->me);
w->u.watcher = watcher;
par->target = watcher;
module_put(watcher->me);
par.target = w->u.watcher;
par->target = w->u.watcher;
w->u.watcher->target(skb, par);
watcher = map_kptr_race__open_and_load();
if (!ASSERT_OK_PTR(watcher, "watcher open_and_load"))
watcher->bss->target_map_id = map_id;
watcher->links.map_put = bpf_program__attach(watcher->progs.map_put);
if (!ASSERT_OK_PTR(watcher->links.map_put, "attach fentry"))
watcher->links.htab_map_free = bpf_program__attach(watcher->progs.htab_map_free);
if (!ASSERT_OK_PTR(watcher->links.htab_map_free, "attach fexit"))
while (!READ_ONCE(watcher->bss->map_freed))
ASSERT_EQ(watcher->bss->map_freed, 1, "map_freed");
ASSERT_EQ(read_refs(watcher), 2, "percpu_htab refcount");
map_kptr_race__destroy(watcher);
struct map_kptr_race *skel, *watcher;
watcher = map_kptr_race__open_and_load();
if (!ASSERT_OK_PTR(watcher, "watcher open_and_load"))
watcher->bss->target_map_id = map_id;
watcher->links.map_put = bpf_program__attach(watcher->progs.map_put);
if (!ASSERT_OK_PTR(watcher->links.map_put, "attach fentry"))
watcher->links.sk_map_free = bpf_program__attach(watcher->progs.sk_map_free);
if (!ASSERT_OK_PTR(watcher->links.sk_map_free, "attach fexit"))
while (!READ_ONCE(watcher->bss->map_freed))
ASSERT_EQ(watcher->bss->map_freed, 1, "map_freed");
ASSERT_EQ(read_refs(watcher), 2, "sk_ls refcount");
map_kptr_race__destroy(watcher);
struct map_kptr_race *skel, *watcher;
watcher = map_kptr_race__open_and_load();
if (!ASSERT_OK_PTR(watcher, "watcher open_and_load"))
watcher->bss->target_map_id = map_id;
watcher->links.map_put = bpf_program__attach(watcher->progs.map_put);
if (!ASSERT_OK_PTR(watcher->links.map_put, "attach fentry"))
watcher->links.htab_map_free = bpf_program__attach(watcher->progs.htab_map_free);
if (!ASSERT_OK_PTR(watcher->links.htab_map_free, "attach fexit"))
while (!READ_ONCE(watcher->bss->map_freed))
ASSERT_EQ(watcher->bss->map_freed, 1, "map_freed");
ASSERT_EQ(read_refs(watcher), 2, "htab refcount");
map_kptr_race__destroy(watcher);
struct map_kptr_race *skel, *watcher;