mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
Merge branches 'doc.2019.01.26a', 'fixes.2019.01.26a', 'sil.2019.01.26a', 'spdx.2019.02.09a', 'srcu.2019.01.26a' and 'torture.2019.01.26a' into HEAD
doc.2019.01.26a: Documentation updates. fixes.2019.01.26a: Miscellaneous fixes. sil.2019.01.26a: Removal of a few more spin_is_locked() instances. spdx.2019.02.09a: Add SPDX identifiers to RCU files srcu.2019.01.26a: SRCU updates. torture.2019.01.26a: Torture-test updates.
This commit is contained in:
commit
e7ffb4eb9a
37 changed files with 297 additions and 716 deletions
|
@ -1,25 +1,12 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* Read-Copy Update mechanism for mutual exclusion
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, you can access it online at
|
||||
* http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
*
|
||||
* Copyright IBM Corporation, 2001
|
||||
*
|
||||
* Author: Dipankar Sarma <dipankar@in.ibm.com>
|
||||
*
|
||||
* Based on the original work by Paul McKenney <paulmck@us.ibm.com>
|
||||
* Based on the original work by Paul McKenney <paulmck@vnet.ibm.com>
|
||||
* and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen.
|
||||
* Papers:
|
||||
* http://www.rdrop.com/users/paulmck/paper/rclockpdcsproof.pdf
|
||||
|
@ -89,7 +76,7 @@ static inline int rcu_preempt_depth(void)
|
|||
/* Internal to kernel */
|
||||
void rcu_init(void);
|
||||
extern int rcu_scheduler_active __read_mostly;
|
||||
void rcu_check_callbacks(int user);
|
||||
void rcu_sched_clock_irq(int user);
|
||||
void rcu_report_dead(unsigned int cpu);
|
||||
void rcutree_migrate_callbacks(int cpu);
|
||||
|
||||
|
@ -309,16 +296,16 @@ static inline void rcu_preempt_sleep_check(void) { }
|
|||
*/
|
||||
|
||||
#ifdef __CHECKER__
|
||||
#define rcu_dereference_sparse(p, space) \
|
||||
#define rcu_check_sparse(p, space) \
|
||||
((void)(((typeof(*p) space *)p) == p))
|
||||
#else /* #ifdef __CHECKER__ */
|
||||
#define rcu_dereference_sparse(p, space)
|
||||
#define rcu_check_sparse(p, space)
|
||||
#endif /* #else #ifdef __CHECKER__ */
|
||||
|
||||
#define __rcu_access_pointer(p, space) \
|
||||
({ \
|
||||
typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \
|
||||
rcu_dereference_sparse(p, space); \
|
||||
rcu_check_sparse(p, space); \
|
||||
((typeof(*p) __force __kernel *)(_________p1)); \
|
||||
})
|
||||
#define __rcu_dereference_check(p, c, space) \
|
||||
|
@ -326,13 +313,13 @@ static inline void rcu_preempt_sleep_check(void) { }
|
|||
/* Dependency order vs. p above. */ \
|
||||
typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \
|
||||
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \
|
||||
rcu_dereference_sparse(p, space); \
|
||||
rcu_check_sparse(p, space); \
|
||||
((typeof(*p) __force __kernel *)(________p1)); \
|
||||
})
|
||||
#define __rcu_dereference_protected(p, c, space) \
|
||||
({ \
|
||||
RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \
|
||||
rcu_dereference_sparse(p, space); \
|
||||
rcu_check_sparse(p, space); \
|
||||
((typeof(*p) __force __kernel *)(p)); \
|
||||
})
|
||||
#define rcu_dereference_raw(p) \
|
||||
|
@ -382,6 +369,7 @@ static inline void rcu_preempt_sleep_check(void) { }
|
|||
#define rcu_assign_pointer(p, v) \
|
||||
({ \
|
||||
uintptr_t _r_a_p__v = (uintptr_t)(v); \
|
||||
rcu_check_sparse(p, __rcu); \
|
||||
\
|
||||
if (__builtin_constant_p(v) && (_r_a_p__v) == (uintptr_t)NULL) \
|
||||
WRITE_ONCE((p), (typeof(p))(_r_a_p__v)); \
|
||||
|
@ -785,7 +773,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
|
|||
*/
|
||||
#define RCU_INIT_POINTER(p, v) \
|
||||
do { \
|
||||
rcu_dereference_sparse(p, __rcu); \
|
||||
rcu_check_sparse(p, __rcu); \
|
||||
WRITE_ONCE(p, RCU_INITIALIZER(v)); \
|
||||
} while (0)
|
||||
|
||||
|
@ -859,7 +847,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
|
|||
|
||||
/* Has the specified rcu_head structure been handed to call_rcu()? */
|
||||
|
||||
/*
|
||||
/**
|
||||
* rcu_head_init - Initialize rcu_head for rcu_head_after_call_rcu()
|
||||
* @rhp: The rcu_head structure to initialize.
|
||||
*
|
||||
|
@ -874,10 +862,10 @@ static inline void rcu_head_init(struct rcu_head *rhp)
|
|||
rhp->func = (rcu_callback_t)~0L;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* rcu_head_after_call_rcu - Has this rcu_head been passed to call_rcu()?
|
||||
* @rhp: The rcu_head structure to test.
|
||||
* @func: The function passed to call_rcu() along with @rhp.
|
||||
* @f: The function passed to call_rcu() along with @rhp.
|
||||
*
|
||||
* Returns @true if the @rhp has been passed to call_rcu() with @func,
|
||||
* and @false otherwise. Emits a warning in any other case, including
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue