aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-powerpc/kexec.h3
-rw-r--r--include/asm-powerpc/rtas.h1
-rw-r--r--include/linux/debug_locks.h2
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/if_vlan.h5
-rw-r--r--include/linux/input.h24
-rw-r--r--include/linux/ioprio.h23
-rw-r--r--include/linux/kernel.h1
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/netdevice.h27
-rw-r--r--include/linux/sched.h8
-rw-r--r--include/linux/skbuff.h19
-rw-r--r--include/linux/vmstat.h8
-rw-r--r--include/media/v4l2-dev.h2
-rw-r--r--include/net/red.h2
15 files changed, 93 insertions, 35 deletions
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h
index 8f7fd5cfec34..11cbdf81fd2e 100644
--- a/include/asm-powerpc/kexec.h
+++ b/include/asm-powerpc/kexec.h
@@ -32,6 +32,7 @@
32#endif 32#endif
33 33
34#ifndef __ASSEMBLY__ 34#ifndef __ASSEMBLY__
35#include <linux/cpumask.h>
35 36
36#ifdef CONFIG_KEXEC 37#ifdef CONFIG_KEXEC
37 38
@@ -109,7 +110,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs,
109 110
110#define MAX_NOTE_BYTES 1024 111#define MAX_NOTE_BYTES 1024
111 112
112#ifdef __powerpc64__
113extern void kexec_smp_wait(void); /* get and clear naca physid, wait for 113extern void kexec_smp_wait(void); /* get and clear naca physid, wait for
114 master to copy new code to 0 */ 114 master to copy new code to 0 */
115extern int crashing_cpu; 115extern int crashing_cpu;
@@ -119,7 +119,6 @@ static inline int kexec_sr_activated(int cpu)
119{ 119{
120 return cpu_isset(cpu,cpus_in_sr); 120 return cpu_isset(cpu,cpus_in_sr);
121} 121}
122#endif /* __powerpc64 __ */
123 122
124struct kimage; 123struct kimage;
125struct pt_regs; 124struct pt_regs;
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h
index a33c6acffa61..82a27e9a041f 100644
--- a/include/asm-powerpc/rtas.h
+++ b/include/asm-powerpc/rtas.h
@@ -170,6 +170,7 @@ extern int rtas_get_sensor(int sensor, int index, int *state);
170extern int rtas_get_power_level(int powerdomain, int *level); 170extern int rtas_get_power_level(int powerdomain, int *level);
171extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); 171extern int rtas_set_power_level(int powerdomain, int level, int *setlevel);
172extern int rtas_set_indicator(int indicator, int index, int new_value); 172extern int rtas_set_indicator(int indicator, int index, int new_value);
173extern int rtas_set_indicator_fast(int indicator, int index, int new_value);
173extern void rtas_progress(char *s, unsigned short hex); 174extern void rtas_progress(char *s, unsigned short hex);
174extern void rtas_initialize(void); 175extern void rtas_initialize(void);
175 176
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h
index 6a7047851e48..88dafa246d87 100644
--- a/include/linux/debug_locks.h
+++ b/include/linux/debug_locks.h
@@ -1,6 +1,8 @@
1#ifndef __LINUX_DEBUG_LOCKING_H 1#ifndef __LINUX_DEBUG_LOCKING_H
2#define __LINUX_DEBUG_LOCKING_H 2#define __LINUX_DEBUG_LOCKING_H
3 3
4struct task_struct;
5
4extern int debug_locks; 6extern int debug_locks;
5extern int debug_locks_silent; 7extern int debug_locks_silent;
6 8
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 4ad0673b1995..2f335e966011 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1,7 +1,6 @@
1#ifndef _LINUX_FB_H 1#ifndef _LINUX_FB_H
2#define _LINUX_FB_H 2#define _LINUX_FB_H
3 3
4#include <linux/backlight.h>
5#include <asm/types.h> 4#include <asm/types.h>
6 5
7/* Definitions of frame buffers */ 6/* Definitions of frame buffers */
@@ -381,6 +380,7 @@ struct fb_cursor {
381#include <linux/workqueue.h> 380#include <linux/workqueue.h>
382#include <linux/notifier.h> 381#include <linux/notifier.h>
383#include <linux/list.h> 382#include <linux/list.h>
383#include <linux/backlight.h>
384#include <asm/io.h> 384#include <asm/io.h>
385 385
386struct vm_area_struct; 386struct vm_area_struct;
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 383627ad328f..ab2740832742 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -155,6 +155,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
155{ 155{
156 struct net_device_stats *stats; 156 struct net_device_stats *stats;
157 157
158 if (skb_bond_should_drop(skb)) {
159 dev_kfree_skb_any(skb);
160 return NET_RX_DROP;
161 }
162
158 skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; 163 skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK];
159 if (skb->dev == NULL) { 164 if (skb->dev == NULL) {
160 dev_kfree_skb_any(skb); 165 dev_kfree_skb_any(skb);
diff --git a/include/linux/input.h b/include/linux/input.h
index 56f1e0e1e598..b3253ab72ff7 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -893,7 +893,6 @@ struct input_dev {
893 893
894 int (*open)(struct input_dev *dev); 894 int (*open)(struct input_dev *dev);
895 void (*close)(struct input_dev *dev); 895 void (*close)(struct input_dev *dev);
896 int (*accept)(struct input_dev *dev, struct file *file);
897 int (*flush)(struct input_dev *dev, struct file *file); 896 int (*flush)(struct input_dev *dev, struct file *file);
898 int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); 897 int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
899 int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); 898 int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect);
@@ -961,6 +960,26 @@ struct input_dev {
961 960
962struct input_handle; 961struct input_handle;
963 962
963/**
964 * struct input_handler - implements one of interfaces for input devices
965 * @private: driver-specific data
966 * @event: event handler
967 * @connect: called when attaching a handler to an input device
968 * @disconnect: disconnects a handler from input device
969 * @start: starts handler for given handle. This function is called by
970 * input core right after connect() method and also when a process
971 * that "grabbed" a device releases it
972 * @fops: file operations this driver implements
973 * @minor: beginning of range of 32 minors for devices this driver
974 * can provide
975 * @name: name of the handler, to be shown in /proc/bus/input/handlers
976 * @id_table: pointer to a table of input_device_ids this driver can
977 * handle
978 * @blacklist: prointer to a table of input_device_ids this driver should
979 * ignore even if they match @id_table
980 * @h_list: list of input handles associated with the handler
981 * @node: for placing the driver onto input_handler_list
982 */
964struct input_handler { 983struct input_handler {
965 984
966 void *private; 985 void *private;
@@ -968,6 +987,7 @@ struct input_handler {
968 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 987 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
969 struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); 988 struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id);
970 void (*disconnect)(struct input_handle *handle); 989 void (*disconnect)(struct input_handle *handle);
990 void (*start)(struct input_handle *handle);
971 991
972 const struct file_operations *fops; 992 const struct file_operations *fops;
973 int minor; 993 int minor;
@@ -1030,10 +1050,10 @@ void input_release_device(struct input_handle *);
1030int input_open_device(struct input_handle *); 1050int input_open_device(struct input_handle *);
1031void input_close_device(struct input_handle *); 1051void input_close_device(struct input_handle *);
1032 1052
1033int input_accept_process(struct input_handle *handle, struct file *file);
1034int input_flush_device(struct input_handle* handle, struct file* file); 1053int input_flush_device(struct input_handle* handle, struct file* file);
1035 1054
1036void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); 1055void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
1056void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
1037 1057
1038static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) 1058static inline void input_report_key(struct input_dev *dev, unsigned int code, int value)
1039{ 1059{
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 88d5961f7a3f..8e2042b9d471 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -59,27 +59,6 @@ static inline int task_nice_ioprio(struct task_struct *task)
59/* 59/*
60 * For inheritance, return the highest of the two given priorities 60 * For inheritance, return the highest of the two given priorities
61 */ 61 */
62static inline int ioprio_best(unsigned short aprio, unsigned short bprio) 62extern int ioprio_best(unsigned short aprio, unsigned short bprio);
63{
64 unsigned short aclass = IOPRIO_PRIO_CLASS(aprio);
65 unsigned short bclass = IOPRIO_PRIO_CLASS(bprio);
66
67 if (!ioprio_valid(aprio))
68 return bprio;
69 if (!ioprio_valid(bprio))
70 return aprio;
71
72 if (aclass == IOPRIO_CLASS_NONE)
73 aclass = IOPRIO_CLASS_BE;
74 if (bclass == IOPRIO_CLASS_NONE)
75 bclass = IOPRIO_CLASS_BE;
76
77 if (aclass == bclass)
78 return min(aprio, bprio);
79 if (aclass > bclass)
80 return bprio;
81 else
82 return aprio;
83}
84 63
85#endif 64#endif
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 181c69cad4e3..851aa1bcfc1a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -210,6 +210,7 @@ extern enum system_states {
210extern void dump_stack(void); 210extern void dump_stack(void);
211 211
212#ifdef DEBUG 212#ifdef DEBUG
213/* If you are writing a driver, please use dev_dbg instead */
213#define pr_debug(fmt,arg...) \ 214#define pr_debug(fmt,arg...) \
214 printk(KERN_DEBUG fmt,##arg) 215 printk(KERN_DEBUG fmt,##arg)
215#else 216#else
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 990957e0929f..f0b135cd86da 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -336,6 +336,7 @@ static inline void init_page_count(struct page *page)
336} 336}
337 337
338void put_page(struct page *page); 338void put_page(struct page *page);
339void put_pages_list(struct list_head *pages);
339 340
340void split_page(struct page *page, unsigned int order); 341void split_page(struct page *page, unsigned int order);
341 342
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 75f02d8c6ed3..50a4719512ed 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -320,6 +320,9 @@ struct net_device
320#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) 320#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
321#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) 321#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
322 322
323 /* List of features with software fallbacks. */
324#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
325
323#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) 326#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
324#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) 327#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
325 328
@@ -1012,6 +1015,30 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
1012 unlikely(skb->ip_summed != CHECKSUM_HW)); 1015 unlikely(skb->ip_summed != CHECKSUM_HW));
1013} 1016}
1014 1017
1018/* On bonding slaves other than the currently active slave, suppress
1019 * duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast.
1020 */
1021static inline int skb_bond_should_drop(struct sk_buff *skb)
1022{
1023 struct net_device *dev = skb->dev;
1024 struct net_device *master = dev->master;
1025
1026 if (master &&
1027 (dev->priv_flags & IFF_SLAVE_INACTIVE)) {
1028 if (master->priv_flags & IFF_MASTER_ALB) {
1029 if (skb->pkt_type != PACKET_BROADCAST &&
1030 skb->pkt_type != PACKET_MULTICAST)
1031 return 0;
1032 }
1033 if (master->priv_flags & IFF_MASTER_8023AD &&
1034 skb->protocol == __constant_htons(ETH_P_SLOW))
1035 return 0;
1036
1037 return 1;
1038 }
1039 return 0;
1040}
1041
1015#endif /* __KERNEL__ */ 1042#endif /* __KERNEL__ */
1016 1043
1017#endif /* _LINUX_DEV_H */ 1044#endif /* _LINUX_DEV_H */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 6afa72e080cb..6674fc1e51bf 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1558,6 +1558,14 @@ static inline void freeze(struct task_struct *p)
1558} 1558}
1559 1559
1560/* 1560/*
1561 * Sometimes we may need to cancel the previous 'freeze' request
1562 */
1563static inline void do_not_freeze(struct task_struct *p)
1564{
1565 p->flags &= ~PF_FREEZE;
1566}
1567
1568/*
1561 * Wake up a frozen process 1569 * Wake up a frozen process
1562 */ 1570 */
1563static inline int thaw_process(struct task_struct *p) 1571static inline int thaw_process(struct task_struct *p)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 19c96d498e20..755e9cddac47 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1040,6 +1040,21 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len)
1040} 1040}
1041 1041
1042/** 1042/**
1043 * pskb_trim_unique - remove end from a paged unique (not cloned) buffer
1044 * @skb: buffer to alter
1045 * @len: new length
1046 *
1047 * This is identical to pskb_trim except that the caller knows that
1048 * the skb is not cloned so we should never get an error due to out-
1049 * of-memory.
1050 */
1051static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
1052{
1053 int err = pskb_trim(skb, len);
1054 BUG_ON(err);
1055}
1056
1057/**
1043 * skb_orphan - orphan a buffer 1058 * skb_orphan - orphan a buffer
1044 * @skb: buffer to orphan 1059 * @skb: buffer to orphan
1045 * 1060 *
@@ -1081,7 +1096,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
1081 * the headroom they think they need without accounting for the 1096 * the headroom they think they need without accounting for the
1082 * built in space. The built in space is used for optimisations. 1097 * built in space. The built in space is used for optimisations.
1083 * 1098 *
1084 * %NULL is returned in there is no free memory. 1099 * %NULL is returned if there is no free memory.
1085 */ 1100 */
1086static inline struct sk_buff *__dev_alloc_skb(unsigned int length, 1101static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1087 gfp_t gfp_mask) 1102 gfp_t gfp_mask)
@@ -1101,7 +1116,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1101 * the headroom they think they need without accounting for the 1116 * the headroom they think they need without accounting for the
1102 * built in space. The built in space is used for optimisations. 1117 * built in space. The built in space is used for optimisations.
1103 * 1118 *
1104 * %NULL is returned in there is no free memory. Although this function 1119 * %NULL is returned if there is no free memory. Although this function
1105 * allocates memory it can be called from an interrupt. 1120 * allocates memory it can be called from an interrupt.
1106 */ 1121 */
1107static inline struct sk_buff *dev_alloc_skb(unsigned int length) 1122static inline struct sk_buff *dev_alloc_skb(unsigned int length)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 1ab806c47514..2d9b1b60798a 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -41,23 +41,23 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states);
41 41
42static inline void __count_vm_event(enum vm_event_item item) 42static inline void __count_vm_event(enum vm_event_item item)
43{ 43{
44 __get_cpu_var(vm_event_states.event[item])++; 44 __get_cpu_var(vm_event_states).event[item]++;
45} 45}
46 46
47static inline void count_vm_event(enum vm_event_item item) 47static inline void count_vm_event(enum vm_event_item item)
48{ 48{
49 get_cpu_var(vm_event_states.event[item])++; 49 get_cpu_var(vm_event_states).event[item]++;
50 put_cpu(); 50 put_cpu();
51} 51}
52 52
53static inline void __count_vm_events(enum vm_event_item item, long delta) 53static inline void __count_vm_events(enum vm_event_item item, long delta)
54{ 54{
55 __get_cpu_var(vm_event_states.event[item]) += delta; 55 __get_cpu_var(vm_event_states).event[item] += delta;
56} 56}
57 57
58static inline void count_vm_events(enum vm_event_item item, long delta) 58static inline void count_vm_events(enum vm_event_item item, long delta)
59{ 59{
60 get_cpu_var(vm_event_states.event[item]) += delta; 60 get_cpu_var(vm_event_states).event[item] += delta;
61 put_cpu(); 61 put_cpu();
62} 62}
63 63
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
index f8665326ed9f..600d61d7d2ab 100644
--- a/include/media/v4l2-dev.h
+++ b/include/media/v4l2-dev.h
@@ -16,7 +16,7 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/mutex.h> 17#include <linux/mutex.h>
18#include <linux/compiler.h> /* need __user */ 18#include <linux/compiler.h> /* need __user */
19#ifdef CONFIG_VIDEO_V4L1 19#ifdef CONFIG_VIDEO_V4L1_COMPAT
20#include <linux/videodev.h> 20#include <linux/videodev.h>
21#else 21#else
22#include <linux/videodev2.h> 22#include <linux/videodev2.h>
diff --git a/include/net/red.h b/include/net/red.h
index 5ccdbb3d4722..a4eb37946f2c 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -212,7 +212,7 @@ static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p)
212 * Seems, it is the best solution to 212 * Seems, it is the best solution to
213 * problem of too coarse exponent tabulation. 213 * problem of too coarse exponent tabulation.
214 */ 214 */
215 us_idle = (p->qavg * us_idle) >> p->Scell_log; 215 us_idle = (p->qavg * (u64)us_idle) >> p->Scell_log;
216 216
217 if (us_idle < (p->qavg >> 1)) 217 if (us_idle < (p->qavg >> 1))
218 return p->qavg - us_idle; 218 return p->qavg - us_idle;