#define _LIB_RING_BUFFER_FRONTEND_API_H
#include <ringbuffer/frontend.h>
-#include <wrapper/percpu-defs.h>
+#include <linux/percpu-defs.h>
#include <linux/errno.h>
#include <linux/prefetch.h>
void lib_ring_buffer_put_cpu(const struct lttng_kernel_ring_buffer_config *config)
{
barrier();
- (*lttng_this_cpu_ptr(&lib_ring_buffer_nesting))--;
+ (*this_cpu_ptr(&lib_ring_buffer_nesting))--;
rcu_read_unlock_sched_notrace();
}
+++ /dev/null
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/percpu-defs.h
- *
- * wrapper around linux/percpu-defs.h.
- *
- * Copyright (C) 2014 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_PERCPU_DEFS_H
-#define _LTTNG_WRAPPER_PERCPU_DEFS_H
-
-#include <lttng/kernel-version.h>
-
-#if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0)
-
-#include <linux/percpu-defs.h>
-
-#define lttng_this_cpu_ptr(ptr) this_cpu_ptr(ptr)
-
-#else /* #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
-
-#include <linux/percpu.h>
-
-#define lttng_this_cpu_ptr(ptr) (&__get_cpu_var(*(ptr)))
-
-#endif /* #else #if LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,19,0) */
-
-#endif /* _LTTNG_WRAPPER_PERCPU_DEFS_H */
#include <linux/time.h>
#include <linux/hrtimer.h>
#include <linux/percpu.h>
+#include <linux/percpu-defs.h>
+
#include <lttng/kernel-version.h>
#include <asm/local.h>
#include <lttng/kernel-version.h>
#include <lttng/clock.h>
#include <wrapper/compiler.h>
-#include <wrapper/percpu-defs.h>
#include <wrapper/random.h>
#include <blacklist/timekeeping.h>
/* Use fast nmi-safe monotonic clock provided by the Linux kernel. */
preempt_disable();
- last_tsc_ptr = lttng_this_cpu_ptr(<tng_last_tsc);
+ last_tsc_ptr = this_cpu_ptr(<tng_last_tsc);
last = *last_tsc_ptr;
/*
* Read "last" before "now". It is not strictly required, but it ensures
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/percpu.h>
+#include <linux/percpu-defs.h>
#include <asm/cacheflush.h>
#include <ringbuffer/config.h>
#include <ringbuffer/nohz.h>
#include <wrapper/cpu.h>
#include <wrapper/kref.h>
-#include <wrapper/percpu-defs.h>
#include <wrapper/timer.h>
#include <wrapper/vmalloc.h>
raw_spin_unlock(&buf->raw_tick_nohz_spinlock);
break;
case TICK_NOHZ_STOP:
- spin_lock(lttng_this_cpu_ptr(&ring_buffer_nohz_lock));
+ spin_lock(this_cpu_ptr(&ring_buffer_nohz_lock));
lib_ring_buffer_stop_switch_timer(buf);
lib_ring_buffer_stop_read_timer(buf);
- spin_unlock(lttng_this_cpu_ptr(&ring_buffer_nohz_lock));
+ spin_unlock(this_cpu_ptr(&ring_buffer_nohz_lock));
break;
case TICK_NOHZ_RESTART:
- spin_lock(lttng_this_cpu_ptr(&ring_buffer_nohz_lock));
+ spin_lock(this_cpu_ptr(&ring_buffer_nohz_lock));
lib_ring_buffer_start_read_timer(buf);
lib_ring_buffer_start_switch_timer(buf);
- spin_unlock(lttng_this_cpu_ptr(&ring_buffer_nohz_lock));
+ spin_unlock(this_cpu_ptr(&ring_buffer_nohz_lock));
break;
}