diff options
Diffstat (limited to 'include')
88 files changed, 1180 insertions, 413 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b0d62820ada1..9e6e1c6eb60a 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -440,8 +440,8 @@ static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | |||
440 | 440 | ||
441 | #else /* CONFIG_ACPI */ | 441 | #else /* CONFIG_ACPI */ |
442 | 442 | ||
443 | static int register_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } | 443 | static inline int register_acpi_bus_type(void *bus) { return 0; } |
444 | static int unregister_acpi_bus_type(struct acpi_bus_type *bus) { return 0; } | 444 | static inline int unregister_acpi_bus_type(void *bus) { return 0; } |
445 | 445 | ||
446 | #endif /* CONFIG_ACPI */ | 446 | #endif /* CONFIG_ACPI */ |
447 | 447 | ||
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild index 53f91b1ae53a..2c85a0f647b7 100644 --- a/include/asm-generic/Kbuild +++ b/include/asm-generic/Kbuild | |||
@@ -8,6 +8,7 @@ header-y += int-ll64.h | |||
8 | header-y += ioctl.h | 8 | header-y += ioctl.h |
9 | header-y += ioctls.h | 9 | header-y += ioctls.h |
10 | header-y += ipcbuf.h | 10 | header-y += ipcbuf.h |
11 | header-y += kvm_para.h | ||
11 | header-y += mman-common.h | 12 | header-y += mman-common.h |
12 | header-y += mman.h | 13 | header-y += mman.h |
13 | header-y += msgbuf.h | 14 | header-y += msgbuf.h |
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h index 4ae54e07de83..a7b0914348fd 100644 --- a/include/asm-generic/bitsperlong.h +++ b/include/asm-generic/bitsperlong.h | |||
@@ -28,5 +28,9 @@ | |||
28 | #error Inconsistent word size. Check asm/bitsperlong.h | 28 | #error Inconsistent word size. Check asm/bitsperlong.h |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #ifndef BITS_PER_LONG_LONG | ||
32 | #define BITS_PER_LONG_LONG 64 | ||
33 | #endif | ||
34 | |||
31 | #endif /* __KERNEL__ */ | 35 | #endif /* __KERNEL__ */ |
32 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ | 36 | #endif /* __ASM_GENERIC_BITS_PER_LONG */ |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 2520a6e241dc..9f02005f217a 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _ASM_GENERIC_BUG_H | 2 | #define _ASM_GENERIC_BUG_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/kernel.h> | ||
5 | 6 | ||
6 | #ifdef CONFIG_BUG | 7 | #ifdef CONFIG_BUG |
7 | 8 | ||
diff --git a/include/asm-generic/posix_types.h b/include/asm-generic/posix_types.h index 91d44bd4dde3..fe74fccf18db 100644 --- a/include/asm-generic/posix_types.h +++ b/include/asm-generic/posix_types.h | |||
@@ -23,10 +23,6 @@ typedef __kernel_ulong_t __kernel_ino_t; | |||
23 | typedef unsigned int __kernel_mode_t; | 23 | typedef unsigned int __kernel_mode_t; |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifndef __kernel_nlink_t | ||
27 | typedef __kernel_ulong_t __kernel_nlink_t; | ||
28 | #endif | ||
29 | |||
30 | #ifndef __kernel_pid_t | 26 | #ifndef __kernel_pid_t |
31 | typedef int __kernel_pid_t; | 27 | typedef int __kernel_pid_t; |
32 | #endif | 28 | #endif |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 73e45600f95d..bac55c215113 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -54,7 +54,7 @@ struct drm_mode_object { | |||
54 | struct drm_object_properties *properties; | 54 | struct drm_object_properties *properties; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | #define DRM_OBJECT_MAX_PROPERTY 16 | 57 | #define DRM_OBJECT_MAX_PROPERTY 24 |
58 | struct drm_object_properties { | 58 | struct drm_object_properties { |
59 | int count; | 59 | int count; |
60 | uint32_t ids[DRM_OBJECT_MAX_PROPERTY]; | 60 | uint32_t ids[DRM_OBJECT_MAX_PROPERTY]; |
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h index 6bd325fedc87..19a240446fca 100644 --- a/include/drm/drm_mem_util.h +++ b/include/drm/drm_mem_util.h | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | 32 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) |
33 | { | 33 | { |
34 | if (size != 0 && nmemb > ULONG_MAX / size) | 34 | if (size != 0 && nmemb > SIZE_MAX / size) |
35 | return NULL; | 35 | return NULL; |
36 | 36 | ||
37 | if (size * nmemb <= PAGE_SIZE) | 37 | if (size * nmemb <= PAGE_SIZE) |
@@ -44,7 +44,7 @@ static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | |||
44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ | 44 | /* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */ |
45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) | 45 | static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) |
46 | { | 46 | { |
47 | if (size != 0 && nmemb > ULONG_MAX / size) | 47 | if (size != 0 && nmemb > SIZE_MAX / size) |
48 | return NULL; | 48 | return NULL; |
49 | 49 | ||
50 | if (size * nmemb <= PAGE_SIZE) | 50 | if (size * nmemb <= PAGE_SIZE) |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 58d0bdab68dd..81368ab6c611 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -181,6 +181,7 @@ | |||
181 | {0x1002, 0x6747, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | 181 | {0x1002, 0x6747, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
182 | {0x1002, 0x6748, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | 182 | {0x1002, 0x6748, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
183 | {0x1002, 0x6749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | 183 | {0x1002, 0x6749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
184 | {0x1002, 0x674A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | ||
184 | {0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | 185 | {0x1002, 0x6750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
185 | {0x1002, 0x6751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | 186 | {0x1002, 0x6751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
186 | {0x1002, 0x6758, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ | 187 | {0x1002, 0x6758, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_TURKS|RADEON_NEW_MEMMAP}, \ |
@@ -198,6 +199,7 @@ | |||
198 | {0x1002, 0x6767, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | 199 | {0x1002, 0x6767, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
199 | {0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | 200 | {0x1002, 0x6768, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
200 | {0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | 201 | {0x1002, 0x6770, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
202 | {0x1002, 0x6771, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | ||
201 | {0x1002, 0x6772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | 203 | {0x1002, 0x6772, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
202 | {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | 204 | {0x1002, 0x6778, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
203 | {0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ | 205 | {0x1002, 0x6779, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CAICOS|RADEON_NEW_MEMMAP}, \ |
@@ -229,10 +231,11 @@ | |||
229 | {0x1002, 0x6827, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 231 | {0x1002, 0x6827, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
230 | {0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 232 | {0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ |
231 | {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 233 | {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ |
234 | {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
232 | {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 235 | {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
233 | {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 236 | {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
234 | {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 237 | {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
235 | {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 238 | {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
236 | {0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 239 | {0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ |
237 | {0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 240 | {0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ |
238 | {0x1002, 0x6839, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ | 241 | {0x1002, 0x6839, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ |
@@ -531,6 +534,7 @@ | |||
531 | {0x1002, 0x9645, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 534 | {0x1002, 0x9645, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO2|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
532 | {0x1002, 0x9647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ | 535 | {0x1002, 0x9647, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ |
533 | {0x1002, 0x9648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ | 536 | {0x1002, 0x9648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ |
537 | {0x1002, 0x9649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP},\ | ||
534 | {0x1002, 0x964a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 538 | {0x1002, 0x964a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
535 | {0x1002, 0x964b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 539 | {0x1002, 0x964b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
536 | {0x1002, 0x964c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 540 | {0x1002, 0x964c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SUMO|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
@@ -550,6 +554,7 @@ | |||
550 | {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 554 | {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
551 | {0x1002, 0x9808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 555 | {0x1002, 0x9808, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
552 | {0x1002, 0x9809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 556 | {0x1002, 0x9809, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
557 | {0x1002, 0x980A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
553 | {0x1002, 0x9900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 558 | {0x1002, 0x9900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
554 | {0x1002, 0x9901, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 559 | {0x1002, 0x9901, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
555 | {0x1002, 0x9903, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 560 | {0x1002, 0x9903, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
@@ -561,11 +566,19 @@ | |||
561 | {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 566 | {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
562 | {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 567 | {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
563 | {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 568 | {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
569 | {0x1002, 0x9910, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
570 | {0x1002, 0x9913, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
571 | {0x1002, 0x9917, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
572 | {0x1002, 0x9918, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
573 | {0x1002, 0x9919, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
564 | {0x1002, 0x9990, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 574 | {0x1002, 0x9990, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
565 | {0x1002, 0x9991, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 575 | {0x1002, 0x9991, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
566 | {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 576 | {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
567 | {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 577 | {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
568 | {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 578 | {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
579 | {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
580 | {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
581 | {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
569 | {0, 0, 0} | 582 | {0, 0, 0} |
570 | 583 | ||
571 | #define r128_PCI_IDS \ | 584 | #define r128_PCI_IDS \ |
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h index b6d7ce92eadd..68733587e700 100644 --- a/include/drm/exynos_drm.h +++ b/include/drm/exynos_drm.h | |||
@@ -64,6 +64,7 @@ struct drm_exynos_gem_map_off { | |||
64 | * A structure for mapping buffer. | 64 | * A structure for mapping buffer. |
65 | * | 65 | * |
66 | * @handle: a handle to gem object created. | 66 | * @handle: a handle to gem object created. |
67 | * @pad: just padding to be 64-bit aligned. | ||
67 | * @size: memory size to be mapped. | 68 | * @size: memory size to be mapped. |
68 | * @mapped: having user virtual address mmaped. | 69 | * @mapped: having user virtual address mmaped. |
69 | * - this variable would be filled by exynos gem module | 70 | * - this variable would be filled by exynos gem module |
@@ -72,7 +73,8 @@ struct drm_exynos_gem_map_off { | |||
72 | */ | 73 | */ |
73 | struct drm_exynos_gem_mmap { | 74 | struct drm_exynos_gem_mmap { |
74 | unsigned int handle; | 75 | unsigned int handle; |
75 | unsigned int size; | 76 | unsigned int pad; |
77 | uint64_t size; | ||
76 | uint64_t mapped; | 78 | uint64_t mapped; |
77 | }; | 79 | }; |
78 | 80 | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 7185b8f15ced..8760be30b375 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -226,6 +226,7 @@ header-y += kdev_t.h | |||
226 | header-y += kernel.h | 226 | header-y += kernel.h |
227 | header-y += kernelcapi.h | 227 | header-y += kernelcapi.h |
228 | header-y += kernel-page-flags.h | 228 | header-y += kernel-page-flags.h |
229 | header-y += kexec.h | ||
229 | header-y += keyboard.h | 230 | header-y += keyboard.h |
230 | header-y += keyctl.h | 231 | header-y += keyctl.h |
231 | header-y += l2tp.h | 232 | header-y += l2tp.h |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 81e803e90aa4..acba894374a1 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -132,6 +132,7 @@ extern u64 clockevent_delta2ns(unsigned long latch, | |||
132 | struct clock_event_device *evt); | 132 | struct clock_event_device *evt); |
133 | extern void clockevents_register_device(struct clock_event_device *dev); | 133 | extern void clockevents_register_device(struct clock_event_device *dev); |
134 | 134 | ||
135 | extern void clockevents_config(struct clock_event_device *dev, u32 freq); | ||
135 | extern void clockevents_config_and_register(struct clock_event_device *dev, | 136 | extern void clockevents_config_and_register(struct clock_event_device *dev, |
136 | u32 freq, unsigned long min_delta, | 137 | u32 freq, unsigned long min_delta, |
137 | unsigned long max_delta); | 138 | unsigned long max_delta); |
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index e988037abd2a..51a90b7f2d60 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _LINUX_COMPACTION_H | 1 | #ifndef _LINUX_COMPACTION_H |
2 | #define _LINUX_COMPACTION_H | 2 | #define _LINUX_COMPACTION_H |
3 | 3 | ||
4 | #include <linux/node.h> | ||
5 | |||
6 | /* Return values for compact_zone() and try_to_compact_pages() */ | 4 | /* Return values for compact_zone() and try_to_compact_pages() */ |
7 | /* compaction didn't start as it was not possible or direct reclaim was more suitable */ | 5 | /* compaction didn't start as it was not possible or direct reclaim was more suitable */ |
8 | #define COMPACT_SKIPPED 0 | 6 | #define COMPACT_SKIPPED 0 |
@@ -13,23 +11,6 @@ | |||
13 | /* The full zone was compacted */ | 11 | /* The full zone was compacted */ |
14 | #define COMPACT_COMPLETE 3 | 12 | #define COMPACT_COMPLETE 3 |
15 | 13 | ||
16 | /* | ||
17 | * compaction supports three modes | ||
18 | * | ||
19 | * COMPACT_ASYNC_MOVABLE uses asynchronous migration and only scans | ||
20 | * MIGRATE_MOVABLE pageblocks as migration sources and targets. | ||
21 | * COMPACT_ASYNC_UNMOVABLE uses asynchronous migration and only scans | ||
22 | * MIGRATE_MOVABLE pageblocks as migration sources. | ||
23 | * MIGRATE_UNMOVABLE pageblocks are scanned as potential migration | ||
24 | * targets and convers them to MIGRATE_MOVABLE if possible | ||
25 | * COMPACT_SYNC uses synchronous migration and scans all pageblocks | ||
26 | */ | ||
27 | enum compact_mode { | ||
28 | COMPACT_ASYNC_MOVABLE, | ||
29 | COMPACT_ASYNC_UNMOVABLE, | ||
30 | COMPACT_SYNC, | ||
31 | }; | ||
32 | |||
33 | #ifdef CONFIG_COMPACTION | 14 | #ifdef CONFIG_COMPACTION |
34 | extern int sysctl_compact_memory; | 15 | extern int sysctl_compact_memory; |
35 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, | 16 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 5d46217f84ad..4e890394ef99 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -577,8 +577,7 @@ extern ssize_t compat_rw_copy_check_uvector(int type, | |||
577 | const struct compat_iovec __user *uvector, | 577 | const struct compat_iovec __user *uvector, |
578 | unsigned long nr_segs, | 578 | unsigned long nr_segs, |
579 | unsigned long fast_segs, struct iovec *fast_pointer, | 579 | unsigned long fast_segs, struct iovec *fast_pointer, |
580 | struct iovec **ret_pointer, | 580 | struct iovec **ret_pointer); |
581 | int check_access); | ||
582 | 581 | ||
583 | extern void __user *compat_alloc_user_space(unsigned long len); | 582 | extern void __user *compat_alloc_user_space(unsigned long len); |
584 | 583 | ||
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 7230bb59a06f..2e9b9ebbeb78 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -177,6 +177,7 @@ extern void put_online_cpus(void); | |||
177 | #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) | 177 | #define hotcpu_notifier(fn, pri) cpu_notifier(fn, pri) |
178 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | 178 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) |
179 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | 179 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) |
180 | void clear_tasks_mm_cpumask(int cpu); | ||
180 | int cpu_down(unsigned int cpu); | 181 | int cpu_down(unsigned int cpu); |
181 | 182 | ||
182 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE | 183 | #ifdef CONFIG_ARCH_CPU_PROBE_RELEASE |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 917dc5aeb1d4..ebbed2ce6637 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -277,17 +277,13 @@ static inline void put_cred(const struct cred *_cred) | |||
277 | * @task: The task to query | 277 | * @task: The task to query |
278 | * | 278 | * |
279 | * Access the objective credentials of a task. The caller must hold the RCU | 279 | * Access the objective credentials of a task. The caller must hold the RCU |
280 | * readlock or the task must be dead and unable to change its own credentials. | 280 | * readlock. |
281 | * | 281 | * |
282 | * The result of this function should not be passed directly to get_cred(); | 282 | * The result of this function should not be passed directly to get_cred(); |
283 | * rather get_task_cred() should be used instead. | 283 | * rather get_task_cred() should be used instead. |
284 | */ | 284 | */ |
285 | #define __task_cred(task) \ | 285 | #define __task_cred(task) \ |
286 | ({ \ | 286 | rcu_dereference((task)->real_cred) |
287 | const struct task_struct *__t = (task); \ | ||
288 | rcu_dereference_check(__t->real_cred, \ | ||
289 | task_is_dead(__t)); \ | ||
290 | }) | ||
291 | 287 | ||
292 | /** | 288 | /** |
293 | * get_current_cred - Get the current task's subjective credentials | 289 | * get_current_cred - Get the current task's subjective credentials |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index d3fec584e8c3..56377df39124 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -635,6 +635,18 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg( | |||
635 | dir, flags, NULL); | 635 | dir, flags, NULL); |
636 | } | 636 | } |
637 | 637 | ||
638 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
639 | struct rio_dma_ext; | ||
640 | static inline struct dma_async_tx_descriptor *dmaengine_prep_rio_sg( | ||
641 | struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, | ||
642 | enum dma_transfer_direction dir, unsigned long flags, | ||
643 | struct rio_dma_ext *rio_ext) | ||
644 | { | ||
645 | return chan->device->device_prep_slave_sg(chan, sgl, sg_len, | ||
646 | dir, flags, rio_ext); | ||
647 | } | ||
648 | #endif | ||
649 | |||
638 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( | 650 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( |
639 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, | 651 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, |
640 | size_t period_len, enum dma_transfer_direction dir) | 652 | size_t period_len, enum dma_transfer_direction dir) |
diff --git a/include/linux/errno.h b/include/linux/errno.h index 2d09bfa5c262..e0de516374da 100644 --- a/include/linux/errno.h +++ b/include/linux/errno.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define ENOIOCTLCMD 515 /* No ioctl command */ | 17 | #define ENOIOCTLCMD 515 /* No ioctl command */ |
18 | #define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ | 18 | #define ERESTART_RESTARTBLOCK 516 /* restart by calling sys_restart_syscall */ |
19 | #define EPROBE_DEFER 517 /* Driver requests probe retry */ | 19 | #define EPROBE_DEFER 517 /* Driver requests probe retry */ |
20 | #define EOPENSTALE 518 /* open found a stale dentry */ | ||
20 | 21 | ||
21 | /* Defined for the NFSv3 protocol */ | 22 | /* Defined for the NFSv3 protocol */ |
22 | #define EBADHANDLE 521 /* Illegal NFS file handle */ | 23 | #define EBADHANDLE 521 /* Illegal NFS file handle */ |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index 91bb4f27238c..3c3ef19a625a 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -34,7 +34,7 @@ void eventfd_ctx_put(struct eventfd_ctx *ctx); | |||
34 | struct file *eventfd_fget(int fd); | 34 | struct file *eventfd_fget(int fd); |
35 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); | 35 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); |
36 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); | 36 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); |
37 | int eventfd_signal(struct eventfd_ctx *ctx, int n); | 37 | __u64 eventfd_signal(struct eventfd_ctx *ctx, __u64 n); |
38 | ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt); | 38 | ssize_t eventfd_ctx_read(struct eventfd_ctx *ctx, int no_wait, __u64 *cnt); |
39 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait, | 39 | int eventfd_ctx_remove_wait_queue(struct eventfd_ctx *ctx, wait_queue_t *wait, |
40 | __u64 *cnt); | 40 | __u64 *cnt); |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 3a4cef5322dc..12291a7ee275 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -165,8 +165,8 @@ struct fid { | |||
165 | */ | 165 | */ |
166 | 166 | ||
167 | struct export_operations { | 167 | struct export_operations { |
168 | int (*encode_fh)(struct dentry *de, __u32 *fh, int *max_len, | 168 | int (*encode_fh)(struct inode *inode, __u32 *fh, int *max_len, |
169 | int connectable); | 169 | struct inode *parent); |
170 | struct dentry * (*fh_to_dentry)(struct super_block *sb, struct fid *fid, | 170 | struct dentry * (*fh_to_dentry)(struct super_block *sb, struct fid *fid, |
171 | int fh_len, int fh_type); | 171 | int fh_len, int fh_type); |
172 | struct dentry * (*fh_to_parent)(struct super_block *sb, struct fid *fid, | 172 | struct dentry * (*fh_to_parent)(struct super_block *sb, struct fid *fid, |
diff --git a/include/linux/fb.h b/include/linux/fb.h index a3229d7ab9f2..ac3f1c605843 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -611,6 +611,7 @@ struct fb_deferred_io { | |||
611 | struct mutex lock; /* mutex that protects the page list */ | 611 | struct mutex lock; /* mutex that protects the page list */ |
612 | struct list_head pagelist; /* list of touched pages */ | 612 | struct list_head pagelist; /* list of touched pages */ |
613 | /* callback */ | 613 | /* callback */ |
614 | void (*first_io)(struct fb_info *info); | ||
614 | void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); | 615 | void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); |
615 | }; | 616 | }; |
616 | #endif | 617 | #endif |
diff --git a/include/linux/frontswap.h b/include/linux/frontswap.h new file mode 100644 index 000000000000..0e4e2eec5c1d --- /dev/null +++ b/include/linux/frontswap.h | |||
@@ -0,0 +1,127 @@ | |||
1 | #ifndef _LINUX_FRONTSWAP_H | ||
2 | #define _LINUX_FRONTSWAP_H | ||
3 | |||
4 | #include <linux/swap.h> | ||
5 | #include <linux/mm.h> | ||
6 | #include <linux/bitops.h> | ||
7 | |||
8 | struct frontswap_ops { | ||
9 | void (*init)(unsigned); | ||
10 | int (*store)(unsigned, pgoff_t, struct page *); | ||
11 | int (*load)(unsigned, pgoff_t, struct page *); | ||
12 | void (*invalidate_page)(unsigned, pgoff_t); | ||
13 | void (*invalidate_area)(unsigned); | ||
14 | }; | ||
15 | |||
16 | extern bool frontswap_enabled; | ||
17 | extern struct frontswap_ops | ||
18 | frontswap_register_ops(struct frontswap_ops *ops); | ||
19 | extern void frontswap_shrink(unsigned long); | ||
20 | extern unsigned long frontswap_curr_pages(void); | ||
21 | extern void frontswap_writethrough(bool); | ||
22 | |||
23 | extern void __frontswap_init(unsigned type); | ||
24 | extern int __frontswap_store(struct page *page); | ||
25 | extern int __frontswap_load(struct page *page); | ||
26 | extern void __frontswap_invalidate_page(unsigned, pgoff_t); | ||
27 | extern void __frontswap_invalidate_area(unsigned); | ||
28 | |||
29 | #ifdef CONFIG_FRONTSWAP | ||
30 | |||
31 | static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset) | ||
32 | { | ||
33 | bool ret = false; | ||
34 | |||
35 | if (frontswap_enabled && sis->frontswap_map) | ||
36 | ret = test_bit(offset, sis->frontswap_map); | ||
37 | return ret; | ||
38 | } | ||
39 | |||
40 | static inline void frontswap_set(struct swap_info_struct *sis, pgoff_t offset) | ||
41 | { | ||
42 | if (frontswap_enabled && sis->frontswap_map) | ||
43 | set_bit(offset, sis->frontswap_map); | ||
44 | } | ||
45 | |||
46 | static inline void frontswap_clear(struct swap_info_struct *sis, pgoff_t offset) | ||
47 | { | ||
48 | if (frontswap_enabled && sis->frontswap_map) | ||
49 | clear_bit(offset, sis->frontswap_map); | ||
50 | } | ||
51 | |||
52 | static inline void frontswap_map_set(struct swap_info_struct *p, | ||
53 | unsigned long *map) | ||
54 | { | ||
55 | p->frontswap_map = map; | ||
56 | } | ||
57 | |||
58 | static inline unsigned long *frontswap_map_get(struct swap_info_struct *p) | ||
59 | { | ||
60 | return p->frontswap_map; | ||
61 | } | ||
62 | #else | ||
63 | /* all inline routines become no-ops and all externs are ignored */ | ||
64 | |||
65 | #define frontswap_enabled (0) | ||
66 | |||
67 | static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset) | ||
68 | { | ||
69 | return false; | ||
70 | } | ||
71 | |||
72 | static inline void frontswap_set(struct swap_info_struct *sis, pgoff_t offset) | ||
73 | { | ||
74 | } | ||
75 | |||
76 | static inline void frontswap_clear(struct swap_info_struct *sis, pgoff_t offset) | ||
77 | { | ||
78 | } | ||
79 | |||
80 | static inline void frontswap_map_set(struct swap_info_struct *p, | ||
81 | unsigned long *map) | ||
82 | { | ||
83 | } | ||
84 | |||
85 | static inline unsigned long *frontswap_map_get(struct swap_info_struct *p) | ||
86 | { | ||
87 | return NULL; | ||
88 | } | ||
89 | #endif | ||
90 | |||
91 | static inline int frontswap_store(struct page *page) | ||
92 | { | ||
93 | int ret = -1; | ||
94 | |||
95 | if (frontswap_enabled) | ||
96 | ret = __frontswap_store(page); | ||
97 | return ret; | ||
98 | } | ||
99 | |||
100 | static inline int frontswap_load(struct page *page) | ||
101 | { | ||
102 | int ret = -1; | ||
103 | |||
104 | if (frontswap_enabled) | ||
105 | ret = __frontswap_load(page); | ||
106 | return ret; | ||
107 | } | ||
108 | |||
109 | static inline void frontswap_invalidate_page(unsigned type, pgoff_t offset) | ||
110 | { | ||
111 | if (frontswap_enabled) | ||
112 | __frontswap_invalidate_page(type, offset); | ||
113 | } | ||
114 | |||
115 | static inline void frontswap_invalidate_area(unsigned type) | ||
116 | { | ||
117 | if (frontswap_enabled) | ||
118 | __frontswap_invalidate_area(type); | ||
119 | } | ||
120 | |||
121 | static inline void frontswap_init(unsigned type) | ||
122 | { | ||
123 | if (frontswap_enabled) | ||
124 | __frontswap_init(type); | ||
125 | } | ||
126 | |||
127 | #endif /* _LINUX_FRONTSWAP_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 038076b27ea4..17fd887c798f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -173,6 +173,15 @@ struct inodes_stat_t { | |||
173 | #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) | 173 | #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) |
174 | #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) | 174 | #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) |
175 | 175 | ||
176 | |||
177 | /* | ||
178 | * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector | ||
179 | * that indicates that they should check the contents of the iovec are | ||
180 | * valid, but not check the memory that the iovec elements | ||
181 | * points too. | ||
182 | */ | ||
183 | #define CHECK_IOVEC_ONLY -1 | ||
184 | |||
176 | #define SEL_IN 1 | 185 | #define SEL_IN 1 |
177 | #define SEL_OUT 2 | 186 | #define SEL_OUT 2 |
178 | #define SEL_EX 4 | 187 | #define SEL_EX 4 |
@@ -793,13 +802,14 @@ struct inode { | |||
793 | unsigned int __i_nlink; | 802 | unsigned int __i_nlink; |
794 | }; | 803 | }; |
795 | dev_t i_rdev; | 804 | dev_t i_rdev; |
805 | loff_t i_size; | ||
796 | struct timespec i_atime; | 806 | struct timespec i_atime; |
797 | struct timespec i_mtime; | 807 | struct timespec i_mtime; |
798 | struct timespec i_ctime; | 808 | struct timespec i_ctime; |
799 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 809 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
800 | unsigned short i_bytes; | 810 | unsigned short i_bytes; |
811 | unsigned int i_blkbits; | ||
801 | blkcnt_t i_blocks; | 812 | blkcnt_t i_blocks; |
802 | loff_t i_size; | ||
803 | 813 | ||
804 | #ifdef __NEED_I_SIZE_ORDERED | 814 | #ifdef __NEED_I_SIZE_ORDERED |
805 | seqcount_t i_size_seqcount; | 815 | seqcount_t i_size_seqcount; |
@@ -819,9 +829,8 @@ struct inode { | |||
819 | struct list_head i_dentry; | 829 | struct list_head i_dentry; |
820 | struct rcu_head i_rcu; | 830 | struct rcu_head i_rcu; |
821 | }; | 831 | }; |
822 | atomic_t i_count; | ||
823 | unsigned int i_blkbits; | ||
824 | u64 i_version; | 832 | u64 i_version; |
833 | atomic_t i_count; | ||
825 | atomic_t i_dio_count; | 834 | atomic_t i_dio_count; |
826 | atomic_t i_writecount; | 835 | atomic_t i_writecount; |
827 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 836 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
@@ -1683,6 +1692,7 @@ struct inode_operations { | |||
1683 | int (*removexattr) (struct dentry *, const char *); | 1692 | int (*removexattr) (struct dentry *, const char *); |
1684 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, | 1693 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, |
1685 | u64 len); | 1694 | u64 len); |
1695 | int (*update_time)(struct inode *, struct timespec *, int); | ||
1686 | } ____cacheline_aligned; | 1696 | } ____cacheline_aligned; |
1687 | 1697 | ||
1688 | struct seq_file; | 1698 | struct seq_file; |
@@ -1690,8 +1700,7 @@ struct seq_file; | |||
1690 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, | 1700 | ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, |
1691 | unsigned long nr_segs, unsigned long fast_segs, | 1701 | unsigned long nr_segs, unsigned long fast_segs, |
1692 | struct iovec *fast_pointer, | 1702 | struct iovec *fast_pointer, |
1693 | struct iovec **ret_pointer, | 1703 | struct iovec **ret_pointer); |
1694 | int check_access); | ||
1695 | 1704 | ||
1696 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); | 1705 | extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); |
1697 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); | 1706 | extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); |
@@ -1842,6 +1851,13 @@ static inline void inode_inc_iversion(struct inode *inode) | |||
1842 | spin_unlock(&inode->i_lock); | 1851 | spin_unlock(&inode->i_lock); |
1843 | } | 1852 | } |
1844 | 1853 | ||
1854 | enum file_time_flags { | ||
1855 | S_ATIME = 1, | ||
1856 | S_MTIME = 2, | ||
1857 | S_CTIME = 4, | ||
1858 | S_VERSION = 8, | ||
1859 | }; | ||
1860 | |||
1845 | extern void touch_atime(struct path *); | 1861 | extern void touch_atime(struct path *); |
1846 | static inline void file_accessed(struct file *file) | 1862 | static inline void file_accessed(struct file *file) |
1847 | { | 1863 | { |
@@ -2453,8 +2469,6 @@ enum { | |||
2453 | }; | 2469 | }; |
2454 | 2470 | ||
2455 | void dio_end_io(struct bio *bio, int error); | 2471 | void dio_end_io(struct bio *bio, int error); |
2456 | void inode_dio_wait(struct inode *inode); | ||
2457 | void inode_dio_done(struct inode *inode); | ||
2458 | 2472 | ||
2459 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 2473 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2460 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 2474 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
@@ -2469,12 +2483,11 @@ static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | |||
2469 | offset, nr_segs, get_block, NULL, NULL, | 2483 | offset, nr_segs, get_block, NULL, NULL, |
2470 | DIO_LOCKING | DIO_SKIP_HOLES); | 2484 | DIO_LOCKING | DIO_SKIP_HOLES); |
2471 | } | 2485 | } |
2472 | #else | ||
2473 | static inline void inode_dio_wait(struct inode *inode) | ||
2474 | { | ||
2475 | } | ||
2476 | #endif | 2486 | #endif |
2477 | 2487 | ||
2488 | void inode_dio_wait(struct inode *inode); | ||
2489 | void inode_dio_done(struct inode *inode); | ||
2490 | |||
2478 | extern const struct file_operations generic_ro_fops; | 2491 | extern const struct file_operations generic_ro_fops; |
2479 | 2492 | ||
2480 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) | 2493 | #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m)) |
@@ -2578,7 +2591,7 @@ extern int inode_change_ok(const struct inode *, struct iattr *); | |||
2578 | extern int inode_newsize_ok(const struct inode *, loff_t offset); | 2591 | extern int inode_newsize_ok(const struct inode *, loff_t offset); |
2579 | extern void setattr_copy(struct inode *inode, const struct iattr *attr); | 2592 | extern void setattr_copy(struct inode *inode, const struct iattr *attr); |
2580 | 2593 | ||
2581 | extern void file_update_time(struct file *file); | 2594 | extern int file_update_time(struct file *file); |
2582 | 2595 | ||
2583 | extern int generic_show_options(struct seq_file *m, struct dentry *root); | 2596 | extern int generic_show_options(struct seq_file *m, struct dentry *root); |
2584 | extern void save_mount_options(struct super_block *sb, char *options); | 2597 | extern void save_mount_options(struct super_block *sb, char *options); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 91d0e0a34ef3..63d966d5c2ea 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -60,7 +60,7 @@ | |||
60 | #define FS_EVENTS_POSS_ON_CHILD (FS_ACCESS | FS_MODIFY | FS_ATTRIB |\ | 60 | #define FS_EVENTS_POSS_ON_CHILD (FS_ACCESS | FS_MODIFY | FS_ATTRIB |\ |
61 | FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN |\ | 61 | FS_CLOSE_WRITE | FS_CLOSE_NOWRITE | FS_OPEN |\ |
62 | FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\ | 62 | FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\ |
63 | FS_DELETE) | 63 | FS_DELETE | FS_OPEN_PERM | FS_ACCESS_PERM) |
64 | 64 | ||
65 | #define FS_MOVE (FS_MOVED_FROM | FS_MOVED_TO) | 65 | #define FS_MOVE (FS_MOVED_FROM | FS_MOVED_TO) |
66 | 66 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 8f2ab8fef929..9303348965fb 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -54,6 +54,9 @@ | |||
54 | * 7.18 | 54 | * 7.18 |
55 | * - add FUSE_IOCTL_DIR flag | 55 | * - add FUSE_IOCTL_DIR flag |
56 | * - add FUSE_NOTIFY_DELETE | 56 | * - add FUSE_NOTIFY_DELETE |
57 | * | ||
58 | * 7.19 | ||
59 | * - add FUSE_FALLOCATE | ||
57 | */ | 60 | */ |
58 | 61 | ||
59 | #ifndef _LINUX_FUSE_H | 62 | #ifndef _LINUX_FUSE_H |
@@ -85,7 +88,7 @@ | |||
85 | #define FUSE_KERNEL_VERSION 7 | 88 | #define FUSE_KERNEL_VERSION 7 |
86 | 89 | ||
87 | /** Minor version number of this interface */ | 90 | /** Minor version number of this interface */ |
88 | #define FUSE_KERNEL_MINOR_VERSION 18 | 91 | #define FUSE_KERNEL_MINOR_VERSION 19 |
89 | 92 | ||
90 | /** The node ID of the root inode */ | 93 | /** The node ID of the root inode */ |
91 | #define FUSE_ROOT_ID 1 | 94 | #define FUSE_ROOT_ID 1 |
@@ -278,6 +281,7 @@ enum fuse_opcode { | |||
278 | FUSE_POLL = 40, | 281 | FUSE_POLL = 40, |
279 | FUSE_NOTIFY_REPLY = 41, | 282 | FUSE_NOTIFY_REPLY = 41, |
280 | FUSE_BATCH_FORGET = 42, | 283 | FUSE_BATCH_FORGET = 42, |
284 | FUSE_FALLOCATE = 43, | ||
281 | 285 | ||
282 | /* CUSE specific operations */ | 286 | /* CUSE specific operations */ |
283 | CUSE_INIT = 4096, | 287 | CUSE_INIT = 4096, |
@@ -571,6 +575,14 @@ struct fuse_notify_poll_wakeup_out { | |||
571 | __u64 kh; | 575 | __u64 kh; |
572 | }; | 576 | }; |
573 | 577 | ||
578 | struct fuse_fallocate_in { | ||
579 | __u64 fh; | ||
580 | __u64 offset; | ||
581 | __u64 length; | ||
582 | __u32 mode; | ||
583 | __u32 padding; | ||
584 | }; | ||
585 | |||
574 | struct fuse_in_header { | 586 | struct fuse_in_header { |
575 | __u32 len; | 587 | __u32 len; |
576 | __u32 opcode; | 588 | __u32 opcode; |
diff --git a/include/linux/i2c-mux-pinctrl.h b/include/linux/i2c-mux-pinctrl.h new file mode 100644 index 000000000000..a65c86429e84 --- /dev/null +++ b/include/linux/i2c-mux-pinctrl.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * i2c-mux-pinctrl platform data | ||
3 | * | ||
4 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms and conditions of the GNU General Public License, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #ifndef _LINUX_I2C_MUX_PINCTRL_H | ||
20 | #define _LINUX_I2C_MUX_PINCTRL_H | ||
21 | |||
22 | /** | ||
23 | * struct i2c_mux_pinctrl_platform_data - Platform data for i2c-mux-pinctrl | ||
24 | * @parent_bus_num: Parent I2C bus number | ||
25 | * @base_bus_num: Base I2C bus number for the child busses. 0 for dynamic. | ||
26 | * @bus_count: Number of child busses. Also the number of elements in | ||
27 | * @pinctrl_states | ||
28 | * @pinctrl_states: The names of the pinctrl state to select for each child bus | ||
29 | * @pinctrl_state_idle: The pinctrl state to select when no child bus is being | ||
30 | * accessed. If NULL, the most recently used pinctrl state will be left | ||
31 | * selected. | ||
32 | */ | ||
33 | struct i2c_mux_pinctrl_platform_data { | ||
34 | int parent_bus_num; | ||
35 | int base_bus_num; | ||
36 | int bus_count; | ||
37 | const char **pinctrl_states; | ||
38 | const char *pinctrl_state_idle; | ||
39 | }; | ||
40 | |||
41 | #endif | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index e4baff5f7ff4..9e65eff6af3b 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -149,6 +149,7 @@ extern struct cred init_cred; | |||
149 | .normal_prio = MAX_PRIO-20, \ | 149 | .normal_prio = MAX_PRIO-20, \ |
150 | .policy = SCHED_NORMAL, \ | 150 | .policy = SCHED_NORMAL, \ |
151 | .cpus_allowed = CPU_MASK_ALL, \ | 151 | .cpus_allowed = CPU_MASK_ALL, \ |
152 | .nr_cpus_allowed= NR_CPUS, \ | ||
152 | .mm = NULL, \ | 153 | .mm = NULL, \ |
153 | .active_mm = &init_mm, \ | 154 | .active_mm = &init_mm, \ |
154 | .se = { \ | 155 | .se = { \ |
@@ -157,7 +158,6 @@ extern struct cred init_cred; | |||
157 | .rt = { \ | 158 | .rt = { \ |
158 | .run_list = LIST_HEAD_INIT(tsk.rt.run_list), \ | 159 | .run_list = LIST_HEAD_INIT(tsk.rt.run_list), \ |
159 | .time_slice = RR_TIMESLICE, \ | 160 | .time_slice = RR_TIMESLICE, \ |
160 | .nr_cpus_allowed = NR_CPUS, \ | ||
161 | }, \ | 161 | }, \ |
162 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ | 162 | .tasks = LIST_HEAD_INIT(tsk.tasks), \ |
163 | INIT_PUSHABLE_TASKS(tsk) \ | 163 | INIT_PUSHABLE_TASKS(tsk) \ |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c91171599cb6..e68a8e53bb59 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -142,8 +142,6 @@ request_any_context_irq(unsigned int irq, irq_handler_t handler, | |||
142 | extern int __must_check | 142 | extern int __must_check |
143 | request_percpu_irq(unsigned int irq, irq_handler_t handler, | 143 | request_percpu_irq(unsigned int irq, irq_handler_t handler, |
144 | const char *devname, void __percpu *percpu_dev_id); | 144 | const char *devname, void __percpu *percpu_dev_id); |
145 | |||
146 | extern void exit_irq_thread(void); | ||
147 | #else | 145 | #else |
148 | 146 | ||
149 | extern int __must_check | 147 | extern int __must_check |
@@ -177,8 +175,6 @@ request_percpu_irq(unsigned int irq, irq_handler_t handler, | |||
177 | { | 175 | { |
178 | return request_irq(irq, handler, 0, devname, percpu_dev_id); | 176 | return request_irq(irq, handler, 0, devname, percpu_dev_id); |
179 | } | 177 | } |
180 | |||
181 | static inline void exit_irq_thread(void) { } | ||
182 | #endif | 178 | #endif |
183 | 179 | ||
184 | extern void free_irq(unsigned int, void *); | 180 | extern void free_irq(unsigned int, void *); |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 8a297a5e794c..5499c92a9153 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -62,6 +62,8 @@ struct ipc_namespace { | |||
62 | unsigned int mq_queues_max; /* initialized to DFLT_QUEUESMAX */ | 62 | unsigned int mq_queues_max; /* initialized to DFLT_QUEUESMAX */ |
63 | unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */ | 63 | unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */ |
64 | unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */ | 64 | unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */ |
65 | unsigned int mq_msg_default; | ||
66 | unsigned int mq_msgsize_default; | ||
65 | 67 | ||
66 | /* user_ns which owns the ipc ns */ | 68 | /* user_ns which owns the ipc ns */ |
67 | struct user_namespace *user_ns; | 69 | struct user_namespace *user_ns; |
@@ -90,11 +92,41 @@ static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {} | |||
90 | 92 | ||
91 | #ifdef CONFIG_POSIX_MQUEUE | 93 | #ifdef CONFIG_POSIX_MQUEUE |
92 | extern int mq_init_ns(struct ipc_namespace *ns); | 94 | extern int mq_init_ns(struct ipc_namespace *ns); |
93 | /* default values */ | 95 | /* |
94 | #define DFLT_QUEUESMAX 256 /* max number of message queues */ | 96 | * POSIX Message Queue default values: |
95 | #define DFLT_MSGMAX 10 /* max number of messages in each queue */ | 97 | * |
96 | #define HARD_MSGMAX (32768*sizeof(void *)/4) | 98 | * MIN_*: Lowest value an admin can set the maximum unprivileged limit to |
97 | #define DFLT_MSGSIZEMAX 8192 /* max message size */ | 99 | * DFLT_*MAX: Default values for the maximum unprivileged limits |
100 | * DFLT_{MSG,MSGSIZE}: Default values used when the user doesn't supply | ||
101 | * an attribute to the open call and the queue must be created | ||
102 | * HARD_*: Highest value the maximums can be set to. These are enforced | ||
103 | * on CAP_SYS_RESOURCE apps as well making them inviolate (so make them | ||
104 | * suitably high) | ||
105 | * | ||
106 | * POSIX Requirements: | ||
107 | * Per app minimum openable message queues - 8. This does not map well | ||
108 | * to the fact that we limit the number of queues on a per namespace | ||
109 | * basis instead of a per app basis. So, make the default high enough | ||
110 | * that no given app should have a hard time opening 8 queues. | ||
111 | * Minimum maximum for HARD_MSGMAX - 32767. I bumped this to 65536. | ||
112 | * Minimum maximum for HARD_MSGSIZEMAX - POSIX is silent on this. However, | ||
113 | * we have run into a situation where running applications in the wild | ||
114 | * require this to be at least 5MB, and preferably 10MB, so I set the | ||
115 | * value to 16MB in hopes that this user is the worst of the bunch and | ||
116 | * the new maximum will handle anyone else. I may have to revisit this | ||
117 | * in the future. | ||
118 | */ | ||
119 | #define MIN_QUEUESMAX 1 | ||
120 | #define DFLT_QUEUESMAX 256 | ||
121 | #define HARD_QUEUESMAX 1024 | ||
122 | #define MIN_MSGMAX 1 | ||
123 | #define DFLT_MSG 10U | ||
124 | #define DFLT_MSGMAX 10 | ||
125 | #define HARD_MSGMAX 65536 | ||
126 | #define MIN_MSGSIZEMAX 128 | ||
127 | #define DFLT_MSGSIZE 8192U | ||
128 | #define DFLT_MSGSIZEMAX 8192 | ||
129 | #define HARD_MSGSIZEMAX (16*1024*1024) | ||
98 | #else | 130 | #else |
99 | static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } | 131 | static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } |
100 | #endif | 132 | #endif |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 912c30a8ddb1..f334c7fab967 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <crypto/hash.h> | ||
34 | #endif | 35 | #endif |
35 | 36 | ||
36 | #define journal_oom_retry 1 | 37 | #define journal_oom_retry 1 |
@@ -147,12 +148,24 @@ typedef struct journal_header_s | |||
147 | #define JBD2_CRC32_CHKSUM 1 | 148 | #define JBD2_CRC32_CHKSUM 1 |
148 | #define JBD2_MD5_CHKSUM 2 | 149 | #define JBD2_MD5_CHKSUM 2 |
149 | #define JBD2_SHA1_CHKSUM 3 | 150 | #define JBD2_SHA1_CHKSUM 3 |
151 | #define JBD2_CRC32C_CHKSUM 4 | ||
150 | 152 | ||
151 | #define JBD2_CRC32_CHKSUM_SIZE 4 | 153 | #define JBD2_CRC32_CHKSUM_SIZE 4 |
152 | 154 | ||
153 | #define JBD2_CHECKSUM_BYTES (32 / sizeof(u32)) | 155 | #define JBD2_CHECKSUM_BYTES (32 / sizeof(u32)) |
154 | /* | 156 | /* |
155 | * Commit block header for storing transactional checksums: | 157 | * Commit block header for storing transactional checksums: |
158 | * | ||
159 | * NOTE: If FEATURE_COMPAT_CHECKSUM (checksum v1) is set, the h_chksum* | ||
160 | * fields are used to store a checksum of the descriptor and data blocks. | ||
161 | * | ||
162 | * If FEATURE_INCOMPAT_CSUM_V2 (checksum v2) is set, then the h_chksum | ||
163 | * field is used to store crc32c(uuid+commit_block). Each journal metadata | ||
164 | * block gets its own checksum, and data block checksums are stored in | ||
165 | * journal_block_tag (in the descriptor). The other h_chksum* fields are | ||
166 | * not used. | ||
167 | * | ||
168 | * Checksum v1 and v2 are mutually exclusive features. | ||
156 | */ | 169 | */ |
157 | struct commit_header { | 170 | struct commit_header { |
158 | __be32 h_magic; | 171 | __be32 h_magic; |
@@ -175,13 +188,19 @@ struct commit_header { | |||
175 | typedef struct journal_block_tag_s | 188 | typedef struct journal_block_tag_s |
176 | { | 189 | { |
177 | __be32 t_blocknr; /* The on-disk block number */ | 190 | __be32 t_blocknr; /* The on-disk block number */ |
178 | __be32 t_flags; /* See below */ | 191 | __be16 t_checksum; /* truncated crc32c(uuid+seq+block) */ |
192 | __be16 t_flags; /* See below */ | ||
179 | __be32 t_blocknr_high; /* most-significant high 32bits. */ | 193 | __be32 t_blocknr_high; /* most-significant high 32bits. */ |
180 | } journal_block_tag_t; | 194 | } journal_block_tag_t; |
181 | 195 | ||
182 | #define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high)) | 196 | #define JBD2_TAG_SIZE32 (offsetof(journal_block_tag_t, t_blocknr_high)) |
183 | #define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t)) | 197 | #define JBD2_TAG_SIZE64 (sizeof(journal_block_tag_t)) |
184 | 198 | ||
199 | /* Tail of descriptor block, for checksumming */ | ||
200 | struct jbd2_journal_block_tail { | ||
201 | __be32 t_checksum; /* crc32c(uuid+descr_block) */ | ||
202 | }; | ||
203 | |||
185 | /* | 204 | /* |
186 | * The revoke descriptor: used on disk to describe a series of blocks to | 205 | * The revoke descriptor: used on disk to describe a series of blocks to |
187 | * be revoked from the log | 206 | * be revoked from the log |
@@ -192,6 +211,10 @@ typedef struct jbd2_journal_revoke_header_s | |||
192 | __be32 r_count; /* Count of bytes used in the block */ | 211 | __be32 r_count; /* Count of bytes used in the block */ |
193 | } jbd2_journal_revoke_header_t; | 212 | } jbd2_journal_revoke_header_t; |
194 | 213 | ||
214 | /* Tail of revoke block, for checksumming */ | ||
215 | struct jbd2_journal_revoke_tail { | ||
216 | __be32 r_checksum; /* crc32c(uuid+revoke_block) */ | ||
217 | }; | ||
195 | 218 | ||
196 | /* Definitions for the journal tag flags word: */ | 219 | /* Definitions for the journal tag flags word: */ |
197 | #define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */ | 220 | #define JBD2_FLAG_ESCAPE 1 /* on-disk block is escaped */ |
@@ -241,7 +264,10 @@ typedef struct journal_superblock_s | |||
241 | __be32 s_max_trans_data; /* Limit of data blocks per trans. */ | 264 | __be32 s_max_trans_data; /* Limit of data blocks per trans. */ |
242 | 265 | ||
243 | /* 0x0050 */ | 266 | /* 0x0050 */ |
244 | __u32 s_padding[44]; | 267 | __u8 s_checksum_type; /* checksum type */ |
268 | __u8 s_padding2[3]; | ||
269 | __u32 s_padding[42]; | ||
270 | __be32 s_checksum; /* crc32c(superblock) */ | ||
245 | 271 | ||
246 | /* 0x0100 */ | 272 | /* 0x0100 */ |
247 | __u8 s_users[16*48]; /* ids of all fs'es sharing the log */ | 273 | __u8 s_users[16*48]; /* ids of all fs'es sharing the log */ |
@@ -263,13 +289,15 @@ typedef struct journal_superblock_s | |||
263 | #define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001 | 289 | #define JBD2_FEATURE_INCOMPAT_REVOKE 0x00000001 |
264 | #define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002 | 290 | #define JBD2_FEATURE_INCOMPAT_64BIT 0x00000002 |
265 | #define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004 | 291 | #define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004 |
292 | #define JBD2_FEATURE_INCOMPAT_CSUM_V2 0x00000008 | ||
266 | 293 | ||
267 | /* Features known to this kernel version: */ | 294 | /* Features known to this kernel version: */ |
268 | #define JBD2_KNOWN_COMPAT_FEATURES JBD2_FEATURE_COMPAT_CHECKSUM | 295 | #define JBD2_KNOWN_COMPAT_FEATURES JBD2_FEATURE_COMPAT_CHECKSUM |
269 | #define JBD2_KNOWN_ROCOMPAT_FEATURES 0 | 296 | #define JBD2_KNOWN_ROCOMPAT_FEATURES 0 |
270 | #define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | \ | 297 | #define JBD2_KNOWN_INCOMPAT_FEATURES (JBD2_FEATURE_INCOMPAT_REVOKE | \ |
271 | JBD2_FEATURE_INCOMPAT_64BIT | \ | 298 | JBD2_FEATURE_INCOMPAT_64BIT | \ |
272 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT) | 299 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT | \ |
300 | JBD2_FEATURE_INCOMPAT_CSUM_V2) | ||
273 | 301 | ||
274 | #ifdef __KERNEL__ | 302 | #ifdef __KERNEL__ |
275 | 303 | ||
@@ -939,6 +967,12 @@ struct journal_s | |||
939 | * superblock pointer here | 967 | * superblock pointer here |
940 | */ | 968 | */ |
941 | void *j_private; | 969 | void *j_private; |
970 | |||
971 | /* Reference to checksum algorithm driver via cryptoapi */ | ||
972 | struct crypto_shash *j_chksum_driver; | ||
973 | |||
974 | /* Precomputed journal UUID checksum for seeding other checksums */ | ||
975 | __u32 j_csum_seed; | ||
942 | }; | 976 | }; |
943 | 977 | ||
944 | /* | 978 | /* |
@@ -1268,6 +1302,25 @@ static inline int jbd_space_needed(journal_t *journal) | |||
1268 | 1302 | ||
1269 | extern int jbd_blocks_per_page(struct inode *inode); | 1303 | extern int jbd_blocks_per_page(struct inode *inode); |
1270 | 1304 | ||
1305 | static inline u32 jbd2_chksum(journal_t *journal, u32 crc, | ||
1306 | const void *address, unsigned int length) | ||
1307 | { | ||
1308 | struct { | ||
1309 | struct shash_desc shash; | ||
1310 | char ctx[crypto_shash_descsize(journal->j_chksum_driver)]; | ||
1311 | } desc; | ||
1312 | int err; | ||
1313 | |||
1314 | desc.shash.tfm = journal->j_chksum_driver; | ||
1315 | desc.shash.flags = 0; | ||
1316 | *(u32 *)desc.ctx = crc; | ||
1317 | |||
1318 | err = crypto_shash_update(&desc.shash, address, length); | ||
1319 | BUG_ON(err); | ||
1320 | |||
1321 | return *(u32 *)desc.ctx; | ||
1322 | } | ||
1323 | |||
1271 | #ifdef __KERNEL__ | 1324 | #ifdef __KERNEL__ |
1272 | 1325 | ||
1273 | #define buffer_trace_init(bh) do {} while (0) | 1326 | #define buffer_trace_init(bh) do {} while (0) |
diff --git a/include/linux/jbd_common.h b/include/linux/jbd_common.h index 6230f8556a4e..6133679bc4c0 100644 --- a/include/linux/jbd_common.h +++ b/include/linux/jbd_common.h | |||
@@ -12,6 +12,7 @@ enum jbd_state_bits { | |||
12 | BH_State, /* Pins most journal_head state */ | 12 | BH_State, /* Pins most journal_head state */ |
13 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ | 13 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ |
14 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ | 14 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ |
15 | BH_Verified, /* Metadata block has been verified ok */ | ||
15 | BH_JBDPrivateStart, /* First bit available for private use by FS */ | 16 | BH_JBDPrivateStart, /* First bit available for private use by FS */ |
16 | }; | 17 | }; |
17 | 18 | ||
@@ -24,6 +25,7 @@ TAS_BUFFER_FNS(Revoked, revoked) | |||
24 | BUFFER_FNS(RevokeValid, revokevalid) | 25 | BUFFER_FNS(RevokeValid, revokevalid) |
25 | TAS_BUFFER_FNS(RevokeValid, revokevalid) | 26 | TAS_BUFFER_FNS(RevokeValid, revokevalid) |
26 | BUFFER_FNS(Freed, freed) | 27 | BUFFER_FNS(Freed, freed) |
28 | BUFFER_FNS(Verified, verified) | ||
27 | 29 | ||
28 | static inline struct buffer_head *jh2bh(struct journal_head *jh) | 30 | static inline struct buffer_head *jh2bh(struct journal_head *jh) |
29 | { | 31 | { |
diff --git a/include/linux/kcmp.h b/include/linux/kcmp.h new file mode 100644 index 000000000000..2dcd1b3aafc8 --- /dev/null +++ b/include/linux/kcmp.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _LINUX_KCMP_H | ||
2 | #define _LINUX_KCMP_H | ||
3 | |||
4 | /* Comparison type */ | ||
5 | enum kcmp_type { | ||
6 | KCMP_FILE, | ||
7 | KCMP_VM, | ||
8 | KCMP_FILES, | ||
9 | KCMP_FS, | ||
10 | KCMP_SIGHAND, | ||
11 | KCMP_IO, | ||
12 | KCMP_SYSVSEM, | ||
13 | |||
14 | KCMP_TYPES, | ||
15 | }; | ||
16 | |||
17 | #endif /* _LINUX_KCMP_H */ | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index ec55a3c8ba77..e07f5e0c5df4 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define LLONG_MAX ((long long)(~0ULL>>1)) | 35 | #define LLONG_MAX ((long long)(~0ULL>>1)) |
36 | #define LLONG_MIN (-LLONG_MAX - 1) | 36 | #define LLONG_MIN (-LLONG_MAX - 1) |
37 | #define ULLONG_MAX (~0ULL) | 37 | #define ULLONG_MAX (~0ULL) |
38 | #define SIZE_MAX (~(size_t)0) | ||
38 | 39 | ||
39 | #define STACK_MAGIC 0xdeadbeef | 40 | #define STACK_MAGIC 0xdeadbeef |
40 | 41 | ||
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 0d7d6a1b172f..37c5f7261142 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -1,8 +1,58 @@ | |||
1 | #ifndef LINUX_KEXEC_H | 1 | #ifndef LINUX_KEXEC_H |
2 | #define LINUX_KEXEC_H | 2 | #define LINUX_KEXEC_H |
3 | 3 | ||
4 | #ifdef CONFIG_KEXEC | 4 | /* kexec system call - It loads the new kernel to boot into. |
5 | * kexec does not sync, or unmount filesystems so if you need | ||
6 | * that to happen you need to do that yourself. | ||
7 | */ | ||
8 | |||
5 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | |||
11 | /* kexec flags for different usage scenarios */ | ||
12 | #define KEXEC_ON_CRASH 0x00000001 | ||
13 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 | ||
14 | #define KEXEC_ARCH_MASK 0xffff0000 | ||
15 | |||
16 | /* These values match the ELF architecture values. | ||
17 | * Unless there is a good reason that should continue to be the case. | ||
18 | */ | ||
19 | #define KEXEC_ARCH_DEFAULT ( 0 << 16) | ||
20 | #define KEXEC_ARCH_386 ( 3 << 16) | ||
21 | #define KEXEC_ARCH_X86_64 (62 << 16) | ||
22 | #define KEXEC_ARCH_PPC (20 << 16) | ||
23 | #define KEXEC_ARCH_PPC64 (21 << 16) | ||
24 | #define KEXEC_ARCH_IA_64 (50 << 16) | ||
25 | #define KEXEC_ARCH_ARM (40 << 16) | ||
26 | #define KEXEC_ARCH_S390 (22 << 16) | ||
27 | #define KEXEC_ARCH_SH (42 << 16) | ||
28 | #define KEXEC_ARCH_MIPS_LE (10 << 16) | ||
29 | #define KEXEC_ARCH_MIPS ( 8 << 16) | ||
30 | |||
31 | /* The artificial cap on the number of segments passed to kexec_load. */ | ||
32 | #define KEXEC_SEGMENT_MAX 16 | ||
33 | |||
34 | #ifndef __KERNEL__ | ||
35 | /* | ||
36 | * This structure is used to hold the arguments that are used when | ||
37 | * loading kernel binaries. | ||
38 | */ | ||
39 | struct kexec_segment { | ||
40 | const void *buf; | ||
41 | size_t bufsz; | ||
42 | const void *mem; | ||
43 | size_t memsz; | ||
44 | }; | ||
45 | |||
46 | /* Load a new kernel image as described by the kexec_segment array | ||
47 | * consisting of passed number of segments at the entry-point address. | ||
48 | * The flags allow different useage types. | ||
49 | */ | ||
50 | extern int kexec_load(void *, size_t, struct kexec_segment *, | ||
51 | unsigned long int); | ||
52 | #endif /* __KERNEL__ */ | ||
53 | |||
54 | #ifdef __KERNEL__ | ||
55 | #ifdef CONFIG_KEXEC | ||
6 | #include <linux/list.h> | 56 | #include <linux/list.h> |
7 | #include <linux/linkage.h> | 57 | #include <linux/linkage.h> |
8 | #include <linux/compat.h> | 58 | #include <linux/compat.h> |
@@ -67,11 +117,10 @@ typedef unsigned long kimage_entry_t; | |||
67 | #define IND_DONE 0x4 | 117 | #define IND_DONE 0x4 |
68 | #define IND_SOURCE 0x8 | 118 | #define IND_SOURCE 0x8 |
69 | 119 | ||
70 | #define KEXEC_SEGMENT_MAX 16 | ||
71 | struct kexec_segment { | 120 | struct kexec_segment { |
72 | void __user *buf; | 121 | void __user *buf; |
73 | size_t bufsz; | 122 | size_t bufsz; |
74 | unsigned long mem; /* User space sees this as a (void *) ... */ | 123 | unsigned long mem; |
75 | size_t memsz; | 124 | size_t memsz; |
76 | }; | 125 | }; |
77 | 126 | ||
@@ -175,25 +224,6 @@ extern struct kimage *kexec_crash_image; | |||
175 | #define kexec_flush_icache_page(page) | 224 | #define kexec_flush_icache_page(page) |
176 | #endif | 225 | #endif |
177 | 226 | ||
178 | #define KEXEC_ON_CRASH 0x00000001 | ||
179 | #define KEXEC_PRESERVE_CONTEXT 0x00000002 | ||
180 | #define KEXEC_ARCH_MASK 0xffff0000 | ||
181 | |||
182 | /* These values match the ELF architecture values. | ||
183 | * Unless there is a good reason that should continue to be the case. | ||
184 | */ | ||
185 | #define KEXEC_ARCH_DEFAULT ( 0 << 16) | ||
186 | #define KEXEC_ARCH_386 ( 3 << 16) | ||
187 | #define KEXEC_ARCH_X86_64 (62 << 16) | ||
188 | #define KEXEC_ARCH_PPC (20 << 16) | ||
189 | #define KEXEC_ARCH_PPC64 (21 << 16) | ||
190 | #define KEXEC_ARCH_IA_64 (50 << 16) | ||
191 | #define KEXEC_ARCH_ARM (40 << 16) | ||
192 | #define KEXEC_ARCH_S390 (22 << 16) | ||
193 | #define KEXEC_ARCH_SH (42 << 16) | ||
194 | #define KEXEC_ARCH_MIPS_LE (10 << 16) | ||
195 | #define KEXEC_ARCH_MIPS ( 8 << 16) | ||
196 | |||
197 | /* List of defined/legal kexec flags */ | 227 | /* List of defined/legal kexec flags */ |
198 | #ifndef CONFIG_KEXEC_JUMP | 228 | #ifndef CONFIG_KEXEC_JUMP |
199 | #define KEXEC_FLAGS KEXEC_ON_CRASH | 229 | #define KEXEC_FLAGS KEXEC_ON_CRASH |
@@ -228,4 +258,5 @@ struct task_struct; | |||
228 | static inline void crash_kexec(struct pt_regs *regs) { } | 258 | static inline void crash_kexec(struct pt_regs *regs) { } |
229 | static inline int kexec_should_crash(struct task_struct *p) { return 0; } | 259 | static inline int kexec_should_crash(struct task_struct *p) { return 0; } |
230 | #endif /* CONFIG_KEXEC */ | 260 | #endif /* CONFIG_KEXEC */ |
261 | #endif /* __KERNEL__ */ | ||
231 | #endif /* LINUX_KEXEC_H */ | 262 | #endif /* LINUX_KEXEC_H */ |
diff --git a/include/linux/key.h b/include/linux/key.h index 5231800770e1..4cd22ed627ef 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -308,9 +308,6 @@ static inline bool key_is_instantiated(const struct key *key) | |||
308 | #ifdef CONFIG_SYSCTL | 308 | #ifdef CONFIG_SYSCTL |
309 | extern ctl_table key_sysctls[]; | 309 | extern ctl_table key_sysctls[]; |
310 | #endif | 310 | #endif |
311 | |||
312 | extern void key_replace_session_keyring(void); | ||
313 | |||
314 | /* | 311 | /* |
315 | * the userspace interface | 312 | * the userspace interface |
316 | */ | 313 | */ |
@@ -334,7 +331,6 @@ extern void key_init(void); | |||
334 | #define key_fsuid_changed(t) do { } while(0) | 331 | #define key_fsuid_changed(t) do { } while(0) |
335 | #define key_fsgid_changed(t) do { } while(0) | 332 | #define key_fsgid_changed(t) do { } while(0) |
336 | #define key_init() do { } while(0) | 333 | #define key_init() do { } while(0) |
337 | #define key_replace_session_keyring() do { } while(0) | ||
338 | 334 | ||
339 | #endif /* CONFIG_KEYS */ | 335 | #endif /* CONFIG_KEYS */ |
340 | #endif /* __KERNEL__ */ | 336 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index dd99c329e161..5398d5807075 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -66,40 +66,10 @@ struct subprocess_info { | |||
66 | void *data; | 66 | void *data; |
67 | }; | 67 | }; |
68 | 68 | ||
69 | /* Allocate a subprocess_info structure */ | 69 | extern int |
70 | struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, | ||
71 | char **envp, gfp_t gfp_mask); | ||
72 | |||
73 | /* Set various pieces of state into the subprocess_info structure */ | ||
74 | void call_usermodehelper_setfns(struct subprocess_info *info, | ||
75 | int (*init)(struct subprocess_info *info, struct cred *new), | ||
76 | void (*cleanup)(struct subprocess_info *info), | ||
77 | void *data); | ||
78 | |||
79 | /* Actually execute the sub-process */ | ||
80 | int call_usermodehelper_exec(struct subprocess_info *info, int wait); | ||
81 | |||
82 | /* Free the subprocess_info. This is only needed if you're not going | ||
83 | to call call_usermodehelper_exec */ | ||
84 | void call_usermodehelper_freeinfo(struct subprocess_info *info); | ||
85 | |||
86 | static inline int | ||
87 | call_usermodehelper_fns(char *path, char **argv, char **envp, int wait, | 70 | call_usermodehelper_fns(char *path, char **argv, char **envp, int wait, |
88 | int (*init)(struct subprocess_info *info, struct cred *new), | 71 | int (*init)(struct subprocess_info *info, struct cred *new), |
89 | void (*cleanup)(struct subprocess_info *), void *data) | 72 | void (*cleanup)(struct subprocess_info *), void *data); |
90 | { | ||
91 | struct subprocess_info *info; | ||
92 | gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL; | ||
93 | |||
94 | info = call_usermodehelper_setup(path, argv, envp, gfp_mask); | ||
95 | |||
96 | if (info == NULL) | ||
97 | return -ENOMEM; | ||
98 | |||
99 | call_usermodehelper_setfns(info, init, cleanup, data); | ||
100 | |||
101 | return call_usermodehelper_exec(info, wait); | ||
102 | } | ||
103 | 73 | ||
104 | static inline int | 74 | static inline int |
105 | call_usermodehelper(char *path, char **argv, char **envp, int wait) | 75 | call_usermodehelper(char *path, char **argv, char **envp, int wait) |
diff --git a/include/linux/lglock.h b/include/linux/lglock.h index 87f402ccec55..f01e5f6d1f07 100644 --- a/include/linux/lglock.h +++ b/include/linux/lglock.h | |||
@@ -23,28 +23,17 @@ | |||
23 | #include <linux/lockdep.h> | 23 | #include <linux/lockdep.h> |
24 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
25 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
26 | #include <linux/notifier.h> | ||
26 | 27 | ||
27 | /* can make br locks by using local lock for read side, global lock for write */ | 28 | /* can make br locks by using local lock for read side, global lock for write */ |
28 | #define br_lock_init(name) name##_lock_init() | 29 | #define br_lock_init(name) lg_lock_init(name, #name) |
29 | #define br_read_lock(name) name##_local_lock() | 30 | #define br_read_lock(name) lg_local_lock(name) |
30 | #define br_read_unlock(name) name##_local_unlock() | 31 | #define br_read_unlock(name) lg_local_unlock(name) |
31 | #define br_write_lock(name) name##_global_lock_online() | 32 | #define br_write_lock(name) lg_global_lock(name) |
32 | #define br_write_unlock(name) name##_global_unlock_online() | 33 | #define br_write_unlock(name) lg_global_unlock(name) |
33 | 34 | ||
34 | #define DECLARE_BRLOCK(name) DECLARE_LGLOCK(name) | ||
35 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) | 35 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) |
36 | 36 | ||
37 | |||
38 | #define lg_lock_init(name) name##_lock_init() | ||
39 | #define lg_local_lock(name) name##_local_lock() | ||
40 | #define lg_local_unlock(name) name##_local_unlock() | ||
41 | #define lg_local_lock_cpu(name, cpu) name##_local_lock_cpu(cpu) | ||
42 | #define lg_local_unlock_cpu(name, cpu) name##_local_unlock_cpu(cpu) | ||
43 | #define lg_global_lock(name) name##_global_lock() | ||
44 | #define lg_global_unlock(name) name##_global_unlock() | ||
45 | #define lg_global_lock_online(name) name##_global_lock_online() | ||
46 | #define lg_global_unlock_online(name) name##_global_unlock_online() | ||
47 | |||
48 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 37 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
49 | #define LOCKDEP_INIT_MAP lockdep_init_map | 38 | #define LOCKDEP_INIT_MAP lockdep_init_map |
50 | 39 | ||
@@ -59,142 +48,26 @@ | |||
59 | #define DEFINE_LGLOCK_LOCKDEP(name) | 48 | #define DEFINE_LGLOCK_LOCKDEP(name) |
60 | #endif | 49 | #endif |
61 | 50 | ||
62 | 51 | struct lglock { | |
63 | #define DECLARE_LGLOCK(name) \ | 52 | arch_spinlock_t __percpu *lock; |
64 | extern void name##_lock_init(void); \ | 53 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
65 | extern void name##_local_lock(void); \ | 54 | struct lock_class_key lock_key; |
66 | extern void name##_local_unlock(void); \ | 55 | struct lockdep_map lock_dep_map; |
67 | extern void name##_local_lock_cpu(int cpu); \ | 56 | #endif |
68 | extern void name##_local_unlock_cpu(int cpu); \ | 57 | }; |
69 | extern void name##_global_lock(void); \ | ||
70 | extern void name##_global_unlock(void); \ | ||
71 | extern void name##_global_lock_online(void); \ | ||
72 | extern void name##_global_unlock_online(void); \ | ||
73 | 58 | ||
74 | #define DEFINE_LGLOCK(name) \ | 59 | #define DEFINE_LGLOCK(name) \ |
75 | \ | 60 | DEFINE_LGLOCK_LOCKDEP(name); \ |
76 | DEFINE_SPINLOCK(name##_cpu_lock); \ | 61 | DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ |
77 | cpumask_t name##_cpus __read_mostly; \ | 62 | = __ARCH_SPIN_LOCK_UNLOCKED; \ |
78 | DEFINE_PER_CPU(arch_spinlock_t, name##_lock); \ | 63 | struct lglock name = { .lock = &name ## _lock } |
79 | DEFINE_LGLOCK_LOCKDEP(name); \ | 64 | |
80 | \ | 65 | void lg_lock_init(struct lglock *lg, char *name); |
81 | static int \ | 66 | void lg_local_lock(struct lglock *lg); |
82 | name##_lg_cpu_callback(struct notifier_block *nb, \ | 67 | void lg_local_unlock(struct lglock *lg); |
83 | unsigned long action, void *hcpu) \ | 68 | void lg_local_lock_cpu(struct lglock *lg, int cpu); |
84 | { \ | 69 | void lg_local_unlock_cpu(struct lglock *lg, int cpu); |
85 | switch (action & ~CPU_TASKS_FROZEN) { \ | 70 | void lg_global_lock(struct lglock *lg); |
86 | case CPU_UP_PREPARE: \ | 71 | void lg_global_unlock(struct lglock *lg); |
87 | spin_lock(&name##_cpu_lock); \ | 72 | |
88 | cpu_set((unsigned long)hcpu, name##_cpus); \ | ||
89 | spin_unlock(&name##_cpu_lock); \ | ||
90 | break; \ | ||
91 | case CPU_UP_CANCELED: case CPU_DEAD: \ | ||
92 | spin_lock(&name##_cpu_lock); \ | ||
93 | cpu_clear((unsigned long)hcpu, name##_cpus); \ | ||
94 | spin_unlock(&name##_cpu_lock); \ | ||
95 | } \ | ||
96 | return NOTIFY_OK; \ | ||
97 | } \ | ||
98 | static struct notifier_block name##_lg_cpu_notifier = { \ | ||
99 | .notifier_call = name##_lg_cpu_callback, \ | ||
100 | }; \ | ||
101 | void name##_lock_init(void) { \ | ||
102 | int i; \ | ||
103 | LOCKDEP_INIT_MAP(&name##_lock_dep_map, #name, &name##_lock_key, 0); \ | ||
104 | for_each_possible_cpu(i) { \ | ||
105 | arch_spinlock_t *lock; \ | ||
106 | lock = &per_cpu(name##_lock, i); \ | ||
107 | *lock = (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED; \ | ||
108 | } \ | ||
109 | register_hotcpu_notifier(&name##_lg_cpu_notifier); \ | ||
110 | get_online_cpus(); \ | ||
111 | for_each_online_cpu(i) \ | ||
112 | cpu_set(i, name##_cpus); \ | ||
113 | put_online_cpus(); \ | ||
114 | } \ | ||
115 | EXPORT_SYMBOL(name##_lock_init); \ | ||
116 | \ | ||
117 | void name##_local_lock(void) { \ | ||
118 | arch_spinlock_t *lock; \ | ||
119 | preempt_disable(); \ | ||
120 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
121 | lock = &__get_cpu_var(name##_lock); \ | ||
122 | arch_spin_lock(lock); \ | ||
123 | } \ | ||
124 | EXPORT_SYMBOL(name##_local_lock); \ | ||
125 | \ | ||
126 | void name##_local_unlock(void) { \ | ||
127 | arch_spinlock_t *lock; \ | ||
128 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
129 | lock = &__get_cpu_var(name##_lock); \ | ||
130 | arch_spin_unlock(lock); \ | ||
131 | preempt_enable(); \ | ||
132 | } \ | ||
133 | EXPORT_SYMBOL(name##_local_unlock); \ | ||
134 | \ | ||
135 | void name##_local_lock_cpu(int cpu) { \ | ||
136 | arch_spinlock_t *lock; \ | ||
137 | preempt_disable(); \ | ||
138 | rwlock_acquire_read(&name##_lock_dep_map, 0, 0, _THIS_IP_); \ | ||
139 | lock = &per_cpu(name##_lock, cpu); \ | ||
140 | arch_spin_lock(lock); \ | ||
141 | } \ | ||
142 | EXPORT_SYMBOL(name##_local_lock_cpu); \ | ||
143 | \ | ||
144 | void name##_local_unlock_cpu(int cpu) { \ | ||
145 | arch_spinlock_t *lock; \ | ||
146 | rwlock_release(&name##_lock_dep_map, 1, _THIS_IP_); \ | ||
147 | lock = &per_cpu(name##_lock, cpu); \ | ||
148 | arch_spin_unlock(lock); \ | ||
149 | preempt_enable(); \ | ||
150 | } \ | ||
151 | EXPORT_SYMBOL(name##_local_unlock_cpu); \ | ||
152 | \ | ||
153 | void name##_global_lock_online(void) { \ | ||
154 | int i; \ | ||
155 | spin_lock(&name##_cpu_lock); \ | ||
156 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
157 | for_each_cpu(i, &name##_cpus) { \ | ||
158 | arch_spinlock_t *lock; \ | ||
159 | lock = &per_cpu(name##_lock, i); \ | ||
160 | arch_spin_lock(lock); \ | ||
161 | } \ | ||
162 | } \ | ||
163 | EXPORT_SYMBOL(name##_global_lock_online); \ | ||
164 | \ | ||
165 | void name##_global_unlock_online(void) { \ | ||
166 | int i; \ | ||
167 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
168 | for_each_cpu(i, &name##_cpus) { \ | ||
169 | arch_spinlock_t *lock; \ | ||
170 | lock = &per_cpu(name##_lock, i); \ | ||
171 | arch_spin_unlock(lock); \ | ||
172 | } \ | ||
173 | spin_unlock(&name##_cpu_lock); \ | ||
174 | } \ | ||
175 | EXPORT_SYMBOL(name##_global_unlock_online); \ | ||
176 | \ | ||
177 | void name##_global_lock(void) { \ | ||
178 | int i; \ | ||
179 | preempt_disable(); \ | ||
180 | rwlock_acquire(&name##_lock_dep_map, 0, 0, _RET_IP_); \ | ||
181 | for_each_possible_cpu(i) { \ | ||
182 | arch_spinlock_t *lock; \ | ||
183 | lock = &per_cpu(name##_lock, i); \ | ||
184 | arch_spin_lock(lock); \ | ||
185 | } \ | ||
186 | } \ | ||
187 | EXPORT_SYMBOL(name##_global_lock); \ | ||
188 | \ | ||
189 | void name##_global_unlock(void) { \ | ||
190 | int i; \ | ||
191 | rwlock_release(&name##_lock_dep_map, 1, _RET_IP_); \ | ||
192 | for_each_possible_cpu(i) { \ | ||
193 | arch_spinlock_t *lock; \ | ||
194 | lock = &per_cpu(name##_lock, i); \ | ||
195 | arch_spin_unlock(lock); \ | ||
196 | } \ | ||
197 | preempt_enable(); \ | ||
198 | } \ | ||
199 | EXPORT_SYMBOL(name##_global_unlock); | ||
200 | #endif | 73 | #endif |
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 11a966e5f829..4d24d64578c4 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h | |||
@@ -54,7 +54,7 @@ extern void nlmclnt_done(struct nlm_host *host); | |||
54 | 54 | ||
55 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, | 55 | extern int nlmclnt_proc(struct nlm_host *host, int cmd, |
56 | struct file_lock *fl); | 56 | struct file_lock *fl); |
57 | extern int lockd_up(void); | 57 | extern int lockd_up(struct net *net); |
58 | extern void lockd_down(void); | 58 | extern void lockd_down(struct net *net); |
59 | 59 | ||
60 | #endif /* LINUX_LOCKD_BIND_H */ | 60 | #endif /* LINUX_LOCKD_BIND_H */ |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 6e27fa99e8b9..6a8f002b8ed3 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -64,6 +64,7 @@ enum { | |||
64 | MLX4_MAX_NUM_PF = 16, | 64 | MLX4_MAX_NUM_PF = 16, |
65 | MLX4_MAX_NUM_VF = 64, | 65 | MLX4_MAX_NUM_VF = 64, |
66 | MLX4_MFUNC_MAX = 80, | 66 | MLX4_MFUNC_MAX = 80, |
67 | MLX4_MAX_EQ_NUM = 1024, | ||
67 | MLX4_MFUNC_EQ_NUM = 4, | 68 | MLX4_MFUNC_EQ_NUM = 4, |
68 | MLX4_MFUNC_MAX_EQES = 8, | 69 | MLX4_MFUNC_MAX_EQES = 8, |
69 | MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) | 70 | MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) |
@@ -239,6 +240,10 @@ static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | |||
239 | return (major << 32) | (minor << 16) | subminor; | 240 | return (major << 32) | (minor << 16) | subminor; |
240 | } | 241 | } |
241 | 242 | ||
243 | struct mlx4_phys_caps { | ||
244 | u32 num_phys_eqs; | ||
245 | }; | ||
246 | |||
242 | struct mlx4_caps { | 247 | struct mlx4_caps { |
243 | u64 fw_ver; | 248 | u64 fw_ver; |
244 | u32 function; | 249 | u32 function; |
@@ -499,6 +504,7 @@ struct mlx4_dev { | |||
499 | unsigned long flags; | 504 | unsigned long flags; |
500 | unsigned long num_slaves; | 505 | unsigned long num_slaves; |
501 | struct mlx4_caps caps; | 506 | struct mlx4_caps caps; |
507 | struct mlx4_phys_caps phys_caps; | ||
502 | struct radix_tree_root qp_table_tree; | 508 | struct radix_tree_root qp_table_tree; |
503 | u8 rev_id; | 509 | u8 rev_id; |
504 | char board_id[MLX4_BOARD_ID_LEN]; | 510 | char board_id[MLX4_BOARD_ID_LEN]; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index ce26716238c3..b36d08ce5c57 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1392,7 +1392,7 @@ extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned lo | |||
1392 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1392 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1393 | unsigned long len, unsigned long flags, | 1393 | unsigned long len, unsigned long flags, |
1394 | vm_flags_t vm_flags, unsigned long pgoff); | 1394 | vm_flags_t vm_flags, unsigned long pgoff); |
1395 | extern unsigned long do_mmap(struct file *, unsigned long, | 1395 | extern unsigned long do_mmap_pgoff(struct file *, unsigned long, |
1396 | unsigned long, unsigned long, | 1396 | unsigned long, unsigned long, |
1397 | unsigned long, unsigned long); | 1397 | unsigned long, unsigned long); |
1398 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); | 1398 | extern int do_munmap(struct mm_struct *, unsigned long, size_t); |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 1b14d25162cb..d6a58065c09c 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -128,7 +128,7 @@ struct kparam_array | |||
128 | * The ops can have NULL set or get functions. | 128 | * The ops can have NULL set or get functions. |
129 | */ | 129 | */ |
130 | #define module_param_cb(name, ops, arg, perm) \ | 130 | #define module_param_cb(name, ops, arg, perm) \ |
131 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, 0) | 131 | __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm, -1) |
132 | 132 | ||
133 | /** | 133 | /** |
134 | * <level>_param_cb - general callback for a module/cmdline parameter | 134 | * <level>_param_cb - general callback for a module/cmdline parameter |
@@ -192,7 +192,7 @@ struct kparam_array | |||
192 | { (void *)set, (void *)get }; \ | 192 | { (void *)set, (void *)get }; \ |
193 | __module_param_call(MODULE_PARAM_PREFIX, \ | 193 | __module_param_call(MODULE_PARAM_PREFIX, \ |
194 | name, &__param_ops_##name, arg, \ | 194 | name, &__param_ops_##name, arg, \ |
195 | (perm) + sizeof(__check_old_set_param(set))*0, 0) | 195 | (perm) + sizeof(__check_old_set_param(set))*0, -1) |
196 | 196 | ||
197 | /* We don't get oldget: it's often a new-style param_get_uint, etc. */ | 197 | /* We don't get oldget: it's often a new-style param_get_uint, etc. */ |
198 | static inline int | 198 | static inline int |
@@ -272,7 +272,7 @@ static inline void __kernel_param_unlock(void) | |||
272 | */ | 272 | */ |
273 | #define core_param(name, var, type, perm) \ | 273 | #define core_param(name, var, type, perm) \ |
274 | param_check_##type(name, &(var)); \ | 274 | param_check_##type(name, &(var)); \ |
275 | __module_param_call("", name, ¶m_ops_##type, &var, perm, 0) | 275 | __module_param_call("", name, ¶m_ops_##type, &var, perm, -1) |
276 | #endif /* !MODULE */ | 276 | #endif /* !MODULE */ |
277 | 277 | ||
278 | /** | 278 | /** |
@@ -290,7 +290,7 @@ static inline void __kernel_param_unlock(void) | |||
290 | = { len, string }; \ | 290 | = { len, string }; \ |
291 | __module_param_call(MODULE_PARAM_PREFIX, name, \ | 291 | __module_param_call(MODULE_PARAM_PREFIX, name, \ |
292 | ¶m_ops_string, \ | 292 | ¶m_ops_string, \ |
293 | .str = &__param_string_##name, perm, 0); \ | 293 | .str = &__param_string_##name, perm, -1); \ |
294 | __MODULE_PARM_TYPE(name, "string") | 294 | __MODULE_PARM_TYPE(name, "string") |
295 | 295 | ||
296 | /** | 296 | /** |
@@ -432,7 +432,7 @@ extern int param_set_bint(const char *val, const struct kernel_param *kp); | |||
432 | __module_param_call(MODULE_PARAM_PREFIX, name, \ | 432 | __module_param_call(MODULE_PARAM_PREFIX, name, \ |
433 | ¶m_array_ops, \ | 433 | ¶m_array_ops, \ |
434 | .arr = &__param_arr_##name, \ | 434 | .arr = &__param_arr_##name, \ |
435 | perm, 0); \ | 435 | perm, -1); \ |
436 | __MODULE_PARM_TYPE(name, "array of " #type) | 436 | __MODULE_PARM_TYPE(name, "array of " #type) |
437 | 437 | ||
438 | extern struct kernel_param_ops param_array_ops; | 438 | extern struct kernel_param_ops param_array_ops; |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 34066e65fdeb..11cc2ac67e75 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -21,8 +21,9 @@ | |||
21 | #define CT_LE_W(v) cpu_to_le16(v) | 21 | #define CT_LE_W(v) cpu_to_le16(v) |
22 | #define CT_LE_L(v) cpu_to_le32(v) | 22 | #define CT_LE_L(v) cpu_to_le32(v) |
23 | 23 | ||
24 | #define MSDOS_ROOT_INO 1 /* The root inode number */ | ||
25 | #define MSDOS_FSINFO_INO 2 /* Used for managing the FSINFO block */ | ||
24 | 26 | ||
25 | #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ | ||
26 | #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ | 27 | #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ |
27 | 28 | ||
28 | /* directory limit */ | 29 | /* directory limit */ |
diff --git a/include/linux/mtd/gpmi-nand.h b/include/linux/mtd/gpmi-nand.h index 69b6dbf46b5e..ed3c4e09f3d1 100644 --- a/include/linux/mtd/gpmi-nand.h +++ b/include/linux/mtd/gpmi-nand.h | |||
@@ -23,12 +23,12 @@ | |||
23 | #define GPMI_NAND_RES_SIZE 6 | 23 | #define GPMI_NAND_RES_SIZE 6 |
24 | 24 | ||
25 | /* Resource names for the GPMI NAND driver. */ | 25 | /* Resource names for the GPMI NAND driver. */ |
26 | #define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "GPMI NAND GPMI Registers" | 26 | #define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "gpmi-nand" |
27 | #define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt" | 27 | #define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt" |
28 | #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "GPMI NAND BCH Registers" | 28 | #define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch" |
29 | #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "GPMI NAND BCH Interrupt" | 29 | #define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch" |
30 | #define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels" | 30 | #define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels" |
31 | #define GPMI_NAND_DMA_INTERRUPT_RES_NAME "GPMI NAND DMA Interrupt" | 31 | #define GPMI_NAND_DMA_INTERRUPT_RES_NAME "gpmi-dma" |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * struct gpmi_nand_platform_data - GPMI NAND driver platform data. | 34 | * struct gpmi_nand_platform_data - GPMI NAND driver platform data. |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index cf5ea8cdcf8e..63dadc0dfb62 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -157,6 +157,15 @@ struct mtd_info { | |||
157 | unsigned int erasesize_mask; | 157 | unsigned int erasesize_mask; |
158 | unsigned int writesize_mask; | 158 | unsigned int writesize_mask; |
159 | 159 | ||
160 | /* | ||
161 | * read ops return -EUCLEAN if max number of bitflips corrected on any | ||
162 | * one region comprising an ecc step equals or exceeds this value. | ||
163 | * Settable by driver, else defaults to ecc_strength. User can override | ||
164 | * in sysfs. N.B. The meaning of the -EUCLEAN return code has changed; | ||
165 | * see Documentation/ABI/testing/sysfs-class-mtd for more detail. | ||
166 | */ | ||
167 | unsigned int bitflip_threshold; | ||
168 | |||
160 | // Kernel-only stuff starts here. | 169 | // Kernel-only stuff starts here. |
161 | const char *name; | 170 | const char *name; |
162 | int index; | 171 | int index; |
@@ -164,7 +173,7 @@ struct mtd_info { | |||
164 | /* ECC layout structure pointer - read only! */ | 173 | /* ECC layout structure pointer - read only! */ |
165 | struct nand_ecclayout *ecclayout; | 174 | struct nand_ecclayout *ecclayout; |
166 | 175 | ||
167 | /* max number of correctible bit errors per writesize */ | 176 | /* max number of correctible bit errors per ecc step */ |
168 | unsigned int ecc_strength; | 177 | unsigned int ecc_strength; |
169 | 178 | ||
170 | /* Data for variable erase regions. If numeraseregions is zero, | 179 | /* Data for variable erase regions. If numeraseregions is zero, |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1482340d3d9f..57977c640529 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -161,8 +161,6 @@ typedef enum { | |||
161 | * Option constants for bizarre disfunctionality and real | 161 | * Option constants for bizarre disfunctionality and real |
162 | * features. | 162 | * features. |
163 | */ | 163 | */ |
164 | /* Chip can not auto increment pages */ | ||
165 | #define NAND_NO_AUTOINCR 0x00000001 | ||
166 | /* Buswidth is 16 bit */ | 164 | /* Buswidth is 16 bit */ |
167 | #define NAND_BUSWIDTH_16 0x00000002 | 165 | #define NAND_BUSWIDTH_16 0x00000002 |
168 | /* Device supports partial programming without padding */ | 166 | /* Device supports partial programming without padding */ |
@@ -207,7 +205,6 @@ typedef enum { | |||
207 | (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK) | 205 | (NAND_NO_PADDING | NAND_CACHEPRG | NAND_COPYBACK) |
208 | 206 | ||
209 | /* Macros to identify the above */ | 207 | /* Macros to identify the above */ |
210 | #define NAND_CANAUTOINCR(chip) (!(chip->options & NAND_NO_AUTOINCR)) | ||
211 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) | 208 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) |
212 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) | 209 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) |
213 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) | 210 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) |
@@ -216,7 +213,7 @@ typedef enum { | |||
216 | && (chip->page_shift > 9)) | 213 | && (chip->page_shift > 9)) |
217 | 214 | ||
218 | /* Mask to zero out the chip options, which come from the id table */ | 215 | /* Mask to zero out the chip options, which come from the id table */ |
219 | #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) | 216 | #define NAND_CHIPOPTIONS_MSK 0x0000ffff |
220 | 217 | ||
221 | /* Non chip related options */ | 218 | /* Non chip related options */ |
222 | /* This option skips the bbt scan during initialization. */ | 219 | /* This option skips the bbt scan during initialization. */ |
@@ -363,21 +360,20 @@ struct nand_ecc_ctrl { | |||
363 | int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, | 360 | int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, |
364 | uint8_t *calc_ecc); | 361 | uint8_t *calc_ecc); |
365 | int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 362 | int (*read_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
366 | uint8_t *buf, int page); | 363 | uint8_t *buf, int oob_required, int page); |
367 | void (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 364 | void (*write_page_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
368 | const uint8_t *buf); | 365 | const uint8_t *buf, int oob_required); |
369 | int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, | 366 | int (*read_page)(struct mtd_info *mtd, struct nand_chip *chip, |
370 | uint8_t *buf, int page); | 367 | uint8_t *buf, int oob_required, int page); |
371 | int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, | 368 | int (*read_subpage)(struct mtd_info *mtd, struct nand_chip *chip, |
372 | uint32_t offs, uint32_t len, uint8_t *buf); | 369 | uint32_t offs, uint32_t len, uint8_t *buf); |
373 | void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, | 370 | void (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, |
374 | const uint8_t *buf); | 371 | const uint8_t *buf, int oob_required); |
375 | int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 372 | int (*write_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
376 | int page); | 373 | int page); |
377 | int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, | 374 | int (*read_oob_raw)(struct mtd_info *mtd, struct nand_chip *chip, |
378 | int page, int sndcmd); | 375 | int page); |
379 | int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page, | 376 | int (*read_oob)(struct mtd_info *mtd, struct nand_chip *chip, int page); |
380 | int sndcmd); | ||
381 | int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip, | 377 | int (*write_oob)(struct mtd_info *mtd, struct nand_chip *chip, |
382 | int page); | 378 | int page); |
383 | }; | 379 | }; |
@@ -459,6 +455,8 @@ struct nand_buffers { | |||
459 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 455 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
460 | * @pagebuf: [INTERN] holds the pagenumber which is currently in | 456 | * @pagebuf: [INTERN] holds the pagenumber which is currently in |
461 | * data_buf. | 457 | * data_buf. |
458 | * @pagebuf_bitflips: [INTERN] holds the bitflip count for the page which is | ||
459 | * currently in data_buf. | ||
462 | * @subpagesize: [INTERN] holds the subpagesize | 460 | * @subpagesize: [INTERN] holds the subpagesize |
463 | * @onfi_version: [INTERN] holds the chip ONFI version (BCD encoded), | 461 | * @onfi_version: [INTERN] holds the chip ONFI version (BCD encoded), |
464 | * non 0 if ONFI supported. | 462 | * non 0 if ONFI supported. |
@@ -505,7 +503,8 @@ struct nand_chip { | |||
505 | int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, | 503 | int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, |
506 | int status, int page); | 504 | int status, int page); |
507 | int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, | 505 | int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, |
508 | const uint8_t *buf, int page, int cached, int raw); | 506 | const uint8_t *buf, int oob_required, int page, |
507 | int cached, int raw); | ||
509 | 508 | ||
510 | int chip_delay; | 509 | int chip_delay; |
511 | unsigned int options; | 510 | unsigned int options; |
@@ -519,6 +518,7 @@ struct nand_chip { | |||
519 | uint64_t chipsize; | 518 | uint64_t chipsize; |
520 | int pagemask; | 519 | int pagemask; |
521 | int pagebuf; | 520 | int pagebuf; |
521 | unsigned int pagebuf_bitflips; | ||
522 | int subpagesize; | 522 | int subpagesize; |
523 | uint8_t cellinfo; | 523 | uint8_t cellinfo; |
524 | int badblockpos; | 524 | int badblockpos; |
@@ -654,6 +654,7 @@ struct platform_nand_ctrl { | |||
654 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl); | 654 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, unsigned int ctrl); |
655 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); | 655 | void (*write_buf)(struct mtd_info *mtd, const uint8_t *buf, int len); |
656 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); | 656 | void (*read_buf)(struct mtd_info *mtd, uint8_t *buf, int len); |
657 | unsigned char (*read_byte)(struct mtd_info *mtd); | ||
657 | void *priv; | 658 | void *priv; |
658 | }; | 659 | }; |
659 | 660 | ||
diff --git a/include/linux/netfilter/xt_HMARK.h b/include/linux/netfilter/xt_HMARK.h index abb1650940d2..826fc5807577 100644 --- a/include/linux/netfilter/xt_HMARK.h +++ b/include/linux/netfilter/xt_HMARK.h | |||
@@ -27,7 +27,12 @@ union hmark_ports { | |||
27 | __u16 src; | 27 | __u16 src; |
28 | __u16 dst; | 28 | __u16 dst; |
29 | } p16; | 29 | } p16; |
30 | struct { | ||
31 | __be16 src; | ||
32 | __be16 dst; | ||
33 | } b16; | ||
30 | __u32 v32; | 34 | __u32 v32; |
35 | __be32 b32; | ||
31 | }; | 36 | }; |
32 | 37 | ||
33 | struct xt_hmark_info { | 38 | struct xt_hmark_info { |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index f85308e688fd..e33f747b173c 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -103,6 +103,7 @@ struct svc_export { | |||
103 | struct nfsd4_fs_locations ex_fslocs; | 103 | struct nfsd4_fs_locations ex_fslocs; |
104 | int ex_nflavors; | 104 | int ex_nflavors; |
105 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; | 105 | struct exp_flavor_info ex_flavors[MAX_SECINFO_LIST]; |
106 | struct cache_detail *cd; | ||
106 | }; | 107 | }; |
107 | 108 | ||
108 | /* an "export key" (expkey) maps a filehandlefragement to an | 109 | /* an "export key" (expkey) maps a filehandlefragement to an |
@@ -129,24 +130,22 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); | |||
129 | /* | 130 | /* |
130 | * Function declarations | 131 | * Function declarations |
131 | */ | 132 | */ |
132 | int nfsd_export_init(void); | 133 | int nfsd_export_init(struct net *); |
133 | void nfsd_export_shutdown(void); | 134 | void nfsd_export_shutdown(struct net *); |
134 | void nfsd_export_flush(void); | 135 | void nfsd_export_flush(struct net *); |
135 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, | 136 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, |
136 | struct path *); | 137 | struct path *); |
137 | struct svc_export * rqst_exp_parent(struct svc_rqst *, | 138 | struct svc_export * rqst_exp_parent(struct svc_rqst *, |
138 | struct path *); | 139 | struct path *); |
139 | struct svc_export * rqst_find_fsidzero_export(struct svc_rqst *); | 140 | struct svc_export * rqst_find_fsidzero_export(struct svc_rqst *); |
140 | int exp_rootfh(struct auth_domain *, | 141 | int exp_rootfh(struct net *, struct auth_domain *, |
141 | char *path, struct knfsd_fh *, int maxsize); | 142 | char *path, struct knfsd_fh *, int maxsize); |
142 | __be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *); | 143 | __be32 exp_pseudoroot(struct svc_rqst *, struct svc_fh *); |
143 | __be32 nfserrno(int errno); | 144 | __be32 nfserrno(int errno); |
144 | 145 | ||
145 | extern struct cache_detail svc_export_cache; | ||
146 | |||
147 | static inline void exp_put(struct svc_export *exp) | 146 | static inline void exp_put(struct svc_export *exp) |
148 | { | 147 | { |
149 | cache_put(&exp->h, &svc_export_cache); | 148 | cache_put(&exp->h, exp->cd); |
150 | } | 149 | } |
151 | 150 | ||
152 | static inline void exp_get(struct svc_export *exp) | 151 | static inline void exp_get(struct svc_export *exp) |
diff --git a/include/linux/pci.h b/include/linux/pci.h index d8c379dba6ad..fefb4e19bf6a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -176,6 +176,8 @@ enum pci_dev_flags { | |||
176 | PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, | 176 | PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, |
177 | /* Provide indication device is assigned by a Virtual Machine Manager */ | 177 | /* Provide indication device is assigned by a Virtual Machine Manager */ |
178 | PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, | 178 | PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, |
179 | /* Device causes system crash if in D3 during S3 sleep */ | ||
180 | PCI_DEV_FLAGS_NO_D3_DURING_SLEEP = (__force pci_dev_flags_t) 8, | ||
179 | }; | 181 | }; |
180 | 182 | ||
181 | enum pci_irq_reroute_variant { | 183 | enum pci_irq_reroute_variant { |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f32578634d9d..45db49f64bb4 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -555,6 +555,8 @@ enum perf_event_type { | |||
555 | PERF_RECORD_MAX, /* non-ABI */ | 555 | PERF_RECORD_MAX, /* non-ABI */ |
556 | }; | 556 | }; |
557 | 557 | ||
558 | #define PERF_MAX_STACK_DEPTH 127 | ||
559 | |||
558 | enum perf_callchain_context { | 560 | enum perf_callchain_context { |
559 | PERF_CONTEXT_HV = (__u64)-32, | 561 | PERF_CONTEXT_HV = (__u64)-32, |
560 | PERF_CONTEXT_KERNEL = (__u64)-128, | 562 | PERF_CONTEXT_KERNEL = (__u64)-128, |
@@ -609,8 +611,6 @@ struct perf_guest_info_callbacks { | |||
609 | #include <linux/sysfs.h> | 611 | #include <linux/sysfs.h> |
610 | #include <asm/local.h> | 612 | #include <asm/local.h> |
611 | 613 | ||
612 | #define PERF_MAX_STACK_DEPTH 255 | ||
613 | |||
614 | struct perf_callchain_entry { | 614 | struct perf_callchain_entry { |
615 | __u64 nr; | 615 | __u64 nr; |
616 | __u64 ip[PERF_MAX_STACK_DEPTH]; | 616 | __u64 ip[PERF_MAX_STACK_DEPTH]; |
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index 4f75e531c112..241065c9ce51 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <linux/power_supply.h> | 18 | #include <linux/power_supply.h> |
19 | 19 | ||
20 | enum data_source { | 20 | enum data_source { |
21 | CM_BATTERY_PRESENT, | ||
22 | CM_NO_BATTERY, | ||
21 | CM_FUEL_GAUGE, | 23 | CM_FUEL_GAUGE, |
22 | CM_CHARGER_STAT, | 24 | CM_CHARGER_STAT, |
23 | }; | 25 | }; |
@@ -29,6 +31,16 @@ enum polling_modes { | |||
29 | CM_POLL_CHARGING_ONLY, | 31 | CM_POLL_CHARGING_ONLY, |
30 | }; | 32 | }; |
31 | 33 | ||
34 | enum cm_event_types { | ||
35 | CM_EVENT_UNKNOWN = 0, | ||
36 | CM_EVENT_BATT_FULL, | ||
37 | CM_EVENT_BATT_IN, | ||
38 | CM_EVENT_BATT_OUT, | ||
39 | CM_EVENT_EXT_PWR_IN_OUT, | ||
40 | CM_EVENT_CHG_START_STOP, | ||
41 | CM_EVENT_OTHERS, | ||
42 | }; | ||
43 | |||
32 | /** | 44 | /** |
33 | * struct charger_global_desc | 45 | * struct charger_global_desc |
34 | * @rtc_name: the name of RTC used to wake up the system from suspend. | 46 | * @rtc_name: the name of RTC used to wake up the system from suspend. |
@@ -38,11 +50,18 @@ enum polling_modes { | |||
38 | * rtc_only_wakeup() returning false. | 50 | * rtc_only_wakeup() returning false. |
39 | * If the RTC given to CM is the only wakeup reason, | 51 | * If the RTC given to CM is the only wakeup reason, |
40 | * rtc_only_wakeup should return true. | 52 | * rtc_only_wakeup should return true. |
53 | * @assume_timer_stops_in_suspend: | ||
54 | * Assume that the jiffy timer stops in suspend-to-RAM. | ||
55 | * When enabled, CM does not rely on jiffies value in | ||
56 | * suspend_again and assumes that jiffies value does not | ||
57 | * change during suspend. | ||
41 | */ | 58 | */ |
42 | struct charger_global_desc { | 59 | struct charger_global_desc { |
43 | char *rtc_name; | 60 | char *rtc_name; |
44 | 61 | ||
45 | bool (*rtc_only_wakeup)(void); | 62 | bool (*rtc_only_wakeup)(void); |
63 | |||
64 | bool assume_timer_stops_in_suspend; | ||
46 | }; | 65 | }; |
47 | 66 | ||
48 | /** | 67 | /** |
@@ -50,6 +69,11 @@ struct charger_global_desc { | |||
50 | * @psy_name: the name of power-supply-class for charger manager | 69 | * @psy_name: the name of power-supply-class for charger manager |
51 | * @polling_mode: | 70 | * @polling_mode: |
52 | * Determine which polling mode will be used | 71 | * Determine which polling mode will be used |
72 | * @fullbatt_vchkdrop_ms: | ||
73 | * @fullbatt_vchkdrop_uV: | ||
74 | * Check voltage drop after the battery is fully charged. | ||
75 | * If it has dropped more than fullbatt_vchkdrop_uV after | ||
76 | * fullbatt_vchkdrop_ms, CM will restart charging. | ||
53 | * @fullbatt_uV: voltage in microvolt | 77 | * @fullbatt_uV: voltage in microvolt |
54 | * If it is not being charged and VBATT >= fullbatt_uV, | 78 | * If it is not being charged and VBATT >= fullbatt_uV, |
55 | * it is assumed to be full. | 79 | * it is assumed to be full. |
@@ -76,6 +100,8 @@ struct charger_desc { | |||
76 | enum polling_modes polling_mode; | 100 | enum polling_modes polling_mode; |
77 | unsigned int polling_interval_ms; | 101 | unsigned int polling_interval_ms; |
78 | 102 | ||
103 | unsigned int fullbatt_vchkdrop_ms; | ||
104 | unsigned int fullbatt_vchkdrop_uV; | ||
79 | unsigned int fullbatt_uV; | 105 | unsigned int fullbatt_uV; |
80 | 106 | ||
81 | enum data_source battery_present; | 107 | enum data_source battery_present; |
@@ -101,6 +127,11 @@ struct charger_desc { | |||
101 | * @fuel_gauge: power_supply for fuel gauge | 127 | * @fuel_gauge: power_supply for fuel gauge |
102 | * @charger_stat: array of power_supply for chargers | 128 | * @charger_stat: array of power_supply for chargers |
103 | * @charger_enabled: the state of charger | 129 | * @charger_enabled: the state of charger |
130 | * @fullbatt_vchk_jiffies_at: | ||
131 | * jiffies at the time full battery check will occur. | ||
132 | * @fullbatt_vchk_uV: voltage in microvolt | ||
133 | * criteria for full battery | ||
134 | * @fullbatt_vchk_work: work queue for full battery check | ||
104 | * @emergency_stop: | 135 | * @emergency_stop: |
105 | * When setting true, stop charging | 136 | * When setting true, stop charging |
106 | * @last_temp_mC: the measured temperature in milli-Celsius | 137 | * @last_temp_mC: the measured temperature in milli-Celsius |
@@ -121,6 +152,10 @@ struct charger_manager { | |||
121 | 152 | ||
122 | bool charger_enabled; | 153 | bool charger_enabled; |
123 | 154 | ||
155 | unsigned long fullbatt_vchk_jiffies_at; | ||
156 | unsigned int fullbatt_vchk_uV; | ||
157 | struct delayed_work fullbatt_vchk_work; | ||
158 | |||
124 | int emergency_stop; | 159 | int emergency_stop; |
125 | int last_temp_mC; | 160 | int last_temp_mC; |
126 | 161 | ||
@@ -134,14 +169,13 @@ struct charger_manager { | |||
134 | #ifdef CONFIG_CHARGER_MANAGER | 169 | #ifdef CONFIG_CHARGER_MANAGER |
135 | extern int setup_charger_manager(struct charger_global_desc *gd); | 170 | extern int setup_charger_manager(struct charger_global_desc *gd); |
136 | extern bool cm_suspend_again(void); | 171 | extern bool cm_suspend_again(void); |
172 | extern void cm_notify_event(struct power_supply *psy, | ||
173 | enum cm_event_types type, char *msg); | ||
137 | #else | 174 | #else |
138 | static void __maybe_unused setup_charger_manager(struct charger_global_desc *gd) | 175 | static inline int setup_charger_manager(struct charger_global_desc *gd) |
139 | { } | 176 | { return 0; } |
140 | 177 | static inline bool cm_suspend_again(void) { return false; } | |
141 | static bool __maybe_unused cm_suspend_again(void) | 178 | static inline void cm_notify_event(struct power_supply *psy, |
142 | { | 179 | enum cm_event_types type, char *msg) { } |
143 | return false; | ||
144 | } | ||
145 | #endif | 180 | #endif |
146 | |||
147 | #endif /* _CHARGER_MANAGER_H */ | 181 | #endif /* _CHARGER_MANAGER_H */ |
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h index e01b167e66f0..89dd84f47c6e 100644 --- a/include/linux/power/max17042_battery.h +++ b/include/linux/power/max17042_battery.h | |||
@@ -116,6 +116,18 @@ enum max17042_register { | |||
116 | MAX17042_VFSOC = 0xFF, | 116 | MAX17042_VFSOC = 0xFF, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /* Registers specific to max17047/50 */ | ||
120 | enum max17047_register { | ||
121 | MAX17047_QRTbl00 = 0x12, | ||
122 | MAX17047_FullSOCThr = 0x13, | ||
123 | MAX17047_QRTbl10 = 0x22, | ||
124 | MAX17047_QRTbl20 = 0x32, | ||
125 | MAX17047_V_empty = 0x3A, | ||
126 | MAX17047_QRTbl30 = 0x42, | ||
127 | }; | ||
128 | |||
129 | enum max170xx_chip_type {MAX17042, MAX17047}; | ||
130 | |||
119 | /* | 131 | /* |
120 | * used for setting a register to a desired value | 132 | * used for setting a register to a desired value |
121 | * addr : address for a register | 133 | * addr : address for a register |
@@ -144,6 +156,7 @@ struct max17042_config_data { | |||
144 | u16 shdntimer; /* 0x03F */ | 156 | u16 shdntimer; /* 0x03F */ |
145 | 157 | ||
146 | /* App data */ | 158 | /* App data */ |
159 | u16 full_soc_thresh; /* 0x13 */ | ||
147 | u16 design_cap; /* 0x18 */ | 160 | u16 design_cap; /* 0x18 */ |
148 | u16 ichgt_term; /* 0x1E */ | 161 | u16 ichgt_term; /* 0x1E */ |
149 | 162 | ||
@@ -162,6 +175,10 @@ struct max17042_config_data { | |||
162 | u16 lavg_empty; /* 0x36 */ | 175 | u16 lavg_empty; /* 0x36 */ |
163 | u16 dqacc; /* 0x45 */ | 176 | u16 dqacc; /* 0x45 */ |
164 | u16 dpacc; /* 0x46 */ | 177 | u16 dpacc; /* 0x46 */ |
178 | u16 qrtbl00; /* 0x12 */ | ||
179 | u16 qrtbl10; /* 0x22 */ | ||
180 | u16 qrtbl20; /* 0x32 */ | ||
181 | u16 qrtbl30; /* 0x42 */ | ||
165 | 182 | ||
166 | /* Cell technology from power_supply.h */ | 183 | /* Cell technology from power_supply.h */ |
167 | u16 cell_technology; | 184 | u16 cell_technology; |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index c38c13db8832..3b912bee28d1 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -96,6 +96,7 @@ enum power_supply_property { | |||
96 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, | 96 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, |
97 | POWER_SUPPLY_PROP_VOLTAGE_NOW, | 97 | POWER_SUPPLY_PROP_VOLTAGE_NOW, |
98 | POWER_SUPPLY_PROP_VOLTAGE_AVG, | 98 | POWER_SUPPLY_PROP_VOLTAGE_AVG, |
99 | POWER_SUPPLY_PROP_VOLTAGE_OCV, | ||
99 | POWER_SUPPLY_PROP_CURRENT_MAX, | 100 | POWER_SUPPLY_PROP_CURRENT_MAX, |
100 | POWER_SUPPLY_PROP_CURRENT_NOW, | 101 | POWER_SUPPLY_PROP_CURRENT_NOW, |
101 | POWER_SUPPLY_PROP_CURRENT_AVG, | 102 | POWER_SUPPLY_PROP_CURRENT_AVG, |
@@ -211,7 +212,7 @@ extern void power_supply_changed(struct power_supply *psy); | |||
211 | extern int power_supply_am_i_supplied(struct power_supply *psy); | 212 | extern int power_supply_am_i_supplied(struct power_supply *psy); |
212 | extern int power_supply_set_battery_charged(struct power_supply *psy); | 213 | extern int power_supply_set_battery_charged(struct power_supply *psy); |
213 | 214 | ||
214 | #if defined(CONFIG_POWER_SUPPLY) || defined(CONFIG_POWER_SUPPLY_MODULE) | 215 | #ifdef CONFIG_POWER_SUPPLY |
215 | extern int power_supply_is_system_supplied(void); | 216 | extern int power_supply_is_system_supplied(void); |
216 | #else | 217 | #else |
217 | static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } | 218 | static inline int power_supply_is_system_supplied(void) { return -ENOSYS; } |
@@ -261,6 +262,7 @@ static inline bool power_supply_is_watt_property(enum power_supply_property psp) | |||
261 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: | 262 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: |
262 | case POWER_SUPPLY_PROP_VOLTAGE_NOW: | 263 | case POWER_SUPPLY_PROP_VOLTAGE_NOW: |
263 | case POWER_SUPPLY_PROP_VOLTAGE_AVG: | 264 | case POWER_SUPPLY_PROP_VOLTAGE_AVG: |
265 | case POWER_SUPPLY_PROP_VOLTAGE_OCV: | ||
264 | case POWER_SUPPLY_PROP_POWER_NOW: | 266 | case POWER_SUPPLY_PROP_POWER_NOW: |
265 | return 1; | 267 | return 1; |
266 | default: | 268 | default: |
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 78b76e24cc7e..3988012255dc 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
@@ -113,6 +113,12 @@ | |||
113 | # define PR_SET_MM_START_STACK 5 | 113 | # define PR_SET_MM_START_STACK 5 |
114 | # define PR_SET_MM_START_BRK 6 | 114 | # define PR_SET_MM_START_BRK 6 |
115 | # define PR_SET_MM_BRK 7 | 115 | # define PR_SET_MM_BRK 7 |
116 | # define PR_SET_MM_ARG_START 8 | ||
117 | # define PR_SET_MM_ARG_END 9 | ||
118 | # define PR_SET_MM_ENV_START 10 | ||
119 | # define PR_SET_MM_ENV_END 11 | ||
120 | # define PR_SET_MM_AUXV 12 | ||
121 | # define PR_SET_MM_EXE_FILE 13 | ||
116 | 122 | ||
117 | /* | 123 | /* |
118 | * Set specific pid that is allowed to ptrace the current task. | 124 | * Set specific pid that is allowed to ptrace the current task. |
@@ -121,8 +127,8 @@ | |||
121 | #define PR_SET_PTRACER 0x59616d61 | 127 | #define PR_SET_PTRACER 0x59616d61 |
122 | # define PR_SET_PTRACER_ANY ((unsigned long)-1) | 128 | # define PR_SET_PTRACER_ANY ((unsigned long)-1) |
123 | 129 | ||
124 | #define PR_SET_CHILD_SUBREAPER 36 | 130 | #define PR_SET_CHILD_SUBREAPER 36 |
125 | #define PR_GET_CHILD_SUBREAPER 37 | 131 | #define PR_GET_CHILD_SUBREAPER 37 |
126 | 132 | ||
127 | /* | 133 | /* |
128 | * If no_new_privs is set, then operations that grant new privileges (i.e. | 134 | * If no_new_privs is set, then operations that grant new privileges (i.e. |
@@ -136,7 +142,9 @@ | |||
136 | * asking selinux for a specific new context (e.g. with runcon) will result | 142 | * asking selinux for a specific new context (e.g. with runcon) will result |
137 | * in execve returning -EPERM. | 143 | * in execve returning -EPERM. |
138 | */ | 144 | */ |
139 | #define PR_SET_NO_NEW_PRIVS 38 | 145 | #define PR_SET_NO_NEW_PRIVS 38 |
140 | #define PR_GET_NO_NEW_PRIVS 39 | 146 | #define PR_GET_NO_NEW_PRIVS 39 |
147 | |||
148 | #define PR_GET_TID_ADDRESS 40 | ||
141 | 149 | ||
142 | #endif /* _LINUX_PRCTL_H */ | 150 | #endif /* _LINUX_PRCTL_H */ |
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h index 0d04cd69ab9b..ffc444c38b0a 100644 --- a/include/linux/radix-tree.h +++ b/include/linux/radix-tree.h | |||
@@ -368,8 +368,11 @@ radix_tree_next_slot(void **slot, struct radix_tree_iter *iter, unsigned flags) | |||
368 | iter->index++; | 368 | iter->index++; |
369 | if (likely(*slot)) | 369 | if (likely(*slot)) |
370 | return slot; | 370 | return slot; |
371 | if (flags & RADIX_TREE_ITER_CONTIG) | 371 | if (flags & RADIX_TREE_ITER_CONTIG) { |
372 | /* forbid switching to the next chunk */ | ||
373 | iter->next_index = 0; | ||
372 | break; | 374 | break; |
375 | } | ||
373 | } | 376 | } |
374 | } | 377 | } |
375 | return NULL; | 378 | return NULL; |
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index adb5e5a38cae..854dc4c5c271 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
@@ -87,8 +87,9 @@ static inline void kfree_call_rcu(struct rcu_head *head, | |||
87 | 87 | ||
88 | #ifdef CONFIG_TINY_RCU | 88 | #ifdef CONFIG_TINY_RCU |
89 | 89 | ||
90 | static inline int rcu_needs_cpu(int cpu) | 90 | static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) |
91 | { | 91 | { |
92 | *delta_jiffies = ULONG_MAX; | ||
92 | return 0; | 93 | return 0; |
93 | } | 94 | } |
94 | 95 | ||
@@ -96,8 +97,9 @@ static inline int rcu_needs_cpu(int cpu) | |||
96 | 97 | ||
97 | int rcu_preempt_needs_cpu(void); | 98 | int rcu_preempt_needs_cpu(void); |
98 | 99 | ||
99 | static inline int rcu_needs_cpu(int cpu) | 100 | static inline int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies) |
100 | { | 101 | { |
102 | *delta_jiffies = ULONG_MAX; | ||
101 | return rcu_preempt_needs_cpu(); | 103 | return rcu_preempt_needs_cpu(); |
102 | } | 104 | } |
103 | 105 | ||
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 3c6083cde4fc..952b79339304 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | extern void rcu_init(void); | 33 | extern void rcu_init(void); |
34 | extern void rcu_note_context_switch(int cpu); | 34 | extern void rcu_note_context_switch(int cpu); |
35 | extern int rcu_needs_cpu(int cpu); | 35 | extern int rcu_needs_cpu(int cpu, unsigned long *delta_jiffies); |
36 | extern void rcu_cpu_stall_reset(void); | 36 | extern void rcu_cpu_stall_reset(void); |
37 | 37 | ||
38 | /* | 38 | /* |
diff --git a/include/linux/rio.h b/include/linux/rio.h index 4d50611112ba..a90ebadd9da0 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -20,6 +20,9 @@ | |||
20 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/rio_regs.h> | 22 | #include <linux/rio_regs.h> |
23 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
24 | #include <linux/dmaengine.h> | ||
25 | #endif | ||
23 | 26 | ||
24 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
25 | #define RIO_INVALID_DESTID 0xffff | 28 | #define RIO_INVALID_DESTID 0xffff |
@@ -254,6 +257,9 @@ struct rio_mport { | |||
254 | u32 phys_efptr; | 257 | u32 phys_efptr; |
255 | unsigned char name[40]; | 258 | unsigned char name[40]; |
256 | void *priv; /* Master port private data */ | 259 | void *priv; /* Master port private data */ |
260 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
261 | struct dma_device dma; | ||
262 | #endif | ||
257 | }; | 263 | }; |
258 | 264 | ||
259 | /** | 265 | /** |
@@ -395,6 +401,47 @@ union rio_pw_msg { | |||
395 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; | 401 | u32 raw[RIO_PW_MSG_SIZE/sizeof(u32)]; |
396 | }; | 402 | }; |
397 | 403 | ||
404 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
405 | |||
406 | /** | ||
407 | * enum rio_write_type - RIO write transaction types used in DMA transfers | ||
408 | * | ||
409 | * Note: RapidIO specification defines write (NWRITE) and | ||
410 | * write-with-response (NWRITE_R) data transfer operations. | ||
411 | * Existing DMA controllers that service RapidIO may use one of these operations | ||
412 | * for entire data transfer or their combination with only the last data packet | ||
413 | * requires response. | ||
414 | */ | ||
415 | enum rio_write_type { | ||
416 | RDW_DEFAULT, /* default method used by DMA driver */ | ||
417 | RDW_ALL_NWRITE, /* all packets use NWRITE */ | ||
418 | RDW_ALL_NWRITE_R, /* all packets use NWRITE_R */ | ||
419 | RDW_LAST_NWRITE_R, /* last packet uses NWRITE_R, others - NWRITE */ | ||
420 | }; | ||
421 | |||
422 | struct rio_dma_ext { | ||
423 | u16 destid; | ||
424 | u64 rio_addr; /* low 64-bits of 66-bit RapidIO address */ | ||
425 | u8 rio_addr_u; /* upper 2-bits of 66-bit RapidIO address */ | ||
426 | enum rio_write_type wr_type; /* preferred RIO write operation type */ | ||
427 | }; | ||
428 | |||
429 | struct rio_dma_data { | ||
430 | /* Local data (as scatterlist) */ | ||
431 | struct scatterlist *sg; /* I/O scatter list */ | ||
432 | unsigned int sg_len; /* size of scatter list */ | ||
433 | /* Remote device address (flat buffer) */ | ||
434 | u64 rio_addr; /* low 64-bits of 66-bit RapidIO address */ | ||
435 | u8 rio_addr_u; /* upper 2-bits of 66-bit RapidIO address */ | ||
436 | enum rio_write_type wr_type; /* preferred RIO write operation type */ | ||
437 | }; | ||
438 | |||
439 | static inline struct rio_mport *dma_to_mport(struct dma_device *ddev) | ||
440 | { | ||
441 | return container_of(ddev, struct rio_mport, dma); | ||
442 | } | ||
443 | #endif /* CONFIG_RAPIDIO_DMA_ENGINE */ | ||
444 | |||
398 | /* Architecture and hardware-specific functions */ | 445 | /* Architecture and hardware-specific functions */ |
399 | extern int rio_register_mport(struct rio_mport *); | 446 | extern int rio_register_mport(struct rio_mport *); |
400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 447 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index 7f07470e1ed9..31ad146be316 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -377,6 +377,15 @@ void rio_unregister_driver(struct rio_driver *); | |||
377 | struct rio_dev *rio_dev_get(struct rio_dev *); | 377 | struct rio_dev *rio_dev_get(struct rio_dev *); |
378 | void rio_dev_put(struct rio_dev *); | 378 | void rio_dev_put(struct rio_dev *); |
379 | 379 | ||
380 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
381 | extern struct dma_chan *rio_request_dma(struct rio_dev *rdev); | ||
382 | extern void rio_release_dma(struct dma_chan *dchan); | ||
383 | extern struct dma_async_tx_descriptor *rio_dma_prep_slave_sg( | ||
384 | struct rio_dev *rdev, struct dma_chan *dchan, | ||
385 | struct rio_dma_data *data, | ||
386 | enum dma_transfer_direction direction, unsigned long flags); | ||
387 | #endif | ||
388 | |||
380 | /** | 389 | /** |
381 | * rio_name - Get the unique RIO device identifier | 390 | * rio_name - Get the unique RIO device identifier |
382 | * @rdev: RIO device | 391 | * @rdev: RIO device |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f45c0b280b5d..4059c0f33f07 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -145,6 +145,7 @@ extern unsigned long this_cpu_load(void); | |||
145 | 145 | ||
146 | 146 | ||
147 | extern void calc_global_load(unsigned long ticks); | 147 | extern void calc_global_load(unsigned long ticks); |
148 | extern void update_cpu_load_nohz(void); | ||
148 | 149 | ||
149 | extern unsigned long get_parent_ip(unsigned long addr); | 150 | extern unsigned long get_parent_ip(unsigned long addr); |
150 | 151 | ||
@@ -438,6 +439,7 @@ extern int get_dumpable(struct mm_struct *mm); | |||
438 | /* leave room for more dump flags */ | 439 | /* leave room for more dump flags */ |
439 | #define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ | 440 | #define MMF_VM_MERGEABLE 16 /* KSM may merge identical pages */ |
440 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ | 441 | #define MMF_VM_HUGEPAGE 17 /* set when VM_HUGEPAGE is set on vma */ |
442 | #define MMF_EXE_FILE_CHANGED 18 /* see prctl_set_mm_exe_file() */ | ||
441 | 443 | ||
442 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) | 444 | #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK) |
443 | 445 | ||
@@ -875,6 +877,8 @@ struct sched_group_power { | |||
875 | * Number of busy cpus in this group. | 877 | * Number of busy cpus in this group. |
876 | */ | 878 | */ |
877 | atomic_t nr_busy_cpus; | 879 | atomic_t nr_busy_cpus; |
880 | |||
881 | unsigned long cpumask[0]; /* iteration mask */ | ||
878 | }; | 882 | }; |
879 | 883 | ||
880 | struct sched_group { | 884 | struct sched_group { |
@@ -899,6 +903,15 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | |||
899 | return to_cpumask(sg->cpumask); | 903 | return to_cpumask(sg->cpumask); |
900 | } | 904 | } |
901 | 905 | ||
906 | /* | ||
907 | * cpumask masking which cpus in the group are allowed to iterate up the domain | ||
908 | * tree. | ||
909 | */ | ||
910 | static inline struct cpumask *sched_group_mask(struct sched_group *sg) | ||
911 | { | ||
912 | return to_cpumask(sg->sgp->cpumask); | ||
913 | } | ||
914 | |||
902 | /** | 915 | /** |
903 | * group_first_cpu - Returns the first cpu in the cpumask of a sched_group. | 916 | * group_first_cpu - Returns the first cpu in the cpumask of a sched_group. |
904 | * @group: The group whose first cpu is to be returned. | 917 | * @group: The group whose first cpu is to be returned. |
@@ -1187,7 +1200,6 @@ struct sched_rt_entity { | |||
1187 | struct list_head run_list; | 1200 | struct list_head run_list; |
1188 | unsigned long timeout; | 1201 | unsigned long timeout; |
1189 | unsigned int time_slice; | 1202 | unsigned int time_slice; |
1190 | int nr_cpus_allowed; | ||
1191 | 1203 | ||
1192 | struct sched_rt_entity *back; | 1204 | struct sched_rt_entity *back; |
1193 | #ifdef CONFIG_RT_GROUP_SCHED | 1205 | #ifdef CONFIG_RT_GROUP_SCHED |
@@ -1252,6 +1264,7 @@ struct task_struct { | |||
1252 | #endif | 1264 | #endif |
1253 | 1265 | ||
1254 | unsigned int policy; | 1266 | unsigned int policy; |
1267 | int nr_cpus_allowed; | ||
1255 | cpumask_t cpus_allowed; | 1268 | cpumask_t cpus_allowed; |
1256 | 1269 | ||
1257 | #ifdef CONFIG_PREEMPT_RCU | 1270 | #ifdef CONFIG_PREEMPT_RCU |
@@ -1301,11 +1314,6 @@ struct task_struct { | |||
1301 | unsigned sched_reset_on_fork:1; | 1314 | unsigned sched_reset_on_fork:1; |
1302 | unsigned sched_contributes_to_load:1; | 1315 | unsigned sched_contributes_to_load:1; |
1303 | 1316 | ||
1304 | #ifdef CONFIG_GENERIC_HARDIRQS | ||
1305 | /* IRQ handler threads */ | ||
1306 | unsigned irq_thread:1; | ||
1307 | #endif | ||
1308 | |||
1309 | pid_t pid; | 1317 | pid_t pid; |
1310 | pid_t tgid; | 1318 | pid_t tgid; |
1311 | 1319 | ||
@@ -1313,10 +1321,9 @@ struct task_struct { | |||
1313 | /* Canary value for the -fstack-protector gcc feature */ | 1321 | /* Canary value for the -fstack-protector gcc feature */ |
1314 | unsigned long stack_canary; | 1322 | unsigned long stack_canary; |
1315 | #endif | 1323 | #endif |
1316 | 1324 | /* | |
1317 | /* | ||
1318 | * pointers to (original) parent process, youngest child, younger sibling, | 1325 | * pointers to (original) parent process, youngest child, younger sibling, |
1319 | * older sibling, respectively. (p->father can be replaced with | 1326 | * older sibling, respectively. (p->father can be replaced with |
1320 | * p->real_parent->pid) | 1327 | * p->real_parent->pid) |
1321 | */ | 1328 | */ |
1322 | struct task_struct __rcu *real_parent; /* real parent process */ | 1329 | struct task_struct __rcu *real_parent; /* real parent process */ |
@@ -1363,8 +1370,6 @@ struct task_struct { | |||
1363 | * credentials (COW) */ | 1370 | * credentials (COW) */ |
1364 | const struct cred __rcu *cred; /* effective (overridable) subjective task | 1371 | const struct cred __rcu *cred; /* effective (overridable) subjective task |
1365 | * credentials (COW) */ | 1372 | * credentials (COW) */ |
1366 | struct cred *replacement_session_keyring; /* for KEYCTL_SESSION_TO_PARENT */ | ||
1367 | |||
1368 | char comm[TASK_COMM_LEN]; /* executable name excluding path | 1373 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
1369 | - access with [gs]et_task_comm (which lock | 1374 | - access with [gs]et_task_comm (which lock |
1370 | it with task_lock()) | 1375 | it with task_lock()) |
@@ -1400,6 +1405,8 @@ struct task_struct { | |||
1400 | int (*notifier)(void *priv); | 1405 | int (*notifier)(void *priv); |
1401 | void *notifier_data; | 1406 | void *notifier_data; |
1402 | sigset_t *notifier_mask; | 1407 | sigset_t *notifier_mask; |
1408 | struct hlist_head task_works; | ||
1409 | |||
1403 | struct audit_context *audit_context; | 1410 | struct audit_context *audit_context; |
1404 | #ifdef CONFIG_AUDITSYSCALL | 1411 | #ifdef CONFIG_AUDITSYSCALL |
1405 | uid_t loginuid; | 1412 | uid_t loginuid; |
@@ -2213,6 +2220,20 @@ extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); | |||
2213 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); | 2220 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); |
2214 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); | 2221 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); |
2215 | 2222 | ||
2223 | static inline void restore_saved_sigmask(void) | ||
2224 | { | ||
2225 | if (test_and_clear_restore_sigmask()) | ||
2226 | __set_current_blocked(¤t->saved_sigmask); | ||
2227 | } | ||
2228 | |||
2229 | static inline sigset_t *sigmask_to_save(void) | ||
2230 | { | ||
2231 | sigset_t *res = ¤t->blocked; | ||
2232 | if (unlikely(test_restore_sigmask())) | ||
2233 | res = ¤t->saved_sigmask; | ||
2234 | return res; | ||
2235 | } | ||
2236 | |||
2216 | static inline int kill_cad_pid(int sig, int priv) | 2237 | static inline int kill_cad_pid(int sig, int priv) |
2217 | { | 2238 | { |
2218 | return kill_pid(cad_pid, sig, priv); | 2239 | return kill_pid(cad_pid, sig, priv); |
diff --git a/include/linux/security.h b/include/linux/security.h index ab0e091ce5fa..4e5a73cdbbef 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -86,9 +86,9 @@ extern int cap_inode_setxattr(struct dentry *dentry, const char *name, | |||
86 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); | 86 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); |
87 | extern int cap_inode_need_killpriv(struct dentry *dentry); | 87 | extern int cap_inode_need_killpriv(struct dentry *dentry); |
88 | extern int cap_inode_killpriv(struct dentry *dentry); | 88 | extern int cap_inode_killpriv(struct dentry *dentry); |
89 | extern int cap_file_mmap(struct file *file, unsigned long reqprot, | 89 | extern int cap_mmap_addr(unsigned long addr); |
90 | unsigned long prot, unsigned long flags, | 90 | extern int cap_mmap_file(struct file *file, unsigned long reqprot, |
91 | unsigned long addr, unsigned long addr_only); | 91 | unsigned long prot, unsigned long flags); |
92 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 92 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
93 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 93 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
94 | unsigned long arg4, unsigned long arg5); | 94 | unsigned long arg4, unsigned long arg5); |
@@ -586,15 +586,17 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
586 | * simple integer value. When @arg represents a user space pointer, it | 586 | * simple integer value. When @arg represents a user space pointer, it |
587 | * should never be used by the security module. | 587 | * should never be used by the security module. |
588 | * Return 0 if permission is granted. | 588 | * Return 0 if permission is granted. |
589 | * @file_mmap : | 589 | * @mmap_addr : |
590 | * Check permissions for a mmap operation at @addr. | ||
591 | * @addr contains virtual address that will be used for the operation. | ||
592 | * Return 0 if permission is granted. | ||
593 | * @mmap_file : | ||
590 | * Check permissions for a mmap operation. The @file may be NULL, e.g. | 594 | * Check permissions for a mmap operation. The @file may be NULL, e.g. |
591 | * if mapping anonymous memory. | 595 | * if mapping anonymous memory. |
592 | * @file contains the file structure for file to map (may be NULL). | 596 | * @file contains the file structure for file to map (may be NULL). |
593 | * @reqprot contains the protection requested by the application. | 597 | * @reqprot contains the protection requested by the application. |
594 | * @prot contains the protection that will be applied by the kernel. | 598 | * @prot contains the protection that will be applied by the kernel. |
595 | * @flags contains the operational flags. | 599 | * @flags contains the operational flags. |
596 | * @addr contains virtual address that will be used for the operation. | ||
597 | * @addr_only contains a boolean: 0 if file-backed VMA, otherwise 1. | ||
598 | * Return 0 if permission is granted. | 600 | * Return 0 if permission is granted. |
599 | * @file_mprotect: | 601 | * @file_mprotect: |
600 | * Check permissions before changing memory access permissions. | 602 | * Check permissions before changing memory access permissions. |
@@ -1481,10 +1483,10 @@ struct security_operations { | |||
1481 | void (*file_free_security) (struct file *file); | 1483 | void (*file_free_security) (struct file *file); |
1482 | int (*file_ioctl) (struct file *file, unsigned int cmd, | 1484 | int (*file_ioctl) (struct file *file, unsigned int cmd, |
1483 | unsigned long arg); | 1485 | unsigned long arg); |
1484 | int (*file_mmap) (struct file *file, | 1486 | int (*mmap_addr) (unsigned long addr); |
1487 | int (*mmap_file) (struct file *file, | ||
1485 | unsigned long reqprot, unsigned long prot, | 1488 | unsigned long reqprot, unsigned long prot, |
1486 | unsigned long flags, unsigned long addr, | 1489 | unsigned long flags); |
1487 | unsigned long addr_only); | ||
1488 | int (*file_mprotect) (struct vm_area_struct *vma, | 1490 | int (*file_mprotect) (struct vm_area_struct *vma, |
1489 | unsigned long reqprot, | 1491 | unsigned long reqprot, |
1490 | unsigned long prot); | 1492 | unsigned long prot); |
@@ -1743,9 +1745,9 @@ int security_file_permission(struct file *file, int mask); | |||
1743 | int security_file_alloc(struct file *file); | 1745 | int security_file_alloc(struct file *file); |
1744 | void security_file_free(struct file *file); | 1746 | void security_file_free(struct file *file); |
1745 | int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg); | 1747 | int security_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
1746 | int security_file_mmap(struct file *file, unsigned long reqprot, | 1748 | int security_mmap_file(struct file *file, unsigned long prot, |
1747 | unsigned long prot, unsigned long flags, | 1749 | unsigned long flags); |
1748 | unsigned long addr, unsigned long addr_only); | 1750 | int security_mmap_addr(unsigned long addr); |
1749 | int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, | 1751 | int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot, |
1750 | unsigned long prot); | 1752 | unsigned long prot); |
1751 | int security_file_lock(struct file *file, unsigned int cmd); | 1753 | int security_file_lock(struct file *file, unsigned int cmd); |
@@ -2181,13 +2183,15 @@ static inline int security_file_ioctl(struct file *file, unsigned int cmd, | |||
2181 | return 0; | 2183 | return 0; |
2182 | } | 2184 | } |
2183 | 2185 | ||
2184 | static inline int security_file_mmap(struct file *file, unsigned long reqprot, | 2186 | static inline int security_mmap_file(struct file *file, unsigned long prot, |
2185 | unsigned long prot, | 2187 | unsigned long flags) |
2186 | unsigned long flags, | 2188 | { |
2187 | unsigned long addr, | 2189 | return 0; |
2188 | unsigned long addr_only) | 2190 | } |
2191 | |||
2192 | static inline int security_mmap_addr(unsigned long addr) | ||
2189 | { | 2193 | { |
2190 | return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); | 2194 | return cap_mmap_addr(addr); |
2191 | } | 2195 | } |
2192 | 2196 | ||
2193 | static inline int security_file_mprotect(struct vm_area_struct *vma, | 2197 | static inline int security_file_mprotect(struct vm_area_struct *vma, |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 17046cc484bc..26b424adc842 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -250,12 +250,13 @@ extern long do_sigpending(void __user *, unsigned long); | |||
250 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, | 250 | extern int do_sigtimedwait(const sigset_t *, siginfo_t *, |
251 | const struct timespec *); | 251 | const struct timespec *); |
252 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 252 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
253 | extern void set_current_blocked(const sigset_t *); | 253 | extern void set_current_blocked(sigset_t *); |
254 | extern void __set_current_blocked(const sigset_t *); | ||
254 | extern int show_unhandled_signals; | 255 | extern int show_unhandled_signals; |
255 | extern int sigsuspend(sigset_t *); | 256 | extern int sigsuspend(sigset_t *); |
256 | 257 | ||
257 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 258 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
258 | extern void block_sigmask(struct k_sigaction *ka, int signr); | 259 | extern void signal_delivered(int sig, siginfo_t *info, struct k_sigaction *ka, struct pt_regs *regs, int stepping); |
259 | extern void exit_signals(struct task_struct *tsk); | 260 | extern void exit_signals(struct task_struct *tsk); |
260 | 261 | ||
261 | extern struct kmem_cache *sighand_cachep; | 262 | extern struct kmem_cache *sighand_cachep; |
diff --git a/include/linux/slab.h b/include/linux/slab.h index a595dce6b0c7..67d5d94b783a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -242,7 +242,7 @@ size_t ksize(const void *); | |||
242 | */ | 242 | */ |
243 | static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags) | 243 | static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags) |
244 | { | 244 | { |
245 | if (size != 0 && n > ULONG_MAX / size) | 245 | if (size != 0 && n > SIZE_MAX / size) |
246 | return NULL; | 246 | return NULL; |
247 | return __kmalloc(n * size, flags); | 247 | return __kmalloc(n * size, flags); |
248 | } | 248 | } |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 51b29ac45a8e..40e0a273faea 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -232,7 +232,6 @@ struct svc_rqst { | |||
232 | struct svc_pool * rq_pool; /* thread pool */ | 232 | struct svc_pool * rq_pool; /* thread pool */ |
233 | struct svc_procedure * rq_procinfo; /* procedure info */ | 233 | struct svc_procedure * rq_procinfo; /* procedure info */ |
234 | struct auth_ops * rq_authop; /* authentication flavour */ | 234 | struct auth_ops * rq_authop; /* authentication flavour */ |
235 | u32 rq_flavor; /* pseudoflavor */ | ||
236 | struct svc_cred rq_cred; /* auth info */ | 235 | struct svc_cred rq_cred; /* auth info */ |
237 | void * rq_xprt_ctxt; /* transport specific context ptr */ | 236 | void * rq_xprt_ctxt; /* transport specific context ptr */ |
238 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ | 237 | struct svc_deferred_req*rq_deferred; /* deferred request we are replaying */ |
@@ -416,6 +415,7 @@ struct svc_procedure { | |||
416 | */ | 415 | */ |
417 | int svc_rpcb_setup(struct svc_serv *serv, struct net *net); | 416 | int svc_rpcb_setup(struct svc_serv *serv, struct net *net); |
418 | void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net); | 417 | void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net); |
418 | int svc_bind(struct svc_serv *serv, struct net *net); | ||
419 | struct svc_serv *svc_create(struct svc_program *, unsigned int, | 419 | struct svc_serv *svc_create(struct svc_program *, unsigned int, |
420 | void (*shutdown)(struct svc_serv *, struct net *net)); | 420 | void (*shutdown)(struct svc_serv *, struct net *net)); |
421 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, | 421 | struct svc_rqst *svc_prepare_thread(struct svc_serv *serv, |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 548790e9113b..dd74084a9799 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -15,14 +15,23 @@ | |||
15 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
16 | #include <linux/sunrpc/cache.h> | 16 | #include <linux/sunrpc/cache.h> |
17 | #include <linux/hash.h> | 17 | #include <linux/hash.h> |
18 | #include <linux/cred.h> | ||
18 | 19 | ||
19 | #define SVC_CRED_NGROUPS 32 | ||
20 | struct svc_cred { | 20 | struct svc_cred { |
21 | uid_t cr_uid; | 21 | uid_t cr_uid; |
22 | gid_t cr_gid; | 22 | gid_t cr_gid; |
23 | struct group_info *cr_group_info; | 23 | struct group_info *cr_group_info; |
24 | u32 cr_flavor; /* pseudoflavor */ | ||
25 | char *cr_principal; /* for gss */ | ||
24 | }; | 26 | }; |
25 | 27 | ||
28 | static inline void free_svc_cred(struct svc_cred *cred) | ||
29 | { | ||
30 | if (cred->cr_group_info) | ||
31 | put_group_info(cred->cr_group_info); | ||
32 | kfree(cred->cr_principal); | ||
33 | } | ||
34 | |||
26 | struct svc_rqst; /* forward decl */ | 35 | struct svc_rqst; /* forward decl */ |
27 | struct in6_addr; | 36 | struct in6_addr; |
28 | 37 | ||
@@ -131,7 +140,7 @@ extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *ne | |||
131 | extern struct auth_domain *auth_domain_find(char *name); | 140 | extern struct auth_domain *auth_domain_find(char *name); |
132 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); | 141 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); |
133 | extern int auth_unix_forget_old(struct auth_domain *dom); | 142 | extern int auth_unix_forget_old(struct auth_domain *dom); |
134 | extern void svcauth_unix_purge(void); | 143 | extern void svcauth_unix_purge(struct net *net); |
135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); | 144 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 145 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
137 | 146 | ||
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index 7c32daa025eb..726aff1a5201 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
@@ -22,7 +22,6 @@ int gss_svc_init_net(struct net *net); | |||
22 | void gss_svc_shutdown_net(struct net *net); | 22 | void gss_svc_shutdown_net(struct net *net); |
23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); | 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
24 | u32 svcauth_gss_flavor(struct auth_domain *dom); | 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); |
25 | char *svc_gss_principal(struct svc_rqst *); | ||
26 | 25 | ||
27 | #endif /* __KERNEL__ */ | 26 | #endif /* __KERNEL__ */ |
28 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ | 27 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ |
diff --git a/include/linux/swap.h b/include/linux/swap.h index b6661933e252..c84ec68eaec9 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -197,6 +197,10 @@ struct swap_info_struct { | |||
197 | struct block_device *bdev; /* swap device or bdev of swap file */ | 197 | struct block_device *bdev; /* swap device or bdev of swap file */ |
198 | struct file *swap_file; /* seldom referenced */ | 198 | struct file *swap_file; /* seldom referenced */ |
199 | unsigned int old_block_size; /* seldom referenced */ | 199 | unsigned int old_block_size; /* seldom referenced */ |
200 | #ifdef CONFIG_FRONTSWAP | ||
201 | unsigned long *frontswap_map; /* frontswap in-use, one bit per page */ | ||
202 | atomic_t frontswap_pages; /* frontswap pages in-use counter */ | ||
203 | #endif | ||
200 | }; | 204 | }; |
201 | 205 | ||
202 | struct swap_list_t { | 206 | struct swap_list_t { |
diff --git a/include/linux/swapfile.h b/include/linux/swapfile.h new file mode 100644 index 000000000000..e282624e8c10 --- /dev/null +++ b/include/linux/swapfile.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef _LINUX_SWAPFILE_H | ||
2 | #define _LINUX_SWAPFILE_H | ||
3 | |||
4 | /* | ||
5 | * these were static in swapfile.c but frontswap.c needs them and we don't | ||
6 | * want to expose them to the dozens of source files that include swap.h | ||
7 | */ | ||
8 | extern spinlock_t swap_lock; | ||
9 | extern struct swap_list_t swap_list; | ||
10 | extern struct swap_info_struct *swap_info[]; | ||
11 | extern int try_to_unuse(unsigned int, bool, unsigned long); | ||
12 | |||
13 | #endif /* _LINUX_SWAPFILE_H */ | ||
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 3de3acb84a95..19439c75c5b2 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -858,4 +858,6 @@ asmlinkage long sys_process_vm_writev(pid_t pid, | |||
858 | unsigned long riovcnt, | 858 | unsigned long riovcnt, |
859 | unsigned long flags); | 859 | unsigned long flags); |
860 | 860 | ||
861 | asmlinkage long sys_kcmp(pid_t pid1, pid_t pid2, int type, | ||
862 | unsigned long idx1, unsigned long idx2); | ||
861 | #endif | 863 | #endif |
diff --git a/include/linux/task_work.h b/include/linux/task_work.h new file mode 100644 index 000000000000..294d5d5e90b1 --- /dev/null +++ b/include/linux/task_work.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _LINUX_TASK_WORK_H | ||
2 | #define _LINUX_TASK_WORK_H | ||
3 | |||
4 | #include <linux/list.h> | ||
5 | #include <linux/sched.h> | ||
6 | |||
7 | struct task_work; | ||
8 | typedef void (*task_work_func_t)(struct task_work *); | ||
9 | |||
10 | struct task_work { | ||
11 | struct hlist_node hlist; | ||
12 | task_work_func_t func; | ||
13 | void *data; | ||
14 | }; | ||
15 | |||
16 | static inline void | ||
17 | init_task_work(struct task_work *twork, task_work_func_t func, void *data) | ||
18 | { | ||
19 | twork->func = func; | ||
20 | twork->data = data; | ||
21 | } | ||
22 | |||
23 | int task_work_add(struct task_struct *task, struct task_work *twork, bool); | ||
24 | struct task_work *task_work_cancel(struct task_struct *, task_work_func_t); | ||
25 | void task_work_run(void); | ||
26 | |||
27 | static inline void exit_task_work(struct task_struct *task) | ||
28 | { | ||
29 | if (unlikely(!hlist_empty(&task->task_works))) | ||
30 | task_work_run(); | ||
31 | } | ||
32 | |||
33 | #endif /* _LINUX_TASK_WORK_H */ | ||
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 4c5b63283377..5f359dbfcdce 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -69,16 +69,16 @@ union tcp_word_hdr { | |||
69 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) | 69 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
70 | 70 | ||
71 | enum { | 71 | enum { |
72 | TCP_FLAG_CWR = __cpu_to_be32(0x00800000), | 72 | TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), |
73 | TCP_FLAG_ECE = __cpu_to_be32(0x00400000), | 73 | TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), |
74 | TCP_FLAG_URG = __cpu_to_be32(0x00200000), | 74 | TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), |
75 | TCP_FLAG_ACK = __cpu_to_be32(0x00100000), | 75 | TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000), |
76 | TCP_FLAG_PSH = __cpu_to_be32(0x00080000), | 76 | TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000), |
77 | TCP_FLAG_RST = __cpu_to_be32(0x00040000), | 77 | TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), |
78 | TCP_FLAG_SYN = __cpu_to_be32(0x00020000), | 78 | TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), |
79 | TCP_FLAG_FIN = __cpu_to_be32(0x00010000), | 79 | TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), |
80 | TCP_RESERVED_BITS = __cpu_to_be32(0x0F000000), | 80 | TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000), |
81 | TCP_DATA_OFFSET = __cpu_to_be32(0xF0000000) | 81 | TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) |
82 | }; | 82 | }; |
83 | 83 | ||
84 | /* | 84 | /* |
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index db78775eff3b..ccc1899bd62e 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #define _LINUX_THREAD_INFO_H | 8 | #define _LINUX_THREAD_INFO_H |
9 | 9 | ||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/bug.h> | ||
11 | 12 | ||
12 | struct timespec; | 13 | struct timespec; |
13 | struct compat_timespec; | 14 | struct compat_timespec; |
@@ -125,10 +126,26 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag) | |||
125 | static inline void set_restore_sigmask(void) | 126 | static inline void set_restore_sigmask(void) |
126 | { | 127 | { |
127 | set_thread_flag(TIF_RESTORE_SIGMASK); | 128 | set_thread_flag(TIF_RESTORE_SIGMASK); |
128 | set_thread_flag(TIF_SIGPENDING); | 129 | WARN_ON(!test_thread_flag(TIF_SIGPENDING)); |
130 | } | ||
131 | static inline void clear_restore_sigmask(void) | ||
132 | { | ||
133 | clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
134 | } | ||
135 | static inline bool test_restore_sigmask(void) | ||
136 | { | ||
137 | return test_thread_flag(TIF_RESTORE_SIGMASK); | ||
138 | } | ||
139 | static inline bool test_and_clear_restore_sigmask(void) | ||
140 | { | ||
141 | return test_and_clear_thread_flag(TIF_RESTORE_SIGMASK); | ||
129 | } | 142 | } |
130 | #endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */ | 143 | #endif /* TIF_RESTORE_SIGMASK && !HAVE_SET_RESTORE_SIGMASK */ |
131 | 144 | ||
145 | #ifndef HAVE_SET_RESTORE_SIGMASK | ||
146 | #error "no set_restore_sigmask() provided and default one won't work" | ||
147 | #endif | ||
148 | |||
132 | #endif /* __KERNEL__ */ | 149 | #endif /* __KERNEL__ */ |
133 | 150 | ||
134 | #endif /* _LINUX_THREAD_INFO_H */ | 151 | #endif /* _LINUX_THREAD_INFO_H */ |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 51bd91d911c3..6a4d82bedb03 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/sched.h> | 49 | #include <linux/sched.h> |
50 | #include <linux/ptrace.h> | 50 | #include <linux/ptrace.h> |
51 | #include <linux/security.h> | 51 | #include <linux/security.h> |
52 | #include <linux/task_work.h> | ||
52 | struct linux_binprm; | 53 | struct linux_binprm; |
53 | 54 | ||
54 | /* | 55 | /* |
@@ -153,7 +154,6 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info, | |||
153 | ptrace_notify(SIGTRAP); | 154 | ptrace_notify(SIGTRAP); |
154 | } | 155 | } |
155 | 156 | ||
156 | #ifdef TIF_NOTIFY_RESUME | ||
157 | /** | 157 | /** |
158 | * set_notify_resume - cause tracehook_notify_resume() to be called | 158 | * set_notify_resume - cause tracehook_notify_resume() to be called |
159 | * @task: task that will call tracehook_notify_resume() | 159 | * @task: task that will call tracehook_notify_resume() |
@@ -165,8 +165,10 @@ static inline void tracehook_signal_handler(int sig, siginfo_t *info, | |||
165 | */ | 165 | */ |
166 | static inline void set_notify_resume(struct task_struct *task) | 166 | static inline void set_notify_resume(struct task_struct *task) |
167 | { | 167 | { |
168 | #ifdef TIF_NOTIFY_RESUME | ||
168 | if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_RESUME)) | 169 | if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_RESUME)) |
169 | kick_process(task); | 170 | kick_process(task); |
171 | #endif | ||
170 | } | 172 | } |
171 | 173 | ||
172 | /** | 174 | /** |
@@ -184,7 +186,14 @@ static inline void set_notify_resume(struct task_struct *task) | |||
184 | */ | 186 | */ |
185 | static inline void tracehook_notify_resume(struct pt_regs *regs) | 187 | static inline void tracehook_notify_resume(struct pt_regs *regs) |
186 | { | 188 | { |
189 | /* | ||
190 | * The caller just cleared TIF_NOTIFY_RESUME. This barrier | ||
191 | * pairs with task_work_add()->set_notify_resume() after | ||
192 | * hlist_add_head(task->task_works); | ||
193 | */ | ||
194 | smp_mb__after_clear_bit(); | ||
195 | if (unlikely(!hlist_empty(¤t->task_works))) | ||
196 | task_work_run(); | ||
187 | } | 197 | } |
188 | #endif /* TIF_NOTIFY_RESUME */ | ||
189 | 198 | ||
190 | #endif /* <linux/tracehook.h> */ | 199 | #endif /* <linux/tracehook.h> */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 4990ef2b1fb7..9f47ab540f65 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -268,7 +268,6 @@ struct tty_struct { | |||
268 | struct mutex ldisc_mutex; | 268 | struct mutex ldisc_mutex; |
269 | struct tty_ldisc *ldisc; | 269 | struct tty_ldisc *ldisc; |
270 | 270 | ||
271 | struct mutex legacy_mutex; | ||
272 | struct mutex termios_mutex; | 271 | struct mutex termios_mutex; |
273 | spinlock_t ctrl_lock; | 272 | spinlock_t ctrl_lock; |
274 | /* Termios values are protected by the termios mutex */ | 273 | /* Termios values are protected by the termios mutex */ |
@@ -606,12 +605,8 @@ extern long vt_compat_ioctl(struct tty_struct *tty, | |||
606 | 605 | ||
607 | /* tty_mutex.c */ | 606 | /* tty_mutex.c */ |
608 | /* functions for preparation of BKL removal */ | 607 | /* functions for preparation of BKL removal */ |
609 | extern void __lockfunc tty_lock(struct tty_struct *tty); | 608 | extern void __lockfunc tty_lock(void) __acquires(tty_lock); |
610 | extern void __lockfunc tty_unlock(struct tty_struct *tty); | 609 | extern void __lockfunc tty_unlock(void) __releases(tty_lock); |
611 | extern void __lockfunc tty_lock_pair(struct tty_struct *tty, | ||
612 | struct tty_struct *tty2); | ||
613 | extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | ||
614 | struct tty_struct *tty2); | ||
615 | 610 | ||
616 | /* | 611 | /* |
617 | * this shall be called only from where BTM is held (like close) | 612 | * this shall be called only from where BTM is held (like close) |
@@ -626,9 +621,9 @@ extern void __lockfunc tty_unlock_pair(struct tty_struct *tty, | |||
626 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | 621 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, |
627 | long timeout) | 622 | long timeout) |
628 | { | 623 | { |
629 | tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */ | 624 | tty_unlock(); /* tty->ops->close holds the BTM, drop it while waiting */ |
630 | tty_wait_until_sent(tty, timeout); | 625 | tty_wait_until_sent(tty, timeout); |
631 | tty_lock(tty); | 626 | tty_lock(); |
632 | } | 627 | } |
633 | 628 | ||
634 | /* | 629 | /* |
@@ -643,16 +638,16 @@ static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | |||
643 | * | 638 | * |
644 | * Do not use in new code. | 639 | * Do not use in new code. |
645 | */ | 640 | */ |
646 | #define wait_event_interruptible_tty(tty, wq, condition) \ | 641 | #define wait_event_interruptible_tty(wq, condition) \ |
647 | ({ \ | 642 | ({ \ |
648 | int __ret = 0; \ | 643 | int __ret = 0; \ |
649 | if (!(condition)) { \ | 644 | if (!(condition)) { \ |
650 | __wait_event_interruptible_tty(tty, wq, condition, __ret); \ | 645 | __wait_event_interruptible_tty(wq, condition, __ret); \ |
651 | } \ | 646 | } \ |
652 | __ret; \ | 647 | __ret; \ |
653 | }) | 648 | }) |
654 | 649 | ||
655 | #define __wait_event_interruptible_tty(tty, wq, condition, ret) \ | 650 | #define __wait_event_interruptible_tty(wq, condition, ret) \ |
656 | do { \ | 651 | do { \ |
657 | DEFINE_WAIT(__wait); \ | 652 | DEFINE_WAIT(__wait); \ |
658 | \ | 653 | \ |
@@ -661,9 +656,9 @@ do { \ | |||
661 | if (condition) \ | 656 | if (condition) \ |
662 | break; \ | 657 | break; \ |
663 | if (!signal_pending(current)) { \ | 658 | if (!signal_pending(current)) { \ |
664 | tty_unlock(tty); \ | 659 | tty_unlock(); \ |
665 | schedule(); \ | 660 | schedule(); \ |
666 | tty_lock(tty); \ | 661 | tty_lock(); \ |
667 | continue; \ | 662 | continue; \ |
668 | } \ | 663 | } \ |
669 | ret = -ERESTARTSYS; \ | 664 | ret = -ERESTARTSYS; \ |
diff --git a/include/linux/types.h b/include/linux/types.h index 7f480db60231..9c1bd539ea70 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -25,7 +25,7 @@ typedef __kernel_dev_t dev_t; | |||
25 | typedef __kernel_ino_t ino_t; | 25 | typedef __kernel_ino_t ino_t; |
26 | typedef __kernel_mode_t mode_t; | 26 | typedef __kernel_mode_t mode_t; |
27 | typedef unsigned short umode_t; | 27 | typedef unsigned short umode_t; |
28 | typedef __kernel_nlink_t nlink_t; | 28 | typedef __u32 nlink_t; |
29 | typedef __kernel_off_t off_t; | 29 | typedef __kernel_off_t off_t; |
30 | typedef __kernel_pid_t pid_t; | 30 | typedef __kernel_pid_t pid_t; |
31 | typedef __kernel_daddr_t daddr_t; | 31 | typedef __kernel_daddr_t daddr_t; |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 7f855d50cdf5..49b3ac29726a 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -126,8 +126,6 @@ struct usb_hcd { | |||
126 | unsigned wireless:1; /* Wireless USB HCD */ | 126 | unsigned wireless:1; /* Wireless USB HCD */ |
127 | unsigned authorized_default:1; | 127 | unsigned authorized_default:1; |
128 | unsigned has_tt:1; /* Integrated TT in root hub */ | 128 | unsigned has_tt:1; /* Integrated TT in root hub */ |
129 | unsigned broken_pci_sleep:1; /* Don't put the | ||
130 | controller in PCI-D3 for system sleep */ | ||
131 | 129 | ||
132 | unsigned int irq; /* irq allocated */ | 130 | unsigned int irq; /* irq allocated */ |
133 | void __iomem *regs; /* device memory/io */ | 131 | void __iomem *regs; /* device memory/io */ |
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index b455c7c212eb..60da41fe9dc2 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h | |||
@@ -12,6 +12,9 @@ | |||
12 | enum vga_switcheroo_state { | 12 | enum vga_switcheroo_state { |
13 | VGA_SWITCHEROO_OFF, | 13 | VGA_SWITCHEROO_OFF, |
14 | VGA_SWITCHEROO_ON, | 14 | VGA_SWITCHEROO_ON, |
15 | /* below are referred only from vga_switcheroo_get_client_state() */ | ||
16 | VGA_SWITCHEROO_INIT, | ||
17 | VGA_SWITCHEROO_NOT_FOUND, | ||
15 | }; | 18 | }; |
16 | 19 | ||
17 | enum vga_switcheroo_client_id { | 20 | enum vga_switcheroo_client_id { |
@@ -50,6 +53,8 @@ void vga_switcheroo_unregister_handler(void); | |||
50 | 53 | ||
51 | int vga_switcheroo_process_delayed_switch(void); | 54 | int vga_switcheroo_process_delayed_switch(void); |
52 | 55 | ||
56 | int vga_switcheroo_get_client_state(struct pci_dev *dev); | ||
57 | |||
53 | #else | 58 | #else |
54 | 59 | ||
55 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} | 60 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} |
@@ -62,5 +67,7 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, | |||
62 | int id, bool active) { return 0; } | 67 | int id, bool active) { return 0; } |
63 | static inline void vga_switcheroo_unregister_handler(void) {} | 68 | static inline void vga_switcheroo_unregister_handler(void) {} |
64 | static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } | 69 | static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } |
70 | static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; } | ||
71 | |||
65 | 72 | ||
66 | #endif | 73 | #endif |
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h index 9808877c2ab9..a7a683e30b64 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <net/netlabel.h> | 42 | #include <net/netlabel.h> |
43 | #include <net/request_sock.h> | 43 | #include <net/request_sock.h> |
44 | #include <linux/atomic.h> | 44 | #include <linux/atomic.h> |
45 | #include <asm/unaligned.h> | ||
45 | 46 | ||
46 | /* known doi values */ | 47 | /* known doi values */ |
47 | #define CIPSO_V4_DOI_UNKNOWN 0x00000000 | 48 | #define CIPSO_V4_DOI_UNKNOWN 0x00000000 |
@@ -285,7 +286,33 @@ static inline int cipso_v4_skbuff_getattr(const struct sk_buff *skb, | |||
285 | static inline int cipso_v4_validate(const struct sk_buff *skb, | 286 | static inline int cipso_v4_validate(const struct sk_buff *skb, |
286 | unsigned char **option) | 287 | unsigned char **option) |
287 | { | 288 | { |
288 | return -ENOSYS; | 289 | unsigned char *opt = *option; |
290 | unsigned char err_offset = 0; | ||
291 | u8 opt_len = opt[1]; | ||
292 | u8 opt_iter; | ||
293 | |||
294 | if (opt_len < 8) { | ||
295 | err_offset = 1; | ||
296 | goto out; | ||
297 | } | ||
298 | |||
299 | if (get_unaligned_be32(&opt[2]) == 0) { | ||
300 | err_offset = 2; | ||
301 | goto out; | ||
302 | } | ||
303 | |||
304 | for (opt_iter = 6; opt_iter < opt_len;) { | ||
305 | if (opt[opt_iter + 1] > (opt_len - opt_iter)) { | ||
306 | err_offset = opt_iter + 1; | ||
307 | goto out; | ||
308 | } | ||
309 | opt_iter += opt[opt_iter + 1]; | ||
310 | } | ||
311 | |||
312 | out: | ||
313 | *option = opt + err_offset; | ||
314 | return err_offset; | ||
315 | |||
289 | } | 316 | } |
290 | #endif /* CONFIG_NETLABEL */ | 317 | #endif /* CONFIG_NETLABEL */ |
291 | 318 | ||
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index b94765e38e80..2040bff945d4 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -40,7 +40,10 @@ struct inet_peer { | |||
40 | u32 pmtu_orig; | 40 | u32 pmtu_orig; |
41 | u32 pmtu_learned; | 41 | u32 pmtu_learned; |
42 | struct inetpeer_addr_base redirect_learned; | 42 | struct inetpeer_addr_base redirect_learned; |
43 | struct list_head gc_list; | 43 | union { |
44 | struct list_head gc_list; | ||
45 | struct rcu_head gc_rcu; | ||
46 | }; | ||
44 | /* | 47 | /* |
45 | * Once inet_peer is queued for deletion (refcnt == -1), following fields | 48 | * Once inet_peer is queued for deletion (refcnt == -1), following fields |
46 | * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp | 49 | * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp |
diff --git a/include/net/route.h b/include/net/route.h index ed2b78e2375d..98705468ac03 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -130,9 +130,9 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr, | |||
130 | { | 130 | { |
131 | struct flowi4 fl4 = { | 131 | struct flowi4 fl4 = { |
132 | .flowi4_oif = oif, | 132 | .flowi4_oif = oif, |
133 | .flowi4_tos = tos, | ||
133 | .daddr = daddr, | 134 | .daddr = daddr, |
134 | .saddr = saddr, | 135 | .saddr = saddr, |
135 | .flowi4_tos = tos, | ||
136 | }; | 136 | }; |
137 | return ip_route_output_key(net, &fl4); | 137 | return ip_route_output_key(net, &fl4); |
138 | } | 138 | } |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 55ce96b53b09..9d7d54a00e63 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -220,13 +220,16 @@ struct tcf_proto { | |||
220 | 220 | ||
221 | struct qdisc_skb_cb { | 221 | struct qdisc_skb_cb { |
222 | unsigned int pkt_len; | 222 | unsigned int pkt_len; |
223 | unsigned char data[24]; | 223 | u16 bond_queue_mapping; |
224 | u16 _pad; | ||
225 | unsigned char data[20]; | ||
224 | }; | 226 | }; |
225 | 227 | ||
226 | static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) | 228 | static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) |
227 | { | 229 | { |
228 | struct qdisc_skb_cb *qcb; | 230 | struct qdisc_skb_cb *qcb; |
229 | BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz); | 231 | |
232 | BUILD_BUG_ON(sizeof(skb->cb) < offsetof(struct qdisc_skb_cb, data) + sz); | ||
230 | BUILD_BUG_ON(sizeof(qcb->data) < sz); | 233 | BUILD_BUG_ON(sizeof(qcb->data) < sz); |
231 | } | 234 | } |
232 | 235 | ||
diff --git a/include/scsi/fcoe_sysfs.h b/include/scsi/fcoe_sysfs.h new file mode 100644 index 000000000000..604cb9bb3e76 --- /dev/null +++ b/include/scsi/fcoe_sysfs.h | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011-2012 Intel Corporation. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License along with | ||
14 | * this program; if not, write to the Free Software Foundation, Inc., | ||
15 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * Maintained at www.Open-FCoE.org | ||
18 | */ | ||
19 | |||
20 | #ifndef FCOE_SYSFS | ||
21 | #define FCOE_SYSFS | ||
22 | |||
23 | #include <linux/if_ether.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <scsi/fc/fc_fcoe.h> | ||
26 | |||
27 | struct fcoe_ctlr_device; | ||
28 | struct fcoe_fcf_device; | ||
29 | |||
30 | struct fcoe_sysfs_function_template { | ||
31 | void (*get_fcoe_ctlr_link_fail)(struct fcoe_ctlr_device *); | ||
32 | void (*get_fcoe_ctlr_vlink_fail)(struct fcoe_ctlr_device *); | ||
33 | void (*get_fcoe_ctlr_miss_fka)(struct fcoe_ctlr_device *); | ||
34 | void (*get_fcoe_ctlr_symb_err)(struct fcoe_ctlr_device *); | ||
35 | void (*get_fcoe_ctlr_err_block)(struct fcoe_ctlr_device *); | ||
36 | void (*get_fcoe_ctlr_fcs_error)(struct fcoe_ctlr_device *); | ||
37 | void (*get_fcoe_ctlr_mode)(struct fcoe_ctlr_device *); | ||
38 | void (*get_fcoe_fcf_selected)(struct fcoe_fcf_device *); | ||
39 | void (*get_fcoe_fcf_vlan_id)(struct fcoe_fcf_device *); | ||
40 | }; | ||
41 | |||
42 | #define dev_to_ctlr(d) \ | ||
43 | container_of((d), struct fcoe_ctlr_device, dev) | ||
44 | |||
45 | enum fip_conn_type { | ||
46 | FIP_CONN_TYPE_UNKNOWN, | ||
47 | FIP_CONN_TYPE_FABRIC, | ||
48 | FIP_CONN_TYPE_VN2VN, | ||
49 | }; | ||
50 | |||
51 | struct fcoe_ctlr_device { | ||
52 | u32 id; | ||
53 | |||
54 | struct device dev; | ||
55 | struct fcoe_sysfs_function_template *f; | ||
56 | |||
57 | struct list_head fcfs; | ||
58 | char work_q_name[20]; | ||
59 | struct workqueue_struct *work_q; | ||
60 | char devloss_work_q_name[20]; | ||
61 | struct workqueue_struct *devloss_work_q; | ||
62 | struct mutex lock; | ||
63 | |||
64 | int fcf_dev_loss_tmo; | ||
65 | enum fip_conn_type mode; | ||
66 | |||
67 | /* expected in host order for displaying */ | ||
68 | struct fcoe_fc_els_lesb lesb; | ||
69 | }; | ||
70 | |||
71 | static inline void *fcoe_ctlr_device_priv(const struct fcoe_ctlr_device *ctlr) | ||
72 | { | ||
73 | return (void *)(ctlr + 1); | ||
74 | } | ||
75 | |||
76 | /* fcf states */ | ||
77 | enum fcf_state { | ||
78 | FCOE_FCF_STATE_UNKNOWN, | ||
79 | FCOE_FCF_STATE_DISCONNECTED, | ||
80 | FCOE_FCF_STATE_CONNECTED, | ||
81 | FCOE_FCF_STATE_DELETED, | ||
82 | }; | ||
83 | |||
84 | struct fcoe_fcf_device { | ||
85 | u32 id; | ||
86 | struct device dev; | ||
87 | struct list_head peers; | ||
88 | struct work_struct delete_work; | ||
89 | struct delayed_work dev_loss_work; | ||
90 | u32 dev_loss_tmo; | ||
91 | void *priv; | ||
92 | enum fcf_state state; | ||
93 | |||
94 | u64 fabric_name; | ||
95 | u64 switch_name; | ||
96 | u32 fc_map; | ||
97 | u16 vfid; | ||
98 | u8 mac[ETH_ALEN]; | ||
99 | u8 priority; | ||
100 | u32 fka_period; | ||
101 | u8 selected; | ||
102 | u16 vlan_id; | ||
103 | }; | ||
104 | |||
105 | #define dev_to_fcf(d) \ | ||
106 | container_of((d), struct fcoe_fcf_device, dev) | ||
107 | /* parentage should never be missing */ | ||
108 | #define fcoe_fcf_dev_to_ctlr_dev(x) \ | ||
109 | dev_to_ctlr((x)->dev.parent) | ||
110 | #define fcoe_fcf_device_priv(x) \ | ||
111 | ((x)->priv) | ||
112 | |||
113 | struct fcoe_ctlr_device *fcoe_ctlr_device_add(struct device *parent, | ||
114 | struct fcoe_sysfs_function_template *f, | ||
115 | int priv_size); | ||
116 | void fcoe_ctlr_device_delete(struct fcoe_ctlr_device *); | ||
117 | struct fcoe_fcf_device *fcoe_fcf_device_add(struct fcoe_ctlr_device *, | ||
118 | struct fcoe_fcf_device *); | ||
119 | void fcoe_fcf_device_delete(struct fcoe_fcf_device *); | ||
120 | |||
121 | int __init fcoe_sysfs_setup(void); | ||
122 | void __exit fcoe_sysfs_teardown(void); | ||
123 | |||
124 | #endif /* FCOE_SYSFS */ | ||
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index cfdb55f0937e..22b07cc99808 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/random.h> | 29 | #include <linux/random.h> |
30 | #include <scsi/fc/fc_fcoe.h> | 30 | #include <scsi/fc/fc_fcoe.h> |
31 | #include <scsi/libfc.h> | 31 | #include <scsi/libfc.h> |
32 | #include <scsi/fcoe_sysfs.h> | ||
32 | 33 | ||
33 | #define FCOE_MAX_CMD_LEN 16 /* Supported CDB length */ | 34 | #define FCOE_MAX_CMD_LEN 16 /* Supported CDB length */ |
34 | 35 | ||
@@ -159,8 +160,24 @@ struct fcoe_ctlr { | |||
159 | }; | 160 | }; |
160 | 161 | ||
161 | /** | 162 | /** |
163 | * fcoe_ctlr_priv() - Return the private data from a fcoe_ctlr | ||
164 | * @cltr: The fcoe_ctlr whose private data will be returned | ||
165 | */ | ||
166 | static inline void *fcoe_ctlr_priv(const struct fcoe_ctlr *ctlr) | ||
167 | { | ||
168 | return (void *)(ctlr + 1); | ||
169 | } | ||
170 | |||
171 | #define fcoe_ctlr_to_ctlr_dev(x) \ | ||
172 | (struct fcoe_ctlr_device *)(((struct fcoe_ctlr_device *)(x)) - 1) | ||
173 | |||
174 | /** | ||
162 | * struct fcoe_fcf - Fibre-Channel Forwarder | 175 | * struct fcoe_fcf - Fibre-Channel Forwarder |
163 | * @list: list linkage | 176 | * @list: list linkage |
177 | * @event_work: Work for FC Transport actions queue | ||
178 | * @event: The event to be processed | ||
179 | * @fip: The controller that the FCF was discovered on | ||
180 | * @fcf_dev: The associated fcoe_fcf_device instance | ||
164 | * @time: system time (jiffies) when an advertisement was last received | 181 | * @time: system time (jiffies) when an advertisement was last received |
165 | * @switch_name: WWN of switch from advertisement | 182 | * @switch_name: WWN of switch from advertisement |
166 | * @fabric_name: WWN of fabric from advertisement | 183 | * @fabric_name: WWN of fabric from advertisement |
@@ -182,6 +199,9 @@ struct fcoe_ctlr { | |||
182 | */ | 199 | */ |
183 | struct fcoe_fcf { | 200 | struct fcoe_fcf { |
184 | struct list_head list; | 201 | struct list_head list; |
202 | struct work_struct event_work; | ||
203 | struct fcoe_ctlr *fip; | ||
204 | struct fcoe_fcf_device *fcf_dev; | ||
185 | unsigned long time; | 205 | unsigned long time; |
186 | 206 | ||
187 | u64 switch_name; | 207 | u64 switch_name; |
@@ -198,6 +218,9 @@ struct fcoe_fcf { | |||
198 | u8 fd_flags:1; | 218 | u8 fd_flags:1; |
199 | }; | 219 | }; |
200 | 220 | ||
221 | #define fcoe_fcf_to_fcf_dev(x) \ | ||
222 | ((x)->fcf_dev) | ||
223 | |||
201 | /** | 224 | /** |
202 | * struct fcoe_rport - VN2VN remote port | 225 | * struct fcoe_rport - VN2VN remote port |
203 | * @time: time of create or last beacon packet received from node | 226 | * @time: time of create or last beacon packet received from node |
@@ -333,6 +356,10 @@ void fcoe_queue_timer(ulong lport); | |||
333 | int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen, | 356 | int fcoe_get_paged_crc_eof(struct sk_buff *skb, int tlen, |
334 | struct fcoe_percpu_s *fps); | 357 | struct fcoe_percpu_s *fps); |
335 | 358 | ||
359 | /* FCoE Sysfs helpers */ | ||
360 | void fcoe_fcf_get_selected(struct fcoe_fcf_device *); | ||
361 | void fcoe_ctlr_get_fip_mode(struct fcoe_ctlr_device *); | ||
362 | |||
336 | /** | 363 | /** |
337 | * struct netdev_list | 364 | * struct netdev_list |
338 | * A mapping from netdevice to fcoe_transport | 365 | * A mapping from netdevice to fcoe_transport |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 116959933f46..c78a23333c4f 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -47,6 +47,7 @@ struct target_core_fabric_ops { | |||
47 | */ | 47 | */ |
48 | int (*check_stop_free)(struct se_cmd *); | 48 | int (*check_stop_free)(struct se_cmd *); |
49 | void (*release_cmd)(struct se_cmd *); | 49 | void (*release_cmd)(struct se_cmd *); |
50 | void (*put_session)(struct se_session *); | ||
50 | /* | 51 | /* |
51 | * Called with spin_lock_bh(struct se_portal_group->session_lock held. | 52 | * Called with spin_lock_bh(struct se_portal_group->session_lock held. |
52 | */ | 53 | */ |
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 1480900c511c..d274734b2aa4 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
@@ -289,6 +289,7 @@ TRACE_EVENT(rcu_dyntick, | |||
289 | * "In holdoff": Nothing to do, holding off after unsuccessful attempt. | 289 | * "In holdoff": Nothing to do, holding off after unsuccessful attempt. |
290 | * "Begin holdoff": Attempt failed, don't retry until next jiffy. | 290 | * "Begin holdoff": Attempt failed, don't retry until next jiffy. |
291 | * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. | 291 | * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. |
292 | * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks. | ||
292 | * "More callbacks": Still more callbacks, try again to clear them out. | 293 | * "More callbacks": Still more callbacks, try again to clear them out. |
293 | * "Callbacks drained": All callbacks processed, off to dyntick idle! | 294 | * "Callbacks drained": All callbacks processed, off to dyntick idle! |
294 | * "Timer": Timer fired to cause CPU to continue processing callbacks. | 295 | * "Timer": Timer fired to cause CPU to continue processing callbacks. |
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h new file mode 100644 index 000000000000..609efe8c686e --- /dev/null +++ b/include/video/auo_k190xfb.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /* | ||
2 | * Definitions for AUO-K190X framebuffer drivers | ||
3 | * | ||
4 | * Copyright (C) 2012 Heiko Stuebner <heiko@sntech.de> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef _LINUX_VIDEO_AUO_K190XFB_H_ | ||
12 | #define _LINUX_VIDEO_AUO_K190XFB_H_ | ||
13 | |||
14 | /* Controller standby command needs a param */ | ||
15 | #define AUOK190X_QUIRK_STANDBYPARAM (1 << 0) | ||
16 | |||
17 | /* Controller standby is completely broken */ | ||
18 | #define AUOK190X_QUIRK_STANDBYBROKEN (1 << 1) | ||
19 | |||
20 | /* | ||
21 | * Resolutions for the displays | ||
22 | */ | ||
23 | #define AUOK190X_RESOLUTION_800_600 0 | ||
24 | #define AUOK190X_RESOLUTION_1024_768 1 | ||
25 | |||
26 | /* | ||
27 | * struct used by auok190x. board specific stuff comes from *board | ||
28 | */ | ||
29 | struct auok190xfb_par { | ||
30 | struct fb_info *info; | ||
31 | struct auok190x_board *board; | ||
32 | |||
33 | struct regulator *regulator; | ||
34 | |||
35 | struct mutex io_lock; | ||
36 | struct delayed_work work; | ||
37 | wait_queue_head_t waitq; | ||
38 | int resolution; | ||
39 | int rotation; | ||
40 | int consecutive_threshold; | ||
41 | int update_cnt; | ||
42 | |||
43 | /* panel and controller informations */ | ||
44 | int epd_type; | ||
45 | int panel_size_int; | ||
46 | int panel_size_float; | ||
47 | int panel_model; | ||
48 | int tcon_version; | ||
49 | int lut_version; | ||
50 | |||
51 | /* individual controller callbacks */ | ||
52 | void (*update_partial)(struct auok190xfb_par *par, u16 y1, u16 y2); | ||
53 | void (*update_all)(struct auok190xfb_par *par); | ||
54 | bool (*need_refresh)(struct auok190xfb_par *par); | ||
55 | void (*init)(struct auok190xfb_par *par); | ||
56 | void (*recover)(struct auok190xfb_par *par); | ||
57 | |||
58 | int update_mode; /* mode to use for updates */ | ||
59 | int last_mode; /* update mode last used */ | ||
60 | int flash; | ||
61 | |||
62 | /* power management */ | ||
63 | int autosuspend_delay; | ||
64 | bool standby; | ||
65 | bool manual_standby; | ||
66 | }; | ||
67 | |||
68 | /** | ||
69 | * Board specific platform-data | ||
70 | * @init: initialize the controller interface | ||
71 | * @cleanup: cleanup the controller interface | ||
72 | * @wait_for_rdy: wait until the controller is not busy anymore | ||
73 | * @set_ctl: change an interface control | ||
74 | * @set_hdb: write a value to the data register | ||
75 | * @get_hdb: read a value from the data register | ||
76 | * @setup_irq: method to setup the irq handling on the busy gpio | ||
77 | * @gpio_nsleep: sleep gpio | ||
78 | * @gpio_nrst: reset gpio | ||
79 | * @gpio_nbusy: busy gpio | ||
80 | * @resolution: one of the AUOK190X_RESOLUTION constants | ||
81 | * @rotation: rotation of the framebuffer | ||
82 | * @quirks: controller quirks to honor | ||
83 | * @fps: frames per second for defio | ||
84 | */ | ||
85 | struct auok190x_board { | ||
86 | int (*init)(struct auok190xfb_par *); | ||
87 | void (*cleanup)(struct auok190xfb_par *); | ||
88 | int (*wait_for_rdy)(struct auok190xfb_par *); | ||
89 | |||
90 | void (*set_ctl)(struct auok190xfb_par *, unsigned char, u8); | ||
91 | void (*set_hdb)(struct auok190xfb_par *, u16); | ||
92 | u16 (*get_hdb)(struct auok190xfb_par *); | ||
93 | |||
94 | int (*setup_irq)(struct fb_info *); | ||
95 | |||
96 | int gpio_nsleep; | ||
97 | int gpio_nrst; | ||
98 | int gpio_nbusy; | ||
99 | |||
100 | int resolution; | ||
101 | int rotation; | ||
102 | int quirks; | ||
103 | int fps; | ||
104 | }; | ||
105 | |||
106 | #endif | ||
diff --git a/include/video/exynos_dp.h b/include/video/exynos_dp.h index 8847a9d6dd42..bd8cabd344db 100644 --- a/include/video/exynos_dp.h +++ b/include/video/exynos_dp.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #define DP_TIMEOUT_LOOP_COUNT 100 | 15 | #define DP_TIMEOUT_LOOP_COUNT 100 |
16 | #define MAX_CR_LOOP 5 | 16 | #define MAX_CR_LOOP 5 |
17 | #define MAX_EQ_LOOP 4 | 17 | #define MAX_EQ_LOOP 5 |
18 | 18 | ||
19 | enum link_rate_type { | 19 | enum link_rate_type { |
20 | LINK_RATE_1_62GBPS = 0x06, | 20 | LINK_RATE_1_62GBPS = 0x06, |
diff --git a/include/video/exynos_mipi_dsim.h b/include/video/exynos_mipi_dsim.h index 772c770535f1..83ce5e667d47 100644 --- a/include/video/exynos_mipi_dsim.h +++ b/include/video/exynos_mipi_dsim.h | |||
@@ -315,6 +315,7 @@ struct mipi_dsim_lcd_device { | |||
315 | int id; | 315 | int id; |
316 | int bus_id; | 316 | int bus_id; |
317 | int irq; | 317 | int irq; |
318 | int panel_reverse; | ||
318 | 319 | ||
319 | struct mipi_dsim_device *master; | 320 | struct mipi_dsim_device *master; |
320 | void *platform_data; | 321 | void *platform_data; |
diff --git a/include/video/omapdss.h b/include/video/omapdss.h index 1c46a14341dd..c8e59b4a3364 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h | |||
@@ -51,6 +51,8 @@ | |||
51 | 51 | ||
52 | struct omap_dss_device; | 52 | struct omap_dss_device; |
53 | struct omap_overlay_manager; | 53 | struct omap_overlay_manager; |
54 | struct snd_aes_iec958; | ||
55 | struct snd_cea_861_aud_if; | ||
54 | 56 | ||
55 | enum omap_display_type { | 57 | enum omap_display_type { |
56 | OMAP_DISPLAY_TYPE_NONE = 0, | 58 | OMAP_DISPLAY_TYPE_NONE = 0, |
@@ -158,6 +160,13 @@ enum omap_dss_display_state { | |||
158 | OMAP_DSS_DISPLAY_SUSPENDED, | 160 | OMAP_DSS_DISPLAY_SUSPENDED, |
159 | }; | 161 | }; |
160 | 162 | ||
163 | enum omap_dss_audio_state { | ||
164 | OMAP_DSS_AUDIO_DISABLED = 0, | ||
165 | OMAP_DSS_AUDIO_ENABLED, | ||
166 | OMAP_DSS_AUDIO_CONFIGURED, | ||
167 | OMAP_DSS_AUDIO_PLAYING, | ||
168 | }; | ||
169 | |||
161 | /* XXX perhaps this should be removed */ | 170 | /* XXX perhaps this should be removed */ |
162 | enum omap_dss_overlay_managers { | 171 | enum omap_dss_overlay_managers { |
163 | OMAP_DSS_OVL_MGR_LCD, | 172 | OMAP_DSS_OVL_MGR_LCD, |
@@ -166,8 +175,9 @@ enum omap_dss_overlay_managers { | |||
166 | }; | 175 | }; |
167 | 176 | ||
168 | enum omap_dss_rotation_type { | 177 | enum omap_dss_rotation_type { |
169 | OMAP_DSS_ROT_DMA = 0, | 178 | OMAP_DSS_ROT_DMA = 1 << 0, |
170 | OMAP_DSS_ROT_VRFB = 1, | 179 | OMAP_DSS_ROT_VRFB = 1 << 1, |
180 | OMAP_DSS_ROT_TILER = 1 << 2, | ||
171 | }; | 181 | }; |
172 | 182 | ||
173 | /* clockwise rotation angle */ | 183 | /* clockwise rotation angle */ |
@@ -309,6 +319,7 @@ struct omap_dss_board_info { | |||
309 | struct omap_dss_device *default_device; | 319 | struct omap_dss_device *default_device; |
310 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); | 320 | int (*dsi_enable_pads)(int dsi_id, unsigned lane_mask); |
311 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); | 321 | void (*dsi_disable_pads)(int dsi_id, unsigned lane_mask); |
322 | int (*set_min_bus_tput)(struct device *dev, unsigned long r); | ||
312 | }; | 323 | }; |
313 | 324 | ||
314 | /* Init with the board info */ | 325 | /* Init with the board info */ |
@@ -316,11 +327,6 @@ extern int omap_display_init(struct omap_dss_board_info *board_data); | |||
316 | /* HDMI mux init*/ | 327 | /* HDMI mux init*/ |
317 | extern int omap_hdmi_init(enum omap_hdmi_flags flags); | 328 | extern int omap_hdmi_init(enum omap_hdmi_flags flags); |
318 | 329 | ||
319 | struct omap_display_platform_data { | ||
320 | struct omap_dss_board_info *board_data; | ||
321 | /* TODO: Additional members to be added when PM is considered */ | ||
322 | }; | ||
323 | |||
324 | struct omap_video_timings { | 330 | struct omap_video_timings { |
325 | /* Unit: pixels */ | 331 | /* Unit: pixels */ |
326 | u16 x_res; | 332 | u16 x_res; |
@@ -587,6 +593,8 @@ struct omap_dss_device { | |||
587 | 593 | ||
588 | enum omap_dss_display_state state; | 594 | enum omap_dss_display_state state; |
589 | 595 | ||
596 | enum omap_dss_audio_state audio_state; | ||
597 | |||
590 | /* platform specific */ | 598 | /* platform specific */ |
591 | int (*platform_enable)(struct omap_dss_device *dssdev); | 599 | int (*platform_enable)(struct omap_dss_device *dssdev); |
592 | void (*platform_disable)(struct omap_dss_device *dssdev); | 600 | void (*platform_disable)(struct omap_dss_device *dssdev); |
@@ -599,6 +607,11 @@ struct omap_dss_hdmi_data | |||
599 | int hpd_gpio; | 607 | int hpd_gpio; |
600 | }; | 608 | }; |
601 | 609 | ||
610 | struct omap_dss_audio { | ||
611 | struct snd_aes_iec958 *iec; | ||
612 | struct snd_cea_861_aud_if *cea; | ||
613 | }; | ||
614 | |||
602 | struct omap_dss_driver { | 615 | struct omap_dss_driver { |
603 | struct device_driver driver; | 616 | struct device_driver driver; |
604 | 617 | ||
@@ -646,6 +659,24 @@ struct omap_dss_driver { | |||
646 | 659 | ||
647 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); | 660 | int (*read_edid)(struct omap_dss_device *dssdev, u8 *buf, int len); |
648 | bool (*detect)(struct omap_dss_device *dssdev); | 661 | bool (*detect)(struct omap_dss_device *dssdev); |
662 | |||
663 | /* | ||
664 | * For display drivers that support audio. This encompasses | ||
665 | * HDMI and DisplayPort at the moment. | ||
666 | */ | ||
667 | /* | ||
668 | * Note: These functions might sleep. Do not call while | ||
669 | * holding a spinlock/readlock. | ||
670 | */ | ||
671 | int (*audio_enable)(struct omap_dss_device *dssdev); | ||
672 | void (*audio_disable)(struct omap_dss_device *dssdev); | ||
673 | bool (*audio_supported)(struct omap_dss_device *dssdev); | ||
674 | int (*audio_config)(struct omap_dss_device *dssdev, | ||
675 | struct omap_dss_audio *audio); | ||
676 | /* Note: These functions may not sleep */ | ||
677 | int (*audio_start)(struct omap_dss_device *dssdev); | ||
678 | void (*audio_stop)(struct omap_dss_device *dssdev); | ||
679 | |||
649 | }; | 680 | }; |
650 | 681 | ||
651 | int omap_dss_register_driver(struct omap_dss_driver *); | 682 | int omap_dss_register_driver(struct omap_dss_driver *); |
@@ -670,6 +701,8 @@ struct omap_overlay *omap_dss_get_overlay(int num); | |||
670 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, | 701 | void omapdss_default_get_resolution(struct omap_dss_device *dssdev, |
671 | u16 *xres, u16 *yres); | 702 | u16 *xres, u16 *yres); |
672 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); | 703 | int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); |
704 | void omapdss_default_get_timings(struct omap_dss_device *dssdev, | ||
705 | struct omap_video_timings *timings); | ||
673 | 706 | ||
674 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | 707 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); |
675 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | 708 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); |
diff --git a/include/video/sh_mobile_hdmi.h b/include/video/sh_mobile_hdmi.h index 728f9de9c258..63d20efa254a 100644 --- a/include/video/sh_mobile_hdmi.h +++ b/include/video/sh_mobile_hdmi.h | |||
@@ -18,9 +18,11 @@ struct clk; | |||
18 | /* | 18 | /* |
19 | * flags format | 19 | * flags format |
20 | * | 20 | * |
21 | * 0x0000000A | 21 | * 0x00000CBA |
22 | * | 22 | * |
23 | * A: Audio source select | 23 | * A: Audio source select |
24 | * B: Int output option | ||
25 | * C: Chip specific option | ||
24 | */ | 26 | */ |
25 | 27 | ||
26 | /* Audio source select */ | 28 | /* Audio source select */ |
@@ -30,6 +32,14 @@ struct clk; | |||
30 | #define HDMI_SND_SRC_DSD (2 << 0) | 32 | #define HDMI_SND_SRC_DSD (2 << 0) |
31 | #define HDMI_SND_SRC_HBR (3 << 0) | 33 | #define HDMI_SND_SRC_HBR (3 << 0) |
32 | 34 | ||
35 | /* Int output option */ | ||
36 | #define HDMI_OUTPUT_PUSH_PULL (1 << 4) /* System control : output mode */ | ||
37 | #define HDMI_OUTPUT_POLARITY_HI (1 << 5) /* System control : output polarity */ | ||
38 | |||
39 | /* Chip specific option */ | ||
40 | #define HDMI_32BIT_REG (1 << 8) | ||
41 | #define HDMI_HAS_HTOP1 (1 << 9) | ||
42 | |||
33 | struct sh_mobile_hdmi_info { | 43 | struct sh_mobile_hdmi_info { |
34 | unsigned int flags; | 44 | unsigned int flags; |
35 | long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, | 45 | long (*clk_optimize_parent)(unsigned long target, unsigned long *best_freq, |