datapath: Use per_cpu_ptr instead of percpu_ptr.
authorJesse Gross <jesse@nicira.com>
Thu, 13 May 2010 23:52:14 +0000 (16:52 -0700)
committerJesse Gross <jesse@nicira.com>
Fri, 14 May 2010 22:10:45 +0000 (15:10 -0700)
percpu_ptr was removed in 2.6.30, so update the one remaining user
and take out the compatibility code.

Suggested-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c
datapath/linux-2.6/Modules.mk
datapath/linux-2.6/compat-2.6/include/linux/percpu.h [deleted file]

index a083274..1d007b0 100644 (file)
@@ -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;
index 75e885c..c63e3ea 100644 (file)
@@ -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 (file)
index 0f68bb2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __LINUX_PERCPU_H_WRAPPER
-#define __LINUX_PERCPU_H_WRAPPER 1
-
-#include_next <linux/percpu.h>
-
-#ifndef percpu_ptr
-#define percpu_ptr per_cpu_ptr
-#endif
-
-#endif /* linux/percpu.h wrapper */