diff options
Diffstat (limited to 'include')
84 files changed, 761 insertions, 246 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index baacd98e7cc6..4de84ce3a927 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -377,9 +377,6 @@ struct acpi_pci_root { | |||
| 377 | 377 | ||
| 378 | u32 osc_support_set; /* _OSC state of support bits */ | 378 | u32 osc_support_set; /* _OSC state of support bits */ |
| 379 | u32 osc_control_set; /* _OSC state of control bits */ | 379 | u32 osc_control_set; /* _OSC state of control bits */ |
| 380 | u32 osc_control_qry; /* the latest _OSC query result */ | ||
| 381 | |||
| 382 | u32 osc_queried:1; /* has _OSC control been queried? */ | ||
| 383 | }; | 380 | }; |
| 384 | 381 | ||
| 385 | /* helper */ | 382 | /* helper */ |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index c7376bf80b06..8ca18e26d7e3 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h | |||
| @@ -16,15 +16,27 @@ | |||
| 16 | * While the GPIO programming interface defines valid GPIO numbers | 16 | * While the GPIO programming interface defines valid GPIO numbers |
| 17 | * to be in the range 0..MAX_INT, this library restricts them to the | 17 | * to be in the range 0..MAX_INT, this library restricts them to the |
| 18 | * smaller range 0..ARCH_NR_GPIOS-1. | 18 | * smaller range 0..ARCH_NR_GPIOS-1. |
| 19 | * | ||
| 20 | * ARCH_NR_GPIOS is somewhat arbitrary; it usually reflects the sum of | ||
| 21 | * builtin/SoC GPIOs plus a number of GPIOs on expanders; the latter is | ||
| 22 | * actually an estimate of a board-specific value. | ||
| 19 | */ | 23 | */ |
| 20 | 24 | ||
| 21 | #ifndef ARCH_NR_GPIOS | 25 | #ifndef ARCH_NR_GPIOS |
| 22 | #define ARCH_NR_GPIOS 256 | 26 | #define ARCH_NR_GPIOS 256 |
| 23 | #endif | 27 | #endif |
| 24 | 28 | ||
| 29 | /* | ||
| 30 | * "valid" GPIO numbers are nonnegative and may be passed to | ||
| 31 | * setup routines like gpio_request(). only some valid numbers | ||
| 32 | * can successfully be requested and used. | ||
| 33 | * | ||
| 34 | * Invalid GPIO numbers are useful for indicating no-such-GPIO in | ||
| 35 | * platform data and other tables. | ||
| 36 | */ | ||
| 37 | |||
| 25 | static inline int gpio_is_valid(int number) | 38 | static inline int gpio_is_valid(int number) |
| 26 | { | 39 | { |
| 27 | /* only some non-negative numbers are valid */ | ||
| 28 | return ((unsigned)number) < ARCH_NR_GPIOS; | 40 | return ((unsigned)number) < ARCH_NR_GPIOS; |
| 29 | } | 41 | } |
| 30 | 42 | ||
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index b5043a9890d8..08923b684768 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
| @@ -70,11 +70,16 @@ extern void setup_per_cpu_areas(void); | |||
| 70 | 70 | ||
| 71 | #else /* ! SMP */ | 71 | #else /* ! SMP */ |
| 72 | 72 | ||
| 73 | #define per_cpu(var, cpu) (*((void)(cpu), &(var))) | 73 | #define VERIFY_PERCPU_PTR(__p) ({ \ |
| 74 | #define __get_cpu_var(var) (var) | 74 | __verify_pcpu_ptr((__p)); \ |
| 75 | #define __raw_get_cpu_var(var) (var) | 75 | (typeof(*(__p)) __kernel __force *)(__p); \ |
| 76 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) | 76 | }) |
| 77 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) | 77 | |
| 78 | #define per_cpu(var, cpu) (*((void)(cpu), VERIFY_PERCPU_PTR(&(var)))) | ||
| 79 | #define __get_cpu_var(var) (*VERIFY_PERCPU_PTR(&(var))) | ||
| 80 | #define __raw_get_cpu_var(var) (*VERIFY_PERCPU_PTR(&(var))) | ||
| 81 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) | ||
| 82 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) | ||
| 78 | 83 | ||
| 79 | #endif /* SMP */ | 84 | #endif /* SMP */ |
| 80 | 85 | ||
diff --git a/include/asm-generic/syscalls.h b/include/asm-generic/syscalls.h index df84e3b04555..d89dec864d42 100644 --- a/include/asm-generic/syscalls.h +++ b/include/asm-generic/syscalls.h | |||
| @@ -23,8 +23,10 @@ asmlinkage long sys_vfork(struct pt_regs *regs); | |||
| 23 | #endif | 23 | #endif |
| 24 | 24 | ||
| 25 | #ifndef sys_execve | 25 | #ifndef sys_execve |
| 26 | asmlinkage long sys_execve(char __user *filename, char __user * __user *argv, | 26 | asmlinkage long sys_execve(const char __user *filename, |
| 27 | char __user * __user *envp, struct pt_regs *regs); | 27 | const char __user *const __user *argv, |
| 28 | const char __user *const __user *envp, | ||
| 29 | struct pt_regs *regs); | ||
| 28 | #endif | 30 | #endif |
| 29 | 31 | ||
| 30 | #ifndef sys_mmap2 | 32 | #ifndef sys_mmap2 |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 2a512bc0d4ab..7809d230adee 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -305,14 +305,16 @@ struct drm_ioctl_desc { | |||
| 305 | unsigned int cmd; | 305 | unsigned int cmd; |
| 306 | int flags; | 306 | int flags; |
| 307 | drm_ioctl_t *func; | 307 | drm_ioctl_t *func; |
| 308 | unsigned int cmd_drv; | ||
| 308 | }; | 309 | }; |
| 309 | 310 | ||
| 310 | /** | 311 | /** |
| 311 | * Creates a driver or general drm_ioctl_desc array entry for the given | 312 | * Creates a driver or general drm_ioctl_desc array entry for the given |
| 312 | * ioctl, for use by drm_ioctl(). | 313 | * ioctl, for use by drm_ioctl(). |
| 313 | */ | 314 | */ |
| 314 | #define DRM_IOCTL_DEF(ioctl, _func, _flags) \ | 315 | |
| 315 | [DRM_IOCTL_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags} | 316 | #define DRM_IOCTL_DEF_DRV(ioctl, _func, _flags) \ |
| 317 | [DRM_IOCTL_NR(DRM_##ioctl)] = {.cmd = DRM_##ioctl, .func = _func, .flags = _flags, .cmd_drv = DRM_IOCTL_##ioctl} | ||
| 316 | 318 | ||
| 317 | struct drm_magic_entry { | 319 | struct drm_magic_entry { |
| 318 | struct list_head head; | 320 | struct list_head head; |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index c9f3cc5949a8..3e5a51af757c 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -386,7 +386,15 @@ struct drm_connector_funcs { | |||
| 386 | void (*dpms)(struct drm_connector *connector, int mode); | 386 | void (*dpms)(struct drm_connector *connector, int mode); |
| 387 | void (*save)(struct drm_connector *connector); | 387 | void (*save)(struct drm_connector *connector); |
| 388 | void (*restore)(struct drm_connector *connector); | 388 | void (*restore)(struct drm_connector *connector); |
| 389 | enum drm_connector_status (*detect)(struct drm_connector *connector); | 389 | |
| 390 | /* Check to see if anything is attached to the connector. | ||
| 391 | * @force is set to false whilst polling, true when checking the | ||
| 392 | * connector due to user request. @force can be used by the driver | ||
| 393 | * to avoid expensive, destructive operations during automated | ||
| 394 | * probing. | ||
| 395 | */ | ||
| 396 | enum drm_connector_status (*detect)(struct drm_connector *connector, | ||
| 397 | bool force); | ||
| 390 | int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height); | 398 | int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height); |
| 391 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, | 399 | int (*set_property)(struct drm_connector *connector, struct drm_property *property, |
| 392 | uint64_t val); | 400 | uint64_t val); |
diff --git a/include/drm/i830_drm.h b/include/drm/i830_drm.h index 4b00d2dd4f68..61315c29b8f3 100644 --- a/include/drm/i830_drm.h +++ b/include/drm/i830_drm.h | |||
| @@ -264,20 +264,20 @@ typedef struct _drm_i830_sarea { | |||
| 264 | #define DRM_I830_GETPARAM 0x0c | 264 | #define DRM_I830_GETPARAM 0x0c |
| 265 | #define DRM_I830_SETPARAM 0x0d | 265 | #define DRM_I830_SETPARAM 0x0d |
| 266 | 266 | ||
| 267 | #define DRM_IOCTL_I830_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_INIT, drm_i830_init_t) | 267 | #define DRM_IOCTL_I830_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I830_INIT, drm_i830_init_t) |
| 268 | #define DRM_IOCTL_I830_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_VERTEX, drm_i830_vertex_t) | 268 | #define DRM_IOCTL_I830_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_I830_VERTEX, drm_i830_vertex_t) |
| 269 | #define DRM_IOCTL_I830_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_CLEAR, drm_i830_clear_t) | 269 | #define DRM_IOCTL_I830_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_I830_CLEAR, drm_i830_clear_t) |
| 270 | #define DRM_IOCTL_I830_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_FLUSH) | 270 | #define DRM_IOCTL_I830_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I830_FLUSH) |
| 271 | #define DRM_IOCTL_I830_GETAGE DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_GETAGE) | 271 | #define DRM_IOCTL_I830_GETAGE DRM_IO ( DRM_COMMAND_BASE + DRM_I830_GETAGE) |
| 272 | #define DRM_IOCTL_I830_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_GETBUF, drm_i830_dma_t) | 272 | #define DRM_IOCTL_I830_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_I830_GETBUF, drm_i830_dma_t) |
| 273 | #define DRM_IOCTL_I830_SWAP DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_SWAP) | 273 | #define DRM_IOCTL_I830_SWAP DRM_IO ( DRM_COMMAND_BASE + DRM_I830_SWAP) |
| 274 | #define DRM_IOCTL_I830_COPY DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_COPY, drm_i830_copy_t) | 274 | #define DRM_IOCTL_I830_COPY DRM_IOW( DRM_COMMAND_BASE + DRM_I830_COPY, drm_i830_copy_t) |
| 275 | #define DRM_IOCTL_I830_DOCOPY DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_DOCOPY) | 275 | #define DRM_IOCTL_I830_DOCOPY DRM_IO ( DRM_COMMAND_BASE + DRM_I830_DOCOPY) |
| 276 | #define DRM_IOCTL_I830_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_IOCTL_I830_FLIP) | 276 | #define DRM_IOCTL_I830_FLIP DRM_IO ( DRM_COMMAND_BASE + DRM_I830_FLIP) |
| 277 | #define DRM_IOCTL_I830_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_IRQ_EMIT, drm_i830_irq_emit_t) | 277 | #define DRM_IOCTL_I830_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I830_IRQ_EMIT, drm_i830_irq_emit_t) |
| 278 | #define DRM_IOCTL_I830_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_IOCTL_I830_IRQ_WAIT, drm_i830_irq_wait_t) | 278 | #define DRM_IOCTL_I830_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_I830_IRQ_WAIT, drm_i830_irq_wait_t) |
| 279 | #define DRM_IOCTL_I830_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_GETPARAM, drm_i830_getparam_t) | 279 | #define DRM_IOCTL_I830_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I830_GETPARAM, drm_i830_getparam_t) |
| 280 | #define DRM_IOCTL_I830_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_IOCTL_I830_SETPARAM, drm_i830_setparam_t) | 280 | #define DRM_IOCTL_I830_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I830_SETPARAM, drm_i830_setparam_t) |
| 281 | 281 | ||
| 282 | typedef struct _drm_i830_clear { | 282 | typedef struct _drm_i830_clear { |
| 283 | int clear_color; | 283 | int clear_color; |
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index 8f8b072c4c7b..e41c74facb6a 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
| @@ -215,6 +215,7 @@ typedef struct _drm_i915_sarea { | |||
| 215 | #define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t) | 215 | #define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW( DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t) |
| 216 | #define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) | 216 | #define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR( DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) |
| 217 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) | 217 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) |
| 218 | #define DRM_IOCTL_I915_HWS_ADDR DRM_IOW(DRM_COMMAND_BASE + DRM_I915_HWS_ADDR, struct drm_i915_gem_init) | ||
| 218 | #define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) | 219 | #define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) |
| 219 | #define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) | 220 | #define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) |
| 220 | #define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2) | 221 | #define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2) |
diff --git a/include/drm/mga_drm.h b/include/drm/mga_drm.h index 3ffbc4798afa..c16097f99be0 100644 --- a/include/drm/mga_drm.h +++ b/include/drm/mga_drm.h | |||
| @@ -248,7 +248,7 @@ typedef struct _drm_mga_sarea { | |||
| 248 | #define DRM_MGA_DMA_BOOTSTRAP 0x0c | 248 | #define DRM_MGA_DMA_BOOTSTRAP 0x0c |
| 249 | 249 | ||
| 250 | #define DRM_IOCTL_MGA_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t) | 250 | #define DRM_IOCTL_MGA_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t) |
| 251 | #define DRM_IOCTL_MGA_FLUSH DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_FLUSH, drm_lock_t) | 251 | #define DRM_IOCTL_MGA_FLUSH DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_FLUSH, struct drm_lock) |
| 252 | #define DRM_IOCTL_MGA_RESET DRM_IO( DRM_COMMAND_BASE + DRM_MGA_RESET) | 252 | #define DRM_IOCTL_MGA_RESET DRM_IO( DRM_COMMAND_BASE + DRM_MGA_RESET) |
| 253 | #define DRM_IOCTL_MGA_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_MGA_SWAP) | 253 | #define DRM_IOCTL_MGA_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_MGA_SWAP) |
| 254 | #define DRM_IOCTL_MGA_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t) | 254 | #define DRM_IOCTL_MGA_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t) |
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index fe917dee723a..01a714119506 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
| @@ -197,4 +197,17 @@ struct drm_nouveau_sarea { | |||
| 197 | #define DRM_NOUVEAU_GEM_CPU_FINI 0x43 | 197 | #define DRM_NOUVEAU_GEM_CPU_FINI 0x43 |
| 198 | #define DRM_NOUVEAU_GEM_INFO 0x44 | 198 | #define DRM_NOUVEAU_GEM_INFO 0x44 |
| 199 | 199 | ||
| 200 | #define DRM_IOCTL_NOUVEAU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GETPARAM, struct drm_nouveau_getparam) | ||
| 201 | #define DRM_IOCTL_NOUVEAU_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SETPARAM, struct drm_nouveau_setparam) | ||
| 202 | #define DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_ALLOC, struct drm_nouveau_channel_alloc) | ||
| 203 | #define DRM_IOCTL_NOUVEAU_CHANNEL_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_CHANNEL_FREE, struct drm_nouveau_channel_free) | ||
| 204 | #define DRM_IOCTL_NOUVEAU_GROBJ_ALLOC DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GROBJ_ALLOC, struct drm_nouveau_grobj_alloc) | ||
| 205 | #define DRM_IOCTL_NOUVEAU_NOTIFIEROBJ_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_NOTIFIEROBJ_ALLOC, struct drm_nouveau_notifierobj_alloc) | ||
| 206 | #define DRM_IOCTL_NOUVEAU_GPUOBJ_FREE DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GPUOBJ_FREE, struct drm_nouveau_gpuobj_free) | ||
| 207 | #define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new) | ||
| 208 | #define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf) | ||
| 209 | #define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep) | ||
| 210 | #define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini) | ||
| 211 | #define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info) | ||
| 212 | |||
| 200 | #endif /* __NOUVEAU_DRM_H__ */ | 213 | #endif /* __NOUVEAU_DRM_H__ */ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 0acaf8f91437..10f8b53bdd40 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
| @@ -547,8 +547,8 @@ typedef struct { | |||
| 547 | #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) | 547 | #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) |
| 548 | #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) | 548 | #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) |
| 549 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) | 549 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) |
| 550 | #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) | 550 | #define DRM_IOCTL_RADEON_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) |
| 551 | #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) | 551 | #define DRM_IOCTL_RADEON_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) |
| 552 | #define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) | 552 | #define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) |
| 553 | 553 | ||
| 554 | typedef struct drm_radeon_init { | 554 | typedef struct drm_radeon_init { |
diff --git a/include/drm/savage_drm.h b/include/drm/savage_drm.h index 8a576ef01821..4863cf6bf96f 100644 --- a/include/drm/savage_drm.h +++ b/include/drm/savage_drm.h | |||
| @@ -63,10 +63,10 @@ typedef struct _drm_savage_sarea { | |||
| 63 | #define DRM_SAVAGE_BCI_EVENT_EMIT 0x02 | 63 | #define DRM_SAVAGE_BCI_EVENT_EMIT 0x02 |
| 64 | #define DRM_SAVAGE_BCI_EVENT_WAIT 0x03 | 64 | #define DRM_SAVAGE_BCI_EVENT_WAIT 0x03 |
| 65 | 65 | ||
| 66 | #define DRM_IOCTL_SAVAGE_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t) | 66 | #define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t) |
| 67 | #define DRM_IOCTL_SAVAGE_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t) | 67 | #define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t) |
| 68 | #define DRM_IOCTL_SAVAGE_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t) | 68 | #define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t) |
| 69 | #define DRM_IOCTL_SAVAGE_EVENT_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t) | 69 | #define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t) |
| 70 | 70 | ||
| 71 | #define SAVAGE_DMA_PCI 1 | 71 | #define SAVAGE_DMA_PCI 1 |
| 72 | #define SAVAGE_DMA_AGP 3 | 72 | #define SAVAGE_DMA_AGP 3 |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ccf94dc5acdf..c227757feb06 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -304,8 +304,8 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); | |||
| 304 | OSC_PCI_EXPRESS_PME_CONTROL | \ | 304 | OSC_PCI_EXPRESS_PME_CONTROL | \ |
| 305 | OSC_PCI_EXPRESS_AER_CONTROL | \ | 305 | OSC_PCI_EXPRESS_AER_CONTROL | \ |
| 306 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) | 306 | OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL) |
| 307 | 307 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | |
| 308 | extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags); | 308 | u32 *mask, u32 req); |
| 309 | extern void acpi_early_init(void); | 309 | extern void acpi_early_init(void); |
| 310 | 310 | ||
| 311 | #else /* !CONFIG_ACPI */ | 311 | #else /* !CONFIG_ACPI */ |
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index ca16c3801a1e..be33b3affc8a 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
| @@ -150,6 +150,7 @@ struct clcd_fb { | |||
| 150 | u16 off_cntl; | 150 | u16 off_cntl; |
| 151 | u32 clcd_cntl; | 151 | u32 clcd_cntl; |
| 152 | u32 cmap[16]; | 152 | u32 cmap[16]; |
| 153 | bool clk_enabled; | ||
| 153 | }; | 154 | }; |
| 154 | 155 | ||
| 155 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | 156 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index c809e286d213..a065612fc928 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
| @@ -50,8 +50,8 @@ struct linux_binprm{ | |||
| 50 | int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */ | 50 | int unsafe; /* how unsafe this exec is (mask of LSM_UNSAFE_*) */ |
| 51 | unsigned int per_clear; /* bits to clear in current->personality */ | 51 | unsigned int per_clear; /* bits to clear in current->personality */ |
| 52 | int argc, envc; | 52 | int argc, envc; |
| 53 | char * filename; /* Name of binary as seen by procps */ | 53 | const char * filename; /* Name of binary as seen by procps */ |
| 54 | char * interp; /* Name of the binary really executed. Most | 54 | const char * interp; /* Name of the binary really executed. Most |
| 55 | of the time same as filename, but could be | 55 | of the time same as filename, but could be |
| 56 | different for binfmt_{misc,script} */ | 56 | different for binfmt_{misc,script} */ |
| 57 | unsigned interp_flags; | 57 | unsigned interp_flags; |
| @@ -126,7 +126,8 @@ extern int setup_arg_pages(struct linux_binprm * bprm, | |||
| 126 | unsigned long stack_top, | 126 | unsigned long stack_top, |
| 127 | int executable_stack); | 127 | int executable_stack); |
| 128 | extern int bprm_mm_init(struct linux_binprm *bprm); | 128 | extern int bprm_mm_init(struct linux_binprm *bprm); |
| 129 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | 129 | extern int copy_strings_kernel(int argc, const char *const *argv, |
| 130 | struct linux_binprm *bprm); | ||
| 130 | extern int prepare_bprm_creds(struct linux_binprm *bprm); | 131 | extern int prepare_bprm_creds(struct linux_binprm *bprm); |
| 131 | extern void install_exec_creds(struct linux_binprm *bprm); | 132 | extern void install_exec_creds(struct linux_binprm *bprm); |
| 132 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); | 133 | extern void do_coredump(long signr, int exit_code, struct pt_regs *regs); |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 43e649a72529..ec94c12f21da 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -32,7 +32,6 @@ enum bh_state_bits { | |||
| 32 | BH_Delay, /* Buffer is not yet allocated on disk */ | 32 | BH_Delay, /* Buffer is not yet allocated on disk */ |
| 33 | BH_Boundary, /* Block is followed by a discontiguity */ | 33 | BH_Boundary, /* Block is followed by a discontiguity */ |
| 34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
| 35 | BH_Ordered, /* ordered write */ | ||
| 36 | BH_Eopnotsupp, /* operation not supported (barrier) */ | 35 | BH_Eopnotsupp, /* operation not supported (barrier) */ |
| 37 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | 36 | BH_Unwritten, /* Buffer is allocated on disk but not written */ |
| 38 | BH_Quiet, /* Buffer Error Prinks to be quiet */ | 37 | BH_Quiet, /* Buffer Error Prinks to be quiet */ |
| @@ -125,7 +124,6 @@ BUFFER_FNS(Async_Write, async_write) | |||
| 125 | BUFFER_FNS(Delay, delay) | 124 | BUFFER_FNS(Delay, delay) |
| 126 | BUFFER_FNS(Boundary, boundary) | 125 | BUFFER_FNS(Boundary, boundary) |
| 127 | BUFFER_FNS(Write_EIO, write_io_error) | 126 | BUFFER_FNS(Write_EIO, write_io_error) |
| 128 | BUFFER_FNS(Ordered, ordered) | ||
| 129 | BUFFER_FNS(Eopnotsupp, eopnotsupp) | 127 | BUFFER_FNS(Eopnotsupp, eopnotsupp) |
| 130 | BUFFER_FNS(Unwritten, unwritten) | 128 | BUFFER_FNS(Unwritten, unwritten) |
| 131 | 129 | ||
| @@ -183,6 +181,8 @@ void unlock_buffer(struct buffer_head *bh); | |||
| 183 | void __lock_buffer(struct buffer_head *bh); | 181 | void __lock_buffer(struct buffer_head *bh); |
| 184 | void ll_rw_block(int, int, struct buffer_head * bh[]); | 182 | void ll_rw_block(int, int, struct buffer_head * bh[]); |
| 185 | int sync_dirty_buffer(struct buffer_head *bh); | 183 | int sync_dirty_buffer(struct buffer_head *bh); |
| 184 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); | ||
| 185 | void write_dirty_buffer(struct buffer_head *bh, int rw); | ||
| 186 | int submit_bh(int, struct buffer_head *); | 186 | int submit_bh(int, struct buffer_head *); |
| 187 | void write_boundary_block(struct block_device *bdev, | 187 | void write_boundary_block(struct block_device *bdev, |
| 188 | sector_t bblock, unsigned blocksize); | 188 | sector_t bblock, unsigned blocksize); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index ed3e92e41c6e..0c991023ee47 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -578,7 +578,12 @@ struct task_struct *cgroup_iter_next(struct cgroup *cgrp, | |||
| 578 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); | 578 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); |
| 579 | int cgroup_scan_tasks(struct cgroup_scanner *scan); | 579 | int cgroup_scan_tasks(struct cgroup_scanner *scan); |
| 580 | int cgroup_attach_task(struct cgroup *, struct task_struct *); | 580 | int cgroup_attach_task(struct cgroup *, struct task_struct *); |
| 581 | int cgroup_attach_task_current_cg(struct task_struct *); | 581 | int cgroup_attach_task_all(struct task_struct *from, struct task_struct *); |
| 582 | |||
| 583 | static inline int cgroup_attach_task_current_cg(struct task_struct *tsk) | ||
| 584 | { | ||
| 585 | return cgroup_attach_task_all(current, tsk); | ||
| 586 | } | ||
| 582 | 587 | ||
| 583 | /* | 588 | /* |
| 584 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works | 589 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works |
| @@ -636,6 +641,11 @@ static inline int cgroupstats_build(struct cgroupstats *stats, | |||
| 636 | } | 641 | } |
| 637 | 642 | ||
| 638 | /* No cgroups - nothing to do */ | 643 | /* No cgroups - nothing to do */ |
| 644 | static inline int cgroup_attach_task_all(struct task_struct *from, | ||
| 645 | struct task_struct *t) | ||
| 646 | { | ||
| 647 | return 0; | ||
| 648 | } | ||
| 639 | static inline int cgroup_attach_task_current_cg(struct task_struct *t) | 649 | static inline int cgroup_attach_task_current_cg(struct task_struct *t) |
| 640 | { | 650 | { |
| 641 | return 0; | 651 | return 0; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 9ddc8780e8db..5778b559d59c 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -360,5 +360,8 @@ extern ssize_t compat_rw_copy_check_uvector(int type, | |||
| 360 | const struct compat_iovec __user *uvector, unsigned long nr_segs, | 360 | const struct compat_iovec __user *uvector, unsigned long nr_segs, |
| 361 | unsigned long fast_segs, struct iovec *fast_pointer, | 361 | unsigned long fast_segs, struct iovec *fast_pointer, |
| 362 | struct iovec **ret_pointer); | 362 | struct iovec **ret_pointer); |
| 363 | |||
| 364 | extern void __user *compat_alloc_user_space(unsigned long len); | ||
| 365 | |||
| 363 | #endif /* CONFIG_COMPAT */ | 366 | #endif /* CONFIG_COMPAT */ |
| 364 | #endif /* _LINUX_COMPAT_H */ | 367 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 2c958f4fce1e..926b50322a46 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
| @@ -136,6 +136,7 @@ extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t); | |||
| 136 | 136 | ||
| 137 | extern int elevator_init(struct request_queue *, char *); | 137 | extern int elevator_init(struct request_queue *, char *); |
| 138 | extern void elevator_exit(struct elevator_queue *); | 138 | extern void elevator_exit(struct elevator_queue *); |
| 139 | extern int elevator_change(struct request_queue *, const char *); | ||
| 139 | extern int elv_rq_merge_ok(struct request *, struct bio *); | 140 | extern int elv_rq_merge_ok(struct request *, struct bio *); |
| 140 | 141 | ||
| 141 | /* | 142 | /* |
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h index f0949a57ca9d..63531a6b4d2a 100644 --- a/include/linux/fanotify.h +++ b/include/linux/fanotify.h | |||
| @@ -65,14 +65,14 @@ | |||
| 65 | FAN_ALL_PERM_EVENTS |\ | 65 | FAN_ALL_PERM_EVENTS |\ |
| 66 | FAN_Q_OVERFLOW) | 66 | FAN_Q_OVERFLOW) |
| 67 | 67 | ||
| 68 | #define FANOTIFY_METADATA_VERSION 1 | 68 | #define FANOTIFY_METADATA_VERSION 2 |
| 69 | 69 | ||
| 70 | struct fanotify_event_metadata { | 70 | struct fanotify_event_metadata { |
| 71 | __u32 event_len; | 71 | __u32 event_len; |
| 72 | __u32 vers; | 72 | __u32 vers; |
| 73 | __s32 fd; | ||
| 74 | __u64 mask; | 73 | __u64 mask; |
| 75 | __s64 pid; | 74 | __s32 fd; |
| 75 | __s32 pid; | ||
| 76 | } __attribute__ ((packed)); | 76 | } __attribute__ ((packed)); |
| 77 | 77 | ||
| 78 | struct fanotify_response { | 78 | struct fanotify_response { |
| @@ -95,11 +95,4 @@ struct fanotify_response { | |||
| 95 | (long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \ | 95 | (long)(meta)->event_len >= (long)FAN_EVENT_METADATA_LEN && \ |
| 96 | (long)(meta)->event_len <= (long)(len)) | 96 | (long)(meta)->event_len <= (long)(len)) |
| 97 | 97 | ||
| 98 | #ifdef __KERNEL__ | ||
| 99 | |||
| 100 | struct fanotify_wait { | ||
| 101 | struct fsnotify_event *event; | ||
| 102 | __s32 fd; | ||
| 103 | }; | ||
| 104 | #endif /* __KERNEL__ */ | ||
| 105 | #endif /* _LINUX_FANOTIFY_H */ | 98 | #endif /* _LINUX_FANOTIFY_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9a96b4d83fc1..76041b614758 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -125,9 +125,6 @@ struct inodes_stat_t { | |||
| 125 | * block layer could (in theory) choose to ignore this | 125 | * block layer could (in theory) choose to ignore this |
| 126 | * request if it runs into resource problems. | 126 | * request if it runs into resource problems. |
| 127 | * WRITE A normal async write. Device will be plugged. | 127 | * WRITE A normal async write. Device will be plugged. |
| 128 | * SWRITE Like WRITE, but a special case for ll_rw_block() that | ||
| 129 | * tells it to lock the buffer first. Normally a buffer | ||
| 130 | * must be locked before doing IO. | ||
| 131 | * WRITE_SYNC_PLUG Synchronous write. Identical to WRITE, but passes down | 128 | * WRITE_SYNC_PLUG Synchronous write. Identical to WRITE, but passes down |
| 132 | * the hint that someone will be waiting on this IO | 129 | * the hint that someone will be waiting on this IO |
| 133 | * shortly. The device must still be unplugged explicitly, | 130 | * shortly. The device must still be unplugged explicitly, |
| @@ -138,9 +135,6 @@ struct inodes_stat_t { | |||
| 138 | * immediately after submission. The write equivalent | 135 | * immediately after submission. The write equivalent |
| 139 | * of READ_SYNC. | 136 | * of READ_SYNC. |
| 140 | * WRITE_ODIRECT_PLUG Special case write for O_DIRECT only. | 137 | * WRITE_ODIRECT_PLUG Special case write for O_DIRECT only. |
| 141 | * SWRITE_SYNC | ||
| 142 | * SWRITE_SYNC_PLUG Like WRITE_SYNC/WRITE_SYNC_PLUG, but locks the buffer. | ||
| 143 | * See SWRITE. | ||
| 144 | * WRITE_BARRIER Like WRITE_SYNC, but tells the block layer that all | 138 | * WRITE_BARRIER Like WRITE_SYNC, but tells the block layer that all |
| 145 | * previously submitted writes must be safely on storage | 139 | * previously submitted writes must be safely on storage |
| 146 | * before this one is started. Also guarantees that when | 140 | * before this one is started. Also guarantees that when |
| @@ -155,7 +149,6 @@ struct inodes_stat_t { | |||
| 155 | #define READ 0 | 149 | #define READ 0 |
| 156 | #define WRITE RW_MASK | 150 | #define WRITE RW_MASK |
| 157 | #define READA RWA_MASK | 151 | #define READA RWA_MASK |
| 158 | #define SWRITE (WRITE | READA) | ||
| 159 | 152 | ||
| 160 | #define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG) | 153 | #define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG) |
| 161 | #define READ_META (READ | REQ_META) | 154 | #define READ_META (READ | REQ_META) |
| @@ -165,8 +158,6 @@ struct inodes_stat_t { | |||
| 165 | #define WRITE_META (WRITE | REQ_META) | 158 | #define WRITE_META (WRITE | REQ_META) |
| 166 | #define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ | 159 | #define WRITE_BARRIER (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ |
| 167 | REQ_HARDBARRIER) | 160 | REQ_HARDBARRIER) |
| 168 | #define SWRITE_SYNC_PLUG (SWRITE | REQ_SYNC | REQ_NOIDLE) | ||
| 169 | #define SWRITE_SYNC (SWRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG) | ||
| 170 | 161 | ||
| 171 | /* | 162 | /* |
| 172 | * These aren't really reads or writes, they pass down information about | 163 | * These aren't really reads or writes, they pass down information about |
| @@ -929,6 +920,9 @@ struct file { | |||
| 929 | #define f_vfsmnt f_path.mnt | 920 | #define f_vfsmnt f_path.mnt |
| 930 | const struct file_operations *f_op; | 921 | const struct file_operations *f_op; |
| 931 | spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */ | 922 | spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */ |
| 923 | #ifdef CONFIG_SMP | ||
| 924 | int f_sb_list_cpu; | ||
| 925 | #endif | ||
| 932 | atomic_long_t f_count; | 926 | atomic_long_t f_count; |
| 933 | unsigned int f_flags; | 927 | unsigned int f_flags; |
| 934 | fmode_t f_mode; | 928 | fmode_t f_mode; |
| @@ -953,9 +947,6 @@ struct file { | |||
| 953 | unsigned long f_mnt_write_state; | 947 | unsigned long f_mnt_write_state; |
| 954 | #endif | 948 | #endif |
| 955 | }; | 949 | }; |
| 956 | extern spinlock_t files_lock; | ||
| 957 | #define file_list_lock() spin_lock(&files_lock); | ||
| 958 | #define file_list_unlock() spin_unlock(&files_lock); | ||
| 959 | 950 | ||
| 960 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 951 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
| 961 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | 952 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) |
| @@ -1346,7 +1337,11 @@ struct super_block { | |||
| 1346 | 1337 | ||
| 1347 | struct list_head s_inodes; /* all inodes */ | 1338 | struct list_head s_inodes; /* all inodes */ |
| 1348 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ | 1339 | struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */ |
| 1340 | #ifdef CONFIG_SMP | ||
| 1341 | struct list_head __percpu *s_files; | ||
| 1342 | #else | ||
| 1349 | struct list_head s_files; | 1343 | struct list_head s_files; |
| 1344 | #endif | ||
| 1350 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ | 1345 | /* s_dentry_lru and s_nr_dentry_unused are protected by dcache_lock */ |
| 1351 | struct list_head s_dentry_lru; /* unused dentry lru */ | 1346 | struct list_head s_dentry_lru; /* unused dentry lru */ |
| 1352 | int s_nr_dentry_unused; /* # of dentry on lru */ | 1347 | int s_nr_dentry_unused; /* # of dentry on lru */ |
| @@ -2197,8 +2192,6 @@ static inline void insert_inode_hash(struct inode *inode) { | |||
| 2197 | __insert_inode_hash(inode, inode->i_ino); | 2192 | __insert_inode_hash(inode, inode->i_ino); |
| 2198 | } | 2193 | } |
| 2199 | 2194 | ||
| 2200 | extern void file_move(struct file *f, struct list_head *list); | ||
| 2201 | extern void file_kill(struct file *f); | ||
| 2202 | #ifdef CONFIG_BLOCK | 2195 | #ifdef CONFIG_BLOCK |
| 2203 | extern void submit_bio(int, struct bio *); | 2196 | extern void submit_bio(int, struct bio *); |
| 2204 | extern int bdev_read_only(struct block_device *); | 2197 | extern int bdev_read_only(struct block_device *); |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index eca3d5202138..a42b5bf02f8b 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | struct fs_struct { | 6 | struct fs_struct { |
| 7 | int users; | 7 | int users; |
| 8 | rwlock_t lock; | 8 | spinlock_t lock; |
| 9 | int umask; | 9 | int umask; |
| 10 | int in_exec; | 10 | int in_exec; |
| 11 | struct path root, pwd; | 11 | struct path root, pwd; |
| @@ -23,29 +23,29 @@ extern int unshare_fs_struct(void); | |||
| 23 | 23 | ||
| 24 | static inline void get_fs_root(struct fs_struct *fs, struct path *root) | 24 | static inline void get_fs_root(struct fs_struct *fs, struct path *root) |
| 25 | { | 25 | { |
| 26 | read_lock(&fs->lock); | 26 | spin_lock(&fs->lock); |
| 27 | *root = fs->root; | 27 | *root = fs->root; |
| 28 | path_get(root); | 28 | path_get(root); |
| 29 | read_unlock(&fs->lock); | 29 | spin_unlock(&fs->lock); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) | 32 | static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd) |
| 33 | { | 33 | { |
| 34 | read_lock(&fs->lock); | 34 | spin_lock(&fs->lock); |
| 35 | *pwd = fs->pwd; | 35 | *pwd = fs->pwd; |
| 36 | path_get(pwd); | 36 | path_get(pwd); |
| 37 | read_unlock(&fs->lock); | 37 | spin_unlock(&fs->lock); |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, | 40 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, |
| 41 | struct path *pwd) | 41 | struct path *pwd) |
| 42 | { | 42 | { |
| 43 | read_lock(&fs->lock); | 43 | spin_lock(&fs->lock); |
| 44 | *root = fs->root; | 44 | *root = fs->root; |
| 45 | path_get(root); | 45 | path_get(root); |
| 46 | *pwd = fs->pwd; | 46 | *pwd = fs->pwd; |
| 47 | path_get(pwd); | 47 | path_get(pwd); |
| 48 | read_unlock(&fs->lock); | 48 | spin_unlock(&fs->lock); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | #endif /* _LINUX_FS_STRUCT_H */ | 51 | #endif /* _LINUX_FS_STRUCT_H */ |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index ed36fb57c426..e40190d16878 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
| @@ -156,6 +156,7 @@ struct fsnotify_group { | |||
| 156 | struct mutex access_mutex; | 156 | struct mutex access_mutex; |
| 157 | struct list_head access_list; | 157 | struct list_head access_list; |
| 158 | wait_queue_head_t access_waitq; | 158 | wait_queue_head_t access_waitq; |
| 159 | bool bypass_perm; /* protected by access_mutex */ | ||
| 159 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ | 160 | #endif /* CONFIG_FANOTIFY_ACCESS_PERMISSIONS */ |
| 160 | int f_flags; | 161 | int f_flags; |
| 161 | } fanotify_data; | 162 | } fanotify_data; |
diff --git a/include/linux/gpio.h b/include/linux/gpio.h index 03f616b78cfa..e41f7dd1ae67 100644 --- a/include/linux/gpio.h +++ b/include/linux/gpio.h | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
| 14 | 14 | ||
| 15 | struct device; | 15 | struct device; |
| 16 | struct gpio_chip; | ||
| 16 | 17 | ||
| 17 | /* | 18 | /* |
| 18 | * Some platforms don't support the GPIO programming interface. | 19 | * Some platforms don't support the GPIO programming interface. |
diff --git a/include/linux/i2c/sx150x.h b/include/linux/i2c/sx150x.h index ee3049cb9ba5..52baa79d69a7 100644 --- a/include/linux/i2c/sx150x.h +++ b/include/linux/i2c/sx150x.h | |||
| @@ -63,6 +63,9 @@ | |||
| 63 | * IRQ lines will appear. Similarly to gpio_base, the expander | 63 | * IRQ lines will appear. Similarly to gpio_base, the expander |
| 64 | * will create a block of irqs beginning at this number. | 64 | * will create a block of irqs beginning at this number. |
| 65 | * This value is ignored if irq_summary is < 0. | 65 | * This value is ignored if irq_summary is < 0. |
| 66 | * @reset_during_probe: If set to true, the driver will trigger a full | ||
| 67 | * reset of the chip at the beginning of the probe | ||
| 68 | * in order to place it in a known state. | ||
| 66 | */ | 69 | */ |
| 67 | struct sx150x_platform_data { | 70 | struct sx150x_platform_data { |
| 68 | unsigned gpio_base; | 71 | unsigned gpio_base; |
| @@ -73,6 +76,7 @@ struct sx150x_platform_data { | |||
| 73 | u16 io_polarity; | 76 | u16 io_polarity; |
| 74 | int irq_summary; | 77 | int irq_summary; |
| 75 | unsigned irq_base; | 78 | unsigned irq_base; |
| 79 | bool reset_during_probe; | ||
| 76 | }; | 80 | }; |
| 77 | 81 | ||
| 78 | #endif /* __LINUX_I2C_SX150X_H */ | 82 | #endif /* __LINUX_I2C_SX150X_H */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index c831467774d0..bed7a4682b90 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
| @@ -119,7 +119,7 @@ struct ethhdr { | |||
| 119 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ | 119 | unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ |
| 120 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ | 120 | unsigned char h_source[ETH_ALEN]; /* source ether addr */ |
| 121 | __be16 h_proto; /* packet type ID field */ | 121 | __be16 h_proto; /* packet type ID field */ |
| 122 | } __packed; | 122 | } __attribute__((packed)); |
| 123 | 123 | ||
| 124 | #ifdef __KERNEL__ | 124 | #ifdef __KERNEL__ |
| 125 | #include <linux/skbuff.h> | 125 | #include <linux/skbuff.h> |
diff --git a/include/linux/if_fddi.h b/include/linux/if_fddi.h index 9947c39e62f6..e6dc11e7f9a5 100644 --- a/include/linux/if_fddi.h +++ b/include/linux/if_fddi.h | |||
| @@ -67,7 +67,7 @@ struct fddi_8022_1_hdr { | |||
| 67 | __u8 dsap; /* destination service access point */ | 67 | __u8 dsap; /* destination service access point */ |
| 68 | __u8 ssap; /* source service access point */ | 68 | __u8 ssap; /* source service access point */ |
| 69 | __u8 ctrl; /* control byte #1 */ | 69 | __u8 ctrl; /* control byte #1 */ |
| 70 | } __packed; | 70 | } __attribute__((packed)); |
| 71 | 71 | ||
| 72 | /* Define 802.2 Type 2 header */ | 72 | /* Define 802.2 Type 2 header */ |
| 73 | struct fddi_8022_2_hdr { | 73 | struct fddi_8022_2_hdr { |
| @@ -75,7 +75,7 @@ struct fddi_8022_2_hdr { | |||
| 75 | __u8 ssap; /* source service access point */ | 75 | __u8 ssap; /* source service access point */ |
| 76 | __u8 ctrl_1; /* control byte #1 */ | 76 | __u8 ctrl_1; /* control byte #1 */ |
| 77 | __u8 ctrl_2; /* control byte #2 */ | 77 | __u8 ctrl_2; /* control byte #2 */ |
| 78 | } __packed; | 78 | } __attribute__((packed)); |
| 79 | 79 | ||
| 80 | /* Define 802.2 SNAP header */ | 80 | /* Define 802.2 SNAP header */ |
| 81 | #define FDDI_K_OUI_LEN 3 | 81 | #define FDDI_K_OUI_LEN 3 |
| @@ -85,7 +85,7 @@ struct fddi_snap_hdr { | |||
| 85 | __u8 ctrl; /* always 0x03 */ | 85 | __u8 ctrl; /* always 0x03 */ |
| 86 | __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ | 86 | __u8 oui[FDDI_K_OUI_LEN]; /* organizational universal id */ |
| 87 | __be16 ethertype; /* packet type ID field */ | 87 | __be16 ethertype; /* packet type ID field */ |
| 88 | } __packed; | 88 | } __attribute__((packed)); |
| 89 | 89 | ||
| 90 | /* Define FDDI LLC frame header */ | 90 | /* Define FDDI LLC frame header */ |
| 91 | struct fddihdr { | 91 | struct fddihdr { |
| @@ -98,7 +98,7 @@ struct fddihdr { | |||
| 98 | struct fddi_8022_2_hdr llc_8022_2; | 98 | struct fddi_8022_2_hdr llc_8022_2; |
| 99 | struct fddi_snap_hdr llc_snap; | 99 | struct fddi_snap_hdr llc_snap; |
| 100 | } hdr; | 100 | } hdr; |
| 101 | } __packed; | 101 | } __attribute__((packed)); |
| 102 | 102 | ||
| 103 | #ifdef __KERNEL__ | 103 | #ifdef __KERNEL__ |
| 104 | #include <linux/netdevice.h> | 104 | #include <linux/netdevice.h> |
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h index 5fe5f307c6f5..cdc049f1829a 100644 --- a/include/linux/if_hippi.h +++ b/include/linux/if_hippi.h | |||
| @@ -104,7 +104,7 @@ struct hippi_fp_hdr { | |||
| 104 | __be32 fixed; | 104 | __be32 fixed; |
| 105 | #endif | 105 | #endif |
| 106 | __be32 d2_size; | 106 | __be32 d2_size; |
| 107 | } __packed; | 107 | } __attribute__((packed)); |
| 108 | 108 | ||
| 109 | struct hippi_le_hdr { | 109 | struct hippi_le_hdr { |
| 110 | #if defined (__BIG_ENDIAN_BITFIELD) | 110 | #if defined (__BIG_ENDIAN_BITFIELD) |
| @@ -129,7 +129,7 @@ struct hippi_le_hdr { | |||
| 129 | __u8 daddr[HIPPI_ALEN]; | 129 | __u8 daddr[HIPPI_ALEN]; |
| 130 | __u16 locally_administered; | 130 | __u16 locally_administered; |
| 131 | __u8 saddr[HIPPI_ALEN]; | 131 | __u8 saddr[HIPPI_ALEN]; |
| 132 | } __packed; | 132 | } __attribute__((packed)); |
| 133 | 133 | ||
| 134 | #define HIPPI_OUI_LEN 3 | 134 | #define HIPPI_OUI_LEN 3 |
| 135 | /* | 135 | /* |
| @@ -142,12 +142,12 @@ struct hippi_snap_hdr { | |||
| 142 | __u8 ctrl; /* always 0x03 */ | 142 | __u8 ctrl; /* always 0x03 */ |
| 143 | __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ | 143 | __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ |
| 144 | __be16 ethertype; /* packet type ID field */ | 144 | __be16 ethertype; /* packet type ID field */ |
| 145 | } __packed; | 145 | } __attribute__((packed)); |
| 146 | 146 | ||
| 147 | struct hippi_hdr { | 147 | struct hippi_hdr { |
| 148 | struct hippi_fp_hdr fp; | 148 | struct hippi_fp_hdr fp; |
| 149 | struct hippi_le_hdr le; | 149 | struct hippi_le_hdr le; |
| 150 | struct hippi_snap_hdr snap; | 150 | struct hippi_snap_hdr snap; |
| 151 | } __packed; | 151 | } __attribute__((packed)); |
| 152 | 152 | ||
| 153 | #endif /* _LINUX_IF_HIPPI_H */ | 153 | #endif /* _LINUX_IF_HIPPI_H */ |
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 1925e0c3f162..27741e05446f 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -59,7 +59,7 @@ struct sockaddr_pppox { | |||
| 59 | union{ | 59 | union{ |
| 60 | struct pppoe_addr pppoe; | 60 | struct pppoe_addr pppoe; |
| 61 | }sa_addr; | 61 | }sa_addr; |
| 62 | } __packed; | 62 | } __attribute__((packed)); |
| 63 | 63 | ||
| 64 | /* The use of the above union isn't viable because the size of this | 64 | /* The use of the above union isn't viable because the size of this |
| 65 | * struct must stay fixed over time -- applications use sizeof(struct | 65 | * struct must stay fixed over time -- applications use sizeof(struct |
| @@ -70,7 +70,7 @@ struct sockaddr_pppol2tp { | |||
| 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 70 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 71 | unsigned int sa_protocol; /* protocol identifier */ | 71 | unsigned int sa_protocol; /* protocol identifier */ |
| 72 | struct pppol2tp_addr pppol2tp; | 72 | struct pppol2tp_addr pppol2tp; |
| 73 | } __packed; | 73 | } __attribute__((packed)); |
| 74 | 74 | ||
| 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 | 75 | /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 |
| 76 | * bits. So we need a different sockaddr structure. | 76 | * bits. So we need a different sockaddr structure. |
| @@ -79,7 +79,7 @@ struct sockaddr_pppol2tpv3 { | |||
| 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 79 | sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 80 | unsigned int sa_protocol; /* protocol identifier */ | 80 | unsigned int sa_protocol; /* protocol identifier */ |
| 81 | struct pppol2tpv3_addr pppol2tp; | 81 | struct pppol2tpv3_addr pppol2tp; |
| 82 | } __packed; | 82 | } __attribute__((packed)); |
| 83 | 83 | ||
| 84 | /********************************************************************* | 84 | /********************************************************************* |
| 85 | * | 85 | * |
| @@ -101,7 +101,7 @@ struct pppoe_tag { | |||
| 101 | __be16 tag_type; | 101 | __be16 tag_type; |
| 102 | __be16 tag_len; | 102 | __be16 tag_len; |
| 103 | char tag_data[0]; | 103 | char tag_data[0]; |
| 104 | } __attribute ((packed)); | 104 | } __attribute__ ((packed)); |
| 105 | 105 | ||
| 106 | /* Tag identifiers */ | 106 | /* Tag identifiers */ |
| 107 | #define PTT_EOL __cpu_to_be16(0x0000) | 107 | #define PTT_EOL __cpu_to_be16(0x0000) |
| @@ -129,7 +129,7 @@ struct pppoe_hdr { | |||
| 129 | __be16 sid; | 129 | __be16 sid; |
| 130 | __be16 length; | 130 | __be16 length; |
| 131 | struct pppoe_tag tag[0]; | 131 | struct pppoe_tag tag[0]; |
| 132 | } __packed; | 132 | } __attribute__((packed)); |
| 133 | 133 | ||
| 134 | /* Length of entire PPPoE + PPP header */ | 134 | /* Length of entire PPPoE + PPP header */ |
| 135 | #define PPPOE_SES_HLEN 8 | 135 | #define PPPOE_SES_HLEN 8 |
diff --git a/include/linux/intel-gtt.h b/include/linux/intel-gtt.h new file mode 100644 index 000000000000..1d19ab2afa39 --- /dev/null +++ b/include/linux/intel-gtt.h | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | /* | ||
| 2 | * Common Intel AGPGART and GTT definitions. | ||
| 3 | */ | ||
| 4 | #ifndef _INTEL_GTT_H | ||
| 5 | #define _INTEL_GTT_H | ||
| 6 | |||
| 7 | #include <linux/agp_backend.h> | ||
| 8 | |||
| 9 | /* This is for Intel only GTT controls. | ||
| 10 | * | ||
| 11 | * Sandybridge: AGP_USER_CACHED_MEMORY default to LLC only | ||
| 12 | */ | ||
| 13 | |||
| 14 | #define AGP_USER_CACHED_MEMORY_LLC_MLC (AGP_USER_TYPES + 2) | ||
| 15 | #define AGP_USER_UNCACHED_MEMORY (AGP_USER_TYPES + 4) | ||
| 16 | |||
| 17 | /* flag for GFDT type */ | ||
| 18 | #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) | ||
| 19 | |||
| 20 | #endif | ||
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 0a6b3d5c490c..7fb592793738 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -79,7 +79,7 @@ io_mapping_free(struct io_mapping *mapping) | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | /* Atomic map/unmap */ | 81 | /* Atomic map/unmap */ |
| 82 | static inline void * | 82 | static inline void __iomem * |
| 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 84 | unsigned long offset, | 84 | unsigned long offset, |
| 85 | int slot) | 85 | int slot) |
| @@ -94,12 +94,12 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, | |||
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static inline void | 96 | static inline void |
| 97 | io_mapping_unmap_atomic(void *vaddr, int slot) | 97 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) |
| 98 | { | 98 | { |
| 99 | iounmap_atomic(vaddr, slot); | 99 | iounmap_atomic(vaddr, slot); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static inline void * | 102 | static inline void __iomem * |
| 103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 104 | { | 104 | { |
| 105 | resource_size_t phys_addr; | 105 | resource_size_t phys_addr; |
| @@ -111,7 +111,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static inline void | 113 | static inline void |
| 114 | io_mapping_unmap(void *vaddr) | 114 | io_mapping_unmap(void __iomem *vaddr) |
| 115 | { | 115 | { |
| 116 | iounmap(vaddr); | 116 | iounmap(vaddr); |
| 117 | } | 117 | } |
| @@ -125,38 +125,38 @@ struct io_mapping; | |||
| 125 | static inline struct io_mapping * | 125 | static inline struct io_mapping * |
| 126 | io_mapping_create_wc(resource_size_t base, unsigned long size) | 126 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
| 127 | { | 127 | { |
| 128 | return (struct io_mapping *) ioremap_wc(base, size); | 128 | return (struct io_mapping __force *) ioremap_wc(base, size); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | static inline void | 131 | static inline void |
| 132 | io_mapping_free(struct io_mapping *mapping) | 132 | io_mapping_free(struct io_mapping *mapping) |
| 133 | { | 133 | { |
| 134 | iounmap(mapping); | 134 | iounmap((void __force __iomem *) mapping); |
| 135 | } | 135 | } |
| 136 | 136 | ||
| 137 | /* Atomic map/unmap */ | 137 | /* Atomic map/unmap */ |
| 138 | static inline void * | 138 | static inline void __iomem * |
| 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 140 | unsigned long offset, | 140 | unsigned long offset, |
| 141 | int slot) | 141 | int slot) |
| 142 | { | 142 | { |
| 143 | return ((char *) mapping) + offset; | 143 | return ((char __force __iomem *) mapping) + offset; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static inline void | 146 | static inline void |
| 147 | io_mapping_unmap_atomic(void *vaddr, int slot) | 147 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) |
| 148 | { | 148 | { |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | /* Non-atomic map/unmap */ | 151 | /* Non-atomic map/unmap */ |
| 152 | static inline void * | 152 | static inline void __iomem * |
| 153 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 153 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 154 | { | 154 | { |
| 155 | return ((char *) mapping) + offset; | 155 | return ((char __force __iomem *) mapping) + offset; |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | static inline void | 158 | static inline void |
| 159 | io_mapping_unmap(void *vaddr) | 159 | io_mapping_unmap(void __iomem *vaddr) |
| 160 | { | 160 | { |
| 161 | } | 161 | } |
| 162 | 162 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index ab9e9e89e407..e62683ba88e6 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -58,7 +58,7 @@ struct ipv6_opt_hdr { | |||
| 58 | /* | 58 | /* |
| 59 | * TLV encoded option data follows. | 59 | * TLV encoded option data follows. |
| 60 | */ | 60 | */ |
| 61 | } __packed; /* required for some archs */ | 61 | } __attribute__((packed)); /* required for some archs */ |
| 62 | 62 | ||
| 63 | #define ipv6_destopt_hdr ipv6_opt_hdr | 63 | #define ipv6_destopt_hdr ipv6_opt_hdr |
| 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr | 64 | #define ipv6_hopopt_hdr ipv6_opt_hdr |
| @@ -99,7 +99,7 @@ struct ipv6_destopt_hao { | |||
| 99 | __u8 type; | 99 | __u8 type; |
| 100 | __u8 length; | 100 | __u8 length; |
| 101 | struct in6_addr addr; | 101 | struct in6_addr addr; |
| 102 | } __packed; | 102 | } __attribute__((packed)); |
| 103 | 103 | ||
| 104 | /* | 104 | /* |
| 105 | * IPv6 fixed header | 105 | * IPv6 fixed header |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 311f8753d713..62dbee554f60 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
| @@ -214,7 +214,7 @@ __kfifo_must_check_helper(unsigned int val) | |||
| 214 | */ | 214 | */ |
| 215 | #define kfifo_reset(fifo) \ | 215 | #define kfifo_reset(fifo) \ |
| 216 | (void)({ \ | 216 | (void)({ \ |
| 217 | typeof(fifo + 1) __tmp = (fifo); \ | 217 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 218 | __tmp->kfifo.in = __tmp->kfifo.out = 0; \ | 218 | __tmp->kfifo.in = __tmp->kfifo.out = 0; \ |
| 219 | }) | 219 | }) |
| 220 | 220 | ||
| @@ -228,7 +228,7 @@ __kfifo_must_check_helper(unsigned int val) | |||
| 228 | */ | 228 | */ |
| 229 | #define kfifo_reset_out(fifo) \ | 229 | #define kfifo_reset_out(fifo) \ |
| 230 | (void)({ \ | 230 | (void)({ \ |
| 231 | typeof(fifo + 1) __tmp = (fifo); \ | 231 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 232 | __tmp->kfifo.out = __tmp->kfifo.in; \ | 232 | __tmp->kfifo.out = __tmp->kfifo.in; \ |
| 233 | }) | 233 | }) |
| 234 | 234 | ||
| @@ -238,7 +238,7 @@ __kfifo_must_check_helper(unsigned int val) | |||
| 238 | */ | 238 | */ |
| 239 | #define kfifo_len(fifo) \ | 239 | #define kfifo_len(fifo) \ |
| 240 | ({ \ | 240 | ({ \ |
| 241 | typeof(fifo + 1) __tmpl = (fifo); \ | 241 | typeof((fifo) + 1) __tmpl = (fifo); \ |
| 242 | __tmpl->kfifo.in - __tmpl->kfifo.out; \ | 242 | __tmpl->kfifo.in - __tmpl->kfifo.out; \ |
| 243 | }) | 243 | }) |
| 244 | 244 | ||
| @@ -248,7 +248,7 @@ __kfifo_must_check_helper(unsigned int val) | |||
| 248 | */ | 248 | */ |
| 249 | #define kfifo_is_empty(fifo) \ | 249 | #define kfifo_is_empty(fifo) \ |
| 250 | ({ \ | 250 | ({ \ |
| 251 | typeof(fifo + 1) __tmpq = (fifo); \ | 251 | typeof((fifo) + 1) __tmpq = (fifo); \ |
| 252 | __tmpq->kfifo.in == __tmpq->kfifo.out; \ | 252 | __tmpq->kfifo.in == __tmpq->kfifo.out; \ |
| 253 | }) | 253 | }) |
| 254 | 254 | ||
| @@ -258,7 +258,7 @@ __kfifo_must_check_helper(unsigned int val) | |||
| 258 | */ | 258 | */ |
| 259 | #define kfifo_is_full(fifo) \ | 259 | #define kfifo_is_full(fifo) \ |
| 260 | ({ \ | 260 | ({ \ |
| 261 | typeof(fifo + 1) __tmpq = (fifo); \ | 261 | typeof((fifo) + 1) __tmpq = (fifo); \ |
| 262 | kfifo_len(__tmpq) > __tmpq->kfifo.mask; \ | 262 | kfifo_len(__tmpq) > __tmpq->kfifo.mask; \ |
| 263 | }) | 263 | }) |
| 264 | 264 | ||
| @@ -269,7 +269,7 @@ __kfifo_must_check_helper(unsigned int val) | |||
| 269 | #define kfifo_avail(fifo) \ | 269 | #define kfifo_avail(fifo) \ |
| 270 | __kfifo_must_check_helper( \ | 270 | __kfifo_must_check_helper( \ |
| 271 | ({ \ | 271 | ({ \ |
| 272 | typeof(fifo + 1) __tmpq = (fifo); \ | 272 | typeof((fifo) + 1) __tmpq = (fifo); \ |
| 273 | const size_t __recsize = sizeof(*__tmpq->rectype); \ | 273 | const size_t __recsize = sizeof(*__tmpq->rectype); \ |
| 274 | unsigned int __avail = kfifo_size(__tmpq) - kfifo_len(__tmpq); \ | 274 | unsigned int __avail = kfifo_size(__tmpq) - kfifo_len(__tmpq); \ |
| 275 | (__recsize) ? ((__avail <= __recsize) ? 0 : \ | 275 | (__recsize) ? ((__avail <= __recsize) ? 0 : \ |
| @@ -284,7 +284,7 @@ __kfifo_must_check_helper( \ | |||
| 284 | */ | 284 | */ |
| 285 | #define kfifo_skip(fifo) \ | 285 | #define kfifo_skip(fifo) \ |
| 286 | (void)({ \ | 286 | (void)({ \ |
| 287 | typeof(fifo + 1) __tmp = (fifo); \ | 287 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 288 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 288 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 289 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 289 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| 290 | if (__recsize) \ | 290 | if (__recsize) \ |
| @@ -302,7 +302,7 @@ __kfifo_must_check_helper( \ | |||
| 302 | #define kfifo_peek_len(fifo) \ | 302 | #define kfifo_peek_len(fifo) \ |
| 303 | __kfifo_must_check_helper( \ | 303 | __kfifo_must_check_helper( \ |
| 304 | ({ \ | 304 | ({ \ |
| 305 | typeof(fifo + 1) __tmp = (fifo); \ | 305 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 306 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 306 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 307 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 307 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| 308 | (!__recsize) ? kfifo_len(__tmp) * sizeof(*__tmp->type) : \ | 308 | (!__recsize) ? kfifo_len(__tmp) * sizeof(*__tmp->type) : \ |
| @@ -325,7 +325,7 @@ __kfifo_must_check_helper( \ | |||
| 325 | #define kfifo_alloc(fifo, size, gfp_mask) \ | 325 | #define kfifo_alloc(fifo, size, gfp_mask) \ |
| 326 | __kfifo_must_check_helper( \ | 326 | __kfifo_must_check_helper( \ |
| 327 | ({ \ | 327 | ({ \ |
| 328 | typeof(fifo + 1) __tmp = (fifo); \ | 328 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 329 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 329 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| 330 | __is_kfifo_ptr(__tmp) ? \ | 330 | __is_kfifo_ptr(__tmp) ? \ |
| 331 | __kfifo_alloc(__kfifo, size, sizeof(*__tmp->type), gfp_mask) : \ | 331 | __kfifo_alloc(__kfifo, size, sizeof(*__tmp->type), gfp_mask) : \ |
| @@ -339,7 +339,7 @@ __kfifo_must_check_helper( \ | |||
| 339 | */ | 339 | */ |
| 340 | #define kfifo_free(fifo) \ | 340 | #define kfifo_free(fifo) \ |
| 341 | ({ \ | 341 | ({ \ |
| 342 | typeof(fifo + 1) __tmp = (fifo); \ | 342 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 343 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 343 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| 344 | if (__is_kfifo_ptr(__tmp)) \ | 344 | if (__is_kfifo_ptr(__tmp)) \ |
| 345 | __kfifo_free(__kfifo); \ | 345 | __kfifo_free(__kfifo); \ |
| @@ -358,7 +358,7 @@ __kfifo_must_check_helper( \ | |||
| 358 | */ | 358 | */ |
| 359 | #define kfifo_init(fifo, buffer, size) \ | 359 | #define kfifo_init(fifo, buffer, size) \ |
| 360 | ({ \ | 360 | ({ \ |
| 361 | typeof(fifo + 1) __tmp = (fifo); \ | 361 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 362 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 362 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| 363 | __is_kfifo_ptr(__tmp) ? \ | 363 | __is_kfifo_ptr(__tmp) ? \ |
| 364 | __kfifo_init(__kfifo, buffer, size, sizeof(*__tmp->type)) : \ | 364 | __kfifo_init(__kfifo, buffer, size, sizeof(*__tmp->type)) : \ |
| @@ -379,8 +379,8 @@ __kfifo_must_check_helper( \ | |||
| 379 | */ | 379 | */ |
| 380 | #define kfifo_put(fifo, val) \ | 380 | #define kfifo_put(fifo, val) \ |
| 381 | ({ \ | 381 | ({ \ |
| 382 | typeof(fifo + 1) __tmp = (fifo); \ | 382 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 383 | typeof(val + 1) __val = (val); \ | 383 | typeof((val) + 1) __val = (val); \ |
| 384 | unsigned int __ret; \ | 384 | unsigned int __ret; \ |
| 385 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 385 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 386 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 386 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -421,8 +421,8 @@ __kfifo_must_check_helper( \ | |||
| 421 | #define kfifo_get(fifo, val) \ | 421 | #define kfifo_get(fifo, val) \ |
| 422 | __kfifo_must_check_helper( \ | 422 | __kfifo_must_check_helper( \ |
| 423 | ({ \ | 423 | ({ \ |
| 424 | typeof(fifo + 1) __tmp = (fifo); \ | 424 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 425 | typeof(val + 1) __val = (val); \ | 425 | typeof((val) + 1) __val = (val); \ |
| 426 | unsigned int __ret; \ | 426 | unsigned int __ret; \ |
| 427 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 427 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 428 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 428 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -462,8 +462,8 @@ __kfifo_must_check_helper( \ | |||
| 462 | #define kfifo_peek(fifo, val) \ | 462 | #define kfifo_peek(fifo, val) \ |
| 463 | __kfifo_must_check_helper( \ | 463 | __kfifo_must_check_helper( \ |
| 464 | ({ \ | 464 | ({ \ |
| 465 | typeof(fifo + 1) __tmp = (fifo); \ | 465 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 466 | typeof(val + 1) __val = (val); \ | 466 | typeof((val) + 1) __val = (val); \ |
| 467 | unsigned int __ret; \ | 467 | unsigned int __ret; \ |
| 468 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 468 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 469 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 469 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -501,8 +501,8 @@ __kfifo_must_check_helper( \ | |||
| 501 | */ | 501 | */ |
| 502 | #define kfifo_in(fifo, buf, n) \ | 502 | #define kfifo_in(fifo, buf, n) \ |
| 503 | ({ \ | 503 | ({ \ |
| 504 | typeof(fifo + 1) __tmp = (fifo); \ | 504 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 505 | typeof(buf + 1) __buf = (buf); \ | 505 | typeof((buf) + 1) __buf = (buf); \ |
| 506 | unsigned long __n = (n); \ | 506 | unsigned long __n = (n); \ |
| 507 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 507 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 508 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 508 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -554,8 +554,8 @@ __kfifo_must_check_helper( \ | |||
| 554 | #define kfifo_out(fifo, buf, n) \ | 554 | #define kfifo_out(fifo, buf, n) \ |
| 555 | __kfifo_must_check_helper( \ | 555 | __kfifo_must_check_helper( \ |
| 556 | ({ \ | 556 | ({ \ |
| 557 | typeof(fifo + 1) __tmp = (fifo); \ | 557 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 558 | typeof(buf + 1) __buf = (buf); \ | 558 | typeof((buf) + 1) __buf = (buf); \ |
| 559 | unsigned long __n = (n); \ | 559 | unsigned long __n = (n); \ |
| 560 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 560 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 561 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 561 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -611,7 +611,7 @@ __kfifo_must_check_helper( \ | |||
| 611 | #define kfifo_from_user(fifo, from, len, copied) \ | 611 | #define kfifo_from_user(fifo, from, len, copied) \ |
| 612 | __kfifo_must_check_helper( \ | 612 | __kfifo_must_check_helper( \ |
| 613 | ({ \ | 613 | ({ \ |
| 614 | typeof(fifo + 1) __tmp = (fifo); \ | 614 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 615 | const void __user *__from = (from); \ | 615 | const void __user *__from = (from); \ |
| 616 | unsigned int __len = (len); \ | 616 | unsigned int __len = (len); \ |
| 617 | unsigned int *__copied = (copied); \ | 617 | unsigned int *__copied = (copied); \ |
| @@ -639,7 +639,7 @@ __kfifo_must_check_helper( \ | |||
| 639 | #define kfifo_to_user(fifo, to, len, copied) \ | 639 | #define kfifo_to_user(fifo, to, len, copied) \ |
| 640 | __kfifo_must_check_helper( \ | 640 | __kfifo_must_check_helper( \ |
| 641 | ({ \ | 641 | ({ \ |
| 642 | typeof(fifo + 1) __tmp = (fifo); \ | 642 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 643 | void __user *__to = (to); \ | 643 | void __user *__to = (to); \ |
| 644 | unsigned int __len = (len); \ | 644 | unsigned int __len = (len); \ |
| 645 | unsigned int *__copied = (copied); \ | 645 | unsigned int *__copied = (copied); \ |
| @@ -666,7 +666,7 @@ __kfifo_must_check_helper( \ | |||
| 666 | */ | 666 | */ |
| 667 | #define kfifo_dma_in_prepare(fifo, sgl, nents, len) \ | 667 | #define kfifo_dma_in_prepare(fifo, sgl, nents, len) \ |
| 668 | ({ \ | 668 | ({ \ |
| 669 | typeof(fifo + 1) __tmp = (fifo); \ | 669 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 670 | struct scatterlist *__sgl = (sgl); \ | 670 | struct scatterlist *__sgl = (sgl); \ |
| 671 | int __nents = (nents); \ | 671 | int __nents = (nents); \ |
| 672 | unsigned int __len = (len); \ | 672 | unsigned int __len = (len); \ |
| @@ -690,7 +690,7 @@ __kfifo_must_check_helper( \ | |||
| 690 | */ | 690 | */ |
| 691 | #define kfifo_dma_in_finish(fifo, len) \ | 691 | #define kfifo_dma_in_finish(fifo, len) \ |
| 692 | (void)({ \ | 692 | (void)({ \ |
| 693 | typeof(fifo + 1) __tmp = (fifo); \ | 693 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 694 | unsigned int __len = (len); \ | 694 | unsigned int __len = (len); \ |
| 695 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 695 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 696 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 696 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -717,7 +717,7 @@ __kfifo_must_check_helper( \ | |||
| 717 | */ | 717 | */ |
| 718 | #define kfifo_dma_out_prepare(fifo, sgl, nents, len) \ | 718 | #define kfifo_dma_out_prepare(fifo, sgl, nents, len) \ |
| 719 | ({ \ | 719 | ({ \ |
| 720 | typeof(fifo + 1) __tmp = (fifo); \ | 720 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 721 | struct scatterlist *__sgl = (sgl); \ | 721 | struct scatterlist *__sgl = (sgl); \ |
| 722 | int __nents = (nents); \ | 722 | int __nents = (nents); \ |
| 723 | unsigned int __len = (len); \ | 723 | unsigned int __len = (len); \ |
| @@ -741,7 +741,7 @@ __kfifo_must_check_helper( \ | |||
| 741 | */ | 741 | */ |
| 742 | #define kfifo_dma_out_finish(fifo, len) \ | 742 | #define kfifo_dma_out_finish(fifo, len) \ |
| 743 | (void)({ \ | 743 | (void)({ \ |
| 744 | typeof(fifo + 1) __tmp = (fifo); \ | 744 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 745 | unsigned int __len = (len); \ | 745 | unsigned int __len = (len); \ |
| 746 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 746 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 747 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 747 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -766,8 +766,8 @@ __kfifo_must_check_helper( \ | |||
| 766 | #define kfifo_out_peek(fifo, buf, n) \ | 766 | #define kfifo_out_peek(fifo, buf, n) \ |
| 767 | __kfifo_must_check_helper( \ | 767 | __kfifo_must_check_helper( \ |
| 768 | ({ \ | 768 | ({ \ |
| 769 | typeof(fifo + 1) __tmp = (fifo); \ | 769 | typeof((fifo) + 1) __tmp = (fifo); \ |
| 770 | typeof(buf + 1) __buf = (buf); \ | 770 | typeof((buf) + 1) __buf = (buf); \ |
| 771 | unsigned long __n = (n); \ | 771 | unsigned long __n = (n); \ |
| 772 | const size_t __recsize = sizeof(*__tmp->rectype); \ | 772 | const size_t __recsize = sizeof(*__tmp->rectype); \ |
| 773 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | 773 | struct __kfifo *__kfifo = &__tmp->kfifo; \ |
| @@ -836,6 +836,8 @@ extern void __kfifo_dma_out_finish_r(struct __kfifo *fifo, size_t recsize); | |||
| 836 | 836 | ||
| 837 | extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); | 837 | extern unsigned int __kfifo_len_r(struct __kfifo *fifo, size_t recsize); |
| 838 | 838 | ||
| 839 | extern void __kfifo_skip_r(struct __kfifo *fifo, size_t recsize); | ||
| 840 | |||
| 839 | extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo, | 841 | extern unsigned int __kfifo_out_peek_r(struct __kfifo *fifo, |
| 840 | void *buf, unsigned int len, size_t recsize); | 842 | void *buf, unsigned int len, size_t recsize); |
| 841 | 843 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index cf343a852534..7950a37a7146 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/compiler.h> | 22 | #include <linux/compiler.h> |
| 23 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 24 | #include <linux/kref.h> | 24 | #include <linux/kref.h> |
| 25 | #include <linux/kobject_ns.h> | ||
| 25 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
| 26 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
| 27 | #include <asm/atomic.h> | 28 | #include <asm/atomic.h> |
| @@ -136,42 +137,8 @@ struct kobj_attribute { | |||
| 136 | 137 | ||
| 137 | extern const struct sysfs_ops kobj_sysfs_ops; | 138 | extern const struct sysfs_ops kobj_sysfs_ops; |
| 138 | 139 | ||
| 139 | /* | ||
| 140 | * Namespace types which are used to tag kobjects and sysfs entries. | ||
| 141 | * Network namespace will likely be the first. | ||
| 142 | */ | ||
| 143 | enum kobj_ns_type { | ||
| 144 | KOBJ_NS_TYPE_NONE = 0, | ||
| 145 | KOBJ_NS_TYPE_NET, | ||
| 146 | KOBJ_NS_TYPES | ||
| 147 | }; | ||
| 148 | |||
| 149 | struct sock; | 140 | struct sock; |
| 150 | 141 | ||
| 151 | /* | ||
| 152 | * Callbacks so sysfs can determine namespaces | ||
| 153 | * @current_ns: return calling task's namespace | ||
| 154 | * @netlink_ns: return namespace to which a sock belongs (right?) | ||
| 155 | * @initial_ns: return the initial namespace (i.e. init_net_ns) | ||
| 156 | */ | ||
| 157 | struct kobj_ns_type_operations { | ||
| 158 | enum kobj_ns_type type; | ||
| 159 | const void *(*current_ns)(void); | ||
| 160 | const void *(*netlink_ns)(struct sock *sk); | ||
| 161 | const void *(*initial_ns)(void); | ||
| 162 | }; | ||
| 163 | |||
| 164 | int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); | ||
| 165 | int kobj_ns_type_registered(enum kobj_ns_type type); | ||
| 166 | const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); | ||
| 167 | const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); | ||
| 168 | |||
| 169 | const void *kobj_ns_current(enum kobj_ns_type type); | ||
| 170 | const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); | ||
| 171 | const void *kobj_ns_initial(enum kobj_ns_type type); | ||
| 172 | void kobj_ns_exit(enum kobj_ns_type type, const void *ns); | ||
| 173 | |||
| 174 | |||
| 175 | /** | 142 | /** |
| 176 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. | 143 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. |
| 177 | * | 144 | * |
diff --git a/include/linux/kobject_ns.h b/include/linux/kobject_ns.h new file mode 100644 index 000000000000..82cb5bf461fb --- /dev/null +++ b/include/linux/kobject_ns.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* Kernel object name space definitions | ||
| 2 | * | ||
| 3 | * Copyright (c) 2002-2003 Patrick Mochel | ||
| 4 | * Copyright (c) 2002-2003 Open Source Development Labs | ||
| 5 | * Copyright (c) 2006-2008 Greg Kroah-Hartman <greg@kroah.com> | ||
| 6 | * Copyright (c) 2006-2008 Novell Inc. | ||
| 7 | * | ||
| 8 | * Split from kobject.h by David Howells (dhowells@redhat.com) | ||
| 9 | * | ||
| 10 | * This file is released under the GPLv2. | ||
| 11 | * | ||
| 12 | * Please read Documentation/kobject.txt before using the kobject | ||
| 13 | * interface, ESPECIALLY the parts about reference counts and object | ||
| 14 | * destructors. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef _LINUX_KOBJECT_NS_H | ||
| 18 | #define _LINUX_KOBJECT_NS_H | ||
| 19 | |||
| 20 | struct sock; | ||
| 21 | struct kobject; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Namespace types which are used to tag kobjects and sysfs entries. | ||
| 25 | * Network namespace will likely be the first. | ||
| 26 | */ | ||
| 27 | enum kobj_ns_type { | ||
| 28 | KOBJ_NS_TYPE_NONE = 0, | ||
| 29 | KOBJ_NS_TYPE_NET, | ||
| 30 | KOBJ_NS_TYPES | ||
| 31 | }; | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Callbacks so sysfs can determine namespaces | ||
| 35 | * @current_ns: return calling task's namespace | ||
| 36 | * @netlink_ns: return namespace to which a sock belongs (right?) | ||
| 37 | * @initial_ns: return the initial namespace (i.e. init_net_ns) | ||
| 38 | */ | ||
| 39 | struct kobj_ns_type_operations { | ||
| 40 | enum kobj_ns_type type; | ||
| 41 | const void *(*current_ns)(void); | ||
| 42 | const void *(*netlink_ns)(struct sock *sk); | ||
| 43 | const void *(*initial_ns)(void); | ||
| 44 | }; | ||
| 45 | |||
| 46 | int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); | ||
| 47 | int kobj_ns_type_registered(enum kobj_ns_type type); | ||
| 48 | const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); | ||
| 49 | const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); | ||
| 50 | |||
| 51 | const void *kobj_ns_current(enum kobj_ns_type type); | ||
| 52 | const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); | ||
| 53 | const void *kobj_ns_initial(enum kobj_ns_type type); | ||
| 54 | void kobj_ns_exit(enum kobj_ns_type type, const void *ns); | ||
| 55 | |||
| 56 | #endif /* _LINUX_KOBJECT_NS_H */ | ||
diff --git a/include/linux/ksm.h b/include/linux/ksm.h index 74d691ee9121..3319a6967626 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h | |||
| @@ -16,6 +16,9 @@ | |||
| 16 | struct stable_node; | 16 | struct stable_node; |
| 17 | struct mem_cgroup; | 17 | struct mem_cgroup; |
| 18 | 18 | ||
| 19 | struct page *ksm_does_need_to_copy(struct page *page, | ||
| 20 | struct vm_area_struct *vma, unsigned long address); | ||
| 21 | |||
| 19 | #ifdef CONFIG_KSM | 22 | #ifdef CONFIG_KSM |
| 20 | int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | 23 | int ksm_madvise(struct vm_area_struct *vma, unsigned long start, |
| 21 | unsigned long end, int advice, unsigned long *vm_flags); | 24 | unsigned long end, int advice, unsigned long *vm_flags); |
| @@ -70,19 +73,14 @@ static inline void set_page_stable_node(struct page *page, | |||
| 70 | * We'd like to make this conditional on vma->vm_flags & VM_MERGEABLE, | 73 | * We'd like to make this conditional on vma->vm_flags & VM_MERGEABLE, |
| 71 | * but what if the vma was unmerged while the page was swapped out? | 74 | * but what if the vma was unmerged while the page was swapped out? |
| 72 | */ | 75 | */ |
| 73 | struct page *ksm_does_need_to_copy(struct page *page, | 76 | static inline int ksm_might_need_to_copy(struct page *page, |
| 74 | struct vm_area_struct *vma, unsigned long address); | ||
| 75 | static inline struct page *ksm_might_need_to_copy(struct page *page, | ||
| 76 | struct vm_area_struct *vma, unsigned long address) | 77 | struct vm_area_struct *vma, unsigned long address) |
| 77 | { | 78 | { |
| 78 | struct anon_vma *anon_vma = page_anon_vma(page); | 79 | struct anon_vma *anon_vma = page_anon_vma(page); |
| 79 | 80 | ||
| 80 | if (!anon_vma || | 81 | return anon_vma && |
| 81 | (anon_vma->root == vma->anon_vma->root && | 82 | (anon_vma->root != vma->anon_vma->root || |
| 82 | page->index == linear_page_index(vma, address))) | 83 | page->index != linear_page_index(vma, address)); |
| 83 | return page; | ||
| 84 | |||
| 85 | return ksm_does_need_to_copy(page, vma, address); | ||
| 86 | } | 84 | } |
| 87 | 85 | ||
| 88 | int page_referenced_ksm(struct page *page, | 86 | int page_referenced_ksm(struct page *page, |
| @@ -115,10 +113,10 @@ static inline int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | |||
| 115 | return 0; | 113 | return 0; |
| 116 | } | 114 | } |
| 117 | 115 | ||
| 118 | static inline struct page *ksm_might_need_to_copy(struct page *page, | 116 | static inline int ksm_might_need_to_copy(struct page *page, |
| 119 | struct vm_area_struct *vma, unsigned long address) | 117 | struct vm_area_struct *vma, unsigned long address) |
| 120 | { | 118 | { |
| 121 | return page; | 119 | return 0; |
| 122 | } | 120 | } |
| 123 | 121 | ||
| 124 | static inline int page_referenced_ksm(struct page *page, | 122 | static inline int page_referenced_ksm(struct page *page, |
diff --git a/include/linux/lglock.h b/include/linux/lglock.h new file mode 100644 index 000000000000..f549056fb20b --- /dev/null +++ b/include/linux/lglock.h | |||
| @@ -0,0 +1,172 @@ | |||
| 1 | /* | ||
| 2 | * Specialised local-global spinlock. Can only be declared as global variables | ||
| 3 | * to avoid overhead and keep things simple (and we don't want to start using | ||
| 4 | * these inside dynamically allocated structures). | ||
| 5 | * | ||
| 6 | * "local/global locks" (lglocks) can be used to: | ||
| 7 | * | ||
| 8 | * - Provide fast exclusive access to per-CPU data, with exclusive access to | ||
| 9 | * another CPU's data allowed but possibly subject to contention, and to | ||
| 10 | * provide very slow exclusive access to all per-CPU data. | ||
| 11 | * - Or to provide very fast and scalable read serialisation, and to provide | ||
| 12 | * very slow exclusive serialisation of data (not necessarily per-CPU data). | ||
| 13 | * | ||
| 14 | * Brlocks are also implemented as a short-hand notation for the latter use | ||
| 15 | * case. | ||
| 16 | * | ||
| 17 | * Copyright 2009, 2010, Nick Piggin, Novell Inc. | ||
| 18 | */ | ||
| 19 | #ifndef __LINUX_LGLOCK_H | ||
| 20 | #define __LINUX_LGLOCK_H | ||
| 21 | |||
| 22 | #include <linux/spinlock.h> | ||
| 23 | #include <linux/lockdep.h> | ||
| 24 | #include <linux/percpu.h> | ||
| 25 | |||
| 26 | /* can make br locks by using local lock for read side, global lock for write */ | ||
| 27 | #define br_lock_init(name) name##_lock_init() | ||
| 28 | #define br_read_lock(name) name##_local_lock() | ||
| 29 | #define br_read_unlock(name) name##_local_unlock() | ||
| 30 | #define br_write_lock(name) name##_global_lock_online() | ||
| 31 | #define br_write_unlock(name) name##_global_unlock_online() | ||
| 32 | |||
| 33 | #define DECLARE_BRLOCK(name) DECLARE_LGLOCK(name) | ||
| 34 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) | ||
| 35 | |||
| 36 | |||
| 37 | #define lg_lock_init(name) name##_lock_init() | ||
| 38 | #define lg_local_lock(name) name##_local_lock() | ||
| 39 | #define lg_local_unlock(name) name##_local_unlock() | ||
| 40 | #define lg_local_lock_cpu(name, cpu) name##_local_lock_cpu(cpu) | ||
| 41 | #define lg_local_unlock_cpu(name, cpu) name##_local_unlock_cpu(cpu) | ||
| 42 | #define lg_global_lock(name) name##_global_lock() | ||
| 43 | #define lg_global_unlock(name) name##_global_unlock() | ||
| 44 | #define lg_global_lock_online(name) name##_global_lock_online() | ||
| 45 | #define lg_global_unlock_online(name) name##_global_unlock_online() | ||
| 46 | |||
| 47 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 48 | #define LOCKDEP_INIT_MAP lockdep_init_map | ||
| 49 | |||
| 50 | #define DEFINE_LGLOCK_LOCKDEP(name) \ | ||
| 51 | struct lock_class_key name##_lock_key; \ | ||
| 52 | struct lockdep_map name##_lock_dep_map; \ | ||
| 53 | EXPORT_SYMBOL(name##_lock_dep_map) | ||
| 54 | |||
| 55 | #else | ||
| 56 | #define LOCKDEP_INIT_MAP(a, b, c, d) | ||
| 57 | |||
| 58 | #define DEFINE_LGLOCK_LOCKDEP(name) | ||
| 59 | #endif | ||
| 60 | |||
| 61 | |||
| 62 | #define DECLARE_LGLOCK(name) \ | ||
| 63 | extern void name##_lock_init(void); \ | ||
| 64 | extern void name##_local_lock(void); \ | ||
| 65 | extern void name##_local_unlock(void); \ | ||
| 66 | extern void name##_local_lock_cpu(int cpu); \ | ||
| 67 | extern void name##_local_unlock_cpu(int cpu); \ | ||
| 68 | extern void name##_global_lock(void); \ | ||
| 69 | extern void name##_global_unlock(void); \ | ||
| 70 | extern void name##_global_lock_online(void); \ | ||
| 71 | extern void name##_global_unlock_online(void); \ | ||
| 72 | |||
| 73 | #define DEFINE_LGLOCK(name) \ | ||
| 74 | \ | ||
| 75 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ | ||
| 76 | DEFINE_LGLOCK_LOCKDEP(name); \ | ||
| 77 | \ | ||
| 78 | void name##_lock_init(void) { \ | ||
| 79 | int i; \ | ||
| 80 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ | ||
| 81 | for_each_possible_cpu(i) { \ | ||
| 82 | arch_spinlock_t *lock; \ | ||
| 83 | lock = &per_cpu(name##_lock, i); \ | ||
| 84 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ | ||
| 85 | } \ | ||
| 86 | } \ | ||
| 87 | EXPORT_SYMBOL(name##_lock_init); \ | ||
| 88 | \ | ||
| 89 | void name##_local_lock(void) { \ | ||
| 90 | arch_spinlock_t *lock; \ | ||
| 91 | preempt_disable(); \ | ||
| 92 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
| 93 | lock = &__get_cpu_var(name##_lock); \ | ||
| 94 | arch_spin_lock(lock); \ | ||
| 95 | } \ | ||
| 96 | EXPORT_SYMBOL(name##_local_lock); \ | ||
| 97 | \ | ||
| 98 | void name##_local_unlock(void) { \ | ||
| 99 | arch_spinlock_t *lock; \ | ||
| 100 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
| 101 | lock = &__get_cpu_var(name##_lock); \ | ||
| 102 | arch_spin_unlock(lock); \ | ||
| 103 | preempt_enable(); \ | ||
| 104 | } \ | ||
| 105 | EXPORT_SYMBOL(name##_local_unlock); \ | ||
| 106 | \ | ||
| 107 | void name##_local_lock_cpu(int cpu) { \ | ||
| 108 | arch_spinlock_t *lock; \ | ||
| 109 | preempt_disable(); \ | ||
| 110 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
| 111 | lock = &per_cpu(name##_lock, cpu); \ | ||
| 112 | arch_spin_lock(lock); \ | ||
| 113 | } \ | ||
| 114 | EXPORT_SYMBOL(name##_local_lock_cpu); \ | ||
| 115 | \ | ||
| 116 | void name##_local_unlock_cpu(int cpu) { \ | ||
| 117 | arch_spinlock_t *lock; \ | ||
| 118 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
| 119 | lock = &per_cpu(name##_lock, cpu); \ | ||
| 120 | arch_spin_unlock(lock); \ | ||
| 121 | preempt_enable(); \ | ||
| 122 | } \ | ||
| 123 | EXPORT_SYMBOL(name##_local_unlock_cpu); \ | ||
| 124 | \ | ||
| 125 | void name##_global_lock_online(void) { \ | ||
| 126 | int i; \ | ||
| 127 | preempt_disable(); \ | ||
| 128 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
| 129 | for_each_online_cpu(i) { \ | ||
| 130 | arch_spinlock_t *lock; \ | ||
| 131 | lock = &per_cpu(name##_lock, i); \ | ||
| 132 | arch_spin_lock(lock); \ | ||
| 133 | } \ | ||
| 134 | } \ | ||
| 135 | EXPORT_SYMBOL(name##_global_lock_online); \ | ||
| 136 | \ | ||
| 137 | void name##_global_unlock_online(void) { \ | ||
| 138 | int i; \ | ||
| 139 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
| 140 | for_each_online_cpu(i) { \ | ||
| 141 | arch_spinlock_t *lock; \ | ||
| 142 | lock = &per_cpu(name##_lock, i); \ | ||
| 143 | arch_spin_unlock(lock); \ | ||
| 144 | } \ | ||
| 145 | preempt_enable(); \ | ||
| 146 | } \ | ||
| 147 | EXPORT_SYMBOL(name##_global_unlock_online); \ | ||
| 148 | \ | ||
| 149 | void name##_global_lock(void) { \ | ||
| 150 | int i; \ | ||
| 151 | preempt_disable(); \ | ||
| 152 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
| 153 | for_each_possible_cpu(i) { \ | ||
| 154 | arch_spinlock_t *lock; \ | ||
| 155 | lock = &per_cpu(name##_lock, i); \ | ||
| 156 | arch_spin_lock(lock); \ | ||
| 157 | } \ | ||
| 158 | } \ | ||
| 159 | EXPORT_SYMBOL(name##_global_lock); \ | ||
| 160 | \ | ||
| 161 | void name##_global_unlock(void) { \ | ||
| 162 | int i; \ | ||
| 163 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
| 164 | for_each_possible_cpu(i) { \ | ||
| 165 | arch_spinlock_t *lock; \ | ||
| 166 | lock = &per_cpu(name##_lock, i); \ | ||
| 167 | arch_spin_unlock(lock); \ | ||
| 168 | } \ | ||
| 169 | preempt_enable(); \ | ||
| 170 | } \ | ||
| 171 | EXPORT_SYMBOL(name##_global_unlock); | ||
| 172 | #endif | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index f010f18a0f86..45fb2967b66d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -335,6 +335,7 @@ enum { | |||
| 335 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ | 335 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ |
| 336 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ | 336 | ATA_EHI_NO_AUTOPSY = (1 << 2), /* no autopsy */ |
| 337 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ | 337 | ATA_EHI_QUIET = (1 << 3), /* be quiet */ |
| 338 | ATA_EHI_NO_RECOVERY = (1 << 4), /* no recovery */ | ||
| 338 | 339 | ||
| 339 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ | 340 | ATA_EHI_DID_SOFTRESET = (1 << 16), /* already soft-reset this port */ |
| 340 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ | 341 | ATA_EHI_DID_HARDRESET = (1 << 17), /* already soft-reset this port */ |
| @@ -723,6 +724,7 @@ struct ata_port { | |||
| 723 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ | 724 | struct ata_ioports ioaddr; /* ATA cmd/ctl/dma register blocks */ |
| 724 | u8 ctl; /* cache of ATA control register */ | 725 | u8 ctl; /* cache of ATA control register */ |
| 725 | u8 last_ctl; /* Cache last written value */ | 726 | u8 last_ctl; /* Cache last written value */ |
| 727 | struct ata_link* sff_pio_task_link; /* link currently used */ | ||
| 726 | struct delayed_work sff_pio_task; | 728 | struct delayed_work sff_pio_task; |
| 727 | #ifdef CONFIG_ATA_BMDMA | 729 | #ifdef CONFIG_ATA_BMDMA |
| 728 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ | 730 | struct ata_bmdma_prd *bmdma_prd; /* BMDMA SG list */ |
| @@ -1594,7 +1596,7 @@ extern void ata_sff_irq_on(struct ata_port *ap); | |||
| 1594 | extern void ata_sff_irq_clear(struct ata_port *ap); | 1596 | extern void ata_sff_irq_clear(struct ata_port *ap); |
| 1595 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, | 1597 | extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc, |
| 1596 | u8 status, int in_wq); | 1598 | u8 status, int in_wq); |
| 1597 | extern void ata_sff_queue_pio_task(struct ata_port *ap, unsigned long delay); | 1599 | extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay); |
| 1598 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); | 1600 | extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc); |
| 1599 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); | 1601 | extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc); |
| 1600 | extern unsigned int ata_sff_port_intr(struct ata_port *ap, | 1602 | extern unsigned int ata_sff_port_intr(struct ata_port *ap, |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index bafffc737903..18fd13028ba1 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ | 33 | #define MWAVE_MINOR 219 /* ACP/Mwave Modem */ |
| 34 | #define MPT_MINOR 220 | 34 | #define MPT_MINOR 220 |
| 35 | #define MPT2SAS_MINOR 221 | 35 | #define MPT2SAS_MINOR 221 |
| 36 | #define UINPUT_MINOR 223 | ||
| 36 | #define HPET_MINOR 228 | 37 | #define HPET_MINOR 228 |
| 37 | #define FUSE_MINOR 229 | 38 | #define FUSE_MINOR 229 |
| 38 | #define KVM_MINOR 232 | 39 | #define KVM_MINOR 232 |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 709f6728fc90..74949fbef8c6 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -78,7 +78,11 @@ extern unsigned int kobjsize(const void *objp); | |||
| 78 | #define VM_MAYSHARE 0x00000080 | 78 | #define VM_MAYSHARE 0x00000080 |
| 79 | 79 | ||
| 80 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ | 80 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ |
| 81 | #if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64) | ||
| 81 | #define VM_GROWSUP 0x00000200 | 82 | #define VM_GROWSUP 0x00000200 |
| 83 | #else | ||
| 84 | #define VM_GROWSUP 0x00000000 | ||
| 85 | #endif | ||
| 82 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | 86 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ |
| 83 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 87 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
| 84 | 88 | ||
| @@ -860,6 +864,12 @@ int set_page_dirty(struct page *page); | |||
| 860 | int set_page_dirty_lock(struct page *page); | 864 | int set_page_dirty_lock(struct page *page); |
| 861 | int clear_page_dirty_for_io(struct page *page); | 865 | int clear_page_dirty_for_io(struct page *page); |
| 862 | 866 | ||
| 867 | /* Is the vma a continuation of the stack vma above it? */ | ||
| 868 | static inline int vma_stack_continue(struct vm_area_struct *vma, unsigned long addr) | ||
| 869 | { | ||
| 870 | return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN); | ||
| 871 | } | ||
| 872 | |||
| 863 | extern unsigned long move_page_tables(struct vm_area_struct *vma, | 873 | extern unsigned long move_page_tables(struct vm_area_struct *vma, |
| 864 | unsigned long old_addr, struct vm_area_struct *new_vma, | 874 | unsigned long old_addr, struct vm_area_struct *new_vma, |
| 865 | unsigned long new_addr, unsigned long len); | 875 | unsigned long new_addr, unsigned long len); |
| @@ -1330,8 +1340,10 @@ unsigned long ra_submit(struct file_ra_state *ra, | |||
| 1330 | 1340 | ||
| 1331 | /* Do stack extension */ | 1341 | /* Do stack extension */ |
| 1332 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); | 1342 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); |
| 1333 | #ifdef CONFIG_IA64 | 1343 | #if VM_GROWSUP |
| 1334 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); | 1344 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); |
| 1345 | #else | ||
| 1346 | #define expand_upwards(vma, address) do { } while (0) | ||
| 1335 | #endif | 1347 | #endif |
| 1336 | extern int expand_stack_downwards(struct vm_area_struct *vma, | 1348 | extern int expand_stack_downwards(struct vm_area_struct *vma, |
| 1337 | unsigned long address); | 1349 | unsigned long address); |
| @@ -1357,7 +1369,15 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma) | |||
| 1357 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; | 1369 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; |
| 1358 | } | 1370 | } |
| 1359 | 1371 | ||
| 1372 | #ifdef CONFIG_MMU | ||
| 1360 | pgprot_t vm_get_page_prot(unsigned long vm_flags); | 1373 | pgprot_t vm_get_page_prot(unsigned long vm_flags); |
| 1374 | #else | ||
| 1375 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags) | ||
| 1376 | { | ||
| 1377 | return __pgprot(0); | ||
| 1378 | } | ||
| 1379 | #endif | ||
| 1380 | |||
| 1361 | struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); | 1381 | struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); |
| 1362 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 1382 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
| 1363 | unsigned long pfn, unsigned long size, pgprot_t); | 1383 | unsigned long pfn, unsigned long size, pgprot_t); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index b8bb9a6a1f37..ee7e258627f9 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -134,7 +134,7 @@ struct vm_area_struct { | |||
| 134 | within vm_mm. */ | 134 | within vm_mm. */ |
| 135 | 135 | ||
| 136 | /* linked list of VM areas per task, sorted by address */ | 136 | /* linked list of VM areas per task, sorted by address */ |
| 137 | struct vm_area_struct *vm_next; | 137 | struct vm_area_struct *vm_next, *vm_prev; |
| 138 | 138 | ||
| 139 | pgprot_t vm_page_prot; /* Access permissions of this VMA. */ | 139 | pgprot_t vm_page_prot; /* Access permissions of this VMA. */ |
| 140 | unsigned long vm_flags; /* Flags, see mm.h. */ | 140 | unsigned long vm_flags; /* Flags, see mm.h. */ |
diff --git a/include/linux/mmc/sdio.h b/include/linux/mmc/sdio.h index 329a8faa6e37..245cdacee544 100644 --- a/include/linux/mmc/sdio.h +++ b/include/linux/mmc/sdio.h | |||
| @@ -38,6 +38,8 @@ | |||
| 38 | * [8:0] Byte/block count | 38 | * [8:0] Byte/block count |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | #define R4_MEMORY_PRESENT (1 << 27) | ||
| 42 | |||
| 41 | /* | 43 | /* |
| 42 | SDIO status in R5 | 44 | SDIO status in R5 |
| 43 | Type | 45 | Type |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6e6e62648a4d..3984c4eb41fd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
| @@ -284,6 +284,13 @@ struct zone { | |||
| 284 | unsigned long watermark[NR_WMARK]; | 284 | unsigned long watermark[NR_WMARK]; |
| 285 | 285 | ||
| 286 | /* | 286 | /* |
| 287 | * When free pages are below this point, additional steps are taken | ||
| 288 | * when reading the number of free pages to avoid per-cpu counter | ||
| 289 | * drift allowing watermarks to be breached | ||
| 290 | */ | ||
| 291 | unsigned long percpu_drift_mark; | ||
| 292 | |||
| 293 | /* | ||
| 287 | * We don't know if the memory that we're going to allocate will be freeable | 294 | * We don't know if the memory that we're going to allocate will be freeable |
| 288 | * or/and it will be released eventually, so to avoid totally wasting several | 295 | * or/and it will be released eventually, so to avoid totally wasting several |
| 289 | * GB of ram we must reserve some of the lower zone memory (otherwise we risk | 296 | * GB of ram we must reserve some of the lower zone memory (otherwise we risk |
| @@ -441,6 +448,12 @@ static inline int zone_is_oom_locked(const struct zone *zone) | |||
| 441 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); | 448 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); |
| 442 | } | 449 | } |
| 443 | 450 | ||
| 451 | #ifdef CONFIG_SMP | ||
| 452 | unsigned long zone_nr_free_pages(struct zone *zone); | ||
| 453 | #else | ||
| 454 | #define zone_nr_free_pages(zone) zone_page_state(zone, NR_FREE_PAGES) | ||
| 455 | #endif /* CONFIG_SMP */ | ||
| 456 | |||
| 444 | /* | 457 | /* |
| 445 | * The "priority" of VM scanning is how much of the queues we will scan in one | 458 | * The "priority" of VM scanning is how much of the queues we will scan in one |
| 446 | * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the | 459 | * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 878cab4f5fcc..f363bc8fdc74 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
| @@ -78,6 +78,14 @@ struct mutex_waiter { | |||
| 78 | # include <linux/mutex-debug.h> | 78 | # include <linux/mutex-debug.h> |
| 79 | #else | 79 | #else |
| 80 | # define __DEBUG_MUTEX_INITIALIZER(lockname) | 80 | # define __DEBUG_MUTEX_INITIALIZER(lockname) |
| 81 | /** | ||
| 82 | * mutex_init - initialize the mutex | ||
| 83 | * @mutex: the mutex to be initialized | ||
| 84 | * | ||
| 85 | * Initialize the mutex to unlocked state. | ||
| 86 | * | ||
| 87 | * It is not allowed to initialize an already locked mutex. | ||
| 88 | */ | ||
| 81 | # define mutex_init(mutex) \ | 89 | # define mutex_init(mutex) \ |
| 82 | do { \ | 90 | do { \ |
| 83 | static struct lock_class_key __key; \ | 91 | static struct lock_class_key __key; \ |
diff --git a/include/linux/nbd.h b/include/linux/nbd.h index bb58854a8061..d146ca10c0f5 100644 --- a/include/linux/nbd.h +++ b/include/linux/nbd.h | |||
| @@ -88,7 +88,7 @@ struct nbd_request { | |||
| 88 | char handle[8]; | 88 | char handle[8]; |
| 89 | __be64 from; | 89 | __be64 from; |
| 90 | __be32 len; | 90 | __be32 len; |
| 91 | } __packed; | 91 | } __attribute__((packed)); |
| 92 | 92 | ||
| 93 | /* | 93 | /* |
| 94 | * This is the reply packet that nbd-server sends back to the client after | 94 | * This is the reply packet that nbd-server sends back to the client after |
diff --git a/include/linux/ncp.h b/include/linux/ncp.h index 3ace8370e61e..99f0adeeb3f3 100644 --- a/include/linux/ncp.h +++ b/include/linux/ncp.h | |||
| @@ -27,7 +27,7 @@ struct ncp_request_header { | |||
| 27 | __u8 conn_high; | 27 | __u8 conn_high; |
| 28 | __u8 function; | 28 | __u8 function; |
| 29 | __u8 data[0]; | 29 | __u8 data[0]; |
| 30 | } __packed; | 30 | } __attribute__((packed)); |
| 31 | 31 | ||
| 32 | #define NCP_REPLY (0x3333) | 32 | #define NCP_REPLY (0x3333) |
| 33 | #define NCP_WATCHDOG (0x3E3E) | 33 | #define NCP_WATCHDOG (0x3E3E) |
| @@ -42,7 +42,7 @@ struct ncp_reply_header { | |||
| 42 | __u8 completion_code; | 42 | __u8 completion_code; |
| 43 | __u8 connection_state; | 43 | __u8 connection_state; |
| 44 | __u8 data[0]; | 44 | __u8 data[0]; |
| 45 | } __packed; | 45 | } __attribute__((packed)); |
| 46 | 46 | ||
| 47 | #define NCP_VOLNAME_LEN (16) | 47 | #define NCP_VOLNAME_LEN (16) |
| 48 | #define NCP_NUMBER_OF_VOLUMES (256) | 48 | #define NCP_NUMBER_OF_VOLUMES (256) |
| @@ -158,7 +158,7 @@ struct nw_info_struct { | |||
| 158 | #ifdef __KERNEL__ | 158 | #ifdef __KERNEL__ |
| 159 | struct nw_nfs_info nfs; | 159 | struct nw_nfs_info nfs; |
| 160 | #endif | 160 | #endif |
| 161 | } __packed; | 161 | } __attribute__((packed)); |
| 162 | 162 | ||
| 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ | 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ |
| 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) | 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) |
| @@ -190,12 +190,12 @@ struct nw_modify_dos_info { | |||
| 190 | __u16 inheritanceGrantMask; | 190 | __u16 inheritanceGrantMask; |
| 191 | __u16 inheritanceRevokeMask; | 191 | __u16 inheritanceRevokeMask; |
| 192 | __u32 maximumSpace; | 192 | __u32 maximumSpace; |
| 193 | } __packed; | 193 | } __attribute__((packed)); |
| 194 | 194 | ||
| 195 | struct nw_search_sequence { | 195 | struct nw_search_sequence { |
| 196 | __u8 volNumber; | 196 | __u8 volNumber; |
| 197 | __u32 dirBase; | 197 | __u32 dirBase; |
| 198 | __u32 sequence; | 198 | __u32 sequence; |
| 199 | } __packed; | 199 | } __attribute__((packed)); |
| 200 | 200 | ||
| 201 | #endif /* _LINUX_NCP_H */ | 201 | #endif /* _LINUX_NCP_H */ |
diff --git a/include/linux/netfilter/xt_IDLETIMER.h b/include/linux/netfilter/xt_IDLETIMER.h index 3e1aa1be942e..208ae9387331 100644 --- a/include/linux/netfilter/xt_IDLETIMER.h +++ b/include/linux/netfilter/xt_IDLETIMER.h | |||
| @@ -39,7 +39,7 @@ struct idletimer_tg_info { | |||
| 39 | char label[MAX_IDLETIMER_LABEL_SIZE]; | 39 | char label[MAX_IDLETIMER_LABEL_SIZE]; |
| 40 | 40 | ||
| 41 | /* for kernel module internal use only */ | 41 | /* for kernel module internal use only */ |
| 42 | struct idletimer_tg *timer __attribute((aligned(8))); | 42 | struct idletimer_tg *timer __attribute__((aligned(8))); |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | #endif | 45 | #endif |
diff --git a/include/linux/netfilter/xt_ipvs.h b/include/linux/netfilter/xt_ipvs.h index 1167aeb7a347..eff34ac18808 100644 --- a/include/linux/netfilter/xt_ipvs.h +++ b/include/linux/netfilter/xt_ipvs.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #ifndef _XT_IPVS_H | 1 | #ifndef _XT_IPVS_H |
| 2 | #define _XT_IPVS_H | 2 | #define _XT_IPVS_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 4 | enum { | 6 | enum { |
| 5 | XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */ | 7 | XT_IPVS_IPVS_PROPERTY = 1 << 0, /* all other options imply this one */ |
| 6 | XT_IPVS_PROTO = 1 << 1, | 8 | XT_IPVS_PROTO = 1 << 1, |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 791d5109f34c..50d8009be86c 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -63,20 +63,20 @@ static inline bool netpoll_rx(struct sk_buff *skb) | |||
| 63 | unsigned long flags; | 63 | unsigned long flags; |
| 64 | bool ret = false; | 64 | bool ret = false; |
| 65 | 65 | ||
| 66 | rcu_read_lock_bh(); | 66 | local_irq_save(flags); |
| 67 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | 67 | npinfo = rcu_dereference_bh(skb->dev->npinfo); |
| 68 | 68 | ||
| 69 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 69 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) |
| 70 | goto out; | 70 | goto out; |
| 71 | 71 | ||
| 72 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 72 | spin_lock(&npinfo->rx_lock); |
| 73 | /* check rx_flags again with the lock held */ | 73 | /* check rx_flags again with the lock held */ |
| 74 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 74 | if (npinfo->rx_flags && __netpoll_rx(skb)) |
| 75 | ret = true; | 75 | ret = true; |
| 76 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | 76 | spin_unlock(&npinfo->rx_lock); |
| 77 | 77 | ||
| 78 | out: | 78 | out: |
| 79 | rcu_read_unlock_bh(); | 79 | local_irq_restore(flags); |
| 80 | return ret; | 80 | return ret; |
| 81 | } | 81 | } |
| 82 | 82 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index b1d17956a153..c8d95e369ff4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1214,6 +1214,9 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | |||
| 1214 | unsigned int devfn) | 1214 | unsigned int devfn) |
| 1215 | { return NULL; } | 1215 | { return NULL; } |
| 1216 | 1216 | ||
| 1217 | static inline int pci_domain_nr(struct pci_bus *bus) | ||
| 1218 | { return 0; } | ||
| 1219 | |||
| 1217 | #define dev_is_pci(d) (false) | 1220 | #define dev_is_pci(d) (false) |
| 1218 | #define dev_is_pf(d) (false) | 1221 | #define dev_is_pf(d) (false) |
| 1219 | #define dev_num_vf(d) (0) | 1222 | #define dev_num_vf(d) (0) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f6a3b2d36cad..10d33309e9a6 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2300,6 +2300,8 @@ | |||
| 2300 | #define PCI_DEVICE_ID_P2010 0x0079 | 2300 | #define PCI_DEVICE_ID_P2010 0x0079 |
| 2301 | #define PCI_DEVICE_ID_P1020E 0x0100 | 2301 | #define PCI_DEVICE_ID_P1020E 0x0100 |
| 2302 | #define PCI_DEVICE_ID_P1020 0x0101 | 2302 | #define PCI_DEVICE_ID_P1020 0x0101 |
| 2303 | #define PCI_DEVICE_ID_P1021E 0x0102 | ||
| 2304 | #define PCI_DEVICE_ID_P1021 0x0103 | ||
| 2303 | #define PCI_DEVICE_ID_P1011E 0x0108 | 2305 | #define PCI_DEVICE_ID_P1011E 0x0108 |
| 2304 | #define PCI_DEVICE_ID_P1011 0x0109 | 2306 | #define PCI_DEVICE_ID_P1011 0x0109 |
| 2305 | #define PCI_DEVICE_ID_P1022E 0x0110 | 2307 | #define PCI_DEVICE_ID_P1022E 0x0110 |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index b8b9084527b1..49466b13c5c6 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
| @@ -149,7 +149,7 @@ extern void __init percpu_init_late(void); | |||
| 149 | 149 | ||
| 150 | #else /* CONFIG_SMP */ | 150 | #else /* CONFIG_SMP */ |
| 151 | 151 | ||
| 152 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 152 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR((ptr)); }) |
| 153 | 153 | ||
| 154 | /* can't distinguish from other static vars, always false */ | 154 | /* can't distinguish from other static vars, always false */ |
| 155 | static inline bool is_kernel_percpu_address(unsigned long addr) | 155 | static inline bool is_kernel_percpu_address(unsigned long addr) |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index 24426c3d6b5a..76edadf046d3 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
| @@ -56,7 +56,7 @@ struct phonethdr { | |||
| 56 | __be16 pn_length; | 56 | __be16 pn_length; |
| 57 | __u8 pn_robj; | 57 | __u8 pn_robj; |
| 58 | __u8 pn_sobj; | 58 | __u8 pn_sobj; |
| 59 | } __packed; | 59 | } __attribute__((packed)); |
| 60 | 60 | ||
| 61 | /* Common Phonet payload header */ | 61 | /* Common Phonet payload header */ |
| 62 | struct phonetmsg { | 62 | struct phonetmsg { |
| @@ -98,7 +98,7 @@ struct sockaddr_pn { | |||
| 98 | __u8 spn_dev; | 98 | __u8 spn_dev; |
| 99 | __u8 spn_resource; | 99 | __u8 spn_resource; |
| 100 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; | 100 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; |
| 101 | } __packed; | 101 | } __attribute__((packed)); |
| 102 | 102 | ||
| 103 | /* Well known address */ | 103 | /* Well known address */ |
| 104 | #define PN_DEV_PC 0x10 | 104 | #define PN_DEV_PC 0x10 |
diff --git a/include/linux/pxa168_eth.h b/include/linux/pxa168_eth.h new file mode 100644 index 000000000000..18d75e795606 --- /dev/null +++ b/include/linux/pxa168_eth.h | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | /* | ||
| 2 | *pxa168 ethernet platform device data definition file. | ||
| 3 | */ | ||
| 4 | #ifndef __LINUX_PXA168_ETH_H | ||
| 5 | #define __LINUX_PXA168_ETH_H | ||
| 6 | |||
| 7 | struct pxa168_eth_platform_data { | ||
| 8 | int port_number; | ||
| 9 | int phy_addr; | ||
| 10 | |||
| 11 | /* | ||
| 12 | * If speed is 0, then speed and duplex are autonegotiated. | ||
| 13 | */ | ||
| 14 | int speed; /* 0, SPEED_10, SPEED_100 */ | ||
| 15 | int duplex; /* DUPLEX_HALF or DUPLEX_FULL */ | ||
| 16 | |||
| 17 | /* | ||
| 18 | * Override default RX/TX queue sizes if nonzero. | ||
| 19 | */ | ||
| 20 | int rx_queue_size; | ||
| 21 | int tx_queue_size; | ||
| 22 | |||
| 23 | /* | ||
| 24 | * init callback is used for board specific initialization | ||
| 25 | * e.g on Aspenite its used to initialize the PHY transceiver. | ||
| 26 | */ | ||
| 27 | int (*init)(void); | ||
| 28 | }; | ||
| 29 | |||
| 30 | #endif /* __LINUX_PXA168_ETH_H */ | ||
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index d50ba858cfe0..d1a9193960f1 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
| @@ -274,8 +274,14 @@ static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) | |||
| 274 | int ret; | 274 | int ret; |
| 275 | 275 | ||
| 276 | ret = dquot_alloc_space_nodirty(inode, nr); | 276 | ret = dquot_alloc_space_nodirty(inode, nr); |
| 277 | if (!ret) | 277 | if (!ret) { |
| 278 | mark_inode_dirty_sync(inode); | 278 | /* |
| 279 | * Mark inode fully dirty. Since we are allocating blocks, inode | ||
| 280 | * would become fully dirty soon anyway and it reportedly | ||
| 281 | * reduces inode_lock contention. | ||
| 282 | */ | ||
| 283 | mark_inode_dirty(inode); | ||
| 284 | } | ||
| 279 | return ret; | 285 | return ret; |
| 280 | } | 286 | } |
| 281 | 287 | ||
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 4f82326eb294..08c32e4f261a 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -81,7 +81,7 @@ struct rfkill_event { | |||
| 81 | __u8 type; | 81 | __u8 type; |
| 82 | __u8 op; | 82 | __u8 op; |
| 83 | __u8 soft, hard; | 83 | __u8 soft, hard; |
| 84 | } __packed; | 84 | } __attribute__((packed)); |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| 87 | * We are planning to be backward and forward compatible with changes | 87 | * We are planning to be backward and forward compatible with changes |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ce160d68f5e7..1e2a6db2d7dd 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -2109,7 +2109,9 @@ extern void daemonize(const char *, ...); | |||
| 2109 | extern int allow_signal(int); | 2109 | extern int allow_signal(int); |
| 2110 | extern int disallow_signal(int); | 2110 | extern int disallow_signal(int); |
| 2111 | 2111 | ||
| 2112 | extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); | 2112 | extern int do_execve(const char *, |
| 2113 | const char __user * const __user *, | ||
| 2114 | const char __user * const __user *, struct pt_regs *); | ||
| 2113 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); | 2115 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); |
| 2114 | struct task_struct *fork_idle(int); | 2116 | struct task_struct *fork_idle(int); |
| 2115 | 2117 | ||
diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 7415839ac890..5310d27abd2a 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h | |||
| @@ -26,6 +26,9 @@ struct semaphore { | |||
| 26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ | 26 | .wait_list = LIST_HEAD_INIT((name).wait_list), \ |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | #define DEFINE_SEMAPHORE(name) \ | ||
| 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | ||
| 31 | |||
| 29 | #define DECLARE_MUTEX(name) \ | 32 | #define DECLARE_MUTEX(name) \ |
| 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) | 33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) |
| 31 | 34 | ||
diff --git a/include/linux/serial.h b/include/linux/serial.h index 1ebc694a6d52..ef914061511e 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
| @@ -77,8 +77,7 @@ struct serial_struct { | |||
| 77 | #define PORT_16654 11 | 77 | #define PORT_16654 11 |
| 78 | #define PORT_16850 12 | 78 | #define PORT_16850 12 |
| 79 | #define PORT_RSA 13 /* RSA-DV II/S card */ | 79 | #define PORT_RSA 13 /* RSA-DV II/S card */ |
| 80 | #define PORT_U6_16550A 14 | 80 | #define PORT_MAX 13 |
| 81 | #define PORT_MAX 14 | ||
| 82 | 81 | ||
| 83 | #define SERIAL_IO_PORT 0 | 82 | #define SERIAL_IO_PORT 0 |
| 84 | #define SERIAL_IO_HUB6 1 | 83 | #define SERIAL_IO_HUB6 1 |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 3c2ad99fed34..563e23400913 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -44,7 +44,8 @@ | |||
| 44 | #define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */ | 44 | #define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */ |
| 45 | #define PORT_OCTEON 17 /* Cavium OCTEON internal UART */ | 45 | #define PORT_OCTEON 17 /* Cavium OCTEON internal UART */ |
| 46 | #define PORT_AR7 18 /* Texas Instruments AR7 internal UART */ | 46 | #define PORT_AR7 18 /* Texas Instruments AR7 internal UART */ |
| 47 | #define PORT_MAX_8250 18 /* max port ID */ | 47 | #define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */ |
| 48 | #define PORT_MAX_8250 19 /* max port ID */ | ||
| 48 | 49 | ||
| 49 | /* | 50 | /* |
| 50 | * ARM specific type numbers. These are not currently guaranteed | 51 | * ARM specific type numbers. These are not currently guaranteed |
| @@ -465,7 +466,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) | |||
| 465 | #ifdef SUPPORT_SYSRQ | 466 | #ifdef SUPPORT_SYSRQ |
| 466 | if (port->sysrq) { | 467 | if (port->sysrq) { |
| 467 | if (ch && time_before(jiffies, port->sysrq)) { | 468 | if (ch && time_before(jiffies, port->sysrq)) { |
| 468 | handle_sysrq(ch, port->state->port.tty); | 469 | handle_sysrq(ch); |
| 469 | port->sysrq = 0; | 470 | port->sysrq = 0; |
| 470 | return 1; | 471 | return 1; |
| 471 | } | 472 | } |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 6d14409c4d9a..9f63538928c0 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
| @@ -68,7 +68,7 @@ struct kmem_cache_order_objects { | |||
| 68 | * Slab cache management. | 68 | * Slab cache management. |
| 69 | */ | 69 | */ |
| 70 | struct kmem_cache { | 70 | struct kmem_cache { |
| 71 | struct kmem_cache_cpu *cpu_slab; | 71 | struct kmem_cache_cpu __percpu *cpu_slab; |
| 72 | /* Used for retriving partial slabs etc */ | 72 | /* Used for retriving partial slabs etc */ |
| 73 | unsigned long flags; | 73 | unsigned long flags; |
| 74 | int size; /* The size of an object including meta data */ | 74 | int size; /* The size of an object including meta data */ |
diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h index cc813f95a2f2..c91302f3a257 100644 --- a/include/linux/spi/dw_spi.h +++ b/include/linux/spi/dw_spi.h | |||
| @@ -14,7 +14,9 @@ | |||
| 14 | #define SPI_MODE_OFFSET 6 | 14 | #define SPI_MODE_OFFSET 6 |
| 15 | #define SPI_SCPH_OFFSET 6 | 15 | #define SPI_SCPH_OFFSET 6 |
| 16 | #define SPI_SCOL_OFFSET 7 | 16 | #define SPI_SCOL_OFFSET 7 |
| 17 | |||
| 17 | #define SPI_TMOD_OFFSET 8 | 18 | #define SPI_TMOD_OFFSET 8 |
| 19 | #define SPI_TMOD_MASK (0x3 << SPI_TMOD_OFFSET) | ||
| 18 | #define SPI_TMOD_TR 0x0 /* xmit & recv */ | 20 | #define SPI_TMOD_TR 0x0 /* xmit & recv */ |
| 19 | #define SPI_TMOD_TO 0x1 /* xmit only */ | 21 | #define SPI_TMOD_TO 0x1 /* xmit only */ |
| 20 | #define SPI_TMOD_RO 0x2 /* recv only */ | 22 | #define SPI_TMOD_RO 0x2 /* recv only */ |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index ae0a5286f558..92e52a1e6af3 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -213,6 +213,9 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
| 213 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. | 213 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. |
| 214 | * @mode_bits: flags understood by this controller driver | 214 | * @mode_bits: flags understood by this controller driver |
| 215 | * @flags: other constraints relevant to this driver | 215 | * @flags: other constraints relevant to this driver |
| 216 | * @bus_lock_spinlock: spinlock for SPI bus locking | ||
| 217 | * @bus_lock_mutex: mutex for SPI bus locking | ||
| 218 | * @bus_lock_flag: indicates that the SPI bus is locked for exclusive use | ||
| 216 | * @setup: updates the device mode and clocking records used by a | 219 | * @setup: updates the device mode and clocking records used by a |
| 217 | * device's SPI controller; protocol code may call this. This | 220 | * device's SPI controller; protocol code may call this. This |
| 218 | * must fail if an unrecognized or unsupported mode is requested. | 221 | * must fail if an unrecognized or unsupported mode is requested. |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 569dc722a600..85f38a63f098 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -30,7 +30,7 @@ struct rpc_inode; | |||
| 30 | * The high-level client handle | 30 | * The high-level client handle |
| 31 | */ | 31 | */ |
| 32 | struct rpc_clnt { | 32 | struct rpc_clnt { |
| 33 | struct kref cl_kref; /* Number of references */ | 33 | atomic_t cl_count; /* Number of references */ |
| 34 | struct list_head cl_clients; /* Global list of clients */ | 34 | struct list_head cl_clients; /* Global list of clients */ |
| 35 | struct list_head cl_tasks; /* List of tasks */ | 35 | struct list_head cl_tasks; /* List of tasks */ |
| 36 | spinlock_t cl_lock; /* spinlock */ | 36 | spinlock_t cl_lock; /* spinlock */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 2fee51a11b73..7cdd63366f88 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
| @@ -19,6 +19,7 @@ struct bio; | |||
| 19 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ | 19 | #define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ |
| 20 | #define SWAP_FLAG_PRIO_MASK 0x7fff | 20 | #define SWAP_FLAG_PRIO_MASK 0x7fff |
| 21 | #define SWAP_FLAG_PRIO_SHIFT 0 | 21 | #define SWAP_FLAG_PRIO_SHIFT 0 |
| 22 | #define SWAP_FLAG_DISCARD 0x10000 /* discard swap cluster after use */ | ||
| 22 | 23 | ||
| 23 | static inline int current_is_kswapd(void) | 24 | static inline int current_is_kswapd(void) |
| 24 | { | 25 | { |
| @@ -142,7 +143,7 @@ struct swap_extent { | |||
| 142 | enum { | 143 | enum { |
| 143 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ | 144 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
| 144 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ | 145 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ |
| 145 | SWP_DISCARDABLE = (1 << 2), /* blkdev supports discard */ | 146 | SWP_DISCARDABLE = (1 << 2), /* swapon+blkdev support discard */ |
| 146 | SWP_DISCARDING = (1 << 3), /* now discarding a free cluster */ | 147 | SWP_DISCARDING = (1 << 3), /* now discarding a free cluster */ |
| 147 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ | 148 | SWP_SOLIDSTATE = (1 << 4), /* blkdev seeks are cheap */ |
| 148 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ | 149 | SWP_CONTINUED = (1 << 5), /* swap_map has count continuation */ |
| @@ -315,6 +316,7 @@ extern long nr_swap_pages; | |||
| 315 | extern long total_swap_pages; | 316 | extern long total_swap_pages; |
| 316 | extern void si_swapinfo(struct sysinfo *); | 317 | extern void si_swapinfo(struct sysinfo *); |
| 317 | extern swp_entry_t get_swap_page(void); | 318 | extern swp_entry_t get_swap_page(void); |
| 319 | extern swp_entry_t get_swap_page_of_type(int); | ||
| 318 | extern int valid_swaphandles(swp_entry_t, unsigned long *); | 320 | extern int valid_swaphandles(swp_entry_t, unsigned long *); |
| 319 | extern int add_swap_count_continuation(swp_entry_t, gfp_t); | 321 | extern int add_swap_count_continuation(swp_entry_t, gfp_t); |
| 320 | extern void swap_shmem_alloc(swp_entry_t); | 322 | extern void swap_shmem_alloc(swp_entry_t); |
| @@ -331,13 +333,6 @@ extern int reuse_swap_page(struct page *); | |||
| 331 | extern int try_to_free_swap(struct page *); | 333 | extern int try_to_free_swap(struct page *); |
| 332 | struct backing_dev_info; | 334 | struct backing_dev_info; |
| 333 | 335 | ||
| 334 | #ifdef CONFIG_HIBERNATION | ||
| 335 | void hibernation_freeze_swap(void); | ||
| 336 | void hibernation_thaw_swap(void); | ||
| 337 | swp_entry_t get_swap_for_hibernation(int type); | ||
| 338 | void swap_free_for_hibernation(swp_entry_t val); | ||
| 339 | #endif | ||
| 340 | |||
| 341 | /* linux/mm/thrash.c */ | 336 | /* linux/mm/thrash.c */ |
| 342 | extern struct mm_struct *swap_token_mm; | 337 | extern struct mm_struct *swap_token_mm; |
| 343 | extern void grab_swap_token(struct mm_struct *); | 338 | extern void grab_swap_token(struct mm_struct *); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 6e5d19788634..e6319d18a55d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -820,7 +820,7 @@ asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, | |||
| 820 | u64 mask, int fd, | 820 | u64 mask, int fd, |
| 821 | const char __user *pathname); | 821 | const char __user *pathname); |
| 822 | 822 | ||
| 823 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | 823 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); |
| 824 | 824 | ||
| 825 | 825 | ||
| 826 | asmlinkage long sys_perf_event_open( | 826 | asmlinkage long sys_perf_event_open( |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 3c92121ba9af..96eb576d82fd 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | #include <linux/lockdep.h> | 18 | #include <linux/lockdep.h> |
| 19 | #include <linux/kobject_ns.h> | ||
| 19 | #include <asm/atomic.h> | 20 | #include <asm/atomic.h> |
| 20 | 21 | ||
| 21 | struct kobject; | 22 | struct kobject; |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 609e8ca5f534..387fa7d05c98 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
| @@ -15,9 +15,7 @@ | |||
| 15 | #define _LINUX_SYSRQ_H | 15 | #define _LINUX_SYSRQ_H |
| 16 | 16 | ||
| 17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 18 | 18 | #include <linux/types.h> | |
| 19 | struct pt_regs; | ||
| 20 | struct tty_struct; | ||
| 21 | 19 | ||
| 22 | /* Possible values of bitmask for enabling sysrq functions */ | 20 | /* Possible values of bitmask for enabling sysrq functions */ |
| 23 | /* 0x0001 is reserved for enable everything */ | 21 | /* 0x0001 is reserved for enable everything */ |
| @@ -31,7 +29,7 @@ struct tty_struct; | |||
| 31 | #define SYSRQ_ENABLE_RTNICE 0x0100 | 29 | #define SYSRQ_ENABLE_RTNICE 0x0100 |
| 32 | 30 | ||
| 33 | struct sysrq_key_op { | 31 | struct sysrq_key_op { |
| 34 | void (*handler)(int, struct tty_struct *); | 32 | void (*handler)(int); |
| 35 | char *help_msg; | 33 | char *help_msg; |
| 36 | char *action_msg; | 34 | char *action_msg; |
| 37 | int enable_mask; | 35 | int enable_mask; |
| @@ -44,8 +42,8 @@ struct sysrq_key_op { | |||
| 44 | * are available -- else NULL's). | 42 | * are available -- else NULL's). |
| 45 | */ | 43 | */ |
| 46 | 44 | ||
| 47 | void handle_sysrq(int key, struct tty_struct *tty); | 45 | void handle_sysrq(int key); |
| 48 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | 46 | void __handle_sysrq(int key, bool check_mask); |
| 49 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 47 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
| 50 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 48 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
| 51 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 49 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
| @@ -54,7 +52,11 @@ int sysrq_toggle_support(int enable_mask); | |||
| 54 | 52 | ||
| 55 | #else | 53 | #else |
| 56 | 54 | ||
| 57 | static inline void handle_sysrq(int key, struct tty_struct *tty) | 55 | static inline void handle_sysrq(int key) |
| 56 | { | ||
| 57 | } | ||
| 58 | |||
| 59 | static inline void __handle_sysrq(int key, bool check_mask) | ||
| 58 | { | 60 | { |
| 59 | } | 61 | } |
| 60 | 62 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1437da3ddc62..67d64e6efe7a 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -329,6 +329,13 @@ struct tty_struct { | |||
| 329 | struct tty_port *port; | 329 | struct tty_port *port; |
| 330 | }; | 330 | }; |
| 331 | 331 | ||
| 332 | /* Each of a tty's open files has private_data pointing to tty_file_private */ | ||
| 333 | struct tty_file_private { | ||
| 334 | struct tty_struct *tty; | ||
| 335 | struct file *file; | ||
| 336 | struct list_head list; | ||
| 337 | }; | ||
| 338 | |||
| 332 | /* tty magic number */ | 339 | /* tty magic number */ |
| 333 | #define TTY_MAGIC 0x5401 | 340 | #define TTY_MAGIC 0x5401 |
| 334 | 341 | ||
| @@ -458,6 +465,7 @@ extern void proc_clear_tty(struct task_struct *p); | |||
| 458 | extern struct tty_struct *get_current_tty(void); | 465 | extern struct tty_struct *get_current_tty(void); |
| 459 | extern void tty_default_fops(struct file_operations *fops); | 466 | extern void tty_default_fops(struct file_operations *fops); |
| 460 | extern struct tty_struct *alloc_tty_struct(void); | 467 | extern struct tty_struct *alloc_tty_struct(void); |
| 468 | extern void tty_add_file(struct tty_struct *tty, struct file *file); | ||
| 461 | extern void free_tty_struct(struct tty_struct *tty); | 469 | extern void free_tty_struct(struct tty_struct *tty); |
| 462 | extern void initialize_tty_struct(struct tty_struct *tty, | 470 | extern void initialize_tty_struct(struct tty_struct *tty, |
| 463 | struct tty_driver *driver, int idx); | 471 | struct tty_driver *driver, int idx); |
| @@ -470,6 +478,7 @@ extern struct tty_struct *tty_pair_get_tty(struct tty_struct *tty); | |||
| 470 | extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty); | 478 | extern struct tty_struct *tty_pair_get_pty(struct tty_struct *tty); |
| 471 | 479 | ||
| 472 | extern struct mutex tty_mutex; | 480 | extern struct mutex tty_mutex; |
| 481 | extern spinlock_t tty_files_lock; | ||
| 473 | 482 | ||
| 474 | extern void tty_write_unlock(struct tty_struct *tty); | 483 | extern void tty_write_unlock(struct tty_struct *tty); |
| 475 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); | 484 | extern int tty_write_lock(struct tty_struct *tty, int ndelay); |
diff --git a/include/linux/uinput.h b/include/linux/uinput.h index 60c81da77f0f..05f7fed2b173 100644 --- a/include/linux/uinput.h +++ b/include/linux/uinput.h | |||
| @@ -37,7 +37,6 @@ | |||
| 37 | #define UINPUT_VERSION 3 | 37 | #define UINPUT_VERSION 3 |
| 38 | 38 | ||
| 39 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
| 40 | #define UINPUT_MINOR 223 | ||
| 41 | #define UINPUT_NAME "uinput" | 40 | #define UINPUT_NAME "uinput" |
| 42 | #define UINPUT_BUFFER_SIZE 16 | 41 | #define UINPUT_BUFFER_SIZE 16 |
| 43 | #define UINPUT_NUM_REQUESTS 16 | 42 | #define UINPUT_NUM_REQUESTS 16 |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 890bc1472190..617068134ae8 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
| @@ -247,6 +247,7 @@ int usb_add_config(struct usb_composite_dev *, | |||
| 247 | * value; it should return zero on successful initialization. | 247 | * value; it should return zero on successful initialization. |
| 248 | * @unbind: Reverses @bind(); called as a side effect of unregistering | 248 | * @unbind: Reverses @bind(); called as a side effect of unregistering |
| 249 | * this driver. | 249 | * this driver. |
| 250 | * @disconnect: optional driver disconnect method | ||
| 250 | * @suspend: Notifies when the host stops sending USB traffic, | 251 | * @suspend: Notifies when the host stops sending USB traffic, |
| 251 | * after function notifications | 252 | * after function notifications |
| 252 | * @resume: Notifies configuration when the host restarts USB traffic, | 253 | * @resume: Notifies configuration when the host restarts USB traffic, |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 84a4c44c208b..55675b1efb28 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -342,8 +342,7 @@ extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, | |||
| 342 | extern void usb_serial_generic_process_read_urb(struct urb *urb); | 342 | extern void usb_serial_generic_process_read_urb(struct urb *urb); |
| 343 | extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, | 343 | extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, |
| 344 | void *dest, size_t size); | 344 | void *dest, size_t size); |
| 345 | extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, | 345 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, |
| 346 | struct usb_serial_port *port, | ||
| 347 | unsigned int ch); | 346 | unsigned int ch); |
| 348 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 347 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
| 349 | 348 | ||
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index 6228b5b77d35..e9e1524b582c 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
| @@ -93,8 +93,11 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev, | |||
| 93 | * Nested calls are supported (a per-resource counter is maintained) | 93 | * Nested calls are supported (a per-resource counter is maintained) |
| 94 | */ | 94 | */ |
| 95 | 95 | ||
| 96 | extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, | 96 | #if defined(CONFIG_VGA_ARB) |
| 97 | int interruptible); | 97 | extern int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible); |
| 98 | #else | ||
| 99 | static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible) { return 0; } | ||
| 100 | #endif | ||
| 98 | 101 | ||
| 99 | /** | 102 | /** |
| 100 | * vga_get_interruptible | 103 | * vga_get_interruptible |
| @@ -131,7 +134,11 @@ static inline int vga_get_uninterruptible(struct pci_dev *pdev, | |||
| 131 | * are already locked by another card. It can be called in any context | 134 | * are already locked by another card. It can be called in any context |
| 132 | */ | 135 | */ |
| 133 | 136 | ||
| 137 | #if defined(CONFIG_VGA_ARB) | ||
| 134 | extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); | 138 | extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); |
| 139 | #else | ||
| 140 | static inline int vga_tryget(struct pci_dev *pdev, unsigned int rsrc) { return 0; } | ||
| 141 | #endif | ||
| 135 | 142 | ||
| 136 | /** | 143 | /** |
| 137 | * vga_put - release lock on legacy VGA resources | 144 | * vga_put - release lock on legacy VGA resources |
| @@ -146,7 +153,11 @@ extern int vga_tryget(struct pci_dev *pdev, unsigned int rsrc); | |||
| 146 | * released if the counter reaches 0. | 153 | * released if the counter reaches 0. |
| 147 | */ | 154 | */ |
| 148 | 155 | ||
| 156 | #if defined(CONFIG_VGA_ARB) | ||
| 149 | extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); | 157 | extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); |
| 158 | #else | ||
| 159 | #define vga_put(pdev, rsrc) | ||
| 160 | #endif | ||
| 150 | 161 | ||
| 151 | 162 | ||
| 152 | /** | 163 | /** |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 7f43ccdc1d38..eaaea37b3b75 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
| @@ -170,6 +170,28 @@ static inline unsigned long zone_page_state(struct zone *zone, | |||
| 170 | return x; | 170 | return x; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | /* | ||
| 174 | * More accurate version that also considers the currently pending | ||
| 175 | * deltas. For that we need to loop over all cpus to find the current | ||
| 176 | * deltas. There is no synchronization so the result cannot be | ||
| 177 | * exactly accurate either. | ||
| 178 | */ | ||
| 179 | static inline unsigned long zone_page_state_snapshot(struct zone *zone, | ||
| 180 | enum zone_stat_item item) | ||
| 181 | { | ||
| 182 | long x = atomic_long_read(&zone->vm_stat[item]); | ||
| 183 | |||
| 184 | #ifdef CONFIG_SMP | ||
| 185 | int cpu; | ||
| 186 | for_each_online_cpu(cpu) | ||
| 187 | x += per_cpu_ptr(zone->pageset, cpu)->vm_stat_diff[item]; | ||
| 188 | |||
| 189 | if (x < 0) | ||
| 190 | x = 0; | ||
| 191 | #endif | ||
| 192 | return x; | ||
| 193 | } | ||
| 194 | |||
| 173 | extern unsigned long global_reclaimable_pages(void); | 195 | extern unsigned long global_reclaimable_pages(void); |
| 174 | extern unsigned long zone_reclaimable_pages(struct zone *zone); | 196 | extern unsigned long zone_reclaimable_pages(struct zone *zone); |
| 175 | 197 | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 4f9d277bcd9a..25e02c941bac 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -25,18 +25,20 @@ typedef void (*work_func_t)(struct work_struct *work); | |||
| 25 | 25 | ||
| 26 | enum { | 26 | enum { |
| 27 | WORK_STRUCT_PENDING_BIT = 0, /* work item is pending execution */ | 27 | WORK_STRUCT_PENDING_BIT = 0, /* work item is pending execution */ |
| 28 | WORK_STRUCT_CWQ_BIT = 1, /* data points to cwq */ | 28 | WORK_STRUCT_DELAYED_BIT = 1, /* work item is delayed */ |
| 29 | WORK_STRUCT_LINKED_BIT = 2, /* next work is linked to this one */ | 29 | WORK_STRUCT_CWQ_BIT = 2, /* data points to cwq */ |
| 30 | WORK_STRUCT_LINKED_BIT = 3, /* next work is linked to this one */ | ||
| 30 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 31 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
| 31 | WORK_STRUCT_STATIC_BIT = 3, /* static initializer (debugobjects) */ | 32 | WORK_STRUCT_STATIC_BIT = 4, /* static initializer (debugobjects) */ |
| 32 | WORK_STRUCT_COLOR_SHIFT = 4, /* color for workqueue flushing */ | 33 | WORK_STRUCT_COLOR_SHIFT = 5, /* color for workqueue flushing */ |
| 33 | #else | 34 | #else |
| 34 | WORK_STRUCT_COLOR_SHIFT = 3, /* color for workqueue flushing */ | 35 | WORK_STRUCT_COLOR_SHIFT = 4, /* color for workqueue flushing */ |
| 35 | #endif | 36 | #endif |
| 36 | 37 | ||
| 37 | WORK_STRUCT_COLOR_BITS = 4, | 38 | WORK_STRUCT_COLOR_BITS = 4, |
| 38 | 39 | ||
| 39 | WORK_STRUCT_PENDING = 1 << WORK_STRUCT_PENDING_BIT, | 40 | WORK_STRUCT_PENDING = 1 << WORK_STRUCT_PENDING_BIT, |
| 41 | WORK_STRUCT_DELAYED = 1 << WORK_STRUCT_DELAYED_BIT, | ||
| 40 | WORK_STRUCT_CWQ = 1 << WORK_STRUCT_CWQ_BIT, | 42 | WORK_STRUCT_CWQ = 1 << WORK_STRUCT_CWQ_BIT, |
| 41 | WORK_STRUCT_LINKED = 1 << WORK_STRUCT_LINKED_BIT, | 43 | WORK_STRUCT_LINKED = 1 << WORK_STRUCT_LINKED_BIT, |
| 42 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 44 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
| @@ -59,8 +61,8 @@ enum { | |||
| 59 | 61 | ||
| 60 | /* | 62 | /* |
| 61 | * Reserve 7 bits off of cwq pointer w/ debugobjects turned | 63 | * Reserve 7 bits off of cwq pointer w/ debugobjects turned |
| 62 | * off. This makes cwqs aligned to 128 bytes which isn't too | 64 | * off. This makes cwqs aligned to 256 bytes and allows 15 |
| 63 | * excessive while allowing 15 workqueue flush colors. | 65 | * workqueue flush colors. |
| 64 | */ | 66 | */ |
| 65 | WORK_STRUCT_FLAG_BITS = WORK_STRUCT_COLOR_SHIFT + | 67 | WORK_STRUCT_FLAG_BITS = WORK_STRUCT_COLOR_SHIFT + |
| 66 | WORK_STRUCT_COLOR_BITS, | 68 | WORK_STRUCT_COLOR_BITS, |
| @@ -233,6 +235,10 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
| 233 | #define work_clear_pending(work) \ | 235 | #define work_clear_pending(work) \ |
| 234 | clear_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) | 236 | clear_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) |
| 235 | 237 | ||
| 238 | /* | ||
| 239 | * Workqueue flags and constants. For details, please refer to | ||
| 240 | * Documentation/workqueue.txt. | ||
| 241 | */ | ||
| 236 | enum { | 242 | enum { |
| 237 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ | 243 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ |
| 238 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ | 244 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ |
| @@ -241,6 +247,8 @@ enum { | |||
| 241 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 247 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
| 242 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 248 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
| 243 | 249 | ||
| 250 | WQ_DYING = 1 << 6, /* internal: workqueue is dying */ | ||
| 251 | |||
| 244 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ | 252 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ |
| 245 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ | 253 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ |
| 246 | WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, | 254 | WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, |
diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h index 726cc3536409..ef6c24a529e1 100644 --- a/include/net/cls_cgroup.h +++ b/include/net/cls_cgroup.h | |||
| @@ -27,11 +27,17 @@ struct cgroup_cls_state | |||
| 27 | #ifdef CONFIG_NET_CLS_CGROUP | 27 | #ifdef CONFIG_NET_CLS_CGROUP |
| 28 | static inline u32 task_cls_classid(struct task_struct *p) | 28 | static inline u32 task_cls_classid(struct task_struct *p) |
| 29 | { | 29 | { |
| 30 | int classid; | ||
| 31 | |||
| 30 | if (in_interrupt()) | 32 | if (in_interrupt()) |
| 31 | return 0; | 33 | return 0; |
| 32 | 34 | ||
| 33 | return container_of(task_subsys_state(p, net_cls_subsys_id), | 35 | rcu_read_lock(); |
| 34 | struct cgroup_cls_state, css)->classid; | 36 | classid = container_of(task_subsys_state(p, net_cls_subsys_id), |
| 37 | struct cgroup_cls_state, css)->classid; | ||
| 38 | rcu_read_unlock(); | ||
| 39 | |||
| 40 | return classid; | ||
| 35 | } | 41 | } |
| 36 | #else | 42 | #else |
| 37 | extern int net_cls_subsys_id; | 43 | extern int net_cls_subsys_id; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index a4747a0f7303..f976885f686f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -955,6 +955,9 @@ static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum) | |||
| 955 | return csum_partial(diff, sizeof(diff), oldsum); | 955 | return csum_partial(diff, sizeof(diff), oldsum); |
| 956 | } | 956 | } |
| 957 | 957 | ||
| 958 | extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, | ||
| 959 | int outin); | ||
| 960 | |||
| 958 | #endif /* __KERNEL__ */ | 961 | #endif /* __KERNEL__ */ |
| 959 | 962 | ||
| 960 | #endif /* _NET_IP_VS_H */ | 963 | #endif /* _NET_IP_VS_H */ |
diff --git a/include/net/sock.h b/include/net/sock.h index ac53bfbdfe16..adab9dc58183 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -752,6 +752,7 @@ struct proto { | |||
| 752 | /* Keeping track of sk's, looking them up, and port selection methods. */ | 752 | /* Keeping track of sk's, looking them up, and port selection methods. */ |
| 753 | void (*hash)(struct sock *sk); | 753 | void (*hash)(struct sock *sk); |
| 754 | void (*unhash)(struct sock *sk); | 754 | void (*unhash)(struct sock *sk); |
| 755 | void (*rehash)(struct sock *sk); | ||
| 755 | int (*get_port)(struct sock *sk, unsigned short snum); | 756 | int (*get_port)(struct sock *sk, unsigned short snum); |
| 756 | 757 | ||
| 757 | /* Keeping track of sockets in use */ | 758 | /* Keeping track of sockets in use */ |
diff --git a/include/net/tcp.h b/include/net/tcp.h index df6a2eb20193..3e4b33e36602 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -268,11 +268,21 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3) | |||
| 268 | return seq3 - seq2 >= seq1 - seq2; | 268 | return seq3 - seq2 >= seq1 - seq2; |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | static inline int tcp_too_many_orphans(struct sock *sk, int num) | 271 | static inline bool tcp_too_many_orphans(struct sock *sk, int shift) |
| 272 | { | 272 | { |
| 273 | return (num > sysctl_tcp_max_orphans) || | 273 | struct percpu_counter *ocp = sk->sk_prot->orphan_count; |
| 274 | (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | 274 | int orphans = percpu_counter_read_positive(ocp); |
| 275 | atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]); | 275 | |
| 276 | if (orphans << shift > sysctl_tcp_max_orphans) { | ||
| 277 | orphans = percpu_counter_sum_positive(ocp); | ||
| 278 | if (orphans << shift > sysctl_tcp_max_orphans) | ||
| 279 | return true; | ||
| 280 | } | ||
| 281 | |||
| 282 | if (sk->sk_wmem_queued > SOCK_MIN_SNDBUF && | ||
| 283 | atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]) | ||
| 284 | return true; | ||
| 285 | return false; | ||
| 276 | } | 286 | } |
| 277 | 287 | ||
| 278 | /* syncookies: remember time of last synqueue overflow */ | 288 | /* syncookies: remember time of last synqueue overflow */ |
| @@ -465,8 +475,22 @@ extern unsigned int tcp_current_mss(struct sock *sk); | |||
| 465 | /* Bound MSS / TSO packet size with the half of the window */ | 475 | /* Bound MSS / TSO packet size with the half of the window */ |
| 466 | static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) | 476 | static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize) |
| 467 | { | 477 | { |
| 468 | if (tp->max_window && pktsize > (tp->max_window >> 1)) | 478 | int cutoff; |
| 469 | return max(tp->max_window >> 1, 68U - tp->tcp_header_len); | 479 | |
| 480 | /* When peer uses tiny windows, there is no use in packetizing | ||
| 481 | * to sub-MSS pieces for the sake of SWS or making sure there | ||
| 482 | * are enough packets in the pipe for fast recovery. | ||
| 483 | * | ||
| 484 | * On the other hand, for extremely large MSS devices, handling | ||
| 485 | * smaller than MSS windows in this way does make sense. | ||
| 486 | */ | ||
| 487 | if (tp->max_window >= 512) | ||
| 488 | cutoff = (tp->max_window >> 1); | ||
| 489 | else | ||
| 490 | cutoff = tp->max_window; | ||
| 491 | |||
| 492 | if (cutoff && pktsize > cutoff) | ||
| 493 | return max_t(int, cutoff, 68U - tp->tcp_header_len); | ||
| 470 | else | 494 | else |
| 471 | return pktsize; | 495 | return pktsize; |
| 472 | } | 496 | } |
diff --git a/include/net/udp.h b/include/net/udp.h index 7abdf305da50..a184d3496b13 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
| @@ -151,6 +151,7 @@ static inline void udp_lib_hash(struct sock *sk) | |||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | extern void udp_lib_unhash(struct sock *sk); | 153 | extern void udp_lib_unhash(struct sock *sk); |
| 154 | extern void udp_lib_rehash(struct sock *sk, u16 new_hash); | ||
| 154 | 155 | ||
| 155 | static inline void udp_lib_close(struct sock *sk, long timeout) | 156 | static inline void udp_lib_close(struct sock *sk, long timeout) |
| 156 | { | 157 | { |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 6a664c3f7c1e..7dc97d12253c 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
| @@ -1707,6 +1707,7 @@ struct snd_emu10k1 { | |||
| 1707 | unsigned int card_type; /* EMU10K1_CARD_* */ | 1707 | unsigned int card_type; /* EMU10K1_CARD_* */ |
| 1708 | unsigned int ecard_ctrl; /* ecard control bits */ | 1708 | unsigned int ecard_ctrl; /* ecard control bits */ |
| 1709 | unsigned long dma_mask; /* PCI DMA mask */ | 1709 | unsigned long dma_mask; /* PCI DMA mask */ |
| 1710 | unsigned int delay_pcm_irq; /* in samples */ | ||
| 1710 | int max_cache_pages; /* max memory size / PAGE_SIZE */ | 1711 | int max_cache_pages; /* max memory size / PAGE_SIZE */ |
| 1711 | struct snd_dma_buffer silent_page; /* silent page */ | 1712 | struct snd_dma_buffer silent_page; /* silent page */ |
| 1712 | struct snd_dma_buffer ptb_pages; /* page table pages */ | 1713 | struct snd_dma_buffer ptb_pages; /* page table pages */ |
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index c624126a9c8a..425bcfe56c62 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h | |||
| @@ -81,14 +81,16 @@ TRACE_EVENT(timer_expire_entry, | |||
| 81 | TP_STRUCT__entry( | 81 | TP_STRUCT__entry( |
| 82 | __field( void *, timer ) | 82 | __field( void *, timer ) |
| 83 | __field( unsigned long, now ) | 83 | __field( unsigned long, now ) |
| 84 | __field( void *, function) | ||
| 84 | ), | 85 | ), |
| 85 | 86 | ||
| 86 | TP_fast_assign( | 87 | TP_fast_assign( |
| 87 | __entry->timer = timer; | 88 | __entry->timer = timer; |
| 88 | __entry->now = jiffies; | 89 | __entry->now = jiffies; |
| 90 | __entry->function = timer->function; | ||
| 89 | ), | 91 | ), |
| 90 | 92 | ||
| 91 | TP_printk("timer=%p now=%lu", __entry->timer, __entry->now) | 93 | TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now) |
| 92 | ); | 94 | ); |
| 93 | 95 | ||
| 94 | /** | 96 | /** |
| @@ -200,14 +202,16 @@ TRACE_EVENT(hrtimer_expire_entry, | |||
| 200 | TP_STRUCT__entry( | 202 | TP_STRUCT__entry( |
| 201 | __field( void *, hrtimer ) | 203 | __field( void *, hrtimer ) |
| 202 | __field( s64, now ) | 204 | __field( s64, now ) |
| 205 | __field( void *, function) | ||
| 203 | ), | 206 | ), |
| 204 | 207 | ||
| 205 | TP_fast_assign( | 208 | TP_fast_assign( |
| 206 | __entry->hrtimer = hrtimer; | 209 | __entry->hrtimer = hrtimer; |
| 207 | __entry->now = now->tv64; | 210 | __entry->now = now->tv64; |
| 211 | __entry->function = hrtimer->function; | ||
| 208 | ), | 212 | ), |
| 209 | 213 | ||
| 210 | TP_printk("hrtimer=%p now=%llu", __entry->hrtimer, | 214 | TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function, |
| 211 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) | 215 | (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) |
| 212 | ); | 216 | ); |
| 213 | 217 | ||
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h new file mode 100644 index 000000000000..49682d7e9d60 --- /dev/null +++ b/include/trace/events/workqueue.h | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | #undef TRACE_SYSTEM | ||
| 2 | #define TRACE_SYSTEM workqueue | ||
| 3 | |||
| 4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
| 5 | #define _TRACE_WORKQUEUE_H | ||
| 6 | |||
| 7 | #include <linux/tracepoint.h> | ||
| 8 | #include <linux/workqueue.h> | ||
| 9 | |||
| 10 | /** | ||
| 11 | * workqueue_execute_start - called immediately before the workqueue callback | ||
| 12 | * @work: pointer to struct work_struct | ||
| 13 | * | ||
| 14 | * Allows to track workqueue execution. | ||
| 15 | */ | ||
| 16 | TRACE_EVENT(workqueue_execute_start, | ||
| 17 | |||
| 18 | TP_PROTO(struct work_struct *work), | ||
| 19 | |||
| 20 | TP_ARGS(work), | ||
| 21 | |||
| 22 | TP_STRUCT__entry( | ||
| 23 | __field( void *, work ) | ||
| 24 | __field( void *, function) | ||
| 25 | ), | ||
| 26 | |||
| 27 | TP_fast_assign( | ||
| 28 | __entry->work = work; | ||
| 29 | __entry->function = work->func; | ||
| 30 | ), | ||
| 31 | |||
| 32 | TP_printk("work struct %p: function %pf", __entry->work, __entry->function) | ||
| 33 | ); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * workqueue_execute_end - called immediately before the workqueue callback | ||
| 37 | * @work: pointer to struct work_struct | ||
| 38 | * | ||
| 39 | * Allows to track workqueue execution. | ||
| 40 | */ | ||
| 41 | TRACE_EVENT(workqueue_execute_end, | ||
| 42 | |||
| 43 | TP_PROTO(struct work_struct *work), | ||
| 44 | |||
| 45 | TP_ARGS(work), | ||
| 46 | |||
| 47 | TP_STRUCT__entry( | ||
| 48 | __field( void *, work ) | ||
| 49 | ), | ||
| 50 | |||
| 51 | TP_fast_assign( | ||
| 52 | __entry->work = work; | ||
| 53 | ), | ||
| 54 | |||
| 55 | TP_printk("work struct %p", __entry->work) | ||
| 56 | ); | ||
| 57 | |||
| 58 | |||
| 59 | #endif /* _TRACE_WORKQUEUE_H */ | ||
| 60 | |||
| 61 | /* This part must be outside protection */ | ||
| 62 | #include <trace/define_trace.h> | ||
diff --git a/include/xen/platform_pci.h b/include/xen/platform_pci.h index ce9d671c636c..a785a3b0c8c7 100644 --- a/include/xen/platform_pci.h +++ b/include/xen/platform_pci.h | |||
| @@ -16,11 +16,15 @@ | |||
| 16 | #define XEN_IOPORT_PROTOVER (XEN_IOPORT_BASE + 2) /* 1 byte access (R) */ | 16 | #define XEN_IOPORT_PROTOVER (XEN_IOPORT_BASE + 2) /* 1 byte access (R) */ |
| 17 | #define XEN_IOPORT_PRODNUM (XEN_IOPORT_BASE + 2) /* 2 byte access (W) */ | 17 | #define XEN_IOPORT_PRODNUM (XEN_IOPORT_BASE + 2) /* 2 byte access (W) */ |
| 18 | 18 | ||
| 19 | #define XEN_UNPLUG_ALL_IDE_DISKS 1 | 19 | #define XEN_UNPLUG_ALL_IDE_DISKS (1<<0) |
| 20 | #define XEN_UNPLUG_ALL_NICS 2 | 20 | #define XEN_UNPLUG_ALL_NICS (1<<1) |
| 21 | #define XEN_UNPLUG_AUX_IDE_DISKS 4 | 21 | #define XEN_UNPLUG_AUX_IDE_DISKS (1<<2) |
| 22 | #define XEN_UNPLUG_ALL 7 | 22 | #define XEN_UNPLUG_ALL (XEN_UNPLUG_ALL_IDE_DISKS|\ |
| 23 | #define XEN_UNPLUG_IGNORE 8 | 23 | XEN_UNPLUG_ALL_NICS|\ |
| 24 | XEN_UNPLUG_AUX_IDE_DISKS) | ||
| 25 | |||
| 26 | #define XEN_UNPLUG_UNNECESSARY (1<<16) | ||
| 27 | #define XEN_UNPLUG_NEVER (1<<17) | ||
| 24 | 28 | ||
| 25 | static inline int xen_must_unplug_nics(void) { | 29 | static inline int xen_must_unplug_nics(void) { |
| 26 | #if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \ | 30 | #if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \ |
