chanb->cpuhp_prepare.component = LTTNG_RING_BUFFER_BACKEND;
ret = cpuhp_state_add_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
if (ret)
goto free_bufs;
chanb->cpuhp_prepare.component = LTTNG_RING_BUFFER_BACKEND;
ret = cpuhp_state_add_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
if (ret)
goto free_bufs;
/*
* Teardown of lttng_rb_hp_prepare instance
* on "add" error is handled within cpu hotplug,
* no teardown to do from the caller.
*/
/*
* Teardown of lttng_rb_hp_prepare instance
* on "add" error is handled within cpu hotplug,
* no teardown to do from the caller.
*/
for_each_possible_cpu(i) {
struct lib_ring_buffer *buf =
per_cpu_ptr(chanb->buf, i);
for_each_possible_cpu(i) {
struct lib_ring_buffer *buf =
per_cpu_ptr(chanb->buf, i);
const struct lib_ring_buffer_config *config = &chanb->config;
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
const struct lib_ring_buffer_config *config = &chanb->config;
if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) {
int ret;
ret = cpuhp_state_remove_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
WARN_ON(ret);
int ret;
ret = cpuhp_state_remove_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
WARN_ON(ret);