summaryrefslogtreecommitdiffstats
path: root/rcu-fix-build-break.patch
blob: ecb6d96c984b8010479393a81573c2fbc52b01d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Subject: rcu: Fix build break
From: John Kacur <jkacur@redhat.com>
Date: Fri, 13 Apr 2012 12:54:21 +0200

A build break can occur with the following config options enabled

CONFIG_PREEMPT_RT_FULL
CONFIG_RCU_FAST_NO_HZ
CONFIG_RCU_CPU_STALL_INFO

This occurs because symbols in print_cpu_stall_fast_no_hz() such as
rcu_idle_gp_timer are not accessible with CONFIG_PREEMPT_RT_FULL
and results in the following type of build errors:

kernel/rcutree_plugin.h: In function ‘print_cpu_stall_fast_no_hz’:
kernel/rcutree_plugin.h:2195: error: ‘rcu_idle_gp_timer’ undeclared (first use in this function)

This patch fixes the build break by limiting the PREEMPT_RT_FULL
section to the function rcu_needs_cpu() instead of to the entire
!defined(CONFIG_RCU_FAST_NO_NZ) section as was intended in the
original "rcu: Make ksoftirqd do RCU quiescent states" patch.

Signed-off-by: John Kacur <jkacur@redhat.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1334314461-8937-1-git-send-email-jkacur@redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/rcutree_plugin.h |    5 +++++
 1 file changed, 5 insertions(+)

Index: linux-stable/kernel/rcutree_plugin.h
===================================================================
--- linux-stable.orig/kernel/rcutree_plugin.h
+++ linux-stable/kernel/rcutree_plugin.h
@@ -1743,6 +1743,9 @@ int rcu_needs_cpu(int cpu, unsigned long
 	*delta_jiffies = ULONG_MAX;
 	return rcu_cpu_has_callbacks(cpu);
 }
+#endif	/* !defined(CONFIG_RCU_FAST_NO_HZ) || defined(CONFIG_PREEMPT_RT_FULL) */
+
+#if !defined(CONFIG_RCU_FAST_NO_HZ)
 
 /*
  * Because we do not have RCU_FAST_NO_HZ, don't bother initializing for it.
@@ -1859,6 +1862,7 @@ static bool rcu_cpu_has_nonlazy_callback
 	       rcu_preempt_cpu_has_nonlazy_callbacks(cpu);
 }
 
+#ifndef CONFIG_PREEMPT_RT_FULL
 /*
  * Allow the CPU to enter dyntick-idle mode if either: (1) There are no
  * callbacks on this CPU, (2) this CPU has not yet attempted to enter
@@ -1902,6 +1906,7 @@ int rcu_needs_cpu(int cpu, unsigned long
 	}
 	return 0;
 }
+#endif	/* #ifndef CONFIG_PREEMPT_RT_FULL */
 
 /*
  * Handler for smp_call_function_single().  The only point of this