direct-io.hg

view patches/linux-2.6.16.29/rcu_needs_cpu.patch @ 11750:d845c9522d9e

[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.

Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.

Signed-off-by: Wei Huang <wei.huang2@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Thu Oct 12 16:12:10 2006 +0100 (2006-10-12)
parents 041be3f6b38e
children
line source
1 diff -pruN ../orig-linux-2.6.16.29/include/linux/rcupdate.h ./include/linux/rcupdate.h
2 --- ../orig-linux-2.6.16.29/include/linux/rcupdate.h 2006-09-12 19:02:10.000000000 +0100
3 +++ ./include/linux/rcupdate.h 2006-09-19 14:05:39.000000000 +0100
4 @@ -134,6 +134,7 @@ static inline void rcu_bh_qsctr_inc(int
5 }
7 extern int rcu_pending(int cpu);
8 +extern int rcu_needs_cpu(int cpu);
10 /**
11 * rcu_read_lock - mark the beginning of an RCU read-side critical section.
12 diff -pruN ../orig-linux-2.6.16.29/kernel/rcupdate.c ./kernel/rcupdate.c
13 --- ../orig-linux-2.6.16.29/kernel/rcupdate.c 2006-09-12 19:02:10.000000000 +0100
14 +++ ./kernel/rcupdate.c 2006-09-19 14:05:39.000000000 +0100
15 @@ -485,6 +485,20 @@ int rcu_pending(int cpu)
16 __rcu_pending(&rcu_bh_ctrlblk, &per_cpu(rcu_bh_data, cpu));
17 }
19 +/*
20 + * Check to see if any future RCU-related work will need to be done
21 + * by the current CPU, even if none need be done immediately, returning
22 + * 1 if so. This function is part of the RCU implementation; it is -not-
23 + * an exported member of the RCU API.
24 + */
25 +int rcu_needs_cpu(int cpu)
26 +{
27 + struct rcu_data *rdp = &per_cpu(rcu_data, cpu);
28 + struct rcu_data *rdp_bh = &per_cpu(rcu_bh_data, cpu);
29 +
30 + return (!!rdp->curlist || !!rdp_bh->curlist || rcu_pending(cpu));
31 +}
32 +
33 void rcu_check_callbacks(int cpu, int user)
34 {
35 if (user ||