From: Michael Jeanson Date: Thu, 8 Nov 2018 20:40:23 +0000 (-0500) Subject: Drop spinlock.h wrapper X-Git-Tag: v2.12.0-pre~93 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fc94c945a818ebfff1b05c08d11cef564208749c;p=lttng-modules.git Drop spinlock.h wrapper Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/lib/ringbuffer/frontend_types.h b/lib/ringbuffer/frontend_types.h index 2b0c9329..837a926f 100644 --- a/lib/ringbuffer/frontend_types.h +++ b/lib/ringbuffer/frontend_types.h @@ -15,7 +15,6 @@ #include #include #include -#include #include /* For per-CPU read-side iterator */ #include diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c index 6d91a2c1..8ce50c09 100644 --- a/lttng-statedump-impl.c +++ b/lttng-statedump-impl.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -373,12 +372,12 @@ int lttng_list_interrupts(struct lttng_session *session) irq_desc_get_chip(desc)->name ? : "unnamed_irq_chip"; local_irq_save(flags); - wrapper_desc_spin_lock(&desc->lock); + raw_spin_lock(&desc->lock); for (action = desc->action; action; action = action->next) { trace_lttng_statedump_interrupt(session, irq, irq_chip_name, action); } - wrapper_desc_spin_unlock(&desc->lock); + raw_spin_unlock(&desc->lock); local_irq_restore(flags); } return 0; diff --git a/wrapper/spinlock.h b/wrapper/spinlock.h deleted file mode 100644 index b3570d40..00000000 --- a/wrapper/spinlock.h +++ /dev/null @@ -1,34 +0,0 @@ -/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1) - * - * wrapper/spinlock.h - * - * Copyright (C) 2011-2012 Mathieu Desnoyers - */ - -#ifndef _LTTNG_WRAPPER_SPINLOCK_H -#define _LTTNG_WRAPPER_SPINLOCK_H - -#include - -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) - -#include - -#define raw_spin_lock_init(lock) \ - do { \ - raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED; \ - memcpy(lock, &__lock, sizeof(lock)); \ - } while (0) - -#define raw_spin_is_locked(lock) __raw_spin_is_locked(lock) - -#define wrapper_desc_spin_lock(lock) spin_lock(lock) -#define wrapper_desc_spin_unlock(lock) spin_unlock(lock) - -#else - -#define wrapper_desc_spin_lock(lock) raw_spin_lock(lock) -#define wrapper_desc_spin_unlock(lock) raw_spin_unlock(lock) - -#endif -#endif /* _LTTNG_WRAPPER_SPINLOCK_H */