From: John Kacur <jkacur@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
rt-users <linux-rt-users@vger.kernel.org>,
John Kacur <jkacur@redhat.com>
Subject: [PATCH RT] rcu: Fix build break
Date: Fri, 13 Apr 2012 12:54:21 +0200 [thread overview]
Message-ID: <1334314461-8937-1-git-send-email-jkacur@redhat.com> (raw)
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
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>
---
kernel/rcutree_plugin.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 14acafc..2844d7d 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1914,6 +1914,9 @@ int rcu_needs_cpu(int cpu)
{
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.
@@ -1984,6 +1987,7 @@ static DEFINE_PER_CPU(struct hrtimer, rcu_idle_gp_timer);
static ktime_t rcu_idle_gp_wait; /* If some non-lazy callbacks. */
static ktime_t rcu_idle_lazy_gp_wait; /* If only lazy callbacks. */
+#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
@@ -2001,6 +2005,7 @@ int rcu_needs_cpu(int cpu)
/* Otherwise, RCU needs the CPU only if it recently tried and failed. */
return per_cpu(rcu_dyntick_holdoff, cpu) == jiffies;
}
+#endif /* #ifndef CONFIG_PREEMPT_RT_FULL */
/*
* Does the specified flavor of RCU have non-lazy callbacks pending on
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2012-04-13 10:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334314461-8937-1-git-send-email-jkacur@redhat.com \
--to=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).