Commit 5cf05ad7 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Fix broken strings in RCU's source code.

Although the C language allows you to break strings across lines, doing
this makes it hard for people to find the Linux kernel code corresponding
to a given console message.  This commit therefore fixes broken strings
throughout RCU's source code.
Suggested-by: default avatarJosh Triplett <josh@joshtriplett.org>
Suggested-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent c701d5d9
...@@ -427,8 +427,7 @@ extern int rcu_my_thread_group_empty(void); ...@@ -427,8 +427,7 @@ extern int rcu_my_thread_group_empty(void);
static inline void rcu_preempt_sleep_check(void) static inline void rcu_preempt_sleep_check(void)
{ {
rcu_lockdep_assert(!lock_is_held(&rcu_lock_map), rcu_lockdep_assert(!lock_is_held(&rcu_lock_map),
"Illegal context switch in RCU read-side " "Illegal context switch in RCU read-side critical section");
"critical section");
} }
#else /* #ifdef CONFIG_PROVE_RCU */ #else /* #ifdef CONFIG_PROVE_RCU */
static inline void rcu_preempt_sleep_check(void) static inline void rcu_preempt_sleep_check(void)
......
...@@ -49,8 +49,7 @@ ...@@ -49,8 +49,7 @@
#include <asm/byteorder.h> #include <asm/byteorder.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and " MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and Josh Triplett <josh@freedesktop.org>");
"Josh Triplett <josh@freedesktop.org>");
static int nreaders = -1; /* # reader threads, defaults to 2*ncpus */ static int nreaders = -1; /* # reader threads, defaults to 2*ncpus */
static int nfakewriters = 4; /* # fake writer threads */ static int nfakewriters = 4; /* # fake writer threads */
...@@ -1200,27 +1199,27 @@ rcu_torture_printk(char *page) ...@@ -1200,27 +1199,27 @@ rcu_torture_printk(char *page)
} }
cnt += sprintf(&page[cnt], "%s%s ", torture_type, TORTURE_FLAG); cnt += sprintf(&page[cnt], "%s%s ", torture_type, TORTURE_FLAG);
cnt += sprintf(&page[cnt], cnt += sprintf(&page[cnt],
"rtc: %p ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d " "rtc: %p ver: %lu tfle: %d rta: %d rtaf: %d rtf: %d ",
"rtmbe: %d rtbke: %ld rtbre: %ld "
"rtbf: %ld rtb: %ld nt: %ld "
"onoff: %ld/%ld:%ld/%ld "
"barrier: %ld/%ld:%ld",
rcu_torture_current, rcu_torture_current,
rcu_torture_current_version, rcu_torture_current_version,
list_empty(&rcu_torture_freelist), list_empty(&rcu_torture_freelist),
atomic_read(&n_rcu_torture_alloc), atomic_read(&n_rcu_torture_alloc),
atomic_read(&n_rcu_torture_alloc_fail), atomic_read(&n_rcu_torture_alloc_fail),
atomic_read(&n_rcu_torture_free), atomic_read(&n_rcu_torture_free));
cnt += sprintf(&page[cnt], "rtmbe: %d rtbke: %ld rtbre: %ld ",
atomic_read(&n_rcu_torture_mberror), atomic_read(&n_rcu_torture_mberror),
n_rcu_torture_boost_ktrerror, n_rcu_torture_boost_ktrerror,
n_rcu_torture_boost_rterror, n_rcu_torture_boost_rterror);
cnt += sprintf(&page[cnt], "rtbf: %ld rtb: %ld nt: %ld ",
n_rcu_torture_boost_failure, n_rcu_torture_boost_failure,
n_rcu_torture_boosts, n_rcu_torture_boosts,
n_rcu_torture_timers, n_rcu_torture_timers);
cnt += sprintf(&page[cnt], "onoff: %ld/%ld:%ld/%ld ",
n_online_successes, n_online_successes,
n_online_attempts, n_online_attempts,
n_offline_successes, n_offline_successes,
n_offline_attempts, n_offline_attempts);
cnt += sprintf(&page[cnt], "barrier: %ld/%ld:%ld",
n_barrier_successes, n_barrier_successes,
n_barrier_attempts, n_barrier_attempts,
n_rcu_torture_barrier_error); n_rcu_torture_barrier_error);
...@@ -1462,8 +1461,7 @@ rcu_torture_shutdown(void *arg) ...@@ -1462,8 +1461,7 @@ rcu_torture_shutdown(void *arg)
delta = shutdown_time - jiffies_snap; delta = shutdown_time - jiffies_snap;
if (verbose) if (verbose)
printk(KERN_ALERT "%s" TORTURE_FLAG printk(KERN_ALERT "%s" TORTURE_FLAG
"rcu_torture_shutdown task: %lu " "rcu_torture_shutdown task: %lu jiffies remaining\n",
"jiffies remaining\n",
torture_type, delta); torture_type, delta);
schedule_timeout_interruptible(delta); schedule_timeout_interruptible(delta);
jiffies_snap = ACCESS_ONCE(jiffies); jiffies_snap = ACCESS_ONCE(jiffies);
...@@ -1515,8 +1513,7 @@ rcu_torture_onoff(void *arg) ...@@ -1515,8 +1513,7 @@ rcu_torture_onoff(void *arg)
if (cpu_down(cpu) == 0) { if (cpu_down(cpu) == 0) {
if (verbose) if (verbose)
printk(KERN_ALERT "%s" TORTURE_FLAG printk(KERN_ALERT "%s" TORTURE_FLAG
"rcu_torture_onoff task: " "rcu_torture_onoff task: offlined %d\n",
"offlined %d\n",
torture_type, cpu); torture_type, cpu);
n_offline_successes++; n_offline_successes++;
} }
...@@ -1529,8 +1526,7 @@ rcu_torture_onoff(void *arg) ...@@ -1529,8 +1526,7 @@ rcu_torture_onoff(void *arg)
if (cpu_up(cpu) == 0) { if (cpu_up(cpu) == 0) {
if (verbose) if (verbose)
printk(KERN_ALERT "%s" TORTURE_FLAG printk(KERN_ALERT "%s" TORTURE_FLAG
"rcu_torture_onoff task: " "rcu_torture_onoff task: onlined %d\n",
"onlined %d\n",
torture_type, cpu); torture_type, cpu);
n_online_successes++; n_online_successes++;
} }
...@@ -1952,8 +1948,7 @@ rcu_torture_init(void) ...@@ -1952,8 +1948,7 @@ rcu_torture_init(void)
return -EINVAL; return -EINVAL;
} }
if (cur_ops->fqs == NULL && fqs_duration != 0) { if (cur_ops->fqs == NULL && fqs_duration != 0) {
printk(KERN_ALERT "rcu-torture: ->fqs NULL and non-zero " printk(KERN_ALERT "rcu-torture: ->fqs NULL and non-zero fqs_duration, fqs disabled.\n");
"fqs_duration, fqs disabled.\n");
fqs_duration = 0; fqs_duration = 0;
} }
if (cur_ops->init) if (cur_ops->init)
......
...@@ -218,8 +218,7 @@ static const struct file_operations rcudata_csv_fops = { ...@@ -218,8 +218,7 @@ static const struct file_operations rcudata_csv_fops = {
static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp) static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp)
{ {
seq_printf(m, "%d:%d tasks=%c%c%c%c kt=%c ntb=%lu neb=%lu nnb=%lu " seq_printf(m, "%d:%d tasks=%c%c%c%c kt=%c ntb=%lu neb=%lu nnb=%lu ",
"j=%04x bt=%04x\n",
rnp->grplo, rnp->grphi, rnp->grplo, rnp->grphi,
"T."[list_empty(&rnp->blkd_tasks)], "T."[list_empty(&rnp->blkd_tasks)],
"N."[!rnp->gp_tasks], "N."[!rnp->gp_tasks],
...@@ -227,11 +226,11 @@ static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp) ...@@ -227,11 +226,11 @@ static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp)
"B."[!rnp->boost_tasks], "B."[!rnp->boost_tasks],
convert_kthread_status(rnp->boost_kthread_status), convert_kthread_status(rnp->boost_kthread_status),
rnp->n_tasks_boosted, rnp->n_exp_boosts, rnp->n_tasks_boosted, rnp->n_exp_boosts,
rnp->n_normal_boosts, rnp->n_normal_boosts);
seq_printf(m, "j=%04x bt=%04x\n",
(int)(jiffies & 0xffff), (int)(jiffies & 0xffff),
(int)(rnp->boost_time & 0xffff)); (int)(rnp->boost_time & 0xffff));
seq_printf(m, "%s: nt=%lu egt=%lu bt=%lu nb=%lu ny=%lu nos=%lu\n", seq_printf(m, " balk: nt=%lu egt=%lu bt=%lu nb=%lu ny=%lu nos=%lu\n",
" balk",
rnp->n_balk_blkd_tasks, rnp->n_balk_blkd_tasks,
rnp->n_balk_exp_gp_tasks, rnp->n_balk_exp_gp_tasks,
rnp->n_balk_boost_tasks, rnp->n_balk_boost_tasks,
...@@ -287,11 +286,11 @@ static void print_one_rcu_state(struct seq_file *m, struct rcu_state *rsp) ...@@ -287,11 +286,11 @@ static void print_one_rcu_state(struct seq_file *m, struct rcu_state *rsp)
struct rcu_node *rnp; struct rcu_node *rnp;
gpnum = rsp->gpnum; gpnum = rsp->gpnum;
seq_printf(m, "%s: c=%lu g=%lu s=%d jfq=%ld j=%x " seq_printf(m, "%s: c=%lu g=%lu s=%d jfq=%ld j=%x ",
"nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu oqlen=%ld/%ld\n",
rsp->name, rsp->completed, gpnum, rsp->fqs_state, rsp->name, rsp->completed, gpnum, rsp->fqs_state,
(long)(rsp->jiffies_force_qs - jiffies), (long)(rsp->jiffies_force_qs - jiffies),
(int)(jiffies & 0xffff), (int)(jiffies & 0xffff));
seq_printf(m, "nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu oqlen=%ld/%ld\n",
rsp->n_force_qs, rsp->n_force_qs_ngp, rsp->n_force_qs, rsp->n_force_qs_ngp,
rsp->n_force_qs - rsp->n_force_qs_ngp, rsp->n_force_qs - rsp->n_force_qs_ngp,
rsp->n_force_qs_lh, rsp->qlen_lazy, rsp->qlen); rsp->n_force_qs_lh, rsp->qlen_lazy, rsp->qlen);
...@@ -378,16 +377,16 @@ static const struct file_operations rcugp_fops = { ...@@ -378,16 +377,16 @@ static const struct file_operations rcugp_fops = {
static void print_one_rcu_pending(struct seq_file *m, struct rcu_data *rdp) static void print_one_rcu_pending(struct seq_file *m, struct rcu_data *rdp)
{ {
seq_printf(m, "%3d%cnp=%ld " seq_printf(m, "%3d%cnp=%ld ",
"qsp=%ld rpq=%ld cbr=%ld cng=%ld "
"gpc=%ld gps=%ld nf=%ld nn=%ld\n",
rdp->cpu, rdp->cpu,
cpu_is_offline(rdp->cpu) ? '!' : ' ', cpu_is_offline(rdp->cpu) ? '!' : ' ',
rdp->n_rcu_pending, rdp->n_rcu_pending);
seq_printf(m, "qsp=%ld rpq=%ld cbr=%ld cng=%ld ",
rdp->n_rp_qs_pending, rdp->n_rp_qs_pending,
rdp->n_rp_report_qs, rdp->n_rp_report_qs,
rdp->n_rp_cb_ready, rdp->n_rp_cb_ready,
rdp->n_rp_cpu_needs_gp, rdp->n_rp_cpu_needs_gp);
seq_printf(m, "gpc=%ld gps=%ld nf=%ld nn=%ld\n",
rdp->n_rp_gp_completed, rdp->n_rp_gp_completed,
rdp->n_rp_gp_started, rdp->n_rp_gp_started,
rdp->n_rp_need_fqs, rdp->n_rp_need_fqs,
......
...@@ -87,12 +87,10 @@ void __list_add_rcu(struct list_head *new, ...@@ -87,12 +87,10 @@ void __list_add_rcu(struct list_head *new,
struct list_head *prev, struct list_head *next) struct list_head *prev, struct list_head *next)
{ {
WARN(next->prev != prev, WARN(next->prev != prev,
"list_add_rcu corruption. next->prev should be " "list_add_rcu corruption. next->prev should be prev (%p), but was %p. (next=%p).\n",
"prev (%p), but was %p. (next=%p).\n",
prev, next->prev, next); prev, next->prev, next);
WARN(prev->next != next, WARN(prev->next != next,
"list_add_rcu corruption. prev->next should be " "list_add_rcu corruption. prev->next should be next (%p), but was %p. (prev=%p).\n",
"next (%p), but was %p. (prev=%p).\n",
next, prev->next, prev); next, prev->next, prev);
new->next = next; new->next = next;
new->prev = prev; new->prev = prev;
......
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