diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-17 09:16:46 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-17 09:16:46 -0500 |
commit | 275c8b93288ef0c2281e414e069ea8ed4bad03f7 (patch) | |
tree | df906ef901d7719d66944921c7436f5db718dc2f /include | |
parent | 909ea96468096b07fbb41aaf69be060d92bd9271 (diff) | |
parent | 8f1d97c79eb65de1d05799d6b81d79cd94169114 (diff) |
Merge branch 'this_cpu_ops' into for-2.6.38
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/video.h | 5 | ||||
-rw-r--r-- | include/drm/i915_drm.h | 2 | ||||
-rw-r--r-- | include/linux/acpi.h | 2 | ||||
-rw-r--r-- | include/linux/atmdev.h | 6 | ||||
-rw-r--r-- | include/linux/fanotify.h | 10 | ||||
-rw-r--r-- | include/linux/fs.h | 1 | ||||
-rw-r--r-- | include/linux/fsnotify.h | 3 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 2 | ||||
-rw-r--r-- | include/linux/gpio_keys.h | 2 | ||||
-rw-r--r-- | include/linux/input.h | 31 | ||||
-rw-r--r-- | include/linux/mfd/wm8994/pdata.h | 2 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 1 | ||||
-rw-r--r-- | include/linux/nfs_page.h | 1 | ||||
-rw-r--r-- | include/linux/percpu.h | 71 | ||||
-rw-r--r-- | include/linux/snmp.h | 1 | ||||
-rw-r--r-- | include/linux/ssb/ssb_driver_gige.h | 17 | ||||
-rw-r--r-- | include/linux/video_output.h | 15 | ||||
-rw-r--r-- | include/net/sock.h | 4 | ||||
-rw-r--r-- | include/xen/interface/io/ring.h | 11 |
19 files changed, 163 insertions, 24 deletions
diff --git a/include/acpi/video.h b/include/acpi/video.h index 551793c9b6e..0e98e679d3a 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef __ACPI_VIDEO_H | 1 | #ifndef __ACPI_VIDEO_H |
2 | #define __ACPI_VIDEO_H | 2 | #define __ACPI_VIDEO_H |
3 | 3 | ||
4 | #include <linux/errno.h> /* for ENODEV */ | ||
5 | |||
6 | struct acpi_device; | ||
7 | |||
4 | #define ACPI_VIDEO_DISPLAY_CRT 1 | 8 | #define ACPI_VIDEO_DISPLAY_CRT 1 |
5 | #define ACPI_VIDEO_DISPLAY_TV 2 | 9 | #define ACPI_VIDEO_DISPLAY_TV 2 |
6 | #define ACPI_VIDEO_DISPLAY_DVI 3 | 10 | #define ACPI_VIDEO_DISPLAY_DVI 3 |
@@ -26,4 +30,3 @@ static inline int acpi_video_get_edid(struct acpi_device *device, int type, | |||
26 | #endif | 30 | #endif |
27 | 31 | ||
28 | #endif | 32 | #endif |
29 | |||
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 8c641bed9bb..a2776e2807a 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -287,6 +287,8 @@ typedef struct drm_i915_irq_wait { | |||
287 | #define I915_PARAM_HAS_EXECBUF2 9 | 287 | #define I915_PARAM_HAS_EXECBUF2 9 |
288 | #define I915_PARAM_HAS_BSD 10 | 288 | #define I915_PARAM_HAS_BSD 10 |
289 | #define I915_PARAM_HAS_BLT 11 | 289 | #define I915_PARAM_HAS_BLT 11 |
290 | #define I915_PARAM_HAS_RELAXED_FENCING 12 | ||
291 | #define I915_PARAM_HAS_COHERENT_RINGS 13 | ||
290 | 292 | ||
291 | typedef struct drm_i915_getparam { | 293 | typedef struct drm_i915_getparam { |
292 | int param; | 294 | int param; |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 050a7bccb83..67c91b4418b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -219,7 +219,7 @@ static inline int acpi_video_display_switch_support(void) | |||
219 | 219 | ||
220 | extern int acpi_blacklisted(void); | 220 | extern int acpi_blacklisted(void); |
221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 221 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
222 | extern int acpi_osi_setup(char *str); | 222 | extern void acpi_osi_setup(char *str); |
223 | 223 | ||
224 | #ifdef CONFIG_ACPI_NUMA | 224 | #ifdef CONFIG_ACPI_NUMA |
225 | int acpi_get_pxm(acpi_handle handle); | 225 | int acpi_get_pxm(acpi_handle handle); |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index a8e4e832cdb..475f8c42c0e 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -427,8 +427,10 @@ extern rwlock_t vcc_sklist_lock; | |||
427 | 427 | ||
428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) | 428 | #define ATM_SKB(skb) (((struct atm_skb_data *) (skb)->cb)) |
429 | 429 | ||
430 | struct atm_dev *atm_dev_register(const char *type,const struct atmdev_ops *ops, | 430 | struct atm_dev *atm_dev_register(const char *type, struct device *parent, |
431 | int number,unsigned long *flags); /* number == -1: pick first available */ | 431 | const struct atmdev_ops *ops, |
432 | int number, /* -1 == pick first available */ | ||
433 | unsigned long *flags); | ||
432 | struct atm_dev *atm_dev_lookup(int number); | 434 | struct atm_dev *atm_dev_lookup(int number); |
433 | void atm_dev_deregister(struct atm_dev *dev); | 435 | void atm_dev_deregister(struct atm_dev *dev); |
434 | 436 | ||
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h index 0f0121467fc..6c6133f76e1 100644 --- a/include/linux/fanotify.h +++ b/include/linux/fanotify.h | |||
@@ -83,11 +83,13 @@ | |||
83 | FAN_ALL_PERM_EVENTS |\ | 83 | FAN_ALL_PERM_EVENTS |\ |
84 | FAN_Q_OVERFLOW) | 84 | FAN_Q_OVERFLOW) |
85 | 85 | ||
86 | #define FANOTIFY_METADATA_VERSION 2 | 86 | #define FANOTIFY_METADATA_VERSION 3 |
87 | 87 | ||
88 | struct fanotify_event_metadata { | 88 | struct fanotify_event_metadata { |
89 | __u32 event_len; | 89 | __u32 event_len; |
90 | __u32 vers; | 90 | __u8 vers; |
91 | __u8 reserved; | ||
92 | __u16 metadata_len; | ||
91 | __aligned_u64 mask; | 93 | __aligned_u64 mask; |
92 | __s32 fd; | 94 | __s32 fd; |
93 | __s32 pid; | 95 | __s32 pid; |
@@ -96,11 +98,13 @@ struct fanotify_event_metadata { | |||
96 | struct fanotify_response { | 98 | struct fanotify_response { |
97 | __s32 fd; | 99 | __s32 fd; |
98 | __u32 response; | 100 | __u32 response; |
99 | } __attribute__ ((packed)); | 101 | }; |
100 | 102 | ||
101 | /* Legit userspace responses to a _PERM event */ | 103 | /* Legit userspace responses to a _PERM event */ |
102 | #define FAN_ALLOW 0x01 | 104 | #define FAN_ALLOW 0x01 |
103 | #define FAN_DENY 0x02 | 105 | #define FAN_DENY 0x02 |
106 | /* No fd set in event */ | ||
107 | #define FAN_NOFD -1 | ||
104 | 108 | ||
105 | /* Helper functions to deal with fanotify_event_metadata buffers */ | 109 | /* Helper functions to deal with fanotify_event_metadata buffers */ |
106 | #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) | 110 | #define FAN_EVENT_METADATA_LEN (sizeof(struct fanotify_event_metadata)) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index c9e06cc70da..090f0eacde2 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -602,6 +602,7 @@ struct address_space_operations { | |||
602 | sector_t (*bmap)(struct address_space *, sector_t); | 602 | sector_t (*bmap)(struct address_space *, sector_t); |
603 | void (*invalidatepage) (struct page *, unsigned long); | 603 | void (*invalidatepage) (struct page *, unsigned long); |
604 | int (*releasepage) (struct page *, gfp_t); | 604 | int (*releasepage) (struct page *, gfp_t); |
605 | void (*freepage)(struct page *); | ||
605 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 606 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, |
606 | loff_t offset, unsigned long nr_segs); | 607 | loff_t offset, unsigned long nr_segs); |
607 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, | 608 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 5c185fa2708..b10bcdeaef7 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -235,9 +235,6 @@ static inline void fsnotify_open(struct file *file) | |||
235 | if (S_ISDIR(inode->i_mode)) | 235 | if (S_ISDIR(inode->i_mode)) |
236 | mask |= FS_ISDIR; | 236 | mask |= FS_ISDIR; |
237 | 237 | ||
238 | /* FMODE_NONOTIFY must never be set from user */ | ||
239 | file->f_mode &= ~FMODE_NONOTIFY; | ||
240 | |||
241 | fsnotify_parent(path, NULL, mask); | 238 | fsnotify_parent(path, NULL, mask); |
242 | fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); | 239 | fsnotify(inode, mask, path, FSNOTIFY_EVENT_PATH, NULL, 0); |
243 | } | 240 | } |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 0a68f924f06..7380763595d 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -166,7 +166,7 @@ struct fsnotify_group { | |||
166 | struct mutex access_mutex; | 166 | struct mutex access_mutex; |
167 | struct list_head access_list; | 167 | struct list_head access_list; |
168 | wait_queue_head_t access_waitq; | 168 | wait_queue_head_t access_waitq; |
169 | bool bypass_perm; /* protected by access_mutex */ | 169 | atomic_t bypass_perm; |
170 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ | 170 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ |
171 | int f_flags; | 171 | int f_flags; |
172 | unsigned int max_marks; | 172 | unsigned int max_marks; |
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index ce73a30113b..dd1a56fbe92 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h | |||
@@ -16,6 +16,8 @@ struct gpio_keys_button { | |||
16 | struct gpio_keys_platform_data { | 16 | struct gpio_keys_platform_data { |
17 | struct gpio_keys_button *buttons; | 17 | struct gpio_keys_button *buttons; |
18 | int nbuttons; | 18 | int nbuttons; |
19 | unsigned int poll_interval; /* polling interval in msecs - | ||
20 | for polling driver only */ | ||
19 | unsigned int rep:1; /* enable input subsystem auto repeat */ | 21 | unsigned int rep:1; /* enable input subsystem auto repeat */ |
20 | int (*enable)(struct device *dev); | 22 | int (*enable)(struct device *dev); |
21 | void (*disable)(struct device *dev); | 23 | void (*disable)(struct device *dev); |
diff --git a/include/linux/input.h b/include/linux/input.h index 6ef44465db8..9777668883b 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -47,6 +47,25 @@ struct input_id { | |||
47 | __u16 version; | 47 | __u16 version; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | /** | ||
51 | * struct input_absinfo - used by EVIOCGABS/EVIOCSABS ioctls | ||
52 | * @value: latest reported value for the axis. | ||
53 | * @minimum: specifies minimum value for the axis. | ||
54 | * @maximum: specifies maximum value for the axis. | ||
55 | * @fuzz: specifies fuzz value that is used to filter noise from | ||
56 | * the event stream. | ||
57 | * @flat: values that are within this value will be discarded by | ||
58 | * joydev interface and reported as 0 instead. | ||
59 | * @resolution: specifies resolution for the values reported for | ||
60 | * the axis. | ||
61 | * | ||
62 | * Note that input core does not clamp reported values to the | ||
63 | * [minimum, maximum] limits, such task is left to userspace. | ||
64 | * | ||
65 | * Resolution for main axes (ABS_X, ABS_Y, ABS_Z) is reported in | ||
66 | * units per millimeter (units/mm), resolution for rotational axes | ||
67 | * (ABS_RX, ABS_RY, ABS_RZ) is reported in units per radian. | ||
68 | */ | ||
50 | struct input_absinfo { | 69 | struct input_absinfo { |
51 | __s32 value; | 70 | __s32 value; |
52 | __s32 minimum; | 71 | __s32 minimum; |
@@ -85,8 +104,10 @@ struct input_keymap_entry { | |||
85 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 104 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
86 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ | 105 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
87 | 106 | ||
88 | #define EVIOCGKEYCODE _IOR('E', 0x04, struct input_keymap_entry) /* get keycode */ | 107 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ |
89 | #define EVIOCSKEYCODE _IOW('E', 0x04, struct input_keymap_entry) /* set keycode */ | 108 | #define EVIOCGKEYCODE_V2 _IOR('E', 0x04, struct input_keymap_entry) |
109 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ | ||
110 | #define EVIOCSKEYCODE_V2 _IOW('E', 0x04, struct input_keymap_entry) | ||
90 | 111 | ||
91 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 112 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
92 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 113 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
@@ -624,6 +645,10 @@ struct input_keymap_entry { | |||
624 | #define KEY_CAMERA_FOCUS 0x210 | 645 | #define KEY_CAMERA_FOCUS 0x210 |
625 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ | 646 | #define KEY_WPS_BUTTON 0x211 /* WiFi Protected Setup key */ |
626 | 647 | ||
648 | #define KEY_TOUCHPAD_TOGGLE 0x212 /* Request switch touchpad on or off */ | ||
649 | #define KEY_TOUCHPAD_ON 0x213 | ||
650 | #define KEY_TOUCHPAD_OFF 0x214 | ||
651 | |||
627 | #define BTN_TRIGGER_HAPPY 0x2c0 | 652 | #define BTN_TRIGGER_HAPPY 0x2c0 |
628 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 653 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
629 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 654 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
@@ -1130,7 +1155,7 @@ struct input_mt_slot { | |||
1130 | * of tracked contacts | 1155 | * of tracked contacts |
1131 | * @mtsize: number of MT slots the device uses | 1156 | * @mtsize: number of MT slots the device uses |
1132 | * @slot: MT slot currently being transmitted | 1157 | * @slot: MT slot currently being transmitted |
1133 | * @absinfo: array of &struct absinfo elements holding information | 1158 | * @absinfo: array of &struct input_absinfo elements holding information |
1134 | * about absolute axes (current value, min, max, flat, fuzz, | 1159 | * about absolute axes (current value, min, max, flat, fuzz, |
1135 | * resolution) | 1160 | * resolution) |
1136 | * @key: reflects current state of device's keys/buttons | 1161 | * @key: reflects current state of device's keys/buttons |
diff --git a/include/linux/mfd/wm8994/pdata.h b/include/linux/mfd/wm8994/pdata.h index 5c51f367c06..add8a1b8bcf 100644 --- a/include/linux/mfd/wm8994/pdata.h +++ b/include/linux/mfd/wm8994/pdata.h | |||
@@ -29,7 +29,7 @@ struct wm8994_ldo_pdata { | |||
29 | #define WM8994_CONFIGURE_GPIO 0x8000 | 29 | #define WM8994_CONFIGURE_GPIO 0x8000 |
30 | 30 | ||
31 | #define WM8994_DRC_REGS 5 | 31 | #define WM8994_DRC_REGS 5 |
32 | #define WM8994_EQ_REGS 19 | 32 | #define WM8994_EQ_REGS 20 |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * DRC configurations are specified with a label and a set of register | 35 | * DRC configurations are specified with a label and a set of register |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c66fdb7d699..29d504d5d1c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -401,6 +401,7 @@ extern const struct inode_operations nfs3_file_inode_operations; | |||
401 | #endif /* CONFIG_NFS_V3 */ | 401 | #endif /* CONFIG_NFS_V3 */ |
402 | extern const struct file_operations nfs_file_operations; | 402 | extern const struct file_operations nfs_file_operations; |
403 | extern const struct address_space_operations nfs_file_aops; | 403 | extern const struct address_space_operations nfs_file_aops; |
404 | extern const struct address_space_operations nfs_dir_aops; | ||
404 | 405 | ||
405 | static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) | 406 | static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) |
406 | { | 407 | { |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index f8b60e7f4c4..d55cee73f63 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -29,6 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | enum { | 30 | enum { |
31 | PG_BUSY = 0, | 31 | PG_BUSY = 0, |
32 | PG_MAPPED, | ||
32 | PG_CLEAN, | 33 | PG_CLEAN, |
33 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
34 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 5095b834a6f..4d593defc47 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -240,6 +240,21 @@ extern void __bad_size_call_parameter(void); | |||
240 | pscr_ret__; \ | 240 | pscr_ret__; \ |
241 | }) | 241 | }) |
242 | 242 | ||
243 | #define __pcpu_size_call_return2(stem, variable, ...) \ | ||
244 | ({ \ | ||
245 | typeof(variable) pscr2_ret__; \ | ||
246 | __verify_pcpu_ptr(&(variable)); \ | ||
247 | switch(sizeof(variable)) { \ | ||
248 | case 1: pscr2_ret__ = stem##1(variable, __VA_ARGS__); break; \ | ||
249 | case 2: pscr2_ret__ = stem##2(variable, __VA_ARGS__); break; \ | ||
250 | case 4: pscr2_ret__ = stem##4(variable, __VA_ARGS__); break; \ | ||
251 | case 8: pscr2_ret__ = stem##8(variable, __VA_ARGS__); break; \ | ||
252 | default: \ | ||
253 | __bad_size_call_parameter(); break; \ | ||
254 | } \ | ||
255 | pscr2_ret__; \ | ||
256 | }) | ||
257 | |||
243 | #define __pcpu_size_call(stem, variable, ...) \ | 258 | #define __pcpu_size_call(stem, variable, ...) \ |
244 | do { \ | 259 | do { \ |
245 | __verify_pcpu_ptr(&(variable)); \ | 260 | __verify_pcpu_ptr(&(variable)); \ |
@@ -529,6 +544,62 @@ do { \ | |||
529 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) | 544 | # define __this_cpu_xor(pcp, val) __pcpu_size_call(__this_cpu_xor_, (pcp), (val)) |
530 | #endif | 545 | #endif |
531 | 546 | ||
547 | #define _this_cpu_generic_add_return(pcp, val) \ | ||
548 | ({ \ | ||
549 | typeof(pcp) ret__; \ | ||
550 | preempt_disable(); \ | ||
551 | __this_cpu_add(pcp, val); \ | ||
552 | ret__ = __this_cpu_read(pcp); \ | ||
553 | preempt_enable(); \ | ||
554 | ret__; \ | ||
555 | }) | ||
556 | |||
557 | #ifndef this_cpu_add_return | ||
558 | # ifndef this_cpu_add_return_1 | ||
559 | # define this_cpu_add_return_1(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
560 | # endif | ||
561 | # ifndef this_cpu_add_return_2 | ||
562 | # define this_cpu_add_return_2(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
563 | # endif | ||
564 | # ifndef this_cpu_add_return_4 | ||
565 | # define this_cpu_add_return_4(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
566 | # endif | ||
567 | # ifndef this_cpu_add_return_8 | ||
568 | # define this_cpu_add_return_8(pcp, val) _this_cpu_generic_add_return(pcp, val) | ||
569 | # endif | ||
570 | # define this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | ||
571 | #endif | ||
572 | |||
573 | #define this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | ||
574 | #define this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | ||
575 | #define this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | ||
576 | |||
577 | #define __this_cpu_generic_add_return(pcp, val) \ | ||
578 | ({ \ | ||
579 | __this_cpu_add(pcp, val); \ | ||
580 | __this_cpu_read(pcp); \ | ||
581 | }) | ||
582 | |||
583 | #ifndef __this_cpu_add_return | ||
584 | # ifndef __this_cpu_add_return_1 | ||
585 | # define __this_cpu_add_return_1(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
586 | # endif | ||
587 | # ifndef __this_cpu_add_return_2 | ||
588 | # define __this_cpu_add_return_2(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
589 | # endif | ||
590 | # ifndef __this_cpu_add_return_4 | ||
591 | # define __this_cpu_add_return_4(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
592 | # endif | ||
593 | # ifndef __this_cpu_add_return_8 | ||
594 | # define __this_cpu_add_return_8(pcp, val) __this_cpu_generic_add_return(pcp, val) | ||
595 | # endif | ||
596 | # define __this_cpu_add_return(pcp, val) __pcpu_size_call_return2(this_cpu_add_return_, pcp, val) | ||
597 | #endif | ||
598 | |||
599 | #define __this_cpu_sub_return(pcp, val) this_cpu_add_return(pcp, -(val)) | ||
600 | #define __this_cpu_inc_return(pcp) this_cpu_add_return(pcp, 1) | ||
601 | #define __this_cpu_dec_return(pcp) this_cpu_add_return(pcp, -1) | ||
602 | |||
532 | /* | 603 | /* |
533 | * IRQ safe versions of the per cpu RMW operations. Note that these operations | 604 | * IRQ safe versions of the per cpu RMW operations. Note that these operations |
534 | * are *not* safe against modification of the same variable from another | 605 | * are *not* safe against modification of the same variable from another |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index ebb0c80ffd6..12b2b18e50c 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
@@ -230,6 +230,7 @@ enum | |||
230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ | 230 | LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */ |
231 | LINUX_MIB_TCPDEFERACCEPTDROP, | 231 | LINUX_MIB_TCPDEFERACCEPTDROP, |
232 | LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ | 232 | LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */ |
233 | LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */ | ||
233 | __LINUX_MIB_MAX | 234 | __LINUX_MIB_MAX |
234 | }; | 235 | }; |
235 | 236 | ||
diff --git a/include/linux/ssb/ssb_driver_gige.h b/include/linux/ssb/ssb_driver_gige.h index 942e3873690..eba52a10053 100644 --- a/include/linux/ssb/ssb_driver_gige.h +++ b/include/linux/ssb/ssb_driver_gige.h | |||
@@ -96,16 +96,21 @@ static inline bool ssb_gige_must_flush_posted_writes(struct pci_dev *pdev) | |||
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | extern char * nvram_get(const char *name); | 99 | #ifdef CONFIG_BCM47XX |
100 | #include <asm/mach-bcm47xx/nvram.h> | ||
100 | /* Get the device MAC address */ | 101 | /* Get the device MAC address */ |
101 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | 102 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) |
102 | { | 103 | { |
103 | #ifdef CONFIG_BCM47XX | 104 | char buf[20]; |
104 | char *res = nvram_get("et0macaddr"); | 105 | if (nvram_getenv("et0macaddr", buf, sizeof(buf)) < 0) |
105 | if (res) | 106 | return; |
106 | memcpy(macaddr, res, 6); | 107 | nvram_parse_macaddr(buf, macaddr); |
107 | #endif | ||
108 | } | 108 | } |
109 | #else | ||
110 | static inline void ssb_gige_get_macaddr(struct pci_dev *pdev, u8 *macaddr) | ||
111 | { | ||
112 | } | ||
113 | #endif | ||
109 | 114 | ||
110 | extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, | 115 | extern int ssb_gige_pcibios_plat_dev_init(struct ssb_device *sdev, |
111 | struct pci_dev *pdev); | 116 | struct pci_dev *pdev); |
diff --git a/include/linux/video_output.h b/include/linux/video_output.h index 2fb46bc9340..ed5cdeb3604 100644 --- a/include/linux/video_output.h +++ b/include/linux/video_output.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #ifndef _LINUX_VIDEO_OUTPUT_H | 23 | #ifndef _LINUX_VIDEO_OUTPUT_H |
24 | #define _LINUX_VIDEO_OUTPUT_H | 24 | #define _LINUX_VIDEO_OUTPUT_H |
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/err.h> | ||
26 | struct output_device; | 27 | struct output_device; |
27 | struct output_properties { | 28 | struct output_properties { |
28 | int (*set_state)(struct output_device *); | 29 | int (*set_state)(struct output_device *); |
@@ -34,9 +35,23 @@ struct output_device { | |||
34 | struct device dev; | 35 | struct device dev; |
35 | }; | 36 | }; |
36 | #define to_output_device(obj) container_of(obj, struct output_device, dev) | 37 | #define to_output_device(obj) container_of(obj, struct output_device, dev) |
38 | #if defined(CONFIG_VIDEO_OUTPUT_CONTROL) || defined(CONFIG_VIDEO_OUTPUT_CONTROL_MODULE) | ||
37 | struct output_device *video_output_register(const char *name, | 39 | struct output_device *video_output_register(const char *name, |
38 | struct device *dev, | 40 | struct device *dev, |
39 | void *devdata, | 41 | void *devdata, |
40 | struct output_properties *op); | 42 | struct output_properties *op); |
41 | void video_output_unregister(struct output_device *dev); | 43 | void video_output_unregister(struct output_device *dev); |
44 | #else | ||
45 | static struct output_device *video_output_register(const char *name, | ||
46 | struct device *dev, | ||
47 | void *devdata, | ||
48 | struct output_properties *op) | ||
49 | { | ||
50 | return ERR_PTR(-ENODEV); | ||
51 | } | ||
52 | static void video_output_unregister(struct output_device *dev) | ||
53 | { | ||
54 | return; | ||
55 | } | ||
56 | #endif | ||
42 | #endif | 57 | #endif |
diff --git a/include/net/sock.h b/include/net/sock.h index a6338d03985..659d968d95c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1155,6 +1155,8 @@ extern void sk_common_release(struct sock *sk); | |||
1155 | /* Initialise core socket variables */ | 1155 | /* Initialise core socket variables */ |
1156 | extern void sock_init_data(struct socket *sock, struct sock *sk); | 1156 | extern void sock_init_data(struct socket *sock, struct sock *sk); |
1157 | 1157 | ||
1158 | extern void sk_filter_release_rcu(struct rcu_head *rcu); | ||
1159 | |||
1158 | /** | 1160 | /** |
1159 | * sk_filter_release - release a socket filter | 1161 | * sk_filter_release - release a socket filter |
1160 | * @fp: filter to remove | 1162 | * @fp: filter to remove |
@@ -1165,7 +1167,7 @@ extern void sock_init_data(struct socket *sock, struct sock *sk); | |||
1165 | static inline void sk_filter_release(struct sk_filter *fp) | 1167 | static inline void sk_filter_release(struct sk_filter *fp) |
1166 | { | 1168 | { |
1167 | if (atomic_dec_and_test(&fp->refcnt)) | 1169 | if (atomic_dec_and_test(&fp->refcnt)) |
1168 | kfree(fp); | 1170 | call_rcu_bh(&fp->rcu, sk_filter_release_rcu); |
1169 | } | 1171 | } |
1170 | 1172 | ||
1171 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) | 1173 | static inline void sk_filter_uncharge(struct sock *sk, struct sk_filter *fp) |
diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h index e8cbf431c8c..75271b9a8f6 100644 --- a/include/xen/interface/io/ring.h +++ b/include/xen/interface/io/ring.h | |||
@@ -24,8 +24,15 @@ typedef unsigned int RING_IDX; | |||
24 | * A ring contains as many entries as will fit, rounded down to the nearest | 24 | * A ring contains as many entries as will fit, rounded down to the nearest |
25 | * power of two (so we can mask with (size-1) to loop around). | 25 | * power of two (so we can mask with (size-1) to loop around). |
26 | */ | 26 | */ |
27 | #define __RING_SIZE(_s, _sz) \ | 27 | #define __CONST_RING_SIZE(_s, _sz) \ |
28 | (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) | 28 | (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \ |
29 | sizeof(((struct _s##_sring *)0)->ring[0]))) | ||
30 | |||
31 | /* | ||
32 | * The same for passing in an actual pointer instead of a name tag. | ||
33 | */ | ||
34 | #define __RING_SIZE(_s, _sz) \ | ||
35 | (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) | ||
29 | 36 | ||
30 | /* | 37 | /* |
31 | * Macros to make the correct C datatypes for a new kind of ring. | 38 | * Macros to make the correct C datatypes for a new kind of ring. |