From: Jesse Gross Date: Sat, 4 Dec 2010 19:39:53 +0000 (-0800) Subject: datapath: Add usage of __percpu annotation. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3097efff7c612e25cbbcf4913c703a73b57e523;p=openvswitch datapath: Add usage of __percpu annotation. Sparse can warn if percpu pointers are incorrectly directly dereference. This adds the annotation where we declare percpu pointers. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- diff --git a/datapath/datapath.h b/datapath/datapath.h index c55e2059..66ade3e1 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -96,7 +96,7 @@ struct datapath { struct list_head port_list; /* Stats. */ - struct dp_stats_percpu *stats_percpu; + struct dp_stats_percpu __percpu *stats_percpu; /* sFlow Sampling */ unsigned int sflow_probability; diff --git a/datapath/vport.h b/datapath/vport.h index b98c461e..fb3a3e37 100644 --- a/datapath/vport.h +++ b/datapath/vport.h @@ -115,7 +115,7 @@ struct vport { struct hlist_node hash_node; const struct vport_ops *ops; - struct vport_percpu_stats *percpu_stats; + struct vport_percpu_stats __percpu *percpu_stats; spinlock_t stats_lock; struct vport_err_stats err_stats;