aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutorture.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 2736cc878ba2..61be03ba598d 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -120,11 +120,11 @@ MODULE_PARM_DESC(torture_type, "Type of RCU to torture (rcu, rcu_bh, srcu)");
120 120
121#define TORTURE_FLAG "-torture:" 121#define TORTURE_FLAG "-torture:"
122#define PRINTK_STRING(s) \ 122#define PRINTK_STRING(s) \
123 do { printk(KERN_ALERT "%s" TORTURE_FLAG s "\n", torture_type); } while (0) 123 do { pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)
124#define VERBOSE_PRINTK_STRING(s) \ 124#define VERBOSE_PRINTK_STRING(s) \
125 do { if (verbose) printk(KERN_ALERT "%s" TORTURE_FLAG s "\n", torture_type); } while (0) 125 do { if (verbose) pr_alert("%s" TORTURE_FLAG s "\n", torture_type); } while (0)
126#define VERBOSE_PRINTK_ERRSTRING(s) \ 126#define VERBOSE_PRINTK_ERRSTRING(s) \
127 do { if (verbose) printk(KERN_ALERT "%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0) 127 do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! " s "\n", torture_type); } while (0)
128 128
129static char printk_buf[4096]; 129static char printk_buf[4096];
130 130
@@ -242,7 +242,7 @@ rcutorture_shutdown_notify(struct notifier_block *unused1,
242 if (fullstop == FULLSTOP_DONTSTOP) 242 if (fullstop == FULLSTOP_DONTSTOP)
243 fullstop = FULLSTOP_SHUTDOWN; 243 fullstop = FULLSTOP_SHUTDOWN;
244 else 244 else
245 printk(KERN_WARNING /* but going down anyway, so... */ 245 pr_warn(/* but going down anyway, so... */
246 "Concurrent 'rmmod rcutorture' and shutdown illegal!\n"); 246 "Concurrent 'rmmod rcutorture' and shutdown illegal!\n");
247 mutex_unlock(&fullstop_mutex); 247 mutex_unlock(&fullstop_mutex);
248 return NOTIFY_DONE; 248 return NOTIFY_DONE;
@@ -255,7 +255,7 @@ rcutorture_shutdown_notify(struct notifier_block *unused1,
255static void rcutorture_shutdown_absorb(char *title) 255static void rcutorture_shutdown_absorb(char *title)
256{ 256{
257 if (ACCESS_ONCE(fullstop) == FULLSTOP_SHUTDOWN) { 257 if (ACCESS_ONCE(fullstop) == FULLSTOP_SHUTDOWN) {
258 printk(KERN_NOTICE 258 pr_notice(
259 "rcutorture thread %s parking due to system shutdown\n", 259 "rcutorture thread %s parking due to system shutdown\n",
260 title); 260 title);
261 schedule_timeout_uninterruptible(MAX_SCHEDULE_TIMEOUT); 261 schedule_timeout_uninterruptible(MAX_SCHEDULE_TIMEOUT);
@@ -1276,7 +1276,7 @@ rcu_torture_stats_print(void)
1276 int cnt; 1276 int cnt;
1277 1277
1278 cnt = rcu_torture_printk(printk_buf); 1278 cnt = rcu_torture_printk(printk_buf);
1279 printk(KERN_ALERT "%s", printk_buf); 1279 pr_alert("%s", printk_buf);
1280} 1280}
1281 1281
1282/* 1282/*
@@ -1389,20 +1389,20 @@ rcu_torture_stutter(void *arg)
1389static inline void 1389static inline void
1390rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, char *tag) 1390rcu_torture_print_module_parms(struct rcu_torture_ops *cur_ops, char *tag)
1391{ 1391{
1392 printk(KERN_ALERT "%s" TORTURE_FLAG 1392 pr_alert("%s" TORTURE_FLAG
1393 "--- %s: nreaders=%d nfakewriters=%d " 1393 "--- %s: nreaders=%d nfakewriters=%d "
1394 "stat_interval=%d verbose=%d test_no_idle_hz=%d " 1394 "stat_interval=%d verbose=%d test_no_idle_hz=%d "
1395 "shuffle_interval=%d stutter=%d irqreader=%d " 1395 "shuffle_interval=%d stutter=%d irqreader=%d "
1396 "fqs_duration=%d fqs_holdoff=%d fqs_stutter=%d " 1396 "fqs_duration=%d fqs_holdoff=%d fqs_stutter=%d "
1397 "test_boost=%d/%d test_boost_interval=%d " 1397 "test_boost=%d/%d test_boost_interval=%d "
1398 "test_boost_duration=%d shutdown_secs=%d " 1398 "test_boost_duration=%d shutdown_secs=%d "
1399 "onoff_interval=%d onoff_holdoff=%d\n", 1399 "onoff_interval=%d onoff_holdoff=%d\n",
1400 torture_type, tag, nrealreaders, nfakewriters, 1400 torture_type, tag, nrealreaders, nfakewriters,
1401 stat_interval, verbose, test_no_idle_hz, shuffle_interval, 1401 stat_interval, verbose, test_no_idle_hz, shuffle_interval,
1402 stutter, irqreader, fqs_duration, fqs_holdoff, fqs_stutter, 1402 stutter, irqreader, fqs_duration, fqs_holdoff, fqs_stutter,
1403 test_boost, cur_ops->can_boost, 1403 test_boost, cur_ops->can_boost,
1404 test_boost_interval, test_boost_duration, shutdown_secs, 1404 test_boost_interval, test_boost_duration, shutdown_secs,
1405 onoff_interval, onoff_holdoff); 1405 onoff_interval, onoff_holdoff);
1406} 1406}
1407 1407
1408static struct notifier_block rcutorture_shutdown_nb = { 1408static struct notifier_block rcutorture_shutdown_nb = {
@@ -1469,9 +1469,9 @@ rcu_torture_shutdown(void *arg)
1469 !kthread_should_stop()) { 1469 !kthread_should_stop()) {
1470 delta = shutdown_time - jiffies_snap; 1470 delta = shutdown_time - jiffies_snap;
1471 if (verbose) 1471 if (verbose)
1472 printk(KERN_ALERT "%s" TORTURE_FLAG 1472 pr_alert("%s" TORTURE_FLAG
1473 "rcu_torture_shutdown task: %lu jiffies remaining\n", 1473 "rcu_torture_shutdown task: %lu jiffies remaining\n",
1474 torture_type, delta); 1474 torture_type, delta);
1475 schedule_timeout_interruptible(delta); 1475 schedule_timeout_interruptible(delta);
1476 jiffies_snap = ACCESS_ONCE(jiffies); 1476 jiffies_snap = ACCESS_ONCE(jiffies);
1477 } 1477 }
@@ -1517,16 +1517,16 @@ rcu_torture_onoff(void *arg)
1517 cpu = (rcu_random(&rand) >> 4) % (maxcpu + 1); 1517 cpu = (rcu_random(&rand) >> 4) % (maxcpu + 1);
1518 if (cpu_online(cpu) && cpu_is_hotpluggable(cpu)) { 1518 if (cpu_online(cpu) && cpu_is_hotpluggable(cpu)) {
1519 if (verbose) 1519 if (verbose)
1520 printk(KERN_ALERT "%s" TORTURE_FLAG 1520 pr_alert("%s" TORTURE_FLAG
1521 "rcu_torture_onoff task: offlining %d\n", 1521 "rcu_torture_onoff task: offlining %d\n",
1522 torture_type, cpu); 1522 torture_type, cpu);
1523 starttime = jiffies; 1523 starttime = jiffies;
1524 n_offline_attempts++; 1524 n_offline_attempts++;
1525 if (cpu_down(cpu) == 0) { 1525 if (cpu_down(cpu) == 0) {
1526 if (verbose) 1526 if (verbose)
1527 printk(KERN_ALERT "%s" TORTURE_FLAG 1527 pr_alert("%s" TORTURE_FLAG
1528 "rcu_torture_onoff task: offlined %d\n", 1528 "rcu_torture_onoff task: offlined %d\n",
1529 torture_type, cpu); 1529 torture_type, cpu);
1530 n_offline_successes++; 1530 n_offline_successes++;
1531 delta = jiffies - starttime; 1531 delta = jiffies - starttime;
1532 sum_offline += delta; 1532 sum_offline += delta;
@@ -1541,16 +1541,16 @@ rcu_torture_onoff(void *arg)
1541 } 1541 }
1542 } else if (cpu_is_hotpluggable(cpu)) { 1542 } else if (cpu_is_hotpluggable(cpu)) {
1543 if (verbose) 1543 if (verbose)
1544 printk(KERN_ALERT "%s" TORTURE_FLAG 1544 pr_alert("%s" TORTURE_FLAG
1545 "rcu_torture_onoff task: onlining %d\n", 1545 "rcu_torture_onoff task: onlining %d\n",
1546 torture_type, cpu); 1546 torture_type, cpu);
1547 starttime = jiffies; 1547 starttime = jiffies;
1548 n_online_attempts++; 1548 n_online_attempts++;
1549 if (cpu_up(cpu) == 0) { 1549 if (cpu_up(cpu) == 0) {
1550 if (verbose) 1550 if (verbose)
1551 printk(KERN_ALERT "%s" TORTURE_FLAG 1551 pr_alert("%s" TORTURE_FLAG
1552 "rcu_torture_onoff task: onlined %d\n", 1552 "rcu_torture_onoff task: onlined %d\n",
1553 torture_type, cpu); 1553 torture_type, cpu);
1554 n_online_successes++; 1554 n_online_successes++;
1555 delta = jiffies - starttime; 1555 delta = jiffies - starttime;
1556 sum_online += delta; 1556 sum_online += delta;
@@ -1626,14 +1626,14 @@ static int __cpuinit rcu_torture_stall(void *args)
1626 if (!kthread_should_stop()) { 1626 if (!kthread_should_stop()) {
1627 stop_at = get_seconds() + stall_cpu; 1627 stop_at = get_seconds() + stall_cpu;
1628 /* RCU CPU stall is expected behavior in following code. */ 1628 /* RCU CPU stall is expected behavior in following code. */
1629 printk(KERN_ALERT "rcu_torture_stall start.\n"); 1629 pr_alert("rcu_torture_stall start.\n");
1630 rcu_read_lock(); 1630 rcu_read_lock();
1631 preempt_disable(); 1631 preempt_disable();
1632 while (ULONG_CMP_LT(get_seconds(), stop_at)) 1632 while (ULONG_CMP_LT(get_seconds(), stop_at))
1633 continue; /* Induce RCU CPU stall warning. */ 1633 continue; /* Induce RCU CPU stall warning. */
1634 preempt_enable(); 1634 preempt_enable();
1635 rcu_read_unlock(); 1635 rcu_read_unlock();
1636 printk(KERN_ALERT "rcu_torture_stall end.\n"); 1636 pr_alert("rcu_torture_stall end.\n");
1637 } 1637 }
1638 rcutorture_shutdown_absorb("rcu_torture_stall"); 1638 rcutorture_shutdown_absorb("rcu_torture_stall");
1639 while (!kthread_should_stop()) 1639 while (!kthread_should_stop())
@@ -1749,12 +1749,12 @@ static int rcu_torture_barrier_init(void)
1749 if (n_barrier_cbs == 0) 1749 if (n_barrier_cbs == 0)
1750 return 0; 1750 return 0;
1751 if (cur_ops->call == NULL || cur_ops->cb_barrier == NULL) { 1751 if (cur_ops->call == NULL || cur_ops->cb_barrier == NULL) {
1752 printk(KERN_ALERT "%s" TORTURE_FLAG 1752 pr_alert("%s" TORTURE_FLAG
1753 " Call or barrier ops missing for %s,\n", 1753 " Call or barrier ops missing for %s,\n",
1754 torture_type, cur_ops->name); 1754 torture_type, cur_ops->name);
1755 printk(KERN_ALERT "%s" TORTURE_FLAG 1755 pr_alert("%s" TORTURE_FLAG
1756 " RCU barrier testing omitted from run.\n", 1756 " RCU barrier testing omitted from run.\n",
1757 torture_type); 1757 torture_type);
1758 return 0; 1758 return 0;
1759 } 1759 }
1760 atomic_set(&barrier_cbs_count, 0); 1760 atomic_set(&barrier_cbs_count, 0);
@@ -1847,7 +1847,7 @@ rcu_torture_cleanup(void)
1847 mutex_lock(&fullstop_mutex); 1847 mutex_lock(&fullstop_mutex);
1848 rcutorture_record_test_transition(); 1848 rcutorture_record_test_transition();
1849 if (fullstop == FULLSTOP_SHUTDOWN) { 1849 if (fullstop == FULLSTOP_SHUTDOWN) {
1850 printk(KERN_WARNING /* but going down anyway, so... */ 1850 pr_warn(/* but going down anyway, so... */
1851 "Concurrent 'rmmod rcutorture' and shutdown illegal!\n"); 1851 "Concurrent 'rmmod rcutorture' and shutdown illegal!\n");
1852 mutex_unlock(&fullstop_mutex); 1852 mutex_unlock(&fullstop_mutex);
1853 schedule_timeout_uninterruptible(10); 1853 schedule_timeout_uninterruptible(10);
@@ -1971,17 +1971,17 @@ rcu_torture_init(void)
1971 break; 1971 break;
1972 } 1972 }
1973 if (i == ARRAY_SIZE(torture_ops)) { 1973 if (i == ARRAY_SIZE(torture_ops)) {
1974 printk(KERN_ALERT "rcu-torture: invalid torture type: \"%s\"\n", 1974 pr_alert("rcu-torture: invalid torture type: \"%s\"\n",
1975 torture_type); 1975 torture_type);
1976 printk(KERN_ALERT "rcu-torture types:"); 1976 pr_alert("rcu-torture types:");
1977 for (i = 0; i < ARRAY_SIZE(torture_ops); i++) 1977 for (i = 0; i < ARRAY_SIZE(torture_ops); i++)
1978 printk(KERN_ALERT " %s", torture_ops[i]->name); 1978 pr_alert(" %s", torture_ops[i]->name);
1979 printk(KERN_ALERT "\n"); 1979 pr_alert("\n");
1980 mutex_unlock(&fullstop_mutex); 1980 mutex_unlock(&fullstop_mutex);
1981 return -EINVAL; 1981 return -EINVAL;
1982 } 1982 }
1983 if (cur_ops->fqs == NULL && fqs_duration != 0) { 1983 if (cur_ops->fqs == NULL && fqs_duration != 0) {
1984 printk(KERN_ALERT "rcu-torture: ->fqs NULL and non-zero fqs_duration, fqs disabled.\n"); 1984 pr_alert("rcu-torture: ->fqs NULL and non-zero fqs_duration, fqs disabled.\n");
1985 fqs_duration = 0; 1985 fqs_duration = 0;
1986 } 1986 }
1987 if (cur_ops->init) 1987 if (cur_ops->init)