ia64/xen-unstable

annotate patches/linux-2.6.16.29/rcu_needs_cpu.patch @ 12273:b223ba940ed1

PV-on-HVM: Fix PV-on-HVM drivers need maddr.h included for defn of maddr_t.
Signed-off-by: Takanori Kasai <Kasai.Takanori@jp.fujitsu.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Tue Nov 07 09:29:53 2006 +0000 (2006-11-07)
parents 041be3f6b38e
children
rev   line source
Christian@11540 1 diff -pruN ../orig-linux-2.6.16.29/include/linux/rcupdate.h ./include/linux/rcupdate.h
Christian@11540 2 --- ../orig-linux-2.6.16.29/include/linux/rcupdate.h 2006-09-12 19:02:10.000000000 +0100
Christian@11540 3 +++ ./include/linux/rcupdate.h 2006-09-19 14:05:39.000000000 +0100
Christian@11540 4 @@ -134,6 +134,7 @@ static inline void rcu_bh_qsctr_inc(int
Christian@11540 5 }
Christian@11540 6
Christian@11540 7 extern int rcu_pending(int cpu);
Christian@11540 8 +extern int rcu_needs_cpu(int cpu);
Christian@11540 9
Christian@11540 10 /**
Christian@11540 11 * rcu_read_lock - mark the beginning of an RCU read-side critical section.
Christian@11540 12 diff -pruN ../orig-linux-2.6.16.29/kernel/rcupdate.c ./kernel/rcupdate.c
Christian@11540 13 --- ../orig-linux-2.6.16.29/kernel/rcupdate.c 2006-09-12 19:02:10.000000000 +0100
Christian@11540 14 +++ ./kernel/rcupdate.c 2006-09-19 14:05:39.000000000 +0100
kaf24@10365 15 @@ -485,6 +485,20 @@ int rcu_pending(int cpu)
kaf24@10365 16 __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
kaf24@10365 17 }
kaf24@10365 18
kaf24@10365 19 +/*
kaf24@10365 20 + * Check to see if any future RCU-related work will need to be done
kaf24@10365 21 + * by the current CPU, even if none need be done immediately, returning
kaf24@10365 22 + * 1 if so. This function is part of the RCU implementation; it is -not-
kaf24@10365 23 + * an exported member of the RCU API.
kaf24@10365 24 + */
kaf24@10365 25 +int rcu_needs_cpu(int cpu)
kaf24@10365 26 +{
kaf24@10365 27 + struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
kaf24@10365 28 + struct rcu_data *rdp_bh = &per_cpu(rcu_bh_data, cpu);
kaf24@10365 29 +
kaf24@10365 30 + return (!!rdp->curlist || !!rdp_bh->curlist || rcu_pending(cpu));
kaf24@10365 31 +}
kaf24@10365 32 +
kaf24@10365 33 void rcu_check_callbacks(int cpu, int user)
kaf24@10365 34 {
kaf24@10365 35 if (user ||