From 7183d1ecce62da62b31ea973c01fd77721f42c2c Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 13 May 2010 16:52:14 -0700 Subject: [PATCH] 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 --- datapath/datapath.c | 2 +- datapath/linux-2.6/Modules.mk | 1 - datapath/linux-2.6/compat-2.6/include/linux/percpu.h | 10 ---------- 3 files changed, 1 insertion(+), 12 deletions(-) delete mode 100644 datapath/linux-2.6/compat-2.6/include/linux/percpu.h diff --git a/datapath/datapath.c b/datapath/datapath.c index a083274b5..1d007b04b 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 75e885c19..c63e3eaef 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 0f68bb253..000000000 --- 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 */ -- 2.43.0