Merge r7499 from trunk

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7751 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-11-04 16:04:28 +00:00
parent ef1e3072c7
commit d79f9c7c02
2 changed files with 53 additions and 10 deletions

View File

@@ -404,7 +404,7 @@ static inline u32 int_sqrt64(u64 x)
u32 r = 0, s;
int i;
for (i = 8 * sizeof(r) - 2; i >= 0;i --) {
for (i = 8 * sizeof(r) - 2; i >= 0; i--) {
s = r + (1 << i);
if (1ll * s * s <= x)
r = s;
@@ -788,7 +788,10 @@ struct t10_pi_tuple {
} while (0)
#endif
/* See also commit 1d27e3e2252b ("timer: Remove expires and data arguments from DEFINE_TIMER") */
/*
* See also commit 1d27e3e2252b ("timer: Remove expires and data arguments
* from DEFINE_TIMER").
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#undef DEFINE_TIMER
#define DEFINE_TIMER(_name, _function) \

View File

@@ -71,14 +71,54 @@
#endif
#ifdef NOLOCKDEP_SUPPORTED
#define spin_lock_nolockdep(lock) do { current->nolockdep_call = 1; spin_lock(lock); current->nolockdep_call = 0; } while (0)
#define spin_unlock_nolockdep(lock) do { current->nolockdep_call = 1; spin_unlock(lock); current->nolockdep_call = 0; } while (0)
#define mutex_lock_nolockdep(lock) do { current->nolockdep_call = 1; mutex_lock(lock); current->nolockdep_call = 0; } while (0)
#define mutex_unlock_nolockdep(lock) do { current->nolockdep_call = 1; mutex_unlock(lock); current->nolockdep_call = 0; } while (0)
#define down_read_nolockdep(lock) do { current->nolockdep_call = 1; down_read(lock); current->nolockdep_call = 0; } while (0)
#define up_read_nolockdep(lock) do { current->nolockdep_call = 1; up_read(lock); current->nolockdep_call = 0; } while (0)
#define down_write_nolockdep(lock) do { current->nolockdep_call = 1; down_write(lock); current->nolockdep_call = 0; } while (0)
#define up_write_nolockdep(lock) do { current->nolockdep_call = 1; up_write(lock); current->nolockdep_call = 0; } while (0)
#define spin_lock_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
spin_lock(lock); \
current->nolockdep_call = 0; \
} while (0)
#define spin_unlock_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
spin_unlock(lock); \
current->nolockdep_call = 0; \
} while (0)
#define mutex_lock_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
mutex_lock(lock); \
current->nolockdep_call = 0; \
} while (0)
#define mutex_unlock_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
mutex_unlock(lock); \
current->nolockdep_call = 0; \
} while (0)
#define down_read_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
down_read(lock); \
current->nolockdep_call = 0; \
} while (0)
#define up_read_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
up_read(lock); \
current->nolockdep_call = 0; \
} while (0)
#define down_write_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
down_write(lock); \
current->nolockdep_call = 0; \
} while (0)
#define up_write_nolockdep(lock) \
do { \
current->nolockdep_call = 1; \
up_write(lock); \
current->nolockdep_call = 0; \
} while (0)
#else
#define spin_lock_nolockdep spin_lock
#define spin_unlock_nolockdep spin_unlock