Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b24746c7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'core-fixes-for-linus' of...

Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rcu: Teach RCU that idle task is not quiscent state at boot
parents f41bf2ab a6826048
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -181,4 +181,10 @@ extern long rcu_batches_completed_bh(void);
#define rcu_enter_nohz()	do { } while (0)
#define rcu_exit_nohz()		do { } while (0)

/* A context switch is a grace period for rcuclassic. */
static inline int rcu_blocking_is_gp(void)
{
	return num_online_cpus() == 1;
}

#endif /* __LINUX_RCUCLASSIC_H */
+4 −0
Original line number Diff line number Diff line
@@ -52,6 +52,9 @@ struct rcu_head {
	void (*func)(struct rcu_head *head);
};

/* Internal to kernel, but needed by rcupreempt.h. */
extern int rcu_scheduler_active;

#if defined(CONFIG_CLASSIC_RCU)
#include <linux/rcuclassic.h>
#elif defined(CONFIG_TREE_RCU)
@@ -265,6 +268,7 @@ extern void rcu_barrier_sched(void);

/* Internal to kernel */
extern void rcu_init(void);
extern void rcu_scheduler_starting(void);
extern int rcu_needs_cpu(int cpu);

#endif /* __LINUX_RCUPDATE_H */
+15 −0
Original line number Diff line number Diff line
@@ -142,4 +142,19 @@ static inline void rcu_exit_nohz(void)
#define rcu_exit_nohz()		do { } while (0)
#endif /* CONFIG_NO_HZ */

/*
 * A context switch is a grace period for rcupreempt synchronize_rcu()
 * only during early boot, before the scheduler has been initialized.
 * So, how the heck do we get a context switch?  Well, if the caller
 * invokes synchronize_rcu(), they are willing to accept a context
 * switch, so we simply pretend that one happened.
 *
 * After boot, there might be a blocked or preempted task in an RCU
 * read-side critical section, so we cannot then take the fastpath.
 */
static inline int rcu_blocking_is_gp(void)
{
	return num_online_cpus() == 1 && !rcu_scheduler_active;
}

#endif /* __LINUX_RCUPREEMPT_H */
+6 −0
Original line number Diff line number Diff line
@@ -326,4 +326,10 @@ static inline void rcu_exit_nohz(void)
}
#endif /* CONFIG_NO_HZ */

/* A context switch is a grace period for rcutree. */
static inline int rcu_blocking_is_gp(void)
{
	return num_online_cpus() == 1;
}

#endif /* __LINUX_RCUTREE_H */
+2 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ static inline void mark_rodata_ro(void) { }
extern void tc_init(void);
#endif

enum system_states system_state;
enum system_states system_state __read_mostly;
EXPORT_SYMBOL(system_state);

/*
@@ -463,6 +463,7 @@ static noinline void __init_refok rest_init(void)
	 * at least once to get things moving:
	 */
	init_idle_bootup_task(current);
	rcu_scheduler_starting();
	preempt_enable_no_resched();
	schedule();
	preempt_disable();
Loading