From: Jesse Gross Date: Thu, 13 May 2010 23:52:14 +0000 (-0700) Subject: datapath: Use per_cpu_ptr instead of percpu_ptr. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7183d1ecce62da62b31ea973c01fd77721f42c2c;p=openvswitch datapath: Use per_cpu_ptr instead of percpu_ptr. percpu_ptr was removed in 2.6.30, so update the one remaining user and take out the compatibility code. Suggested-by: Ben Pfaff --- diff --git a/datapath/datapath.c b/datapath/datapath.c index a083274b..1d007b04 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -1347,7 +1347,7 @@ static int get_dp_stats(struct datapath *dp, struct odp_stats __user *statsp) stats.n_frags = stats.n_hit = stats.n_missed = stats.n_lost = 0; for_each_possible_cpu(i) { const struct dp_stats_percpu *s; - s = percpu_ptr(dp->stats_percpu, i); + s = per_cpu_ptr(dp->stats_percpu, i); stats.n_frags += s->n_frags; stats.n_hit += s->n_hit; stats.n_missed += s->n_missed; diff --git a/datapath/linux-2.6/Modules.mk b/datapath/linux-2.6/Modules.mk index 75e885c1..c63e3eae 100644 --- a/datapath/linux-2.6/Modules.mk +++ b/datapath/linux-2.6/Modules.mk @@ -30,7 +30,6 @@ openvswitch_headers += \ linux-2.6/compat-2.6/include/linux/netfilter_bridge.h \ linux-2.6/compat-2.6/include/linux/netfilter_ipv4.h \ linux-2.6/compat-2.6/include/linux/netlink.h \ - linux-2.6/compat-2.6/include/linux/percpu.h \ linux-2.6/compat-2.6/include/linux/random.h \ linux-2.6/compat-2.6/include/linux/rculist.h \ linux-2.6/compat-2.6/include/linux/rtnetlink.h \ diff --git a/datapath/linux-2.6/compat-2.6/include/linux/percpu.h b/datapath/linux-2.6/compat-2.6/include/linux/percpu.h deleted file mode 100644 index 0f68bb25..00000000 --- a/datapath/linux-2.6/compat-2.6/include/linux/percpu.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __LINUX_PERCPU_H_WRAPPER -#define __LINUX_PERCPU_H_WRAPPER 1 - -#include_next - -#ifndef percpu_ptr -#define percpu_ptr per_cpu_ptr -#endif - -#endif /* linux/percpu.h wrapper */