Commit e66c33d5 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

rcu: Add const annotation to char * for RCU tracepoints and functions

All the RCU tracepoints and functions that reference char pointers do
so with just 'char *' even though they do not modify the contents of
the string itself. This will cause warnings if a const char * is used
in one of these functions.

The RCU tracepoints store the pointer to the string to refer back to them
when the trace output is displayed. As this can be minutes, hours or
even days later, those strings had better be constant.

This change also opens the door to allow the RCU tracepoint strings and
their addresses to be exported so that userspace tracing tools can
translate the contents of the pointers of the RCU tracepoints.
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 102c9323
...@@ -52,7 +52,7 @@ extern int rcutorture_runnable; /* for sysctl */ ...@@ -52,7 +52,7 @@ extern int rcutorture_runnable; /* for sysctl */
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
extern void rcutorture_record_test_transition(void); extern void rcutorture_record_test_transition(void);
extern void rcutorture_record_progress(unsigned long vernum); extern void rcutorture_record_progress(unsigned long vernum);
extern void do_trace_rcu_torture_read(char *rcutorturename, extern void do_trace_rcu_torture_read(const char *rcutorturename,
struct rcu_head *rhp, struct rcu_head *rhp,
unsigned long secs, unsigned long secs,
unsigned long c_old, unsigned long c_old,
...@@ -65,7 +65,7 @@ static inline void rcutorture_record_progress(unsigned long vernum) ...@@ -65,7 +65,7 @@ static inline void rcutorture_record_progress(unsigned long vernum)
{ {
} }
#ifdef CONFIG_RCU_TRACE #ifdef CONFIG_RCU_TRACE
extern void do_trace_rcu_torture_read(char *rcutorturename, extern void do_trace_rcu_torture_read(const char *rcutorturename,
struct rcu_head *rhp, struct rcu_head *rhp,
unsigned long secs, unsigned long secs,
unsigned long c_old, unsigned long c_old,
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
*/ */
TRACE_EVENT(rcu_utilization, TRACE_EVENT(rcu_utilization,
TP_PROTO(char *s), TP_PROTO(const char *s),
TP_ARGS(s), TP_ARGS(s),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, s) __field(const char *, s)
), ),
TP_fast_assign( TP_fast_assign(
...@@ -51,14 +51,14 @@ TRACE_EVENT(rcu_utilization, ...@@ -51,14 +51,14 @@ TRACE_EVENT(rcu_utilization,
*/ */
TRACE_EVENT(rcu_grace_period, TRACE_EVENT(rcu_grace_period,
TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent), TP_PROTO(const char *rcuname, unsigned long gpnum, const char *gpevent),
TP_ARGS(rcuname, gpnum, gpevent), TP_ARGS(rcuname, gpnum, gpevent),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(char *, gpevent) __field(const char *, gpevent)
), ),
TP_fast_assign( TP_fast_assign(
...@@ -89,21 +89,21 @@ TRACE_EVENT(rcu_grace_period, ...@@ -89,21 +89,21 @@ TRACE_EVENT(rcu_grace_period,
*/ */
TRACE_EVENT(rcu_future_grace_period, TRACE_EVENT(rcu_future_grace_period,
TP_PROTO(char *rcuname, unsigned long gpnum, unsigned long completed, TP_PROTO(const char *rcuname, unsigned long gpnum, unsigned long completed,
unsigned long c, u8 level, int grplo, int grphi, unsigned long c, u8 level, int grplo, int grphi,
char *gpevent), const char *gpevent),
TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent), TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(unsigned long, completed) __field(unsigned long, completed)
__field(unsigned long, c) __field(unsigned long, c)
__field(u8, level) __field(u8, level)
__field(int, grplo) __field(int, grplo)
__field(int, grphi) __field(int, grphi)
__field(char *, gpevent) __field(const char *, gpevent)
), ),
TP_fast_assign( TP_fast_assign(
...@@ -132,13 +132,13 @@ TRACE_EVENT(rcu_future_grace_period, ...@@ -132,13 +132,13 @@ TRACE_EVENT(rcu_future_grace_period,
*/ */
TRACE_EVENT(rcu_grace_period_init, TRACE_EVENT(rcu_grace_period_init,
TP_PROTO(char *rcuname, unsigned long gpnum, u8 level, TP_PROTO(const char *rcuname, unsigned long gpnum, u8 level,
int grplo, int grphi, unsigned long qsmask), int grplo, int grphi, unsigned long qsmask),
TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(u8, level) __field(u8, level)
__field(int, grplo) __field(int, grplo)
...@@ -168,12 +168,12 @@ TRACE_EVENT(rcu_grace_period_init, ...@@ -168,12 +168,12 @@ TRACE_EVENT(rcu_grace_period_init,
*/ */
TRACE_EVENT(rcu_preempt_task, TRACE_EVENT(rcu_preempt_task,
TP_PROTO(char *rcuname, int pid, unsigned long gpnum), TP_PROTO(const char *rcuname, int pid, unsigned long gpnum),
TP_ARGS(rcuname, pid, gpnum), TP_ARGS(rcuname, pid, gpnum),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(int, pid) __field(int, pid)
), ),
...@@ -195,12 +195,12 @@ TRACE_EVENT(rcu_preempt_task, ...@@ -195,12 +195,12 @@ TRACE_EVENT(rcu_preempt_task,
*/ */
TRACE_EVENT(rcu_unlock_preempted_task, TRACE_EVENT(rcu_unlock_preempted_task,
TP_PROTO(char *rcuname, unsigned long gpnum, int pid), TP_PROTO(const char *rcuname, unsigned long gpnum, int pid),
TP_ARGS(rcuname, gpnum, pid), TP_ARGS(rcuname, gpnum, pid),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(int, pid) __field(int, pid)
), ),
...@@ -224,14 +224,14 @@ TRACE_EVENT(rcu_unlock_preempted_task, ...@@ -224,14 +224,14 @@ TRACE_EVENT(rcu_unlock_preempted_task,
*/ */
TRACE_EVENT(rcu_quiescent_state_report, TRACE_EVENT(rcu_quiescent_state_report,
TP_PROTO(char *rcuname, unsigned long gpnum, TP_PROTO(const char *rcuname, unsigned long gpnum,
unsigned long mask, unsigned long qsmask, unsigned long mask, unsigned long qsmask,
u8 level, int grplo, int grphi, int gp_tasks), u8 level, int grplo, int grphi, int gp_tasks),
TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(unsigned long, mask) __field(unsigned long, mask)
__field(unsigned long, qsmask) __field(unsigned long, qsmask)
...@@ -268,15 +268,15 @@ TRACE_EVENT(rcu_quiescent_state_report, ...@@ -268,15 +268,15 @@ TRACE_EVENT(rcu_quiescent_state_report,
*/ */
TRACE_EVENT(rcu_fqs, TRACE_EVENT(rcu_fqs,
TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent), TP_PROTO(const char *rcuname, unsigned long gpnum, int cpu, const char *qsevent),
TP_ARGS(rcuname, gpnum, cpu, qsevent), TP_ARGS(rcuname, gpnum, cpu, qsevent),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(unsigned long, gpnum) __field(unsigned long, gpnum)
__field(int, cpu) __field(int, cpu)
__field(char *, qsevent) __field(const char *, qsevent)
), ),
TP_fast_assign( TP_fast_assign(
...@@ -308,12 +308,12 @@ TRACE_EVENT(rcu_fqs, ...@@ -308,12 +308,12 @@ TRACE_EVENT(rcu_fqs,
*/ */
TRACE_EVENT(rcu_dyntick, TRACE_EVENT(rcu_dyntick,
TP_PROTO(char *polarity, long long oldnesting, long long newnesting), TP_PROTO(const char *polarity, long long oldnesting, long long newnesting),
TP_ARGS(polarity, oldnesting, newnesting), TP_ARGS(polarity, oldnesting, newnesting),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, polarity) __field(const char *, polarity)
__field(long long, oldnesting) __field(long long, oldnesting)
__field(long long, newnesting) __field(long long, newnesting)
), ),
...@@ -352,12 +352,12 @@ TRACE_EVENT(rcu_dyntick, ...@@ -352,12 +352,12 @@ TRACE_EVENT(rcu_dyntick,
*/ */
TRACE_EVENT(rcu_prep_idle, TRACE_EVENT(rcu_prep_idle,
TP_PROTO(char *reason), TP_PROTO(const char *reason),
TP_ARGS(reason), TP_ARGS(reason),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, reason) __field(const char *, reason)
), ),
TP_fast_assign( TP_fast_assign(
...@@ -376,13 +376,13 @@ TRACE_EVENT(rcu_prep_idle, ...@@ -376,13 +376,13 @@ TRACE_EVENT(rcu_prep_idle,
*/ */
TRACE_EVENT(rcu_callback, TRACE_EVENT(rcu_callback,
TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy, TP_PROTO(const char *rcuname, struct rcu_head *rhp, long qlen_lazy,
long qlen), long qlen),
TP_ARGS(rcuname, rhp, qlen_lazy, qlen), TP_ARGS(rcuname, rhp, qlen_lazy, qlen),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(void *, rhp) __field(void *, rhp)
__field(void *, func) __field(void *, func)
__field(long, qlen_lazy) __field(long, qlen_lazy)
...@@ -412,13 +412,13 @@ TRACE_EVENT(rcu_callback, ...@@ -412,13 +412,13 @@ TRACE_EVENT(rcu_callback,
*/ */
TRACE_EVENT(rcu_kfree_callback, TRACE_EVENT(rcu_kfree_callback,
TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset,
long qlen_lazy, long qlen), long qlen_lazy, long qlen),
TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(void *, rhp) __field(void *, rhp)
__field(unsigned long, offset) __field(unsigned long, offset)
__field(long, qlen_lazy) __field(long, qlen_lazy)
...@@ -447,12 +447,12 @@ TRACE_EVENT(rcu_kfree_callback, ...@@ -447,12 +447,12 @@ TRACE_EVENT(rcu_kfree_callback,
*/ */
TRACE_EVENT(rcu_batch_start, TRACE_EVENT(rcu_batch_start,
TP_PROTO(char *rcuname, long qlen_lazy, long qlen, long blimit), TP_PROTO(const char *rcuname, long qlen_lazy, long qlen, long blimit),
TP_ARGS(rcuname, qlen_lazy, qlen, blimit), TP_ARGS(rcuname, qlen_lazy, qlen, blimit),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(long, qlen_lazy) __field(long, qlen_lazy)
__field(long, qlen) __field(long, qlen)
__field(long, blimit) __field(long, blimit)
...@@ -477,12 +477,12 @@ TRACE_EVENT(rcu_batch_start, ...@@ -477,12 +477,12 @@ TRACE_EVENT(rcu_batch_start,
*/ */
TRACE_EVENT(rcu_invoke_callback, TRACE_EVENT(rcu_invoke_callback,
TP_PROTO(char *rcuname, struct rcu_head *rhp), TP_PROTO(const char *rcuname, struct rcu_head *rhp),
TP_ARGS(rcuname, rhp), TP_ARGS(rcuname, rhp),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(void *, rhp) __field(void *, rhp)
__field(void *, func) __field(void *, func)
), ),
...@@ -506,12 +506,12 @@ TRACE_EVENT(rcu_invoke_callback, ...@@ -506,12 +506,12 @@ TRACE_EVENT(rcu_invoke_callback,
*/ */
TRACE_EVENT(rcu_invoke_kfree_callback, TRACE_EVENT(rcu_invoke_kfree_callback,
TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset), TP_PROTO(const char *rcuname, struct rcu_head *rhp, unsigned long offset),
TP_ARGS(rcuname, rhp, offset), TP_ARGS(rcuname, rhp, offset),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(void *, rhp) __field(void *, rhp)
__field(unsigned long, offset) __field(unsigned long, offset)
), ),
...@@ -539,13 +539,13 @@ TRACE_EVENT(rcu_invoke_kfree_callback, ...@@ -539,13 +539,13 @@ TRACE_EVENT(rcu_invoke_kfree_callback,
*/ */
TRACE_EVENT(rcu_batch_end, TRACE_EVENT(rcu_batch_end,
TP_PROTO(char *rcuname, int callbacks_invoked, TP_PROTO(const char *rcuname, int callbacks_invoked,
bool cb, bool nr, bool iit, bool risk), bool cb, bool nr, bool iit, bool risk),
TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(int, callbacks_invoked) __field(int, callbacks_invoked)
__field(bool, cb) __field(bool, cb)
__field(bool, nr) __field(bool, nr)
...@@ -577,13 +577,13 @@ TRACE_EVENT(rcu_batch_end, ...@@ -577,13 +577,13 @@ TRACE_EVENT(rcu_batch_end,
*/ */
TRACE_EVENT(rcu_torture_read, TRACE_EVENT(rcu_torture_read,
TP_PROTO(char *rcutorturename, struct rcu_head *rhp, TP_PROTO(const char *rcutorturename, struct rcu_head *rhp,
unsigned long secs, unsigned long c_old, unsigned long c), unsigned long secs, unsigned long c_old, unsigned long c),
TP_ARGS(rcutorturename, rhp, secs, c_old, c), TP_ARGS(rcutorturename, rhp, secs, c_old, c),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcutorturename) __field(const char *, rcutorturename)
__field(struct rcu_head *, rhp) __field(struct rcu_head *, rhp)
__field(unsigned long, secs) __field(unsigned long, secs)
__field(unsigned long, c_old) __field(unsigned long, c_old)
...@@ -623,13 +623,13 @@ TRACE_EVENT(rcu_torture_read, ...@@ -623,13 +623,13 @@ TRACE_EVENT(rcu_torture_read,
*/ */
TRACE_EVENT(rcu_barrier, TRACE_EVENT(rcu_barrier,
TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), TP_PROTO(const char *rcuname, const char *s, int cpu, int cnt, unsigned long done),
TP_ARGS(rcuname, s, cpu, cnt, done), TP_ARGS(rcuname, s, cpu, cnt, done),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(char *, rcuname) __field(const char *, rcuname)
__field(char *, s) __field(const char *, s)
__field(int, cpu) __field(int, cpu)
__field(int, cnt) __field(int, cnt)
__field(unsigned long, done) __field(unsigned long, done)
......
...@@ -94,7 +94,7 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head) ...@@ -94,7 +94,7 @@ static inline void debug_rcu_head_unqueue(struct rcu_head *head)
extern void kfree(const void *); extern void kfree(const void *);
static inline bool __rcu_reclaim(char *rn, struct rcu_head *head) static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head)
{ {
unsigned long offset = (unsigned long)head->func; unsigned long offset = (unsigned long)head->func;
......
...@@ -377,7 +377,7 @@ EXPORT_SYMBOL_GPL(rcuhead_debug_descr); ...@@ -377,7 +377,7 @@ EXPORT_SYMBOL_GPL(rcuhead_debug_descr);
#endif /* #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD */ #endif /* #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD */
#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) || defined(CONFIG_RCU_TRACE) #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) || defined(CONFIG_RCU_TRACE)
void do_trace_rcu_torture_read(char *rcutorturename, struct rcu_head *rhp, void do_trace_rcu_torture_read(const char *rcutorturename, struct rcu_head *rhp,
unsigned long secs, unsigned long secs,
unsigned long c_old, unsigned long c) unsigned long c_old, unsigned long c)
{ {
......
...@@ -264,7 +264,7 @@ void rcu_check_callbacks(int cpu, int user) ...@@ -264,7 +264,7 @@ void rcu_check_callbacks(int cpu, int user)
*/ */
static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp) static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp)
{ {
char *rn = NULL; const char *rn = NULL;
struct rcu_head *next, *list; struct rcu_head *next, *list;
unsigned long flags; unsigned long flags;
RCU_TRACE(int cb_count = 0); RCU_TRACE(int cb_count = 0);
......
...@@ -36,7 +36,7 @@ struct rcu_ctrlblk { ...@@ -36,7 +36,7 @@ struct rcu_ctrlblk {
RCU_TRACE(unsigned long gp_start); /* Start time for stalls. */ RCU_TRACE(unsigned long gp_start); /* Start time for stalls. */
RCU_TRACE(unsigned long ticks_this_gp); /* Statistic for stalls. */ RCU_TRACE(unsigned long ticks_this_gp); /* Statistic for stalls. */
RCU_TRACE(unsigned long jiffies_stall); /* Jiffies at next stall. */ RCU_TRACE(unsigned long jiffies_stall); /* Jiffies at next stall. */
RCU_TRACE(char *name); /* Name of RCU type. */ RCU_TRACE(const char *name); /* Name of RCU type. */
}; };
/* Definition for rcupdate control block. */ /* Definition for rcupdate control block. */
......
...@@ -267,7 +267,7 @@ rcutorture_shutdown_notify(struct notifier_block *unused1, ...@@ -267,7 +267,7 @@ rcutorture_shutdown_notify(struct notifier_block *unused1,
* Absorb kthreads into a kernel function that won't return, so that * Absorb kthreads into a kernel function that won't return, so that
* they won't ever access module text or data again. * they won't ever access module text or data again.
*/ */
static void rcutorture_shutdown_absorb(char *title) static void rcutorture_shutdown_absorb(const char *title)
{ {
if (ACCESS_ONCE(fullstop) == FULLSTOP_SHUTDOWN) { if (ACCESS_ONCE(fullstop) == FULLSTOP_SHUTDOWN) {
pr_notice( pr_notice(
...@@ -337,7 +337,7 @@ rcu_random(struct rcu_random_state *rrsp) ...@@ -337,7 +337,7 @@ rcu_random(struct rcu_random_state *rrsp)
} }
static void static void
rcu_stutter_wait(char *title) rcu_stutter_wait(const char *title)
{ {
while (stutter_pause_test || !rcutorture_runnable) { while (stutter_pause_test || !rcutorture_runnable) {
if (rcutorture_runnable) if (rcutorture_runnable)
...@@ -366,7 +366,7 @@ struct rcu_torture_ops { ...@@ -366,7 +366,7 @@ struct rcu_torture_ops {
int (*stats)(char *page); int (*stats)(char *page);
int irq_capable; int irq_capable;
int can_boost; int can_boost;
char *name; const char *name;
}; };
static struct rcu_torture_ops *cur_ops; static struct rcu_torture_ops *cur_ops;
...@@ -1364,7 +1364,7 @@ rcu_torture_stutter(void *arg) ...@@ -1364,7 +1364,7 @@ rcu_torture_stutter(void *arg)
} }
static inline void static inline void
rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, char *tag) rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, const char *tag)
{ {
pr_alert("%s" TORTURE_FLAG pr_alert("%s" TORTURE_FLAG
"--- %s: nreaders=%d nfakewriters=%d " "--- %s: nreaders=%d nfakewriters=%d "
......
...@@ -1032,7 +1032,7 @@ static unsigned long rcu_cbs_completed(struct rcu_state *rsp, ...@@ -1032,7 +1032,7 @@ static unsigned long rcu_cbs_completed(struct rcu_state *rsp,
* rcu_nocb_wait_gp(). * rcu_nocb_wait_gp().
*/ */
static void trace_rcu_future_gp(struct rcu_node *rnp, struct rcu_data *rdp, static void trace_rcu_future_gp(struct rcu_node *rnp, struct rcu_data *rdp,
unsigned long c, char *s) unsigned long c, const char *s)
{ {
trace_rcu_future_grace_period(rdp->rsp->name, rnp->gpnum, trace_rcu_future_grace_period(rdp->rsp->name, rnp->gpnum,
rnp->completed, c, rnp->level, rnp->completed, c, rnp->level,
...@@ -2720,7 +2720,7 @@ static int rcu_cpu_has_callbacks(int cpu, bool *all_lazy) ...@@ -2720,7 +2720,7 @@ static int rcu_cpu_has_callbacks(int cpu, bool *all_lazy)
* Helper function for _rcu_barrier() tracing. If tracing is disabled, * Helper function for _rcu_barrier() tracing. If tracing is disabled,
* the compiler is expected to optimize this away. * the compiler is expected to optimize this away.
*/ */
static void _rcu_barrier_trace(struct rcu_state *rsp, char *s, static void _rcu_barrier_trace(struct rcu_state *rsp, const char *s,
int cpu, unsigned long done) int cpu, unsigned long done)
{ {
trace_rcu_barrier(rsp->name, s, cpu, trace_rcu_barrier(rsp->name, s, cpu,
......
...@@ -445,7 +445,7 @@ struct rcu_state { ...@@ -445,7 +445,7 @@ struct rcu_state {
/* for CPU stalls. */ /* for CPU stalls. */
unsigned long gp_max; /* Maximum GP duration in */ unsigned long gp_max; /* Maximum GP duration in */
/* jiffies. */ /* jiffies. */
char *name; /* Name of structure. */ const char *name; /* Name of structure. */
char abbr; /* Abbreviated name. */ char abbr; /* Abbreviated name. */
struct list_head flavors; /* List of RCU flavors. */ struct list_head flavors; /* List of RCU flavors. */
struct irq_work wakeup_work; /* Postponed wakeups */ struct irq_work wakeup_work; /* Postponed wakeups */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment