diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:15 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-04-26 04:22:59 -0400 |
commit | 07f9479a40cc778bc1462ada11f95b01360ae4ff (patch) | |
tree | 0676cf38df3844004bb3ebfd99dfa67a4a8998f5 /include | |
parent | 9d5e6bdb3013acfb311ab407eeca0b6a6a3dedbf (diff) | |
parent | cd2e49e90f1cae7726c9a2c54488d881d7f1cd1c (diff) |
Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be
applied for files that didn't exist on the old branch.
Diffstat (limited to 'include')
366 files changed, 7642 insertions, 1724 deletions
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index ef1cef77d32b..d7bd661bfae7 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -183,13 +183,19 @@ | |||
183 | 183 | ||
184 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | 184 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) |
185 | /* | 185 | /* |
186 | * Module name is included in both debug and non-debug versions primarily for | 186 | * The module name is used primarily for error and debug messages. |
187 | * error messages. The __FILE__ macro is not very useful for this, because it | 187 | * The __FILE__ macro is not very useful for this, because it |
188 | * often includes the entire pathname to the module | 188 | * usually includes the entire pathname to the module making the |
189 | * debug output difficult to read. | ||
189 | */ | 190 | */ |
190 | #define ACPI_MODULE_NAME(name) static const char ACPI_UNUSED_VAR _acpi_module_name[] = name; | 191 | #define ACPI_MODULE_NAME(name) static const char ACPI_UNUSED_VAR _acpi_module_name[] = name; |
191 | #else | 192 | #else |
193 | /* | ||
194 | * For the no-debug and no-error-msg cases, we must at least define | ||
195 | * a null module name. | ||
196 | */ | ||
192 | #define ACPI_MODULE_NAME(name) | 197 | #define ACPI_MODULE_NAME(name) |
198 | #define _acpi_module_name "" | ||
193 | #endif | 199 | #endif |
194 | 200 | ||
195 | /* | 201 | /* |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index ff103ba96b78..3a10ef5914eb 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -250,7 +250,6 @@ struct acpi_device_wakeup { | |||
250 | struct acpi_handle_list resources; | 250 | struct acpi_handle_list resources; |
251 | struct acpi_device_wakeup_flags flags; | 251 | struct acpi_device_wakeup_flags flags; |
252 | int prepare_count; | 252 | int prepare_count; |
253 | int run_wake_count; | ||
254 | }; | 253 | }; |
255 | 254 | ||
256 | /* Device */ | 255 | /* Device */ |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index e46ec95a8ada..f6ad63d25b73 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
49 | 49 | ||
50 | #define ACPI_CA_VERSION 0x20110112 | 50 | #define ACPI_CA_VERSION 0x20110316 |
51 | 51 | ||
52 | #include "actypes.h" | 52 | #include "actypes.h" |
53 | #include "actbl.h" | 53 | #include "actbl.h" |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 7e42bfee0e29..f1380287ed4d 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -290,7 +290,7 @@ struct acpi_table_fadt { | |||
290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ | 290 | #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ |
291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ | 291 | #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ |
292 | 292 | ||
293 | /* Values for preferred_profile (Prefered Power Management Profiles) */ | 293 | /* Values for preferred_profile (Preferred Power Management Profiles) */ |
294 | 294 | ||
295 | enum acpi_prefered_pm_profiles { | 295 | enum acpi_prefered_pm_profiles { |
296 | PM_UNSPECIFIED = 0, | 296 | PM_UNSPECIFIED = 0, |
@@ -343,4 +343,20 @@ struct acpi_table_desc { | |||
343 | #include <acpi/actbl1.h> | 343 | #include <acpi/actbl1.h> |
344 | #include <acpi/actbl2.h> | 344 | #include <acpi/actbl2.h> |
345 | 345 | ||
346 | /* | ||
347 | * Sizes of the various flavors of FADT. We need to look closely | ||
348 | * at the FADT length because the version number essentially tells | ||
349 | * us nothing because of many BIOS bugs where the version does not | ||
350 | * match the expected length. In other words, the length of the | ||
351 | * FADT is the bottom line as to what the version really is. | ||
352 | * | ||
353 | * For reference, the values below are as follows: | ||
354 | * FADT V1 size: 0x74 | ||
355 | * FADT V2 size: 0x84 | ||
356 | * FADT V3+ size: 0xF4 | ||
357 | */ | ||
358 | #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) | ||
359 | #define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) | ||
360 | #define ACPI_FADT_V3_SIZE (u32) (sizeof (struct acpi_table_fadt)) | ||
361 | |||
346 | #endif /* __ACTBL_H__ */ | 362 | #endif /* __ACTBL_H__ */ |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 0fc15dfb2e22..58bdd0545c5a 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Name: actbl2.h - ACPI Specification Revision 2.0 Tables | 3 | * Name: actbl2.h - ACPI Table Definitions (tables not in ACPI spec) |
4 | * | 4 | * |
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
@@ -716,6 +716,68 @@ struct acpi_table_mchi { | |||
716 | 716 | ||
717 | /******************************************************************************* | 717 | /******************************************************************************* |
718 | * | 718 | * |
719 | * SLIC - Software Licensing Description Table | ||
720 | * Version 1 | ||
721 | * | ||
722 | * Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems", | ||
723 | * Copyright 2006 | ||
724 | * | ||
725 | ******************************************************************************/ | ||
726 | |||
727 | /* Basic SLIC table is only the common ACPI header */ | ||
728 | |||
729 | struct acpi_table_slic { | ||
730 | struct acpi_table_header header; /* Common ACPI table header */ | ||
731 | }; | ||
732 | |||
733 | /* Common SLIC subtable header */ | ||
734 | |||
735 | struct acpi_slic_header { | ||
736 | u32 type; | ||
737 | u32 length; | ||
738 | }; | ||
739 | |||
740 | /* Values for Type field above */ | ||
741 | |||
742 | enum acpi_slic_type { | ||
743 | ACPI_SLIC_TYPE_PUBLIC_KEY = 0, | ||
744 | ACPI_SLIC_TYPE_WINDOWS_MARKER = 1, | ||
745 | ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */ | ||
746 | }; | ||
747 | |||
748 | /* | ||
749 | * SLIC Sub-tables, correspond to Type in struct acpi_slic_header | ||
750 | */ | ||
751 | |||
752 | /* 0: Public Key Structure */ | ||
753 | |||
754 | struct acpi_slic_key { | ||
755 | struct acpi_slic_header header; | ||
756 | u8 key_type; | ||
757 | u8 version; | ||
758 | u16 reserved; | ||
759 | u32 algorithm; | ||
760 | char magic[4]; | ||
761 | u32 bit_length; | ||
762 | u32 exponent; | ||
763 | u8 modulus[128]; | ||
764 | }; | ||
765 | |||
766 | /* 1: Windows Marker Structure */ | ||
767 | |||
768 | struct acpi_slic_marker { | ||
769 | struct acpi_slic_header header; | ||
770 | u32 version; | ||
771 | char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ | ||
772 | char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ | ||
773 | char windows_flag[8]; | ||
774 | u32 slic_version; | ||
775 | u8 reserved[16]; | ||
776 | u8 signature[128]; | ||
777 | }; | ||
778 | |||
779 | /******************************************************************************* | ||
780 | * | ||
719 | * SPCR - Serial Port Console Redirection table | 781 | * SPCR - Serial Port Console Redirection table |
720 | * Version 1 | 782 | * Version 1 |
721 | * | 783 | * |
diff --git a/include/acpi/apei.h b/include/acpi/apei.h index c4dbb132d902..e67b523a50e1 100644 --- a/include/acpi/apei.h +++ b/include/acpi/apei.h | |||
@@ -30,10 +30,11 @@ int apei_hest_parse(apei_hest_func_t func, void *data); | |||
30 | 30 | ||
31 | int erst_write(const struct cper_record_header *record); | 31 | int erst_write(const struct cper_record_header *record); |
32 | ssize_t erst_get_record_count(void); | 32 | ssize_t erst_get_record_count(void); |
33 | int erst_get_next_record_id(u64 *record_id); | 33 | int erst_get_record_id_begin(int *pos); |
34 | int erst_get_record_id_next(int *pos, u64 *record_id); | ||
35 | void erst_get_record_id_end(void); | ||
34 | ssize_t erst_read(u64 record_id, struct cper_record_header *record, | 36 | ssize_t erst_read(u64 record_id, struct cper_record_header *record, |
35 | size_t buflen); | 37 | size_t buflen); |
36 | ssize_t erst_read_next(struct cper_record_header *record, size_t buflen); | ||
37 | int erst_clear(u64 record_id); | 38 | int erst_clear(u64 record_id); |
38 | 39 | ||
39 | #endif | 40 | #endif |
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index a54f4421a24d..280ca7a96f75 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h | |||
@@ -38,8 +38,7 @@ | |||
38 | 38 | ||
39 | #include <asm-generic/bitops/atomic.h> | 39 | #include <asm-generic/bitops/atomic.h> |
40 | #include <asm-generic/bitops/non-atomic.h> | 40 | #include <asm-generic/bitops/non-atomic.h> |
41 | #include <asm-generic/bitops/ext2-non-atomic.h> | 41 | #include <asm-generic/bitops/le.h> |
42 | #include <asm-generic/bitops/ext2-atomic.h> | 42 | #include <asm-generic/bitops/ext2-atomic.h> |
43 | #include <asm-generic/bitops/minix.h> | ||
44 | 43 | ||
45 | #endif /* __ASM_GENERIC_BITOPS_H */ | 44 | #endif /* __ASM_GENERIC_BITOPS_H */ |
diff --git a/include/asm-generic/bitops/ext2-atomic.h b/include/asm-generic/bitops/ext2-atomic.h index ab1c875efb74..ecf1c9d8a7cc 100644 --- a/include/asm-generic/bitops/ext2-atomic.h +++ b/include/asm-generic/bitops/ext2-atomic.h | |||
@@ -5,7 +5,7 @@ | |||
5 | ({ \ | 5 | ({ \ |
6 | int ret; \ | 6 | int ret; \ |
7 | spin_lock(lock); \ | 7 | spin_lock(lock); \ |
8 | ret = ext2_set_bit((nr), (unsigned long *)(addr)); \ | 8 | ret = __test_and_set_bit_le(nr, addr); \ |
9 | spin_unlock(lock); \ | 9 | spin_unlock(lock); \ |
10 | ret; \ | 10 | ret; \ |
11 | }) | 11 | }) |
@@ -14,7 +14,7 @@ | |||
14 | ({ \ | 14 | ({ \ |
15 | int ret; \ | 15 | int ret; \ |
16 | spin_lock(lock); \ | 16 | spin_lock(lock); \ |
17 | ret = ext2_clear_bit((nr), (unsigned long *)(addr)); \ | 17 | ret = __test_and_clear_bit_le(nr, addr); \ |
18 | spin_unlock(lock); \ | 18 | spin_unlock(lock); \ |
19 | ret; \ | 19 | ret; \ |
20 | }) | 20 | }) |
diff --git a/include/asm-generic/bitops/ext2-non-atomic.h b/include/asm-generic/bitops/ext2-non-atomic.h deleted file mode 100644 index 63cf822431a2..000000000000 --- a/include/asm-generic/bitops/ext2-non-atomic.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ | ||
2 | #define _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ | ||
3 | |||
4 | #include <asm-generic/bitops/le.h> | ||
5 | |||
6 | #define ext2_set_bit(nr,addr) \ | ||
7 | generic___test_and_set_le_bit((nr),(unsigned long *)(addr)) | ||
8 | #define ext2_clear_bit(nr,addr) \ | ||
9 | generic___test_and_clear_le_bit((nr),(unsigned long *)(addr)) | ||
10 | |||
11 | #define ext2_test_bit(nr,addr) \ | ||
12 | generic_test_le_bit((nr),(unsigned long *)(addr)) | ||
13 | #define ext2_find_first_zero_bit(addr, size) \ | ||
14 | generic_find_first_zero_le_bit((unsigned long *)(addr), (size)) | ||
15 | #define ext2_find_next_zero_bit(addr, size, off) \ | ||
16 | generic_find_next_zero_le_bit((unsigned long *)(addr), (size), (off)) | ||
17 | #define ext2_find_next_bit(addr, size, off) \ | ||
18 | generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) | ||
19 | |||
20 | #endif /* _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ */ | ||
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index 80e3bf13b2b9..946a21b1b5dc 100644 --- a/include/asm-generic/bitops/le.h +++ b/include/asm-generic/bitops/le.h | |||
@@ -4,54 +4,77 @@ | |||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
6 | 6 | ||
7 | #define BITOP_WORD(nr) ((nr) / BITS_PER_LONG) | ||
8 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) | ||
9 | |||
10 | #if defined(__LITTLE_ENDIAN) | 7 | #if defined(__LITTLE_ENDIAN) |
11 | 8 | ||
12 | #define generic_test_le_bit(nr, addr) test_bit(nr, addr) | 9 | #define BITOP_LE_SWIZZLE 0 |
13 | #define generic___set_le_bit(nr, addr) __set_bit(nr, addr) | ||
14 | #define generic___clear_le_bit(nr, addr) __clear_bit(nr, addr) | ||
15 | 10 | ||
16 | #define generic_test_and_set_le_bit(nr, addr) test_and_set_bit(nr, addr) | 11 | static inline unsigned long find_next_zero_bit_le(const void *addr, |
17 | #define generic_test_and_clear_le_bit(nr, addr) test_and_clear_bit(nr, addr) | 12 | unsigned long size, unsigned long offset) |
13 | { | ||
14 | return find_next_zero_bit(addr, size, offset); | ||
15 | } | ||
18 | 16 | ||
19 | #define generic___test_and_set_le_bit(nr, addr) __test_and_set_bit(nr, addr) | 17 | static inline unsigned long find_next_bit_le(const void *addr, |
20 | #define generic___test_and_clear_le_bit(nr, addr) __test_and_clear_bit(nr, addr) | 18 | unsigned long size, unsigned long offset) |
19 | { | ||
20 | return find_next_bit(addr, size, offset); | ||
21 | } | ||
21 | 22 | ||
22 | #define generic_find_next_zero_le_bit(addr, size, offset) find_next_zero_bit(addr, size, offset) | 23 | static inline unsigned long find_first_zero_bit_le(const void *addr, |
23 | #define generic_find_next_le_bit(addr, size, offset) \ | 24 | unsigned long size) |
24 | find_next_bit(addr, size, offset) | 25 | { |
26 | return find_first_zero_bit(addr, size); | ||
27 | } | ||
25 | 28 | ||
26 | #elif defined(__BIG_ENDIAN) | 29 | #elif defined(__BIG_ENDIAN) |
27 | 30 | ||
28 | #define generic_test_le_bit(nr, addr) \ | 31 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) |
29 | test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
30 | #define generic___set_le_bit(nr, addr) \ | ||
31 | __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
32 | #define generic___clear_le_bit(nr, addr) \ | ||
33 | __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
34 | |||
35 | #define generic_test_and_set_le_bit(nr, addr) \ | ||
36 | test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
37 | #define generic_test_and_clear_le_bit(nr, addr) \ | ||
38 | test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
39 | |||
40 | #define generic___test_and_set_le_bit(nr, addr) \ | ||
41 | __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
42 | #define generic___test_and_clear_le_bit(nr, addr) \ | ||
43 | __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) | ||
44 | 32 | ||
45 | extern unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, | 33 | extern unsigned long find_next_zero_bit_le(const void *addr, |
46 | unsigned long size, unsigned long offset); | 34 | unsigned long size, unsigned long offset); |
47 | extern unsigned long generic_find_next_le_bit(const unsigned long *addr, | 35 | extern unsigned long find_next_bit_le(const void *addr, |
48 | unsigned long size, unsigned long offset); | 36 | unsigned long size, unsigned long offset); |
49 | 37 | ||
38 | #define find_first_zero_bit_le(addr, size) \ | ||
39 | find_next_zero_bit_le((addr), (size), 0) | ||
40 | |||
50 | #else | 41 | #else |
51 | #error "Please fix <asm/byteorder.h>" | 42 | #error "Please fix <asm/byteorder.h>" |
52 | #endif | 43 | #endif |
53 | 44 | ||
54 | #define generic_find_first_zero_le_bit(addr, size) \ | 45 | static inline int test_bit_le(int nr, const void *addr) |
55 | generic_find_next_zero_le_bit((addr), (size), 0) | 46 | { |
47 | return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
48 | } | ||
49 | |||
50 | static inline void __set_bit_le(int nr, void *addr) | ||
51 | { | ||
52 | __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
53 | } | ||
54 | |||
55 | static inline void __clear_bit_le(int nr, void *addr) | ||
56 | { | ||
57 | __clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
58 | } | ||
59 | |||
60 | static inline int test_and_set_bit_le(int nr, void *addr) | ||
61 | { | ||
62 | return test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
63 | } | ||
64 | |||
65 | static inline int test_and_clear_bit_le(int nr, void *addr) | ||
66 | { | ||
67 | return test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
68 | } | ||
69 | |||
70 | static inline int __test_and_set_bit_le(int nr, void *addr) | ||
71 | { | ||
72 | return __test_and_set_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
73 | } | ||
74 | |||
75 | static inline int __test_and_clear_bit_le(int nr, void *addr) | ||
76 | { | ||
77 | return __test_and_clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); | ||
78 | } | ||
56 | 79 | ||
57 | #endif /* _ASM_GENERIC_BITOPS_LE_H_ */ | 80 | #endif /* _ASM_GENERIC_BITOPS_LE_H_ */ |
diff --git a/include/asm-generic/bitops/minix-le.h b/include/asm-generic/bitops/minix-le.h deleted file mode 100644 index 4a981c1bb1ae..000000000000 --- a/include/asm-generic/bitops/minix-le.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_MINIX_LE_H_ | ||
2 | #define _ASM_GENERIC_BITOPS_MINIX_LE_H_ | ||
3 | |||
4 | #include <asm-generic/bitops/le.h> | ||
5 | |||
6 | #define minix_test_and_set_bit(nr,addr) \ | ||
7 | generic___test_and_set_le_bit((nr),(unsigned long *)(addr)) | ||
8 | #define minix_set_bit(nr,addr) \ | ||
9 | generic___set_le_bit((nr),(unsigned long *)(addr)) | ||
10 | #define minix_test_and_clear_bit(nr,addr) \ | ||
11 | generic___test_and_clear_le_bit((nr),(unsigned long *)(addr)) | ||
12 | #define minix_test_bit(nr,addr) \ | ||
13 | generic_test_le_bit((nr),(unsigned long *)(addr)) | ||
14 | #define minix_find_first_zero_bit(addr,size) \ | ||
15 | generic_find_first_zero_le_bit((unsigned long *)(addr),(size)) | ||
16 | |||
17 | #endif /* _ASM_GENERIC_BITOPS_MINIX_LE_H_ */ | ||
diff --git a/include/asm-generic/bitops/minix.h b/include/asm-generic/bitops/minix.h deleted file mode 100644 index 91f42e87aa51..000000000000 --- a/include/asm-generic/bitops/minix.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_MINIX_H_ | ||
2 | #define _ASM_GENERIC_BITOPS_MINIX_H_ | ||
3 | |||
4 | #define minix_test_and_set_bit(nr,addr) \ | ||
5 | __test_and_set_bit((nr),(unsigned long *)(addr)) | ||
6 | #define minix_set_bit(nr,addr) \ | ||
7 | __set_bit((nr),(unsigned long *)(addr)) | ||
8 | #define minix_test_and_clear_bit(nr,addr) \ | ||
9 | __test_and_clear_bit((nr),(unsigned long *)(addr)) | ||
10 | #define minix_test_bit(nr,addr) \ | ||
11 | test_bit((nr),(unsigned long *)(addr)) | ||
12 | #define minix_find_first_zero_bit(addr,size) \ | ||
13 | find_first_zero_bit((unsigned long *)(addr),(size)) | ||
14 | |||
15 | #endif /* _ASM_GENERIC_BITOPS_MINIX_H_ */ | ||
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index c2c9ba032d46..e5a3f5880001 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -165,10 +165,43 @@ extern void warn_slowpath_null(const char *file, const int line); | |||
165 | #define WARN_ON_RATELIMIT(condition, state) \ | 165 | #define WARN_ON_RATELIMIT(condition, state) \ |
166 | WARN_ON((condition) && __ratelimit(state)) | 166 | WARN_ON((condition) && __ratelimit(state)) |
167 | 167 | ||
168 | /* | ||
169 | * WARN_ON_SMP() is for cases that the warning is either | ||
170 | * meaningless for !SMP or may even cause failures. | ||
171 | * This is usually used for cases that we have | ||
172 | * WARN_ON(!spin_is_locked(&lock)) checks, as spin_is_locked() | ||
173 | * returns 0 for uniprocessor settings. | ||
174 | * It can also be used with values that are only defined | ||
175 | * on SMP: | ||
176 | * | ||
177 | * struct foo { | ||
178 | * [...] | ||
179 | * #ifdef CONFIG_SMP | ||
180 | * int bar; | ||
181 | * #endif | ||
182 | * }; | ||
183 | * | ||
184 | * void func(struct foo *zoot) | ||
185 | * { | ||
186 | * WARN_ON_SMP(!zoot->bar); | ||
187 | * | ||
188 | * For CONFIG_SMP, WARN_ON_SMP() should act the same as WARN_ON(), | ||
189 | * and should be a nop and return false for uniprocessor. | ||
190 | * | ||
191 | * if (WARN_ON_SMP(x)) returns true only when CONFIG_SMP is set | ||
192 | * and x is true. | ||
193 | */ | ||
168 | #ifdef CONFIG_SMP | 194 | #ifdef CONFIG_SMP |
169 | # define WARN_ON_SMP(x) WARN_ON(x) | 195 | # define WARN_ON_SMP(x) WARN_ON(x) |
170 | #else | 196 | #else |
171 | # define WARN_ON_SMP(x) do { } while (0) | 197 | /* |
198 | * Use of ({0;}) because WARN_ON_SMP(x) may be used either as | ||
199 | * a stand alone line statement or as a condition in an if () | ||
200 | * statement. | ||
201 | * A simple "0" would cause gcc to give a "statement has no effect" | ||
202 | * warning. | ||
203 | */ | ||
204 | # define WARN_ON_SMP(x) ({0;}) | ||
172 | #endif | 205 | #endif |
173 | 206 | ||
174 | #endif | 207 | #endif |
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h index 942d30b5aab1..0dd4e87f6fba 100644 --- a/include/asm-generic/siginfo.h +++ b/include/asm-generic/siginfo.h | |||
@@ -192,7 +192,7 @@ typedef struct siginfo { | |||
192 | * SIGBUS si_codes | 192 | * SIGBUS si_codes |
193 | */ | 193 | */ |
194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | 194 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ |
195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existant physical address */ | 195 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */ |
196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | 196 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ |
197 | /* hardware memory error consumed on a machine check: action required */ | 197 | /* hardware memory error consumed on a machine check: action required */ |
198 | #define BUS_MCEERR_AR (__SI_FAULT|4) | 198 | #define BUS_MCEERR_AR (__SI_FAULT|4) |
diff --git a/include/asm-generic/types.h b/include/asm-generic/types.h index fba7d33ca3f2..7a0f69e6c618 100644 --- a/include/asm-generic/types.h +++ b/include/asm-generic/types.h | |||
@@ -12,31 +12,4 @@ typedef unsigned short umode_t; | |||
12 | 12 | ||
13 | #endif /* __ASSEMBLY__ */ | 13 | #endif /* __ASSEMBLY__ */ |
14 | 14 | ||
15 | /* | ||
16 | * These aren't exported outside the kernel to avoid name space clashes | ||
17 | */ | ||
18 | #ifdef __KERNEL__ | ||
19 | #ifndef __ASSEMBLY__ | ||
20 | /* | ||
21 | * DMA addresses may be very different from physical addresses | ||
22 | * and pointers. i386 and powerpc may have 64 bit DMA on 32 bit | ||
23 | * systems, while sparc64 uses 32 bit DMA addresses for 64 bit | ||
24 | * physical addresses. | ||
25 | * This default defines dma_addr_t to have the same size as | ||
26 | * phys_addr_t, which is the most common way. | ||
27 | * Do not define the dma64_addr_t type, which never really | ||
28 | * worked. | ||
29 | */ | ||
30 | #ifndef dma_addr_t | ||
31 | #ifdef CONFIG_PHYS_ADDR_T_64BIT | ||
32 | typedef u64 dma_addr_t; | ||
33 | #else | ||
34 | typedef u32 dma_addr_t; | ||
35 | #endif /* CONFIG_PHYS_ADDR_T_64BIT */ | ||
36 | #endif /* dma_addr_t */ | ||
37 | |||
38 | #endif /* __ASSEMBLY__ */ | ||
39 | |||
40 | #endif /* __KERNEL__ */ | ||
41 | |||
42 | #endif /* _ASM_GENERIC_TYPES_H */ | 15 | #endif /* _ASM_GENERIC_TYPES_H */ |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 57af0338d270..07c40d5149de 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -650,9 +650,13 @@ __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | |||
650 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | 650 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) |
651 | #define __NR_open_by_handle_at 265 | 651 | #define __NR_open_by_handle_at 265 |
652 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) | 652 | __SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) |
653 | #define __NR_clock_adjtime 266 | ||
654 | __SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) | ||
655 | #define __NR_syncfs 267 | ||
656 | __SYSCALL(__NR_syncfs, sys_syncfs) | ||
653 | 657 | ||
654 | #undef __NR_syscalls | 658 | #undef __NR_syscalls |
655 | #define __NR_syscalls 266 | 659 | #define __NR_syscalls 268 |
656 | 660 | ||
657 | /* | 661 | /* |
658 | * All syscalls below here should go away really, | 662 | * All syscalls below here should go away really, |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 32c45e5fe0ab..bd297a20ab98 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -773,7 +773,7 @@ | |||
773 | * the sections that has this restriction (or similar) | 773 | * the sections that has this restriction (or similar) |
774 | * is located before the ones requiring PAGE_SIZE alignment. | 774 | * is located before the ones requiring PAGE_SIZE alignment. |
775 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which | 775 | * NOSAVE_DATA starts and ends with a PAGE_SIZE alignment which |
776 | * matches the requirment of PAGE_ALIGNED_DATA. | 776 | * matches the requirement of PAGE_ALIGNED_DATA. |
777 | * | 777 | * |
778 | * use 0 as page_align if page_aligned data is not used */ | 778 | * use 0 as page_align if page_aligned data is not used */ |
779 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ | 779 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ |
diff --git a/include/drm/drm.h b/include/drm/drm.h index 9ac431396176..4be33b4ca2f8 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -463,12 +463,15 @@ struct drm_irq_busid { | |||
463 | enum drm_vblank_seq_type { | 463 | enum drm_vblank_seq_type { |
464 | _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ | 464 | _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ |
465 | _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ | 465 | _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ |
466 | /* bits 1-6 are reserved for high crtcs */ | ||
467 | _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, | ||
466 | _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ | 468 | _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ |
467 | _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ | 469 | _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ |
468 | _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ | 470 | _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ |
469 | _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ | 471 | _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ |
470 | _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ | 472 | _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ |
471 | }; | 473 | }; |
474 | #define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 | ||
472 | 475 | ||
473 | #define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) | 476 | #define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) |
474 | #define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ | 477 | #define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ |
@@ -753,6 +756,7 @@ struct drm_event_vblank { | |||
753 | }; | 756 | }; |
754 | 757 | ||
755 | #define DRM_CAP_DUMB_BUFFER 0x1 | 758 | #define DRM_CAP_DUMB_BUFFER 0x1 |
759 | #define DRM_CAP_VBLANK_HIGH_CRTC 0x2 | ||
756 | 760 | ||
757 | /* typedef area */ | 761 | /* typedef area */ |
758 | #ifndef __KERNEL__ | 762 | #ifndef __KERNEL__ |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ad5770f2315c..202424d17ed7 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -95,7 +95,7 @@ struct drm_device; | |||
95 | * drm_core, drm_driver, drm_kms | 95 | * drm_core, drm_driver, drm_kms |
96 | * drm_core level can be used in the generic drm code. For example: | 96 | * drm_core level can be used in the generic drm code. For example: |
97 | * drm_ioctl, drm_mm, drm_memory | 97 | * drm_ioctl, drm_mm, drm_memory |
98 | * The macro definiton of DRM_DEBUG is used. | 98 | * The macro definition of DRM_DEBUG is used. |
99 | * DRM_DEBUG(fmt, args...) | 99 | * DRM_DEBUG(fmt, args...) |
100 | * The debug info by using the DRM_DEBUG can be obtained by adding | 100 | * The debug info by using the DRM_DEBUG can be obtained by adding |
101 | * the boot option of "drm.debug=1". | 101 | * the boot option of "drm.debug=1". |
@@ -808,7 +808,7 @@ struct drm_driver { | |||
808 | * | 808 | * |
809 | * \return Flags, or'ed together as follows: | 809 | * \return Flags, or'ed together as follows: |
810 | * | 810 | * |
811 | * DRM_SCANOUTPOS_VALID = Query successfull. | 811 | * DRM_SCANOUTPOS_VALID = Query successful. |
812 | * DRM_SCANOUTPOS_INVBL = Inside vblank. | 812 | * DRM_SCANOUTPOS_INVBL = Inside vblank. |
813 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of | 813 | * DRM_SCANOUTPOS_ACCURATE = Returned position is accurate. A lack of |
814 | * this flag means that returned position may be offset by a constant | 814 | * this flag means that returned position may be offset by a constant |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 60edf9be31e5..d94684b7ba34 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -65,7 +65,7 @@ enum drm_mode_status { | |||
65 | MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ | 65 | MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ |
66 | MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ | 66 | MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ |
67 | MODE_BAD_WIDTH, /* requires an unsupported linepitch */ | 67 | MODE_BAD_WIDTH, /* requires an unsupported linepitch */ |
68 | MODE_NOMODE, /* no mode with a maching name */ | 68 | MODE_NOMODE, /* no mode with a matching name */ |
69 | MODE_NO_INTERLACE, /* interlaced mode not supported */ | 69 | MODE_NO_INTERLACE, /* interlaced mode not supported */ |
70 | MODE_NO_DBLESCAN, /* doublescan mode not supported */ | 70 | MODE_NO_DBLESCAN, /* doublescan mode not supported */ |
71 | MODE_NO_VSCAN, /* multiscan mode not supported */ | 71 | MODE_NO_VSCAN, /* multiscan mode not supported */ |
@@ -321,7 +321,7 @@ struct drm_crtc_funcs { | |||
321 | 321 | ||
322 | /* | 322 | /* |
323 | * Flip to the given framebuffer. This implements the page | 323 | * Flip to the given framebuffer. This implements the page |
324 | * flip ioctl descibed in drm_mode.h, specifically, the | 324 | * flip ioctl described in drm_mode.h, specifically, the |
325 | * implementation must return immediately and block all | 325 | * implementation must return immediately and block all |
326 | * rendering to the current fb until the flip has completed. | 326 | * rendering to the current fb until the flip has completed. |
327 | * If userspace set the event flag in the ioctl, the event | 327 | * If userspace set the event flag in the ioctl, the event |
@@ -778,6 +778,7 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev, | |||
778 | void *data, struct drm_file *file_priv); | 778 | void *data, struct drm_file *file_priv); |
779 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, | 779 | extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, |
780 | void *data, struct drm_file *file_priv); | 780 | void *data, struct drm_file *file_priv); |
781 | extern u8 *drm_find_cea_extension(struct edid *edid); | ||
781 | extern bool drm_detect_hdmi_monitor(struct edid *edid); | 782 | extern bool drm_detect_hdmi_monitor(struct edid *edid); |
782 | extern bool drm_detect_monitor_audio(struct edid *edid); | 783 | extern bool drm_detect_monitor_audio(struct edid *edid); |
783 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, | 784 | extern int drm_mode_page_flip_ioctl(struct drm_device *dev, |
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index b1e7809e5e15..c2f93a8ae2e1 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -56,7 +56,7 @@ struct drm_mm_node { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | struct drm_mm { | 58 | struct drm_mm { |
59 | /* List of all memory nodes that immediatly preceed a free hole. */ | 59 | /* List of all memory nodes that immediately precede a free hole. */ |
60 | struct list_head hole_stack; | 60 | struct list_head hole_stack; |
61 | /* head_node.node_list is the list of all memory nodes, ordered | 61 | /* head_node.node_list is the list of all memory nodes, ordered |
62 | * according to the (increasing) start address of the memory node. */ | 62 | * according to the (increasing) start address of the memory node. */ |
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index ae6b7a3dbec7..c4961ea50a49 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -277,7 +277,7 @@ struct drm_mode_mode_cmd { | |||
277 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 277 | #define DRM_MODE_CURSOR_MOVE (1<<1) |
278 | 278 | ||
279 | /* | 279 | /* |
280 | * depending on the value in flags diffrent members are used. | 280 | * depending on the value in flags different members are used. |
281 | * | 281 | * |
282 | * CURSOR_BO uses | 282 | * CURSOR_BO uses |
283 | * crtc | 283 | * crtc |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 820ee9029482..816e30cbd968 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -472,6 +472,8 @@ | |||
472 | {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 472 | {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
473 | {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 473 | {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
474 | {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 474 | {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
475 | {0x1002, 0x9806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
476 | {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
475 | {0, 0, 0} | 477 | {0, 0, 0} |
476 | 478 | ||
477 | #define r128_PCI_IDS \ | 479 | #define r128_PCI_IDS \ |
diff --git a/include/drm/mga_drm.h b/include/drm/mga_drm.h index c16097f99be0..fca817009e13 100644 --- a/include/drm/mga_drm.h +++ b/include/drm/mga_drm.h | |||
@@ -107,7 +107,7 @@ | |||
107 | */ | 107 | */ |
108 | #define MGA_NR_SAREA_CLIPRECTS 8 | 108 | #define MGA_NR_SAREA_CLIPRECTS 8 |
109 | 109 | ||
110 | /* 2 heaps (1 for card, 1 for agp), each divided into upto 128 | 110 | /* 2 heaps (1 for card, 1 for agp), each divided into up to 128 |
111 | * regions, subject to a minimum region size of (1<<16) == 64k. | 111 | * regions, subject to a minimum region size of (1<<16) == 64k. |
112 | * | 112 | * |
113 | * Clients may subdivide regions internally, but when sharing between | 113 | * Clients may subdivide regions internally, but when sharing between |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 3dec41cf8342..3bce1a4fc305 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -641,7 +641,7 @@ typedef struct drm_radeon_vertex2 { | |||
641 | } drm_radeon_vertex2_t; | 641 | } drm_radeon_vertex2_t; |
642 | 642 | ||
643 | /* v1.3 - obsoletes drm_radeon_vertex2 | 643 | /* v1.3 - obsoletes drm_radeon_vertex2 |
644 | * - allows arbitarily large cliprect list | 644 | * - allows arbitrarily large cliprect list |
645 | * - allows updating of tcl packet, vector and scalar state | 645 | * - allows updating of tcl packet, vector and scalar state |
646 | * - allows memory-efficient description of state updates | 646 | * - allows memory-efficient description of state updates |
647 | * - allows state to be emitted without a primitive | 647 | * - allows state to be emitted without a primitive |
diff --git a/include/drm/savage_drm.h b/include/drm/savage_drm.h index 4863cf6bf96f..818d49be2e6e 100644 --- a/include/drm/savage_drm.h +++ b/include/drm/savage_drm.h | |||
@@ -29,7 +29,7 @@ | |||
29 | #ifndef __SAVAGE_SAREA_DEFINES__ | 29 | #ifndef __SAVAGE_SAREA_DEFINES__ |
30 | #define __SAVAGE_SAREA_DEFINES__ | 30 | #define __SAVAGE_SAREA_DEFINES__ |
31 | 31 | ||
32 | /* 2 heaps (1 for card, 1 for agp), each divided into upto 128 | 32 | /* 2 heaps (1 for card, 1 for agp), each divided into up to 128 |
33 | * regions, subject to a minimum region size of (1<<16) == 64k. | 33 | * regions, subject to a minimum region size of (1<<16) == 64k. |
34 | * | 34 | * |
35 | * Clients may subdivide regions internally, but when sharing between | 35 | * Clients may subdivide regions internally, but when sharing between |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 50852aad260a..62a0e4c4ceee 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -50,10 +50,10 @@ struct drm_mm_node; | |||
50 | * | 50 | * |
51 | * @fpfn: first valid page frame number to put the object | 51 | * @fpfn: first valid page frame number to put the object |
52 | * @lpfn: last valid page frame number to put the object | 52 | * @lpfn: last valid page frame number to put the object |
53 | * @num_placement: number of prefered placements | 53 | * @num_placement: number of preferred placements |
54 | * @placement: prefered placements | 54 | * @placement: preferred placements |
55 | * @num_busy_placement: number of prefered placements when need to evict buffer | 55 | * @num_busy_placement: number of preferred placements when need to evict buffer |
56 | * @busy_placement: prefered placements when need to evict buffer | 56 | * @busy_placement: preferred placements when need to evict buffer |
57 | * | 57 | * |
58 | * Structure indicating the placement you request for an object. | 58 | * Structure indicating the placement you request for an object. |
59 | */ | 59 | */ |
@@ -158,9 +158,9 @@ struct ttm_tt; | |||
158 | * the object is destroyed. | 158 | * the object is destroyed. |
159 | * @event_queue: Queue for processes waiting on buffer object status change. | 159 | * @event_queue: Queue for processes waiting on buffer object status change. |
160 | * @mem: structure describing current placement. | 160 | * @mem: structure describing current placement. |
161 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 161 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
162 | * pinned in physical memory. If this behaviour is not desired, this member | 162 | * pinned in physical memory. If this behaviour is not desired, this member |
163 | * holds a pointer to a persistant shmem object. | 163 | * holds a pointer to a persistent shmem object. |
164 | * @ttm: TTM structure holding system pages. | 164 | * @ttm: TTM structure holding system pages. |
165 | * @evicted: Whether the object was evicted without user-space knowing. | 165 | * @evicted: Whether the object was evicted without user-space knowing. |
166 | * @cpu_writes: For synchronization. Number of cpu writers. | 166 | * @cpu_writes: For synchronization. Number of cpu writers. |
@@ -221,7 +221,7 @@ struct ttm_buffer_object { | |||
221 | */ | 221 | */ |
222 | 222 | ||
223 | struct ttm_mem_reg mem; | 223 | struct ttm_mem_reg mem; |
224 | struct file *persistant_swap_storage; | 224 | struct file *persistent_swap_storage; |
225 | struct ttm_tt *ttm; | 225 | struct ttm_tt *ttm; |
226 | bool evicted; | 226 | bool evicted; |
227 | 227 | ||
@@ -459,9 +459,9 @@ extern void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo); | |||
459 | * user buffer object. | 459 | * user buffer object. |
460 | * @interruptible: If needing to sleep to wait for GPU resources, | 460 | * @interruptible: If needing to sleep to wait for GPU resources, |
461 | * sleep interruptible. | 461 | * sleep interruptible. |
462 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 462 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
463 | * pinned in physical memory. If this behaviour is not desired, this member | 463 | * pinned in physical memory. If this behaviour is not desired, this member |
464 | * holds a pointer to a persistant shmem object. Typically, this would | 464 | * holds a pointer to a persistent shmem object. Typically, this would |
465 | * point to the shmem object backing a GEM object if TTM is used to back a | 465 | * point to the shmem object backing a GEM object if TTM is used to back a |
466 | * GEM user interface. | 466 | * GEM user interface. |
467 | * @acc_size: Accounted size for this object. | 467 | * @acc_size: Accounted size for this object. |
@@ -490,7 +490,7 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev, | |||
490 | uint32_t page_alignment, | 490 | uint32_t page_alignment, |
491 | unsigned long buffer_start, | 491 | unsigned long buffer_start, |
492 | bool interrubtible, | 492 | bool interrubtible, |
493 | struct file *persistant_swap_storage, | 493 | struct file *persistent_swap_storage, |
494 | size_t acc_size, | 494 | size_t acc_size, |
495 | void (*destroy) (struct ttm_buffer_object *)); | 495 | void (*destroy) (struct ttm_buffer_object *)); |
496 | /** | 496 | /** |
@@ -506,9 +506,9 @@ extern int ttm_bo_init(struct ttm_bo_device *bdev, | |||
506 | * user buffer object. | 506 | * user buffer object. |
507 | * @interruptible: If needing to sleep while waiting for GPU resources, | 507 | * @interruptible: If needing to sleep while waiting for GPU resources, |
508 | * sleep interruptible. | 508 | * sleep interruptible. |
509 | * @persistant_swap_storage: Usually the swap storage is deleted for buffers | 509 | * @persistent_swap_storage: Usually the swap storage is deleted for buffers |
510 | * pinned in physical memory. If this behaviour is not desired, this member | 510 | * pinned in physical memory. If this behaviour is not desired, this member |
511 | * holds a pointer to a persistant shmem object. Typically, this would | 511 | * holds a pointer to a persistent shmem object. Typically, this would |
512 | * point to the shmem object backing a GEM object if TTM is used to back a | 512 | * point to the shmem object backing a GEM object if TTM is used to back a |
513 | * GEM user interface. | 513 | * GEM user interface. |
514 | * @p_bo: On successful completion *p_bo points to the created object. | 514 | * @p_bo: On successful completion *p_bo points to the created object. |
@@ -528,7 +528,7 @@ extern int ttm_bo_create(struct ttm_bo_device *bdev, | |||
528 | uint32_t page_alignment, | 528 | uint32_t page_alignment, |
529 | unsigned long buffer_start, | 529 | unsigned long buffer_start, |
530 | bool interruptible, | 530 | bool interruptible, |
531 | struct file *persistant_swap_storage, | 531 | struct file *persistent_swap_storage, |
532 | struct ttm_buffer_object **p_bo); | 532 | struct ttm_buffer_object **p_bo); |
533 | 533 | ||
534 | /** | 534 | /** |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index efed0820d9fa..09af2d746d1c 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -122,7 +122,7 @@ struct ttm_backend { | |||
122 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) | 122 | #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) |
123 | #define TTM_PAGE_FLAG_WRITE (1 << 3) | 123 | #define TTM_PAGE_FLAG_WRITE (1 << 3) |
124 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) | 124 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) |
125 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) | 125 | #define TTM_PAGE_FLAG_PERSISTENT_SWAP (1 << 5) |
126 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) | 126 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) |
127 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) | 127 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) |
128 | 128 | ||
@@ -223,9 +223,9 @@ struct ttm_mem_type_manager_func { | |||
223 | * @mem::mm_node should be set to a non-null value, and | 223 | * @mem::mm_node should be set to a non-null value, and |
224 | * @mem::start should be set to a value identifying the beginning | 224 | * @mem::start should be set to a value identifying the beginning |
225 | * of the range allocated, and the function should return zero. | 225 | * of the range allocated, and the function should return zero. |
226 | * If the memory region accomodate the buffer object, @mem::mm_node | 226 | * If the memory region accommodate the buffer object, @mem::mm_node |
227 | * should be set to NULL, and the function should return 0. | 227 | * should be set to NULL, and the function should return 0. |
228 | * If a system error occured, preventing the request to be fulfilled, | 228 | * If a system error occurred, preventing the request to be fulfilled, |
229 | * the function should return a negative error code. | 229 | * the function should return a negative error code. |
230 | * | 230 | * |
231 | * Note that @mem::mm_node will only be dereferenced by | 231 | * Note that @mem::mm_node will only be dereferenced by |
@@ -714,7 +714,7 @@ extern void ttm_tt_cache_flush(struct page *pages[], unsigned long num_pages); | |||
714 | */ | 714 | */ |
715 | extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); | 715 | extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); |
716 | extern int ttm_tt_swapout(struct ttm_tt *ttm, | 716 | extern int ttm_tt_swapout(struct ttm_tt *ttm, |
717 | struct file *persistant_swap_storage); | 717 | struct file *persistent_swap_storage); |
718 | 718 | ||
719 | /* | 719 | /* |
720 | * ttm_bo.c | 720 | * ttm_bo.c |
@@ -841,7 +841,7 @@ extern void ttm_mem_io_unlock(struct ttm_mem_type_manager *man); | |||
841 | * different order, either by will or as a result of a buffer being evicted | 841 | * different order, either by will or as a result of a buffer being evicted |
842 | * to make room for a buffer already reserved. (Buffers are reserved before | 842 | * to make room for a buffer already reserved. (Buffers are reserved before |
843 | * they are evicted). The following algorithm prevents such deadlocks from | 843 | * they are evicted). The following algorithm prevents such deadlocks from |
844 | * occuring: | 844 | * occurring: |
845 | * 1) Buffers are reserved with the lru spinlock held. Upon successful | 845 | * 1) Buffers are reserved with the lru spinlock held. Upon successful |
846 | * reservation they are removed from the lru list. This stops a reserved buffer | 846 | * reservation they are removed from the lru list. This stops a reserved buffer |
847 | * from being evicted. However the lru spinlock is released between the time | 847 | * from being evicted. However the lru spinlock is released between the time |
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h index 650e6bf6f69f..5c36432d9ce5 100644 --- a/include/drm/vmwgfx_drm.h +++ b/include/drm/vmwgfx_drm.h | |||
@@ -592,7 +592,7 @@ struct drm_vmw_stream_arg { | |||
592 | /** | 592 | /** |
593 | * DRM_VMW_UPDATE_LAYOUT - Update layout | 593 | * DRM_VMW_UPDATE_LAYOUT - Update layout |
594 | * | 594 | * |
595 | * Updates the prefered modes and connection status for connectors. The | 595 | * Updates the preferred modes and connection status for connectors. The |
596 | * command conisits of one drm_vmw_update_layout_arg pointing out a array | 596 | * command conisits of one drm_vmw_update_layout_arg pointing out a array |
597 | * of num_outputs drm_vmw_rect's. | 597 | * of num_outputs drm_vmw_rect's. |
598 | */ | 598 | */ |
diff --git a/include/keys/ceph-type.h b/include/keys/ceph-type.h new file mode 100644 index 000000000000..f69c4ac197a0 --- /dev/null +++ b/include/keys/ceph-type.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _KEYS_CEPH_TYPE_H | ||
2 | #define _KEYS_CEPH_TYPE_H | ||
3 | |||
4 | #include <linux/key.h> | ||
5 | |||
6 | extern struct key_type key_type_ceph; | ||
7 | |||
8 | #endif | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index b0ada6f37dd6..75cf611641e6 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -233,6 +233,7 @@ header-y += magic.h | |||
233 | header-y += major.h | 233 | header-y += major.h |
234 | header-y += map_to_7segment.h | 234 | header-y += map_to_7segment.h |
235 | header-y += matroxfb.h | 235 | header-y += matroxfb.h |
236 | header-y += media.h | ||
236 | header-y += mempolicy.h | 237 | header-y += mempolicy.h |
237 | header-y += meye.h | 238 | header-y += meye.h |
238 | header-y += mii.h | 239 | header-y += mii.h |
@@ -276,6 +277,7 @@ header-y += nfsacl.h | |||
276 | header-y += nl80211.h | 277 | header-y += nl80211.h |
277 | header-y += nubus.h | 278 | header-y += nubus.h |
278 | header-y += nvram.h | 279 | header-y += nvram.h |
280 | header-y += omap3isp.h | ||
279 | header-y += omapfb.h | 281 | header-y += omapfb.h |
280 | header-y += oom.h | 282 | header-y += oom.h |
281 | header-y += param.h | 283 | header-y += param.h |
@@ -370,6 +372,8 @@ header-y += unistd.h | |||
370 | header-y += usbdevice_fs.h | 372 | header-y += usbdevice_fs.h |
371 | header-y += utime.h | 373 | header-y += utime.h |
372 | header-y += utsname.h | 374 | header-y += utsname.h |
375 | header-y += v4l2-mediabus.h | ||
376 | header-y += v4l2-subdev.h | ||
373 | header-y += veth.h | 377 | header-y += veth.h |
374 | header-y += vhost.h | 378 | header-y += vhost.h |
375 | header-y += videodev2.h | 379 | header-y += videodev2.h |
diff --git a/include/linux/acpi_io.h b/include/linux/acpi_io.h index 7180013a4a3a..4afd7102459d 100644 --- a/include/linux/acpi_io.h +++ b/include/linux/acpi_io.h | |||
@@ -10,7 +10,6 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys, | |||
10 | return ioremap_cache(phys, size); | 10 | return ioremap_cache(phys, size); |
11 | } | 11 | } |
12 | 12 | ||
13 | int acpi_os_map_generic_address(struct acpi_generic_address *addr); | 13 | void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size); |
14 | void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); | ||
15 | 14 | ||
16 | #endif | 15 | #endif |
diff --git a/include/linux/aer.h b/include/linux/aer.h index f7df1eefc107..8414de22a779 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -7,6 +7,28 @@ | |||
7 | #ifndef _AER_H_ | 7 | #ifndef _AER_H_ |
8 | #define _AER_H_ | 8 | #define _AER_H_ |
9 | 9 | ||
10 | struct aer_header_log_regs { | ||
11 | unsigned int dw0; | ||
12 | unsigned int dw1; | ||
13 | unsigned int dw2; | ||
14 | unsigned int dw3; | ||
15 | }; | ||
16 | |||
17 | struct aer_capability_regs { | ||
18 | u32 header; | ||
19 | u32 uncor_status; | ||
20 | u32 uncor_mask; | ||
21 | u32 uncor_severity; | ||
22 | u32 cor_status; | ||
23 | u32 cor_mask; | ||
24 | u32 cap_control; | ||
25 | struct aer_header_log_regs header_log; | ||
26 | u32 root_command; | ||
27 | u32 root_status; | ||
28 | u16 cor_err_source; | ||
29 | u16 uncor_err_source; | ||
30 | }; | ||
31 | |||
10 | #if defined(CONFIG_PCIEAER) | 32 | #if defined(CONFIG_PCIEAER) |
11 | /* pci-e port driver needs this function to enable aer */ | 33 | /* pci-e port driver needs this function to enable aer */ |
12 | extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); | 34 | extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); |
@@ -27,5 +49,7 @@ static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | |||
27 | } | 49 | } |
28 | #endif | 50 | #endif |
29 | 51 | ||
52 | extern void cper_print_aer(const char *prefix, int cper_severity, | ||
53 | struct aer_capability_regs *aer); | ||
30 | #endif //_AER_H_ | 54 | #endif //_AER_H_ |
31 | 55 | ||
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h index be33b3affc8a..e82e3ee2c54a 100644 --- a/include/linux/amba/clcd.h +++ b/include/linux/amba/clcd.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define CNTL_LCDBPP8 (3 << 1) | 53 | #define CNTL_LCDBPP8 (3 << 1) |
54 | #define CNTL_LCDBPP16 (4 << 1) | 54 | #define CNTL_LCDBPP16 (4 << 1) |
55 | #define CNTL_LCDBPP16_565 (6 << 1) | 55 | #define CNTL_LCDBPP16_565 (6 << 1) |
56 | #define CNTL_LCDBPP16_444 (7 << 1) | ||
56 | #define CNTL_LCDBPP24 (5 << 1) | 57 | #define CNTL_LCDBPP24 (5 << 1) |
57 | #define CNTL_LCDBW (1 << 4) | 58 | #define CNTL_LCDBW (1 << 4) |
58 | #define CNTL_LCDTFT (1 << 5) | 59 | #define CNTL_LCDTFT (1 << 5) |
@@ -66,6 +67,32 @@ | |||
66 | #define CNTL_LDMAFIFOTIME (1 << 15) | 67 | #define CNTL_LDMAFIFOTIME (1 << 15) |
67 | #define CNTL_WATERMARK (1 << 16) | 68 | #define CNTL_WATERMARK (1 << 16) |
68 | 69 | ||
70 | enum { | ||
71 | /* individual formats */ | ||
72 | CLCD_CAP_RGB444 = (1 << 0), | ||
73 | CLCD_CAP_RGB5551 = (1 << 1), | ||
74 | CLCD_CAP_RGB565 = (1 << 2), | ||
75 | CLCD_CAP_RGB888 = (1 << 3), | ||
76 | CLCD_CAP_BGR444 = (1 << 4), | ||
77 | CLCD_CAP_BGR5551 = (1 << 5), | ||
78 | CLCD_CAP_BGR565 = (1 << 6), | ||
79 | CLCD_CAP_BGR888 = (1 << 7), | ||
80 | |||
81 | /* connection layouts */ | ||
82 | CLCD_CAP_444 = CLCD_CAP_RGB444 | CLCD_CAP_BGR444, | ||
83 | CLCD_CAP_5551 = CLCD_CAP_RGB5551 | CLCD_CAP_BGR5551, | ||
84 | CLCD_CAP_565 = CLCD_CAP_RGB565 | CLCD_CAP_BGR565, | ||
85 | CLCD_CAP_888 = CLCD_CAP_RGB888 | CLCD_CAP_BGR888, | ||
86 | |||
87 | /* red/blue ordering */ | ||
88 | CLCD_CAP_RGB = CLCD_CAP_RGB444 | CLCD_CAP_RGB5551 | | ||
89 | CLCD_CAP_RGB565 | CLCD_CAP_RGB888, | ||
90 | CLCD_CAP_BGR = CLCD_CAP_BGR444 | CLCD_CAP_BGR5551 | | ||
91 | CLCD_CAP_BGR565 | CLCD_CAP_BGR888, | ||
92 | |||
93 | CLCD_CAP_ALL = CLCD_CAP_BGR | CLCD_CAP_RGB, | ||
94 | }; | ||
95 | |||
69 | struct clcd_panel { | 96 | struct clcd_panel { |
70 | struct fb_videomode mode; | 97 | struct fb_videomode mode; |
71 | signed short width; /* width in mm */ | 98 | signed short width; /* width in mm */ |
@@ -73,6 +100,7 @@ struct clcd_panel { | |||
73 | u32 tim2; | 100 | u32 tim2; |
74 | u32 tim3; | 101 | u32 tim3; |
75 | u32 cntl; | 102 | u32 cntl; |
103 | u32 caps; | ||
76 | unsigned int bpp:8, | 104 | unsigned int bpp:8, |
77 | fixedtimings:1, | 105 | fixedtimings:1, |
78 | grayscale:1; | 106 | grayscale:1; |
@@ -97,13 +125,18 @@ struct clcd_board { | |||
97 | const char *name; | 125 | const char *name; |
98 | 126 | ||
99 | /* | 127 | /* |
128 | * Optional. Hardware capability flags. | ||
129 | */ | ||
130 | u32 caps; | ||
131 | |||
132 | /* | ||
100 | * Optional. Check whether the var structure is acceptable | 133 | * Optional. Check whether the var structure is acceptable |
101 | * for this display. | 134 | * for this display. |
102 | */ | 135 | */ |
103 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); | 136 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); |
104 | 137 | ||
105 | /* | 138 | /* |
106 | * Compulsary. Decode fb->fb.var into regs->*. In the case of | 139 | * Compulsory. Decode fb->fb.var into regs->*. In the case of |
107 | * fixed timing, set regs->* to the register values required. | 140 | * fixed timing, set regs->* to the register values required. |
108 | */ | 141 | */ |
109 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); | 142 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); |
@@ -155,34 +188,35 @@ struct clcd_fb { | |||
155 | 188 | ||
156 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | 189 | static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) |
157 | { | 190 | { |
191 | struct fb_var_screeninfo *var = &fb->fb.var; | ||
158 | u32 val, cpl; | 192 | u32 val, cpl; |
159 | 193 | ||
160 | /* | 194 | /* |
161 | * Program the CLCD controller registers and start the CLCD | 195 | * Program the CLCD controller registers and start the CLCD |
162 | */ | 196 | */ |
163 | val = ((fb->fb.var.xres / 16) - 1) << 2; | 197 | val = ((var->xres / 16) - 1) << 2; |
164 | val |= (fb->fb.var.hsync_len - 1) << 8; | 198 | val |= (var->hsync_len - 1) << 8; |
165 | val |= (fb->fb.var.right_margin - 1) << 16; | 199 | val |= (var->right_margin - 1) << 16; |
166 | val |= (fb->fb.var.left_margin - 1) << 24; | 200 | val |= (var->left_margin - 1) << 24; |
167 | regs->tim0 = val; | 201 | regs->tim0 = val; |
168 | 202 | ||
169 | val = fb->fb.var.yres; | 203 | val = var->yres; |
170 | if (fb->panel->cntl & CNTL_LCDDUAL) | 204 | if (fb->panel->cntl & CNTL_LCDDUAL) |
171 | val /= 2; | 205 | val /= 2; |
172 | val -= 1; | 206 | val -= 1; |
173 | val |= (fb->fb.var.vsync_len - 1) << 10; | 207 | val |= (var->vsync_len - 1) << 10; |
174 | val |= fb->fb.var.lower_margin << 16; | 208 | val |= var->lower_margin << 16; |
175 | val |= fb->fb.var.upper_margin << 24; | 209 | val |= var->upper_margin << 24; |
176 | regs->tim1 = val; | 210 | regs->tim1 = val; |
177 | 211 | ||
178 | val = fb->panel->tim2; | 212 | val = fb->panel->tim2; |
179 | val |= fb->fb.var.sync & FB_SYNC_HOR_HIGH_ACT ? 0 : TIM2_IHS; | 213 | val |= var->sync & FB_SYNC_HOR_HIGH_ACT ? 0 : TIM2_IHS; |
180 | val |= fb->fb.var.sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS; | 214 | val |= var->sync & FB_SYNC_VERT_HIGH_ACT ? 0 : TIM2_IVS; |
181 | 215 | ||
182 | cpl = fb->fb.var.xres_virtual; | 216 | cpl = var->xres_virtual; |
183 | if (fb->panel->cntl & CNTL_LCDTFT) /* TFT */ | 217 | if (fb->panel->cntl & CNTL_LCDTFT) /* TFT */ |
184 | /* / 1 */; | 218 | /* / 1 */; |
185 | else if (!fb->fb.var.grayscale) /* STN color */ | 219 | else if (!var->grayscale) /* STN color */ |
186 | cpl = cpl * 8 / 3; | 220 | cpl = cpl * 8 / 3; |
187 | else if (fb->panel->cntl & CNTL_LCDMONO8) /* STN monochrome, 8bit */ | 221 | else if (fb->panel->cntl & CNTL_LCDMONO8) /* STN monochrome, 8bit */ |
188 | cpl /= 8; | 222 | cpl /= 8; |
@@ -194,10 +228,22 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
194 | regs->tim3 = fb->panel->tim3; | 228 | regs->tim3 = fb->panel->tim3; |
195 | 229 | ||
196 | val = fb->panel->cntl; | 230 | val = fb->panel->cntl; |
197 | if (fb->fb.var.grayscale) | 231 | if (var->grayscale) |
198 | val |= CNTL_LCDBW; | 232 | val |= CNTL_LCDBW; |
199 | 233 | ||
200 | switch (fb->fb.var.bits_per_pixel) { | 234 | if (fb->panel->caps && fb->board->caps && |
235 | var->bits_per_pixel >= 16) { | ||
236 | /* | ||
237 | * if board and panel supply capabilities, we can support | ||
238 | * changing BGR/RGB depending on supplied parameters | ||
239 | */ | ||
240 | if (var->red.offset == 0) | ||
241 | val &= ~CNTL_BGR; | ||
242 | else | ||
243 | val |= CNTL_BGR; | ||
244 | } | ||
245 | |||
246 | switch (var->bits_per_pixel) { | ||
201 | case 1: | 247 | case 1: |
202 | val |= CNTL_LCDBPP1; | 248 | val |= CNTL_LCDBPP1; |
203 | break; | 249 | break; |
@@ -212,15 +258,17 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
212 | break; | 258 | break; |
213 | case 16: | 259 | case 16: |
214 | /* | 260 | /* |
215 | * PL110 cannot choose between 5551 and 565 modes in | 261 | * PL110 cannot choose between 5551 and 565 modes in its |
216 | * its control register | 262 | * control register. It is possible to use 565 with |
263 | * custom external wiring. | ||
217 | */ | 264 | */ |
218 | if ((fb->dev->periphid & 0x000fffff) == 0x00041110) | 265 | if (amba_part(fb->dev) == 0x110 || |
266 | var->green.length == 5) | ||
219 | val |= CNTL_LCDBPP16; | 267 | val |= CNTL_LCDBPP16; |
220 | else if (fb->fb.var.green.length == 5) | 268 | else if (var->green.length == 6) |
221 | val |= CNTL_LCDBPP16; | ||
222 | else | ||
223 | val |= CNTL_LCDBPP16_565; | 269 | val |= CNTL_LCDBPP16_565; |
270 | else | ||
271 | val |= CNTL_LCDBPP16_444; | ||
224 | break; | 272 | break; |
225 | case 32: | 273 | case 32: |
226 | val |= CNTL_LCDBPP24; | 274 | val |= CNTL_LCDBPP24; |
@@ -228,7 +276,7 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
228 | } | 276 | } |
229 | 277 | ||
230 | regs->cntl = val; | 278 | regs->cntl = val; |
231 | regs->pixclock = fb->fb.var.pixclock; | 279 | regs->pixclock = var->pixclock; |
232 | } | 280 | } |
233 | 281 | ||
234 | static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) | 282 | static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) |
diff --git a/include/linux/amba/mmci.h b/include/linux/amba/mmci.h index f60227088b7b..21114810c7c0 100644 --- a/include/linux/amba/mmci.h +++ b/include/linux/amba/mmci.h | |||
@@ -30,15 +30,15 @@ struct dma_chan; | |||
30 | * @cd_invert: true if the gpio_cd pin value is active low | 30 | * @cd_invert: true if the gpio_cd pin value is active low |
31 | * @capabilities: the capabilities of the block as implemented in | 31 | * @capabilities: the capabilities of the block as implemented in |
32 | * this platform, signify anything MMC_CAP_* from mmc/host.h | 32 | * this platform, signify anything MMC_CAP_* from mmc/host.h |
33 | * @dma_filter: function used to select an apropriate RX and TX | 33 | * @dma_filter: function used to select an appropriate RX and TX |
34 | * DMA channel to be used for DMA, if and only if you're deploying the | 34 | * DMA channel to be used for DMA, if and only if you're deploying the |
35 | * generic DMA engine | 35 | * generic DMA engine |
36 | * @dma_rx_param: parameter passed to the DMA allocation | 36 | * @dma_rx_param: parameter passed to the DMA allocation |
37 | * filter in order to select an apropriate RX channel. If | 37 | * filter in order to select an appropriate RX channel. If |
38 | * there is a bidirectional RX+TX channel, then just specify | 38 | * there is a bidirectional RX+TX channel, then just specify |
39 | * this and leave dma_tx_param set to NULL | 39 | * this and leave dma_tx_param set to NULL |
40 | * @dma_tx_param: parameter passed to the DMA allocation | 40 | * @dma_tx_param: parameter passed to the DMA allocation |
41 | * filter in order to select an apropriate TX channel. If this | 41 | * filter in order to select an appropriate TX channel. If this |
42 | * is NULL the driver will attempt to use the RX channel as a | 42 | * is NULL the driver will attempt to use the RX channel as a |
43 | * bidirectional channel | 43 | * bidirectional channel |
44 | */ | 44 | */ |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 475f8c42c0e9..381f4cec8260 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -443,6 +443,7 @@ void atm_dev_signal_change(struct atm_dev *dev, char signal); | |||
443 | 443 | ||
444 | void vcc_insert_socket(struct sock *sk); | 444 | void vcc_insert_socket(struct sock *sk); |
445 | 445 | ||
446 | void atm_dev_release_vccs(struct atm_dev *dev); | ||
446 | 447 | ||
447 | /* | 448 | /* |
448 | * This is approximately the algorithm used by alloc_skb. | 449 | * This is approximately the algorithm used by alloc_skb. |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 4ce34fa937d4..96f4094b706d 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -66,8 +66,6 @@ struct backing_dev_info { | |||
66 | unsigned int capabilities; /* Device capabilities */ | 66 | unsigned int capabilities; /* Device capabilities */ |
67 | congested_fn *congested_fn; /* Function pointer if device is md/dm */ | 67 | congested_fn *congested_fn; /* Function pointer if device is md/dm */ |
68 | void *congested_data; /* Pointer to aux data for congested func */ | 68 | void *congested_data; /* Pointer to aux data for congested func */ |
69 | void (*unplug_io_fn)(struct backing_dev_info *, struct page *); | ||
70 | void *unplug_io_data; | ||
71 | 69 | ||
72 | char *name; | 70 | char *name; |
73 | 71 | ||
@@ -251,7 +249,6 @@ int bdi_set_max_ratio(struct backing_dev_info *bdi, unsigned int max_ratio); | |||
251 | 249 | ||
252 | extern struct backing_dev_info default_backing_dev_info; | 250 | extern struct backing_dev_info default_backing_dev_info; |
253 | extern struct backing_dev_info noop_backing_dev_info; | 251 | extern struct backing_dev_info noop_backing_dev_info; |
254 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page); | ||
255 | 252 | ||
256 | int writeback_in_progress(struct backing_dev_info *bdi); | 253 | int writeback_in_progress(struct backing_dev_info *bdi); |
257 | 254 | ||
@@ -336,17 +333,4 @@ static inline int bdi_sched_wait(void *word) | |||
336 | return 0; | 333 | return 0; |
337 | } | 334 | } |
338 | 335 | ||
339 | static inline void blk_run_backing_dev(struct backing_dev_info *bdi, | ||
340 | struct page *page) | ||
341 | { | ||
342 | if (bdi && bdi->unplug_io_fn) | ||
343 | bdi->unplug_io_fn(bdi, page); | ||
344 | } | ||
345 | |||
346 | static inline void blk_run_address_space(struct address_space *mapping) | ||
347 | { | ||
348 | if (mapping) | ||
349 | blk_run_backing_dev(mapping->backing_dev_info, NULL); | ||
350 | } | ||
351 | |||
352 | #endif /* _LINUX_BACKING_DEV_H */ | 336 | #endif /* _LINUX_BACKING_DEV_H */ |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 4a3d52e545e1..5ffc6dda4675 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -32,6 +32,13 @@ enum backlight_update_reason { | |||
32 | BACKLIGHT_UPDATE_SYSFS, | 32 | BACKLIGHT_UPDATE_SYSFS, |
33 | }; | 33 | }; |
34 | 34 | ||
35 | enum backlight_type { | ||
36 | BACKLIGHT_RAW = 1, | ||
37 | BACKLIGHT_PLATFORM, | ||
38 | BACKLIGHT_FIRMWARE, | ||
39 | BACKLIGHT_TYPE_MAX, | ||
40 | }; | ||
41 | |||
35 | struct backlight_device; | 42 | struct backlight_device; |
36 | struct fb_info; | 43 | struct fb_info; |
37 | 44 | ||
@@ -62,6 +69,8 @@ struct backlight_properties { | |||
62 | /* FB Blanking active? (values as for power) */ | 69 | /* FB Blanking active? (values as for power) */ |
63 | /* Due to be removed, please use (state & BL_CORE_FBBLANK) */ | 70 | /* Due to be removed, please use (state & BL_CORE_FBBLANK) */ |
64 | int fb_blank; | 71 | int fb_blank; |
72 | /* Backlight type */ | ||
73 | enum backlight_type type; | ||
65 | /* Flags used to signal drivers of state changes */ | 74 | /* Flags used to signal drivers of state changes */ |
66 | /* Upper 4 bits are reserved for driver internal use */ | 75 | /* Upper 4 bits are reserved for driver internal use */ |
67 | unsigned int state; | 76 | unsigned int state; |
diff --git a/include/linux/bch.h b/include/linux/bch.h new file mode 100644 index 000000000000..295b4ef153bb --- /dev/null +++ b/include/linux/bch.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * Generic binary BCH encoding/decoding library | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License version 2 as published by | ||
6 | * the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that 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., 51 | ||
15 | * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
16 | * | ||
17 | * Copyright © 2011 Parrot S.A. | ||
18 | * | ||
19 | * Author: Ivan Djelic <ivan.djelic@parrot.com> | ||
20 | * | ||
21 | * Description: | ||
22 | * | ||
23 | * This library provides runtime configurable encoding/decoding of binary | ||
24 | * Bose-Chaudhuri-Hocquenghem (BCH) codes. | ||
25 | */ | ||
26 | #ifndef _BCH_H | ||
27 | #define _BCH_H | ||
28 | |||
29 | #include <linux/types.h> | ||
30 | |||
31 | /** | ||
32 | * struct bch_control - BCH control structure | ||
33 | * @m: Galois field order | ||
34 | * @n: maximum codeword size in bits (= 2^m-1) | ||
35 | * @t: error correction capability in bits | ||
36 | * @ecc_bits: ecc exact size in bits, i.e. generator polynomial degree (<=m*t) | ||
37 | * @ecc_bytes: ecc max size (m*t bits) in bytes | ||
38 | * @a_pow_tab: Galois field GF(2^m) exponentiation lookup table | ||
39 | * @a_log_tab: Galois field GF(2^m) log lookup table | ||
40 | * @mod8_tab: remainder generator polynomial lookup tables | ||
41 | * @ecc_buf: ecc parity words buffer | ||
42 | * @ecc_buf2: ecc parity words buffer | ||
43 | * @xi_tab: GF(2^m) base for solving degree 2 polynomial roots | ||
44 | * @syn: syndrome buffer | ||
45 | * @cache: log-based polynomial representation buffer | ||
46 | * @elp: error locator polynomial | ||
47 | * @poly_2t: temporary polynomials of degree 2t | ||
48 | */ | ||
49 | struct bch_control { | ||
50 | unsigned int m; | ||
51 | unsigned int n; | ||
52 | unsigned int t; | ||
53 | unsigned int ecc_bits; | ||
54 | unsigned int ecc_bytes; | ||
55 | /* private: */ | ||
56 | uint16_t *a_pow_tab; | ||
57 | uint16_t *a_log_tab; | ||
58 | uint32_t *mod8_tab; | ||
59 | uint32_t *ecc_buf; | ||
60 | uint32_t *ecc_buf2; | ||
61 | unsigned int *xi_tab; | ||
62 | unsigned int *syn; | ||
63 | int *cache; | ||
64 | struct gf_poly *elp; | ||
65 | struct gf_poly *poly_2t[4]; | ||
66 | }; | ||
67 | |||
68 | struct bch_control *init_bch(int m, int t, unsigned int prim_poly); | ||
69 | |||
70 | void free_bch(struct bch_control *bch); | ||
71 | |||
72 | void encode_bch(struct bch_control *bch, const uint8_t *data, | ||
73 | unsigned int len, uint8_t *ecc); | ||
74 | |||
75 | int decode_bch(struct bch_control *bch, const uint8_t *data, unsigned int len, | ||
76 | const uint8_t *recv_ecc, const uint8_t *calc_ecc, | ||
77 | const unsigned int *syn, unsigned int *errloc); | ||
78 | |||
79 | #endif /* _BCH_H */ | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index 35dcdb3589bc..ce33e6868a2f 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -304,7 +304,6 @@ struct biovec_slab { | |||
304 | }; | 304 | }; |
305 | 305 | ||
306 | extern struct bio_set *fs_bio_set; | 306 | extern struct bio_set *fs_bio_set; |
307 | extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly; | ||
308 | 307 | ||
309 | /* | 308 | /* |
310 | * a small number of entries is fine, not going to be performance critical. | 309 | * a small number of entries is fine, not going to be performance critical. |
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index e612575a2596..b4326bfa684f 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h | |||
@@ -23,11 +23,11 @@ static inline void bit_spin_lock(int bitnum, unsigned long *addr) | |||
23 | preempt_disable(); | 23 | preempt_disable(); |
24 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) | 24 | #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) |
25 | while (unlikely(test_and_set_bit_lock(bitnum, addr))) { | 25 | while (unlikely(test_and_set_bit_lock(bitnum, addr))) { |
26 | while (test_bit(bitnum, addr)) { | 26 | preempt_enable(); |
27 | preempt_enable(); | 27 | do { |
28 | cpu_relax(); | 28 | cpu_relax(); |
29 | preempt_disable(); | 29 | } while (test_bit(bitnum, addr)); |
30 | } | 30 | preempt_disable(); |
31 | } | 31 | } |
32 | #endif | 32 | #endif |
33 | __acquire(bitlock); | 33 | __acquire(bitlock); |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index 46ad5197537a..be50d9e70a7d 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
@@ -128,7 +128,6 @@ enum rq_flag_bits { | |||
128 | __REQ_NOIDLE, /* don't anticipate more IO after this one */ | 128 | __REQ_NOIDLE, /* don't anticipate more IO after this one */ |
129 | 129 | ||
130 | /* bio only flags */ | 130 | /* bio only flags */ |
131 | __REQ_UNPLUG, /* unplug the immediately after submission */ | ||
132 | __REQ_RAHEAD, /* read ahead, can fail anytime */ | 131 | __REQ_RAHEAD, /* read ahead, can fail anytime */ |
133 | __REQ_THROTTLED, /* This bio has already been subjected to | 132 | __REQ_THROTTLED, /* This bio has already been subjected to |
134 | * throttling rules. Don't do it again. */ | 133 | * throttling rules. Don't do it again. */ |
@@ -148,9 +147,11 @@ enum rq_flag_bits { | |||
148 | __REQ_ALLOCED, /* request came from our alloc pool */ | 147 | __REQ_ALLOCED, /* request came from our alloc pool */ |
149 | __REQ_COPY_USER, /* contains copies of user pages */ | 148 | __REQ_COPY_USER, /* contains copies of user pages */ |
150 | __REQ_FLUSH, /* request for cache flush */ | 149 | __REQ_FLUSH, /* request for cache flush */ |
150 | __REQ_FLUSH_SEQ, /* request for flush sequence */ | ||
151 | __REQ_IO_STAT, /* account I/O stat */ | 151 | __REQ_IO_STAT, /* account I/O stat */ |
152 | __REQ_MIXED_MERGE, /* merge of different types, fail separately */ | 152 | __REQ_MIXED_MERGE, /* merge of different types, fail separately */ |
153 | __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */ | 153 | __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */ |
154 | __REQ_ON_PLUG, /* on plug list */ | ||
154 | __REQ_NR_BITS, /* stops here */ | 155 | __REQ_NR_BITS, /* stops here */ |
155 | }; | 156 | }; |
156 | 157 | ||
@@ -170,7 +171,6 @@ enum rq_flag_bits { | |||
170 | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) | 171 | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) |
171 | #define REQ_CLONE_MASK REQ_COMMON_MASK | 172 | #define REQ_CLONE_MASK REQ_COMMON_MASK |
172 | 173 | ||
173 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) | ||
174 | #define REQ_RAHEAD (1 << __REQ_RAHEAD) | 174 | #define REQ_RAHEAD (1 << __REQ_RAHEAD) |
175 | #define REQ_THROTTLED (1 << __REQ_THROTTLED) | 175 | #define REQ_THROTTLED (1 << __REQ_THROTTLED) |
176 | 176 | ||
@@ -188,8 +188,10 @@ enum rq_flag_bits { | |||
188 | #define REQ_ALLOCED (1 << __REQ_ALLOCED) | 188 | #define REQ_ALLOCED (1 << __REQ_ALLOCED) |
189 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 189 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
190 | #define REQ_FLUSH (1 << __REQ_FLUSH) | 190 | #define REQ_FLUSH (1 << __REQ_FLUSH) |
191 | #define REQ_FLUSH_SEQ (1 << __REQ_FLUSH_SEQ) | ||
191 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) | 192 | #define REQ_IO_STAT (1 << __REQ_IO_STAT) |
192 | #define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE) | 193 | #define REQ_MIXED_MERGE (1 << __REQ_MIXED_MERGE) |
193 | #define REQ_SECURE (1 << __REQ_SECURE) | 194 | #define REQ_SECURE (1 << __REQ_SECURE) |
195 | #define REQ_ON_PLUG (1 << __REQ_ON_PLUG) | ||
194 | 196 | ||
195 | #endif /* __LINUX_BLK_TYPES_H */ | 197 | #endif /* __LINUX_BLK_TYPES_H */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index d5063e1b5555..2ad95fa1d130 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -108,11 +108,17 @@ struct request { | |||
108 | 108 | ||
109 | /* | 109 | /* |
110 | * Three pointers are available for the IO schedulers, if they need | 110 | * Three pointers are available for the IO schedulers, if they need |
111 | * more they have to dynamically allocate it. | 111 | * more they have to dynamically allocate it. Flush requests are |
112 | * never put on the IO scheduler. So let the flush fields share | ||
113 | * space with the three elevator_private pointers. | ||
112 | */ | 114 | */ |
113 | void *elevator_private; | 115 | union { |
114 | void *elevator_private2; | 116 | void *elevator_private[3]; |
115 | void *elevator_private3; | 117 | struct { |
118 | unsigned int seq; | ||
119 | struct list_head list; | ||
120 | } flush; | ||
121 | }; | ||
116 | 122 | ||
117 | struct gendisk *rq_disk; | 123 | struct gendisk *rq_disk; |
118 | struct hd_struct *part; | 124 | struct hd_struct *part; |
@@ -190,7 +196,6 @@ typedef void (request_fn_proc) (struct request_queue *q); | |||
190 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); | 196 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); |
191 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); | 197 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); |
192 | typedef void (unprep_rq_fn) (struct request_queue *, struct request *); | 198 | typedef void (unprep_rq_fn) (struct request_queue *, struct request *); |
193 | typedef void (unplug_fn) (struct request_queue *); | ||
194 | 199 | ||
195 | struct bio_vec; | 200 | struct bio_vec; |
196 | struct bvec_merge_data { | 201 | struct bvec_merge_data { |
@@ -273,7 +278,6 @@ struct request_queue | |||
273 | make_request_fn *make_request_fn; | 278 | make_request_fn *make_request_fn; |
274 | prep_rq_fn *prep_rq_fn; | 279 | prep_rq_fn *prep_rq_fn; |
275 | unprep_rq_fn *unprep_rq_fn; | 280 | unprep_rq_fn *unprep_rq_fn; |
276 | unplug_fn *unplug_fn; | ||
277 | merge_bvec_fn *merge_bvec_fn; | 281 | merge_bvec_fn *merge_bvec_fn; |
278 | softirq_done_fn *softirq_done_fn; | 282 | softirq_done_fn *softirq_done_fn; |
279 | rq_timed_out_fn *rq_timed_out_fn; | 283 | rq_timed_out_fn *rq_timed_out_fn; |
@@ -287,12 +291,9 @@ struct request_queue | |||
287 | struct request *boundary_rq; | 291 | struct request *boundary_rq; |
288 | 292 | ||
289 | /* | 293 | /* |
290 | * Auto-unplugging state | 294 | * Delayed queue handling |
291 | */ | 295 | */ |
292 | struct timer_list unplug_timer; | 296 | struct delayed_work delay_work; |
293 | int unplug_thresh; /* After this many requests */ | ||
294 | unsigned long unplug_delay; /* After this many jiffies */ | ||
295 | struct work_struct unplug_work; | ||
296 | 297 | ||
297 | struct backing_dev_info backing_dev_info; | 298 | struct backing_dev_info backing_dev_info; |
298 | 299 | ||
@@ -363,11 +364,12 @@ struct request_queue | |||
363 | * for flush operations | 364 | * for flush operations |
364 | */ | 365 | */ |
365 | unsigned int flush_flags; | 366 | unsigned int flush_flags; |
366 | unsigned int flush_seq; | 367 | unsigned int flush_pending_idx:1; |
367 | int flush_err; | 368 | unsigned int flush_running_idx:1; |
369 | unsigned long flush_pending_since; | ||
370 | struct list_head flush_queue[2]; | ||
371 | struct list_head flush_data_in_flight; | ||
368 | struct request flush_rq; | 372 | struct request flush_rq; |
369 | struct request *orig_flush_rq; | ||
370 | struct list_head pending_flushes; | ||
371 | 373 | ||
372 | struct mutex sysfs_lock; | 374 | struct mutex sysfs_lock; |
373 | 375 | ||
@@ -386,21 +388,19 @@ struct request_queue | |||
386 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ | 388 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ |
387 | #define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */ | 389 | #define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */ |
388 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ | 390 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ |
389 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 391 | #define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */ |
390 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ | 392 | #define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ |
391 | #define QUEUE_FLAG_ELVSWITCH 8 /* don't use elevator, just do FIFO */ | 393 | #define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ |
392 | #define QUEUE_FLAG_BIDI 9 /* queue supports bidi requests */ | 394 | #define QUEUE_FLAG_SAME_COMP 9 /* force complete on same CPU */ |
393 | #define QUEUE_FLAG_NOMERGES 10 /* disable merge attempts */ | 395 | #define QUEUE_FLAG_FAIL_IO 10 /* fake timeout */ |
394 | #define QUEUE_FLAG_SAME_COMP 11 /* force complete on same CPU */ | 396 | #define QUEUE_FLAG_STACKABLE 11 /* supports request stacking */ |
395 | #define QUEUE_FLAG_FAIL_IO 12 /* fake timeout */ | 397 | #define QUEUE_FLAG_NONROT 12 /* non-rotational device (SSD) */ |
396 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ | ||
397 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ | ||
398 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 398 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
399 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | 399 | #define QUEUE_FLAG_IO_STAT 13 /* do IO stats */ |
400 | #define QUEUE_FLAG_DISCARD 16 /* supports DISCARD */ | 400 | #define QUEUE_FLAG_DISCARD 14 /* supports DISCARD */ |
401 | #define QUEUE_FLAG_NOXMERGES 17 /* No extended merges */ | 401 | #define QUEUE_FLAG_NOXMERGES 15 /* No extended merges */ |
402 | #define QUEUE_FLAG_ADD_RANDOM 18 /* Contributes to random pool */ | 402 | #define QUEUE_FLAG_ADD_RANDOM 16 /* Contributes to random pool */ |
403 | #define QUEUE_FLAG_SECDISCARD 19 /* supports SECDISCARD */ | 403 | #define QUEUE_FLAG_SECDISCARD 17 /* supports SECDISCARD */ |
404 | 404 | ||
405 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | 405 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ |
406 | (1 << QUEUE_FLAG_STACKABLE) | \ | 406 | (1 << QUEUE_FLAG_STACKABLE) | \ |
@@ -472,7 +472,6 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | |||
472 | __clear_bit(flag, &q->queue_flags); | 472 | __clear_bit(flag, &q->queue_flags); |
473 | } | 473 | } |
474 | 474 | ||
475 | #define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags) | ||
476 | #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) | 475 | #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) |
477 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 476 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
478 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) | 477 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) |
@@ -667,9 +666,7 @@ extern int blk_rq_prep_clone(struct request *rq, struct request *rq_src, | |||
667 | extern void blk_rq_unprep_clone(struct request *rq); | 666 | extern void blk_rq_unprep_clone(struct request *rq); |
668 | extern int blk_insert_cloned_request(struct request_queue *q, | 667 | extern int blk_insert_cloned_request(struct request_queue *q, |
669 | struct request *rq); | 668 | struct request *rq); |
670 | extern void blk_plug_device(struct request_queue *); | 669 | extern void blk_delay_queue(struct request_queue *, unsigned long); |
671 | extern void blk_plug_device_unlocked(struct request_queue *); | ||
672 | extern int blk_remove_plug(struct request_queue *); | ||
673 | extern void blk_recount_segments(struct request_queue *, struct bio *); | 670 | extern void blk_recount_segments(struct request_queue *, struct bio *); |
674 | extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, | 671 | extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, |
675 | unsigned int, void __user *); | 672 | unsigned int, void __user *); |
@@ -699,8 +696,9 @@ extern void blk_start_queue(struct request_queue *q); | |||
699 | extern void blk_stop_queue(struct request_queue *q); | 696 | extern void blk_stop_queue(struct request_queue *q); |
700 | extern void blk_sync_queue(struct request_queue *q); | 697 | extern void blk_sync_queue(struct request_queue *q); |
701 | extern void __blk_stop_queue(struct request_queue *q); | 698 | extern void __blk_stop_queue(struct request_queue *q); |
702 | extern void __blk_run_queue(struct request_queue *q, bool force_kblockd); | 699 | extern void __blk_run_queue(struct request_queue *q); |
703 | extern void blk_run_queue(struct request_queue *); | 700 | extern void blk_run_queue(struct request_queue *); |
701 | extern void blk_run_queue_async(struct request_queue *q); | ||
704 | extern int blk_rq_map_user(struct request_queue *, struct request *, | 702 | extern int blk_rq_map_user(struct request_queue *, struct request *, |
705 | struct rq_map_data *, void __user *, unsigned long, | 703 | struct rq_map_data *, void __user *, unsigned long, |
706 | gfp_t); | 704 | gfp_t); |
@@ -713,7 +711,6 @@ extern int blk_execute_rq(struct request_queue *, struct gendisk *, | |||
713 | struct request *, int); | 711 | struct request *, int); |
714 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, | 712 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, |
715 | struct request *, int, rq_end_io_fn *); | 713 | struct request *, int, rq_end_io_fn *); |
716 | extern void blk_unplug(struct request_queue *q); | ||
717 | 714 | ||
718 | static inline struct request_queue *bdev_get_queue(struct block_device *bdev) | 715 | static inline struct request_queue *bdev_get_queue(struct block_device *bdev) |
719 | { | 716 | { |
@@ -850,7 +847,6 @@ extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bd | |||
850 | 847 | ||
851 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); | 848 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
852 | extern void blk_dump_rq_flags(struct request *, char *); | 849 | extern void blk_dump_rq_flags(struct request *, char *); |
853 | extern void generic_unplug_device(struct request_queue *); | ||
854 | extern long nr_blockdev_pages(void); | 850 | extern long nr_blockdev_pages(void); |
855 | 851 | ||
856 | int blk_get_queue(struct request_queue *); | 852 | int blk_get_queue(struct request_queue *); |
@@ -858,6 +854,44 @@ struct request_queue *blk_alloc_queue(gfp_t); | |||
858 | struct request_queue *blk_alloc_queue_node(gfp_t, int); | 854 | struct request_queue *blk_alloc_queue_node(gfp_t, int); |
859 | extern void blk_put_queue(struct request_queue *); | 855 | extern void blk_put_queue(struct request_queue *); |
860 | 856 | ||
857 | struct blk_plug { | ||
858 | unsigned long magic; | ||
859 | struct list_head list; | ||
860 | struct list_head cb_list; | ||
861 | unsigned int should_sort; | ||
862 | }; | ||
863 | struct blk_plug_cb { | ||
864 | struct list_head list; | ||
865 | void (*callback)(struct blk_plug_cb *); | ||
866 | }; | ||
867 | |||
868 | extern void blk_start_plug(struct blk_plug *); | ||
869 | extern void blk_finish_plug(struct blk_plug *); | ||
870 | extern void blk_flush_plug_list(struct blk_plug *, bool); | ||
871 | |||
872 | static inline void blk_flush_plug(struct task_struct *tsk) | ||
873 | { | ||
874 | struct blk_plug *plug = tsk->plug; | ||
875 | |||
876 | if (plug) | ||
877 | blk_flush_plug_list(plug, false); | ||
878 | } | ||
879 | |||
880 | static inline void blk_schedule_flush_plug(struct task_struct *tsk) | ||
881 | { | ||
882 | struct blk_plug *plug = tsk->plug; | ||
883 | |||
884 | if (plug) | ||
885 | blk_flush_plug_list(plug, true); | ||
886 | } | ||
887 | |||
888 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | ||
889 | { | ||
890 | struct blk_plug *plug = tsk->plug; | ||
891 | |||
892 | return plug && (!list_empty(&plug->list) || !list_empty(&plug->cb_list)); | ||
893 | } | ||
894 | |||
861 | /* | 895 | /* |
862 | * tag stuff | 896 | * tag stuff |
863 | */ | 897 | */ |
@@ -1135,7 +1169,6 @@ static inline uint64_t rq_io_start_time_ns(struct request *req) | |||
1135 | extern int blk_throtl_init(struct request_queue *q); | 1169 | extern int blk_throtl_init(struct request_queue *q); |
1136 | extern void blk_throtl_exit(struct request_queue *q); | 1170 | extern void blk_throtl_exit(struct request_queue *q); |
1137 | extern int blk_throtl_bio(struct request_queue *q, struct bio **bio); | 1171 | extern int blk_throtl_bio(struct request_queue *q, struct bio **bio); |
1138 | extern void throtl_shutdown_timer_wq(struct request_queue *q); | ||
1139 | #else /* CONFIG_BLK_DEV_THROTTLING */ | 1172 | #else /* CONFIG_BLK_DEV_THROTTLING */ |
1140 | static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) | 1173 | static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) |
1141 | { | 1174 | { |
@@ -1144,7 +1177,6 @@ static inline int blk_throtl_bio(struct request_queue *q, struct bio **bio) | |||
1144 | 1177 | ||
1145 | static inline int blk_throtl_init(struct request_queue *q) { return 0; } | 1178 | static inline int blk_throtl_init(struct request_queue *q) { return 0; } |
1146 | static inline int blk_throtl_exit(struct request_queue *q) { return 0; } | 1179 | static inline int blk_throtl_exit(struct request_queue *q) { return 0; } |
1147 | static inline void throtl_shutdown_timer_wq(struct request_queue *q) {} | ||
1148 | #endif /* CONFIG_BLK_DEV_THROTTLING */ | 1180 | #endif /* CONFIG_BLK_DEV_THROTTLING */ |
1149 | 1181 | ||
1150 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ | 1182 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ |
@@ -1187,6 +1219,7 @@ struct blk_integrity { | |||
1187 | struct kobject kobj; | 1219 | struct kobject kobj; |
1188 | }; | 1220 | }; |
1189 | 1221 | ||
1222 | extern bool blk_integrity_is_initialized(struct gendisk *); | ||
1190 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); | 1223 | extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); |
1191 | extern void blk_integrity_unregister(struct gendisk *); | 1224 | extern void blk_integrity_unregister(struct gendisk *); |
1192 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); | 1225 | extern int blk_integrity_compare(struct gendisk *, struct gendisk *); |
@@ -1243,6 +1276,7 @@ queue_max_integrity_segments(struct request_queue *q) | |||
1243 | #define queue_max_integrity_segments(a) (0) | 1276 | #define queue_max_integrity_segments(a) (0) |
1244 | #define blk_integrity_merge_rq(a, b, c) (0) | 1277 | #define blk_integrity_merge_rq(a, b, c) (0) |
1245 | #define blk_integrity_merge_bio(a, b, c) (0) | 1278 | #define blk_integrity_merge_bio(a, b, c) (0) |
1279 | #define blk_integrity_is_initialized(a) (0) | ||
1246 | 1280 | ||
1247 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 1281 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
1248 | 1282 | ||
@@ -1278,6 +1312,31 @@ static inline long nr_blockdev_pages(void) | |||
1278 | return 0; | 1312 | return 0; |
1279 | } | 1313 | } |
1280 | 1314 | ||
1315 | struct blk_plug { | ||
1316 | }; | ||
1317 | |||
1318 | static inline void blk_start_plug(struct blk_plug *plug) | ||
1319 | { | ||
1320 | } | ||
1321 | |||
1322 | static inline void blk_finish_plug(struct blk_plug *plug) | ||
1323 | { | ||
1324 | } | ||
1325 | |||
1326 | static inline void blk_flush_plug(struct task_struct *task) | ||
1327 | { | ||
1328 | } | ||
1329 | |||
1330 | static inline void blk_schedule_flush_plug(struct task_struct *task) | ||
1331 | { | ||
1332 | } | ||
1333 | |||
1334 | |||
1335 | static inline bool blk_needs_flush_plug(struct task_struct *tsk) | ||
1336 | { | ||
1337 | return false; | ||
1338 | } | ||
1339 | |||
1281 | #endif /* CONFIG_BLOCK */ | 1340 | #endif /* CONFIG_BLOCK */ |
1282 | 1341 | ||
1283 | #endif | 1342 | #endif |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 499dfe982a0e..b8613e806aa9 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -19,10 +19,6 @@ extern unsigned long min_low_pfn; | |||
19 | */ | 19 | */ |
20 | extern unsigned long max_pfn; | 20 | extern unsigned long max_pfn; |
21 | 21 | ||
22 | #ifdef CONFIG_CRASH_DUMP | ||
23 | extern unsigned long saved_max_pfn; | ||
24 | #endif | ||
25 | |||
26 | #ifndef CONFIG_NO_BOOTMEM | 22 | #ifndef CONFIG_NO_BOOTMEM |
27 | /* | 23 | /* |
28 | * node_bootmem_map is a map pointer - the bits represent all physical | 24 | * node_bootmem_map is a map pointer - the bits represent all physical |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 68d1fe7b877c..f5df23561b96 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -219,7 +219,6 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size); | |||
219 | int block_commit_write(struct page *page, unsigned from, unsigned to); | 219 | int block_commit_write(struct page *page, unsigned from, unsigned to); |
220 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | 220 | int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, |
221 | get_block_t get_block); | 221 | get_block_t get_block); |
222 | void block_sync_page(struct page *); | ||
223 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 222 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
224 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); | 223 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); |
225 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, | 224 | int nobh_write_begin(struct address_space *, loff_t, unsigned, unsigned, |
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 6c507bea275f..6f70a6d3a16e 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -36,10 +36,10 @@ | |||
36 | * @prot: pointer to struct proto structure. | 36 | * @prot: pointer to struct proto structure. |
37 | */ | 37 | */ |
38 | struct can_proto { | 38 | struct can_proto { |
39 | int type; | 39 | int type; |
40 | int protocol; | 40 | int protocol; |
41 | struct proto_ops *ops; | 41 | const struct proto_ops *ops; |
42 | struct proto *prot; | 42 | struct proto *prot; |
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* function prototypes for the CAN networklayer core (af_can.c) */ | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
@@ -58,5 +58,6 @@ extern void can_rx_unregister(struct net_device *dev, canid_t can_id, | |||
58 | void *data); | 58 | void *data); |
59 | 59 | ||
60 | extern int can_send(struct sk_buff *skb, int loop); | 60 | extern int can_send(struct sk_buff *skb, int loop); |
61 | extern int can_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); | ||
61 | 62 | ||
62 | #endif /* CAN_CORE_H */ | 63 | #endif /* CAN_CORE_H */ |
diff --git a/include/linux/can/error.h b/include/linux/can/error.h index d4127fd9e681..5958074302a4 100644 --- a/include/linux/can/error.h +++ b/include/linux/can/error.h | |||
@@ -51,7 +51,7 @@ | |||
51 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ | 51 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ |
52 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ | 52 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ |
53 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ | 53 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ |
54 | #define CAN_ERR_PROT_TX 0x80 /* error occured on transmission */ | 54 | #define CAN_ERR_PROT_TX 0x80 /* error occurred on transmission */ |
55 | 55 | ||
56 | /* error in CAN protocol (location) / data[3] */ | 56 | /* error in CAN protocol (location) / data[3] */ |
57 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ | 57 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ |
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h index 3250de935e1a..34542d374dd8 100644 --- a/include/linux/can/netlink.h +++ b/include/linux/can/netlink.h | |||
@@ -17,7 +17,7 @@ | |||
17 | /* | 17 | /* |
18 | * CAN bit-timing parameters | 18 | * CAN bit-timing parameters |
19 | * | 19 | * |
20 | * For futher information, please read chapter "8 BIT TIMING | 20 | * For further information, please read chapter "8 BIT TIMING |
21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" | 21 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" |
22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. | 22 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. |
23 | */ | 23 | */ |
diff --git a/include/linux/can/platform/mcp251x.h b/include/linux/can/platform/mcp251x.h index 8e20540043f5..089fe43211a4 100644 --- a/include/linux/can/platform/mcp251x.h +++ b/include/linux/can/platform/mcp251x.h | |||
@@ -12,6 +12,7 @@ | |||
12 | /** | 12 | /** |
13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data | 13 | * struct mcp251x_platform_data - MCP251X SPI CAN controller platform data |
14 | * @oscillator_frequency: - oscillator frequency in Hz | 14 | * @oscillator_frequency: - oscillator frequency in Hz |
15 | * @irq_flags: - IRQF configuration flags | ||
15 | * @board_specific_setup: - called before probing the chip (power,reset) | 16 | * @board_specific_setup: - called before probing the chip (power,reset) |
16 | * @transceiver_enable: - called to power on/off the transceiver | 17 | * @transceiver_enable: - called to power on/off the transceiver |
17 | * @power_enable: - called to power on/off the mcp *and* the | 18 | * @power_enable: - called to power on/off the mcp *and* the |
@@ -24,6 +25,7 @@ | |||
24 | 25 | ||
25 | struct mcp251x_platform_data { | 26 | struct mcp251x_platform_data { |
26 | unsigned long oscillator_frequency; | 27 | unsigned long oscillator_frequency; |
28 | unsigned long irq_flags; | ||
27 | int (*board_specific_setup)(struct spi_device *spi); | 29 | int (*board_specific_setup)(struct spi_device *spi); |
28 | int (*transceiver_enable)(int enable); | 30 | int (*transceiver_enable)(int enable); |
29 | int (*power_enable) (int enable); | 31 | int (*power_enable) (int enable); |
diff --git a/include/linux/capability.h b/include/linux/capability.h index fb16a3699b99..16ee8b49a200 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -368,6 +368,15 @@ struct cpu_vfs_cap_data { | |||
368 | 368 | ||
369 | #ifdef __KERNEL__ | 369 | #ifdef __KERNEL__ |
370 | 370 | ||
371 | struct dentry; | ||
372 | struct user_namespace; | ||
373 | |||
374 | struct user_namespace *current_user_ns(void); | ||
375 | |||
376 | extern const kernel_cap_t __cap_empty_set; | ||
377 | extern const kernel_cap_t __cap_full_set; | ||
378 | extern const kernel_cap_t __cap_init_eff_set; | ||
379 | |||
371 | /* | 380 | /* |
372 | * Internal kernel functions only | 381 | * Internal kernel functions only |
373 | */ | 382 | */ |
@@ -530,40 +539,27 @@ static inline kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a, | |||
530 | cap_intersect(permitted, __cap_nfsd_set)); | 539 | cap_intersect(permitted, __cap_nfsd_set)); |
531 | } | 540 | } |
532 | 541 | ||
533 | extern const kernel_cap_t __cap_empty_set; | 542 | extern bool has_capability(struct task_struct *t, int cap); |
534 | extern const kernel_cap_t __cap_full_set; | 543 | extern bool has_ns_capability(struct task_struct *t, |
535 | extern const kernel_cap_t __cap_init_eff_set; | 544 | struct user_namespace *ns, int cap); |
536 | 545 | extern bool has_capability_noaudit(struct task_struct *t, int cap); | |
537 | /** | 546 | extern bool capable(int cap); |
538 | * has_capability - Determine if a task has a superior capability available | 547 | extern bool ns_capable(struct user_namespace *ns, int cap); |
539 | * @t: The task in question | 548 | extern bool task_ns_capable(struct task_struct *t, int cap); |
540 | * @cap: The capability to be tested for | ||
541 | * | ||
542 | * Return true if the specified task has the given superior capability | ||
543 | * currently in effect, false if not. | ||
544 | * | ||
545 | * Note that this does not set PF_SUPERPRIV on the task. | ||
546 | */ | ||
547 | #define has_capability(t, cap) (security_real_capable((t), (cap)) == 0) | ||
548 | 549 | ||
549 | /** | 550 | /** |
550 | * has_capability_noaudit - Determine if a task has a superior capability available (unaudited) | 551 | * nsown_capable - Check superior capability to one's own user_ns |
551 | * @t: The task in question | 552 | * @cap: The capability in question |
552 | * @cap: The capability to be tested for | ||
553 | * | 553 | * |
554 | * Return true if the specified task has the given superior capability | 554 | * Return true if the current task has the given superior capability |
555 | * currently in effect, false if not, but don't write an audit message for the | 555 | * targeted at its own user namespace. |
556 | * check. | ||
557 | * | ||
558 | * Note that this does not set PF_SUPERPRIV on the task. | ||
559 | */ | 556 | */ |
560 | #define has_capability_noaudit(t, cap) \ | 557 | static inline bool nsown_capable(int cap) |
561 | (security_real_capable_noaudit((t), (cap)) == 0) | 558 | { |
562 | 559 | return ns_capable(current_user_ns(), cap); | |
563 | extern int capable(int cap); | 560 | } |
564 | 561 | ||
565 | /* audit system wants to get cap info from files as well */ | 562 | /* audit system wants to get cap info from files as well */ |
566 | struct dentry; | ||
567 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); | 563 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); |
568 | 564 | ||
569 | #endif /* __KERNEL__ */ | 565 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/cdk.h b/include/linux/cdk.h index 0908daf7bf56..80093a8d4f64 100644 --- a/include/linux/cdk.h +++ b/include/linux/cdk.h | |||
@@ -149,7 +149,7 @@ typedef struct cdkhdr { | |||
149 | /* | 149 | /* |
150 | * Define the memory mapping structure. This structure is pointed to by | 150 | * Define the memory mapping structure. This structure is pointed to by |
151 | * the memp field in the stlcdkhdr struct. As many as these structures | 151 | * the memp field in the stlcdkhdr struct. As many as these structures |
152 | * as required are layed out in shared memory to define how the rest of | 152 | * as required are laid out in shared memory to define how the rest of |
153 | * shared memory is divided up. There will be one for each port. | 153 | * shared memory is divided up. There will be one for each port. |
154 | */ | 154 | */ |
155 | typedef struct cdkmem { | 155 | typedef struct cdkmem { |
diff --git a/include/linux/ceph/auth.h b/include/linux/ceph/auth.h index 7fff521d7eb5..aa13392a7efb 100644 --- a/include/linux/ceph/auth.h +++ b/include/linux/ceph/auth.h | |||
@@ -67,12 +67,12 @@ struct ceph_auth_client { | |||
67 | bool negotiating; /* true if negotiating protocol */ | 67 | bool negotiating; /* true if negotiating protocol */ |
68 | const char *name; /* entity name */ | 68 | const char *name; /* entity name */ |
69 | u64 global_id; /* our unique id in system */ | 69 | u64 global_id; /* our unique id in system */ |
70 | const char *secret; /* our secret key */ | 70 | const struct ceph_crypto_key *key; /* our secret key */ |
71 | unsigned want_keys; /* which services we want */ | 71 | unsigned want_keys; /* which services we want */ |
72 | }; | 72 | }; |
73 | 73 | ||
74 | extern struct ceph_auth_client *ceph_auth_init(const char *name, | 74 | extern struct ceph_auth_client *ceph_auth_init(const char *name, |
75 | const char *secret); | 75 | const struct ceph_crypto_key *key); |
76 | extern void ceph_auth_destroy(struct ceph_auth_client *ac); | 76 | extern void ceph_auth_destroy(struct ceph_auth_client *ac); |
77 | 77 | ||
78 | extern void ceph_auth_reset(struct ceph_auth_client *ac); | 78 | extern void ceph_auth_reset(struct ceph_auth_client *ac); |
diff --git a/include/linux/ceph/ceph_fs.h b/include/linux/ceph/ceph_fs.h index 09dcc0c2ffd5..b8e995fbd867 100644 --- a/include/linux/ceph/ceph_fs.h +++ b/include/linux/ceph/ceph_fs.h | |||
@@ -136,9 +136,18 @@ struct ceph_dir_layout { | |||
136 | 136 | ||
137 | 137 | ||
138 | /* osd */ | 138 | /* osd */ |
139 | #define CEPH_MSG_OSD_MAP 41 | 139 | #define CEPH_MSG_OSD_MAP 41 |
140 | #define CEPH_MSG_OSD_OP 42 | 140 | #define CEPH_MSG_OSD_OP 42 |
141 | #define CEPH_MSG_OSD_OPREPLY 43 | 141 | #define CEPH_MSG_OSD_OPREPLY 43 |
142 | #define CEPH_MSG_WATCH_NOTIFY 44 | ||
143 | |||
144 | |||
145 | /* watch-notify operations */ | ||
146 | enum { | ||
147 | WATCH_NOTIFY = 1, /* notifying watcher */ | ||
148 | WATCH_NOTIFY_COMPLETE = 2, /* notifier notified when done */ | ||
149 | }; | ||
150 | |||
142 | 151 | ||
143 | /* pool operations */ | 152 | /* pool operations */ |
144 | enum { | 153 | enum { |
@@ -213,8 +222,10 @@ struct ceph_client_mount { | |||
213 | struct ceph_mon_request_header monhdr; | 222 | struct ceph_mon_request_header monhdr; |
214 | } __attribute__ ((packed)); | 223 | } __attribute__ ((packed)); |
215 | 224 | ||
225 | #define CEPH_SUBSCRIBE_ONETIME 1 /* i want only 1 update after have */ | ||
226 | |||
216 | struct ceph_mon_subscribe_item { | 227 | struct ceph_mon_subscribe_item { |
217 | __le64 have_version; __le64 have; | 228 | __le64 have_version; __le64 have; |
218 | __u8 onetime; | 229 | __u8 onetime; |
219 | } __attribute__ ((packed)); | 230 | } __attribute__ ((packed)); |
220 | 231 | ||
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index 72c72bfccb88..6365f041745b 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -61,7 +61,7 @@ struct ceph_options { | |||
61 | pointer type of args */ | 61 | pointer type of args */ |
62 | int num_mon; | 62 | int num_mon; |
63 | char *name; | 63 | char *name; |
64 | char *secret; | 64 | struct ceph_crypto_key *key; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
@@ -71,7 +71,6 @@ struct ceph_options { | |||
71 | #define CEPH_OSD_TIMEOUT_DEFAULT 60 /* seconds */ | 71 | #define CEPH_OSD_TIMEOUT_DEFAULT 60 /* seconds */ |
72 | #define CEPH_OSD_KEEPALIVE_DEFAULT 5 | 72 | #define CEPH_OSD_KEEPALIVE_DEFAULT 5 |
73 | #define CEPH_OSD_IDLE_TTL_DEFAULT 60 | 73 | #define CEPH_OSD_IDLE_TTL_DEFAULT 60 |
74 | #define CEPH_MOUNT_RSIZE_DEFAULT (512*1024) /* readahead */ | ||
75 | 74 | ||
76 | #define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024) | 75 | #define CEPH_MSG_MAX_FRONT_LEN (16*1024*1024) |
77 | #define CEPH_MSG_MAX_DATA_LEN (16*1024*1024) | 76 | #define CEPH_MSG_MAX_DATA_LEN (16*1024*1024) |
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index a1af29648fb5..f88eacb111d4 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h | |||
@@ -32,6 +32,7 @@ struct ceph_osd { | |||
32 | struct rb_node o_node; | 32 | struct rb_node o_node; |
33 | struct ceph_connection o_con; | 33 | struct ceph_connection o_con; |
34 | struct list_head o_requests; | 34 | struct list_head o_requests; |
35 | struct list_head o_linger_requests; | ||
35 | struct list_head o_osd_lru; | 36 | struct list_head o_osd_lru; |
36 | struct ceph_authorizer *o_authorizer; | 37 | struct ceph_authorizer *o_authorizer; |
37 | void *o_authorizer_buf, *o_authorizer_reply_buf; | 38 | void *o_authorizer_buf, *o_authorizer_reply_buf; |
@@ -47,6 +48,8 @@ struct ceph_osd_request { | |||
47 | struct rb_node r_node; | 48 | struct rb_node r_node; |
48 | struct list_head r_req_lru_item; | 49 | struct list_head r_req_lru_item; |
49 | struct list_head r_osd_item; | 50 | struct list_head r_osd_item; |
51 | struct list_head r_linger_item; | ||
52 | struct list_head r_linger_osd; | ||
50 | struct ceph_osd *r_osd; | 53 | struct ceph_osd *r_osd; |
51 | struct ceph_pg r_pgid; | 54 | struct ceph_pg r_pgid; |
52 | int r_pg_osds[CEPH_PG_MAX_SIZE]; | 55 | int r_pg_osds[CEPH_PG_MAX_SIZE]; |
@@ -59,6 +62,7 @@ struct ceph_osd_request { | |||
59 | int r_flags; /* any additional flags for the osd */ | 62 | int r_flags; /* any additional flags for the osd */ |
60 | u32 r_sent; /* >0 if r_request is sending/sent */ | 63 | u32 r_sent; /* >0 if r_request is sending/sent */ |
61 | int r_got_reply; | 64 | int r_got_reply; |
65 | int r_linger; | ||
62 | 66 | ||
63 | struct ceph_osd_client *r_osdc; | 67 | struct ceph_osd_client *r_osdc; |
64 | struct kref r_kref; | 68 | struct kref r_kref; |
@@ -74,7 +78,6 @@ struct ceph_osd_request { | |||
74 | char r_oid[40]; /* object name */ | 78 | char r_oid[40]; /* object name */ |
75 | int r_oid_len; | 79 | int r_oid_len; |
76 | unsigned long r_stamp; /* send OR check time */ | 80 | unsigned long r_stamp; /* send OR check time */ |
77 | bool r_resend; /* msg send failed, needs retry */ | ||
78 | 81 | ||
79 | struct ceph_file_layout r_file_layout; | 82 | struct ceph_file_layout r_file_layout; |
80 | struct ceph_snap_context *r_snapc; /* snap context for writes */ | 83 | struct ceph_snap_context *r_snapc; /* snap context for writes */ |
@@ -90,6 +93,26 @@ struct ceph_osd_request { | |||
90 | struct ceph_pagelist *r_trail; /* trailing part of the data */ | 93 | struct ceph_pagelist *r_trail; /* trailing part of the data */ |
91 | }; | 94 | }; |
92 | 95 | ||
96 | struct ceph_osd_event { | ||
97 | u64 cookie; | ||
98 | int one_shot; | ||
99 | struct ceph_osd_client *osdc; | ||
100 | void (*cb)(u64, u64, u8, void *); | ||
101 | void *data; | ||
102 | struct rb_node node; | ||
103 | struct list_head osd_node; | ||
104 | struct kref kref; | ||
105 | struct completion completion; | ||
106 | }; | ||
107 | |||
108 | struct ceph_osd_event_work { | ||
109 | struct work_struct work; | ||
110 | struct ceph_osd_event *event; | ||
111 | u64 ver; | ||
112 | u64 notify_id; | ||
113 | u8 opcode; | ||
114 | }; | ||
115 | |||
93 | struct ceph_osd_client { | 116 | struct ceph_osd_client { |
94 | struct ceph_client *client; | 117 | struct ceph_client *client; |
95 | 118 | ||
@@ -104,7 +127,10 @@ struct ceph_osd_client { | |||
104 | u64 timeout_tid; /* tid of timeout triggering rq */ | 127 | u64 timeout_tid; /* tid of timeout triggering rq */ |
105 | u64 last_tid; /* tid of last request */ | 128 | u64 last_tid; /* tid of last request */ |
106 | struct rb_root requests; /* pending requests */ | 129 | struct rb_root requests; /* pending requests */ |
107 | struct list_head req_lru; /* pending requests lru */ | 130 | struct list_head req_lru; /* in-flight lru */ |
131 | struct list_head req_unsent; /* unsent/need-resend queue */ | ||
132 | struct list_head req_notarget; /* map to no osd */ | ||
133 | struct list_head req_linger; /* lingering requests */ | ||
108 | int num_requests; | 134 | int num_requests; |
109 | struct delayed_work timeout_work; | 135 | struct delayed_work timeout_work; |
110 | struct delayed_work osds_timeout_work; | 136 | struct delayed_work osds_timeout_work; |
@@ -116,6 +142,12 @@ struct ceph_osd_client { | |||
116 | 142 | ||
117 | struct ceph_msgpool msgpool_op; | 143 | struct ceph_msgpool msgpool_op; |
118 | struct ceph_msgpool msgpool_op_reply; | 144 | struct ceph_msgpool msgpool_op_reply; |
145 | |||
146 | spinlock_t event_lock; | ||
147 | struct rb_root event_tree; | ||
148 | u64 event_count; | ||
149 | |||
150 | struct workqueue_struct *notify_wq; | ||
119 | }; | 151 | }; |
120 | 152 | ||
121 | struct ceph_osd_req_op { | 153 | struct ceph_osd_req_op { |
@@ -150,6 +182,13 @@ struct ceph_osd_req_op { | |||
150 | struct { | 182 | struct { |
151 | u64 snapid; | 183 | u64 snapid; |
152 | } snap; | 184 | } snap; |
185 | struct { | ||
186 | u64 cookie; | ||
187 | u64 ver; | ||
188 | __u8 flag; | ||
189 | u32 prot_ver; | ||
190 | u32 timeout; | ||
191 | } watch; | ||
153 | }; | 192 | }; |
154 | u32 payload_len; | 193 | u32 payload_len; |
155 | }; | 194 | }; |
@@ -198,6 +237,11 @@ extern struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *, | |||
198 | bool use_mempool, int num_reply, | 237 | bool use_mempool, int num_reply, |
199 | int page_align); | 238 | int page_align); |
200 | 239 | ||
240 | extern void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc, | ||
241 | struct ceph_osd_request *req); | ||
242 | extern void ceph_osdc_unregister_linger_request(struct ceph_osd_client *osdc, | ||
243 | struct ceph_osd_request *req); | ||
244 | |||
201 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) | 245 | static inline void ceph_osdc_get_request(struct ceph_osd_request *req) |
202 | { | 246 | { |
203 | kref_get(&req->r_kref); | 247 | kref_get(&req->r_kref); |
@@ -233,5 +277,14 @@ extern int ceph_osdc_writepages(struct ceph_osd_client *osdc, | |||
233 | struct page **pages, int nr_pages, | 277 | struct page **pages, int nr_pages, |
234 | int flags, int do_sync, bool nofail); | 278 | int flags, int do_sync, bool nofail); |
235 | 279 | ||
280 | /* watch/notify events */ | ||
281 | extern int ceph_osdc_create_event(struct ceph_osd_client *osdc, | ||
282 | void (*event_cb)(u64, u64, u8, void *), | ||
283 | int one_shot, void *data, | ||
284 | struct ceph_osd_event **pevent); | ||
285 | extern void ceph_osdc_cancel_event(struct ceph_osd_event *event); | ||
286 | extern int ceph_osdc_wait_event(struct ceph_osd_event *event, | ||
287 | unsigned long timeout); | ||
288 | extern void ceph_osdc_put_event(struct ceph_osd_event *event); | ||
236 | #endif | 289 | #endif |
237 | 290 | ||
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h index 6d5247f2e81b..0a99099801a4 100644 --- a/include/linux/ceph/rados.h +++ b/include/linux/ceph/rados.h | |||
@@ -12,9 +12,9 @@ | |||
12 | * osdmap encoding versions | 12 | * osdmap encoding versions |
13 | */ | 13 | */ |
14 | #define CEPH_OSDMAP_INC_VERSION 5 | 14 | #define CEPH_OSDMAP_INC_VERSION 5 |
15 | #define CEPH_OSDMAP_INC_VERSION_EXT 5 | 15 | #define CEPH_OSDMAP_INC_VERSION_EXT 6 |
16 | #define CEPH_OSDMAP_VERSION 5 | 16 | #define CEPH_OSDMAP_VERSION 5 |
17 | #define CEPH_OSDMAP_VERSION_EXT 5 | 17 | #define CEPH_OSDMAP_VERSION_EXT 6 |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * fs id | 20 | * fs id |
@@ -181,9 +181,17 @@ enum { | |||
181 | /* read */ | 181 | /* read */ |
182 | CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1, | 182 | CEPH_OSD_OP_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 1, |
183 | CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2, | 183 | CEPH_OSD_OP_STAT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 2, |
184 | CEPH_OSD_OP_MAPEXT = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 3, | ||
184 | 185 | ||
185 | /* fancy read */ | 186 | /* fancy read */ |
186 | CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4, | 187 | CEPH_OSD_OP_MASKTRUNC = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 4, |
188 | CEPH_OSD_OP_SPARSE_READ = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 5, | ||
189 | |||
190 | CEPH_OSD_OP_NOTIFY = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 6, | ||
191 | CEPH_OSD_OP_NOTIFY_ACK = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 7, | ||
192 | |||
193 | /* versioning */ | ||
194 | CEPH_OSD_OP_ASSERT_VER = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 8, | ||
187 | 195 | ||
188 | /* write */ | 196 | /* write */ |
189 | CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1, | 197 | CEPH_OSD_OP_WRITE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 1, |
@@ -205,6 +213,8 @@ enum { | |||
205 | CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, | 213 | CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, |
206 | CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14, | 214 | CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14, |
207 | 215 | ||
216 | CEPH_OSD_OP_WATCH = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 15, | ||
217 | |||
208 | /** attrs **/ | 218 | /** attrs **/ |
209 | /* read */ | 219 | /* read */ |
210 | CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1, | 220 | CEPH_OSD_OP_GETXATTR = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_ATTR | 1, |
@@ -218,11 +228,14 @@ enum { | |||
218 | CEPH_OSD_OP_RMXATTR = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 4, | 228 | CEPH_OSD_OP_RMXATTR = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_ATTR | 4, |
219 | 229 | ||
220 | /** subop **/ | 230 | /** subop **/ |
221 | CEPH_OSD_OP_PULL = CEPH_OSD_OP_MODE_SUB | 1, | 231 | CEPH_OSD_OP_PULL = CEPH_OSD_OP_MODE_SUB | 1, |
222 | CEPH_OSD_OP_PUSH = CEPH_OSD_OP_MODE_SUB | 2, | 232 | CEPH_OSD_OP_PUSH = CEPH_OSD_OP_MODE_SUB | 2, |
223 | CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3, | 233 | CEPH_OSD_OP_BALANCEREADS = CEPH_OSD_OP_MODE_SUB | 3, |
224 | CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4, | 234 | CEPH_OSD_OP_UNBALANCEREADS = CEPH_OSD_OP_MODE_SUB | 4, |
225 | CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5, | 235 | CEPH_OSD_OP_SCRUB = CEPH_OSD_OP_MODE_SUB | 5, |
236 | CEPH_OSD_OP_SCRUB_RESERVE = CEPH_OSD_OP_MODE_SUB | 6, | ||
237 | CEPH_OSD_OP_SCRUB_UNRESERVE = CEPH_OSD_OP_MODE_SUB | 7, | ||
238 | CEPH_OSD_OP_SCRUB_STOP = CEPH_OSD_OP_MODE_SUB | 8, | ||
226 | 239 | ||
227 | /** lock **/ | 240 | /** lock **/ |
228 | CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1, | 241 | CEPH_OSD_OP_WRLOCK = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_LOCK | 1, |
@@ -328,6 +341,8 @@ enum { | |||
328 | CEPH_OSD_CMPXATTR_MODE_U64 = 2 | 341 | CEPH_OSD_CMPXATTR_MODE_U64 = 2 |
329 | }; | 342 | }; |
330 | 343 | ||
344 | #define RADOS_NOTIFY_VER 1 | ||
345 | |||
331 | /* | 346 | /* |
332 | * an individual object operation. each may be accompanied by some data | 347 | * an individual object operation. each may be accompanied by some data |
333 | * payload | 348 | * payload |
@@ -359,7 +374,12 @@ struct ceph_osd_op { | |||
359 | struct { | 374 | struct { |
360 | __le64 snapid; | 375 | __le64 snapid; |
361 | } __attribute__ ((packed)) snap; | 376 | } __attribute__ ((packed)) snap; |
362 | }; | 377 | struct { |
378 | __le64 cookie; | ||
379 | __le64 ver; | ||
380 | __u8 flag; /* 0 = unwatch, 1 = watch */ | ||
381 | } __attribute__ ((packed)) watch; | ||
382 | }; | ||
363 | __le32 payload_len; | 383 | __le32 payload_len; |
364 | } __attribute__ ((packed)); | 384 | } __attribute__ ((packed)); |
365 | 385 | ||
@@ -402,4 +422,5 @@ struct ceph_osd_reply_head { | |||
402 | } __attribute__ ((packed)); | 422 | } __attribute__ ((packed)); |
403 | 423 | ||
404 | 424 | ||
425 | |||
405 | #endif | 426 | #endif |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h index 6f9f19d66591..b454dfce60d9 100644 --- a/include/linux/cfag12864b.h +++ b/include/linux/cfag12864b.h | |||
@@ -44,7 +44,7 @@ extern unsigned char * cfag12864b_buffer; | |||
44 | /* | 44 | /* |
45 | * Get the refresh rate of the LCD | 45 | * Get the refresh rate of the LCD |
46 | * | 46 | * |
47 | * Returns the refresh rate (hertzs). | 47 | * Returns the refresh rate (hertz). |
48 | */ | 48 | */ |
49 | extern unsigned int cfag12864b_getrate(void); | 49 | extern unsigned int cfag12864b_getrate(void); |
50 | 50 | ||
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index e654fa239916..5ac7ebc36dbb 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -240,7 +240,7 @@ struct cgroup { | |||
240 | /* For RCU-protected deletion */ | 240 | /* For RCU-protected deletion */ |
241 | struct rcu_head rcu_head; | 241 | struct rcu_head rcu_head; |
242 | 242 | ||
243 | /* List of events which userspace want to recieve */ | 243 | /* List of events which userspace want to receive */ |
244 | struct list_head event_list; | 244 | struct list_head event_list; |
245 | spinlock_t event_list_lock; | 245 | spinlock_t event_list_lock; |
246 | }; | 246 | }; |
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h index 72bfefdbd767..3c4aac406175 100644 --- a/include/linux/cm4000_cs.h +++ b/include/linux/cm4000_cs.h | |||
@@ -20,7 +20,7 @@ typedef struct atreq { | |||
20 | } atreq_t; | 20 | } atreq_t; |
21 | 21 | ||
22 | 22 | ||
23 | /* what is particularly stupid in the original driver is the arch-dependant | 23 | /* what is particularly stupid in the original driver is the arch-dependent |
24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace | 24 | * member sizes. This leads to CONFIG_COMPAT breakage, since 32bit userspace |
25 | * will lay out the structure members differently than the 64bit kernel. | 25 | * will lay out the structure members differently than the 64bit kernel. |
26 | * | 26 | * |
diff --git a/include/linux/compaction.h b/include/linux/compaction.h index dfa2ed4c0d26..cc9f7a428649 100644 --- a/include/linux/compaction.h +++ b/include/linux/compaction.h | |||
@@ -11,9 +11,6 @@ | |||
11 | /* The full zone was compacted */ | 11 | /* The full zone was compacted */ |
12 | #define COMPACT_COMPLETE 3 | 12 | #define COMPACT_COMPLETE 3 |
13 | 13 | ||
14 | #define COMPACT_MODE_DIRECT_RECLAIM 0 | ||
15 | #define COMPACT_MODE_KSWAPD 1 | ||
16 | |||
17 | #ifdef CONFIG_COMPACTION | 14 | #ifdef CONFIG_COMPACTION |
18 | extern int sysctl_compact_memory; | 15 | extern int sysctl_compact_memory; |
19 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, | 16 | extern int sysctl_compaction_handler(struct ctl_table *table, int write, |
@@ -28,8 +25,7 @@ extern unsigned long try_to_compact_pages(struct zonelist *zonelist, | |||
28 | bool sync); | 25 | bool sync); |
29 | extern unsigned long compaction_suitable(struct zone *zone, int order); | 26 | extern unsigned long compaction_suitable(struct zone *zone, int order); |
30 | extern unsigned long compact_zone_order(struct zone *zone, int order, | 27 | extern unsigned long compact_zone_order(struct zone *zone, int order, |
31 | gfp_t gfp_mask, bool sync, | 28 | gfp_t gfp_mask, bool sync); |
32 | int compact_mode); | ||
33 | 29 | ||
34 | /* Do not skip compaction more than 64 times */ | 30 | /* Do not skip compaction more than 64 times */ |
35 | #define COMPACT_MAX_DEFER_SHIFT 6 | 31 | #define COMPACT_MAX_DEFER_SHIFT 6 |
@@ -74,8 +70,7 @@ static inline unsigned long compaction_suitable(struct zone *zone, int order) | |||
74 | } | 70 | } |
75 | 71 | ||
76 | static inline unsigned long compact_zone_order(struct zone *zone, int order, | 72 | static inline unsigned long compact_zone_order(struct zone *zone, int order, |
77 | gfp_t gfp_mask, bool sync, | 73 | gfp_t gfp_mask, bool sync) |
78 | int compact_mode) | ||
79 | { | 74 | { |
80 | return COMPACT_CONTINUE; | 75 | return COMPACT_CONTINUE; |
81 | } | 76 | } |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 16508bcddacc..cb4c1eb7778e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -92,3 +92,11 @@ | |||
92 | #if !defined(__noclone) | 92 | #if !defined(__noclone) |
93 | #define __noclone /* not needed */ | 93 | #define __noclone /* not needed */ |
94 | #endif | 94 | #endif |
95 | |||
96 | /* | ||
97 | * A trick to suppress uninitialized variable warning without generating any | ||
98 | * code | ||
99 | */ | ||
100 | #define uninitialized_var(x) x = x | ||
101 | |||
102 | #define __always_inline inline __attribute__((always_inline)) | ||
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index b721129e0469..37d412436d0f 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -21,11 +21,3 @@ | |||
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | 21 | # error "GCOV profiling support for gcc versions below 3.4 not included" |
22 | # endif /* __GNUC_MINOR__ */ | 22 | # endif /* __GNUC_MINOR__ */ |
23 | #endif /* CONFIG_GCOV_KERNEL */ | 23 | #endif /* CONFIG_GCOV_KERNEL */ |
24 | |||
25 | /* | ||
26 | * A trick to suppress uninitialized variable warning without generating any | ||
27 | * code | ||
28 | */ | ||
29 | #define uninitialized_var(x) x = x | ||
30 | |||
31 | #define __always_inline inline __attribute__((always_inline)) | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index fcfa5b9a4317..64b7c003fd7a 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -12,13 +12,6 @@ | |||
12 | #define __used __attribute__((__used__)) | 12 | #define __used __attribute__((__used__)) |
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | #define __always_inline inline __attribute__((always_inline)) | ||
16 | |||
17 | /* | ||
18 | * A trick to suppress uninitialized variable warning without generating any | ||
19 | * code | ||
20 | */ | ||
21 | #define uninitialized_var(x) x = x | ||
22 | 15 | ||
23 | #if __GNUC_MINOR__ >= 3 | 16 | #if __GNUC_MINOR__ >= 3 |
24 | /* Mark functions as cold. gcc will assume any path leading to a call | 17 | /* Mark functions as cold. gcc will assume any path leading to a call |
@@ -53,7 +46,6 @@ | |||
53 | #define __noclone __attribute__((__noclone__)) | 46 | #define __noclone __attribute__((__noclone__)) |
54 | 47 | ||
55 | #endif | 48 | #endif |
56 | |||
57 | #endif | 49 | #endif |
58 | 50 | ||
59 | #if __GNUC_MINOR__ > 0 | 51 | #if __GNUC_MINOR__ > 0 |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index ddb7a97c78c2..645778ad899b 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -218,7 +218,7 @@ static ssize_t _item##_attr_store(struct config_item *item, \ | |||
218 | * group children. default_groups may coexist alongsize make_group() or | 218 | * group children. default_groups may coexist alongsize make_group() or |
219 | * make_item(), but if the group wishes to have only default_groups | 219 | * make_item(), but if the group wishes to have only default_groups |
220 | * children (disallowing mkdir(2)), it need not provide either function. | 220 | * children (disallowing mkdir(2)), it need not provide either function. |
221 | * If the group has commit(), it supports pending and commited (active) | 221 | * If the group has commit(), it supports pending and committed (active) |
222 | * items. | 222 | * items. |
223 | */ | 223 | */ |
224 | struct configfs_item_operations { | 224 | struct configfs_item_operations { |
diff --git a/include/linux/connector.h b/include/linux/connector.h index bcafc942e5e4..7c60d0942adb 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -88,8 +88,6 @@ struct cn_queue_dev { | |||
88 | atomic_t refcnt; | 88 | atomic_t refcnt; |
89 | unsigned char name[CN_CBQ_NAMELEN]; | 89 | unsigned char name[CN_CBQ_NAMELEN]; |
90 | 90 | ||
91 | struct workqueue_struct *cn_queue; | ||
92 | |||
93 | struct list_head queue_list; | 91 | struct list_head queue_list; |
94 | spinlock_t queue_lock; | 92 | spinlock_t queue_lock; |
95 | 93 | ||
@@ -101,20 +99,13 @@ struct cn_callback_id { | |||
101 | struct cb_id id; | 99 | struct cb_id id; |
102 | }; | 100 | }; |
103 | 101 | ||
104 | struct cn_callback_data { | ||
105 | struct sk_buff *skb; | ||
106 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); | ||
107 | |||
108 | void *free; | ||
109 | }; | ||
110 | |||
111 | struct cn_callback_entry { | 102 | struct cn_callback_entry { |
112 | struct list_head callback_entry; | 103 | struct list_head callback_entry; |
113 | struct work_struct work; | 104 | atomic_t refcnt; |
114 | struct cn_queue_dev *pdev; | 105 | struct cn_queue_dev *pdev; |
115 | 106 | ||
116 | struct cn_callback_id id; | 107 | struct cn_callback_id id; |
117 | struct cn_callback_data data; | 108 | void (*callback) (struct cn_msg *, struct netlink_skb_parms *); |
118 | 109 | ||
119 | u32 seq, group; | 110 | u32 seq, group; |
120 | }; | 111 | }; |
@@ -138,13 +129,12 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name, | |||
138 | struct cb_id *id, | 129 | struct cb_id *id, |
139 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); | 130 | void (*callback)(struct cn_msg *, struct netlink_skb_parms *)); |
140 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 131 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
132 | void cn_queue_release_callback(struct cn_callback_entry *); | ||
141 | 133 | ||
142 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *); | 134 | struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *); |
143 | void cn_queue_free_dev(struct cn_queue_dev *dev); | 135 | void cn_queue_free_dev(struct cn_queue_dev *dev); |
144 | 136 | ||
145 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 137 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
146 | 138 | ||
147 | void cn_queue_wrapper(struct work_struct *work); | ||
148 | |||
149 | #endif /* __KERNEL__ */ | 139 | #endif /* __KERNEL__ */ |
150 | #endif /* __CONNECTOR_H */ | 140 | #endif /* __CONNECTOR_H */ |
diff --git a/include/linux/cper.h b/include/linux/cper.h index 3104aaff5dd0..c23049496531 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h | |||
@@ -310,7 +310,7 @@ struct cper_sec_proc_ia { | |||
310 | __u8 cpuid[48]; | 310 | __u8 cpuid[48]; |
311 | }; | 311 | }; |
312 | 312 | ||
313 | /* IA32/X64 Processor Error Infomation Structure */ | 313 | /* IA32/X64 Processor Error Information Structure */ |
314 | struct cper_ia_err_info { | 314 | struct cper_ia_err_info { |
315 | uuid_le err_type; | 315 | uuid_le err_type; |
316 | __u64 validation_bits; | 316 | __u64 validation_bits; |
@@ -388,5 +388,7 @@ struct cper_sec_pcie { | |||
388 | #pragma pack() | 388 | #pragma pack() |
389 | 389 | ||
390 | u64 cper_next_record_id(void); | 390 | u64 cper_next_record_id(void); |
391 | void cper_print_bits(const char *prefix, unsigned int bits, | ||
392 | const char *strs[], unsigned int strs_size); | ||
391 | 393 | ||
392 | #endif | 394 | #endif |
diff --git a/include/linux/crc32.h b/include/linux/crc32.h index e20dd1f9b40a..391a259b2cc9 100644 --- a/include/linux/crc32.h +++ b/include/linux/crc32.h | |||
@@ -11,7 +11,7 @@ | |||
11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); | 11 | extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len); |
12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); | 12 | extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len); |
13 | 13 | ||
14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)data, length) | 14 | #define crc32(seed, data, length) crc32_le(seed, (unsigned char const *)(data), length) |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Helpers for hash table generation of ethernet nics: | 17 | * Helpers for hash table generation of ethernet nics: |
diff --git a/include/linux/cred.h b/include/linux/cred.h index 4aaeab376446..9aeeb0ba2003 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -354,9 +354,11 @@ static inline void put_cred(const struct cred *_cred) | |||
354 | #define current_fsgid() (current_cred_xxx(fsgid)) | 354 | #define current_fsgid() (current_cred_xxx(fsgid)) |
355 | #define current_cap() (current_cred_xxx(cap_effective)) | 355 | #define current_cap() (current_cred_xxx(cap_effective)) |
356 | #define current_user() (current_cred_xxx(user)) | 356 | #define current_user() (current_cred_xxx(user)) |
357 | #define current_user_ns() (current_cred_xxx(user)->user_ns) | 357 | #define _current_user_ns() (current_cred_xxx(user)->user_ns) |
358 | #define current_security() (current_cred_xxx(security)) | 358 | #define current_security() (current_cred_xxx(security)) |
359 | 359 | ||
360 | extern struct user_namespace *current_user_ns(void); | ||
361 | |||
360 | #define current_uid_gid(_uid, _gid) \ | 362 | #define current_uid_gid(_uid, _gid) \ |
361 | do { \ | 363 | do { \ |
362 | const struct cred *__cred; \ | 364 | const struct cred *__cred; \ |
diff --git a/include/linux/davinci_emac.h b/include/linux/davinci_emac.h index 5dd428532f79..542888504994 100644 --- a/include/linux/davinci_emac.h +++ b/include/linux/davinci_emac.h | |||
@@ -36,6 +36,7 @@ struct emac_platform_data { | |||
36 | 36 | ||
37 | u8 rmii_en; | 37 | u8 rmii_en; |
38 | u8 version; | 38 | u8 version; |
39 | bool no_bd_ram; | ||
39 | void (*interrupt_enable) (void); | 40 | void (*interrupt_enable) (void); |
40 | void (*interrupt_disable) (void); | 41 | void (*interrupt_disable) (void); |
41 | }; | 42 | }; |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 1a87760d6532..19d90a55541d 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -197,7 +197,7 @@ struct dentry_operations { | |||
197 | * typically using d_splice_alias. */ | 197 | * typically using d_splice_alias. */ |
198 | 198 | ||
199 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ | 199 | #define DCACHE_REFERENCED 0x0008 /* Recently used, don't discard. */ |
200 | #define DCACHE_UNHASHED 0x0010 | 200 | #define DCACHE_RCUACCESS 0x0010 /* Entry has ever been RCU-visible */ |
201 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 | 201 | #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 |
202 | /* Parent inode is watched by inotify */ | 202 | /* Parent inode is watched by inotify */ |
203 | 203 | ||
@@ -384,7 +384,7 @@ extern struct dentry *dget_parent(struct dentry *dentry); | |||
384 | 384 | ||
385 | static inline int d_unhashed(struct dentry *dentry) | 385 | static inline int d_unhashed(struct dentry *dentry) |
386 | { | 386 | { |
387 | return (dentry->d_flags & DCACHE_UNHASHED); | 387 | return hlist_bl_unhashed(&dentry->d_hash); |
388 | } | 388 | } |
389 | 389 | ||
390 | static inline int d_unlinked(struct dentry *dentry) | 390 | static inline int d_unlinked(struct dentry *dentry) |
@@ -416,7 +416,6 @@ static inline bool d_mountpoint(struct dentry *dentry) | |||
416 | return dentry->d_flags & DCACHE_MOUNTED; | 416 | return dentry->d_flags & DCACHE_MOUNTED; |
417 | } | 417 | } |
418 | 418 | ||
419 | extern struct vfsmount *lookup_mnt(struct path *); | ||
420 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); | 419 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); |
421 | 420 | ||
422 | extern int sysctl_vfs_cache_pressure; | 421 | extern int sysctl_vfs_cache_pressure; |
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 4cb72b920c74..7925bf0ee836 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Some architectures want to ensure there is no local data in their | 18 | * Some architectures want to ensure there is no local data in their |
19 | * pre-boot environment, so that data can arbitarily relocated (via | 19 | * pre-boot environment, so that data can arbitrarily relocated (via |
20 | * GOT references). This is achieved by defining STATIC_RW_DATA to | 20 | * GOT references). This is achieved by defining STATIC_RW_DATA to |
21 | * be null. | 21 | * be null. |
22 | */ | 22 | */ |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 272496d1fae4..32a4423710f5 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -197,7 +197,6 @@ struct dm_target { | |||
197 | struct dm_target_callbacks { | 197 | struct dm_target_callbacks { |
198 | struct list_head list; | 198 | struct list_head list; |
199 | int (*congested_fn) (struct dm_target_callbacks *, int); | 199 | int (*congested_fn) (struct dm_target_callbacks *, int); |
200 | void (*unplug_fn)(struct dm_target_callbacks *); | ||
201 | }; | 200 | }; |
202 | 201 | ||
203 | int dm_register_target(struct target_type *t); | 202 | int dm_register_target(struct target_type *t); |
@@ -286,11 +285,6 @@ void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callback | |||
286 | int dm_table_complete(struct dm_table *t); | 285 | int dm_table_complete(struct dm_table *t); |
287 | 286 | ||
288 | /* | 287 | /* |
289 | * Unplug all devices in a table. | ||
290 | */ | ||
291 | void dm_table_unplug_all(struct dm_table *t); | ||
292 | |||
293 | /* | ||
294 | * Table reference counting. | 288 | * Table reference counting. |
295 | */ | 289 | */ |
296 | struct dm_table *dm_get_live_table(struct mapped_device *md); | 290 | struct dm_table *dm_get_live_table(struct mapped_device *md); |
diff --git a/include/linux/device.h b/include/linux/device.h index 144ec135875f..ab8dfc095709 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -633,8 +633,12 @@ static inline int devtmpfs_mount(const char *mountpoint) { return 0; } | |||
633 | /* drivers/base/power/shutdown.c */ | 633 | /* drivers/base/power/shutdown.c */ |
634 | extern void device_shutdown(void); | 634 | extern void device_shutdown(void); |
635 | 635 | ||
636 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
636 | /* drivers/base/sys.c */ | 637 | /* drivers/base/sys.c */ |
637 | extern void sysdev_shutdown(void); | 638 | extern void sysdev_shutdown(void); |
639 | #else | ||
640 | static inline void sysdev_shutdown(void) { } | ||
641 | #endif | ||
638 | 642 | ||
639 | /* debugging and troubleshooting/diagnostic helpers. */ | 643 | /* debugging and troubleshooting/diagnostic helpers. */ |
640 | extern const char *dev_driver_string(const struct device *dev); | 644 | extern const char *dev_driver_string(const struct device *dev); |
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 78bbf47bbb96..3708455ee6c3 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -267,9 +267,9 @@ enum { | |||
267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 267 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
268 | 268 | ||
269 | #define DM_VERSION_MAJOR 4 | 269 | #define DM_VERSION_MAJOR 4 |
270 | #define DM_VERSION_MINOR 19 | 270 | #define DM_VERSION_MINOR 20 |
271 | #define DM_VERSION_PATCHLEVEL 1 | 271 | #define DM_VERSION_PATCHLEVEL 0 |
272 | #define DM_VERSION_EXTRA "-ioctl (2011-01-07)" | 272 | #define DM_VERSION_EXTRA "-ioctl (2011-02-02)" |
273 | 273 | ||
274 | /* Status bits */ | 274 | /* Status bits */ |
275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 275 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
@@ -328,4 +328,10 @@ enum { | |||
328 | */ | 328 | */ |
329 | #define DM_UUID_FLAG (1 << 14) /* In */ | 329 | #define DM_UUID_FLAG (1 << 14) /* In */ |
330 | 330 | ||
331 | /* | ||
332 | * If set, all buffers are wiped after use. Use when sending | ||
333 | * or requesting sensitive data such as an encryption key. | ||
334 | */ | ||
335 | #define DM_SECURE_DATA_FLAG (1 << 15) /* In */ | ||
336 | |||
331 | #endif /* _LINUX_DM_IOCTL_H */ | 337 | #endif /* _LINUX_DM_IOCTL_H */ |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 9bebd7f16ef1..eee7addec282 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -434,7 +434,7 @@ struct dma_tx_state { | |||
434 | * zero or error code | 434 | * zero or error code |
435 | * @device_tx_status: poll for transaction completion, the optional | 435 | * @device_tx_status: poll for transaction completion, the optional |
436 | * txstate parameter can be supplied with a pointer to get a | 436 | * txstate parameter can be supplied with a pointer to get a |
437 | * struct with auxilary transfer status information, otherwise the call | 437 | * struct with auxiliary transfer status information, otherwise the call |
438 | * will just return a simple status code | 438 | * will just return a simple status code |
439 | * @device_issue_pending: push pending transactions to hardware | 439 | * @device_issue_pending: push pending transactions to hardware |
440 | */ | 440 | */ |
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index ef44c7a0638c..cec467f5d676 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <sys/wait.h> | 36 | #include <sys/wait.h> |
37 | #include <limits.h> | 37 | #include <limits.h> |
38 | 38 | ||
39 | /* Altough the Linux source code makes a difference between | 39 | /* Although the Linux source code makes a difference between |
40 | generic endianness and the bitfields' endianness, there is no | 40 | generic endianness and the bitfields' endianness, there is no |
41 | architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness | 41 | architecture as of Linux-2.6.24-rc4 where the bitfileds' endianness |
42 | does not match the generic endianness. */ | 42 | does not match the generic endianness. */ |
@@ -53,10 +53,10 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.9" | 56 | #define REL_VERSION "8.3.10" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 95 | 59 | #define PRO_VERSION_MAX 96 |
60 | 60 | ||
61 | 61 | ||
62 | enum drbd_io_error_p { | 62 | enum drbd_io_error_p { |
@@ -96,8 +96,14 @@ enum drbd_on_no_data { | |||
96 | OND_SUSPEND_IO | 96 | OND_SUSPEND_IO |
97 | }; | 97 | }; |
98 | 98 | ||
99 | enum drbd_on_congestion { | ||
100 | OC_BLOCK, | ||
101 | OC_PULL_AHEAD, | ||
102 | OC_DISCONNECT, | ||
103 | }; | ||
104 | |||
99 | /* KEEP the order, do not delete or insert. Only append. */ | 105 | /* KEEP the order, do not delete or insert. Only append. */ |
100 | enum drbd_ret_codes { | 106 | enum drbd_ret_code { |
101 | ERR_CODE_BASE = 100, | 107 | ERR_CODE_BASE = 100, |
102 | NO_ERROR = 101, | 108 | NO_ERROR = 101, |
103 | ERR_LOCAL_ADDR = 102, | 109 | ERR_LOCAL_ADDR = 102, |
@@ -146,6 +152,9 @@ enum drbd_ret_codes { | |||
146 | ERR_PERM = 152, | 152 | ERR_PERM = 152, |
147 | ERR_NEED_APV_93 = 153, | 153 | ERR_NEED_APV_93 = 153, |
148 | ERR_STONITH_AND_PROT_A = 154, | 154 | ERR_STONITH_AND_PROT_A = 154, |
155 | ERR_CONG_NOT_PROTO_A = 155, | ||
156 | ERR_PIC_AFTER_DEP = 156, | ||
157 | ERR_PIC_PEER_DEP = 157, | ||
149 | 158 | ||
150 | /* insert new ones above this line */ | 159 | /* insert new ones above this line */ |
151 | AFTER_LAST_ERR_CODE | 160 | AFTER_LAST_ERR_CODE |
@@ -175,7 +184,7 @@ enum drbd_conns { | |||
175 | /* These temporal states are all used on the way | 184 | /* These temporal states are all used on the way |
176 | * from >= C_CONNECTED to Unconnected. | 185 | * from >= C_CONNECTED to Unconnected. |
177 | * The 'disconnect reason' states | 186 | * The 'disconnect reason' states |
178 | * I do not allow to change beween them. */ | 187 | * I do not allow to change between them. */ |
179 | C_TIMEOUT, | 188 | C_TIMEOUT, |
180 | C_BROKEN_PIPE, | 189 | C_BROKEN_PIPE, |
181 | C_NETWORK_FAILURE, | 190 | C_NETWORK_FAILURE, |
@@ -199,6 +208,10 @@ enum drbd_conns { | |||
199 | C_VERIFY_T, | 208 | C_VERIFY_T, |
200 | C_PAUSED_SYNC_S, | 209 | C_PAUSED_SYNC_S, |
201 | C_PAUSED_SYNC_T, | 210 | C_PAUSED_SYNC_T, |
211 | |||
212 | C_AHEAD, | ||
213 | C_BEHIND, | ||
214 | |||
202 | C_MASK = 31 | 215 | C_MASK = 31 |
203 | }; | 216 | }; |
204 | 217 | ||
@@ -259,7 +272,7 @@ union drbd_state { | |||
259 | unsigned int i; | 272 | unsigned int i; |
260 | }; | 273 | }; |
261 | 274 | ||
262 | enum drbd_state_ret_codes { | 275 | enum drbd_state_rv { |
263 | SS_CW_NO_NEED = 4, | 276 | SS_CW_NO_NEED = 4, |
264 | SS_CW_SUCCESS = 3, | 277 | SS_CW_SUCCESS = 3, |
265 | SS_NOTHING_TO_DO = 2, | 278 | SS_NOTHING_TO_DO = 2, |
@@ -290,7 +303,7 @@ enum drbd_state_ret_codes { | |||
290 | extern const char *drbd_conn_str(enum drbd_conns); | 303 | extern const char *drbd_conn_str(enum drbd_conns); |
291 | extern const char *drbd_role_str(enum drbd_role); | 304 | extern const char *drbd_role_str(enum drbd_role); |
292 | extern const char *drbd_disk_str(enum drbd_disk_state); | 305 | extern const char *drbd_disk_str(enum drbd_disk_state); |
293 | extern const char *drbd_set_st_err_str(enum drbd_state_ret_codes); | 306 | extern const char *drbd_set_st_err_str(enum drbd_state_rv); |
294 | 307 | ||
295 | #define SHARED_SECRET_MAX 64 | 308 | #define SHARED_SECRET_MAX 64 |
296 | 309 | ||
diff --git a/include/linux/drbd_limits.h b/include/linux/drbd_limits.h index 4ac33f34b77e..246f576c981d 100644 --- a/include/linux/drbd_limits.h +++ b/include/linux/drbd_limits.h | |||
@@ -16,7 +16,8 @@ | |||
16 | #define DEBUG_RANGE_CHECK 0 | 16 | #define DEBUG_RANGE_CHECK 0 |
17 | 17 | ||
18 | #define DRBD_MINOR_COUNT_MIN 1 | 18 | #define DRBD_MINOR_COUNT_MIN 1 |
19 | #define DRBD_MINOR_COUNT_MAX 255 | 19 | #define DRBD_MINOR_COUNT_MAX 256 |
20 | #define DRBD_MINOR_COUNT_DEF 32 | ||
20 | 21 | ||
21 | #define DRBD_DIALOG_REFRESH_MIN 0 | 22 | #define DRBD_DIALOG_REFRESH_MIN 0 |
22 | #define DRBD_DIALOG_REFRESH_MAX 600 | 23 | #define DRBD_DIALOG_REFRESH_MAX 600 |
@@ -42,7 +43,7 @@ | |||
42 | 43 | ||
43 | /* net { */ | 44 | /* net { */ |
44 | /* timeout, unit centi seconds | 45 | /* timeout, unit centi seconds |
45 | * more than one minute timeout is not usefull */ | 46 | * more than one minute timeout is not useful */ |
46 | #define DRBD_TIMEOUT_MIN 1 | 47 | #define DRBD_TIMEOUT_MIN 1 |
47 | #define DRBD_TIMEOUT_MAX 600 | 48 | #define DRBD_TIMEOUT_MAX 600 |
48 | #define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ | 49 | #define DRBD_TIMEOUT_DEF 60 /* 6 seconds */ |
@@ -67,7 +68,7 @@ | |||
67 | #define DRBD_MAX_EPOCH_SIZE_MAX 20000 | 68 | #define DRBD_MAX_EPOCH_SIZE_MAX 20000 |
68 | #define DRBD_MAX_EPOCH_SIZE_DEF 2048 | 69 | #define DRBD_MAX_EPOCH_SIZE_DEF 2048 |
69 | 70 | ||
70 | /* I don't think that a tcp send buffer of more than 10M is usefull */ | 71 | /* I don't think that a tcp send buffer of more than 10M is useful */ |
71 | #define DRBD_SNDBUF_SIZE_MIN 0 | 72 | #define DRBD_SNDBUF_SIZE_MIN 0 |
72 | #define DRBD_SNDBUF_SIZE_MAX (10<<20) | 73 | #define DRBD_SNDBUF_SIZE_MAX (10<<20) |
73 | #define DRBD_SNDBUF_SIZE_DEF 0 | 74 | #define DRBD_SNDBUF_SIZE_DEF 0 |
@@ -100,7 +101,7 @@ | |||
100 | #define DRBD_RATE_MAX (4 << 20) | 101 | #define DRBD_RATE_MAX (4 << 20) |
101 | #define DRBD_RATE_DEF 250 /* kb/second */ | 102 | #define DRBD_RATE_DEF 250 /* kb/second */ |
102 | 103 | ||
103 | /* less than 7 would hit performance unneccessarily. | 104 | /* less than 7 would hit performance unnecessarily. |
104 | * 3833 is the largest prime that still does fit | 105 | * 3833 is the largest prime that still does fit |
105 | * into 64 sectors of activity log */ | 106 | * into 64 sectors of activity log */ |
106 | #define DRBD_AL_EXTENTS_MIN 7 | 107 | #define DRBD_AL_EXTENTS_MIN 7 |
@@ -129,6 +130,7 @@ | |||
129 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT | 130 | #define DRBD_AFTER_SB_2P_DEF ASB_DISCONNECT |
130 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT | 131 | #define DRBD_RR_CONFLICT_DEF ASB_DISCONNECT |
131 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR | 132 | #define DRBD_ON_NO_DATA_DEF OND_IO_ERROR |
133 | #define DRBD_ON_CONGESTION_DEF OC_BLOCK | ||
132 | 134 | ||
133 | #define DRBD_MAX_BIO_BVECS_MIN 0 | 135 | #define DRBD_MAX_BIO_BVECS_MIN 0 |
134 | #define DRBD_MAX_BIO_BVECS_MAX 128 | 136 | #define DRBD_MAX_BIO_BVECS_MAX 128 |
@@ -154,5 +156,13 @@ | |||
154 | #define DRBD_C_MIN_RATE_MAX (4 << 20) | 156 | #define DRBD_C_MIN_RATE_MAX (4 << 20) |
155 | #define DRBD_C_MIN_RATE_DEF 4096 | 157 | #define DRBD_C_MIN_RATE_DEF 4096 |
156 | 158 | ||
159 | #define DRBD_CONG_FILL_MIN 0 | ||
160 | #define DRBD_CONG_FILL_MAX (10<<21) /* 10GByte in sectors */ | ||
161 | #define DRBD_CONG_FILL_DEF 0 | ||
162 | |||
163 | #define DRBD_CONG_EXTENTS_MIN DRBD_AL_EXTENTS_MIN | ||
164 | #define DRBD_CONG_EXTENTS_MAX DRBD_AL_EXTENTS_MAX | ||
165 | #define DRBD_CONG_EXTENTS_DEF DRBD_AL_EXTENTS_DEF | ||
166 | |||
157 | #undef RANGE | 167 | #undef RANGE |
158 | #endif | 168 | #endif |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index ade91107c9a5..ab6159e4fcf0 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -56,6 +56,9 @@ NL_PACKET(net_conf, 5, | |||
56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) | 56 | NL_INTEGER( 39, T_MAY_IGNORE, rr_conflict) |
57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) | 57 | NL_INTEGER( 40, T_MAY_IGNORE, ping_timeo) |
58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) | 58 | NL_INTEGER( 67, T_MAY_IGNORE, rcvbuf_size) |
59 | NL_INTEGER( 81, T_MAY_IGNORE, on_congestion) | ||
60 | NL_INTEGER( 82, T_MAY_IGNORE, cong_fill) | ||
61 | NL_INTEGER( 83, T_MAY_IGNORE, cong_extents) | ||
59 | /* 59 addr_family was available in GIT, never released */ | 62 | /* 59 addr_family was available in GIT, never released */ |
60 | NL_BIT( 60, T_MANDATORY, mind_af) | 63 | NL_BIT( 60, T_MANDATORY, mind_af) |
61 | NL_BIT( 27, T_MAY_IGNORE, want_lose) | 64 | NL_BIT( 27, T_MAY_IGNORE, want_lose) |
@@ -66,7 +69,9 @@ NL_PACKET(net_conf, 5, | |||
66 | NL_BIT( 70, T_MANDATORY, dry_run) | 69 | NL_BIT( 70, T_MANDATORY, dry_run) |
67 | ) | 70 | ) |
68 | 71 | ||
69 | NL_PACKET(disconnect, 6, ) | 72 | NL_PACKET(disconnect, 6, |
73 | NL_BIT( 84, T_MAY_IGNORE, force) | ||
74 | ) | ||
70 | 75 | ||
71 | NL_PACKET(resize, 7, | 76 | NL_PACKET(resize, 7, |
72 | NL_INT64( 29, T_MAY_IGNORE, resize_size) | 77 | NL_INT64( 29, T_MAY_IGNORE, resize_size) |
@@ -143,9 +148,13 @@ NL_PACKET(new_c_uuid, 26, | |||
143 | NL_BIT( 63, T_MANDATORY, clear_bm) | 148 | NL_BIT( 63, T_MANDATORY, clear_bm) |
144 | ) | 149 | ) |
145 | 150 | ||
151 | #ifdef NL_RESPONSE | ||
152 | NL_RESPONSE(return_code_only, 27) | ||
153 | #endif | ||
154 | |||
146 | #undef NL_PACKET | 155 | #undef NL_PACKET |
147 | #undef NL_INTEGER | 156 | #undef NL_INTEGER |
148 | #undef NL_INT64 | 157 | #undef NL_INT64 |
149 | #undef NL_BIT | 158 | #undef NL_BIT |
150 | #undef NL_STRING | 159 | #undef NL_STRING |
151 | 160 | #undef NL_RESPONSE | |
diff --git a/include/linux/drbd_tag_magic.h b/include/linux/drbd_tag_magic.h index fcdff8410e99..f14a165e82dc 100644 --- a/include/linux/drbd_tag_magic.h +++ b/include/linux/drbd_tag_magic.h | |||
@@ -7,6 +7,7 @@ | |||
7 | /* declare packet_type enums */ | 7 | /* declare packet_type enums */ |
8 | enum packet_types { | 8 | enum packet_types { |
9 | #define NL_PACKET(name, number, fields) P_ ## name = number, | 9 | #define NL_PACKET(name, number, fields) P_ ## name = number, |
10 | #define NL_RESPONSE(name, number) P_ ## name = number, | ||
10 | #define NL_INTEGER(pn, pr, member) | 11 | #define NL_INTEGER(pn, pr, member) |
11 | #define NL_INT64(pn, pr, member) | 12 | #define NL_INT64(pn, pr, member) |
12 | #define NL_BIT(pn, pr, member) | 13 | #define NL_BIT(pn, pr, member) |
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h index c8aad713a046..6998d9376ef9 100644 --- a/include/linux/dw_dmac.h +++ b/include/linux/dw_dmac.h | |||
@@ -16,9 +16,18 @@ | |||
16 | /** | 16 | /** |
17 | * struct dw_dma_platform_data - Controller configuration parameters | 17 | * struct dw_dma_platform_data - Controller configuration parameters |
18 | * @nr_channels: Number of channels supported by hardware (max 8) | 18 | * @nr_channels: Number of channels supported by hardware (max 8) |
19 | * @is_private: The device channels should be marked as private and not for | ||
20 | * by the general purpose DMA channel allocator. | ||
19 | */ | 21 | */ |
20 | struct dw_dma_platform_data { | 22 | struct dw_dma_platform_data { |
21 | unsigned int nr_channels; | 23 | unsigned int nr_channels; |
24 | bool is_private; | ||
25 | #define CHAN_ALLOCATION_ASCENDING 0 /* zero to seven */ | ||
26 | #define CHAN_ALLOCATION_DESCENDING 1 /* seven to zero */ | ||
27 | unsigned char chan_allocation_order; | ||
28 | #define CHAN_PRIORITY_ASCENDING 0 /* chan0 highest */ | ||
29 | #define CHAN_PRIORITY_DESCENDING 1 /* chan7 highest */ | ||
30 | unsigned char chan_priority; | ||
22 | }; | 31 | }; |
23 | 32 | ||
24 | /** | 33 | /** |
@@ -33,6 +42,30 @@ enum dw_dma_slave_width { | |||
33 | DW_DMA_SLAVE_WIDTH_32BIT, | 42 | DW_DMA_SLAVE_WIDTH_32BIT, |
34 | }; | 43 | }; |
35 | 44 | ||
45 | /* bursts size */ | ||
46 | enum dw_dma_msize { | ||
47 | DW_DMA_MSIZE_1, | ||
48 | DW_DMA_MSIZE_4, | ||
49 | DW_DMA_MSIZE_8, | ||
50 | DW_DMA_MSIZE_16, | ||
51 | DW_DMA_MSIZE_32, | ||
52 | DW_DMA_MSIZE_64, | ||
53 | DW_DMA_MSIZE_128, | ||
54 | DW_DMA_MSIZE_256, | ||
55 | }; | ||
56 | |||
57 | /* flow controller */ | ||
58 | enum dw_dma_fc { | ||
59 | DW_DMA_FC_D_M2M, | ||
60 | DW_DMA_FC_D_M2P, | ||
61 | DW_DMA_FC_D_P2M, | ||
62 | DW_DMA_FC_D_P2P, | ||
63 | DW_DMA_FC_P_P2M, | ||
64 | DW_DMA_FC_SP_P2P, | ||
65 | DW_DMA_FC_P_M2P, | ||
66 | DW_DMA_FC_DP_P2P, | ||
67 | }; | ||
68 | |||
36 | /** | 69 | /** |
37 | * struct dw_dma_slave - Controller-specific information about a slave | 70 | * struct dw_dma_slave - Controller-specific information about a slave |
38 | * | 71 | * |
@@ -44,6 +77,11 @@ enum dw_dma_slave_width { | |||
44 | * @reg_width: peripheral register width | 77 | * @reg_width: peripheral register width |
45 | * @cfg_hi: Platform-specific initializer for the CFG_HI register | 78 | * @cfg_hi: Platform-specific initializer for the CFG_HI register |
46 | * @cfg_lo: Platform-specific initializer for the CFG_LO register | 79 | * @cfg_lo: Platform-specific initializer for the CFG_LO register |
80 | * @src_master: src master for transfers on allocated channel. | ||
81 | * @dst_master: dest master for transfers on allocated channel. | ||
82 | * @src_msize: src burst size. | ||
83 | * @dst_msize: dest burst size. | ||
84 | * @fc: flow controller for DMA transfer | ||
47 | */ | 85 | */ |
48 | struct dw_dma_slave { | 86 | struct dw_dma_slave { |
49 | struct device *dma_dev; | 87 | struct device *dma_dev; |
@@ -52,6 +90,11 @@ struct dw_dma_slave { | |||
52 | enum dw_dma_slave_width reg_width; | 90 | enum dw_dma_slave_width reg_width; |
53 | u32 cfg_hi; | 91 | u32 cfg_hi; |
54 | u32 cfg_lo; | 92 | u32 cfg_lo; |
93 | u8 src_master; | ||
94 | u8 dst_master; | ||
95 | u8 src_msize; | ||
96 | u8 dst_msize; | ||
97 | u8 fc; | ||
55 | }; | 98 | }; |
56 | 99 | ||
57 | /* Platform-configurable bits in CFG_HI */ | 100 | /* Platform-configurable bits in CFG_HI */ |
@@ -62,7 +105,6 @@ struct dw_dma_slave { | |||
62 | #define DWC_CFGH_DST_PER(x) ((x) << 11) | 105 | #define DWC_CFGH_DST_PER(x) ((x) << 11) |
63 | 106 | ||
64 | /* Platform-configurable bits in CFG_LO */ | 107 | /* Platform-configurable bits in CFG_LO */ |
65 | #define DWC_CFGL_PRIO(x) ((x) << 5) /* priority */ | ||
66 | #define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */ | 108 | #define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */ |
67 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) | 109 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) |
68 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) | 110 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 4d857973d2c9..21a8ebf2dc3a 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -20,7 +20,6 @@ typedef void (elevator_bio_merged_fn) (struct request_queue *, | |||
20 | typedef int (elevator_dispatch_fn) (struct request_queue *, int); | 20 | typedef int (elevator_dispatch_fn) (struct request_queue *, int); |
21 | 21 | ||
22 | typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); | 22 | typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); |
23 | typedef int (elevator_queue_empty_fn) (struct request_queue *); | ||
24 | typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *); | 23 | typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *); |
25 | typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); | 24 | typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); |
26 | typedef int (elevator_may_queue_fn) (struct request_queue *, int); | 25 | typedef int (elevator_may_queue_fn) (struct request_queue *, int); |
@@ -46,7 +45,6 @@ struct elevator_ops | |||
46 | elevator_activate_req_fn *elevator_activate_req_fn; | 45 | elevator_activate_req_fn *elevator_activate_req_fn; |
47 | elevator_deactivate_req_fn *elevator_deactivate_req_fn; | 46 | elevator_deactivate_req_fn *elevator_deactivate_req_fn; |
48 | 47 | ||
49 | elevator_queue_empty_fn *elevator_queue_empty_fn; | ||
50 | elevator_completed_req_fn *elevator_completed_req_fn; | 48 | elevator_completed_req_fn *elevator_completed_req_fn; |
51 | 49 | ||
52 | elevator_request_list_fn *elevator_former_req_fn; | 50 | elevator_request_list_fn *elevator_former_req_fn; |
@@ -101,17 +99,16 @@ struct elevator_queue | |||
101 | */ | 99 | */ |
102 | extern void elv_dispatch_sort(struct request_queue *, struct request *); | 100 | extern void elv_dispatch_sort(struct request_queue *, struct request *); |
103 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); | 101 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); |
104 | extern void elv_add_request(struct request_queue *, struct request *, int, int); | 102 | extern void elv_add_request(struct request_queue *, struct request *, int); |
105 | extern void __elv_add_request(struct request_queue *, struct request *, int, int); | 103 | extern void __elv_add_request(struct request_queue *, struct request *, int); |
106 | extern void elv_insert(struct request_queue *, struct request *, int); | ||
107 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); | 104 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); |
105 | extern int elv_try_merge(struct request *, struct bio *); | ||
108 | extern void elv_merge_requests(struct request_queue *, struct request *, | 106 | extern void elv_merge_requests(struct request_queue *, struct request *, |
109 | struct request *); | 107 | struct request *); |
110 | extern void elv_merged_request(struct request_queue *, struct request *, int); | 108 | extern void elv_merged_request(struct request_queue *, struct request *, int); |
111 | extern void elv_bio_merged(struct request_queue *q, struct request *, | 109 | extern void elv_bio_merged(struct request_queue *q, struct request *, |
112 | struct bio *); | 110 | struct bio *); |
113 | extern void elv_requeue_request(struct request_queue *, struct request *); | 111 | extern void elv_requeue_request(struct request_queue *, struct request *); |
114 | extern int elv_queue_empty(struct request_queue *); | ||
115 | extern struct request *elv_former_request(struct request_queue *, struct request *); | 112 | extern struct request *elv_former_request(struct request_queue *, struct request *); |
116 | extern struct request *elv_latter_request(struct request_queue *, struct request *); | 113 | extern struct request *elv_latter_request(struct request_queue *, struct request *); |
117 | extern int elv_register_queue(struct request_queue *q); | 114 | extern int elv_register_queue(struct request_queue *q); |
@@ -167,6 +164,8 @@ extern struct request *elv_rb_find(struct rb_root *, sector_t); | |||
167 | #define ELEVATOR_INSERT_BACK 2 | 164 | #define ELEVATOR_INSERT_BACK 2 |
168 | #define ELEVATOR_INSERT_SORT 3 | 165 | #define ELEVATOR_INSERT_SORT 3 |
169 | #define ELEVATOR_INSERT_REQUEUE 4 | 166 | #define ELEVATOR_INSERT_REQUEUE 4 |
167 | #define ELEVATOR_INSERT_FLUSH 5 | ||
168 | #define ELEVATOR_INSERT_SORT_MERGE 6 | ||
170 | 169 | ||
171 | /* | 170 | /* |
172 | * return values from elevator_may_queue_fn | 171 | * return values from elevator_may_queue_fn |
diff --git a/include/linux/err.h b/include/linux/err.h index 448afc12c78a..f2edce25a76b 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -52,6 +52,14 @@ static inline void * __must_check ERR_CAST(const void *ptr) | |||
52 | return (void *) ptr; | 52 | return (void *) ptr; |
53 | } | 53 | } |
54 | 54 | ||
55 | static inline int __must_check PTR_RET(const void *ptr) | ||
56 | { | ||
57 | if (IS_ERR(ptr)) | ||
58 | return PTR_ERR(ptr); | ||
59 | else | ||
60 | return 0; | ||
61 | } | ||
62 | |||
55 | #endif | 63 | #endif |
56 | 64 | ||
57 | #endif /* _LINUX_ERR_H */ | 65 | #endif /* _LINUX_ERR_H */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index aac3e2eeb4fd..dc80d8294247 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -13,6 +13,9 @@ | |||
13 | #ifndef _LINUX_ETHTOOL_H | 13 | #ifndef _LINUX_ETHTOOL_H |
14 | #define _LINUX_ETHTOOL_H | 14 | #define _LINUX_ETHTOOL_H |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | #include <linux/compat.h> | ||
18 | #endif | ||
16 | #include <linux/types.h> | 19 | #include <linux/types.h> |
17 | #include <linux/if_ether.h> | 20 | #include <linux/if_ether.h> |
18 | 21 | ||
@@ -450,6 +453,37 @@ struct ethtool_rxnfc { | |||
450 | __u32 rule_locs[0]; | 453 | __u32 rule_locs[0]; |
451 | }; | 454 | }; |
452 | 455 | ||
456 | #ifdef __KERNEL__ | ||
457 | #ifdef CONFIG_COMPAT | ||
458 | |||
459 | struct compat_ethtool_rx_flow_spec { | ||
460 | u32 flow_type; | ||
461 | union { | ||
462 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
463 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
464 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
465 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
466 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
467 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
468 | struct ethhdr ether_spec; | ||
469 | u8 hdata[72]; | ||
470 | } h_u, m_u; | ||
471 | compat_u64 ring_cookie; | ||
472 | u32 location; | ||
473 | }; | ||
474 | |||
475 | struct compat_ethtool_rxnfc { | ||
476 | u32 cmd; | ||
477 | u32 flow_type; | ||
478 | compat_u64 data; | ||
479 | struct compat_ethtool_rx_flow_spec fs; | ||
480 | u32 rule_cnt; | ||
481 | u32 rule_locs[0]; | ||
482 | }; | ||
483 | |||
484 | #endif /* CONFIG_COMPAT */ | ||
485 | #endif /* __KERNEL__ */ | ||
486 | |||
453 | /** | 487 | /** |
454 | * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection | 488 | * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection |
455 | * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR | 489 | * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR |
@@ -580,7 +614,7 @@ struct ethtool_sfeatures { | |||
580 | * values of corresponding bits in features[].requested. Bits in .requested | 614 | * values of corresponding bits in features[].requested. Bits in .requested |
581 | * not set in .valid or not changeable are ignored. | 615 | * not set in .valid or not changeable are ignored. |
582 | * | 616 | * |
583 | * Returns %EINVAL when .valid contains undefined or never-changable bits | 617 | * Returns %EINVAL when .valid contains undefined or never-changeable bits |
584 | * or size is not equal to required number of features words (32-bit blocks). | 618 | * or size is not equal to required number of features words (32-bit blocks). |
585 | * Returns >= 0 if request was completed; bits set in the value mean: | 619 | * Returns >= 0 if request was completed; bits set in the value mean: |
586 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not | 620 | * %ETHTOOL_F_UNSUPPORTED - there were bits set in .valid that are not |
@@ -614,6 +648,9 @@ enum ethtool_sfeatures_retval_bits { | |||
614 | 648 | ||
615 | #include <linux/rculist.h> | 649 | #include <linux/rculist.h> |
616 | 650 | ||
651 | /* needed by dev_disable_lro() */ | ||
652 | extern int __ethtool_set_flags(struct net_device *dev, u32 flags); | ||
653 | |||
617 | struct ethtool_rx_ntuple_flow_spec_container { | 654 | struct ethtool_rx_ntuple_flow_spec_container { |
618 | struct ethtool_rx_ntuple_flow_spec fs; | 655 | struct ethtool_rx_ntuple_flow_spec fs; |
619 | struct list_head list; | 656 | struct list_head list; |
@@ -643,6 +680,7 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data); | |||
643 | u32 ethtool_op_get_flags(struct net_device *dev); | 680 | u32 ethtool_op_get_flags(struct net_device *dev); |
644 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); | 681 | int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported); |
645 | void ethtool_ntuple_flush(struct net_device *dev); | 682 | void ethtool_ntuple_flush(struct net_device *dev); |
683 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); | ||
646 | 684 | ||
647 | /** | 685 | /** |
648 | * ðtool_ops - Alter and report network device settings | 686 | * ðtool_ops - Alter and report network device settings |
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h index f6856a5a1d4b..f362733186a5 100644 --- a/include/linux/eventpoll.h +++ b/include/linux/eventpoll.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/linux/eventpoll.h ( Efficent event polling implementation ) | 2 | * include/linux/eventpoll.h ( Efficient event polling implementation ) |
3 | * Copyright (C) 2001,...,2006 Davide Libenzi | 3 | * Copyright (C) 2001,...,2006 Davide Libenzi |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 33a42f24b275..3a4cef5322dc 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -120,7 +120,7 @@ struct fid { | |||
120 | * encode_fh: | 120 | * encode_fh: |
121 | * @encode_fh should store in the file handle fragment @fh (using at most | 121 | * @encode_fh should store in the file handle fragment @fh (using at most |
122 | * @max_len bytes) information that can be used by @decode_fh to recover the | 122 | * @max_len bytes) information that can be used by @decode_fh to recover the |
123 | * file refered to by the &struct dentry @de. If the @connectable flag is | 123 | * file referred to by the &struct dentry @de. If the @connectable flag is |
124 | * set, the encode_fh() should store sufficient information so that a good | 124 | * set, the encode_fh() should store sufficient information so that a good |
125 | * attempt can be made to find not only the file but also it's place in the | 125 | * attempt can be made to find not only the file but also it's place in the |
126 | * filesystem. This typically means storing a reference to de->d_parent in | 126 | * filesystem. This typically means storing a reference to de->d_parent in |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 6043c64c207a..85c1d302c12e 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -418,13 +418,13 @@ struct ext3_inode { | |||
418 | #define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS | 418 | #define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS |
419 | #endif | 419 | #endif |
420 | 420 | ||
421 | #define ext3_set_bit ext2_set_bit | 421 | #define ext3_set_bit __test_and_set_bit_le |
422 | #define ext3_set_bit_atomic ext2_set_bit_atomic | 422 | #define ext3_set_bit_atomic ext2_set_bit_atomic |
423 | #define ext3_clear_bit ext2_clear_bit | 423 | #define ext3_clear_bit __test_and_clear_bit_le |
424 | #define ext3_clear_bit_atomic ext2_clear_bit_atomic | 424 | #define ext3_clear_bit_atomic ext2_clear_bit_atomic |
425 | #define ext3_test_bit ext2_test_bit | 425 | #define ext3_test_bit test_bit_le |
426 | #define ext3_find_first_zero_bit ext2_find_first_zero_bit | 426 | #define ext3_find_first_zero_bit find_first_zero_bit_le |
427 | #define ext3_find_next_zero_bit ext2_find_next_zero_bit | 427 | #define ext3_find_next_zero_bit find_next_zero_bit_le |
428 | 428 | ||
429 | /* | 429 | /* |
430 | * Maximal mount counts between two filesystem checks | 430 | * Maximal mount counts between two filesystem checks |
diff --git a/include/linux/fb.h b/include/linux/fb.h index b2a36391d2a1..df728c1c29ed 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -534,14 +534,14 @@ struct fb_cursor_user { | |||
534 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 | 534 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
535 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ | 535 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
536 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 | 536 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 |
537 | /* A hardware display blank change occured */ | 537 | /* A hardware display blank change occurred */ |
538 | #define FB_EVENT_BLANK 0x09 | 538 | #define FB_EVENT_BLANK 0x09 |
539 | /* Private modelist is to be replaced */ | 539 | /* Private modelist is to be replaced */ |
540 | #define FB_EVENT_NEW_MODELIST 0x0A | 540 | #define FB_EVENT_NEW_MODELIST 0x0A |
541 | /* The resolution of the passed in fb_info about to change and | 541 | /* The resolution of the passed in fb_info about to change and |
542 | all vc's should be changed */ | 542 | all vc's should be changed */ |
543 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B | 543 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B |
544 | /* A software display blank change occured */ | 544 | /* A software display blank change occurred */ |
545 | #define FB_EVENT_CONBLANK 0x0C | 545 | #define FB_EVENT_CONBLANK 0x0C |
546 | /* Get drawing requirements */ | 546 | /* Get drawing requirements */ |
547 | #define FB_EVENT_GET_REQ 0x0D | 547 | #define FB_EVENT_GET_REQ 0x0D |
@@ -805,7 +805,7 @@ struct fb_tile_ops { | |||
805 | /* A driver may set this flag to indicate that it does want a set_par to be | 805 | /* A driver may set this flag to indicate that it does want a set_par to be |
806 | * called every time when fbcon_switch is executed. The advantage is that with | 806 | * called every time when fbcon_switch is executed. The advantage is that with |
807 | * this flag set you can really be sure that set_par is always called before | 807 | * this flag set you can really be sure that set_par is always called before |
808 | * any of the functions dependant on the correct hardware state or altering | 808 | * any of the functions dependent on the correct hardware state or altering |
809 | * that state, even if you are using some broken X releases. The disadvantage | 809 | * that state, even if you are using some broken X releases. The disadvantage |
810 | * is that it introduces unwanted delays to every console switch if set_par | 810 | * is that it introduces unwanted delays to every console switch if set_par |
811 | * is slow. It is a good idea to try this flag in the drivers initialization | 811 | * is slow. It is a good idea to try this flag in the drivers initialization |
@@ -877,7 +877,7 @@ struct fb_info { | |||
877 | void *fbcon_par; /* fbcon use-only private area */ | 877 | void *fbcon_par; /* fbcon use-only private area */ |
878 | /* From here on everything is device dependent */ | 878 | /* From here on everything is device dependent */ |
879 | void *par; | 879 | void *par; |
880 | /* we need the PCI or similiar aperture base/size not | 880 | /* we need the PCI or similar aperture base/size not |
881 | smem_start/size as smem_start may just be an object | 881 | smem_start/size as smem_start may just be an object |
882 | allocated inside the aperture so may not actually overlap */ | 882 | allocated inside the aperture so may not actually overlap */ |
883 | struct apertures_struct { | 883 | struct apertures_struct { |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 59ea406be7f6..4ff09889c5c0 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -900,7 +900,7 @@ struct fw_cdev_get_cycle_timer2 { | |||
900 | 900 | ||
901 | /** | 901 | /** |
902 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | 902 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth |
903 | * @closure: Passed back to userspace in correponding iso resource events | 903 | * @closure: Passed back to userspace in corresponding iso resource events |
904 | * @channels: Isochronous channels of which one is to be (de)allocated | 904 | * @channels: Isochronous channels of which one is to be (de)allocated |
905 | * @bandwidth: Isochronous bandwidth units to be (de)allocated | 905 | * @bandwidth: Isochronous bandwidth units to be (de)allocated |
906 | * @handle: Handle to the allocation, written by the kernel (only valid in | 906 | * @handle: Handle to the allocation, written by the kernel (only valid in |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index fc023d67676f..c64f3680d4f1 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -93,7 +93,7 @@ struct fw_card { | |||
93 | int current_tlabel; | 93 | int current_tlabel; |
94 | u64 tlabel_mask; | 94 | u64 tlabel_mask; |
95 | struct list_head transaction_list; | 95 | struct list_head transaction_list; |
96 | unsigned long reset_jiffies; | 96 | u64 reset_jiffies; |
97 | 97 | ||
98 | u32 split_timeout_hi; | 98 | u32 split_timeout_hi; |
99 | u32 split_timeout_lo; | 99 | u32 split_timeout_lo; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7061a8587ee3..dbd860af0804 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -138,16 +138,10 @@ struct inodes_stat_t { | |||
138 | * block layer could (in theory) choose to ignore this | 138 | * block layer could (in theory) choose to ignore this |
139 | * request if it runs into resource problems. | 139 | * request if it runs into resource problems. |
140 | * WRITE A normal async write. Device will be plugged. | 140 | * WRITE A normal async write. Device will be plugged. |
141 | * WRITE_SYNC_PLUG Synchronous write. Identical to WRITE, but passes down | 141 | * WRITE_SYNC Synchronous write. Identical to WRITE, but passes down |
142 | * the hint that someone will be waiting on this IO | 142 | * the hint that someone will be waiting on this IO |
143 | * shortly. The device must still be unplugged explicitly, | 143 | * shortly. The write equivalent of READ_SYNC. |
144 | * WRITE_SYNC_PLUG does not do this as we could be | 144 | * WRITE_ODIRECT Special case write for O_DIRECT only. |
145 | * submitting more writes before we actually wait on any | ||
146 | * of them. | ||
147 | * WRITE_SYNC Like WRITE_SYNC_PLUG, but also unplugs the device | ||
148 | * immediately after submission. The write equivalent | ||
149 | * of READ_SYNC. | ||
150 | * WRITE_ODIRECT_PLUG Special case write for O_DIRECT only. | ||
151 | * WRITE_FLUSH Like WRITE_SYNC but with preceding cache flush. | 145 | * WRITE_FLUSH Like WRITE_SYNC but with preceding cache flush. |
152 | * WRITE_FUA Like WRITE_SYNC but data is guaranteed to be on | 146 | * WRITE_FUA Like WRITE_SYNC but data is guaranteed to be on |
153 | * non-volatile media on completion. | 147 | * non-volatile media on completion. |
@@ -163,18 +157,14 @@ struct inodes_stat_t { | |||
163 | #define WRITE RW_MASK | 157 | #define WRITE RW_MASK |
164 | #define READA RWA_MASK | 158 | #define READA RWA_MASK |
165 | 159 | ||
166 | #define READ_SYNC (READ | REQ_SYNC | REQ_UNPLUG) | 160 | #define READ_SYNC (READ | REQ_SYNC) |
167 | #define READ_META (READ | REQ_META) | 161 | #define READ_META (READ | REQ_META) |
168 | #define WRITE_SYNC_PLUG (WRITE | REQ_SYNC | REQ_NOIDLE) | 162 | #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE) |
169 | #define WRITE_SYNC (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG) | 163 | #define WRITE_ODIRECT (WRITE | REQ_SYNC) |
170 | #define WRITE_ODIRECT_PLUG (WRITE | REQ_SYNC) | ||
171 | #define WRITE_META (WRITE | REQ_META) | 164 | #define WRITE_META (WRITE | REQ_META) |
172 | #define WRITE_FLUSH (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ | 165 | #define WRITE_FLUSH (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH) |
173 | REQ_FLUSH) | 166 | #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FUA) |
174 | #define WRITE_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ | 167 | #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_FLUSH | REQ_FUA) |
175 | REQ_FUA) | ||
176 | #define WRITE_FLUSH_FUA (WRITE | REQ_SYNC | REQ_NOIDLE | REQ_UNPLUG | \ | ||
177 | REQ_FLUSH | REQ_FUA) | ||
178 | 168 | ||
179 | #define SEL_IN 1 | 169 | #define SEL_IN 1 |
180 | #define SEL_OUT 2 | 170 | #define SEL_OUT 2 |
@@ -367,6 +357,8 @@ struct inodes_stat_t { | |||
367 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | 357 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ |
368 | #define FS_EXTENT_FL 0x00080000 /* Extents */ | 358 | #define FS_EXTENT_FL 0x00080000 /* Extents */ |
369 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ | 359 | #define FS_DIRECTIO_FL 0x00100000 /* Use direct i/o */ |
360 | #define FS_NOCOW_FL 0x00800000 /* Do not cow file */ | ||
361 | #define FS_COW_FL 0x02000000 /* Cow file */ | ||
370 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 362 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ |
371 | 363 | ||
372 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 364 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ |
@@ -473,7 +465,7 @@ struct iattr { | |||
473 | struct timespec ia_ctime; | 465 | struct timespec ia_ctime; |
474 | 466 | ||
475 | /* | 467 | /* |
476 | * Not an attribute, but an auxilary info for filesystems wanting to | 468 | * Not an attribute, but an auxiliary info for filesystems wanting to |
477 | * implement an ftruncate() like method. NOTE: filesystem should | 469 | * implement an ftruncate() like method. NOTE: filesystem should |
478 | * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). | 470 | * check for (ia_valid & ATTR_FILE), and not for (ia_file != NULL). |
479 | */ | 471 | */ |
@@ -586,7 +578,6 @@ typedef int (*read_actor_t)(read_descriptor_t *, struct page *, | |||
586 | struct address_space_operations { | 578 | struct address_space_operations { |
587 | int (*writepage)(struct page *page, struct writeback_control *wbc); | 579 | int (*writepage)(struct page *page, struct writeback_control *wbc); |
588 | int (*readpage)(struct file *, struct page *); | 580 | int (*readpage)(struct file *, struct page *); |
589 | void (*sync_page)(struct page *); | ||
590 | 581 | ||
591 | /* Write back some dirty pages from this mapping. */ | 582 | /* Write back some dirty pages from this mapping. */ |
592 | int (*writepages)(struct address_space *, struct writeback_control *); | 583 | int (*writepages)(struct address_space *, struct writeback_control *); |
@@ -622,6 +613,8 @@ struct address_space_operations { | |||
622 | int (*error_remove_page)(struct address_space *, struct page *); | 613 | int (*error_remove_page)(struct address_space *, struct page *); |
623 | }; | 614 | }; |
624 | 615 | ||
616 | extern const struct address_space_operations empty_aops; | ||
617 | |||
625 | /* | 618 | /* |
626 | * pagecache_write_begin/pagecache_write_end must be used by general code | 619 | * pagecache_write_begin/pagecache_write_end must be used by general code |
627 | * to write into the pagecache. | 620 | * to write into the pagecache. |
@@ -656,15 +649,15 @@ struct address_space { | |||
656 | } __attribute__((aligned(sizeof(long)))); | 649 | } __attribute__((aligned(sizeof(long)))); |
657 | /* | 650 | /* |
658 | * On most architectures that alignment is already the case; but | 651 | * On most architectures that alignment is already the case; but |
659 | * must be enforced here for CRIS, to let the least signficant bit | 652 | * must be enforced here for CRIS, to let the least significant bit |
660 | * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. | 653 | * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. |
661 | */ | 654 | */ |
662 | 655 | ||
663 | struct block_device { | 656 | struct block_device { |
664 | dev_t bd_dev; /* not a kdev_t - it's a search key */ | 657 | dev_t bd_dev; /* not a kdev_t - it's a search key */ |
658 | int bd_openers; | ||
665 | struct inode * bd_inode; /* will die */ | 659 | struct inode * bd_inode; /* will die */ |
666 | struct super_block * bd_super; | 660 | struct super_block * bd_super; |
667 | int bd_openers; | ||
668 | struct mutex bd_mutex; /* open/close mutex */ | 661 | struct mutex bd_mutex; /* open/close mutex */ |
669 | struct list_head bd_inodes; | 662 | struct list_head bd_inodes; |
670 | void * bd_claiming; | 663 | void * bd_claiming; |
@@ -1457,8 +1450,13 @@ enum { | |||
1457 | #define put_fs_excl() atomic_dec(¤t->fs_excl) | 1450 | #define put_fs_excl() atomic_dec(¤t->fs_excl) |
1458 | #define has_fs_excl() atomic_read(¤t->fs_excl) | 1451 | #define has_fs_excl() atomic_read(¤t->fs_excl) |
1459 | 1452 | ||
1460 | #define is_owner_or_cap(inode) \ | 1453 | /* |
1461 | ((current_fsuid() == (inode)->i_uid) || capable(CAP_FOWNER)) | 1454 | * until VFS tracks user namespaces for inodes, just make all files |
1455 | * belong to init_user_ns | ||
1456 | */ | ||
1457 | extern struct user_namespace init_user_ns; | ||
1458 | #define inode_userns(inode) (&init_user_ns) | ||
1459 | extern bool inode_owner_or_capable(const struct inode *inode); | ||
1462 | 1460 | ||
1463 | /* not quite ready to be deprecated, but... */ | 1461 | /* not quite ready to be deprecated, but... */ |
1464 | extern void lock_super(struct super_block *); | 1462 | extern void lock_super(struct super_block *); |
@@ -1642,7 +1640,7 @@ struct super_operations { | |||
1642 | }; | 1640 | }; |
1643 | 1641 | ||
1644 | /* | 1642 | /* |
1645 | * Inode state bits. Protected by inode_lock. | 1643 | * Inode state bits. Protected by inode->i_lock |
1646 | * | 1644 | * |
1647 | * Three bits determine the dirty state of the inode, I_DIRTY_SYNC, | 1645 | * Three bits determine the dirty state of the inode, I_DIRTY_SYNC, |
1648 | * I_DIRTY_DATASYNC and I_DIRTY_PAGES. | 1646 | * I_DIRTY_DATASYNC and I_DIRTY_PAGES. |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index b8581c09d19f..76427e688d15 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
@@ -236,7 +236,7 @@ struct fscache_cache_ops { | |||
236 | /* unpin an object in the cache */ | 236 | /* unpin an object in the cache */ |
237 | void (*unpin_object)(struct fscache_object *object); | 237 | void (*unpin_object)(struct fscache_object *object); |
238 | 238 | ||
239 | /* store the updated auxilliary data on an object */ | 239 | /* store the updated auxiliary data on an object */ |
240 | void (*update_object)(struct fscache_object *object); | 240 | void (*update_object)(struct fscache_object *object); |
241 | 241 | ||
242 | /* discard the resources pinned by an object and effect retirement if | 242 | /* discard the resources pinned by an object and effect retirement if |
diff --git a/include/linux/fscache.h b/include/linux/fscache.h index ec0dad5ab90f..7c4d72f5581f 100644 --- a/include/linux/fscache.h +++ b/include/linux/fscache.h | |||
@@ -102,9 +102,9 @@ struct fscache_cookie_def { | |||
102 | */ | 102 | */ |
103 | void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); | 103 | void (*get_attr)(const void *cookie_netfs_data, uint64_t *size); |
104 | 104 | ||
105 | /* get the auxilliary data from netfs data | 105 | /* get the auxiliary data from netfs data |
106 | * - this function can be absent if the index carries no state data | 106 | * - this function can be absent if the index carries no state data |
107 | * - should store the auxilliary data in the buffer | 107 | * - should store the auxiliary data in the buffer |
108 | * - should return the amount of amount stored | 108 | * - should return the amount of amount stored |
109 | * - not permitted to return an error | 109 | * - not permitted to return an error |
110 | * - the netfs data from the cookie being used as the source is | 110 | * - the netfs data from the cookie being used as the source is |
@@ -117,7 +117,7 @@ struct fscache_cookie_def { | |||
117 | /* consult the netfs about the state of an object | 117 | /* consult the netfs about the state of an object |
118 | * - this function can be absent if the index carries no state data | 118 | * - this function can be absent if the index carries no state data |
119 | * - the netfs data from the cookie being used as the target is | 119 | * - the netfs data from the cookie being used as the target is |
120 | * presented, as is the auxilliary data | 120 | * presented, as is the auxiliary data |
121 | */ | 121 | */ |
122 | enum fscache_checkaux (*check_aux)(void *cookie_netfs_data, | 122 | enum fscache_checkaux (*check_aux)(void *cookie_netfs_data, |
123 | const void *data, | 123 | const void *data, |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index c0d5f6945c1e..d764a426e9fd 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -109,7 +109,7 @@ struct hd_struct { | |||
109 | int make_it_fail; | 109 | int make_it_fail; |
110 | #endif | 110 | #endif |
111 | unsigned long stamp; | 111 | unsigned long stamp; |
112 | int in_flight[2]; | 112 | atomic_t in_flight[2]; |
113 | #ifdef CONFIG_SMP | 113 | #ifdef CONFIG_SMP |
114 | struct disk_stats __percpu *dkstats; | 114 | struct disk_stats __percpu *dkstats; |
115 | #else | 115 | #else |
@@ -370,21 +370,21 @@ static inline void free_part_stats(struct hd_struct *part) | |||
370 | 370 | ||
371 | static inline void part_inc_in_flight(struct hd_struct *part, int rw) | 371 | static inline void part_inc_in_flight(struct hd_struct *part, int rw) |
372 | { | 372 | { |
373 | part->in_flight[rw]++; | 373 | atomic_inc(&part->in_flight[rw]); |
374 | if (part->partno) | 374 | if (part->partno) |
375 | part_to_disk(part)->part0.in_flight[rw]++; | 375 | atomic_inc(&part_to_disk(part)->part0.in_flight[rw]); |
376 | } | 376 | } |
377 | 377 | ||
378 | static inline void part_dec_in_flight(struct hd_struct *part, int rw) | 378 | static inline void part_dec_in_flight(struct hd_struct *part, int rw) |
379 | { | 379 | { |
380 | part->in_flight[rw]--; | 380 | atomic_dec(&part->in_flight[rw]); |
381 | if (part->partno) | 381 | if (part->partno) |
382 | part_to_disk(part)->part0.in_flight[rw]--; | 382 | atomic_dec(&part_to_disk(part)->part0.in_flight[rw]); |
383 | } | 383 | } |
384 | 384 | ||
385 | static inline int part_in_flight(struct hd_struct *part) | 385 | static inline int part_in_flight(struct hd_struct *part) |
386 | { | 386 | { |
387 | return part->in_flight[0] + part->in_flight[1]; | 387 | return atomic_read(&part->in_flight[0]) + atomic_read(&part->in_flight[1]); |
388 | } | 388 | } |
389 | 389 | ||
390 | static inline struct partition_meta_info *alloc_part_info(struct gendisk *disk) | 390 | static inline struct partition_meta_info *alloc_part_info(struct gendisk *disk) |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index dca31761b311..bfb8f934521e 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -35,6 +35,7 @@ struct vm_area_struct; | |||
35 | #define ___GFP_NOTRACK 0 | 35 | #define ___GFP_NOTRACK 0 |
36 | #endif | 36 | #endif |
37 | #define ___GFP_NO_KSWAPD 0x400000u | 37 | #define ___GFP_NO_KSWAPD 0x400000u |
38 | #define ___GFP_OTHER_NODE 0x800000u | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * GFP bitmasks.. | 41 | * GFP bitmasks.. |
@@ -83,6 +84,7 @@ struct vm_area_struct; | |||
83 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ | 84 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ |
84 | 85 | ||
85 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) | 86 | #define __GFP_NO_KSWAPD ((__force gfp_t)___GFP_NO_KSWAPD) |
87 | #define __GFP_OTHER_NODE ((__force gfp_t)___GFP_OTHER_NODE) /* On behalf of other node */ | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * This may seem redundant, but it's a way of annotating false positives vs. | 90 | * This may seem redundant, but it's a way of annotating false positives vs. |
diff --git a/include/linux/hid.h b/include/linux/hid.h index bb29bb1dbd2f..42f7e2fb501f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -799,7 +799,7 @@ static inline int __must_check hid_parse(struct hid_device *hdev) | |||
799 | * | 799 | * |
800 | * Call this in probe function *after* hid_parse. This will setup HW buffers | 800 | * Call this in probe function *after* hid_parse. This will setup HW buffers |
801 | * and start the device (if not deffered to device open). hid_hw_stop must be | 801 | * and start the device (if not deffered to device open). hid_hw_stop must be |
802 | * called if this was successfull. | 802 | * called if this was successful. |
803 | */ | 803 | */ |
804 | static inline int __must_check hid_hw_start(struct hid_device *hdev, | 804 | static inline int __must_check hid_hw_start(struct hid_device *hdev, |
805 | unsigned int connect_mask) | 805 | unsigned int connect_mask) |
diff --git a/include/linux/hp_sdc.h b/include/linux/hp_sdc.h index 9db3d454887f..d392975d8887 100644 --- a/include/linux/hp_sdc.h +++ b/include/linux/hp_sdc.h | |||
@@ -101,7 +101,7 @@ int hp_sdc_dequeue_transaction(hp_sdc_transaction *this); | |||
101 | #define HP_SDC_STATUS_REG 0x40 /* Data from an i8042 register */ | 101 | #define HP_SDC_STATUS_REG 0x40 /* Data from an i8042 register */ |
102 | #define HP_SDC_STATUS_HILCMD 0x50 /* Command from HIL MLC */ | 102 | #define HP_SDC_STATUS_HILCMD 0x50 /* Command from HIL MLC */ |
103 | #define HP_SDC_STATUS_HILDATA 0x60 /* Data from HIL MLC */ | 103 | #define HP_SDC_STATUS_HILDATA 0x60 /* Data from HIL MLC */ |
104 | #define HP_SDC_STATUS_PUP 0x70 /* Sucessful power-up self test */ | 104 | #define HP_SDC_STATUS_PUP 0x70 /* Successful power-up self test */ |
105 | #define HP_SDC_STATUS_KCOOKED 0x80 /* Key from cooked kbd */ | 105 | #define HP_SDC_STATUS_KCOOKED 0x80 /* Key from cooked kbd */ |
106 | #define HP_SDC_STATUS_KRPG 0xc0 /* Key from Repeat Gen */ | 106 | #define HP_SDC_STATUS_KRPG 0xc0 /* Key from Repeat Gen */ |
107 | #define HP_SDC_STATUS_KMOD_SUP 0x10 /* Shift key is up */ | 107 | #define HP_SDC_STATUS_KMOD_SUP 0x10 /* Shift key is up */ |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h deleted file mode 100644 index 4bef5c557160..000000000000 --- a/include/linux/i2c-id.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* ------------------------------------------------------------------------- */ | ||
2 | /* */ | ||
3 | /* i2c-id.h - identifier values for i2c drivers and adapters */ | ||
4 | /* */ | ||
5 | /* ------------------------------------------------------------------------- */ | ||
6 | /* Copyright (C) 1995-1999 Simon G. Vogl | ||
7 | |||
8 | This program is free software; you can redistribute it and/or modify | ||
9 | it under the terms of the GNU General Public License as published by | ||
10 | the Free Software Foundation; either version 2 of the License, or | ||
11 | (at your option) any later version. | ||
12 | |||
13 | This program is distributed in the hope that it will be useful, | ||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | GNU General Public License for more details. | ||
17 | |||
18 | You should have received a copy of the GNU General Public License | ||
19 | along with this program; if not, write to the Free Software | ||
20 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
21 | /* ------------------------------------------------------------------------- */ | ||
22 | |||
23 | #ifndef LINUX_I2C_ID_H | ||
24 | #define LINUX_I2C_ID_H | ||
25 | |||
26 | /* Please note that I2C driver IDs are optional. They are only needed if a | ||
27 | legacy chip driver needs to identify a bus or a bus driver needs to | ||
28 | identify a legacy client. If you don't need them, just don't set them. */ | ||
29 | |||
30 | /* | ||
31 | * ---- Adapter types ---------------------------------------------------- | ||
32 | */ | ||
33 | |||
34 | /* --- Bit algorithm adapters */ | ||
35 | #define I2C_HW_B_CX2388x 0x01001b /* connexant 2388x based tv cards */ | ||
36 | |||
37 | #endif /* LINUX_I2C_ID_H */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 06a8d9c7de98..f1e3ff5880a9 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/i2c-id.h> | ||
33 | #include <linux/mod_devicetable.h> | 32 | #include <linux/mod_devicetable.h> |
34 | #include <linux/device.h> /* for struct device */ | 33 | #include <linux/device.h> /* for struct device */ |
35 | #include <linux/sched.h> /* for completion */ | 34 | #include <linux/sched.h> /* for completion */ |
@@ -105,8 +104,8 @@ extern s32 i2c_smbus_write_i2c_block_data(const struct i2c_client *client, | |||
105 | /** | 104 | /** |
106 | * struct i2c_driver - represent an I2C device driver | 105 | * struct i2c_driver - represent an I2C device driver |
107 | * @class: What kind of i2c device we instantiate (for detect) | 106 | * @class: What kind of i2c device we instantiate (for detect) |
108 | * @attach_adapter: Callback for bus addition (for legacy drivers) | 107 | * @attach_adapter: Callback for bus addition (deprecated) |
109 | * @detach_adapter: Callback for bus removal (for legacy drivers) | 108 | * @detach_adapter: Callback for bus removal (deprecated) |
110 | * @probe: Callback for device binding | 109 | * @probe: Callback for device binding |
111 | * @remove: Callback for device unbinding | 110 | * @remove: Callback for device unbinding |
112 | * @shutdown: Callback for device shutdown | 111 | * @shutdown: Callback for device shutdown |
@@ -144,11 +143,11 @@ struct i2c_driver { | |||
144 | unsigned int class; | 143 | unsigned int class; |
145 | 144 | ||
146 | /* Notifies the driver that a new bus has appeared or is about to be | 145 | /* Notifies the driver that a new bus has appeared or is about to be |
147 | * removed. You should avoid using this if you can, it will probably | 146 | * removed. You should avoid using this, it will be removed in a |
148 | * be removed in a near future. | 147 | * near future. |
149 | */ | 148 | */ |
150 | int (*attach_adapter)(struct i2c_adapter *); | 149 | int (*attach_adapter)(struct i2c_adapter *) __deprecated; |
151 | int (*detach_adapter)(struct i2c_adapter *); | 150 | int (*detach_adapter)(struct i2c_adapter *) __deprecated; |
152 | 151 | ||
153 | /* Standard driver model interfaces */ | 152 | /* Standard driver model interfaces */ |
154 | int (*probe)(struct i2c_client *, const struct i2c_device_id *); | 153 | int (*probe)(struct i2c_client *, const struct i2c_device_id *); |
@@ -354,7 +353,6 @@ struct i2c_algorithm { | |||
354 | */ | 353 | */ |
355 | struct i2c_adapter { | 354 | struct i2c_adapter { |
356 | struct module *owner; | 355 | struct module *owner; |
357 | unsigned int id __deprecated; | ||
358 | unsigned int class; /* classes to allow probing for */ | 356 | unsigned int class; /* classes to allow probing for */ |
359 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ | 357 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
360 | void *algo_data; | 358 | void *algo_data; |
@@ -396,6 +394,8 @@ i2c_parent_is_i2c_adapter(const struct i2c_adapter *adapter) | |||
396 | return NULL; | 394 | return NULL; |
397 | } | 395 | } |
398 | 396 | ||
397 | int i2c_for_each_dev(void *data, int (*fn)(struct device *, void *)); | ||
398 | |||
399 | /* Adapter locking functions, exported for shared pin cases */ | 399 | /* Adapter locking functions, exported for shared pin cases */ |
400 | void i2c_lock_adapter(struct i2c_adapter *); | 400 | void i2c_lock_adapter(struct i2c_adapter *); |
401 | void i2c_unlock_adapter(struct i2c_adapter *); | 401 | void i2c_unlock_adapter(struct i2c_adapter *); |
@@ -447,7 +447,7 @@ extern void i2c_release_client(struct i2c_client *client); | |||
447 | extern void i2c_clients_command(struct i2c_adapter *adap, | 447 | extern void i2c_clients_command(struct i2c_adapter *adap, |
448 | unsigned int cmd, void *arg); | 448 | unsigned int cmd, void *arg); |
449 | 449 | ||
450 | extern struct i2c_adapter *i2c_get_adapter(int id); | 450 | extern struct i2c_adapter *i2c_get_adapter(int nr); |
451 | extern void i2c_put_adapter(struct i2c_adapter *adap); | 451 | extern void i2c_put_adapter(struct i2c_adapter *adap); |
452 | 452 | ||
453 | 453 | ||
diff --git a/include/linux/i2c/ads1015.h b/include/linux/i2c/ads1015.h new file mode 100644 index 000000000000..d5aa2a045669 --- /dev/null +++ b/include/linux/i2c/ads1015.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Platform Data for ADS1015 12-bit 4-input ADC | ||
3 | * (C) Copyright 2010 | ||
4 | * Dirk Eibach, Guntermann & Drunck GmbH <eibach@gdsys.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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef LINUX_ADS1015_H | ||
22 | #define LINUX_ADS1015_H | ||
23 | |||
24 | #define ADS1015_CHANNELS 8 | ||
25 | |||
26 | struct ads1015_channel_data { | ||
27 | bool enabled; | ||
28 | unsigned int pga; | ||
29 | unsigned int data_rate; | ||
30 | }; | ||
31 | |||
32 | struct ads1015_platform_data { | ||
33 | struct ads1015_channel_data channel_data[ADS1015_CHANNELS]; | ||
34 | }; | ||
35 | |||
36 | #endif /* LINUX_ADS1015_H */ | ||
diff --git a/include/linux/i2c/qt602240_ts.h b/include/linux/i2c/atmel_mxt_ts.h index c5033e101094..f027f7a63511 100644 --- a/include/linux/i2c/qt602240_ts.h +++ b/include/linux/i2c/atmel_mxt_ts.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * AT42QT602240/ATMXT224 Touchscreen driver | 2 | * Atmel maXTouch Touchscreen driver |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd | 4 | * Copyright (C) 2010 Samsung Electronics Co.Ltd |
5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> | 5 | * Author: Joonyoung Shim <jy0922.shim@samsung.com> |
@@ -10,21 +10,26 @@ | |||
10 | * option) any later version. | 10 | * option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef __LINUX_QT602240_TS_H | 13 | #ifndef __LINUX_ATMEL_MXT_TS_H |
14 | #define __LINUX_QT602240_TS_H | 14 | #define __LINUX_ATMEL_MXT_TS_H |
15 | |||
16 | #include <linux/types.h> | ||
15 | 17 | ||
16 | /* Orient */ | 18 | /* Orient */ |
17 | #define QT602240_NORMAL 0x0 | 19 | #define MXT_NORMAL 0x0 |
18 | #define QT602240_DIAGONAL 0x1 | 20 | #define MXT_DIAGONAL 0x1 |
19 | #define QT602240_HORIZONTAL_FLIP 0x2 | 21 | #define MXT_HORIZONTAL_FLIP 0x2 |
20 | #define QT602240_ROTATED_90_COUNTER 0x3 | 22 | #define MXT_ROTATED_90_COUNTER 0x3 |
21 | #define QT602240_VERTICAL_FLIP 0x4 | 23 | #define MXT_VERTICAL_FLIP 0x4 |
22 | #define QT602240_ROTATED_90 0x5 | 24 | #define MXT_ROTATED_90 0x5 |
23 | #define QT602240_ROTATED_180 0x6 | 25 | #define MXT_ROTATED_180 0x6 |
24 | #define QT602240_DIAGONAL_COUNTER 0x7 | 26 | #define MXT_DIAGONAL_COUNTER 0x7 |
27 | |||
28 | /* The platform data for the Atmel maXTouch touchscreen driver */ | ||
29 | struct mxt_platform_data { | ||
30 | const u8 *config; | ||
31 | size_t config_length; | ||
25 | 32 | ||
26 | /* The platform data for the AT42QT602240/ATMXT224 touchscreen driver */ | ||
27 | struct qt602240_platform_data { | ||
28 | unsigned int x_line; | 33 | unsigned int x_line; |
29 | unsigned int y_line; | 34 | unsigned int y_line; |
30 | unsigned int x_size; | 35 | unsigned int x_size; |
@@ -33,6 +38,7 @@ struct qt602240_platform_data { | |||
33 | unsigned int threshold; | 38 | unsigned int threshold; |
34 | unsigned int voltage; | 39 | unsigned int voltage; |
35 | unsigned char orient; | 40 | unsigned char orient; |
41 | unsigned long irqflags; | ||
36 | }; | 42 | }; |
37 | 43 | ||
38 | #endif /* __LINUX_QT602240_TS_H */ | 44 | #endif /* __LINUX_ATMEL_MXT_TS_H */ |
diff --git a/include/linux/i2c/mcs.h b/include/linux/i2c/mcs.h index 725ae7c313ff..61bb18a4fd3c 100644 --- a/include/linux/i2c/mcs.h +++ b/include/linux/i2c/mcs.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define MCS_KEY_CODE(v) ((v) & 0xffff) | 18 | #define MCS_KEY_CODE(v) ((v) & 0xffff) |
19 | 19 | ||
20 | struct mcs_platform_data { | 20 | struct mcs_platform_data { |
21 | void (*poweron)(bool); | ||
21 | void (*cfg_pin)(void); | 22 | void (*cfg_pin)(void); |
22 | 23 | ||
23 | /* touchscreen */ | 24 | /* touchscreen */ |
diff --git a/include/linux/i2c/pxa-i2c.h b/include/linux/i2c/pxa-i2c.h new file mode 100644 index 000000000000..1a9f65e6ec0f --- /dev/null +++ b/include/linux/i2c/pxa-i2c.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * i2c_pxa.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intrinsyc Software Inc. | ||
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 _I2C_PXA_H_ | ||
12 | #define _I2C_PXA_H_ | ||
13 | |||
14 | #if 0 | ||
15 | #define DEF_TIMEOUT 3 | ||
16 | #else | ||
17 | /* need a longer timeout if we're dealing with the fact we may well be | ||
18 | * looking at a multi-master environment | ||
19 | */ | ||
20 | #define DEF_TIMEOUT 32 | ||
21 | #endif | ||
22 | |||
23 | #define BUS_ERROR (-EREMOTEIO) | ||
24 | #define XFER_NAKED (-ECONNREFUSED) | ||
25 | #define I2C_RETRY (-2000) /* an error has occurred retry transmit */ | ||
26 | |||
27 | /* ICR initialize bit values | ||
28 | * | ||
29 | * 15. FM 0 (100 Khz operation) | ||
30 | * 14. UR 0 (No unit reset) | ||
31 | * 13. SADIE 0 (Disables the unit from interrupting on slave addresses | ||
32 | * matching its slave address) | ||
33 | * 12. ALDIE 0 (Disables the unit from interrupt when it loses arbitration | ||
34 | * in master mode) | ||
35 | * 11. SSDIE 0 (Disables interrupts from a slave stop detected, in slave mode) | ||
36 | * 10. BEIE 1 (Enable interrupts from detected bus errors, no ACK sent) | ||
37 | * 9. IRFIE 1 (Enable interrupts from full buffer received) | ||
38 | * 8. ITEIE 1 (Enables the I2C unit to interrupt when transmit buffer empty) | ||
39 | * 7. GCD 1 (Disables i2c unit response to general call messages as a slave) | ||
40 | * 6. IUE 0 (Disable unit until we change settings) | ||
41 | * 5. SCLE 1 (Enables the i2c clock output for master mode (drives SCL) | ||
42 | * 4. MA 0 (Only send stop with the ICR stop bit) | ||
43 | * 3. TB 0 (We are not transmitting a byte initially) | ||
44 | * 2. ACKNAK 0 (Send an ACK after the unit receives a byte) | ||
45 | * 1. STOP 0 (Do not send a STOP) | ||
46 | * 0. START 0 (Do not send a START) | ||
47 | * | ||
48 | */ | ||
49 | #define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE) | ||
50 | |||
51 | /* I2C status register init values | ||
52 | * | ||
53 | * 10. BED 1 (Clear bus error detected) | ||
54 | * 9. SAD 1 (Clear slave address detected) | ||
55 | * 7. IRF 1 (Clear IDBR Receive Full) | ||
56 | * 6. ITE 1 (Clear IDBR Transmit Empty) | ||
57 | * 5. ALD 1 (Clear Arbitration Loss Detected) | ||
58 | * 4. SSD 1 (Clear Slave Stop Detected) | ||
59 | */ | ||
60 | #define I2C_ISR_INIT 0x7FF /* status register init */ | ||
61 | |||
62 | struct i2c_slave_client; | ||
63 | |||
64 | struct i2c_pxa_platform_data { | ||
65 | unsigned int slave_addr; | ||
66 | struct i2c_slave_client *slave; | ||
67 | unsigned int class; | ||
68 | unsigned int use_pio :1; | ||
69 | unsigned int fast_mode :1; | ||
70 | }; | ||
71 | |||
72 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | ||
73 | |||
74 | #ifdef CONFIG_PXA27x | ||
75 | extern void pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_PXA3xx | ||
79 | extern void pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
80 | #endif | ||
81 | |||
82 | #endif | ||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index 58afd9d2c438..0c0d1ae79981 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -698,6 +698,7 @@ struct twl4030_platform_data { | |||
698 | struct regulator_init_data *vana; | 698 | struct regulator_init_data *vana; |
699 | struct regulator_init_data *vcxio; | 699 | struct regulator_init_data *vcxio; |
700 | struct regulator_init_data *vusb; | 700 | struct regulator_init_data *vusb; |
701 | struct regulator_init_data *clk32kg; | ||
701 | }; | 702 | }; |
702 | 703 | ||
703 | /*----------------------------------------------------------------------*/ | 704 | /*----------------------------------------------------------------------*/ |
@@ -777,5 +778,6 @@ static inline int twl4030charger_usb_en(int enable) { return 0; } | |||
777 | 778 | ||
778 | /* INTERNAL LDOs */ | 779 | /* INTERNAL LDOs */ |
779 | #define TWL6030_REG_VRTC 47 | 780 | #define TWL6030_REG_VRTC 47 |
781 | #define TWL6030_REG_CLK32KG 48 | ||
780 | 782 | ||
781 | #endif /* End of __TWL4030_H */ | 783 | #endif /* End of __TWL4030_H */ |
diff --git a/include/linux/i2c/twl4030-madc.h b/include/linux/i2c/twl4030-madc.h new file mode 100644 index 000000000000..6427d298fbfc --- /dev/null +++ b/include/linux/i2c/twl4030-madc.h | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * twl4030_madc.h - Header for TWL4030 MADC | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * J Keerthy <j-keerthy@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * version 2 as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
19 | * 02110-1301 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef _TWL4030_MADC_H | ||
24 | #define _TWL4030_MADC_H | ||
25 | |||
26 | struct twl4030_madc_conversion_method { | ||
27 | u8 sel; | ||
28 | u8 avg; | ||
29 | u8 rbase; | ||
30 | u8 ctrl; | ||
31 | }; | ||
32 | |||
33 | #define TWL4030_MADC_MAX_CHANNELS 16 | ||
34 | |||
35 | |||
36 | /* | ||
37 | * twl4030_madc_request- madc request packet for channel conversion | ||
38 | * @channels: 16 bit bitmap for individual channels | ||
39 | * @do_avgP: sample the input channel for 4 consecutive cycles | ||
40 | * @method: RT, SW1, SW2 | ||
41 | * @type: Polling or interrupt based method | ||
42 | */ | ||
43 | |||
44 | struct twl4030_madc_request { | ||
45 | unsigned long channels; | ||
46 | u16 do_avg; | ||
47 | u16 method; | ||
48 | u16 type; | ||
49 | bool active; | ||
50 | bool result_pending; | ||
51 | int rbuf[TWL4030_MADC_MAX_CHANNELS]; | ||
52 | void (*func_cb)(int len, int channels, int *buf); | ||
53 | }; | ||
54 | |||
55 | enum conversion_methods { | ||
56 | TWL4030_MADC_RT, | ||
57 | TWL4030_MADC_SW1, | ||
58 | TWL4030_MADC_SW2, | ||
59 | TWL4030_MADC_NUM_METHODS | ||
60 | }; | ||
61 | |||
62 | enum sample_type { | ||
63 | TWL4030_MADC_WAIT, | ||
64 | TWL4030_MADC_IRQ_ONESHOT, | ||
65 | TWL4030_MADC_IRQ_REARM | ||
66 | }; | ||
67 | |||
68 | #define TWL4030_MADC_CTRL1 0x00 | ||
69 | #define TWL4030_MADC_CTRL2 0x01 | ||
70 | |||
71 | #define TWL4030_MADC_RTSELECT_LSB 0x02 | ||
72 | #define TWL4030_MADC_SW1SELECT_LSB 0x06 | ||
73 | #define TWL4030_MADC_SW2SELECT_LSB 0x0A | ||
74 | |||
75 | #define TWL4030_MADC_RTAVERAGE_LSB 0x04 | ||
76 | #define TWL4030_MADC_SW1AVERAGE_LSB 0x08 | ||
77 | #define TWL4030_MADC_SW2AVERAGE_LSB 0x0C | ||
78 | |||
79 | #define TWL4030_MADC_CTRL_SW1 0x12 | ||
80 | #define TWL4030_MADC_CTRL_SW2 0x13 | ||
81 | |||
82 | #define TWL4030_MADC_RTCH0_LSB 0x17 | ||
83 | #define TWL4030_MADC_GPCH0_LSB 0x37 | ||
84 | |||
85 | #define TWL4030_MADC_MADCON (1 << 0) /* MADC power on */ | ||
86 | #define TWL4030_MADC_BUSY (1 << 0) /* MADC busy */ | ||
87 | /* MADC conversion completion */ | ||
88 | #define TWL4030_MADC_EOC_SW (1 << 1) | ||
89 | /* MADC SWx start conversion */ | ||
90 | #define TWL4030_MADC_SW_START (1 << 5) | ||
91 | #define TWL4030_MADC_ADCIN0 (1 << 0) | ||
92 | #define TWL4030_MADC_ADCIN1 (1 << 1) | ||
93 | #define TWL4030_MADC_ADCIN2 (1 << 2) | ||
94 | #define TWL4030_MADC_ADCIN3 (1 << 3) | ||
95 | #define TWL4030_MADC_ADCIN4 (1 << 4) | ||
96 | #define TWL4030_MADC_ADCIN5 (1 << 5) | ||
97 | #define TWL4030_MADC_ADCIN6 (1 << 6) | ||
98 | #define TWL4030_MADC_ADCIN7 (1 << 7) | ||
99 | #define TWL4030_MADC_ADCIN8 (1 << 8) | ||
100 | #define TWL4030_MADC_ADCIN9 (1 << 9) | ||
101 | #define TWL4030_MADC_ADCIN10 (1 << 10) | ||
102 | #define TWL4030_MADC_ADCIN11 (1 << 11) | ||
103 | #define TWL4030_MADC_ADCIN12 (1 << 12) | ||
104 | #define TWL4030_MADC_ADCIN13 (1 << 13) | ||
105 | #define TWL4030_MADC_ADCIN14 (1 << 14) | ||
106 | #define TWL4030_MADC_ADCIN15 (1 << 15) | ||
107 | |||
108 | /* Fixed channels */ | ||
109 | #define TWL4030_MADC_BTEMP TWL4030_MADC_ADCIN1 | ||
110 | #define TWL4030_MADC_VBUS TWL4030_MADC_ADCIN8 | ||
111 | #define TWL4030_MADC_VBKB TWL4030_MADC_ADCIN9 | ||
112 | #define TWL4030_MADC_ICHG TWL4030_MADC_ADCIN10 | ||
113 | #define TWL4030_MADC_VCHG TWL4030_MADC_ADCIN11 | ||
114 | #define TWL4030_MADC_VBAT TWL4030_MADC_ADCIN12 | ||
115 | |||
116 | /* Step size and prescaler ratio */ | ||
117 | #define TEMP_STEP_SIZE 147 | ||
118 | #define TEMP_PSR_R 100 | ||
119 | #define CURR_STEP_SIZE 147 | ||
120 | #define CURR_PSR_R1 44 | ||
121 | #define CURR_PSR_R2 88 | ||
122 | |||
123 | #define TWL4030_BCI_BCICTL1 0x23 | ||
124 | #define TWL4030_BCI_CGAIN 0x020 | ||
125 | #define TWL4030_BCI_MESBAT (1 << 1) | ||
126 | #define TWL4030_BCI_TYPEN (1 << 4) | ||
127 | #define TWL4030_BCI_ITHEN (1 << 3) | ||
128 | |||
129 | #define REG_BCICTL2 0x024 | ||
130 | #define TWL4030_BCI_ITHSENS 0x007 | ||
131 | |||
132 | struct twl4030_madc_user_parms { | ||
133 | int channel; | ||
134 | int average; | ||
135 | int status; | ||
136 | u16 result; | ||
137 | }; | ||
138 | |||
139 | int twl4030_madc_conversion(struct twl4030_madc_request *conv); | ||
140 | int twl4030_get_madc_conversion(int channel_no); | ||
141 | #endif | ||
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9e7a12d6385d..a6deef4f4f67 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -826,7 +826,7 @@ static inline struct i2o_message __iomem *i2o_msg_in_to_virt(struct | |||
826 | * @c: I2O controller | 826 | * @c: I2O controller |
827 | * | 827 | * |
828 | * This function tries to get a message frame. If no message frame is | 828 | * This function tries to get a message frame. If no message frame is |
829 | * available do not wait until one is availabe (see also i2o_msg_get_wait). | 829 | * available do not wait until one is available (see also i2o_msg_get_wait). |
830 | * The returned pointer to the message frame is not in I/O memory, it is | 830 | * The returned pointer to the message frame is not in I/O memory, it is |
831 | * allocated from a mempool. But because a MFA is allocated from the | 831 | * allocated from a mempool. But because a MFA is allocated from the |
832 | * controller too it is guaranteed that i2o_msg_post() will never fail. | 832 | * controller too it is guaranteed that i2o_msg_post() will never fail. |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index fcef103aa3f6..c9ad38322576 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats { | |||
114 | __u16 tunnel_id; /* redundant */ | 114 | __u16 tunnel_id; /* redundant */ |
115 | __u16 session_id; /* if zero, get tunnel stats */ | 115 | __u16 session_id; /* if zero, get tunnel stats */ |
116 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ | 116 | __u32 using_ipsec:1; /* valid only for session_id == 0 */ |
117 | aligned_u64 tx_packets; | 117 | __aligned_u64 tx_packets; |
118 | aligned_u64 tx_bytes; | 118 | __aligned_u64 tx_bytes; |
119 | aligned_u64 tx_errors; | 119 | __aligned_u64 tx_errors; |
120 | aligned_u64 rx_packets; | 120 | __aligned_u64 rx_packets; |
121 | aligned_u64 rx_bytes; | 121 | __aligned_u64 rx_bytes; |
122 | aligned_u64 rx_seq_discards; | 122 | __aligned_u64 rx_seq_discards; |
123 | aligned_u64 rx_oos_packets; | 123 | __aligned_u64 rx_oos_packets; |
124 | aligned_u64 rx_errors; | 124 | __aligned_u64 rx_errors; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | #define ifr__name b.ifr_ifrn.ifrn_name | 127 | #define ifr__name b.ifr_ifrn.ifrn_name |
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 5e3dddf8f562..ce0b72464eb8 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h | |||
@@ -22,12 +22,12 @@ | |||
22 | * @poll: driver-supplied method that polls the device and posts | 22 | * @poll: driver-supplied method that polls the device and posts |
23 | * input events (mandatory). | 23 | * input events (mandatory). |
24 | * @poll_interval: specifies how often the poll() method should be called. | 24 | * @poll_interval: specifies how often the poll() method should be called. |
25 | * Defaults to 500 msec unless overriden when registering the device. | 25 | * Defaults to 500 msec unless overridden when registering the device. |
26 | * @poll_interval_max: specifies upper bound for the poll interval. | 26 | * @poll_interval_max: specifies upper bound for the poll interval. |
27 | * Defaults to the initial value of @poll_interval. | 27 | * Defaults to the initial value of @poll_interval. |
28 | * @poll_interval_min: specifies lower bound for the poll interval. | 28 | * @poll_interval_min: specifies lower bound for the poll interval. |
29 | * Defaults to 0. | 29 | * Defaults to 0. |
30 | * @input: input device structire associated with the polled device. | 30 | * @input: input device structure associated with the polled device. |
31 | * Must be properly initialized by the driver (id, name, phys, bits). | 31 | * Must be properly initialized by the driver (id, name, phys, bits). |
32 | * | 32 | * |
33 | * Polled input device provides a skeleton for supporting simple input | 33 | * Polled input device provides a skeleton for supporting simple input |
diff --git a/include/linux/input.h b/include/linux/input.h index e428382ca28a..771d6d85667d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -167,6 +167,7 @@ struct input_keymap_entry { | |||
167 | #define SYN_REPORT 0 | 167 | #define SYN_REPORT 0 |
168 | #define SYN_CONFIG 1 | 168 | #define SYN_CONFIG 1 |
169 | #define SYN_MT_REPORT 2 | 169 | #define SYN_MT_REPORT 2 |
170 | #define SYN_DROPPED 3 | ||
170 | 171 | ||
171 | /* | 172 | /* |
172 | * Keys and buttons | 173 | * Keys and buttons |
@@ -553,8 +554,8 @@ struct input_keymap_entry { | |||
553 | #define KEY_DVD 0x185 /* Media Select DVD */ | 554 | #define KEY_DVD 0x185 /* Media Select DVD */ |
554 | #define KEY_AUX 0x186 | 555 | #define KEY_AUX 0x186 |
555 | #define KEY_MP3 0x187 | 556 | #define KEY_MP3 0x187 |
556 | #define KEY_AUDIO 0x188 | 557 | #define KEY_AUDIO 0x188 /* AL Audio Browser */ |
557 | #define KEY_VIDEO 0x189 | 558 | #define KEY_VIDEO 0x189 /* AL Movie Browser */ |
558 | #define KEY_DIRECTORY 0x18a | 559 | #define KEY_DIRECTORY 0x18a |
559 | #define KEY_LIST 0x18b | 560 | #define KEY_LIST 0x18b |
560 | #define KEY_MEMO 0x18c /* Media Select Messages */ | 561 | #define KEY_MEMO 0x18c /* Media Select Messages */ |
@@ -603,8 +604,9 @@ struct input_keymap_entry { | |||
603 | #define KEY_FRAMEFORWARD 0x1b5 | 604 | #define KEY_FRAMEFORWARD 0x1b5 |
604 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | 605 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ |
605 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ | 606 | #define KEY_MEDIA_REPEAT 0x1b7 /* Consumer - transport control */ |
606 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ | 607 | #define KEY_10CHANNELSUP 0x1b8 /* 10 channels up (10+) */ |
607 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ | 608 | #define KEY_10CHANNELSDOWN 0x1b9 /* 10 channels down (10-) */ |
609 | #define KEY_IMAGES 0x1ba /* AL Image Browser */ | ||
608 | 610 | ||
609 | #define KEY_DEL_EOL 0x1c0 | 611 | #define KEY_DEL_EOL 0x1c0 |
610 | #define KEY_DEL_EOS 0x1c1 | 612 | #define KEY_DEL_EOS 0x1c1 |
@@ -664,6 +666,13 @@ struct input_keymap_entry { | |||
664 | #define KEY_TOUCHPAD_ON 0x213 | 666 | #define KEY_TOUCHPAD_ON 0x213 |
665 | #define KEY_TOUCHPAD_OFF 0x214 | 667 | #define KEY_TOUCHPAD_OFF 0x214 |
666 | 668 | ||
669 | #define KEY_CAMERA_ZOOMIN 0x215 | ||
670 | #define KEY_CAMERA_ZOOMOUT 0x216 | ||
671 | #define KEY_CAMERA_UP 0x217 | ||
672 | #define KEY_CAMERA_DOWN 0x218 | ||
673 | #define KEY_CAMERA_LEFT 0x219 | ||
674 | #define KEY_CAMERA_RIGHT 0x21a | ||
675 | |||
667 | #define BTN_TRIGGER_HAPPY 0x2c0 | 676 | #define BTN_TRIGGER_HAPPY 0x2c0 |
668 | #define BTN_TRIGGER_HAPPY1 0x2c0 | 677 | #define BTN_TRIGGER_HAPPY1 0x2c0 |
669 | #define BTN_TRIGGER_HAPPY2 0x2c1 | 678 | #define BTN_TRIGGER_HAPPY2 0x2c1 |
@@ -1154,8 +1163,6 @@ struct ff_effect { | |||
1154 | * sparse keymaps. If not supplied default mechanism will be used. | 1163 | * sparse keymaps. If not supplied default mechanism will be used. |
1155 | * The method is being called while holding event_lock and thus must | 1164 | * The method is being called while holding event_lock and thus must |
1156 | * not sleep | 1165 | * not sleep |
1157 | * @getkeycode_new: transition method | ||
1158 | * @setkeycode_new: transition method | ||
1159 | * @ff: force feedback structure associated with the device if device | 1166 | * @ff: force feedback structure associated with the device if device |
1160 | * supports force feedback effects | 1167 | * supports force feedback effects |
1161 | * @repeat_key: stores key code of the last key pressed; used to implement | 1168 | * @repeat_key: stores key code of the last key pressed; used to implement |
@@ -1234,14 +1241,10 @@ struct input_dev { | |||
1234 | void *keycode; | 1241 | void *keycode; |
1235 | 1242 | ||
1236 | int (*setkeycode)(struct input_dev *dev, | 1243 | int (*setkeycode)(struct input_dev *dev, |
1237 | unsigned int scancode, unsigned int keycode); | 1244 | const struct input_keymap_entry *ke, |
1245 | unsigned int *old_keycode); | ||
1238 | int (*getkeycode)(struct input_dev *dev, | 1246 | int (*getkeycode)(struct input_dev *dev, |
1239 | unsigned int scancode, unsigned int *keycode); | 1247 | struct input_keymap_entry *ke); |
1240 | int (*setkeycode_new)(struct input_dev *dev, | ||
1241 | const struct input_keymap_entry *ke, | ||
1242 | unsigned int *old_keycode); | ||
1243 | int (*getkeycode_new)(struct input_dev *dev, | ||
1244 | struct input_keymap_entry *ke); | ||
1245 | 1248 | ||
1246 | struct ff_device *ff; | 1249 | struct ff_device *ff; |
1247 | 1250 | ||
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h index b3ac06a4435d..318bb82325a6 100644 --- a/include/linux/input/mt.h +++ b/include/linux/input/mt.h | |||
@@ -48,6 +48,12 @@ static inline void input_mt_slot(struct input_dev *dev, int slot) | |||
48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); | 48 | input_event(dev, EV_ABS, ABS_MT_SLOT, slot); |
49 | } | 49 | } |
50 | 50 | ||
51 | static inline bool input_is_mt_axis(int axis) | ||
52 | { | ||
53 | return axis == ABS_MT_SLOT || | ||
54 | (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST); | ||
55 | } | ||
56 | |||
51 | void input_mt_report_slot_state(struct input_dev *dev, | 57 | void input_mt_report_slot_state(struct input_dev *dev, |
52 | unsigned int tool_type, bool active); | 58 | unsigned int tool_type, bool active); |
53 | 59 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 59b72ca1c5d1..bea0ac750712 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -98,7 +98,7 @@ typedef irqreturn_t (*irq_handler_t)(int, void *); | |||
98 | * @next: pointer to the next irqaction for shared interrupts | 98 | * @next: pointer to the next irqaction for shared interrupts |
99 | * @irq: interrupt number | 99 | * @irq: interrupt number |
100 | * @dir: pointer to the proc/irq/NN/name entry | 100 | * @dir: pointer to the proc/irq/NN/name entry |
101 | * @thread_fn: interupt handler function for threaded interrupts | 101 | * @thread_fn: interrupt handler function for threaded interrupts |
102 | * @thread: thread pointer for threaded interrupts | 102 | * @thread: thread pointer for threaded interrupts |
103 | * @thread_flags: flags related to @thread | 103 | * @thread_flags: flags related to @thread |
104 | * @thread_mask: bitmask for keeping track of @thread activity | 104 | * @thread_mask: bitmask for keeping track of @thread activity |
@@ -338,14 +338,6 @@ static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long | |||
338 | /* IRQ wakeup (PM) control: */ | 338 | /* IRQ wakeup (PM) control: */ |
339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); | 339 | extern int irq_set_irq_wake(unsigned int irq, unsigned int on); |
340 | 340 | ||
341 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
342 | /* Please do not use: Use the replacement functions instead */ | ||
343 | static inline int set_irq_wake(unsigned int irq, unsigned int on) | ||
344 | { | ||
345 | return irq_set_irq_wake(irq, on); | ||
346 | } | ||
347 | #endif | ||
348 | |||
349 | static inline int enable_irq_wake(unsigned int irq) | 341 | static inline int enable_irq_wake(unsigned int irq) |
350 | { | 342 | { |
351 | return irq_set_irq_wake(irq, 1); | 343 | return irq_set_irq_wake(irq, 1); |
@@ -492,7 +484,7 @@ extern void __send_remote_softirq(struct call_single_data *cp, int cpu, | |||
492 | Properties: | 484 | Properties: |
493 | * If tasklet_schedule() is called, then tasklet is guaranteed | 485 | * If tasklet_schedule() is called, then tasklet is guaranteed |
494 | to be executed on some cpu at least once after this. | 486 | to be executed on some cpu at least once after this. |
495 | * If the tasklet is already scheduled, but its excecution is still not | 487 | * If the tasklet is already scheduled, but its execution is still not |
496 | started, it will be executed only once. | 488 | started, it will be executed only once. |
497 | * If this tasklet is already running on another CPU (or schedule is called | 489 | * If this tasklet is already running on another CPU (or schedule is called |
498 | from tasklet itself), it is rescheduled for later. | 490 | from tasklet itself), it is rescheduled for later. |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 51952989ad42..a6d1655f9607 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/idr.h> | 5 | #include <linux/idr.h> |
6 | #include <linux/rwsem.h> | 6 | #include <linux/rwsem.h> |
7 | #include <linux/notifier.h> | 7 | #include <linux/notifier.h> |
8 | #include <linux/nsproxy.h> | ||
8 | 9 | ||
9 | /* | 10 | /* |
10 | * ipc namespace events | 11 | * ipc namespace events |
@@ -15,6 +16,7 @@ | |||
15 | 16 | ||
16 | #define IPCNS_CALLBACK_PRI 0 | 17 | #define IPCNS_CALLBACK_PRI 0 |
17 | 18 | ||
19 | struct user_namespace; | ||
18 | 20 | ||
19 | struct ipc_ids { | 21 | struct ipc_ids { |
20 | int in_use; | 22 | int in_use; |
@@ -56,6 +58,8 @@ struct ipc_namespace { | |||
56 | unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */ | 58 | unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */ |
57 | unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */ | 59 | unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */ |
58 | 60 | ||
61 | /* user_ns which owns the ipc ns */ | ||
62 | struct user_namespace *user_ns; | ||
59 | }; | 63 | }; |
60 | 64 | ||
61 | extern struct ipc_namespace init_ipc_ns; | 65 | extern struct ipc_namespace init_ipc_ns; |
@@ -90,7 +94,7 @@ static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } | |||
90 | 94 | ||
91 | #if defined(CONFIG_IPC_NS) | 95 | #if defined(CONFIG_IPC_NS) |
92 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | 96 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, |
93 | struct ipc_namespace *ns); | 97 | struct task_struct *tsk); |
94 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 98 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
95 | { | 99 | { |
96 | if (ns) | 100 | if (ns) |
@@ -101,12 +105,12 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | |||
101 | extern void put_ipc_ns(struct ipc_namespace *ns); | 105 | extern void put_ipc_ns(struct ipc_namespace *ns); |
102 | #else | 106 | #else |
103 | static inline struct ipc_namespace *copy_ipcs(unsigned long flags, | 107 | static inline struct ipc_namespace *copy_ipcs(unsigned long flags, |
104 | struct ipc_namespace *ns) | 108 | struct task_struct *tsk) |
105 | { | 109 | { |
106 | if (flags & CLONE_NEWIPC) | 110 | if (flags & CLONE_NEWIPC) |
107 | return ERR_PTR(-EINVAL); | 111 | return ERR_PTR(-EINVAL); |
108 | 112 | ||
109 | return ns; | 113 | return tsk->nsproxy->ipc_ns; |
110 | } | 114 | } |
111 | 115 | ||
112 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 116 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 045f2f275cd0..ca85cf894e33 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -111,7 +111,7 @@ struct ipmi_ipmb_addr { | |||
111 | * A LAN Address. This is an address to/from a LAN interface bridged | 111 | * A LAN Address. This is an address to/from a LAN interface bridged |
112 | * by the BMC, not an address actually out on the LAN. | 112 | * by the BMC, not an address actually out on the LAN. |
113 | * | 113 | * |
114 | * A concious decision was made here to deviate slightly from the IPMI | 114 | * A conscious decision was made here to deviate slightly from the IPMI |
115 | * spec. We do not use rqSWID and rsSWID like it shows in the | 115 | * spec. We do not use rqSWID and rsSWID like it shows in the |
116 | * message. Instead, we use remote_SWID and local_SWID. This means | 116 | * message. Instead, we use remote_SWID and local_SWID. This means |
117 | * that any message (a request or response) from another device will | 117 | * that any message (a request or response) from another device will |
@@ -259,7 +259,7 @@ struct ipmi_recv_msg { | |||
259 | void (*done)(struct ipmi_recv_msg *msg); | 259 | void (*done)(struct ipmi_recv_msg *msg); |
260 | 260 | ||
261 | /* Place-holder for the data, don't make any assumptions about | 261 | /* Place-holder for the data, don't make any assumptions about |
262 | the size or existance of this, since it may change. */ | 262 | the size or existence of this, since it may change. */ |
263 | unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; | 263 | unsigned char msg_data[IPMI_MAX_MSG_LENGTH]; |
264 | }; | 264 | }; |
265 | 265 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1d3577f30d45..09a308072f56 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
29 | #include <asm/irq_regs.h> | 29 | #include <asm/irq_regs.h> |
30 | 30 | ||
31 | struct seq_file; | ||
31 | struct irq_desc; | 32 | struct irq_desc; |
32 | struct irq_data; | 33 | struct irq_data; |
33 | typedef void (*irq_flow_handler_t)(unsigned int irq, | 34 | typedef void (*irq_flow_handler_t)(unsigned int irq, |
@@ -63,13 +64,6 @@ typedef void (*irq_preflow_handler_t)(struct irq_data *data); | |||
63 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) | 64 | * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set) |
64 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context | 65 | * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context |
65 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread | 66 | * IRQ_NESTED_TRHEAD - Interrupt nests into another thread |
66 | * | ||
67 | * Deprecated bits. They are kept updated as long as | ||
68 | * CONFIG_GENERIC_HARDIRQS_NO_COMPAT is not set. Will go away soon. These bits | ||
69 | * are internal state of the core code and if you really need to acces | ||
70 | * them then talk to the genirq maintainer instead of hacking | ||
71 | * something weird. | ||
72 | * | ||
73 | */ | 67 | */ |
74 | enum { | 68 | enum { |
75 | IRQ_TYPE_NONE = 0x00000000, | 69 | IRQ_TYPE_NONE = 0x00000000, |
@@ -91,18 +85,6 @@ enum { | |||
91 | IRQ_NO_BALANCING = (1 << 13), | 85 | IRQ_NO_BALANCING = (1 << 13), |
92 | IRQ_MOVE_PCNTXT = (1 << 14), | 86 | IRQ_MOVE_PCNTXT = (1 << 14), |
93 | IRQ_NESTED_THREAD = (1 << 15), | 87 | IRQ_NESTED_THREAD = (1 << 15), |
94 | |||
95 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
96 | IRQ_INPROGRESS = (1 << 16), | ||
97 | IRQ_REPLAY = (1 << 17), | ||
98 | IRQ_WAITING = (1 << 18), | ||
99 | IRQ_DISABLED = (1 << 19), | ||
100 | IRQ_PENDING = (1 << 20), | ||
101 | IRQ_MASKED = (1 << 21), | ||
102 | IRQ_MOVE_PENDING = (1 << 22), | ||
103 | IRQ_AFFINITY_SET = (1 << 23), | ||
104 | IRQ_WAKEUP = (1 << 24), | ||
105 | #endif | ||
106 | }; | 88 | }; |
107 | 89 | ||
108 | #define IRQF_MODIFY_MASK \ | 90 | #define IRQF_MODIFY_MASK \ |
@@ -134,7 +116,7 @@ struct msi_desc; | |||
134 | * struct irq_data - per irq and irq chip data passed down to chip functions | 116 | * struct irq_data - per irq and irq chip data passed down to chip functions |
135 | * @irq: interrupt number | 117 | * @irq: interrupt number |
136 | * @node: node index useful for balancing | 118 | * @node: node index useful for balancing |
137 | * @state_use_accessor: status information for irq chip functions. | 119 | * @state_use_accessors: status information for irq chip functions. |
138 | * Use accessor functions to deal with it | 120 | * Use accessor functions to deal with it |
139 | * @chip: low level interrupt hardware access | 121 | * @chip: low level interrupt hardware access |
140 | * @handler_data: per-IRQ data for the irq_chip methods | 122 | * @handler_data: per-IRQ data for the irq_chip methods |
@@ -173,6 +155,9 @@ struct irq_data { | |||
173 | * from suspend | 155 | * from suspend |
174 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process | 156 | * IRDQ_MOVE_PCNTXT - Interrupt can be moved in process |
175 | * context | 157 | * context |
158 | * IRQD_IRQ_DISABLED - Disabled state of the interrupt | ||
159 | * IRQD_IRQ_MASKED - Masked state of the interrupt | ||
160 | * IRQD_IRQ_INPROGRESS - In progress state of the interrupt | ||
176 | */ | 161 | */ |
177 | enum { | 162 | enum { |
178 | IRQD_TRIGGER_MASK = 0xf, | 163 | IRQD_TRIGGER_MASK = 0xf, |
@@ -183,6 +168,9 @@ enum { | |||
183 | IRQD_LEVEL = (1 << 13), | 168 | IRQD_LEVEL = (1 << 13), |
184 | IRQD_WAKEUP_STATE = (1 << 14), | 169 | IRQD_WAKEUP_STATE = (1 << 14), |
185 | IRQD_MOVE_PCNTXT = (1 << 15), | 170 | IRQD_MOVE_PCNTXT = (1 << 15), |
171 | IRQD_IRQ_DISABLED = (1 << 16), | ||
172 | IRQD_IRQ_MASKED = (1 << 17), | ||
173 | IRQD_IRQ_INPROGRESS = (1 << 18), | ||
186 | }; | 174 | }; |
187 | 175 | ||
188 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) | 176 | static inline bool irqd_is_setaffinity_pending(struct irq_data *d) |
@@ -205,6 +193,11 @@ static inline bool irqd_affinity_was_set(struct irq_data *d) | |||
205 | return d->state_use_accessors & IRQD_AFFINITY_SET; | 193 | return d->state_use_accessors & IRQD_AFFINITY_SET; |
206 | } | 194 | } |
207 | 195 | ||
196 | static inline void irqd_mark_affinity_was_set(struct irq_data *d) | ||
197 | { | ||
198 | d->state_use_accessors |= IRQD_AFFINITY_SET; | ||
199 | } | ||
200 | |||
208 | static inline u32 irqd_get_trigger_type(struct irq_data *d) | 201 | static inline u32 irqd_get_trigger_type(struct irq_data *d) |
209 | { | 202 | { |
210 | return d->state_use_accessors & IRQD_TRIGGER_MASK; | 203 | return d->state_use_accessors & IRQD_TRIGGER_MASK; |
@@ -234,6 +227,36 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
234 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; | 227 | return d->state_use_accessors & IRQD_MOVE_PCNTXT; |
235 | } | 228 | } |
236 | 229 | ||
230 | static inline bool irqd_irq_disabled(struct irq_data *d) | ||
231 | { | ||
232 | return d->state_use_accessors & IRQD_IRQ_DISABLED; | ||
233 | } | ||
234 | |||
235 | static inline bool irqd_irq_masked(struct irq_data *d) | ||
236 | { | ||
237 | return d->state_use_accessors & IRQD_IRQ_MASKED; | ||
238 | } | ||
239 | |||
240 | static inline bool irqd_irq_inprogress(struct irq_data *d) | ||
241 | { | ||
242 | return d->state_use_accessors & IRQD_IRQ_INPROGRESS; | ||
243 | } | ||
244 | |||
245 | /* | ||
246 | * Functions for chained handlers which can be enabled/disabled by the | ||
247 | * standard disable_irq/enable_irq calls. Must be called with | ||
248 | * irq_desc->lock held. | ||
249 | */ | ||
250 | static inline void irqd_set_chained_irq_inprogress(struct irq_data *d) | ||
251 | { | ||
252 | d->state_use_accessors |= IRQD_IRQ_INPROGRESS; | ||
253 | } | ||
254 | |||
255 | static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d) | ||
256 | { | ||
257 | d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; | ||
258 | } | ||
259 | |||
237 | /** | 260 | /** |
238 | * struct irq_chip - hardware interrupt chip descriptor | 261 | * struct irq_chip - hardware interrupt chip descriptor |
239 | * | 262 | * |
@@ -270,34 +293,15 @@ static inline bool irqd_can_move_in_process_context(struct irq_data *d) | |||
270 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ | 293 | * @irq_set_wake: enable/disable power-management wake-on of an IRQ |
271 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips | 294 | * @irq_bus_lock: function to lock access to slow bus (i2c) chips |
272 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips | 295 | * @irq_bus_sync_unlock:function to sync and unlock slow bus (i2c) chips |
296 | * @irq_cpu_online: configure an interrupt source for a secondary CPU | ||
297 | * @irq_cpu_offline: un-configure an interrupt source for a secondary CPU | ||
298 | * @irq_print_chip: optional to print special chip info in show_interrupts | ||
273 | * @flags: chip specific flags | 299 | * @flags: chip specific flags |
274 | * | 300 | * |
275 | * @release: release function solely used by UML | 301 | * @release: release function solely used by UML |
276 | */ | 302 | */ |
277 | struct irq_chip { | 303 | struct irq_chip { |
278 | const char *name; | 304 | const char *name; |
279 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
280 | unsigned int (*startup)(unsigned int irq); | ||
281 | void (*shutdown)(unsigned int irq); | ||
282 | void (*enable)(unsigned int irq); | ||
283 | void (*disable)(unsigned int irq); | ||
284 | |||
285 | void (*ack)(unsigned int irq); | ||
286 | void (*mask)(unsigned int irq); | ||
287 | void (*mask_ack)(unsigned int irq); | ||
288 | void (*unmask)(unsigned int irq); | ||
289 | void (*eoi)(unsigned int irq); | ||
290 | |||
291 | void (*end)(unsigned int irq); | ||
292 | int (*set_affinity)(unsigned int irq, | ||
293 | const struct cpumask *dest); | ||
294 | int (*retrigger)(unsigned int irq); | ||
295 | int (*set_type)(unsigned int irq, unsigned int flow_type); | ||
296 | int (*set_wake)(unsigned int irq, unsigned int on); | ||
297 | |||
298 | void (*bus_lock)(unsigned int irq); | ||
299 | void (*bus_sync_unlock)(unsigned int irq); | ||
300 | #endif | ||
301 | unsigned int (*irq_startup)(struct irq_data *data); | 305 | unsigned int (*irq_startup)(struct irq_data *data); |
302 | void (*irq_shutdown)(struct irq_data *data); | 306 | void (*irq_shutdown)(struct irq_data *data); |
303 | void (*irq_enable)(struct irq_data *data); | 307 | void (*irq_enable)(struct irq_data *data); |
@@ -317,6 +321,11 @@ struct irq_chip { | |||
317 | void (*irq_bus_lock)(struct irq_data *data); | 321 | void (*irq_bus_lock)(struct irq_data *data); |
318 | void (*irq_bus_sync_unlock)(struct irq_data *data); | 322 | void (*irq_bus_sync_unlock)(struct irq_data *data); |
319 | 323 | ||
324 | void (*irq_cpu_online)(struct irq_data *data); | ||
325 | void (*irq_cpu_offline)(struct irq_data *data); | ||
326 | |||
327 | void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); | ||
328 | |||
320 | unsigned long flags; | 329 | unsigned long flags; |
321 | 330 | ||
322 | /* Currently used only by UML, might disappear one day.*/ | 331 | /* Currently used only by UML, might disappear one day.*/ |
@@ -331,11 +340,14 @@ struct irq_chip { | |||
331 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() | 340 | * IRQCHIP_SET_TYPE_MASKED: Mask before calling chip.irq_set_type() |
332 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled | 341 | * IRQCHIP_EOI_IF_HANDLED: Only issue irq_eoi() when irq was handled |
333 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path | 342 | * IRQCHIP_MASK_ON_SUSPEND: Mask non wake irqs in the suspend path |
343 | * IRQCHIP_ONOFFLINE_ENABLED: Only call irq_on/off_line callbacks | ||
344 | * when irq enabled | ||
334 | */ | 345 | */ |
335 | enum { | 346 | enum { |
336 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 347 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
337 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), | 348 | IRQCHIP_EOI_IF_HANDLED = (1 << 1), |
338 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), | 349 | IRQCHIP_MASK_ON_SUSPEND = (1 << 2), |
350 | IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), | ||
339 | }; | 351 | }; |
340 | 352 | ||
341 | /* This include will go away once we isolated irq_desc usage to core code */ | 353 | /* This include will go away once we isolated irq_desc usage to core code */ |
@@ -360,25 +372,22 @@ struct irqaction; | |||
360 | extern int setup_irq(unsigned int irq, struct irqaction *new); | 372 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
361 | extern void remove_irq(unsigned int irq, struct irqaction *act); | 373 | extern void remove_irq(unsigned int irq, struct irqaction *act); |
362 | 374 | ||
375 | extern void irq_cpu_online(void); | ||
376 | extern void irq_cpu_offline(void); | ||
377 | extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); | ||
378 | |||
363 | #ifdef CONFIG_GENERIC_HARDIRQS | 379 | #ifdef CONFIG_GENERIC_HARDIRQS |
364 | 380 | ||
365 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) | 381 | #if defined(CONFIG_SMP) && defined(CONFIG_GENERIC_PENDING_IRQ) |
366 | void move_native_irq(int irq); | ||
367 | void move_masked_irq(int irq); | ||
368 | void irq_move_irq(struct irq_data *data); | 382 | void irq_move_irq(struct irq_data *data); |
369 | void irq_move_masked_irq(struct irq_data *data); | 383 | void irq_move_masked_irq(struct irq_data *data); |
370 | #else | 384 | #else |
371 | static inline void move_native_irq(int irq) { } | ||
372 | static inline void move_masked_irq(int irq) { } | ||
373 | static inline void irq_move_irq(struct irq_data *data) { } | 385 | static inline void irq_move_irq(struct irq_data *data) { } |
374 | static inline void irq_move_masked_irq(struct irq_data *data) { } | 386 | static inline void irq_move_masked_irq(struct irq_data *data) { } |
375 | #endif | 387 | #endif |
376 | 388 | ||
377 | extern int no_irq_affinity; | 389 | extern int no_irq_affinity; |
378 | 390 | ||
379 | /* Handle irq action chains: */ | ||
380 | extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | ||
381 | |||
382 | /* | 391 | /* |
383 | * Built-in IRQ handlers for various IRQ types, | 392 | * Built-in IRQ handlers for various IRQ types, |
384 | * callable via desc->handle_irq() | 393 | * callable via desc->handle_irq() |
@@ -386,6 +395,7 @@ extern irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action); | |||
386 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); | 395 | extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); |
387 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); | 396 | extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); |
388 | extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); | 397 | extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); |
398 | extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc); | ||
389 | extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); | 399 | extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); |
390 | extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); | 400 | extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); |
391 | extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); | 401 | extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); |
@@ -534,89 +544,6 @@ static inline struct msi_desc *irq_data_get_msi(struct irq_data *d) | |||
534 | return d->msi_desc; | 544 | return d->msi_desc; |
535 | } | 545 | } |
536 | 546 | ||
537 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
538 | /* Please do not use: Use the replacement functions instead */ | ||
539 | static inline int set_irq_chip(unsigned int irq, struct irq_chip *chip) | ||
540 | { | ||
541 | return irq_set_chip(irq, chip); | ||
542 | } | ||
543 | static inline int set_irq_data(unsigned int irq, void *data) | ||
544 | { | ||
545 | return irq_set_handler_data(irq, data); | ||
546 | } | ||
547 | static inline int set_irq_chip_data(unsigned int irq, void *data) | ||
548 | { | ||
549 | return irq_set_chip_data(irq, data); | ||
550 | } | ||
551 | static inline int set_irq_type(unsigned int irq, unsigned int type) | ||
552 | { | ||
553 | return irq_set_irq_type(irq, type); | ||
554 | } | ||
555 | static inline int set_irq_msi(unsigned int irq, struct msi_desc *entry) | ||
556 | { | ||
557 | return irq_set_msi_desc(irq, entry); | ||
558 | } | ||
559 | static inline struct irq_chip *get_irq_chip(unsigned int irq) | ||
560 | { | ||
561 | return irq_get_chip(irq); | ||
562 | } | ||
563 | static inline void *get_irq_chip_data(unsigned int irq) | ||
564 | { | ||
565 | return irq_get_chip_data(irq); | ||
566 | } | ||
567 | static inline void *get_irq_data(unsigned int irq) | ||
568 | { | ||
569 | return irq_get_handler_data(irq); | ||
570 | } | ||
571 | static inline void *irq_data_get_irq_data(struct irq_data *d) | ||
572 | { | ||
573 | return irq_data_get_irq_handler_data(d); | ||
574 | } | ||
575 | static inline struct msi_desc *get_irq_msi(unsigned int irq) | ||
576 | { | ||
577 | return irq_get_msi_desc(irq); | ||
578 | } | ||
579 | static inline void set_irq_noprobe(unsigned int irq) | ||
580 | { | ||
581 | irq_set_noprobe(irq); | ||
582 | } | ||
583 | static inline void set_irq_probe(unsigned int irq) | ||
584 | { | ||
585 | irq_set_probe(irq); | ||
586 | } | ||
587 | static inline void set_irq_nested_thread(unsigned int irq, int nest) | ||
588 | { | ||
589 | irq_set_nested_thread(irq, nest); | ||
590 | } | ||
591 | static inline void | ||
592 | set_irq_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, | ||
593 | irq_flow_handler_t handle, const char *name) | ||
594 | { | ||
595 | irq_set_chip_and_handler_name(irq, chip, handle, name); | ||
596 | } | ||
597 | static inline void | ||
598 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
599 | irq_flow_handler_t handle) | ||
600 | { | ||
601 | irq_set_chip_and_handler(irq, chip, handle); | ||
602 | } | ||
603 | static inline void | ||
604 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | ||
605 | const char *name) | ||
606 | { | ||
607 | __irq_set_handler(irq, handle, is_chained, name); | ||
608 | } | ||
609 | static inline void set_irq_handler(unsigned int irq, irq_flow_handler_t handle) | ||
610 | { | ||
611 | irq_set_handler(irq, handle); | ||
612 | } | ||
613 | static inline void | ||
614 | set_irq_chained_handler(unsigned int irq, irq_flow_handler_t handle) | ||
615 | { | ||
616 | irq_set_chained_handler(irq, handle); | ||
617 | } | ||
618 | #endif | ||
619 | |||
620 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); | 547 | int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); |
621 | void irq_free_descs(unsigned int irq, unsigned int cnt); | 548 | void irq_free_descs(unsigned int irq, unsigned int cnt); |
622 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); | 549 | int irq_reserve_irqs(unsigned int from, unsigned int cnt); |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 00218371518b..a082905b5ebe 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
@@ -35,32 +35,7 @@ struct timer_rand_state; | |||
35 | * @name: flow handler name for /proc/interrupts output | 35 | * @name: flow handler name for /proc/interrupts output |
36 | */ | 36 | */ |
37 | struct irq_desc { | 37 | struct irq_desc { |
38 | |||
39 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED | ||
40 | struct irq_data irq_data; | 38 | struct irq_data irq_data; |
41 | #else | ||
42 | /* | ||
43 | * This union will go away, once we fixed the direct access to | ||
44 | * irq_desc all over the place. The direct fields are a 1:1 | ||
45 | * overlay of irq_data. | ||
46 | */ | ||
47 | union { | ||
48 | struct irq_data irq_data; | ||
49 | struct { | ||
50 | unsigned int irq; | ||
51 | unsigned int node; | ||
52 | unsigned int pad_do_not_even_think_about_it; | ||
53 | struct irq_chip *chip; | ||
54 | void *handler_data; | ||
55 | void *chip_data; | ||
56 | struct msi_desc *msi_desc; | ||
57 | #ifdef CONFIG_SMP | ||
58 | cpumask_var_t affinity; | ||
59 | #endif | ||
60 | }; | ||
61 | }; | ||
62 | #endif | ||
63 | |||
64 | struct timer_rand_state *timer_rand_state; | 39 | struct timer_rand_state *timer_rand_state; |
65 | unsigned int __percpu *kstat_irqs; | 40 | unsigned int __percpu *kstat_irqs; |
66 | irq_flow_handler_t handle_irq; | 41 | irq_flow_handler_t handle_irq; |
@@ -68,11 +43,7 @@ struct irq_desc { | |||
68 | irq_preflow_handler_t preflow_handler; | 43 | irq_preflow_handler_t preflow_handler; |
69 | #endif | 44 | #endif |
70 | struct irqaction *action; /* IRQ action list */ | 45 | struct irqaction *action; /* IRQ action list */ |
71 | #ifdef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
72 | unsigned int status_use_accessors; | 46 | unsigned int status_use_accessors; |
73 | #else | ||
74 | unsigned int status; /* IRQ status */ | ||
75 | #endif | ||
76 | unsigned int core_internal_state__do_not_mess_with_it; | 47 | unsigned int core_internal_state__do_not_mess_with_it; |
77 | unsigned int depth; /* nested irq disables */ | 48 | unsigned int depth; /* nested irq disables */ |
78 | unsigned int wake_depth; /* nested wake enables */ | 49 | unsigned int wake_depth; /* nested wake enables */ |
@@ -100,13 +71,6 @@ struct irq_desc { | |||
100 | extern struct irq_desc irq_desc[NR_IRQS]; | 71 | extern struct irq_desc irq_desc[NR_IRQS]; |
101 | #endif | 72 | #endif |
102 | 73 | ||
103 | /* Will be removed once the last users in power and sh are gone */ | ||
104 | extern struct irq_desc *irq_to_desc_alloc_node(unsigned int irq, int node); | ||
105 | static inline struct irq_desc *move_irq_desc(struct irq_desc *desc, int node) | ||
106 | { | ||
107 | return desc; | ||
108 | } | ||
109 | |||
110 | #ifdef CONFIG_GENERIC_HARDIRQS | 74 | #ifdef CONFIG_GENERIC_HARDIRQS |
111 | 75 | ||
112 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) | 76 | static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) |
@@ -134,27 +98,6 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) | |||
134 | return desc->irq_data.msi_desc; | 98 | return desc->irq_data.msi_desc; |
135 | } | 99 | } |
136 | 100 | ||
137 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | ||
138 | static inline struct irq_chip *get_irq_desc_chip(struct irq_desc *desc) | ||
139 | { | ||
140 | return irq_desc_get_chip(desc); | ||
141 | } | ||
142 | static inline void *get_irq_desc_data(struct irq_desc *desc) | ||
143 | { | ||
144 | return irq_desc_get_handler_data(desc); | ||
145 | } | ||
146 | |||
147 | static inline void *get_irq_desc_chip_data(struct irq_desc *desc) | ||
148 | { | ||
149 | return irq_desc_get_chip_data(desc); | ||
150 | } | ||
151 | |||
152 | static inline struct msi_desc *get_irq_desc_msi(struct irq_desc *desc) | ||
153 | { | ||
154 | return irq_desc_get_msi_desc(desc); | ||
155 | } | ||
156 | #endif | ||
157 | |||
158 | /* | 101 | /* |
159 | * Architectures call this to let the generic IRQ layer | 102 | * Architectures call this to let the generic IRQ layer |
160 | * handle an interrupt. If the descriptor is attached to an | 103 | * handle an interrupt. If the descriptor is attached to an |
@@ -178,24 +121,44 @@ static inline int irq_has_action(unsigned int irq) | |||
178 | return desc->action != NULL; | 121 | return desc->action != NULL; |
179 | } | 122 | } |
180 | 123 | ||
181 | #ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT | 124 | /* caller has locked the irq_desc and both params are valid */ |
182 | static inline int irq_balancing_disabled(unsigned int irq) | 125 | static inline void __irq_set_handler_locked(unsigned int irq, |
126 | irq_flow_handler_t handler) | ||
183 | { | 127 | { |
184 | struct irq_desc *desc; | 128 | struct irq_desc *desc; |
185 | 129 | ||
186 | desc = irq_to_desc(irq); | 130 | desc = irq_to_desc(irq); |
187 | return desc->status & IRQ_NO_BALANCING_MASK; | 131 | desc->handle_irq = handler; |
188 | } | 132 | } |
189 | #endif | ||
190 | 133 | ||
191 | /* caller has locked the irq_desc and both params are valid */ | 134 | /* caller has locked the irq_desc and both params are valid */ |
192 | static inline void __set_irq_handler_unlocked(int irq, | 135 | static inline void |
193 | irq_flow_handler_t handler) | 136 | __irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, |
137 | irq_flow_handler_t handler, const char *name) | ||
194 | { | 138 | { |
195 | struct irq_desc *desc; | 139 | struct irq_desc *desc; |
196 | 140 | ||
197 | desc = irq_to_desc(irq); | 141 | desc = irq_to_desc(irq); |
142 | irq_desc_get_irq_data(desc)->chip = chip; | ||
198 | desc->handle_irq = handler; | 143 | desc->handle_irq = handler; |
144 | desc->name = name; | ||
145 | } | ||
146 | |||
147 | static inline int irq_balancing_disabled(unsigned int irq) | ||
148 | { | ||
149 | struct irq_desc *desc; | ||
150 | |||
151 | desc = irq_to_desc(irq); | ||
152 | return desc->status_use_accessors & IRQ_NO_BALANCING_MASK; | ||
153 | } | ||
154 | |||
155 | static inline void | ||
156 | irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) | ||
157 | { | ||
158 | struct irq_desc *desc = irq_to_desc(irq); | ||
159 | |||
160 | if (desc) | ||
161 | lockdep_set_class(&desc->lock, class); | ||
199 | } | 162 | } |
200 | 163 | ||
201 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI | 164 | #ifdef CONFIG_IRQ_PREFLOW_FASTEOI |
diff --git a/include/linux/isdn/hdlc.h b/include/linux/isdn/hdlc.h index 4b3ecc40889a..96521370c782 100644 --- a/include/linux/isdn/hdlc.h +++ b/include/linux/isdn/hdlc.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * hdlc.h -- General purpose ISDN HDLC decoder. | 2 | * hdlc.h -- General purpose ISDN HDLC decoder. |
3 | * | 3 | * |
4 | * Implementation of a HDLC decoder/encoder in software. | 4 | * Implementation of a HDLC decoder/encoder in software. |
5 | * Neccessary because some ISDN devices don't have HDLC | 5 | * Necessary because some ISDN devices don't have HDLC |
6 | * controllers. | 6 | * controllers. |
7 | * | 7 | * |
8 | * Copyright (C) | 8 | * Copyright (C) |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index 88b45895746d..94ab5e942e53 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
@@ -50,7 +50,7 @@ | |||
50 | * IOCTL's used for the Quicknet Telephony Cards | 50 | * IOCTL's used for the Quicknet Telephony Cards |
51 | * | 51 | * |
52 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to | 52 | * If you use the IXJCTL_TESTRAM command, the card must be power cycled to |
53 | * reset the SRAM values before futher use. | 53 | * reset the SRAM values before further use. |
54 | * | 54 | * |
55 | ******************************************************************************/ | 55 | ******************************************************************************/ |
56 | 56 | ||
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 27e79c27ba08..a32dcaec04e1 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -432,13 +432,35 @@ struct jbd2_journal_handle | |||
432 | int h_err; | 432 | int h_err; |
433 | 433 | ||
434 | /* Flags [no locking] */ | 434 | /* Flags [no locking] */ |
435 | unsigned int h_sync: 1; /* sync-on-close */ | 435 | unsigned int h_sync:1; /* sync-on-close */ |
436 | unsigned int h_jdata: 1; /* force data journaling */ | 436 | unsigned int h_jdata:1; /* force data journaling */ |
437 | unsigned int h_aborted: 1; /* fatal error on handle */ | 437 | unsigned int h_aborted:1; /* fatal error on handle */ |
438 | unsigned int h_cowing:1; /* COWing block to snapshot */ | ||
439 | |||
440 | /* Number of buffers requested by user: | ||
441 | * (before adding the COW credits factor) */ | ||
442 | unsigned int h_base_credits:14; | ||
443 | |||
444 | /* Number of buffers the user is allowed to dirty: | ||
445 | * (counts only buffers dirtied when !h_cowing) */ | ||
446 | unsigned int h_user_credits:14; | ||
447 | |||
438 | 448 | ||
439 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 449 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
440 | struct lockdep_map h_lockdep_map; | 450 | struct lockdep_map h_lockdep_map; |
441 | #endif | 451 | #endif |
452 | |||
453 | #ifdef CONFIG_JBD2_DEBUG | ||
454 | /* COW debugging counters: */ | ||
455 | unsigned int h_cow_moved; /* blocks moved to snapshot */ | ||
456 | unsigned int h_cow_copied; /* blocks copied to snapshot */ | ||
457 | unsigned int h_cow_ok_jh; /* blocks already COWed during current | ||
458 | transaction */ | ||
459 | unsigned int h_cow_ok_bitmap; /* blocks not set in COW bitmap */ | ||
460 | unsigned int h_cow_ok_mapped;/* blocks already mapped in snapshot */ | ||
461 | unsigned int h_cow_bitmaps; /* COW bitmaps created */ | ||
462 | unsigned int h_cow_excluded; /* blocks set in exclude bitmap */ | ||
463 | #endif | ||
442 | }; | 464 | }; |
443 | 465 | ||
444 | 466 | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 922aa313c9f9..f97672a36fa8 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -42,7 +42,7 @@ | |||
42 | /* LATCH is used in the interval timer and ftape setup. */ | 42 | /* LATCH is used in the interval timer and ftape setup. */ |
43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 43 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
44 | 44 | ||
45 | /* Suppose we want to devide two numbers NOM and DEN: NOM/DEN, then we can | 45 | /* Suppose we want to divide two numbers NOM and DEN: NOM/DEN, then we can |
46 | * improve accuracy by shifting LSH bits, hence calculating: | 46 | * improve accuracy by shifting LSH bits, hence calculating: |
47 | * (NOM << LSH) / DEN | 47 | * (NOM << LSH) / DEN |
48 | * This however means trouble for large NOM, because (NOM << LSH) may no | 48 | * This however means trouble for large NOM, because (NOM << LSH) may no |
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 525aac3c97df..44e95d0a721f 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
@@ -41,6 +41,13 @@ struct journal_head { | |||
41 | unsigned b_modified; | 41 | unsigned b_modified; |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * This feild tracks the last transaction id in which this buffer | ||
45 | * has been cowed | ||
46 | * [jbd_lock_bh_state()] | ||
47 | */ | ||
48 | unsigned b_cow_tid; | ||
49 | |||
50 | /* | ||
44 | * Copy of the buffer data frozen for writing to the log. | 51 | * Copy of the buffer data frozen for writing to the log. |
45 | * [jbd_lock_bh_state()] | 52 | * [jbd_lock_bh_state()] |
46 | */ | 53 | */ |
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index d8e9b3d1c23c..0df513b7a9f8 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h | |||
@@ -36,6 +36,7 @@ const char *kallsyms_lookup(unsigned long addr, | |||
36 | 36 | ||
37 | /* Look up a kernel symbol and return it in a text buffer. */ | 37 | /* Look up a kernel symbol and return it in a text buffer. */ |
38 | extern int sprint_symbol(char *buffer, unsigned long address); | 38 | extern int sprint_symbol(char *buffer, unsigned long address); |
39 | extern int sprint_backtrace(char *buffer, unsigned long address); | ||
39 | 40 | ||
40 | /* Look up a kernel symbol and print it to the kernel messages. */ | 41 | /* Look up a kernel symbol and print it to the kernel messages. */ |
41 | extern void __print_symbol(const char *fmt, unsigned long address); | 42 | extern void __print_symbol(const char *fmt, unsigned long address); |
@@ -79,6 +80,12 @@ static inline int sprint_symbol(char *buffer, unsigned long addr) | |||
79 | return 0; | 80 | return 0; |
80 | } | 81 | } |
81 | 82 | ||
83 | static inline int sprint_backtrace(char *buffer, unsigned long addr) | ||
84 | { | ||
85 | *buffer = '\0'; | ||
86 | return 0; | ||
87 | } | ||
88 | |||
82 | static inline int lookup_symbol_name(unsigned long addr, char *symname) | 89 | static inline int lookup_symbol_name(unsigned long addr, char *symname) |
83 | { | 90 | { |
84 | return -ERANGE; | 91 | return -ERANGE; |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 4b0761cc7dd9..ec2d17bc1f1e 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -159,7 +159,7 @@ static inline void con_schedule_flip(struct tty_struct *t) | |||
159 | if (t->buf.tail != NULL) | 159 | if (t->buf.tail != NULL) |
160 | t->buf.tail->commit = t->buf.tail->used; | 160 | t->buf.tail->commit = t->buf.tail->used; |
161 | spin_unlock_irqrestore(&t->buf.lock, flags); | 161 | spin_unlock_irqrestore(&t->buf.lock, flags); |
162 | schedule_delayed_work(&t->buf.work, 0); | 162 | schedule_work(&t->buf.work); |
163 | } | 163 | } |
164 | 164 | ||
165 | #endif | 165 | #endif |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 2fe6e84894a4..00cec4dc0ae2 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -187,14 +187,76 @@ NORET_TYPE void do_exit(long error_code) | |||
187 | ATTRIB_NORET; | 187 | ATTRIB_NORET; |
188 | NORET_TYPE void complete_and_exit(struct completion *, long) | 188 | NORET_TYPE void complete_and_exit(struct completion *, long) |
189 | ATTRIB_NORET; | 189 | ATTRIB_NORET; |
190 | |||
191 | /* Internal, do not use. */ | ||
192 | int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res); | ||
193 | int __must_check _kstrtol(const char *s, unsigned int base, long *res); | ||
194 | |||
195 | int __must_check kstrtoull(const char *s, unsigned int base, unsigned long long *res); | ||
196 | int __must_check kstrtoll(const char *s, unsigned int base, long long *res); | ||
197 | static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res) | ||
198 | { | ||
199 | /* | ||
200 | * We want to shortcut function call, but | ||
201 | * __builtin_types_compatible_p(unsigned long, unsigned long long) = 0. | ||
202 | */ | ||
203 | if (sizeof(unsigned long) == sizeof(unsigned long long) && | ||
204 | __alignof__(unsigned long) == __alignof__(unsigned long long)) | ||
205 | return kstrtoull(s, base, (unsigned long long *)res); | ||
206 | else | ||
207 | return _kstrtoul(s, base, res); | ||
208 | } | ||
209 | |||
210 | static inline int __must_check kstrtol(const char *s, unsigned int base, long *res) | ||
211 | { | ||
212 | /* | ||
213 | * We want to shortcut function call, but | ||
214 | * __builtin_types_compatible_p(long, long long) = 0. | ||
215 | */ | ||
216 | if (sizeof(long) == sizeof(long long) && | ||
217 | __alignof__(long) == __alignof__(long long)) | ||
218 | return kstrtoll(s, base, (long long *)res); | ||
219 | else | ||
220 | return _kstrtol(s, base, res); | ||
221 | } | ||
222 | |||
223 | int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res); | ||
224 | int __must_check kstrtoint(const char *s, unsigned int base, int *res); | ||
225 | |||
226 | static inline int __must_check kstrtou64(const char *s, unsigned int base, u64 *res) | ||
227 | { | ||
228 | return kstrtoull(s, base, res); | ||
229 | } | ||
230 | |||
231 | static inline int __must_check kstrtos64(const char *s, unsigned int base, s64 *res) | ||
232 | { | ||
233 | return kstrtoll(s, base, res); | ||
234 | } | ||
235 | |||
236 | static inline int __must_check kstrtou32(const char *s, unsigned int base, u32 *res) | ||
237 | { | ||
238 | return kstrtouint(s, base, res); | ||
239 | } | ||
240 | |||
241 | static inline int __must_check kstrtos32(const char *s, unsigned int base, s32 *res) | ||
242 | { | ||
243 | return kstrtoint(s, base, res); | ||
244 | } | ||
245 | |||
246 | int __must_check kstrtou16(const char *s, unsigned int base, u16 *res); | ||
247 | int __must_check kstrtos16(const char *s, unsigned int base, s16 *res); | ||
248 | int __must_check kstrtou8(const char *s, unsigned int base, u8 *res); | ||
249 | int __must_check kstrtos8(const char *s, unsigned int base, s8 *res); | ||
250 | |||
190 | extern unsigned long simple_strtoul(const char *,char **,unsigned int); | 251 | extern unsigned long simple_strtoul(const char *,char **,unsigned int); |
191 | extern long simple_strtol(const char *,char **,unsigned int); | 252 | extern long simple_strtol(const char *,char **,unsigned int); |
192 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); | 253 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); |
193 | extern long long simple_strtoll(const char *,char **,unsigned int); | 254 | extern long long simple_strtoll(const char *,char **,unsigned int); |
194 | extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *); | 255 | #define strict_strtoul kstrtoul |
195 | extern int __must_check strict_strtol(const char *, unsigned int, long *); | 256 | #define strict_strtol kstrtol |
196 | extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *); | 257 | #define strict_strtoull kstrtoull |
197 | extern int __must_check strict_strtoll(const char *, unsigned int, long long *); | 258 | #define strict_strtoll kstrtoll |
259 | |||
198 | extern int sprintf(char * buf, const char * fmt, ...) | 260 | extern int sprintf(char * buf, const char * fmt, ...) |
199 | __attribute__ ((format (printf, 2, 3))); | 261 | __attribute__ ((format (printf, 2, 3))); |
200 | extern int vsprintf(char *buf, const char *, va_list) | 262 | extern int vsprintf(char *buf, const char *, va_list) |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index 03e8e8dbc577..c2478a342cd7 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -208,6 +208,7 @@ int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, | |||
208 | unsigned long long *crash_size, unsigned long long *crash_base); | 208 | unsigned long long *crash_size, unsigned long long *crash_base); |
209 | int crash_shrink_memory(unsigned long new_size); | 209 | int crash_shrink_memory(unsigned long new_size); |
210 | size_t crash_get_memory_size(void); | 210 | size_t crash_get_memory_size(void); |
211 | void crash_free_reserved_phys_range(unsigned long begin, unsigned long end); | ||
211 | 212 | ||
212 | #else /* !CONFIG_KEXEC */ | 213 | #else /* !CONFIG_KEXEC */ |
213 | struct pt_regs; | 214 | struct pt_regs; |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 092e4250a458..10ca03d0a250 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -297,6 +297,7 @@ extern int | |||
297 | kgdb_handle_exception(int ex_vector, int signo, int err_code, | 297 | kgdb_handle_exception(int ex_vector, int signo, int err_code, |
298 | struct pt_regs *regs); | 298 | struct pt_regs *regs); |
299 | extern int kgdb_nmicallback(int cpu, void *regs); | 299 | extern int kgdb_nmicallback(int cpu, void *regs); |
300 | extern void gdbstub_exit(int status); | ||
300 | 301 | ||
301 | extern int kgdb_single_step; | 302 | extern int kgdb_single_step; |
302 | extern atomic_t kgdb_active; | 303 | extern atomic_t kgdb_active; |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 7ff16f7d3ed4..1e923e5e88e8 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -4,10 +4,15 @@ | |||
4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
5 | #include <linux/sched.h> | 5 | #include <linux/sched.h> |
6 | 6 | ||
7 | struct task_struct *kthread_create(int (*threadfn)(void *data), | 7 | struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), |
8 | void *data, | 8 | void *data, |
9 | const char namefmt[], ...) | 9 | int node, |
10 | __attribute__((format(printf, 3, 4))); | 10 | const char namefmt[], ...) |
11 | __attribute__((format(printf, 4, 5))); | ||
12 | |||
13 | #define kthread_create(threadfn, data, namefmt, arg...) \ | ||
14 | kthread_create_on_node(threadfn, data, -1, namefmt, ##arg) | ||
15 | |||
11 | 16 | ||
12 | /** | 17 | /** |
13 | * kthread_run - create and wake a thread. | 18 | * kthread_run - create and wake a thread. |
@@ -34,6 +39,7 @@ void *kthread_data(struct task_struct *k); | |||
34 | 39 | ||
35 | int kthreadd(void *unused); | 40 | int kthreadd(void *unused); |
36 | extern struct task_struct *kthreadd_task; | 41 | extern struct task_struct *kthreadd_task; |
42 | extern int tsk_fork_get_node(struct task_struct *tsk); | ||
37 | 43 | ||
38 | /* | 44 | /* |
39 | * Simple work processor based on kthread. | 45 | * Simple work processor based on kthread. |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index e1ceaa9b36bb..603bec2913b0 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -35,7 +35,7 @@ | |||
35 | * | 35 | * |
36 | * On 32-bit CPUs an optimized representation of the timespec structure | 36 | * On 32-bit CPUs an optimized representation of the timespec structure |
37 | * is used to avoid expensive conversions from and to timespecs. The | 37 | * is used to avoid expensive conversions from and to timespecs. The |
38 | * endian-aware order of the tv struct members is choosen to allow | 38 | * endian-aware order of the tv struct members is chosen to allow |
39 | * mathematical operations on the tv64 member of the union too, which | 39 | * mathematical operations on the tv64 member of the union too, which |
40 | * for certain operations produces better code. | 40 | * for certain operations produces better code. |
41 | * | 41 | * |
@@ -158,7 +158,7 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | |||
158 | * @lhs: minuend | 158 | * @lhs: minuend |
159 | * @rhs: subtrahend | 159 | * @rhs: subtrahend |
160 | * | 160 | * |
161 | * Returns the remainder of the substraction | 161 | * Returns the remainder of the subtraction |
162 | */ | 162 | */ |
163 | static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | 163 | static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) |
164 | { | 164 | { |
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h new file mode 100644 index 000000000000..58592fa67d24 --- /dev/null +++ b/include/linux/led-lm3530.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 ST-Ericsson SA. | ||
3 | * Copyright (C) 2009 Motorola, Inc. | ||
4 | * | ||
5 | * License Terms: GNU General Public License v2 | ||
6 | * | ||
7 | * Simple driver for National Semiconductor LM35330 Backlight driver chip | ||
8 | * | ||
9 | * Author: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com> | ||
10 | * based on leds-lm3530.c by Dan Murphy <D.Murphy@motorola.com> | ||
11 | */ | ||
12 | |||
13 | #ifndef _LINUX_LED_LM3530_H__ | ||
14 | #define _LINUX_LED_LM3530_H__ | ||
15 | |||
16 | #define LM3530_FS_CURR_5mA (0) /* Full Scale Current */ | ||
17 | #define LM3530_FS_CURR_8mA (1) | ||
18 | #define LM3530_FS_CURR_12mA (2) | ||
19 | #define LM3530_FS_CURR_15mA (3) | ||
20 | #define LM3530_FS_CURR_19mA (4) | ||
21 | #define LM3530_FS_CURR_22mA (5) | ||
22 | #define LM3530_FS_CURR_26mA (6) | ||
23 | #define LM3530_FS_CURR_29mA (7) | ||
24 | |||
25 | #define LM3530_ALS_AVRG_TIME_32ms (0) /* ALS Averaging Time */ | ||
26 | #define LM3530_ALS_AVRG_TIME_64ms (1) | ||
27 | #define LM3530_ALS_AVRG_TIME_128ms (2) | ||
28 | #define LM3530_ALS_AVRG_TIME_256ms (3) | ||
29 | #define LM3530_ALS_AVRG_TIME_512ms (4) | ||
30 | #define LM3530_ALS_AVRG_TIME_1024ms (5) | ||
31 | #define LM3530_ALS_AVRG_TIME_2048ms (6) | ||
32 | #define LM3530_ALS_AVRG_TIME_4096ms (7) | ||
33 | |||
34 | #define LM3530_RAMP_TIME_1ms (0) /* Brigtness Ramp Time */ | ||
35 | #define LM3530_RAMP_TIME_130ms (1) /* Max to 0 and vice versa */ | ||
36 | #define LM3530_RAMP_TIME_260ms (2) | ||
37 | #define LM3530_RAMP_TIME_520ms (3) | ||
38 | #define LM3530_RAMP_TIME_1s (4) | ||
39 | #define LM3530_RAMP_TIME_2s (5) | ||
40 | #define LM3530_RAMP_TIME_4s (6) | ||
41 | #define LM3530_RAMP_TIME_8s (7) | ||
42 | |||
43 | /* ALS Resistor Select */ | ||
44 | #define LM3530_ALS_IMPD_Z (0x00) /* ALS Impedance */ | ||
45 | #define LM3530_ALS_IMPD_13_53kOhm (0x01) | ||
46 | #define LM3530_ALS_IMPD_9_01kOhm (0x02) | ||
47 | #define LM3530_ALS_IMPD_5_41kOhm (0x03) | ||
48 | #define LM3530_ALS_IMPD_2_27kOhm (0x04) | ||
49 | #define LM3530_ALS_IMPD_1_94kOhm (0x05) | ||
50 | #define LM3530_ALS_IMPD_1_81kOhm (0x06) | ||
51 | #define LM3530_ALS_IMPD_1_6kOhm (0x07) | ||
52 | #define LM3530_ALS_IMPD_1_138kOhm (0x08) | ||
53 | #define LM3530_ALS_IMPD_1_05kOhm (0x09) | ||
54 | #define LM3530_ALS_IMPD_1_011kOhm (0x0A) | ||
55 | #define LM3530_ALS_IMPD_941Ohm (0x0B) | ||
56 | #define LM3530_ALS_IMPD_759Ohm (0x0C) | ||
57 | #define LM3530_ALS_IMPD_719Ohm (0x0D) | ||
58 | #define LM3530_ALS_IMPD_700Ohm (0x0E) | ||
59 | #define LM3530_ALS_IMPD_667Ohm (0x0F) | ||
60 | |||
61 | enum lm3530_mode { | ||
62 | LM3530_BL_MODE_MANUAL = 0, /* "man" */ | ||
63 | LM3530_BL_MODE_ALS, /* "als" */ | ||
64 | LM3530_BL_MODE_PWM, /* "pwm" */ | ||
65 | }; | ||
66 | |||
67 | /* ALS input select */ | ||
68 | enum lm3530_als_mode { | ||
69 | LM3530_INPUT_AVRG = 0, /* ALS1 and ALS2 input average */ | ||
70 | LM3530_INPUT_ALS1, /* ALS1 Input */ | ||
71 | LM3530_INPUT_ALS2, /* ALS2 Input */ | ||
72 | LM3530_INPUT_CEIL, /* Max of ALS1 and ALS2 */ | ||
73 | }; | ||
74 | |||
75 | /** | ||
76 | * struct lm3530_platform_data | ||
77 | * @mode: mode of operation i.e. Manual, ALS or PWM | ||
78 | * @als_input_mode: select source of ALS input - ALS1/2 or average | ||
79 | * @max_current: full scale LED current | ||
80 | * @pwm_pol_hi: PWM input polarity - active high/active low | ||
81 | * @als_avrg_time: ALS input averaging time | ||
82 | * @brt_ramp_law: brightness mapping mode - exponential/linear | ||
83 | * @brt_ramp_fall: rate of fall of led current | ||
84 | * @brt_ramp_rise: rate of rise of led current | ||
85 | * @als1_resistor_sel: internal resistance from ALS1 input to ground | ||
86 | * @als2_resistor_sel: internal resistance from ALS2 input to ground | ||
87 | * @brt_val: brightness value (0-255) | ||
88 | */ | ||
89 | struct lm3530_platform_data { | ||
90 | enum lm3530_mode mode; | ||
91 | enum lm3530_als_mode als_input_mode; | ||
92 | |||
93 | u8 max_current; | ||
94 | bool pwm_pol_hi; | ||
95 | u8 als_avrg_time; | ||
96 | |||
97 | bool brt_ramp_law; | ||
98 | u8 brt_ramp_fall; | ||
99 | u8 brt_ramp_rise; | ||
100 | |||
101 | u8 als1_resistor_sel; | ||
102 | u8 als2_resistor_sel; | ||
103 | |||
104 | u8 brt_val; | ||
105 | }; | ||
106 | |||
107 | #endif /* _LINUX_LED_LM3530_H__ */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 0f19df9e37b0..61e0340a4b77 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -145,6 +145,9 @@ extern void led_trigger_register_simple(const char *name, | |||
145 | extern void led_trigger_unregister_simple(struct led_trigger *trigger); | 145 | extern void led_trigger_unregister_simple(struct led_trigger *trigger); |
146 | extern void led_trigger_event(struct led_trigger *trigger, | 146 | extern void led_trigger_event(struct led_trigger *trigger, |
147 | enum led_brightness event); | 147 | enum led_brightness event); |
148 | extern void led_trigger_blink(struct led_trigger *trigger, | ||
149 | unsigned long *delay_on, | ||
150 | unsigned long *delay_off); | ||
148 | 151 | ||
149 | #else | 152 | #else |
150 | 153 | ||
@@ -194,11 +197,11 @@ struct gpio_led { | |||
194 | 197 | ||
195 | struct gpio_led_platform_data { | 198 | struct gpio_led_platform_data { |
196 | int num_leds; | 199 | int num_leds; |
197 | struct gpio_led *leds; | 200 | const struct gpio_led *leds; |
198 | 201 | ||
199 | #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ | 202 | #define GPIO_LED_NO_BLINK_LOW 0 /* No blink GPIO state low */ |
200 | #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ | 203 | #define GPIO_LED_NO_BLINK_HIGH 1 /* No blink GPIO state high */ |
201 | #define GPIO_LED_BLINK 2 /* Plase, blink */ | 204 | #define GPIO_LED_BLINK 2 /* Please, blink */ |
202 | int (*gpio_blink_set)(unsigned gpio, int state, | 205 | int (*gpio_blink_set)(unsigned gpio, int state, |
203 | unsigned long *delay_on, | 206 | unsigned long *delay_on, |
204 | unsigned long *delay_off); | 207 | unsigned long *delay_off); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index c71f46960f39..04f32a3eb26b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -137,8 +137,6 @@ enum { | |||
137 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ | 137 | ATA_DFLAG_ACPI_PENDING = (1 << 5), /* ACPI resume action pending */ |
138 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ | 138 | ATA_DFLAG_ACPI_FAILED = (1 << 6), /* ACPI on devcfg has failed */ |
139 | ATA_DFLAG_AN = (1 << 7), /* AN configured */ | 139 | ATA_DFLAG_AN = (1 << 7), /* AN configured */ |
140 | ATA_DFLAG_HIPM = (1 << 8), /* device supports HIPM */ | ||
141 | ATA_DFLAG_DIPM = (1 << 9), /* device supports DIPM */ | ||
142 | ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */ | 140 | ATA_DFLAG_DMADIR = (1 << 10), /* device requires DMADIR */ |
143 | ATA_DFLAG_CFG_MASK = (1 << 12) - 1, | 141 | ATA_DFLAG_CFG_MASK = (1 << 12) - 1, |
144 | 142 | ||
@@ -198,6 +196,7 @@ enum { | |||
198 | * management */ | 196 | * management */ |
199 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity | 197 | ATA_FLAG_SW_ACTIVITY = (1 << 22), /* driver supports sw activity |
200 | * led */ | 198 | * led */ |
199 | ATA_FLAG_NO_DIPM = (1 << 23), /* host not happy with DIPM */ | ||
201 | 200 | ||
202 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ | 201 | /* bits 24:31 of ap->flags are reserved for LLD specific flags */ |
203 | 202 | ||
@@ -364,7 +363,7 @@ enum { | |||
364 | ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, | 363 | ATA_EH_CMD_TIMEOUT_TABLE_SIZE = 6, |
365 | 364 | ||
366 | /* Horkage types. May be set by libata or controller on drives | 365 | /* Horkage types. May be set by libata or controller on drives |
367 | (some horkage may be drive/controller pair dependant */ | 366 | (some horkage may be drive/controller pair dependent */ |
368 | 367 | ||
369 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ | 368 | ATA_HORKAGE_DIAGNOSTIC = (1 << 0), /* Failed boot diag */ |
370 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ | 369 | ATA_HORKAGE_NODMA = (1 << 1), /* DMA problems */ |
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h index 5bad17d1acde..31f9d75adc5b 100644 --- a/include/linux/list_bl.h +++ b/include/linux/list_bl.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_LIST_BL_H | 2 | #define _LINUX_LIST_BL_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/bit_spinlock.h> | ||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * Special version of lists, where head of the list has a lock in the lowest | 8 | * Special version of lists, where head of the list has a lock in the lowest |
@@ -114,6 +115,16 @@ static inline void hlist_bl_del_init(struct hlist_bl_node *n) | |||
114 | } | 115 | } |
115 | } | 116 | } |
116 | 117 | ||
118 | static inline void hlist_bl_lock(struct hlist_bl_head *b) | ||
119 | { | ||
120 | bit_spin_lock(0, (unsigned long *)b); | ||
121 | } | ||
122 | |||
123 | static inline void hlist_bl_unlock(struct hlist_bl_head *b) | ||
124 | { | ||
125 | __bit_spin_unlock(0, (unsigned long *)b); | ||
126 | } | ||
127 | |||
117 | /** | 128 | /** |
118 | * hlist_bl_for_each_entry - iterate over list of given type | 129 | * hlist_bl_for_each_entry - iterate over list of given type |
119 | * @tpos: the type * to use as a loop cursor. | 130 | * @tpos: the type * to use as a loop cursor. |
diff --git a/include/linux/lru_cache.h b/include/linux/lru_cache.h index 78fbf24f357a..6a4fab7c6e09 100644 --- a/include/linux/lru_cache.h +++ b/include/linux/lru_cache.h | |||
@@ -148,7 +148,7 @@ write intent log information, three of which are mentioned here. | |||
148 | * | 148 | * |
149 | * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache | 149 | * DRBD currently (May 2009) only uses 61 elements on the resync lru_cache |
150 | * (total memory usage 2 pages), and up to 3833 elements on the act_log | 150 | * (total memory usage 2 pages), and up to 3833 elements on the act_log |
151 | * lru_cache, totalling ~215 kB for 64bit architechture, ~53 pages. | 151 | * lru_cache, totalling ~215 kB for 64bit architecture, ~53 pages. |
152 | * | 152 | * |
153 | * We usually do not actually free these objects again, but only "recycle" | 153 | * We usually do not actually free these objects again, but only "recycle" |
154 | * them, as the change "index: -old_label, +LC_FREE" would need a transaction | 154 | * them, as the change "index: -old_label, +LC_FREE" would need a transaction |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 6cfe344f9559..1e5df2af8d84 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define XENFS_SUPER_MAGIC 0xabba1974 | 23 | #define XENFS_SUPER_MAGIC 0xabba1974 |
24 | #define EXT4_SUPER_MAGIC 0xEF53 | 24 | #define EXT4_SUPER_MAGIC 0xEF53 |
25 | #define BTRFS_SUPER_MAGIC 0x9123683E | 25 | #define BTRFS_SUPER_MAGIC 0x9123683E |
26 | #define NILFS_SUPER_MAGIC 0x3434 | ||
26 | #define HPFS_SUPER_MAGIC 0xf995e849 | 27 | #define HPFS_SUPER_MAGIC 0xf995e849 |
27 | #define ISOFS_SUPER_MAGIC 0x9660 | 28 | #define ISOFS_SUPER_MAGIC 0x9660 |
28 | #define JFFS2_SUPER_MAGIC 0x72b6 | 29 | #define JFFS2_SUPER_MAGIC 0x72b6 |
diff --git a/include/linux/media.h b/include/linux/media.h new file mode 100644 index 000000000000..0ef883327de2 --- /dev/null +++ b/include/linux/media.h | |||
@@ -0,0 +1,132 @@ | |||
1 | /* | ||
2 | * Multimedia device API | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
7 | * Sakari Ailus <sakari.ailus@iki.fi> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef __LINUX_MEDIA_H | ||
24 | #define __LINUX_MEDIA_H | ||
25 | |||
26 | #include <linux/ioctl.h> | ||
27 | #include <linux/types.h> | ||
28 | #include <linux/version.h> | ||
29 | |||
30 | #define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) | ||
31 | |||
32 | struct media_device_info { | ||
33 | char driver[16]; | ||
34 | char model[32]; | ||
35 | char serial[40]; | ||
36 | char bus_info[32]; | ||
37 | __u32 media_version; | ||
38 | __u32 hw_revision; | ||
39 | __u32 driver_version; | ||
40 | __u32 reserved[31]; | ||
41 | }; | ||
42 | |||
43 | #define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) | ||
44 | |||
45 | #define MEDIA_ENT_TYPE_SHIFT 16 | ||
46 | #define MEDIA_ENT_TYPE_MASK 0x00ff0000 | ||
47 | #define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff | ||
48 | |||
49 | #define MEDIA_ENT_T_DEVNODE (1 << MEDIA_ENT_TYPE_SHIFT) | ||
50 | #define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1) | ||
51 | #define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) | ||
52 | #define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) | ||
53 | #define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) | ||
54 | |||
55 | #define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT) | ||
56 | #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) | ||
57 | #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2) | ||
58 | #define MEDIA_ENT_T_V4L2_SUBDEV_LENS (MEDIA_ENT_T_V4L2_SUBDEV + 3) | ||
59 | |||
60 | #define MEDIA_ENT_FL_DEFAULT (1 << 0) | ||
61 | |||
62 | struct media_entity_desc { | ||
63 | __u32 id; | ||
64 | char name[32]; | ||
65 | __u32 type; | ||
66 | __u32 revision; | ||
67 | __u32 flags; | ||
68 | __u32 group_id; | ||
69 | __u16 pads; | ||
70 | __u16 links; | ||
71 | |||
72 | __u32 reserved[4]; | ||
73 | |||
74 | union { | ||
75 | /* Node specifications */ | ||
76 | struct { | ||
77 | __u32 major; | ||
78 | __u32 minor; | ||
79 | } v4l; | ||
80 | struct { | ||
81 | __u32 major; | ||
82 | __u32 minor; | ||
83 | } fb; | ||
84 | struct { | ||
85 | __u32 card; | ||
86 | __u32 device; | ||
87 | __u32 subdevice; | ||
88 | } alsa; | ||
89 | int dvb; | ||
90 | |||
91 | /* Sub-device specifications */ | ||
92 | /* Nothing needed yet */ | ||
93 | __u8 raw[184]; | ||
94 | }; | ||
95 | }; | ||
96 | |||
97 | #define MEDIA_PAD_FL_SINK (1 << 0) | ||
98 | #define MEDIA_PAD_FL_SOURCE (1 << 1) | ||
99 | |||
100 | struct media_pad_desc { | ||
101 | __u32 entity; /* entity ID */ | ||
102 | __u16 index; /* pad index */ | ||
103 | __u32 flags; /* pad flags */ | ||
104 | __u32 reserved[2]; | ||
105 | }; | ||
106 | |||
107 | #define MEDIA_LNK_FL_ENABLED (1 << 0) | ||
108 | #define MEDIA_LNK_FL_IMMUTABLE (1 << 1) | ||
109 | #define MEDIA_LNK_FL_DYNAMIC (1 << 2) | ||
110 | |||
111 | struct media_link_desc { | ||
112 | struct media_pad_desc source; | ||
113 | struct media_pad_desc sink; | ||
114 | __u32 flags; | ||
115 | __u32 reserved[2]; | ||
116 | }; | ||
117 | |||
118 | struct media_links_enum { | ||
119 | __u32 entity; | ||
120 | /* Should have enough room for pads elements */ | ||
121 | struct media_pad_desc __user *pads; | ||
122 | /* Should have enough room for links elements */ | ||
123 | struct media_link_desc __user *links; | ||
124 | __u32 reserved[4]; | ||
125 | }; | ||
126 | |||
127 | #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) | ||
128 | #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) | ||
129 | #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) | ||
130 | #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) | ||
131 | |||
132 | #endif /* __LINUX_MEDIA_H */ | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index f512e189be5a..5e9840f50980 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -62,6 +62,7 @@ extern int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm, | |||
62 | gfp_t gfp_mask); | 62 | gfp_t gfp_mask); |
63 | extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); | 63 | extern void mem_cgroup_add_lru_list(struct page *page, enum lru_list lru); |
64 | extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); | 64 | extern void mem_cgroup_del_lru_list(struct page *page, enum lru_list lru); |
65 | extern void mem_cgroup_rotate_reclaimable_page(struct page *page); | ||
65 | extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); | 66 | extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru); |
66 | extern void mem_cgroup_del_lru(struct page *page); | 67 | extern void mem_cgroup_del_lru(struct page *page); |
67 | extern void mem_cgroup_move_lists(struct page *page, | 68 | extern void mem_cgroup_move_lists(struct page *page, |
@@ -96,7 +97,7 @@ extern struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem); | |||
96 | 97 | ||
97 | extern int | 98 | extern int |
98 | mem_cgroup_prepare_migration(struct page *page, | 99 | mem_cgroup_prepare_migration(struct page *page, |
99 | struct page *newpage, struct mem_cgroup **ptr); | 100 | struct page *newpage, struct mem_cgroup **ptr, gfp_t gfp_mask); |
100 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, | 101 | extern void mem_cgroup_end_migration(struct mem_cgroup *mem, |
101 | struct page *oldpage, struct page *newpage, bool migration_ok); | 102 | struct page *oldpage, struct page *newpage, bool migration_ok); |
102 | 103 | ||
@@ -150,6 +151,10 @@ u64 mem_cgroup_get_limit(struct mem_cgroup *mem); | |||
150 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); | 151 | void mem_cgroup_split_huge_fixup(struct page *head, struct page *tail); |
151 | #endif | 152 | #endif |
152 | 153 | ||
154 | #ifdef CONFIG_DEBUG_VM | ||
155 | bool mem_cgroup_bad_page_check(struct page *page); | ||
156 | void mem_cgroup_print_bad_page(struct page *page); | ||
157 | #endif | ||
153 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 158 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
154 | struct mem_cgroup; | 159 | struct mem_cgroup; |
155 | 160 | ||
@@ -211,6 +216,11 @@ static inline void mem_cgroup_del_lru_list(struct page *page, int lru) | |||
211 | return ; | 216 | return ; |
212 | } | 217 | } |
213 | 218 | ||
219 | static inline void mem_cgroup_rotate_reclaimable_page(struct page *page) | ||
220 | { | ||
221 | return ; | ||
222 | } | ||
223 | |||
214 | static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) | 224 | static inline void mem_cgroup_rotate_lru_list(struct page *page, int lru) |
215 | { | 225 | { |
216 | return ; | 226 | return ; |
@@ -249,7 +259,7 @@ static inline struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *mem) | |||
249 | 259 | ||
250 | static inline int | 260 | static inline int |
251 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, | 261 | mem_cgroup_prepare_migration(struct page *page, struct page *newpage, |
252 | struct mem_cgroup **ptr) | 262 | struct mem_cgroup **ptr, gfp_t gfp_mask) |
253 | { | 263 | { |
254 | return 0; | 264 | return 0; |
255 | } | 265 | } |
@@ -346,5 +356,18 @@ static inline void mem_cgroup_split_huge_fixup(struct page *head, | |||
346 | 356 | ||
347 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 357 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
348 | 358 | ||
359 | #if !defined(CONFIG_CGROUP_MEM_RES_CTLR) || !defined(CONFIG_DEBUG_VM) | ||
360 | static inline bool | ||
361 | mem_cgroup_bad_page_check(struct page *page) | ||
362 | { | ||
363 | return false; | ||
364 | } | ||
365 | |||
366 | static inline void | ||
367 | mem_cgroup_print_bad_page(struct page *page) | ||
368 | { | ||
369 | } | ||
370 | #endif | ||
371 | |||
349 | #endif /* _LINUX_MEMCONTROL_H */ | 372 | #endif /* _LINUX_MEMCONTROL_H */ |
350 | 373 | ||
diff --git a/include/linux/mfd/88pm860x.h b/include/linux/mfd/88pm860x.h index 4db1fbd8969e..8fba7972ff5f 100644 --- a/include/linux/mfd/88pm860x.h +++ b/include/linux/mfd/88pm860x.h | |||
@@ -131,9 +131,11 @@ enum { | |||
131 | PM8607_ID_LDO8, | 131 | PM8607_ID_LDO8, |
132 | PM8607_ID_LDO9, | 132 | PM8607_ID_LDO9, |
133 | PM8607_ID_LDO10, | 133 | PM8607_ID_LDO10, |
134 | PM8607_ID_LDO11, | ||
134 | PM8607_ID_LDO12, | 135 | PM8607_ID_LDO12, |
135 | PM8607_ID_LDO13, | 136 | PM8607_ID_LDO13, |
136 | PM8607_ID_LDO14, | 137 | PM8607_ID_LDO14, |
138 | PM8607_ID_LDO15, | ||
137 | 139 | ||
138 | PM8607_ID_RG_MAX, | 140 | PM8607_ID_RG_MAX, |
139 | }; | 141 | }; |
@@ -310,8 +312,6 @@ struct pm860x_chip { | |||
310 | 312 | ||
311 | }; | 313 | }; |
312 | 314 | ||
313 | #define PM8607_MAX_REGULATOR PM8607_ID_RG_MAX /* 3 Bucks, 13 LDOs */ | ||
314 | |||
315 | enum { | 315 | enum { |
316 | GI2C_PORT = 0, | 316 | GI2C_PORT = 0, |
317 | PI2C_PORT, | 317 | PI2C_PORT, |
@@ -351,23 +351,31 @@ struct pm860x_platform_data { | |||
351 | struct pm860x_led_pdata *led; | 351 | struct pm860x_led_pdata *led; |
352 | struct pm860x_touch_pdata *touch; | 352 | struct pm860x_touch_pdata *touch; |
353 | struct pm860x_power_pdata *power; | 353 | struct pm860x_power_pdata *power; |
354 | struct regulator_init_data *regulator; | ||
354 | 355 | ||
355 | unsigned short companion_addr; /* I2C address of companion chip */ | 356 | unsigned short companion_addr; /* I2C address of companion chip */ |
356 | int i2c_port; /* Controlled by GI2C or PI2C */ | 357 | int i2c_port; /* Controlled by GI2C or PI2C */ |
357 | int irq_mode; /* Clear interrupt by read/write(0/1) */ | 358 | int irq_mode; /* Clear interrupt by read/write(0/1) */ |
358 | int irq_base; /* IRQ base number of 88pm860x */ | 359 | int irq_base; /* IRQ base number of 88pm860x */ |
359 | struct regulator_init_data *regulator[PM8607_MAX_REGULATOR]; | 360 | int num_leds; |
361 | int num_backlights; | ||
362 | int num_regulators; | ||
360 | }; | 363 | }; |
361 | 364 | ||
362 | extern char pm860x_backlight_name[][MFD_NAME_SIZE]; | ||
363 | extern char pm860x_led_name[][MFD_NAME_SIZE]; | ||
364 | |||
365 | extern int pm860x_reg_read(struct i2c_client *, int); | 365 | extern int pm860x_reg_read(struct i2c_client *, int); |
366 | extern int pm860x_reg_write(struct i2c_client *, int, unsigned char); | 366 | extern int pm860x_reg_write(struct i2c_client *, int, unsigned char); |
367 | extern int pm860x_bulk_read(struct i2c_client *, int, int, unsigned char *); | 367 | extern int pm860x_bulk_read(struct i2c_client *, int, int, unsigned char *); |
368 | extern int pm860x_bulk_write(struct i2c_client *, int, int, unsigned char *); | 368 | extern int pm860x_bulk_write(struct i2c_client *, int, int, unsigned char *); |
369 | extern int pm860x_set_bits(struct i2c_client *, int, unsigned char, | 369 | extern int pm860x_set_bits(struct i2c_client *, int, unsigned char, |
370 | unsigned char); | 370 | unsigned char); |
371 | extern int pm860x_page_reg_read(struct i2c_client *, int); | ||
372 | extern int pm860x_page_reg_write(struct i2c_client *, int, unsigned char); | ||
373 | extern int pm860x_page_bulk_read(struct i2c_client *, int, int, | ||
374 | unsigned char *); | ||
375 | extern int pm860x_page_bulk_write(struct i2c_client *, int, int, | ||
376 | unsigned char *); | ||
377 | extern int pm860x_page_set_bits(struct i2c_client *, int, unsigned char, | ||
378 | unsigned char); | ||
371 | 379 | ||
372 | extern int pm860x_device_init(struct pm860x_chip *chip, | 380 | extern int pm860x_device_init(struct pm860x_chip *chip, |
373 | struct pm860x_platform_data *pdata) __devinit ; | 381 | struct pm860x_platform_data *pdata) __devinit ; |
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h index 37f56b7c4c15..b31843075198 100644 --- a/include/linux/mfd/ab8500.h +++ b/include/linux/mfd/ab8500.h | |||
@@ -74,6 +74,45 @@ | |||
74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | 74 | #define AB8500_INT_ACC_DETECT_21DB_F 37 |
75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | 75 | #define AB8500_INT_ACC_DETECT_21DB_R 38 |
76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | 76 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 |
77 | #define AB8500_INT_ACC_DETECT_1DB_F 33 | ||
78 | #define AB8500_INT_ACC_DETECT_1DB_R 34 | ||
79 | #define AB8500_INT_ACC_DETECT_22DB_F 35 | ||
80 | #define AB8500_INT_ACC_DETECT_22DB_R 36 | ||
81 | #define AB8500_INT_ACC_DETECT_21DB_F 37 | ||
82 | #define AB8500_INT_ACC_DETECT_21DB_R 38 | ||
83 | #define AB8500_INT_GP_SW_ADC_CONV_END 39 | ||
84 | #define AB8500_INT_GPIO6R 40 | ||
85 | #define AB8500_INT_GPIO7R 41 | ||
86 | #define AB8500_INT_GPIO8R 42 | ||
87 | #define AB8500_INT_GPIO9R 43 | ||
88 | #define AB8500_INT_GPIO10R 44 | ||
89 | #define AB8500_INT_GPIO11R 45 | ||
90 | #define AB8500_INT_GPIO12R 46 | ||
91 | #define AB8500_INT_GPIO13R 47 | ||
92 | #define AB8500_INT_GPIO24R 48 | ||
93 | #define AB8500_INT_GPIO25R 49 | ||
94 | #define AB8500_INT_GPIO36R 50 | ||
95 | #define AB8500_INT_GPIO37R 51 | ||
96 | #define AB8500_INT_GPIO38R 52 | ||
97 | #define AB8500_INT_GPIO39R 53 | ||
98 | #define AB8500_INT_GPIO40R 54 | ||
99 | #define AB8500_INT_GPIO41R 55 | ||
100 | #define AB8500_INT_GPIO6F 56 | ||
101 | #define AB8500_INT_GPIO7F 57 | ||
102 | #define AB8500_INT_GPIO8F 58 | ||
103 | #define AB8500_INT_GPIO9F 59 | ||
104 | #define AB8500_INT_GPIO10F 60 | ||
105 | #define AB8500_INT_GPIO11F 61 | ||
106 | #define AB8500_INT_GPIO12F 62 | ||
107 | #define AB8500_INT_GPIO13F 63 | ||
108 | #define AB8500_INT_GPIO24F 64 | ||
109 | #define AB8500_INT_GPIO25F 65 | ||
110 | #define AB8500_INT_GPIO36F 66 | ||
111 | #define AB8500_INT_GPIO37F 67 | ||
112 | #define AB8500_INT_GPIO38F 68 | ||
113 | #define AB8500_INT_GPIO39F 69 | ||
114 | #define AB8500_INT_GPIO40F 70 | ||
115 | #define AB8500_INT_GPIO41F 71 | ||
77 | #define AB8500_INT_ADP_SOURCE_ERROR 72 | 116 | #define AB8500_INT_ADP_SOURCE_ERROR 72 |
78 | #define AB8500_INT_ADP_SINK_ERROR 73 | 117 | #define AB8500_INT_ADP_SINK_ERROR 73 |
79 | #define AB8500_INT_ADP_PROBE_PLUG 74 | 118 | #define AB8500_INT_ADP_PROBE_PLUG 74 |
@@ -111,8 +150,8 @@ | |||
111 | * @dev: parent device | 150 | * @dev: parent device |
112 | * @lock: read/write operations lock | 151 | * @lock: read/write operations lock |
113 | * @irq_lock: genirq bus lock | 152 | * @irq_lock: genirq bus lock |
114 | * @revision: chip revision | ||
115 | * @irq: irq line | 153 | * @irq: irq line |
154 | * @chip_id: chip revision id | ||
116 | * @write: register write | 155 | * @write: register write |
117 | * @read: register read | 156 | * @read: register read |
118 | * @rx_buf: rx buf for SPI | 157 | * @rx_buf: rx buf for SPI |
@@ -124,7 +163,7 @@ struct ab8500 { | |||
124 | struct device *dev; | 163 | struct device *dev; |
125 | struct mutex lock; | 164 | struct mutex lock; |
126 | struct mutex irq_lock; | 165 | struct mutex irq_lock; |
127 | int revision; | 166 | |
128 | int irq_base; | 167 | int irq_base; |
129 | int irq; | 168 | int irq; |
130 | u8 chip_id; | 169 | u8 chip_id; |
@@ -139,19 +178,27 @@ struct ab8500 { | |||
139 | u8 oldmask[AB8500_NUM_IRQ_REGS]; | 178 | u8 oldmask[AB8500_NUM_IRQ_REGS]; |
140 | }; | 179 | }; |
141 | 180 | ||
181 | struct regulator_reg_init; | ||
142 | struct regulator_init_data; | 182 | struct regulator_init_data; |
183 | struct ab8500_gpio_platform_data; | ||
143 | 184 | ||
144 | /** | 185 | /** |
145 | * struct ab8500_platform_data - AB8500 platform data | 186 | * struct ab8500_platform_data - AB8500 platform data |
146 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | 187 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used |
147 | * @init: board-specific initialization after detection of ab8500 | 188 | * @init: board-specific initialization after detection of ab8500 |
189 | * @num_regulator_reg_init: number of regulator init registers | ||
190 | * @regulator_reg_init: regulator init registers | ||
191 | * @num_regulator: number of regulators | ||
148 | * @regulator: machine-specific constraints for regulators | 192 | * @regulator: machine-specific constraints for regulators |
149 | */ | 193 | */ |
150 | struct ab8500_platform_data { | 194 | struct ab8500_platform_data { |
151 | int irq_base; | 195 | int irq_base; |
152 | void (*init) (struct ab8500 *); | 196 | void (*init) (struct ab8500 *); |
197 | int num_regulator_reg_init; | ||
198 | struct ab8500_regulator_reg_init *regulator_reg_init; | ||
153 | int num_regulator; | 199 | int num_regulator; |
154 | struct regulator_init_data *regulator; | 200 | struct regulator_init_data *regulator; |
201 | struct ab8500_gpio_platform_data *gpio; | ||
155 | }; | 202 | }; |
156 | 203 | ||
157 | extern int __devinit ab8500_init(struct ab8500 *ab8500); | 204 | extern int __devinit ab8500_init(struct ab8500 *ab8500); |
diff --git a/include/linux/mfd/ab8500/gpadc.h b/include/linux/mfd/ab8500/gpadc.h new file mode 100644 index 000000000000..46b954011f16 --- /dev/null +++ b/include/linux/mfd/ab8500/gpadc.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 ST-Ericsson SA | ||
3 | * Licensed under GPLv2. | ||
4 | * | ||
5 | * Author: Arun R Murthy <arun.murthy@stericsson.com> | ||
6 | * Author: Daniel Willerud <daniel.willerud@stericsson.com> | ||
7 | */ | ||
8 | |||
9 | #ifndef _AB8500_GPADC_H | ||
10 | #define _AB8500_GPADC_H | ||
11 | |||
12 | /* GPADC source: From datasheet(ADCSwSel[4:0] in GPADCCtrl2) */ | ||
13 | #define BAT_CTRL 0x01 | ||
14 | #define BTEMP_BALL 0x02 | ||
15 | #define MAIN_CHARGER_V 0x03 | ||
16 | #define ACC_DETECT1 0x04 | ||
17 | #define ACC_DETECT2 0x05 | ||
18 | #define ADC_AUX1 0x06 | ||
19 | #define ADC_AUX2 0x07 | ||
20 | #define MAIN_BAT_V 0x08 | ||
21 | #define VBUS_V 0x09 | ||
22 | #define MAIN_CHARGER_C 0x0A | ||
23 | #define USB_CHARGER_C 0x0B | ||
24 | #define BK_BAT_V 0x0C | ||
25 | #define DIE_TEMP 0x0D | ||
26 | |||
27 | struct ab8500_gpadc; | ||
28 | |||
29 | struct ab8500_gpadc *ab8500_gpadc_get(char *name); | ||
30 | int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 input); | ||
31 | |||
32 | #endif /* _AB8500_GPADC_H */ | ||
diff --git a/include/linux/mfd/ab8500/gpio.h b/include/linux/mfd/ab8500/gpio.h new file mode 100644 index 000000000000..488a8c920a29 --- /dev/null +++ b/include/linux/mfd/ab8500/gpio.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright ST-Ericsson 2010. | ||
3 | * | ||
4 | * Author: Bibek Basu <bibek.basu@stericsson.com> | ||
5 | * Licensed under GPLv2. | ||
6 | */ | ||
7 | |||
8 | #ifndef _AB8500_GPIO_H | ||
9 | #define _AB8500_GPIO_H | ||
10 | |||
11 | /* | ||
12 | * Platform data to register a block: only the initial gpio/irq number. | ||
13 | */ | ||
14 | |||
15 | struct ab8500_gpio_platform_data { | ||
16 | int gpio_base; | ||
17 | u32 irq_base; | ||
18 | u8 config_reg[7]; | ||
19 | }; | ||
20 | |||
21 | #endif /* _AB8500_GPIO_H */ | ||
diff --git a/include/linux/mfd/ab8500/sysctrl.h b/include/linux/mfd/ab8500/sysctrl.h new file mode 100644 index 000000000000..10da0291f8f8 --- /dev/null +++ b/include/linux/mfd/ab8500/sysctrl.h | |||
@@ -0,0 +1,254 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com> for ST Ericsson. | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | #ifndef __AB8500_SYSCTRL_H | ||
7 | #define __AB8500_SYSCTRL_H | ||
8 | |||
9 | #include <linux/bitops.h> | ||
10 | |||
11 | #ifdef CONFIG_AB8500_CORE | ||
12 | |||
13 | int ab8500_sysctrl_read(u16 reg, u8 *value); | ||
14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); | ||
15 | |||
16 | #else | ||
17 | |||
18 | static inline int ab8500_sysctrl_read(u16 reg, u8 *value) | ||
19 | { | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | static inline int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||
27 | |||
28 | #endif /* CONFIG_AB8500_CORE */ | ||
29 | |||
30 | static inline int ab8500_sysctrl_set(u16 reg, u8 bits) | ||
31 | { | ||
32 | return ab8500_sysctrl_write(reg, bits, bits); | ||
33 | } | ||
34 | |||
35 | static inline int ab8500_sysctrl_clear(u16 reg, u8 bits) | ||
36 | { | ||
37 | return ab8500_sysctrl_write(reg, bits, 0); | ||
38 | } | ||
39 | |||
40 | /* Registers */ | ||
41 | #define AB8500_TURNONSTATUS 0x100 | ||
42 | #define AB8500_RESETSTATUS 0x101 | ||
43 | #define AB8500_PONKEY1PRESSSTATUS 0x102 | ||
44 | #define AB8500_SYSCLKREQSTATUS 0x142 | ||
45 | #define AB8500_STW4500CTRL1 0x180 | ||
46 | #define AB8500_STW4500CTRL2 0x181 | ||
47 | #define AB8500_STW4500CTRL3 0x200 | ||
48 | #define AB8500_MAINWDOGCTRL 0x201 | ||
49 | #define AB8500_MAINWDOGTIMER 0x202 | ||
50 | #define AB8500_LOWBAT 0x203 | ||
51 | #define AB8500_BATTOK 0x204 | ||
52 | #define AB8500_SYSCLKTIMER 0x205 | ||
53 | #define AB8500_SMPSCLKCTRL 0x206 | ||
54 | #define AB8500_SMPSCLKSEL1 0x207 | ||
55 | #define AB8500_SMPSCLKSEL2 0x208 | ||
56 | #define AB8500_SMPSCLKSEL3 0x209 | ||
57 | #define AB8500_SYSULPCLKCONF 0x20A | ||
58 | #define AB8500_SYSULPCLKCTRL1 0x20B | ||
59 | #define AB8500_SYSCLKCTRL 0x20C | ||
60 | #define AB8500_SYSCLKREQ1VALID 0x20D | ||
61 | #define AB8500_SYSTEMCTRLSUP 0x20F | ||
62 | #define AB8500_SYSCLKREQ1RFCLKBUF 0x210 | ||
63 | #define AB8500_SYSCLKREQ2RFCLKBUF 0x211 | ||
64 | #define AB8500_SYSCLKREQ3RFCLKBUF 0x212 | ||
65 | #define AB8500_SYSCLKREQ4RFCLKBUF 0x213 | ||
66 | #define AB8500_SYSCLKREQ5RFCLKBUF 0x214 | ||
67 | #define AB8500_SYSCLKREQ6RFCLKBUF 0x215 | ||
68 | #define AB8500_SYSCLKREQ7RFCLKBUF 0x216 | ||
69 | #define AB8500_SYSCLKREQ8RFCLKBUF 0x217 | ||
70 | #define AB8500_DITHERCLKCTRL 0x220 | ||
71 | #define AB8500_SWATCTRL 0x230 | ||
72 | #define AB8500_HIQCLKCTRL 0x232 | ||
73 | #define AB8500_VSIMSYSCLKCTRL 0x233 | ||
74 | |||
75 | /* Bits */ | ||
76 | #define AB8500_TURNONSTATUS_PORNVBAT BIT(0) | ||
77 | #define AB8500_TURNONSTATUS_PONKEY1DBF BIT(1) | ||
78 | #define AB8500_TURNONSTATUS_PONKEY2DBF BIT(2) | ||
79 | #define AB8500_TURNONSTATUS_RTCALARM BIT(3) | ||
80 | #define AB8500_TURNONSTATUS_MAINCHDET BIT(4) | ||
81 | #define AB8500_TURNONSTATUS_VBUSDET BIT(5) | ||
82 | #define AB8500_TURNONSTATUS_USBIDDETECT BIT(6) | ||
83 | |||
84 | #define AB8500_RESETSTATUS_RESETN4500NSTATUS BIT(0) | ||
85 | #define AB8500_RESETSTATUS_SWRESETN4500NSTATUS BIT(2) | ||
86 | |||
87 | #define AB8500_PONKEY1PRESSSTATUS_PONKEY1PRESSTIME_MASK 0x7F | ||
88 | #define AB8500_PONKEY1PRESSSTATUS_PONKEY1PRESSTIME_SHIFT 0 | ||
89 | |||
90 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ1STATUS BIT(0) | ||
91 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ2STATUS BIT(1) | ||
92 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ3STATUS BIT(2) | ||
93 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ4STATUS BIT(3) | ||
94 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ5STATUS BIT(4) | ||
95 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ6STATUS BIT(5) | ||
96 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ7STATUS BIT(6) | ||
97 | #define AB8500_SYSCLKREQSTATUS_SYSCLKREQ8STATUS BIT(7) | ||
98 | |||
99 | #define AB8500_STW4500CTRL1_SWOFF BIT(0) | ||
100 | #define AB8500_STW4500CTRL1_SWRESET4500N BIT(1) | ||
101 | #define AB8500_STW4500CTRL1_THDB8500SWOFF BIT(2) | ||
102 | |||
103 | #define AB8500_STW4500CTRL2_RESETNVAUX1VALID BIT(0) | ||
104 | #define AB8500_STW4500CTRL2_RESETNVAUX2VALID BIT(1) | ||
105 | #define AB8500_STW4500CTRL2_RESETNVAUX3VALID BIT(2) | ||
106 | #define AB8500_STW4500CTRL2_RESETNVMODVALID BIT(3) | ||
107 | #define AB8500_STW4500CTRL2_RESETNVEXTSUPPLY1VALID BIT(4) | ||
108 | #define AB8500_STW4500CTRL2_RESETNVEXTSUPPLY2VALID BIT(5) | ||
109 | #define AB8500_STW4500CTRL2_RESETNVEXTSUPPLY3VALID BIT(6) | ||
110 | #define AB8500_STW4500CTRL2_RESETNVSMPS1VALID BIT(7) | ||
111 | |||
112 | #define AB8500_STW4500CTRL3_CLK32KOUT2DIS BIT(0) | ||
113 | #define AB8500_STW4500CTRL3_RESETAUDN BIT(1) | ||
114 | #define AB8500_STW4500CTRL3_RESETDENCN BIT(2) | ||
115 | #define AB8500_STW4500CTRL3_THSDENA BIT(3) | ||
116 | |||
117 | #define AB8500_MAINWDOGCTRL_MAINWDOGENA BIT(0) | ||
118 | #define AB8500_MAINWDOGCTRL_MAINWDOGKICK BIT(1) | ||
119 | #define AB8500_MAINWDOGCTRL_WDEXPTURNONVALID BIT(4) | ||
120 | |||
121 | #define AB8500_MAINWDOGTIMER_MAINWDOGTIMER_MASK 0x7F | ||
122 | #define AB8500_MAINWDOGTIMER_MAINWDOGTIMER_SHIFT 0 | ||
123 | |||
124 | #define AB8500_LOWBAT_LOWBATENA BIT(0) | ||
125 | #define AB8500_LOWBAT_LOWBAT_MASK 0x7E | ||
126 | #define AB8500_LOWBAT_LOWBAT_SHIFT 1 | ||
127 | |||
128 | #define AB8500_BATTOK_BATTOKSEL0THF_MASK 0x0F | ||
129 | #define AB8500_BATTOK_BATTOKSEL0THF_SHIFT 0 | ||
130 | #define AB8500_BATTOK_BATTOKSEL1THF_MASK 0xF0 | ||
131 | #define AB8500_BATTOK_BATTOKSEL1THF_SHIFT 4 | ||
132 | |||
133 | #define AB8500_SYSCLKTIMER_SYSCLKTIMER_MASK 0x0F | ||
134 | #define AB8500_SYSCLKTIMER_SYSCLKTIMER_SHIFT 0 | ||
135 | #define AB8500_SYSCLKTIMER_SYSCLKTIMERADJ_MASK 0xF0 | ||
136 | #define AB8500_SYSCLKTIMER_SYSCLKTIMERADJ_SHIFT 4 | ||
137 | |||
138 | #define AB8500_SMPSCLKCTRL_SMPSCLKINTSEL_MASK 0x03 | ||
139 | #define AB8500_SMPSCLKCTRL_SMPSCLKINTSEL_SHIFT 0 | ||
140 | #define AB8500_SMPSCLKCTRL_3M2CLKINTENA BIT(2) | ||
141 | |||
142 | #define AB8500_SMPSCLKSEL1_VARMCLKSEL_MASK 0x07 | ||
143 | #define AB8500_SMPSCLKSEL1_VARMCLKSEL_SHIFT 0 | ||
144 | #define AB8500_SMPSCLKSEL1_VAPECLKSEL_MASK 0x38 | ||
145 | #define AB8500_SMPSCLKSEL1_VAPECLKSEL_SHIFT 3 | ||
146 | |||
147 | #define AB8500_SMPSCLKSEL2_VMODCLKSEL_MASK 0x07 | ||
148 | #define AB8500_SMPSCLKSEL2_VMODCLKSEL_SHIFT 0 | ||
149 | #define AB8500_SMPSCLKSEL2_VSMPS1CLKSEL_MASK 0x38 | ||
150 | #define AB8500_SMPSCLKSEL2_VSMPS1CLKSEL_SHIFT 3 | ||
151 | |||
152 | #define AB8500_SMPSCLKSEL3_VSMPS2CLKSEL_MASK 0x07 | ||
153 | #define AB8500_SMPSCLKSEL3_VSMPS2CLKSEL_SHIFT 0 | ||
154 | #define AB8500_SMPSCLKSEL3_VSMPS3CLKSEL_MASK 0x38 | ||
155 | #define AB8500_SMPSCLKSEL3_VSMPS3CLKSEL_SHIFT 3 | ||
156 | |||
157 | #define AB8500_SYSULPCLKCONF_ULPCLKCONF_MASK 0x03 | ||
158 | #define AB8500_SYSULPCLKCONF_ULPCLKCONF_SHIFT 0 | ||
159 | #define AB8500_SYSULPCLKCONF_CLK27MHZSTRE BIT(2) | ||
160 | #define AB8500_SYSULPCLKCONF_TVOUTCLKDELN BIT(3) | ||
161 | #define AB8500_SYSULPCLKCONF_TVOUTCLKINV BIT(4) | ||
162 | #define AB8500_SYSULPCLKCONF_ULPCLKSTRE BIT(5) | ||
163 | #define AB8500_SYSULPCLKCONF_CLK27MHZBUFENA BIT(6) | ||
164 | #define AB8500_SYSULPCLKCONF_CLK27MHZPDENA BIT(7) | ||
165 | |||
166 | #define AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_MASK 0x03 | ||
167 | #define AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_SHIFT 0 | ||
168 | #define AB8500_SYSULPCLKCTRL1_ULPCLKREQ BIT(2) | ||
169 | #define AB8500_SYSULPCLKCTRL1_4500SYSCLKREQ BIT(3) | ||
170 | #define AB8500_SYSULPCLKCTRL1_AUDIOCLKENA BIT(4) | ||
171 | #define AB8500_SYSULPCLKCTRL1_SYSCLKBUF2REQ BIT(5) | ||
172 | #define AB8500_SYSULPCLKCTRL1_SYSCLKBUF3REQ BIT(6) | ||
173 | #define AB8500_SYSULPCLKCTRL1_SYSCLKBUF4REQ BIT(7) | ||
174 | |||
175 | #define AB8500_SYSCLKCTRL_TVOUTPLLENA BIT(0) | ||
176 | #define AB8500_SYSCLKCTRL_TVOUTCLKENA BIT(1) | ||
177 | #define AB8500_SYSCLKCTRL_USBCLKENA BIT(2) | ||
178 | |||
179 | #define AB8500_SYSCLKREQ1VALID_SYSCLKREQ1VALID BIT(0) | ||
180 | #define AB8500_SYSCLKREQ1VALID_ULPCLKREQ1VALID BIT(1) | ||
181 | #define AB8500_SYSCLKREQ1VALID_USBSYSCLKREQ1VALID BIT(2) | ||
182 | |||
183 | #define AB8500_SYSTEMCTRLSUP_EXTSUP12LPNCLKSEL_MASK 0x03 | ||
184 | #define AB8500_SYSTEMCTRLSUP_EXTSUP12LPNCLKSEL_SHIFT 0 | ||
185 | #define AB8500_SYSTEMCTRLSUP_EXTSUP3LPNCLKSEL_MASK 0x0C | ||
186 | #define AB8500_SYSTEMCTRLSUP_EXTSUP3LPNCLKSEL_SHIFT 2 | ||
187 | #define AB8500_SYSTEMCTRLSUP_INTDB8500NOD BIT(4) | ||
188 | |||
189 | #define AB8500_SYSCLKREQ1RFCLKBUF_SYSCLKREQ1RFCLKBUF2 BIT(2) | ||
190 | #define AB8500_SYSCLKREQ1RFCLKBUF_SYSCLKREQ1RFCLKBUF3 BIT(3) | ||
191 | #define AB8500_SYSCLKREQ1RFCLKBUF_SYSCLKREQ1RFCLKBUF4 BIT(4) | ||
192 | |||
193 | #define AB8500_SYSCLKREQ2RFCLKBUF_SYSCLKREQ2RFCLKBUF2 BIT(2) | ||
194 | #define AB8500_SYSCLKREQ2RFCLKBUF_SYSCLKREQ2RFCLKBUF3 BIT(3) | ||
195 | #define AB8500_SYSCLKREQ2RFCLKBUF_SYSCLKREQ2RFCLKBUF4 BIT(4) | ||
196 | |||
197 | #define AB8500_SYSCLKREQ3RFCLKBUF_SYSCLKREQ3RFCLKBUF2 BIT(2) | ||
198 | #define AB8500_SYSCLKREQ3RFCLKBUF_SYSCLKREQ3RFCLKBUF3 BIT(3) | ||
199 | #define AB8500_SYSCLKREQ3RFCLKBUF_SYSCLKREQ3RFCLKBUF4 BIT(4) | ||
200 | |||
201 | #define AB8500_SYSCLKREQ4RFCLKBUF_SYSCLKREQ4RFCLKBUF2 BIT(2) | ||
202 | #define AB8500_SYSCLKREQ4RFCLKBUF_SYSCLKREQ4RFCLKBUF3 BIT(3) | ||
203 | #define AB8500_SYSCLKREQ4RFCLKBUF_SYSCLKREQ4RFCLKBUF4 BIT(4) | ||
204 | |||
205 | #define AB8500_SYSCLKREQ5RFCLKBUF_SYSCLKREQ5RFCLKBUF2 BIT(2) | ||
206 | #define AB8500_SYSCLKREQ5RFCLKBUF_SYSCLKREQ5RFCLKBUF3 BIT(3) | ||
207 | #define AB8500_SYSCLKREQ5RFCLKBUF_SYSCLKREQ5RFCLKBUF4 BIT(4) | ||
208 | |||
209 | #define AB8500_SYSCLKREQ6RFCLKBUF_SYSCLKREQ6RFCLKBUF2 BIT(2) | ||
210 | #define AB8500_SYSCLKREQ6RFCLKBUF_SYSCLKREQ6RFCLKBUF3 BIT(3) | ||
211 | #define AB8500_SYSCLKREQ6RFCLKBUF_SYSCLKREQ6RFCLKBUF4 BIT(4) | ||
212 | |||
213 | #define AB8500_SYSCLKREQ7RFCLKBUF_SYSCLKREQ7RFCLKBUF2 BIT(2) | ||
214 | #define AB8500_SYSCLKREQ7RFCLKBUF_SYSCLKREQ7RFCLKBUF3 BIT(3) | ||
215 | #define AB8500_SYSCLKREQ7RFCLKBUF_SYSCLKREQ7RFCLKBUF4 BIT(4) | ||
216 | |||
217 | #define AB8500_SYSCLKREQ8RFCLKBUF_SYSCLKREQ8RFCLKBUF2 BIT(2) | ||
218 | #define AB8500_SYSCLKREQ8RFCLKBUF_SYSCLKREQ8RFCLKBUF3 BIT(3) | ||
219 | #define AB8500_SYSCLKREQ8RFCLKBUF_SYSCLKREQ8RFCLKBUF4 BIT(4) | ||
220 | |||
221 | #define AB8500_DITHERCLKCTRL_VARMDITHERENA BIT(0) | ||
222 | #define AB8500_DITHERCLKCTRL_VSMPS3DITHERENA BIT(1) | ||
223 | #define AB8500_DITHERCLKCTRL_VSMPS1DITHERENA BIT(2) | ||
224 | #define AB8500_DITHERCLKCTRL_VSMPS2DITHERENA BIT(3) | ||
225 | #define AB8500_DITHERCLKCTRL_VMODDITHERENA BIT(4) | ||
226 | #define AB8500_DITHERCLKCTRL_VAPEDITHERENA BIT(5) | ||
227 | #define AB8500_DITHERCLKCTRL_DITHERDEL_MASK 0xC0 | ||
228 | #define AB8500_DITHERCLKCTRL_DITHERDEL_SHIFT 6 | ||
229 | |||
230 | #define AB8500_SWATCTRL_UPDATERF BIT(0) | ||
231 | #define AB8500_SWATCTRL_SWATENABLE BIT(1) | ||
232 | #define AB8500_SWATCTRL_RFOFFTIMER_MASK 0x1C | ||
233 | #define AB8500_SWATCTRL_RFOFFTIMER_SHIFT 2 | ||
234 | #define AB8500_SWATCTRL_SWATBIT5 BIT(6) | ||
235 | |||
236 | #define AB8500_HIQCLKCTRL_SYSCLKREQ1HIQENAVALID BIT(0) | ||
237 | #define AB8500_HIQCLKCTRL_SYSCLKREQ2HIQENAVALID BIT(1) | ||
238 | #define AB8500_HIQCLKCTRL_SYSCLKREQ3HIQENAVALID BIT(2) | ||
239 | #define AB8500_HIQCLKCTRL_SYSCLKREQ4HIQENAVALID BIT(3) | ||
240 | #define AB8500_HIQCLKCTRL_SYSCLKREQ5HIQENAVALID BIT(4) | ||
241 | #define AB8500_HIQCLKCTRL_SYSCLKREQ6HIQENAVALID BIT(5) | ||
242 | #define AB8500_HIQCLKCTRL_SYSCLKREQ7HIQENAVALID BIT(6) | ||
243 | #define AB8500_HIQCLKCTRL_SYSCLKREQ8HIQENAVALID BIT(7) | ||
244 | |||
245 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ1VALID BIT(0) | ||
246 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ2VALID BIT(1) | ||
247 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ3VALID BIT(2) | ||
248 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ4VALID BIT(3) | ||
249 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ5VALID BIT(4) | ||
250 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ6VALID BIT(5) | ||
251 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ7VALID BIT(6) | ||
252 | #define AB8500_VSIMSYSCLKCTRL_VSIMSYSCLKREQ8VALID BIT(7) | ||
253 | |||
254 | #endif /* __AB8500_SYSCTRL_H */ | ||
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 67bd6f7ecf32..7d9b6ae1c203 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
@@ -186,7 +186,6 @@ struct abx500_init_settings { | |||
186 | struct ab3550_platform_data { | 186 | struct ab3550_platform_data { |
187 | struct {unsigned int base; unsigned int count; } irq; | 187 | struct {unsigned int base; unsigned int count; } irq; |
188 | void *dev_data[AB3550_NUM_DEVICES]; | 188 | void *dev_data[AB3550_NUM_DEVICES]; |
189 | size_t dev_data_sz[AB3550_NUM_DEVICES]; | ||
190 | struct abx500_init_settings *init_settings; | 189 | struct abx500_init_settings *init_settings; |
191 | unsigned int init_settings_sz; | 190 | unsigned int init_settings_sz; |
192 | }; | 191 | }; |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index 835996e167e1..aef23309a742 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -25,22 +25,20 @@ struct mfd_cell { | |||
25 | const char *name; | 25 | const char *name; |
26 | int id; | 26 | int id; |
27 | 27 | ||
28 | /* refcounting for multiple drivers to use a single cell */ | ||
29 | atomic_t *usage_count; | ||
28 | int (*enable)(struct platform_device *dev); | 30 | int (*enable)(struct platform_device *dev); |
29 | int (*disable)(struct platform_device *dev); | 31 | int (*disable)(struct platform_device *dev); |
32 | |||
30 | int (*suspend)(struct platform_device *dev); | 33 | int (*suspend)(struct platform_device *dev); |
31 | int (*resume)(struct platform_device *dev); | 34 | int (*resume)(struct platform_device *dev); |
32 | 35 | ||
33 | /* driver-specific data for MFD-aware "cell" drivers */ | 36 | /* mfd_data can be used to pass data to client drivers */ |
34 | void *driver_data; | 37 | void *mfd_data; |
35 | |||
36 | /* platform_data can be used to either pass data to "generic" | ||
37 | driver or as a hook to mfd_cell for the "cell" drivers */ | ||
38 | void *platform_data; | ||
39 | size_t data_size; | ||
40 | 38 | ||
41 | /* | 39 | /* |
42 | * This resources can be specified relatively to the parent device. | 40 | * These resources can be specified relative to the parent device. |
43 | * For accessing device you should use resources from device | 41 | * For accessing hardware you should use resources from the platform dev |
44 | */ | 42 | */ |
45 | int num_resources; | 43 | int num_resources; |
46 | const struct resource *resources; | 44 | const struct resource *resources; |
@@ -55,8 +53,62 @@ struct mfd_cell { | |||
55 | bool pm_runtime_no_callbacks; | 53 | bool pm_runtime_no_callbacks; |
56 | }; | 54 | }; |
57 | 55 | ||
56 | /* | ||
57 | * Convenience functions for clients using shared cells. Refcounting | ||
58 | * happens automatically, with the cell's enable/disable callbacks | ||
59 | * being called only when a device is first being enabled or no other | ||
60 | * clients are making use of it. | ||
61 | */ | ||
62 | extern int mfd_cell_enable(struct platform_device *pdev); | ||
63 | extern int mfd_cell_disable(struct platform_device *pdev); | ||
64 | |||
65 | /* | ||
66 | * "Clone" multiple platform devices for a single cell. This is to be used | ||
67 | * for devices that have multiple users of a cell. For example, if an mfd | ||
68 | * driver wants the cell "foo" to be used by a GPIO driver, an MTD driver, | ||
69 | * and a platform driver, the following bit of code would be use after first | ||
70 | * calling mfd_add_devices(): | ||
71 | * | ||
72 | * const char *fclones[] = { "foo-gpio", "foo-mtd" }; | ||
73 | * err = mfd_clone_cells("foo", fclones, ARRAY_SIZE(fclones)); | ||
74 | * | ||
75 | * Each driver (MTD, GPIO, and platform driver) would then register | ||
76 | * platform_drivers for "foo-mtd", "foo-gpio", and "foo", respectively. | ||
77 | * The cell's .enable/.disable hooks should be used to deal with hardware | ||
78 | * resource contention. | ||
79 | */ | ||
80 | extern int mfd_clone_cell(const char *cell, const char **clones, | ||
81 | size_t n_clones); | ||
82 | |||
83 | /* | ||
84 | * Given a platform device that's been created by mfd_add_devices(), fetch | ||
85 | * the mfd_cell that created it. | ||
86 | */ | ||
87 | static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev) | ||
88 | { | ||
89 | return pdev->mfd_cell; | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * Given a platform device that's been created by mfd_add_devices(), fetch | ||
94 | * the .mfd_data entry from the mfd_cell that created it. | ||
95 | * Otherwise just return the platform_data pointer. | ||
96 | * This maintains compatibility with platform drivers whose devices aren't | ||
97 | * created by the mfd layer, and expect platform_data to contain what would've | ||
98 | * otherwise been in mfd_data. | ||
99 | */ | ||
100 | static inline void *mfd_get_data(struct platform_device *pdev) | ||
101 | { | ||
102 | const struct mfd_cell *cell = mfd_get_cell(pdev); | ||
103 | |||
104 | if (cell) | ||
105 | return cell->mfd_data; | ||
106 | else | ||
107 | return pdev->dev.platform_data; | ||
108 | } | ||
109 | |||
58 | extern int mfd_add_devices(struct device *parent, int id, | 110 | extern int mfd_add_devices(struct device *parent, int id, |
59 | const struct mfd_cell *cells, int n_devs, | 111 | struct mfd_cell *cells, int n_devs, |
60 | struct resource *mem_base, | 112 | struct resource *mem_base, |
61 | int irq_base); | 113 | int irq_base); |
62 | 114 | ||
diff --git a/include/linux/mfd/max8997-private.h b/include/linux/mfd/max8997-private.h new file mode 100644 index 000000000000..69d1010e2e51 --- /dev/null +++ b/include/linux/mfd/max8997-private.h | |||
@@ -0,0 +1,368 @@ | |||
1 | /* | ||
2 | * max8997.h - Voltage regulator driver for the Maxim 8997 | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electrnoics | ||
5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef __LINUX_MFD_MAX8997_PRIV_H | ||
23 | #define __LINUX_MFD_MAX8997_PRIV_H | ||
24 | |||
25 | #include <linux/i2c.h> | ||
26 | |||
27 | #define MAX8997_REG_INVALID (0xff) | ||
28 | |||
29 | enum max8997_pmic_reg { | ||
30 | MAX8997_REG_PMIC_ID0 = 0x00, | ||
31 | MAX8997_REG_PMIC_ID1 = 0x01, | ||
32 | MAX8997_REG_INTSRC = 0x02, | ||
33 | MAX8997_REG_INT1 = 0x03, | ||
34 | MAX8997_REG_INT2 = 0x04, | ||
35 | MAX8997_REG_INT3 = 0x05, | ||
36 | MAX8997_REG_INT4 = 0x06, | ||
37 | |||
38 | MAX8997_REG_INT1MSK = 0x08, | ||
39 | MAX8997_REG_INT2MSK = 0x09, | ||
40 | MAX8997_REG_INT3MSK = 0x0a, | ||
41 | MAX8997_REG_INT4MSK = 0x0b, | ||
42 | |||
43 | MAX8997_REG_STATUS1 = 0x0d, | ||
44 | MAX8997_REG_STATUS2 = 0x0e, | ||
45 | MAX8997_REG_STATUS3 = 0x0f, | ||
46 | MAX8997_REG_STATUS4 = 0x10, | ||
47 | |||
48 | MAX8997_REG_MAINCON1 = 0x13, | ||
49 | MAX8997_REG_MAINCON2 = 0x14, | ||
50 | MAX8997_REG_BUCKRAMP = 0x15, | ||
51 | |||
52 | MAX8997_REG_BUCK1CTRL = 0x18, | ||
53 | MAX8997_REG_BUCK1DVS1 = 0x19, | ||
54 | MAX8997_REG_BUCK1DVS2 = 0x1a, | ||
55 | MAX8997_REG_BUCK1DVS3 = 0x1b, | ||
56 | MAX8997_REG_BUCK1DVS4 = 0x1c, | ||
57 | MAX8997_REG_BUCK1DVS5 = 0x1d, | ||
58 | MAX8997_REG_BUCK1DVS6 = 0x1e, | ||
59 | MAX8997_REG_BUCK1DVS7 = 0x1f, | ||
60 | MAX8997_REG_BUCK1DVS8 = 0x20, | ||
61 | MAX8997_REG_BUCK2CTRL = 0x21, | ||
62 | MAX8997_REG_BUCK2DVS1 = 0x22, | ||
63 | MAX8997_REG_BUCK2DVS2 = 0x23, | ||
64 | MAX8997_REG_BUCK2DVS3 = 0x24, | ||
65 | MAX8997_REG_BUCK2DVS4 = 0x25, | ||
66 | MAX8997_REG_BUCK2DVS5 = 0x26, | ||
67 | MAX8997_REG_BUCK2DVS6 = 0x27, | ||
68 | MAX8997_REG_BUCK2DVS7 = 0x28, | ||
69 | MAX8997_REG_BUCK2DVS8 = 0x29, | ||
70 | MAX8997_REG_BUCK3CTRL = 0x2a, | ||
71 | MAX8997_REG_BUCK3DVS = 0x2b, | ||
72 | MAX8997_REG_BUCK4CTRL = 0x2c, | ||
73 | MAX8997_REG_BUCK4DVS = 0x2d, | ||
74 | MAX8997_REG_BUCK5CTRL = 0x2e, | ||
75 | MAX8997_REG_BUCK5DVS1 = 0x2f, | ||
76 | MAX8997_REG_BUCK5DVS2 = 0x30, | ||
77 | MAX8997_REG_BUCK5DVS3 = 0x31, | ||
78 | MAX8997_REG_BUCK5DVS4 = 0x32, | ||
79 | MAX8997_REG_BUCK5DVS5 = 0x33, | ||
80 | MAX8997_REG_BUCK5DVS6 = 0x34, | ||
81 | MAX8997_REG_BUCK5DVS7 = 0x35, | ||
82 | MAX8997_REG_BUCK5DVS8 = 0x36, | ||
83 | MAX8997_REG_BUCK6CTRL = 0x37, | ||
84 | MAX8997_REG_BUCK6BPSKIPCTRL = 0x38, | ||
85 | MAX8997_REG_BUCK7CTRL = 0x39, | ||
86 | MAX8997_REG_BUCK7DVS = 0x3a, | ||
87 | MAX8997_REG_LDO1CTRL = 0x3b, | ||
88 | MAX8997_REG_LDO2CTRL = 0x3c, | ||
89 | MAX8997_REG_LDO3CTRL = 0x3d, | ||
90 | MAX8997_REG_LDO4CTRL = 0x3e, | ||
91 | MAX8997_REG_LDO5CTRL = 0x3f, | ||
92 | MAX8997_REG_LDO6CTRL = 0x40, | ||
93 | MAX8997_REG_LDO7CTRL = 0x41, | ||
94 | MAX8997_REG_LDO8CTRL = 0x42, | ||
95 | MAX8997_REG_LDO9CTRL = 0x43, | ||
96 | MAX8997_REG_LDO10CTRL = 0x44, | ||
97 | MAX8997_REG_LDO11CTRL = 0x45, | ||
98 | MAX8997_REG_LDO12CTRL = 0x46, | ||
99 | MAX8997_REG_LDO13CTRL = 0x47, | ||
100 | MAX8997_REG_LDO14CTRL = 0x48, | ||
101 | MAX8997_REG_LDO15CTRL = 0x49, | ||
102 | MAX8997_REG_LDO16CTRL = 0x4a, | ||
103 | MAX8997_REG_LDO17CTRL = 0x4b, | ||
104 | MAX8997_REG_LDO18CTRL = 0x4c, | ||
105 | MAX8997_REG_LDO21CTRL = 0x4d, | ||
106 | |||
107 | MAX8997_REG_MBCCTRL1 = 0x50, | ||
108 | MAX8997_REG_MBCCTRL2 = 0x51, | ||
109 | MAX8997_REG_MBCCTRL3 = 0x52, | ||
110 | MAX8997_REG_MBCCTRL4 = 0x53, | ||
111 | MAX8997_REG_MBCCTRL5 = 0x54, | ||
112 | MAX8997_REG_MBCCTRL6 = 0x55, | ||
113 | MAX8997_REG_OTPCGHCVS = 0x56, | ||
114 | |||
115 | MAX8997_REG_SAFEOUTCTRL = 0x5a, | ||
116 | |||
117 | MAX8997_REG_LBCNFG1 = 0x5e, | ||
118 | MAX8997_REG_LBCNFG2 = 0x5f, | ||
119 | MAX8997_REG_BBCCTRL = 0x60, | ||
120 | |||
121 | MAX8997_REG_FLASH1_CUR = 0x63, /* 0x63 ~ 0x6e for FLASH */ | ||
122 | MAX8997_REG_FLASH2_CUR = 0x64, | ||
123 | MAX8997_REG_MOVIE_CUR = 0x65, | ||
124 | MAX8997_REG_GSMB_CUR = 0x66, | ||
125 | MAX8997_REG_BOOST_CNTL = 0x67, | ||
126 | MAX8997_REG_LEN_CNTL = 0x68, | ||
127 | MAX8997_REG_FLASH_CNTL = 0x69, | ||
128 | MAX8997_REG_WDT_CNTL = 0x6a, | ||
129 | MAX8997_REG_MAXFLASH1 = 0x6b, | ||
130 | MAX8997_REG_MAXFLASH2 = 0x6c, | ||
131 | MAX8997_REG_FLASHSTATUS = 0x6d, | ||
132 | MAX8997_REG_FLASHSTATUSMASK = 0x6e, | ||
133 | |||
134 | MAX8997_REG_GPIOCNTL1 = 0x70, | ||
135 | MAX8997_REG_GPIOCNTL2 = 0x71, | ||
136 | MAX8997_REG_GPIOCNTL3 = 0x72, | ||
137 | MAX8997_REG_GPIOCNTL4 = 0x73, | ||
138 | MAX8997_REG_GPIOCNTL5 = 0x74, | ||
139 | MAX8997_REG_GPIOCNTL6 = 0x75, | ||
140 | MAX8997_REG_GPIOCNTL7 = 0x76, | ||
141 | MAX8997_REG_GPIOCNTL8 = 0x77, | ||
142 | MAX8997_REG_GPIOCNTL9 = 0x78, | ||
143 | MAX8997_REG_GPIOCNTL10 = 0x79, | ||
144 | MAX8997_REG_GPIOCNTL11 = 0x7a, | ||
145 | MAX8997_REG_GPIOCNTL12 = 0x7b, | ||
146 | |||
147 | MAX8997_REG_LDO1CONFIG = 0x80, | ||
148 | MAX8997_REG_LDO2CONFIG = 0x81, | ||
149 | MAX8997_REG_LDO3CONFIG = 0x82, | ||
150 | MAX8997_REG_LDO4CONFIG = 0x83, | ||
151 | MAX8997_REG_LDO5CONFIG = 0x84, | ||
152 | MAX8997_REG_LDO6CONFIG = 0x85, | ||
153 | MAX8997_REG_LDO7CONFIG = 0x86, | ||
154 | MAX8997_REG_LDO8CONFIG = 0x87, | ||
155 | MAX8997_REG_LDO9CONFIG = 0x88, | ||
156 | MAX8997_REG_LDO10CONFIG = 0x89, | ||
157 | MAX8997_REG_LDO11CONFIG = 0x8a, | ||
158 | MAX8997_REG_LDO12CONFIG = 0x8b, | ||
159 | MAX8997_REG_LDO13CONFIG = 0x8c, | ||
160 | MAX8997_REG_LDO14CONFIG = 0x8d, | ||
161 | MAX8997_REG_LDO15CONFIG = 0x8e, | ||
162 | MAX8997_REG_LDO16CONFIG = 0x8f, | ||
163 | MAX8997_REG_LDO17CONFIG = 0x90, | ||
164 | MAX8997_REG_LDO18CONFIG = 0x91, | ||
165 | MAX8997_REG_LDO21CONFIG = 0x92, | ||
166 | |||
167 | MAX8997_REG_DVSOKTIMER1 = 0x97, | ||
168 | MAX8997_REG_DVSOKTIMER2 = 0x98, | ||
169 | MAX8997_REG_DVSOKTIMER4 = 0x99, | ||
170 | MAX8997_REG_DVSOKTIMER5 = 0x9a, | ||
171 | |||
172 | MAX8997_REG_PMIC_END = 0x9b, | ||
173 | }; | ||
174 | |||
175 | enum max8997_muic_reg { | ||
176 | MAX8997_MUIC_REG_ID = 0x0, | ||
177 | MAX8997_MUIC_REG_INT1 = 0x1, | ||
178 | MAX8997_MUIC_REG_INT2 = 0x2, | ||
179 | MAX8997_MUIC_REG_INT3 = 0x3, | ||
180 | MAX8997_MUIC_REG_STATUS1 = 0x4, | ||
181 | MAX8997_MUIC_REG_STATUS2 = 0x5, | ||
182 | MAX8997_MUIC_REG_STATUS3 = 0x6, | ||
183 | MAX8997_MUIC_REG_INTMASK1 = 0x7, | ||
184 | MAX8997_MUIC_REG_INTMASK2 = 0x8, | ||
185 | MAX8997_MUIC_REG_INTMASK3 = 0x9, | ||
186 | MAX8997_MUIC_REG_CDETCTRL = 0xa, | ||
187 | |||
188 | MAX8997_MUIC_REG_CONTROL1 = 0xc, | ||
189 | MAX8997_MUIC_REG_CONTROL2 = 0xd, | ||
190 | MAX8997_MUIC_REG_CONTROL3 = 0xe, | ||
191 | |||
192 | MAX8997_MUIC_REG_END = 0xf, | ||
193 | }; | ||
194 | |||
195 | enum max8997_haptic_reg { | ||
196 | MAX8997_HAPTIC_REG_GENERAL = 0x00, | ||
197 | MAX8997_HAPTIC_REG_CONF1 = 0x01, | ||
198 | MAX8997_HAPTIC_REG_CONF2 = 0x02, | ||
199 | MAX8997_HAPTIC_REG_DRVCONF = 0x03, | ||
200 | MAX8997_HAPTIC_REG_CYCLECONF1 = 0x04, | ||
201 | MAX8997_HAPTIC_REG_CYCLECONF2 = 0x05, | ||
202 | MAX8997_HAPTIC_REG_SIGCONF1 = 0x06, | ||
203 | MAX8997_HAPTIC_REG_SIGCONF2 = 0x07, | ||
204 | MAX8997_HAPTIC_REG_SIGCONF3 = 0x08, | ||
205 | MAX8997_HAPTIC_REG_SIGCONF4 = 0x09, | ||
206 | MAX8997_HAPTIC_REG_SIGDC1 = 0x0a, | ||
207 | MAX8997_HAPTIC_REG_SIGDC2 = 0x0b, | ||
208 | MAX8997_HAPTIC_REG_SIGPWMDC1 = 0x0c, | ||
209 | MAX8997_HAPTIC_REG_SIGPWMDC2 = 0x0d, | ||
210 | MAX8997_HAPTIC_REG_SIGPWMDC3 = 0x0e, | ||
211 | MAX8997_HAPTIC_REG_SIGPWMDC4 = 0x0f, | ||
212 | MAX8997_HAPTIC_REG_MTR_REV = 0x10, | ||
213 | |||
214 | MAX8997_HAPTIC_REG_END = 0x11, | ||
215 | }; | ||
216 | |||
217 | /* slave addr = 0x0c: using "2nd part" of rev4 datasheet */ | ||
218 | enum max8997_rtc_reg { | ||
219 | MAX8997_RTC_CTRLMASK = 0x02, | ||
220 | MAX8997_RTC_CTRL = 0x03, | ||
221 | MAX8997_RTC_UPDATE1 = 0x04, | ||
222 | MAX8997_RTC_UPDATE2 = 0x05, | ||
223 | MAX8997_RTC_WTSR_SMPL = 0x06, | ||
224 | |||
225 | MAX8997_RTC_SEC = 0x10, | ||
226 | MAX8997_RTC_MIN = 0x11, | ||
227 | MAX8997_RTC_HOUR = 0x12, | ||
228 | MAX8997_RTC_DAY_OF_WEEK = 0x13, | ||
229 | MAX8997_RTC_MONTH = 0x14, | ||
230 | MAX8997_RTC_YEAR = 0x15, | ||
231 | MAX8997_RTC_DAY_OF_MONTH = 0x16, | ||
232 | MAX8997_RTC_ALARM1_SEC = 0x17, | ||
233 | MAX8997_RTC_ALARM1_MIN = 0x18, | ||
234 | MAX8997_RTC_ALARM1_HOUR = 0x19, | ||
235 | MAX8997_RTC_ALARM1_DAY_OF_WEEK = 0x1a, | ||
236 | MAX8997_RTC_ALARM1_MONTH = 0x1b, | ||
237 | MAX8997_RTC_ALARM1_YEAR = 0x1c, | ||
238 | MAX8997_RTC_ALARM1_DAY_OF_MONTH = 0x1d, | ||
239 | MAX8997_RTC_ALARM2_SEC = 0x1e, | ||
240 | MAX8997_RTC_ALARM2_MIN = 0x1f, | ||
241 | MAX8997_RTC_ALARM2_HOUR = 0x20, | ||
242 | MAX8997_RTC_ALARM2_DAY_OF_WEEK = 0x21, | ||
243 | MAX8997_RTC_ALARM2_MONTH = 0x22, | ||
244 | MAX8997_RTC_ALARM2_YEAR = 0x23, | ||
245 | MAX8997_RTC_ALARM2_DAY_OF_MONTH = 0x24, | ||
246 | }; | ||
247 | |||
248 | enum max8997_irq_source { | ||
249 | PMIC_INT1 = 0, | ||
250 | PMIC_INT2, | ||
251 | PMIC_INT3, | ||
252 | PMIC_INT4, | ||
253 | |||
254 | FUEL_GAUGE, /* Ignored (MAX17042 driver handles) */ | ||
255 | |||
256 | MUIC_INT1, | ||
257 | MUIC_INT2, | ||
258 | MUIC_INT3, | ||
259 | |||
260 | GPIO_LOW, /* Not implemented */ | ||
261 | GPIO_HI, /* Not implemented */ | ||
262 | |||
263 | FLASH_STATUS, /* Not implemented */ | ||
264 | |||
265 | MAX8997_IRQ_GROUP_NR, | ||
266 | }; | ||
267 | |||
268 | enum max8997_irq { | ||
269 | MAX8997_PMICIRQ_PWRONR, | ||
270 | MAX8997_PMICIRQ_PWRONF, | ||
271 | MAX8997_PMICIRQ_PWRON1SEC, | ||
272 | MAX8997_PMICIRQ_JIGONR, | ||
273 | MAX8997_PMICIRQ_JIGONF, | ||
274 | MAX8997_PMICIRQ_LOWBAT2, | ||
275 | MAX8997_PMICIRQ_LOWBAT1, | ||
276 | |||
277 | MAX8997_PMICIRQ_JIGR, | ||
278 | MAX8997_PMICIRQ_JIGF, | ||
279 | MAX8997_PMICIRQ_MR, | ||
280 | MAX8997_PMICIRQ_DVS1OK, | ||
281 | MAX8997_PMICIRQ_DVS2OK, | ||
282 | MAX8997_PMICIRQ_DVS3OK, | ||
283 | MAX8997_PMICIRQ_DVS4OK, | ||
284 | |||
285 | MAX8997_PMICIRQ_CHGINS, | ||
286 | MAX8997_PMICIRQ_CHGRM, | ||
287 | MAX8997_PMICIRQ_DCINOVP, | ||
288 | MAX8997_PMICIRQ_TOPOFFR, | ||
289 | MAX8997_PMICIRQ_CHGRSTF, | ||
290 | MAX8997_PMICIRQ_MBCHGTMEXPD, | ||
291 | |||
292 | MAX8997_PMICIRQ_RTC60S, | ||
293 | MAX8997_PMICIRQ_RTCA1, | ||
294 | MAX8997_PMICIRQ_RTCA2, | ||
295 | MAX8997_PMICIRQ_SMPL_INT, | ||
296 | MAX8997_PMICIRQ_RTC1S, | ||
297 | MAX8997_PMICIRQ_WTSR, | ||
298 | |||
299 | MAX8997_MUICIRQ_ADCError, | ||
300 | MAX8997_MUICIRQ_ADCLow, | ||
301 | MAX8997_MUICIRQ_ADC, | ||
302 | |||
303 | MAX8997_MUICIRQ_VBVolt, | ||
304 | MAX8997_MUICIRQ_DBChg, | ||
305 | MAX8997_MUICIRQ_DCDTmr, | ||
306 | MAX8997_MUICIRQ_ChgDetRun, | ||
307 | MAX8997_MUICIRQ_ChgTyp, | ||
308 | |||
309 | MAX8997_MUICIRQ_OVP, | ||
310 | |||
311 | MAX8997_IRQ_NR, | ||
312 | }; | ||
313 | |||
314 | #define MAX8997_REG_BUCK1DVS(x) (MAX8997_REG_BUCK1DVS1 + (x) - 1) | ||
315 | #define MAX8997_REG_BUCK2DVS(x) (MAX8997_REG_BUCK2DVS1 + (x) - 1) | ||
316 | #define MAX8997_REG_BUCK5DVS(x) (MAX8997_REG_BUCK5DVS1 + (x) - 1) | ||
317 | |||
318 | #define MAX8997_NUM_GPIO 12 | ||
319 | struct max8997_dev { | ||
320 | struct device *dev; | ||
321 | struct i2c_client *i2c; /* 0xcc / PMIC, Battery Control, and FLASH */ | ||
322 | struct i2c_client *rtc; /* slave addr 0x0c */ | ||
323 | struct i2c_client *haptic; /* slave addr 0x90 */ | ||
324 | struct i2c_client *muic; /* slave addr 0x4a */ | ||
325 | struct mutex iolock; | ||
326 | |||
327 | int type; | ||
328 | struct platform_device *battery; /* battery control (not fuel gauge) */ | ||
329 | |||
330 | int irq; | ||
331 | int ono; | ||
332 | int irq_base; | ||
333 | bool wakeup; | ||
334 | struct mutex irqlock; | ||
335 | int irq_masks_cur[MAX8997_IRQ_GROUP_NR]; | ||
336 | int irq_masks_cache[MAX8997_IRQ_GROUP_NR]; | ||
337 | |||
338 | /* For hibernation */ | ||
339 | u8 reg_dump[MAX8997_REG_PMIC_END + MAX8997_MUIC_REG_END + | ||
340 | MAX8997_HAPTIC_REG_END]; | ||
341 | |||
342 | bool gpio_status[MAX8997_NUM_GPIO]; | ||
343 | }; | ||
344 | |||
345 | enum max8997_types { | ||
346 | TYPE_MAX8997, | ||
347 | TYPE_MAX8966, | ||
348 | }; | ||
349 | |||
350 | extern int max8997_irq_init(struct max8997_dev *max8997); | ||
351 | extern void max8997_irq_exit(struct max8997_dev *max8997); | ||
352 | extern int max8997_irq_resume(struct max8997_dev *max8997); | ||
353 | |||
354 | extern int max8997_read_reg(struct i2c_client *i2c, u8 reg, u8 *dest); | ||
355 | extern int max8997_bulk_read(struct i2c_client *i2c, u8 reg, int count, | ||
356 | u8 *buf); | ||
357 | extern int max8997_write_reg(struct i2c_client *i2c, u8 reg, u8 value); | ||
358 | extern int max8997_bulk_write(struct i2c_client *i2c, u8 reg, int count, | ||
359 | u8 *buf); | ||
360 | extern int max8997_update_reg(struct i2c_client *i2c, u8 reg, u8 val, u8 mask); | ||
361 | |||
362 | #define MAX8997_GPIO_INT_BOTH (0x3 << 4) | ||
363 | #define MAX8997_GPIO_INT_RISE (0x2 << 4) | ||
364 | #define MAX8997_GPIO_INT_FALL (0x1 << 4) | ||
365 | |||
366 | #define MAX8997_GPIO_INT_MASK (0x3 << 4) | ||
367 | #define MAX8997_GPIO_DATA_MASK (0x1 << 2) | ||
368 | #endif /* __LINUX_MFD_MAX8997_PRIV_H */ | ||
diff --git a/include/linux/mfd/max8997.h b/include/linux/mfd/max8997.h new file mode 100644 index 000000000000..60931d089422 --- /dev/null +++ b/include/linux/mfd/max8997.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * max8997.h - Driver for the Maxim 8997/8966 | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Samsung Electrnoics | ||
5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | * This driver is based on max8998.h | ||
22 | * | ||
23 | * MAX8997 has PMIC, MUIC, HAPTIC, RTC, FLASH, and Fuel Gauge devices. | ||
24 | * Except Fuel Gauge, every device shares the same I2C bus and included in | ||
25 | * this mfd driver. Although the fuel gauge is included in the chip, it is | ||
26 | * excluded from the driver because a) it has a different I2C bus from | ||
27 | * others and b) it can be enabled simply by using MAX17042 driver. | ||
28 | */ | ||
29 | |||
30 | #ifndef __LINUX_MFD_MAX8998_H | ||
31 | #define __LINUX_MFD_MAX8998_H | ||
32 | |||
33 | #include <linux/regulator/consumer.h> | ||
34 | |||
35 | /* MAX8997/8966 regulator IDs */ | ||
36 | enum max8998_regulators { | ||
37 | MAX8997_LDO1 = 0, | ||
38 | MAX8997_LDO2, | ||
39 | MAX8997_LDO3, | ||
40 | MAX8997_LDO4, | ||
41 | MAX8997_LDO5, | ||
42 | MAX8997_LDO6, | ||
43 | MAX8997_LDO7, | ||
44 | MAX8997_LDO8, | ||
45 | MAX8997_LDO9, | ||
46 | MAX8997_LDO10, | ||
47 | MAX8997_LDO11, | ||
48 | MAX8997_LDO12, | ||
49 | MAX8997_LDO13, | ||
50 | MAX8997_LDO14, | ||
51 | MAX8997_LDO15, | ||
52 | MAX8997_LDO16, | ||
53 | MAX8997_LDO17, | ||
54 | MAX8997_LDO18, | ||
55 | MAX8997_LDO21, | ||
56 | MAX8997_BUCK1, | ||
57 | MAX8997_BUCK2, | ||
58 | MAX8997_BUCK3, | ||
59 | MAX8997_BUCK4, | ||
60 | MAX8997_BUCK5, | ||
61 | MAX8997_BUCK6, | ||
62 | MAX8997_BUCK7, | ||
63 | MAX8997_EN32KHZ_AP, | ||
64 | MAX8997_EN32KHZ_CP, | ||
65 | MAX8997_ENVICHG, | ||
66 | MAX8997_ESAFEOUT1, | ||
67 | MAX8997_ESAFEOUT2, | ||
68 | MAX8997_CHARGER_CV, /* control MBCCV of MBCCTRL3 */ | ||
69 | MAX8997_CHARGER, /* charger current, MBCCTRL4 */ | ||
70 | MAX8997_CHARGER_TOPOFF, /* MBCCTRL5 */ | ||
71 | |||
72 | MAX8997_REG_MAX, | ||
73 | }; | ||
74 | |||
75 | struct max8997_regulator_data { | ||
76 | int id; | ||
77 | struct regulator_init_data *initdata; | ||
78 | }; | ||
79 | |||
80 | struct max8997_platform_data { | ||
81 | /* IRQ */ | ||
82 | int irq_base; | ||
83 | int ono; | ||
84 | int wakeup; | ||
85 | |||
86 | /* ---- PMIC ---- */ | ||
87 | struct max8997_regulator_data *regulators; | ||
88 | int num_regulators; | ||
89 | |||
90 | /* | ||
91 | * SET1~3 DVS GPIOs control Buck1, 2, and 5 simultaneously. Therefore, | ||
92 | * With buckx_gpiodvs enabled, the buckx cannot be controlled | ||
93 | * independently. To control buckx (of 1, 2, and 5) independently, | ||
94 | * disable buckx_gpiodvs and control with BUCKxDVS1 register. | ||
95 | * | ||
96 | * When buckx_gpiodvs and bucky_gpiodvs are both enabled, set_voltage | ||
97 | * on buckx will change the voltage of bucky at the same time. | ||
98 | * | ||
99 | */ | ||
100 | bool ignore_gpiodvs_side_effect; | ||
101 | int buck125_gpios[3]; /* GPIO of [0]SET1, [1]SET2, [2]SET3 */ | ||
102 | int buck125_default_idx; /* Default value of SET1, 2, 3 */ | ||
103 | unsigned int buck1_voltage[8]; /* buckx_voltage in uV */ | ||
104 | bool buck1_gpiodvs; | ||
105 | unsigned int buck2_voltage[8]; | ||
106 | bool buck2_gpiodvs; | ||
107 | unsigned int buck5_voltage[8]; | ||
108 | bool buck5_gpiodvs; | ||
109 | |||
110 | /* MUIC: Not implemented */ | ||
111 | /* HAPTIC: Not implemented */ | ||
112 | /* RTC: Not implemented */ | ||
113 | /* Flash: Not implemented */ | ||
114 | /* Charger control: Not implemented */ | ||
115 | }; | ||
116 | |||
117 | #endif /* __LINUX_MFD_MAX8998_H */ | ||
diff --git a/include/linux/mfd/mc13xxx.h b/include/linux/mfd/mc13xxx.h index a1d391b40e68..c064beaaccb7 100644 --- a/include/linux/mfd/mc13xxx.h +++ b/include/linux/mfd/mc13xxx.h | |||
@@ -146,8 +146,7 @@ struct mc13xxx_platform_data { | |||
146 | #define MC13XXX_USE_LED (1 << 5) | 146 | #define MC13XXX_USE_LED (1 << 5) |
147 | unsigned int flags; | 147 | unsigned int flags; |
148 | 148 | ||
149 | int num_regulators; | 149 | struct mc13xxx_regulator_platform_data regulators; |
150 | struct mc13xxx_regulator_init_data *regulators; | ||
151 | struct mc13xxx_leds_platform_data *leds; | 150 | struct mc13xxx_leds_platform_data *leds; |
152 | }; | 151 | }; |
153 | 152 | ||
diff --git a/include/linux/mfd/tps6105x.h b/include/linux/mfd/tps6105x.h new file mode 100644 index 000000000000..386743dd931c --- /dev/null +++ b/include/linux/mfd/tps6105x.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 ST-Ericsson SA | ||
3 | * Written on behalf of Linaro for ST-Ericsson | ||
4 | * | ||
5 | * Author: Linus Walleij <linus.walleij@linaro.org> | ||
6 | * | ||
7 | * License terms: GNU General Public License (GPL) version 2 | ||
8 | */ | ||
9 | #ifndef MFD_TPS6105X_H | ||
10 | #define MFD_TPS6105X_H | ||
11 | |||
12 | #include <linux/i2c.h> | ||
13 | #include <linux/regulator/machine.h> | ||
14 | |||
15 | /* | ||
16 | * Register definitions to all subdrivers | ||
17 | */ | ||
18 | #define TPS6105X_REG_0 0x00 | ||
19 | #define TPS6105X_REG0_MODE_SHIFT 6 | ||
20 | #define TPS6105X_REG0_MODE_MASK (0x03<<6) | ||
21 | /* These defines for both reg0 and reg1 */ | ||
22 | #define TPS6105X_REG0_MODE_SHUTDOWN 0x00 | ||
23 | #define TPS6105X_REG0_MODE_TORCH 0x01 | ||
24 | #define TPS6105X_REG0_MODE_TORCH_FLASH 0x02 | ||
25 | #define TPS6105X_REG0_MODE_VOLTAGE 0x03 | ||
26 | #define TPS6105X_REG0_VOLTAGE_SHIFT 4 | ||
27 | #define TPS6105X_REG0_VOLTAGE_MASK (3<<4) | ||
28 | #define TPS6105X_REG0_VOLTAGE_450 0 | ||
29 | #define TPS6105X_REG0_VOLTAGE_500 1 | ||
30 | #define TPS6105X_REG0_VOLTAGE_525 2 | ||
31 | #define TPS6105X_REG0_VOLTAGE_500_2 3 | ||
32 | #define TPS6105X_REG0_DIMMING_SHIFT 3 | ||
33 | #define TPS6105X_REG0_TORCHC_SHIFT 0 | ||
34 | #define TPS6105X_REG0_TORCHC_MASK (7<<0) | ||
35 | #define TPS6105X_REG0_TORCHC_0 0x00 | ||
36 | #define TPS6105X_REG0_TORCHC_50 0x01 | ||
37 | #define TPS6105X_REG0_TORCHC_75 0x02 | ||
38 | #define TPS6105X_REG0_TORCHC_100 0x03 | ||
39 | #define TPS6105X_REG0_TORCHC_150 0x04 | ||
40 | #define TPS6105X_REG0_TORCHC_200 0x05 | ||
41 | #define TPS6105X_REG0_TORCHC_250_400 0x06 | ||
42 | #define TPS6105X_REG0_TORCHC_250_500 0x07 | ||
43 | #define TPS6105X_REG_1 0x01 | ||
44 | #define TPS6105X_REG1_MODE_SHIFT 6 | ||
45 | #define TPS6105X_REG1_MODE_MASK (0x03<<6) | ||
46 | #define TPS6105X_REG1_MODE_SHUTDOWN 0x00 | ||
47 | #define TPS6105X_REG1_MODE_TORCH 0x01 | ||
48 | #define TPS6105X_REG1_MODE_TORCH_FLASH 0x02 | ||
49 | #define TPS6105X_REG1_MODE_VOLTAGE 0x03 | ||
50 | #define TPS6105X_REG_2 0x02 | ||
51 | #define TPS6105X_REG_3 0x03 | ||
52 | |||
53 | /** | ||
54 | * enum tps6105x_mode - desired mode for the TPS6105x | ||
55 | * @TPS6105X_MODE_SHUTDOWN: this instance is inactive, not used for anything | ||
56 | * @TPS61905X_MODE_TORCH: this instance is used as a LED, usually a while | ||
57 | * LED, for example as backlight or flashlight. If this is set, the | ||
58 | * TPS6105X will register to the LED framework | ||
59 | * @TPS6105X_MODE_TORCH_FLASH: this instance is used as a flashgun, usually | ||
60 | * in a camera | ||
61 | * @TPS6105X_MODE_VOLTAGE: this instance is used as a voltage regulator and | ||
62 | * will register to the regulator framework | ||
63 | */ | ||
64 | enum tps6105x_mode { | ||
65 | TPS6105X_MODE_SHUTDOWN, | ||
66 | TPS6105X_MODE_TORCH, | ||
67 | TPS6105X_MODE_TORCH_FLASH, | ||
68 | TPS6105X_MODE_VOLTAGE, | ||
69 | }; | ||
70 | |||
71 | /** | ||
72 | * struct tps6105x_platform_data - TPS61905x platform data | ||
73 | * @mode: what mode this instance shall be operated in, | ||
74 | * this is not selectable at runtime | ||
75 | * @regulator_data: initialization data for the voltage | ||
76 | * regulator if used as a voltage source | ||
77 | */ | ||
78 | struct tps6105x_platform_data { | ||
79 | enum tps6105x_mode mode; | ||
80 | struct regulator_init_data *regulator_data; | ||
81 | }; | ||
82 | |||
83 | /** | ||
84 | * struct tps6105x - state holder for the TPS6105x drivers | ||
85 | * @mutex: mutex to serialize I2C accesses | ||
86 | * @i2c_client: corresponding I2C client | ||
87 | * @regulator: regulator device if used in voltage mode | ||
88 | */ | ||
89 | struct tps6105x { | ||
90 | struct tps6105x_platform_data *pdata; | ||
91 | struct mutex lock; | ||
92 | struct i2c_client *client; | ||
93 | struct regulator_dev *regulator; | ||
94 | }; | ||
95 | |||
96 | extern int tps6105x_set(struct tps6105x *tps6105x, u8 reg, u8 value); | ||
97 | extern int tps6105x_get(struct tps6105x *tps6105x, u8 reg, u8 *buf); | ||
98 | extern int tps6105x_mask_and_set(struct tps6105x *tps6105x, u8 reg, | ||
99 | u8 bitmask, u8 bitvalues); | ||
100 | |||
101 | #endif | ||
diff --git a/include/linux/mfd/wl1273-core.h b/include/linux/mfd/wl1273-core.h index 9787293eae5f..db2f3f454a1b 100644 --- a/include/linux/mfd/wl1273-core.h +++ b/include/linux/mfd/wl1273-core.h | |||
@@ -280,7 +280,9 @@ struct wl1273_core { | |||
280 | 280 | ||
281 | struct i2c_client *client; | 281 | struct i2c_client *client; |
282 | 282 | ||
283 | int (*read)(struct wl1273_core *core, u8, u16 *); | ||
283 | int (*write)(struct wl1273_core *core, u8, u16); | 284 | int (*write)(struct wl1273_core *core, u8, u16); |
285 | int (*write_data)(struct wl1273_core *core, u8 *, u16); | ||
284 | int (*set_audio)(struct wl1273_core *core, unsigned int); | 286 | int (*set_audio)(struct wl1273_core *core, unsigned int); |
285 | int (*set_volume)(struct wl1273_core *core, unsigned int); | 287 | int (*set_volume)(struct wl1273_core *core, unsigned int); |
286 | }; | 288 | }; |
diff --git a/include/linux/mfd/wm831x/pdata.h b/include/linux/mfd/wm831x/pdata.h index fd322aca33ba..afe4db49402d 100644 --- a/include/linux/mfd/wm831x/pdata.h +++ b/include/linux/mfd/wm831x/pdata.h | |||
@@ -80,7 +80,8 @@ struct wm831x_touch_pdata { | |||
80 | int isel; /** Current for pen down (uA) */ | 80 | int isel; /** Current for pen down (uA) */ |
81 | int rpu; /** Pen down sensitivity resistor divider */ | 81 | int rpu; /** Pen down sensitivity resistor divider */ |
82 | int pressure; /** Report pressure (boolean) */ | 82 | int pressure; /** Report pressure (boolean) */ |
83 | int data_irq; /** Touch data ready IRQ */ | 83 | unsigned int data_irq; /** Touch data ready IRQ */ |
84 | unsigned int pd_irq; /** Touch pendown detect IRQ */ | ||
84 | }; | 85 | }; |
85 | 86 | ||
86 | enum wm831x_watchdog_action { | 87 | enum wm831x_watchdog_action { |
@@ -103,11 +104,17 @@ struct wm831x_watchdog_pdata { | |||
103 | #define WM831X_MAX_ISINK 2 | 104 | #define WM831X_MAX_ISINK 2 |
104 | 105 | ||
105 | struct wm831x_pdata { | 106 | struct wm831x_pdata { |
107 | /** Used to distinguish multiple WM831x chips */ | ||
108 | int wm831x_num; | ||
109 | |||
106 | /** Called before subdevices are set up */ | 110 | /** Called before subdevices are set up */ |
107 | int (*pre_init)(struct wm831x *wm831x); | 111 | int (*pre_init)(struct wm831x *wm831x); |
108 | /** Called after subdevices are set up */ | 112 | /** Called after subdevices are set up */ |
109 | int (*post_init)(struct wm831x *wm831x); | 113 | int (*post_init)(struct wm831x *wm831x); |
110 | 114 | ||
115 | /** Put the /IRQ line into CMOS mode */ | ||
116 | bool irq_cmos; | ||
117 | |||
111 | int irq_base; | 118 | int irq_base; |
112 | int gpio_base; | 119 | int gpio_base; |
113 | struct wm831x_backlight_pdata *backlight; | 120 | struct wm831x_backlight_pdata *backlight; |
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index e786fe9841ef..579b50ca2e02 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * pmic.h -- Power Managment Driver for Wolfson WM8350 PMIC | 2 | * pmic.h -- Power Management Driver for Wolfson WM8350 PMIC |
3 | * | 3 | * |
4 | * Copyright 2007 Wolfson Microelectronics PLC | 4 | * Copyright 2007 Wolfson Microelectronics PLC |
5 | * | 5 | * |
diff --git a/include/linux/mfd/wm8994/core.h b/include/linux/mfd/wm8994/core.h index ef4f0b6083a3..f0b69cdae41c 100644 --- a/include/linux/mfd/wm8994/core.h +++ b/include/linux/mfd/wm8994/core.h | |||
@@ -59,7 +59,7 @@ struct wm8994 { | |||
59 | int (*read_dev)(struct wm8994 *wm8994, unsigned short reg, | 59 | int (*read_dev)(struct wm8994 *wm8994, unsigned short reg, |
60 | int bytes, void *dest); | 60 | int bytes, void *dest); |
61 | int (*write_dev)(struct wm8994 *wm8994, unsigned short reg, | 61 | int (*write_dev)(struct wm8994 *wm8994, unsigned short reg, |
62 | int bytes, void *src); | 62 | int bytes, const void *src); |
63 | 63 | ||
64 | void *control_data; | 64 | void *control_data; |
65 | 65 | ||
@@ -88,6 +88,8 @@ int wm8994_set_bits(struct wm8994 *wm8994, unsigned short reg, | |||
88 | unsigned short mask, unsigned short val); | 88 | unsigned short mask, unsigned short val); |
89 | int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg, | 89 | int wm8994_bulk_read(struct wm8994 *wm8994, unsigned short reg, |
90 | int count, u16 *buf); | 90 | int count, u16 *buf); |
91 | int wm8994_bulk_write(struct wm8994 *wm8994, unsigned short reg, | ||
92 | int count, const u16 *buf); | ||
91 | 93 | ||
92 | 94 | ||
93 | /* Helper to save on boilerplate */ | 95 | /* Helper to save on boilerplate */ |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 049214642036..8985768e2c0d 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -39,6 +39,11 @@ | |||
39 | 39 | ||
40 | #include <asm/atomic.h> | 40 | #include <asm/atomic.h> |
41 | 41 | ||
42 | #define MAX_MSIX_P_PORT 17 | ||
43 | #define MAX_MSIX 64 | ||
44 | #define MSIX_LEGACY_SZ 4 | ||
45 | #define MIN_MSIX_P_PORT 5 | ||
46 | |||
42 | enum { | 47 | enum { |
43 | MLX4_FLAG_MSI_X = 1 << 0, | 48 | MLX4_FLAG_MSI_X = 1 << 0, |
44 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, | 49 | MLX4_FLAG_OLD_PORT_CMDS = 1 << 1, |
@@ -145,8 +150,10 @@ enum { | |||
145 | }; | 150 | }; |
146 | 151 | ||
147 | enum mlx4_protocol { | 152 | enum mlx4_protocol { |
148 | MLX4_PROTOCOL_IB, | 153 | MLX4_PROT_IB_IPV6 = 0, |
149 | MLX4_PROTOCOL_EN, | 154 | MLX4_PROT_ETH, |
155 | MLX4_PROT_IB_IPV4, | ||
156 | MLX4_PROT_FCOE | ||
150 | }; | 157 | }; |
151 | 158 | ||
152 | enum { | 159 | enum { |
@@ -173,6 +180,12 @@ enum mlx4_special_vlan_idx { | |||
173 | MLX4_VLAN_REGULAR | 180 | MLX4_VLAN_REGULAR |
174 | }; | 181 | }; |
175 | 182 | ||
183 | enum mlx4_steer_type { | ||
184 | MLX4_MC_STEER = 0, | ||
185 | MLX4_UC_STEER, | ||
186 | MLX4_NUM_STEERS | ||
187 | }; | ||
188 | |||
176 | enum { | 189 | enum { |
177 | MLX4_NUM_FEXCH = 64 * 1024, | 190 | MLX4_NUM_FEXCH = 64 * 1024, |
178 | }; | 191 | }; |
@@ -223,6 +236,7 @@ struct mlx4_caps { | |||
223 | int num_eqs; | 236 | int num_eqs; |
224 | int reserved_eqs; | 237 | int reserved_eqs; |
225 | int num_comp_vectors; | 238 | int num_comp_vectors; |
239 | int comp_pool; | ||
226 | int num_mpts; | 240 | int num_mpts; |
227 | int num_mtt_segs; | 241 | int num_mtt_segs; |
228 | int mtts_per_seg; | 242 | int mtts_per_seg; |
@@ -245,6 +259,9 @@ struct mlx4_caps { | |||
245 | u16 stat_rate_support; | 259 | u16 stat_rate_support; |
246 | int udp_rss; | 260 | int udp_rss; |
247 | int loopback_support; | 261 | int loopback_support; |
262 | int vep_uc_steering; | ||
263 | int vep_mc_steering; | ||
264 | int wol; | ||
248 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; | 265 | u8 port_width_cap[MLX4_MAX_PORTS + 1]; |
249 | int max_gso_sz; | 266 | int max_gso_sz; |
250 | int reserved_qps_cnt[MLX4_NUM_QP_REGION]; | 267 | int reserved_qps_cnt[MLX4_NUM_QP_REGION]; |
@@ -334,6 +351,17 @@ struct mlx4_fmr { | |||
334 | struct mlx4_uar { | 351 | struct mlx4_uar { |
335 | unsigned long pfn; | 352 | unsigned long pfn; |
336 | int index; | 353 | int index; |
354 | struct list_head bf_list; | ||
355 | unsigned free_bf_bmap; | ||
356 | void __iomem *map; | ||
357 | void __iomem *bf_map; | ||
358 | }; | ||
359 | |||
360 | struct mlx4_bf { | ||
361 | unsigned long offset; | ||
362 | int buf_size; | ||
363 | struct mlx4_uar *uar; | ||
364 | void __iomem *reg; | ||
337 | }; | 365 | }; |
338 | 366 | ||
339 | struct mlx4_cq { | 367 | struct mlx4_cq { |
@@ -415,7 +443,7 @@ struct mlx4_dev { | |||
415 | unsigned long flags; | 443 | unsigned long flags; |
416 | struct mlx4_caps caps; | 444 | struct mlx4_caps caps; |
417 | struct radix_tree_root qp_table_tree; | 445 | struct radix_tree_root qp_table_tree; |
418 | u32 rev_id; | 446 | u8 rev_id; |
419 | char board_id[MLX4_BOARD_ID_LEN]; | 447 | char board_id[MLX4_BOARD_ID_LEN]; |
420 | }; | 448 | }; |
421 | 449 | ||
@@ -461,6 +489,8 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn); | |||
461 | 489 | ||
462 | int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); | 490 | int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); |
463 | void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); | 491 | void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); |
492 | int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf); | ||
493 | void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf); | ||
464 | 494 | ||
465 | int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, | 495 | int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, |
466 | struct mlx4_mtt *mtt); | 496 | struct mlx4_mtt *mtt); |
@@ -508,9 +538,15 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | |||
508 | int block_mcast_loopback, enum mlx4_protocol protocol); | 538 | int block_mcast_loopback, enum mlx4_protocol protocol); |
509 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 539 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
510 | enum mlx4_protocol protocol); | 540 | enum mlx4_protocol protocol); |
541 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
542 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
543 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
544 | int mlx4_unicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | ||
545 | int mlx4_SET_MCAST_FLTR(struct mlx4_dev *dev, u8 port, u64 mac, u64 clear, u8 mode); | ||
511 | 546 | ||
512 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 547 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *qpn, u8 wrap); |
513 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 548 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int qpn); |
549 | int mlx4_replace_mac(struct mlx4_dev *dev, u8 port, int qpn, u64 new_mac, u8 wrap); | ||
514 | 550 | ||
515 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | 551 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); |
516 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 552 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
@@ -526,5 +562,10 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | |||
526 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | 562 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); |
527 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); | 563 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); |
528 | int mlx4_test_interrupts(struct mlx4_dev *dev); | 564 | int mlx4_test_interrupts(struct mlx4_dev *dev); |
565 | int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector); | ||
566 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | ||
567 | |||
568 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | ||
569 | int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | ||
529 | 570 | ||
530 | #endif /* MLX4_DEVICE_H */ | 571 | #endif /* MLX4_DEVICE_H */ |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 0eeb2a1a867c..9e9eb21056ca 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -303,6 +303,7 @@ struct mlx4_wqe_data_seg { | |||
303 | 303 | ||
304 | enum { | 304 | enum { |
305 | MLX4_INLINE_ALIGN = 64, | 305 | MLX4_INLINE_ALIGN = 64, |
306 | MLX4_INLINE_SEG = 1 << 31, | ||
306 | }; | 307 | }; |
307 | 308 | ||
308 | struct mlx4_wqe_inline_seg { | 309 | struct mlx4_wqe_inline_seg { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 581703d86fbd..692dbae6ffa7 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -151,6 +151,7 @@ extern pgprot_t protection_map[16]; | |||
151 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | 151 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ |
152 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ | 152 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ |
153 | #define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */ | 153 | #define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */ |
154 | #define FAULT_FLAG_RETRY_NOWAIT 0x10 /* Don't drop mmap_sem and wait when retrying */ | ||
154 | 155 | ||
155 | /* | 156 | /* |
156 | * This interface is used by x86 PAT code to identify a pfn mapping that is | 157 | * This interface is used by x86 PAT code to identify a pfn mapping that is |
@@ -607,7 +608,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) | |||
607 | #endif | 608 | #endif |
608 | 609 | ||
609 | /* | 610 | /* |
610 | * Define the bit shifts to access each section. For non-existant | 611 | * Define the bit shifts to access each section. For non-existent |
611 | * sections we define the shift as 0; that plus a 0 mask ensures | 612 | * sections we define the shift as 0; that plus a 0 mask ensures |
612 | * the compiler will optimise away reference to them. | 613 | * the compiler will optimise away reference to them. |
613 | */ | 614 | */ |
@@ -859,7 +860,14 @@ extern void pagefault_out_of_memory(void); | |||
859 | 860 | ||
860 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) | 861 | #define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) |
861 | 862 | ||
863 | /* | ||
864 | * Flags passed to show_mem() and __show_free_areas() to suppress output in | ||
865 | * various contexts. | ||
866 | */ | ||
867 | #define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ | ||
868 | |||
862 | extern void show_free_areas(void); | 869 | extern void show_free_areas(void); |
870 | extern void __show_free_areas(unsigned int flags); | ||
863 | 871 | ||
864 | int shmem_lock(struct file *file, int lock, struct user_struct *user); | 872 | int shmem_lock(struct file *file, int lock, struct user_struct *user); |
865 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); | 873 | struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); |
@@ -906,6 +914,9 @@ unsigned long unmap_vmas(struct mmu_gather **tlb, | |||
906 | * @pgd_entry: if set, called for each non-empty PGD (top-level) entry | 914 | * @pgd_entry: if set, called for each non-empty PGD (top-level) entry |
907 | * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry | 915 | * @pud_entry: if set, called for each non-empty PUD (2nd-level) entry |
908 | * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry | 916 | * @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry |
917 | * this handler is required to be able to handle | ||
918 | * pmd_trans_huge() pmds. They may simply choose to | ||
919 | * split_huge_page() instead of handling it explicitly. | ||
909 | * @pte_entry: if set, called for each non-empty PTE (4th-level) entry | 920 | * @pte_entry: if set, called for each non-empty PTE (4th-level) entry |
910 | * @pte_hole: if set, called for each hole at all levels | 921 | * @pte_hole: if set, called for each hole at all levels |
911 | * @hugetlb_entry: if set, called for each hugetlb entry | 922 | * @hugetlb_entry: if set, called for each hugetlb entry |
@@ -971,6 +982,8 @@ static inline int handle_mm_fault(struct mm_struct *mm, | |||
971 | 982 | ||
972 | extern int make_pages_present(unsigned long addr, unsigned long end); | 983 | extern int make_pages_present(unsigned long addr, unsigned long end); |
973 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 984 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
985 | extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, | ||
986 | void *buf, int len, int write); | ||
974 | 987 | ||
975 | int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | 988 | int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, |
976 | unsigned long start, int len, unsigned int foll_flags, | 989 | unsigned long start, int len, unsigned int foll_flags, |
@@ -1347,7 +1360,7 @@ extern void setup_per_zone_wmarks(void); | |||
1347 | extern void calculate_zone_inactive_ratio(struct zone *zone); | 1360 | extern void calculate_zone_inactive_ratio(struct zone *zone); |
1348 | extern void mem_init(void); | 1361 | extern void mem_init(void); |
1349 | extern void __init mmap_init(void); | 1362 | extern void __init mmap_init(void); |
1350 | extern void show_mem(void); | 1363 | extern void show_mem(unsigned int flags); |
1351 | extern void si_meminfo(struct sysinfo * val); | 1364 | extern void si_meminfo(struct sysinfo * val); |
1352 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 1365 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
1353 | extern int after_bootmem; | 1366 | extern int after_bootmem; |
@@ -1537,6 +1550,8 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address, | |||
1537 | #define FOLL_GET 0x04 /* do get_page on page */ | 1550 | #define FOLL_GET 0x04 /* do get_page on page */ |
1538 | #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ | 1551 | #define FOLL_DUMP 0x08 /* give error on hole if it would be zero */ |
1539 | #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ | 1552 | #define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */ |
1553 | #define FOLL_NOWAIT 0x20 /* if a disk transfer is needed, start the IO | ||
1554 | * and return without waiting upon it */ | ||
1540 | #define FOLL_MLOCK 0x40 /* mark page as mlocked */ | 1555 | #define FOLL_MLOCK 0x40 /* mark page as mlocked */ |
1541 | #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ | 1556 | #define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */ |
1542 | #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ | 1557 | #define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */ |
@@ -1578,13 +1593,13 @@ static inline bool kernel_page_present(struct page *page) { return true; } | |||
1578 | #endif /* CONFIG_HIBERNATION */ | 1593 | #endif /* CONFIG_HIBERNATION */ |
1579 | #endif | 1594 | #endif |
1580 | 1595 | ||
1581 | extern struct vm_area_struct *get_gate_vma(struct task_struct *tsk); | 1596 | extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); |
1582 | #ifdef __HAVE_ARCH_GATE_AREA | 1597 | #ifdef __HAVE_ARCH_GATE_AREA |
1583 | int in_gate_area_no_task(unsigned long addr); | 1598 | int in_gate_area_no_mm(unsigned long addr); |
1584 | int in_gate_area(struct task_struct *task, unsigned long addr); | 1599 | int in_gate_area(struct mm_struct *mm, unsigned long addr); |
1585 | #else | 1600 | #else |
1586 | int in_gate_area_no_task(unsigned long addr); | 1601 | int in_gate_area_no_mm(unsigned long addr); |
1587 | #define in_gate_area(task, addr) ({(void)task; in_gate_area_no_task(addr);}) | 1602 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) |
1588 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1603 | #endif /* __HAVE_ARCH_GATE_AREA */ |
1589 | 1604 | ||
1590 | int drop_caches_sysctl_handler(struct ctl_table *, int, | 1605 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 26bc4e2cd275..02aa5619709b 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -237,8 +237,9 @@ struct mm_struct { | |||
237 | atomic_t mm_users; /* How many users with user space? */ | 237 | atomic_t mm_users; /* How many users with user space? */ |
238 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ | 238 | atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ |
239 | int map_count; /* number of VMAs */ | 239 | int map_count; /* number of VMAs */ |
240 | struct rw_semaphore mmap_sem; | 240 | |
241 | spinlock_t page_table_lock; /* Protects page tables and some counters */ | 241 | spinlock_t page_table_lock; /* Protects page tables and some counters */ |
242 | struct rw_semaphore mmap_sem; | ||
242 | 243 | ||
243 | struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung | 244 | struct list_head mmlist; /* List of maybe swapped mm's. These are globally strung |
244 | * together off init_mm.mmlist, and are protected | 245 | * together off init_mm.mmlist, and are protected |
@@ -281,6 +282,9 @@ struct mm_struct { | |||
281 | unsigned int token_priority; | 282 | unsigned int token_priority; |
282 | unsigned int last_interval; | 283 | unsigned int last_interval; |
283 | 284 | ||
285 | /* How many tasks sharing this mm are OOM_DISABLE */ | ||
286 | atomic_t oom_disable_count; | ||
287 | |||
284 | unsigned long flags; /* Must use atomic bitops to access the bits */ | 288 | unsigned long flags; /* Must use atomic bitops to access the bits */ |
285 | 289 | ||
286 | struct core_state *core_state; /* coredumping support */ | 290 | struct core_state *core_state; /* coredumping support */ |
@@ -313,8 +317,6 @@ struct mm_struct { | |||
313 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 317 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
314 | pgtable_t pmd_huge_pte; /* protected by page_table_lock */ | 318 | pgtable_t pmd_huge_pte; /* protected by page_table_lock */ |
315 | #endif | 319 | #endif |
316 | /* How many tasks sharing this mm are OOM_DISABLE */ | ||
317 | atomic_t oom_disable_count; | ||
318 | }; | 320 | }; |
319 | 321 | ||
320 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ | 322 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ |
diff --git a/include/linux/mmc/boot.h b/include/linux/mmc/boot.h new file mode 100644 index 000000000000..39d787c229cb --- /dev/null +++ b/include/linux/mmc/boot.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef MMC_BOOT_H | ||
2 | #define MMC_BOOT_H | ||
3 | |||
4 | enum { MMC_PROGRESS_ENTER, MMC_PROGRESS_INIT, | ||
5 | MMC_PROGRESS_LOAD, MMC_PROGRESS_DONE }; | ||
6 | |||
7 | #endif | ||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h index 8ce082781ccb..adb4888248be 100644 --- a/include/linux/mmc/card.h +++ b/include/linux/mmc/card.h | |||
@@ -54,6 +54,9 @@ struct mmc_ext_csd { | |||
54 | unsigned int sec_trim_mult; /* Secure trim multiplier */ | 54 | unsigned int sec_trim_mult; /* Secure trim multiplier */ |
55 | unsigned int sec_erase_mult; /* Secure erase multiplier */ | 55 | unsigned int sec_erase_mult; /* Secure erase multiplier */ |
56 | unsigned int trim_timeout; /* In milliseconds */ | 56 | unsigned int trim_timeout; /* In milliseconds */ |
57 | bool enhanced_area_en; /* enable bit */ | ||
58 | unsigned long long enhanced_area_offset; /* Units: Byte */ | ||
59 | unsigned int enhanced_area_size; /* Units: KB */ | ||
57 | }; | 60 | }; |
58 | 61 | ||
59 | struct sd_scr { | 62 | struct sd_scr { |
@@ -121,6 +124,7 @@ struct mmc_card { | |||
121 | /* for byte mode */ | 124 | /* for byte mode */ |
122 | #define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */ | 125 | #define MMC_QUIRK_NONSTD_SDIO (1<<2) /* non-standard SDIO card attached */ |
123 | /* (missing CIA registers) */ | 126 | /* (missing CIA registers) */ |
127 | #define MMC_QUIRK_BROKEN_CLK_GATING (1<<3) /* clock gating the sdio bus will make card fail */ | ||
124 | 128 | ||
125 | unsigned int erase_size; /* erase size in sectors */ | 129 | unsigned int erase_size; /* erase size in sectors */ |
126 | unsigned int erase_shift; /* if erase unit is power 2 */ | 130 | unsigned int erase_shift; /* if erase unit is power 2 */ |
@@ -148,6 +152,8 @@ struct mmc_card { | |||
148 | struct dentry *debugfs_root; | 152 | struct dentry *debugfs_root; |
149 | }; | 153 | }; |
150 | 154 | ||
155 | void mmc_fixup_device(struct mmc_card *dev); | ||
156 | |||
151 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) | 157 | #define mmc_card_mmc(c) ((c)->type == MMC_TYPE_MMC) |
152 | #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) | 158 | #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD) |
153 | #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) | 159 | #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO) |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 64e013f1cfb8..07f27af4dba5 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -160,6 +160,7 @@ extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int); | |||
160 | 160 | ||
161 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); | 161 | extern int __mmc_claim_host(struct mmc_host *host, atomic_t *abort); |
162 | extern void mmc_release_host(struct mmc_host *host); | 162 | extern void mmc_release_host(struct mmc_host *host); |
163 | extern void mmc_do_release_host(struct mmc_host *host); | ||
163 | extern int mmc_try_claim_host(struct mmc_host *host); | 164 | extern int mmc_try_claim_host(struct mmc_host *host); |
164 | 165 | ||
165 | /** | 166 | /** |
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 16b0261763ed..bdd7ceeb99e4 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h | |||
@@ -98,7 +98,7 @@ struct mmc_data; | |||
98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related | 98 | * EVENT_DATA_COMPLETE is set in @pending_events, all data-related |
99 | * interrupts must be disabled and @data_status updated with a | 99 | * interrupts must be disabled and @data_status updated with a |
100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the | 100 | * snapshot of SR. Similarly, before EVENT_CMD_COMPLETE is set, the |
101 | * CMDRDY interupt must be disabled and @cmd_status updated with a | 101 | * CMDRDY interrupt must be disabled and @cmd_status updated with a |
102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the | 102 | * snapshot of SR, and before EVENT_XFER_COMPLETE can be set, the |
103 | * bytes_xfered field of @data must be written. This is ensured by | 103 | * bytes_xfered field of @data must be written. This is ensured by |
104 | * using barriers. | 104 | * using barriers. |
@@ -140,6 +140,7 @@ struct dw_mci { | |||
140 | u32 bus_hz; | 140 | u32 bus_hz; |
141 | u32 current_speed; | 141 | u32 current_speed; |
142 | u32 num_slots; | 142 | u32 num_slots; |
143 | u32 fifoth_val; | ||
143 | struct platform_device *pdev; | 144 | struct platform_device *pdev; |
144 | struct dw_mci_board *pdata; | 145 | struct dw_mci_board *pdata; |
145 | struct dw_mci_slot *slot[MAX_MCI_SLOTS]; | 146 | struct dw_mci_slot *slot[MAX_MCI_SLOTS]; |
@@ -151,6 +152,8 @@ struct dw_mci { | |||
151 | 152 | ||
152 | /* Workaround flags */ | 153 | /* Workaround flags */ |
153 | u32 quirks; | 154 | u32 quirks; |
155 | |||
156 | struct regulator *vmmc; /* Power regulator */ | ||
154 | }; | 157 | }; |
155 | 158 | ||
156 | /* DMA ops for Internal/External DMAC interface */ | 159 | /* DMA ops for Internal/External DMAC interface */ |
@@ -165,14 +168,14 @@ struct dw_mci_dma_ops { | |||
165 | }; | 168 | }; |
166 | 169 | ||
167 | /* IP Quirks/flags. */ | 170 | /* IP Quirks/flags. */ |
168 | /* No special quirks or flags to cater for */ | ||
169 | #define DW_MCI_QUIRK_NONE 0 | ||
170 | /* DTO fix for command transmission with IDMAC configured */ | 171 | /* DTO fix for command transmission with IDMAC configured */ |
171 | #define DW_MCI_QUIRK_IDMAC_DTO 1 | 172 | #define DW_MCI_QUIRK_IDMAC_DTO BIT(0) |
172 | /* delay needed between retries on some 2.11a implementations */ | 173 | /* delay needed between retries on some 2.11a implementations */ |
173 | #define DW_MCI_QUIRK_RETRY_DELAY 2 | 174 | #define DW_MCI_QUIRK_RETRY_DELAY BIT(1) |
174 | /* High Speed Capable - Supports HS cards (upto 50MHz) */ | 175 | /* High Speed Capable - Supports HS cards (up to 50MHz) */ |
175 | #define DW_MCI_QUIRK_HIGHSPEED 4 | 176 | #define DW_MCI_QUIRK_HIGHSPEED BIT(2) |
177 | /* Unreliable card detection */ | ||
178 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) | ||
176 | 179 | ||
177 | 180 | ||
178 | struct dma_pdata; | 181 | struct dma_pdata; |
@@ -192,6 +195,8 @@ struct dw_mci_board { | |||
192 | u32 quirks; /* Workaround / Quirk flags */ | 195 | u32 quirks; /* Workaround / Quirk flags */ |
193 | unsigned int bus_hz; /* Bus speed */ | 196 | unsigned int bus_hz; /* Bus speed */ |
194 | 197 | ||
198 | unsigned int caps; /* Capabilities */ | ||
199 | |||
195 | /* delay in mS before detecting cards after interrupt */ | 200 | /* delay in mS before detecting cards after interrupt */ |
196 | u32 detect_delay_ms; | 201 | u32 detect_delay_ms; |
197 | 202 | ||
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 612301f85d14..264ba5451e3b 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -253,6 +253,8 @@ struct _mmc_csd { | |||
253 | * EXT_CSD fields | 253 | * EXT_CSD fields |
254 | */ | 254 | */ |
255 | 255 | ||
256 | #define EXT_CSD_PARTITION_ATTRIBUTE 156 /* R/W */ | ||
257 | #define EXT_CSD_PARTITION_SUPPORT 160 /* RO */ | ||
256 | #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ | 258 | #define EXT_CSD_ERASE_GROUP_DEF 175 /* R/W */ |
257 | #define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ | 259 | #define EXT_CSD_ERASED_MEM_CONT 181 /* RO */ |
258 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ | 260 | #define EXT_CSD_BUS_WIDTH 183 /* R/W */ |
@@ -262,6 +264,7 @@ struct _mmc_csd { | |||
262 | #define EXT_CSD_CARD_TYPE 196 /* RO */ | 264 | #define EXT_CSD_CARD_TYPE 196 /* RO */ |
263 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ | 265 | #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ |
264 | #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ | 266 | #define EXT_CSD_S_A_TIMEOUT 217 /* RO */ |
267 | #define EXT_CSD_HC_WP_GRP_SIZE 221 /* RO */ | ||
265 | #define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */ | 268 | #define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */ |
266 | #define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */ | 269 | #define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */ |
267 | #define EXT_CSD_SEC_TRIM_MULT 229 /* RO */ | 270 | #define EXT_CSD_SEC_TRIM_MULT 229 /* RO */ |
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h index 38d393092812..9eb9b4b96f55 100644 --- a/include/linux/mmc/sh_mmcif.h +++ b/include/linux/mmc/sh_mmcif.h | |||
@@ -104,9 +104,6 @@ static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val) | |||
104 | 104 | ||
105 | #define SH_MMCIF_BBS 512 /* boot block size */ | 105 | #define SH_MMCIF_BBS 512 /* boot block size */ |
106 | 106 | ||
107 | enum { MMCIF_PROGRESS_ENTER, MMCIF_PROGRESS_INIT, | ||
108 | MMCIF_PROGRESS_LOAD, MMCIF_PROGRESS_DONE }; | ||
109 | |||
110 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, | 107 | static inline void sh_mmcif_boot_cmd_send(void __iomem *base, |
111 | unsigned long cmd, unsigned long arg) | 108 | unsigned long cmd, unsigned long arg) |
112 | { | 109 | { |
diff --git a/include/linux/mfd/sh_mobile_sdhi.h b/include/linux/mmc/sh_mobile_sdhi.h index c981b959760f..c981b959760f 100644 --- a/include/linux/mfd/sh_mobile_sdhi.h +++ b/include/linux/mmc/sh_mobile_sdhi.h | |||
diff --git a/include/linux/mmc/tmio.h b/include/linux/mmc/tmio.h new file mode 100644 index 000000000000..19490b942db0 --- /dev/null +++ b/include/linux/mmc/tmio.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * include/linux/mmc/tmio.h | ||
3 | * | ||
4 | * Copyright (C) 2007 Ian Molton | ||
5 | * Copyright (C) 2004 Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Driver for the MMC / SD / SDIO cell found in: | ||
12 | * | ||
13 | * TC6393XB TC6391XB TC6387XB T7L66XB ASIC3 | ||
14 | */ | ||
15 | #ifndef _LINUX_MMC_TMIO_H_ | ||
16 | #define _LINUX_MMC_TMIO_H_ | ||
17 | |||
18 | #define CTL_SD_CMD 0x00 | ||
19 | #define CTL_ARG_REG 0x04 | ||
20 | #define CTL_STOP_INTERNAL_ACTION 0x08 | ||
21 | #define CTL_XFER_BLK_COUNT 0xa | ||
22 | #define CTL_RESPONSE 0x0c | ||
23 | #define CTL_STATUS 0x1c | ||
24 | #define CTL_IRQ_MASK 0x20 | ||
25 | #define CTL_SD_CARD_CLK_CTL 0x24 | ||
26 | #define CTL_SD_XFER_LEN 0x26 | ||
27 | #define CTL_SD_MEM_CARD_OPT 0x28 | ||
28 | #define CTL_SD_ERROR_DETAIL_STATUS 0x2c | ||
29 | #define CTL_SD_DATA_PORT 0x30 | ||
30 | #define CTL_TRANSACTION_CTL 0x34 | ||
31 | #define CTL_SDIO_STATUS 0x36 | ||
32 | #define CTL_SDIO_IRQ_MASK 0x38 | ||
33 | #define CTL_RESET_SD 0xe0 | ||
34 | #define CTL_SDIO_REGS 0x100 | ||
35 | #define CTL_CLK_AND_WAIT_CTL 0x138 | ||
36 | #define CTL_RESET_SDIO 0x1e0 | ||
37 | |||
38 | /* Definitions for values the CTRL_STATUS register can take. */ | ||
39 | #define TMIO_STAT_CMDRESPEND 0x00000001 | ||
40 | #define TMIO_STAT_DATAEND 0x00000004 | ||
41 | #define TMIO_STAT_CARD_REMOVE 0x00000008 | ||
42 | #define TMIO_STAT_CARD_INSERT 0x00000010 | ||
43 | #define TMIO_STAT_SIGSTATE 0x00000020 | ||
44 | #define TMIO_STAT_WRPROTECT 0x00000080 | ||
45 | #define TMIO_STAT_CARD_REMOVE_A 0x00000100 | ||
46 | #define TMIO_STAT_CARD_INSERT_A 0x00000200 | ||
47 | #define TMIO_STAT_SIGSTATE_A 0x00000400 | ||
48 | #define TMIO_STAT_CMD_IDX_ERR 0x00010000 | ||
49 | #define TMIO_STAT_CRCFAIL 0x00020000 | ||
50 | #define TMIO_STAT_STOPBIT_ERR 0x00040000 | ||
51 | #define TMIO_STAT_DATATIMEOUT 0x00080000 | ||
52 | #define TMIO_STAT_RXOVERFLOW 0x00100000 | ||
53 | #define TMIO_STAT_TXUNDERRUN 0x00200000 | ||
54 | #define TMIO_STAT_CMDTIMEOUT 0x00400000 | ||
55 | #define TMIO_STAT_RXRDY 0x01000000 | ||
56 | #define TMIO_STAT_TXRQ 0x02000000 | ||
57 | #define TMIO_STAT_ILL_FUNC 0x20000000 | ||
58 | #define TMIO_STAT_CMD_BUSY 0x40000000 | ||
59 | #define TMIO_STAT_ILL_ACCESS 0x80000000 | ||
60 | |||
61 | #define TMIO_BBS 512 /* Boot block size */ | ||
62 | |||
63 | #endif /* _LINUX_MMC_TMIO_H_ */ | ||
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 9d2deb200f54..a3759cb0ac10 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
@@ -249,7 +249,7 @@ static inline int ip6mr_sk_done(struct sock *sk) | |||
249 | * Structure used to communicate from kernel to multicast router. | 249 | * Structure used to communicate from kernel to multicast router. |
250 | * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} | 250 | * We'll overlay the structure onto an MLD header (not an IPv6 heder like igmpmsg{} |
251 | * used for IPv4 implementation). This is because this structure will be passed via an | 251 | * used for IPv4 implementation). This is because this structure will be passed via an |
252 | * IPv6 raw socket, on wich an application will only receiver the payload i.e the data after | 252 | * IPv6 raw socket, on which an application will only receiver the payload i.e the data after |
253 | * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) | 253 | * the IPv6 header and all the extension headers. (See section 3 of RFC 3542) |
254 | */ | 254 | */ |
255 | 255 | ||
diff --git a/include/linux/mtd/blktrans.h b/include/linux/mtd/blktrans.h index 26529ebd59cc..1bbd9f289245 100644 --- a/include/linux/mtd/blktrans.h +++ b/include/linux/mtd/blktrans.h | |||
@@ -36,6 +36,7 @@ struct mtd_blktrans_dev { | |||
36 | struct mtd_info *mtd; | 36 | struct mtd_info *mtd; |
37 | struct mutex lock; | 37 | struct mutex lock; |
38 | int devnum; | 38 | int devnum; |
39 | bool bg_stop; | ||
39 | unsigned long size; | 40 | unsigned long size; |
40 | int readonly; | 41 | int readonly; |
41 | int open; | 42 | int open; |
@@ -62,6 +63,7 @@ struct mtd_blktrans_ops { | |||
62 | unsigned long block, char *buffer); | 63 | unsigned long block, char *buffer); |
63 | int (*discard)(struct mtd_blktrans_dev *dev, | 64 | int (*discard)(struct mtd_blktrans_dev *dev, |
64 | unsigned long block, unsigned nr_blocks); | 65 | unsigned long block, unsigned nr_blocks); |
66 | void (*background)(struct mtd_blktrans_dev *dev); | ||
65 | 67 | ||
66 | /* Block layer ioctls */ | 68 | /* Block layer ioctls */ |
67 | int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo); | 69 | int (*getgeo)(struct mtd_blktrans_dev *dev, struct hd_geometry *geo); |
@@ -85,6 +87,7 @@ extern int register_mtd_blktrans(struct mtd_blktrans_ops *tr); | |||
85 | extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr); | 87 | extern int deregister_mtd_blktrans(struct mtd_blktrans_ops *tr); |
86 | extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); | 88 | extern int add_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); |
87 | extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); | 89 | extern int del_mtd_blktrans_dev(struct mtd_blktrans_dev *dev); |
90 | extern int mtd_blktrans_cease_background(struct mtd_blktrans_dev *dev); | ||
88 | 91 | ||
89 | 92 | ||
90 | #endif /* __MTD_TRANS_H__ */ | 93 | #endif /* __MTD_TRANS_H__ */ |
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index a9baee6864af..d24925492972 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h | |||
@@ -308,7 +308,7 @@ static inline uint32_t cfi_build_cmd_addr(uint32_t cmd_ofs, | |||
308 | 308 | ||
309 | addr = (cmd_ofs * type) * interleave; | 309 | addr = (cmd_ofs * type) * interleave; |
310 | 310 | ||
311 | /* Modify the unlock address if we are in compatiblity mode. | 311 | /* Modify the unlock address if we are in compatibility mode. |
312 | * For 16bit devices on 8 bit busses | 312 | * For 16bit devices on 8 bit busses |
313 | * and 32bit devices on 16 bit busses | 313 | * and 32bit devices on 16 bit busses |
314 | * set the low bit of the alternating bit sequence of the address. | 314 | * set the low bit of the alternating bit sequence of the address. |
@@ -535,6 +535,7 @@ struct cfi_fixup { | |||
535 | #define CFI_MFR_CONTINUATION 0x007F | 535 | #define CFI_MFR_CONTINUATION 0x007F |
536 | 536 | ||
537 | #define CFI_MFR_AMD 0x0001 | 537 | #define CFI_MFR_AMD 0x0001 |
538 | #define CFI_MFR_AMIC 0x0037 | ||
538 | #define CFI_MFR_ATMEL 0x001F | 539 | #define CFI_MFR_ATMEL 0x001F |
539 | #define CFI_MFR_EON 0x001C | 540 | #define CFI_MFR_EON 0x001C |
540 | #define CFI_MFR_FUJITSU 0x0004 | 541 | #define CFI_MFR_FUJITSU 0x0004 |
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h new file mode 100644 index 000000000000..e94b8e128074 --- /dev/null +++ b/include/linux/mtd/latch-addr-flash.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Interface for NOR flash driver whose high address lines are latched | ||
3 | * | ||
4 | * Copyright © 2008 MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public License | ||
7 | * version 2. This program is licensed "as is" without any warranty of any | ||
8 | * kind, whether express or implied. | ||
9 | */ | ||
10 | #ifndef __LATCH_ADDR_FLASH__ | ||
11 | #define __LATCH_ADDR_FLASH__ | ||
12 | |||
13 | struct map_info; | ||
14 | struct mtd_partition; | ||
15 | |||
16 | struct latch_addr_flash_data { | ||
17 | unsigned int width; | ||
18 | unsigned int size; | ||
19 | |||
20 | int (*init)(void *data, int cs); | ||
21 | void (*done)(void *data); | ||
22 | void (*set_window)(unsigned long offset, void *data); | ||
23 | void *data; | ||
24 | |||
25 | unsigned int nr_parts; | ||
26 | struct mtd_partition *parts; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 1f489b247a29..d44192740f6f 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -140,6 +140,7 @@ typedef enum { | |||
140 | NAND_ECC_HW, | 140 | NAND_ECC_HW, |
141 | NAND_ECC_HW_SYNDROME, | 141 | NAND_ECC_HW_SYNDROME, |
142 | NAND_ECC_HW_OOB_FIRST, | 142 | NAND_ECC_HW_OOB_FIRST, |
143 | NAND_ECC_SOFT_BCH, | ||
143 | } nand_ecc_modes_t; | 144 | } nand_ecc_modes_t; |
144 | 145 | ||
145 | /* | 146 | /* |
@@ -339,6 +340,7 @@ struct nand_hw_control { | |||
339 | * @prepad: padding information for syndrome based ecc generators | 340 | * @prepad: padding information for syndrome based ecc generators |
340 | * @postpad: padding information for syndrome based ecc generators | 341 | * @postpad: padding information for syndrome based ecc generators |
341 | * @layout: ECC layout control struct pointer | 342 | * @layout: ECC layout control struct pointer |
343 | * @priv: pointer to private ecc control data | ||
342 | * @hwctl: function to control hardware ecc generator. Must only | 344 | * @hwctl: function to control hardware ecc generator. Must only |
343 | * be provided if an hardware ECC is available | 345 | * be provided if an hardware ECC is available |
344 | * @calculate: function for ecc calculation or readback from ecc hardware | 346 | * @calculate: function for ecc calculation or readback from ecc hardware |
@@ -362,6 +364,7 @@ struct nand_ecc_ctrl { | |||
362 | int prepad; | 364 | int prepad; |
363 | int postpad; | 365 | int postpad; |
364 | struct nand_ecclayout *layout; | 366 | struct nand_ecclayout *layout; |
367 | void *priv; | ||
365 | void (*hwctl)(struct mtd_info *mtd, int mode); | 368 | void (*hwctl)(struct mtd_info *mtd, int mode); |
366 | int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, | 369 | int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, |
367 | uint8_t *ecc_code); | 370 | uint8_t *ecc_code); |
@@ -413,9 +416,9 @@ struct nand_buffers { | |||
413 | * @select_chip: [REPLACEABLE] select chip nr | 416 | * @select_chip: [REPLACEABLE] select chip nr |
414 | * @block_bad: [REPLACEABLE] check, if the block is bad | 417 | * @block_bad: [REPLACEABLE] check, if the block is bad |
415 | * @block_markbad: [REPLACEABLE] mark the block bad | 418 | * @block_markbad: [REPLACEABLE] mark the block bad |
416 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific funtion for controlling | 419 | * @cmd_ctrl: [BOARDSPECIFIC] hardwarespecific function for controlling |
417 | * ALE/CLE/nCE. Also used to write command and address | 420 | * ALE/CLE/nCE. Also used to write command and address |
418 | * @init_size: [BOARDSPECIFIC] hardwarespecific funtion for setting | 421 | * @init_size: [BOARDSPECIFIC] hardwarespecific function for setting |
419 | * mtd->oobsize, mtd->writesize and so on. | 422 | * mtd->oobsize, mtd->writesize and so on. |
420 | * @id_data contains the 8 bytes values of NAND_CMD_READID. | 423 | * @id_data contains the 8 bytes values of NAND_CMD_READID. |
421 | * Return with the bus width. | 424 | * Return with the bus width. |
@@ -434,7 +437,7 @@ struct nand_buffers { | |||
434 | * @erase_cmd: [INTERN] erase command write function, selectable due | 437 | * @erase_cmd: [INTERN] erase command write function, selectable due |
435 | * to AND support. | 438 | * to AND support. |
436 | * @scan_bbt: [REPLACEABLE] function to scan bad block table | 439 | * @scan_bbt: [REPLACEABLE] function to scan bad block table |
437 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transfering | 440 | * @chip_delay: [BOARDSPECIFIC] chip dependent delay for transferring |
438 | * data from array to read regs (tR). | 441 | * data from array to read regs (tR). |
439 | * @state: [INTERN] the current state of the NAND device | 442 | * @state: [INTERN] the current state of the NAND device |
440 | * @oob_poi: poison value buffer | 443 | * @oob_poi: poison value buffer |
diff --git a/include/linux/mtd/nand_bch.h b/include/linux/mtd/nand_bch.h new file mode 100644 index 000000000000..74acf5367556 --- /dev/null +++ b/include/linux/mtd/nand_bch.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * Copyright © 2011 Ivan Djelic <ivan.djelic@parrot.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * This file is the header for the NAND BCH ECC implementation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __MTD_NAND_BCH_H__ | ||
12 | #define __MTD_NAND_BCH_H__ | ||
13 | |||
14 | struct mtd_info; | ||
15 | struct nand_bch_control; | ||
16 | |||
17 | #if defined(CONFIG_MTD_NAND_ECC_BCH) | ||
18 | |||
19 | static inline int mtd_nand_has_bch(void) { return 1; } | ||
20 | |||
21 | /* | ||
22 | * Calculate BCH ecc code | ||
23 | */ | ||
24 | int nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | ||
25 | u_char *ecc_code); | ||
26 | |||
27 | /* | ||
28 | * Detect and correct bit errors | ||
29 | */ | ||
30 | int nand_bch_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, | ||
31 | u_char *calc_ecc); | ||
32 | /* | ||
33 | * Initialize BCH encoder/decoder | ||
34 | */ | ||
35 | struct nand_bch_control * | ||
36 | nand_bch_init(struct mtd_info *mtd, unsigned int eccsize, | ||
37 | unsigned int eccbytes, struct nand_ecclayout **ecclayout); | ||
38 | /* | ||
39 | * Release BCH encoder/decoder resources | ||
40 | */ | ||
41 | void nand_bch_free(struct nand_bch_control *nbc); | ||
42 | |||
43 | #else /* !CONFIG_MTD_NAND_ECC_BCH */ | ||
44 | |||
45 | static inline int mtd_nand_has_bch(void) { return 0; } | ||
46 | |||
47 | static inline int | ||
48 | nand_bch_calculate_ecc(struct mtd_info *mtd, const u_char *dat, | ||
49 | u_char *ecc_code) | ||
50 | { | ||
51 | return -1; | ||
52 | } | ||
53 | |||
54 | static inline int | ||
55 | nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf, | ||
56 | unsigned char *read_ecc, unsigned char *calc_ecc) | ||
57 | { | ||
58 | return -1; | ||
59 | } | ||
60 | |||
61 | static inline struct nand_bch_control * | ||
62 | nand_bch_init(struct mtd_info *mtd, unsigned int eccsize, | ||
63 | unsigned int eccbytes, struct nand_ecclayout **ecclayout) | ||
64 | { | ||
65 | return NULL; | ||
66 | } | ||
67 | |||
68 | static inline void nand_bch_free(struct nand_bch_control *nbc) {} | ||
69 | |||
70 | #endif /* CONFIG_MTD_NAND_ECC_BCH */ | ||
71 | |||
72 | #endif /* __MTD_NAND_BCH_H__ */ | ||
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index ae418e41d8f5..52b6f187bf49 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -198,6 +198,7 @@ struct onenand_chip { | |||
198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) | 198 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) |
199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 199 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
200 | #define ONENAND_OOBBUF_ALLOC (0x2000) | 200 | #define ONENAND_OOBBUF_ALLOC (0x2000) |
201 | #define ONENAND_SKIP_INITIAL_UNLOCKING (0x4000) | ||
201 | 202 | ||
202 | #define ONENAND_IS_4KB_PAGE(this) \ | 203 | #define ONENAND_IS_4KB_PAGE(this) \ |
203 | (this->options & ONENAND_HAS_4KB_PAGE) | 204 | (this->options & ONENAND_HAS_4KB_PAGE) |
diff --git a/include/linux/mtd/xip.h b/include/linux/mtd/xip.h index 36efcba15ecd..abed4dec5c2f 100644 --- a/include/linux/mtd/xip.h +++ b/include/linux/mtd/xip.h | |||
@@ -51,7 +51,7 @@ | |||
51 | * return in usecs the elapsed timebetween now and the reference x as | 51 | * return in usecs the elapsed timebetween now and the reference x as |
52 | * returned by xip_currtime(). | 52 | * returned by xip_currtime(). |
53 | * | 53 | * |
54 | * note 1: convertion to usec can be approximated, as long as the | 54 | * note 1: conversion to usec can be approximated, as long as the |
55 | * returned value is <= the real elapsed time. | 55 | * returned value is <= the real elapsed time. |
56 | * note 2: this should be able to cope with a few seconds without | 56 | * note 2: this should be able to cope with a few seconds without |
57 | * overflowing. | 57 | * overflowing. |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5eeb2cd3631c..0249fe7e3872 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -2598,8 +2598,8 @@ static inline int dev_ethtool_get_settings(struct net_device *dev, | |||
2598 | 2598 | ||
2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
2600 | { | 2600 | { |
2601 | if (dev->hw_features & NETIF_F_RXCSUM) | 2601 | if (dev->features & NETIF_F_RXCSUM) |
2602 | return !!(dev->features & NETIF_F_RXCSUM); | 2602 | return 1; |
2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) | 2603 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) |
2604 | return 0; | 2604 | return 0; |
2605 | return dev->ethtool_ops->get_rx_csum(dev); | 2605 | return dev->ethtool_ops->get_rx_csum(dev); |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index eeec00abb664..7fa95df60146 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -270,7 +270,8 @@ struct nf_afinfo { | |||
270 | unsigned int dataoff, | 270 | unsigned int dataoff, |
271 | unsigned int len, | 271 | unsigned int len, |
272 | u_int8_t protocol); | 272 | u_int8_t protocol); |
273 | int (*route)(struct dst_entry **dst, struct flowi *fl); | 273 | int (*route)(struct net *net, struct dst_entry **dst, |
274 | struct flowi *fl, bool strict); | ||
274 | void (*saveroute)(const struct sk_buff *skb, | 275 | void (*saveroute)(const struct sk_buff *skb, |
275 | struct nf_queue_entry *entry); | 276 | struct nf_queue_entry *entry); |
276 | int (*reroute)(struct sk_buff *skb, | 277 | int (*reroute)(struct sk_buff *skb, |
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h index ec333d83f3b4..5a262e3ae715 100644 --- a/include/linux/netfilter/ipset/ip_set.h +++ b/include/linux/netfilter/ipset/ip_set.h | |||
@@ -293,7 +293,7 @@ struct ip_set { | |||
293 | /* Lock protecting the set data */ | 293 | /* Lock protecting the set data */ |
294 | rwlock_t lock; | 294 | rwlock_t lock; |
295 | /* References to the set */ | 295 | /* References to the set */ |
296 | atomic_t ref; | 296 | u32 ref; |
297 | /* The core set type */ | 297 | /* The core set type */ |
298 | struct ip_set_type *type; | 298 | struct ip_set_type *type; |
299 | /* The type variant doing the real job */ | 299 | /* The type variant doing the real job */ |
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h index ec9d9bea1e37..a0196ac79051 100644 --- a/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/include/linux/netfilter/ipset/ip_set_ahash.h | |||
@@ -515,8 +515,7 @@ type_pf_head(struct ip_set *set, struct sk_buff *skb) | |||
515 | if (h->netmask != HOST_MASK) | 515 | if (h->netmask != HOST_MASK) |
516 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask); | 516 | NLA_PUT_U8(skb, IPSET_ATTR_NETMASK, h->netmask); |
517 | #endif | 517 | #endif |
518 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, | 518 | NLA_PUT_NET32(skb, IPSET_ATTR_REFERENCES, htonl(set->ref - 1)); |
519 | htonl(atomic_read(&set->ref) - 1)); | ||
520 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize)); | 519 | NLA_PUT_NET32(skb, IPSET_ATTR_MEMSIZE, htonl(memsize)); |
521 | if (with_timeout(h->timeout)) | 520 | if (with_timeout(h->timeout)) |
522 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout)); | 521 | NLA_PUT_NET32(skb, IPSET_ATTR_TIMEOUT, htonl(h->timeout)); |
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 3882a81a3b3c..5aebd170f899 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h | |||
@@ -18,4 +18,14 @@ static inline bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, | |||
18 | extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, | 18 | extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, |
19 | __be16 *port); | 19 | __be16 *port); |
20 | 20 | ||
21 | static inline bool ip_set_proto_with_ports(u8 proto) | ||
22 | { | ||
23 | switch (proto) { | ||
24 | case IPPROTO_TCP: | ||
25 | case IPPROTO_UDP: | ||
26 | return true; | ||
27 | } | ||
28 | return false; | ||
29 | } | ||
30 | |||
21 | #endif /*_IP_SET_GETPORT_H*/ | 31 | #endif /*_IP_SET_GETPORT_H*/ |
diff --git a/include/linux/netfilter/nf_conntrack_proto_gre.h b/include/linux/netfilter/nf_conntrack_proto_gre.h index 2a10efda17fb..6a0664c0c451 100644 --- a/include/linux/netfilter/nf_conntrack_proto_gre.h +++ b/include/linux/netfilter/nf_conntrack_proto_gre.h | |||
@@ -60,7 +60,7 @@ struct gre_hdr_pptp { | |||
60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ | 60 | __be16 payload_len; /* size of ppp payload, not inc. gre header */ |
61 | __be16 call_id; /* peer's call_id for this session */ | 61 | __be16 call_id; /* peer's call_id for this session */ |
62 | __be32 seq; /* sequence number. Present if S==1 */ | 62 | __be32 seq; /* sequence number. Present if S==1 */ |
63 | __be32 ack; /* seq number of highest packet recieved by */ | 63 | __be32 ack; /* seq number of highest packet received by */ |
64 | /* sender in this session */ | 64 | /* sender in this session */ |
65 | }; | 65 | }; |
66 | 66 | ||
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h index ea9b8d380527..90c2c9575bac 100644 --- a/include/linux/netfilter/nfnetlink_log.h +++ b/include/linux/netfilter/nfnetlink_log.h | |||
@@ -28,8 +28,8 @@ struct nfulnl_msg_packet_hw { | |||
28 | }; | 28 | }; |
29 | 29 | ||
30 | struct nfulnl_msg_packet_timestamp { | 30 | struct nfulnl_msg_packet_timestamp { |
31 | aligned_be64 sec; | 31 | __aligned_be64 sec; |
32 | aligned_be64 usec; | 32 | __aligned_be64 usec; |
33 | }; | 33 | }; |
34 | 34 | ||
35 | enum nfulnl_attr_type { | 35 | enum nfulnl_attr_type { |
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h index 2455fe5f4e01..af94e0014ebd 100644 --- a/include/linux/netfilter/nfnetlink_queue.h +++ b/include/linux/netfilter/nfnetlink_queue.h | |||
@@ -25,8 +25,8 @@ struct nfqnl_msg_packet_hw { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct nfqnl_msg_packet_timestamp { | 27 | struct nfqnl_msg_packet_timestamp { |
28 | aligned_be64 sec; | 28 | __aligned_be64 sec; |
29 | aligned_be64 usec; | 29 | __aligned_be64 usec; |
30 | }; | 30 | }; |
31 | 31 | ||
32 | enum nfqnl_attr_type { | 32 | enum nfqnl_attr_type { |
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h index 92fcbb0d193e..f1d6c15bd9e3 100644 --- a/include/linux/netfilter/xt_connbytes.h +++ b/include/linux/netfilter/xt_connbytes.h | |||
@@ -17,8 +17,8 @@ enum xt_connbytes_direction { | |||
17 | 17 | ||
18 | struct xt_connbytes_info { | 18 | struct xt_connbytes_info { |
19 | struct { | 19 | struct { |
20 | aligned_u64 from; /* count to be matched */ | 20 | __aligned_u64 from; /* count to be matched */ |
21 | aligned_u64 to; /* count to be matched */ | 21 | __aligned_u64 to; /* count to be matched */ |
22 | } count; | 22 | } count; |
23 | __u8 what; /* ipt_connbytes_what */ | 23 | __u8 what; /* ipt_connbytes_what */ |
24 | __u8 direction; /* ipt_connbytes_direction */ | 24 | __u8 direction; /* ipt_connbytes_direction */ |
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h index ca6e03e47a17..9314723f39ca 100644 --- a/include/linux/netfilter/xt_quota.h +++ b/include/linux/netfilter/xt_quota.h | |||
@@ -13,7 +13,7 @@ struct xt_quota_priv; | |||
13 | struct xt_quota_info { | 13 | struct xt_quota_info { |
14 | __u32 flags; | 14 | __u32 flags; |
15 | __u32 pad; | 15 | __u32 pad; |
16 | aligned_u64 quota; | 16 | __aligned_u64 quota; |
17 | 17 | ||
18 | /* Used internally by the kernel */ | 18 | /* Used internally by the kernel */ |
19 | struct xt_quota_priv *master; | 19 | struct xt_quota_priv *master; |
diff --git a/include/linux/netfilter_bridge/ebtables.h b/include/linux/netfilter_bridge/ebtables.h index 1c6f0c5f530e..8797ed16feb2 100644 --- a/include/linux/netfilter_bridge/ebtables.h +++ b/include/linux/netfilter_bridge/ebtables.h | |||
@@ -92,7 +92,7 @@ struct ebt_entries { | |||
92 | 92 | ||
93 | /* This is a hack to make a difference between an ebt_entry struct and an | 93 | /* This is a hack to make a difference between an ebt_entry struct and an |
94 | * ebt_entries struct when traversing the entries from start to end. | 94 | * ebt_entries struct when traversing the entries from start to end. |
95 | * Using this simplifies the code alot, while still being able to use | 95 | * Using this simplifies the code a lot, while still being able to use |
96 | * ebt_entries. | 96 | * ebt_entries. |
97 | * Contrary, iptables doesn't use something like ebt_entries and therefore uses | 97 | * Contrary, iptables doesn't use something like ebt_entries and therefore uses |
98 | * different techniques for naming the policy and such. So, iptables doesn't | 98 | * different techniques for naming the policy and such. So, iptables doesn't |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 134716e5e350..178fafe0ff93 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -359,7 +359,7 @@ enum nfsstat4 { | |||
359 | /* Error 10073 is unused. */ | 359 | /* Error 10073 is unused. */ |
360 | NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */ | 360 | NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */ |
361 | NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ | 361 | NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ |
362 | NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not origional */ | 362 | NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not original */ |
363 | NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */ | 363 | NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */ |
364 | NFS4ERR_DEADSESSION = 10078, /* persistent session dead */ | 364 | NFS4ERR_DEADSESSION = 10078, /* persistent session dead */ |
365 | NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */ | 365 | NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */ |
@@ -550,6 +550,7 @@ enum { | |||
550 | NFSPROC4_CLNT_SETACL, | 550 | NFSPROC4_CLNT_SETACL, |
551 | NFSPROC4_CLNT_FS_LOCATIONS, | 551 | NFSPROC4_CLNT_FS_LOCATIONS, |
552 | NFSPROC4_CLNT_RELEASE_LOCKOWNER, | 552 | NFSPROC4_CLNT_RELEASE_LOCKOWNER, |
553 | NFSPROC4_CLNT_SECINFO, | ||
553 | 554 | ||
554 | /* nfs41 */ | 555 | /* nfs41 */ |
555 | NFSPROC4_CLNT_EXCHANGE_ID, | 556 | NFSPROC4_CLNT_EXCHANGE_ID, |
@@ -560,6 +561,7 @@ enum { | |||
560 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 561 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
561 | NFSPROC4_CLNT_LAYOUTGET, | 562 | NFSPROC4_CLNT_LAYOUTGET, |
562 | NFSPROC4_CLNT_GETDEVICEINFO, | 563 | NFSPROC4_CLNT_GETDEVICEINFO, |
564 | NFSPROC4_CLNT_LAYOUTCOMMIT, | ||
563 | }; | 565 | }; |
564 | 566 | ||
565 | /* nfs41 types */ | 567 | /* nfs41 types */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index f88522b10a38..1b93b9c60e55 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -33,6 +33,8 @@ | |||
33 | #define FLUSH_STABLE 4 /* commit to stable storage */ | 33 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 34 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 35 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
36 | #define FLUSH_COND_STABLE 32 /* conditional stable write - only stable | ||
37 | * if everything fits in one RPC */ | ||
36 | 38 | ||
37 | #ifdef __KERNEL__ | 39 | #ifdef __KERNEL__ |
38 | 40 | ||
@@ -93,8 +95,13 @@ struct nfs_open_context { | |||
93 | int error; | 95 | int error; |
94 | 96 | ||
95 | struct list_head list; | 97 | struct list_head list; |
98 | }; | ||
96 | 99 | ||
100 | struct nfs_open_dir_context { | ||
101 | struct rpc_cred *cred; | ||
97 | __u64 dir_cookie; | 102 | __u64 dir_cookie; |
103 | __u64 dup_cookie; | ||
104 | int duped; | ||
98 | }; | 105 | }; |
99 | 106 | ||
100 | /* | 107 | /* |
@@ -191,6 +198,7 @@ struct nfs_inode { | |||
191 | 198 | ||
192 | /* pNFS layout information */ | 199 | /* pNFS layout information */ |
193 | struct pnfs_layout_hdr *layout; | 200 | struct pnfs_layout_hdr *layout; |
201 | atomic_t commits_outstanding; | ||
194 | #endif /* CONFIG_NFS_V4*/ | 202 | #endif /* CONFIG_NFS_V4*/ |
195 | #ifdef CONFIG_NFS_FSCACHE | 203 | #ifdef CONFIG_NFS_FSCACHE |
196 | struct fscache_cookie *fscache; | 204 | struct fscache_cookie *fscache; |
@@ -219,6 +227,8 @@ struct nfs_inode { | |||
219 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ | 227 | #define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ |
220 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ | 228 | #define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ |
221 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ | 229 | #define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ |
230 | #define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */ | ||
231 | #define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */ | ||
222 | 232 | ||
223 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 233 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
224 | { | 234 | { |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 90907ada6d52..91af2e49fa3a 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
@@ -33,11 +33,15 @@ enum { | |||
33 | PG_CLEAN, | 33 | PG_CLEAN, |
34 | PG_NEED_COMMIT, | 34 | PG_NEED_COMMIT, |
35 | PG_NEED_RESCHED, | 35 | PG_NEED_RESCHED, |
36 | PG_PNFS_COMMIT, | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | struct nfs_inode; | 39 | struct nfs_inode; |
39 | struct nfs_page { | 40 | struct nfs_page { |
40 | struct list_head wb_list; /* Defines state of page: */ | 41 | union { |
42 | struct list_head wb_list; /* Defines state of page: */ | ||
43 | struct pnfs_layout_segment *wb_commit_lseg; /* Used when PG_PNFS_COMMIT set */ | ||
44 | }; | ||
41 | struct page *wb_page; /* page to read in/write out */ | 45 | struct page *wb_page; /* page to read in/write out */ |
42 | struct nfs_open_context *wb_context; /* File state context info */ | 46 | struct nfs_open_context *wb_context; /* File state context info */ |
43 | struct nfs_lock_context *wb_lock_context; /* lock context info */ | 47 | struct nfs_lock_context *wb_lock_context; /* lock context info */ |
@@ -57,6 +61,7 @@ struct nfs_pageio_descriptor { | |||
57 | size_t pg_count; | 61 | size_t pg_count; |
58 | size_t pg_bsize; | 62 | size_t pg_bsize; |
59 | unsigned int pg_base; | 63 | unsigned int pg_base; |
64 | char pg_moreio; | ||
60 | 65 | ||
61 | struct inode *pg_inode; | 66 | struct inode *pg_inode; |
62 | int (*pg_doio)(struct nfs_pageio_descriptor *); | 67 | int (*pg_doio)(struct nfs_pageio_descriptor *); |
@@ -73,7 +78,6 @@ extern struct nfs_page *nfs_create_request(struct nfs_open_context *ctx, | |||
73 | struct page *page, | 78 | struct page *page, |
74 | unsigned int offset, | 79 | unsigned int offset, |
75 | unsigned int count); | 80 | unsigned int count); |
76 | extern void nfs_clear_request(struct nfs_page *req); | ||
77 | extern void nfs_release_request(struct nfs_page *req); | 81 | extern void nfs_release_request(struct nfs_page *req); |
78 | 82 | ||
79 | 83 | ||
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2c2c67d2eb42..78b101e487ea 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/nfsacl.h> | 4 | #include <linux/nfsacl.h> |
5 | #include <linux/nfs3.h> | 5 | #include <linux/nfs3.h> |
6 | #include <linux/sunrpc/gss_api.h> | ||
6 | 7 | ||
7 | /* | 8 | /* |
8 | * To change the maximum rsize and wsize supported by the NFS client, adjust | 9 | * To change the maximum rsize and wsize supported by the NFS client, adjust |
@@ -14,6 +15,9 @@ | |||
14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | 15 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | 16 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
16 | 17 | ||
18 | /* Forward declaration for NFS v3 */ | ||
19 | struct nfs4_secinfo_flavors; | ||
20 | |||
17 | struct nfs_fsid { | 21 | struct nfs_fsid { |
18 | uint64_t major; | 22 | uint64_t major; |
19 | uint64_t minor; | 23 | uint64_t minor; |
@@ -78,6 +82,7 @@ struct nfs_fattr { | |||
78 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) | 82 | #define NFS_ATTR_FATTR_CHANGE (1U << 17) |
79 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) | 83 | #define NFS_ATTR_FATTR_PRECHANGE (1U << 18) |
80 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | 84 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ |
85 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ | ||
81 | 86 | ||
82 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 87 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
83 | | NFS_ATTR_FATTR_MODE \ | 88 | | NFS_ATTR_FATTR_MODE \ |
@@ -190,8 +195,9 @@ struct nfs4_get_lease_time_res { | |||
190 | #define PNFS_LAYOUT_MAXSIZE 4096 | 195 | #define PNFS_LAYOUT_MAXSIZE 4096 |
191 | 196 | ||
192 | struct nfs4_layoutdriver_data { | 197 | struct nfs4_layoutdriver_data { |
198 | struct page **pages; | ||
199 | __u32 pglen; | ||
193 | __u32 len; | 200 | __u32 len; |
194 | void *buf; | ||
195 | }; | 201 | }; |
196 | 202 | ||
197 | struct pnfs_layout_range { | 203 | struct pnfs_layout_range { |
@@ -209,6 +215,7 @@ struct nfs4_layoutget_args { | |||
209 | struct nfs_open_context *ctx; | 215 | struct nfs_open_context *ctx; |
210 | struct nfs4_sequence_args seq_args; | 216 | struct nfs4_sequence_args seq_args; |
211 | nfs4_stateid stateid; | 217 | nfs4_stateid stateid; |
218 | struct nfs4_layoutdriver_data layout; | ||
212 | }; | 219 | }; |
213 | 220 | ||
214 | struct nfs4_layoutget_res { | 221 | struct nfs4_layoutget_res { |
@@ -216,8 +223,8 @@ struct nfs4_layoutget_res { | |||
216 | struct pnfs_layout_range range; | 223 | struct pnfs_layout_range range; |
217 | __u32 type; | 224 | __u32 type; |
218 | nfs4_stateid stateid; | 225 | nfs4_stateid stateid; |
219 | struct nfs4_layoutdriver_data layout; | ||
220 | struct nfs4_sequence_res seq_res; | 226 | struct nfs4_sequence_res seq_res; |
227 | struct nfs4_layoutdriver_data *layoutp; | ||
221 | }; | 228 | }; |
222 | 229 | ||
223 | struct nfs4_layoutget { | 230 | struct nfs4_layoutget { |
@@ -236,6 +243,29 @@ struct nfs4_getdeviceinfo_res { | |||
236 | struct nfs4_sequence_res seq_res; | 243 | struct nfs4_sequence_res seq_res; |
237 | }; | 244 | }; |
238 | 245 | ||
246 | struct nfs4_layoutcommit_args { | ||
247 | nfs4_stateid stateid; | ||
248 | __u64 lastbytewritten; | ||
249 | struct inode *inode; | ||
250 | const u32 *bitmask; | ||
251 | struct nfs4_sequence_args seq_args; | ||
252 | }; | ||
253 | |||
254 | struct nfs4_layoutcommit_res { | ||
255 | struct nfs_fattr *fattr; | ||
256 | const struct nfs_server *server; | ||
257 | struct nfs4_sequence_res seq_res; | ||
258 | }; | ||
259 | |||
260 | struct nfs4_layoutcommit_data { | ||
261 | struct rpc_task task; | ||
262 | struct nfs_fattr fattr; | ||
263 | struct pnfs_layout_segment *lseg; | ||
264 | struct rpc_cred *cred; | ||
265 | struct nfs4_layoutcommit_args args; | ||
266 | struct nfs4_layoutcommit_res res; | ||
267 | }; | ||
268 | |||
239 | /* | 269 | /* |
240 | * Arguments to the open call. | 270 | * Arguments to the open call. |
241 | */ | 271 | */ |
@@ -936,6 +966,38 @@ struct nfs4_fs_locations_res { | |||
936 | struct nfs4_sequence_res seq_res; | 966 | struct nfs4_sequence_res seq_res; |
937 | }; | 967 | }; |
938 | 968 | ||
969 | struct nfs4_secinfo_oid { | ||
970 | unsigned int len; | ||
971 | char data[GSS_OID_MAX_LEN]; | ||
972 | }; | ||
973 | |||
974 | struct nfs4_secinfo_gss { | ||
975 | struct nfs4_secinfo_oid sec_oid4; | ||
976 | unsigned int qop4; | ||
977 | unsigned int service; | ||
978 | }; | ||
979 | |||
980 | struct nfs4_secinfo_flavor { | ||
981 | unsigned int flavor; | ||
982 | struct nfs4_secinfo_gss gss; | ||
983 | }; | ||
984 | |||
985 | struct nfs4_secinfo_flavors { | ||
986 | unsigned int num_flavors; | ||
987 | struct nfs4_secinfo_flavor flavors[0]; | ||
988 | }; | ||
989 | |||
990 | struct nfs4_secinfo_arg { | ||
991 | const struct nfs_fh *dir_fh; | ||
992 | const struct qstr *name; | ||
993 | struct nfs4_sequence_args seq_args; | ||
994 | }; | ||
995 | |||
996 | struct nfs4_secinfo_res { | ||
997 | struct nfs4_secinfo_flavors *flavors; | ||
998 | struct nfs4_sequence_res seq_res; | ||
999 | }; | ||
1000 | |||
939 | #endif /* CONFIG_NFS_V4 */ | 1001 | #endif /* CONFIG_NFS_V4 */ |
940 | 1002 | ||
941 | struct nfstime4 { | 1003 | struct nfstime4 { |
@@ -1040,6 +1102,7 @@ struct nfs_write_data { | |||
1040 | struct nfs_writeres res; /* result struct */ | 1102 | struct nfs_writeres res; /* result struct */ |
1041 | struct pnfs_layout_segment *lseg; | 1103 | struct pnfs_layout_segment *lseg; |
1042 | struct nfs_client *ds_clp; /* pNFS data server */ | 1104 | struct nfs_client *ds_clp; /* pNFS data server */ |
1105 | int ds_commit_index; | ||
1043 | const struct rpc_call_ops *mds_ops; | 1106 | const struct rpc_call_ops *mds_ops; |
1044 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); | 1107 | int (*write_done_cb) (struct rpc_task *task, struct nfs_write_data *data); |
1045 | #ifdef CONFIG_NFS_V4 | 1108 | #ifdef CONFIG_NFS_V4 |
@@ -1071,7 +1134,7 @@ struct nfs_rpc_ops { | |||
1071 | struct nfs_fattr *); | 1134 | struct nfs_fattr *); |
1072 | int (*setattr) (struct dentry *, struct nfs_fattr *, | 1135 | int (*setattr) (struct dentry *, struct nfs_fattr *, |
1073 | struct iattr *); | 1136 | struct iattr *); |
1074 | int (*lookup) (struct inode *, struct qstr *, | 1137 | int (*lookup) (struct rpc_clnt *clnt, struct inode *, struct qstr *, |
1075 | struct nfs_fh *, struct nfs_fattr *); | 1138 | struct nfs_fh *, struct nfs_fattr *); |
1076 | int (*access) (struct inode *, struct nfs_access_entry *); | 1139 | int (*access) (struct inode *, struct nfs_access_entry *); |
1077 | int (*readlink)(struct inode *, struct page *, unsigned int, | 1140 | int (*readlink)(struct inode *, struct page *, unsigned int, |
@@ -1118,6 +1181,7 @@ struct nfs_rpc_ops { | |||
1118 | struct iattr *iattr); | 1181 | struct iattr *iattr); |
1119 | int (*init_client) (struct nfs_client *, const struct rpc_timeout *, | 1182 | int (*init_client) (struct nfs_client *, const struct rpc_timeout *, |
1120 | const char *, rpc_authflavor_t, int); | 1183 | const char *, rpc_authflavor_t, int); |
1184 | int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); | ||
1121 | }; | 1185 | }; |
1122 | 1186 | ||
1123 | /* | 1187 | /* |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index bd316159278c..84058ec69390 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -80,7 +80,7 @@ struct nfsd4_fs_locations { | |||
80 | 80 | ||
81 | /* | 81 | /* |
82 | * We keep an array of pseudoflavors with the export, in order from most | 82 | * We keep an array of pseudoflavors with the export, in order from most |
83 | * to least preferred. For the forseeable future, we don't expect more | 83 | * to least preferred. For the foreseeable future, we don't expect more |
84 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, | 84 | * than the eight pseudoflavors null, unix, krb5, krb5i, krb5p, skpm3, |
85 | * spkm3i, and spkm3p (and using all 8 at once should be rare). | 85 | * spkm3i, and spkm3p (and using all 8 at once should be rare). |
86 | */ | 86 | */ |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 80d55bbc5365..f76d80ccec10 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -49,7 +49,7 @@ struct nfs_fhbase_old { | |||
49 | * | 49 | * |
50 | * The auth_type field specifies how the filehandle can be authenticated | 50 | * The auth_type field specifies how the filehandle can be authenticated |
51 | * This might allow a file to be confirmed to be in a writable part of a | 51 | * This might allow a file to be confirmed to be in a writable part of a |
52 | * filetree without checking the path from it upto the root. | 52 | * filetree without checking the path from it up to the root. |
53 | * Current values: | 53 | * Current values: |
54 | * 0 - No authentication. fb_auth is 0 bytes long | 54 | * 0 - No authentication. fb_auth is 0 bytes long |
55 | * Possible future values: | 55 | * Possible future values: |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 227e49dd5720..8768c469e93e 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -40,26 +40,7 @@ | |||
40 | 40 | ||
41 | #include <linux/types.h> | 41 | #include <linux/types.h> |
42 | #include <linux/ioctl.h> | 42 | #include <linux/ioctl.h> |
43 | 43 | #include <linux/magic.h> | |
44 | /* | ||
45 | * Inode flags stored in nilfs_inode and on-memory nilfs inode | ||
46 | * | ||
47 | * We define these flags based on ext2-fs because of the | ||
48 | * compatibility reason; to avoid problems in chattr(1) | ||
49 | */ | ||
50 | #define NILFS_SECRM_FL 0x00000001 /* Secure deletion */ | ||
51 | #define NILFS_UNRM_FL 0x00000002 /* Undelete */ | ||
52 | #define NILFS_SYNC_FL 0x00000008 /* Synchronous updates */ | ||
53 | #define NILFS_IMMUTABLE_FL 0x00000010 /* Immutable file */ | ||
54 | #define NILFS_APPEND_FL 0x00000020 /* writes to file may only append */ | ||
55 | #define NILFS_NODUMP_FL 0x00000040 /* do not dump file */ | ||
56 | #define NILFS_NOATIME_FL 0x00000080 /* do not update atime */ | ||
57 | /* Reserved for compression usage... */ | ||
58 | #define NILFS_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | ||
59 | #define NILFS_DIRSYNC_FL 0x00010000 /* dirsync behaviour */ | ||
60 | |||
61 | #define NILFS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | ||
62 | #define NILFS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ | ||
63 | 44 | ||
64 | 45 | ||
65 | #define NILFS_INODE_BMAP_SIZE 7 | 46 | #define NILFS_INODE_BMAP_SIZE 7 |
@@ -236,8 +217,10 @@ struct nilfs_super_block { | |||
236 | * If there is a bit set in the incompatible feature set that the kernel | 217 | * If there is a bit set in the incompatible feature set that the kernel |
237 | * doesn't know about, it should refuse to mount the filesystem. | 218 | * doesn't know about, it should refuse to mount the filesystem. |
238 | */ | 219 | */ |
220 | #define NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT 0x00000001ULL | ||
221 | |||
239 | #define NILFS_FEATURE_COMPAT_SUPP 0ULL | 222 | #define NILFS_FEATURE_COMPAT_SUPP 0ULL |
240 | #define NILFS_FEATURE_COMPAT_RO_SUPP 0ULL | 223 | #define NILFS_FEATURE_COMPAT_RO_SUPP NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT |
241 | #define NILFS_FEATURE_INCOMPAT_SUPP 0ULL | 224 | #define NILFS_FEATURE_INCOMPAT_SUPP 0ULL |
242 | 225 | ||
243 | /* | 226 | /* |
@@ -260,7 +243,6 @@ struct nilfs_super_block { | |||
260 | #define NILFS_USER_INO 11 /* Fisrt user's file inode number */ | 243 | #define NILFS_USER_INO 11 /* Fisrt user's file inode number */ |
261 | 244 | ||
262 | #define NILFS_SB_OFFSET_BYTES 1024 /* byte offset of nilfs superblock */ | 245 | #define NILFS_SB_OFFSET_BYTES 1024 /* byte offset of nilfs superblock */ |
263 | #define NILFS_SUPER_MAGIC 0x3434 /* NILFS filesystem magic number */ | ||
264 | 246 | ||
265 | #define NILFS_SEG_MIN_BLOCKS 16 /* Minimum number of blocks in | 247 | #define NILFS_SEG_MIN_BLOCKS 16 /* Minimum number of blocks in |
266 | a full segment */ | 248 | a full segment */ |
@@ -346,17 +328,21 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen) | |||
346 | { | 328 | { |
347 | unsigned len = le16_to_cpu(dlen); | 329 | unsigned len = le16_to_cpu(dlen); |
348 | 330 | ||
331 | #if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536) | ||
349 | if (len == NILFS_MAX_REC_LEN) | 332 | if (len == NILFS_MAX_REC_LEN) |
350 | return 1 << 16; | 333 | return 1 << 16; |
334 | #endif | ||
351 | return len; | 335 | return len; |
352 | } | 336 | } |
353 | 337 | ||
354 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) | 338 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) |
355 | { | 339 | { |
340 | #if !defined(__KERNEL__) || (PAGE_CACHE_SIZE >= 65536) | ||
356 | if (len == (1 << 16)) | 341 | if (len == (1 << 16)) |
357 | return cpu_to_le16(NILFS_MAX_REC_LEN); | 342 | return cpu_to_le16(NILFS_MAX_REC_LEN); |
358 | else if (len > (1 << 16)) | 343 | else if (len > (1 << 16)) |
359 | BUG(); | 344 | BUG(); |
345 | #endif | ||
360 | return cpu_to_le16(len); | 346 | return cpu_to_le16(len); |
361 | } | 347 | } |
362 | 348 | ||
@@ -525,7 +511,7 @@ struct nilfs_checkpoint { | |||
525 | __le64 cp_create; | 511 | __le64 cp_create; |
526 | __le64 cp_nblk_inc; | 512 | __le64 cp_nblk_inc; |
527 | __le64 cp_inodes_count; | 513 | __le64 cp_inodes_count; |
528 | __le64 cp_blocks_count; /* Reserved (might be deleted) */ | 514 | __le64 cp_blocks_count; |
529 | 515 | ||
530 | /* Do not change the byte offset of ifile inode. | 516 | /* Do not change the byte offset of ifile inode. |
531 | To keep the compatibility of the disk format, | 517 | To keep the compatibility of the disk format, |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 30022189104d..bbfa1093f606 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -414,7 +414,7 @@ | |||
414 | * @__NL80211_CMD_AFTER_LAST: internal use | 414 | * @__NL80211_CMD_AFTER_LAST: internal use |
415 | */ | 415 | */ |
416 | enum nl80211_commands { | 416 | enum nl80211_commands { |
417 | /* don't change the order or add anything inbetween, this is ABI! */ | 417 | /* don't change the order or add anything between, this is ABI! */ |
418 | NL80211_CMD_UNSPEC, | 418 | NL80211_CMD_UNSPEC, |
419 | 419 | ||
420 | NL80211_CMD_GET_WIPHY, /* can dump */ | 420 | NL80211_CMD_GET_WIPHY, /* can dump */ |
@@ -860,7 +860,7 @@ enum nl80211_commands { | |||
860 | * This can be used to mask out antennas which are not attached or should | 860 | * This can be used to mask out antennas which are not attached or should |
861 | * not be used for receiving. If an antenna is not selected in this bitmap | 861 | * not be used for receiving. If an antenna is not selected in this bitmap |
862 | * the hardware should not be configured to receive on this antenna. | 862 | * the hardware should not be configured to receive on this antenna. |
863 | * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX. | 863 | * For a more detailed description see @NL80211_ATTR_WIPHY_ANTENNA_TX. |
864 | * | 864 | * |
865 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available | 865 | * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX: Bitmap of antennas which are available |
866 | * for configuration as TX antennas via the above parameters. | 866 | * for configuration as TX antennas via the above parameters. |
@@ -891,7 +891,7 @@ enum nl80211_commands { | |||
891 | * @__NL80211_ATTR_AFTER_LAST: internal use | 891 | * @__NL80211_ATTR_AFTER_LAST: internal use |
892 | */ | 892 | */ |
893 | enum nl80211_attrs { | 893 | enum nl80211_attrs { |
894 | /* don't change the order or add anything inbetween, this is ABI! */ | 894 | /* don't change the order or add anything between, this is ABI! */ |
895 | NL80211_ATTR_UNSPEC, | 895 | NL80211_ATTR_UNSPEC, |
896 | 896 | ||
897 | NL80211_ATTR_WIPHY, | 897 | NL80211_ATTR_WIPHY, |
@@ -1419,7 +1419,7 @@ enum nl80211_bitrate_attr { | |||
1419 | * 802.11 country information element with regulatory information it | 1419 | * 802.11 country information element with regulatory information it |
1420 | * thinks we should consider. cfg80211 only processes the country | 1420 | * thinks we should consider. cfg80211 only processes the country |
1421 | * code from the IE, and relies on the regulatory domain information | 1421 | * code from the IE, and relies on the regulatory domain information |
1422 | * structure pased by userspace (CRDA) from our wireless-regdb. | 1422 | * structure passed by userspace (CRDA) from our wireless-regdb. |
1423 | * If a channel is enabled but the country code indicates it should | 1423 | * If a channel is enabled but the country code indicates it should |
1424 | * be disabled we disable the channel and re-enable it upon disassociation. | 1424 | * be disabled we disable the channel and re-enable it upon disassociation. |
1425 | */ | 1425 | */ |
@@ -1598,7 +1598,7 @@ enum nl80211_mntr_flags { | |||
1598 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in | 1598 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in |
1599 | * millisecond units, used by the Peer Link Open message | 1599 | * millisecond units, used by the Peer Link Open message |
1600 | * | 1600 | * |
1601 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the inital confirm timeout, in | 1601 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in |
1602 | * millisecond units, used by the peer link management to close a peer link | 1602 | * millisecond units, used by the peer link management to close a peer link |
1603 | * | 1603 | * |
1604 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in | 1604 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 2026f9e1ceb8..621dfa16acc0 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -237,7 +237,7 @@ static inline int notifier_to_errno(int ret) | |||
237 | * enabling interrupts. Must not sleep, | 237 | * enabling interrupts. Must not sleep, |
238 | * must not fail */ | 238 | * must not fail */ |
239 | 239 | ||
240 | /* Used for CPU hotplug events occuring while tasks are frozen due to a suspend | 240 | /* Used for CPU hotplug events occurring while tasks are frozen due to a suspend |
241 | * operation in progress | 241 | * operation in progress |
242 | */ | 242 | */ |
243 | #define CPU_TASKS_FROZEN 0x0010 | 243 | #define CPU_TASKS_FROZEN 0x0010 |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 17c7e21c0bd7..fb51ae38cea7 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -52,9 +52,6 @@ extern struct platform_device *of_platform_device_create(struct device_node *np, | |||
52 | const char *bus_id, | 52 | const char *bus_id, |
53 | struct device *parent); | 53 | struct device *parent); |
54 | 54 | ||
55 | /* pseudo "matches" value to not do deep probe */ | ||
56 | #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1) | ||
57 | |||
58 | extern int of_platform_bus_probe(struct device_node *root, | 55 | extern int of_platform_bus_probe(struct device_node *root, |
59 | const struct of_device_id *matches, | 56 | const struct of_device_id *matches, |
60 | struct device *parent); | 57 | struct device *parent); |
diff --git a/include/linux/omap3isp.h b/include/linux/omap3isp.h new file mode 100644 index 000000000000..b6111f8cd49a --- /dev/null +++ b/include/linux/omap3isp.h | |||
@@ -0,0 +1,646 @@ | |||
1 | /* | ||
2 | * omap3isp.h | ||
3 | * | ||
4 | * TI OMAP3 ISP - User-space API | ||
5 | * | ||
6 | * Copyright (C) 2010 Nokia Corporation | ||
7 | * Copyright (C) 2009 Texas Instruments, Inc. | ||
8 | * | ||
9 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
10 | * Sakari Ailus <sakari.ailus@iki.fi> | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, but | ||
17 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
19 | * General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
24 | * 02110-1301 USA | ||
25 | */ | ||
26 | |||
27 | #ifndef OMAP3_ISP_USER_H | ||
28 | #define OMAP3_ISP_USER_H | ||
29 | |||
30 | #include <linux/types.h> | ||
31 | |||
32 | /* | ||
33 | * Private IOCTLs | ||
34 | * | ||
35 | * VIDIOC_OMAP3ISP_CCDC_CFG: Set CCDC configuration | ||
36 | * VIDIOC_OMAP3ISP_PRV_CFG: Set preview engine configuration | ||
37 | * VIDIOC_OMAP3ISP_AEWB_CFG: Set AEWB module configuration | ||
38 | * VIDIOC_OMAP3ISP_HIST_CFG: Set histogram module configuration | ||
39 | * VIDIOC_OMAP3ISP_AF_CFG: Set auto-focus module configuration | ||
40 | * VIDIOC_OMAP3ISP_STAT_REQ: Read statistics (AEWB/AF/histogram) data | ||
41 | * VIDIOC_OMAP3ISP_STAT_EN: Enable/disable a statistics module | ||
42 | */ | ||
43 | |||
44 | #define VIDIOC_OMAP3ISP_CCDC_CFG \ | ||
45 | _IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct omap3isp_ccdc_update_config) | ||
46 | #define VIDIOC_OMAP3ISP_PRV_CFG \ | ||
47 | _IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct omap3isp_prev_update_config) | ||
48 | #define VIDIOC_OMAP3ISP_AEWB_CFG \ | ||
49 | _IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct omap3isp_h3a_aewb_config) | ||
50 | #define VIDIOC_OMAP3ISP_HIST_CFG \ | ||
51 | _IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct omap3isp_hist_config) | ||
52 | #define VIDIOC_OMAP3ISP_AF_CFG \ | ||
53 | _IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct omap3isp_h3a_af_config) | ||
54 | #define VIDIOC_OMAP3ISP_STAT_REQ \ | ||
55 | _IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct omap3isp_stat_data) | ||
56 | #define VIDIOC_OMAP3ISP_STAT_EN \ | ||
57 | _IOWR('V', BASE_VIDIOC_PRIVATE + 7, unsigned long) | ||
58 | |||
59 | /* | ||
60 | * Events | ||
61 | * | ||
62 | * V4L2_EVENT_OMAP3ISP_AEWB: AEWB statistics data ready | ||
63 | * V4L2_EVENT_OMAP3ISP_AF: AF statistics data ready | ||
64 | * V4L2_EVENT_OMAP3ISP_HIST: Histogram statistics data ready | ||
65 | * V4L2_EVENT_OMAP3ISP_HS_VS: Horizontal/vertical synchronization detected | ||
66 | */ | ||
67 | |||
68 | #define V4L2_EVENT_OMAP3ISP_CLASS (V4L2_EVENT_PRIVATE_START | 0x100) | ||
69 | #define V4L2_EVENT_OMAP3ISP_AEWB (V4L2_EVENT_OMAP3ISP_CLASS | 0x1) | ||
70 | #define V4L2_EVENT_OMAP3ISP_AF (V4L2_EVENT_OMAP3ISP_CLASS | 0x2) | ||
71 | #define V4L2_EVENT_OMAP3ISP_HIST (V4L2_EVENT_OMAP3ISP_CLASS | 0x3) | ||
72 | #define V4L2_EVENT_OMAP3ISP_HS_VS (V4L2_EVENT_OMAP3ISP_CLASS | 0x4) | ||
73 | |||
74 | struct omap3isp_stat_event_status { | ||
75 | __u32 frame_number; | ||
76 | __u16 config_counter; | ||
77 | __u8 buf_err; | ||
78 | }; | ||
79 | |||
80 | /* AE/AWB related structures and flags*/ | ||
81 | |||
82 | /* H3A Range Constants */ | ||
83 | #define OMAP3ISP_AEWB_MAX_SATURATION_LIM 1023 | ||
84 | #define OMAP3ISP_AEWB_MIN_WIN_H 2 | ||
85 | #define OMAP3ISP_AEWB_MAX_WIN_H 256 | ||
86 | #define OMAP3ISP_AEWB_MIN_WIN_W 6 | ||
87 | #define OMAP3ISP_AEWB_MAX_WIN_W 256 | ||
88 | #define OMAP3ISP_AEWB_MIN_WINVC 1 | ||
89 | #define OMAP3ISP_AEWB_MIN_WINHC 1 | ||
90 | #define OMAP3ISP_AEWB_MAX_WINVC 128 | ||
91 | #define OMAP3ISP_AEWB_MAX_WINHC 36 | ||
92 | #define OMAP3ISP_AEWB_MAX_WINSTART 4095 | ||
93 | #define OMAP3ISP_AEWB_MIN_SUB_INC 2 | ||
94 | #define OMAP3ISP_AEWB_MAX_SUB_INC 32 | ||
95 | #define OMAP3ISP_AEWB_MAX_BUF_SIZE 83600 | ||
96 | |||
97 | #define OMAP3ISP_AF_IIRSH_MIN 0 | ||
98 | #define OMAP3ISP_AF_IIRSH_MAX 4095 | ||
99 | #define OMAP3ISP_AF_PAXEL_HORIZONTAL_COUNT_MIN 1 | ||
100 | #define OMAP3ISP_AF_PAXEL_HORIZONTAL_COUNT_MAX 36 | ||
101 | #define OMAP3ISP_AF_PAXEL_VERTICAL_COUNT_MIN 1 | ||
102 | #define OMAP3ISP_AF_PAXEL_VERTICAL_COUNT_MAX 128 | ||
103 | #define OMAP3ISP_AF_PAXEL_INCREMENT_MIN 2 | ||
104 | #define OMAP3ISP_AF_PAXEL_INCREMENT_MAX 32 | ||
105 | #define OMAP3ISP_AF_PAXEL_HEIGHT_MIN 2 | ||
106 | #define OMAP3ISP_AF_PAXEL_HEIGHT_MAX 256 | ||
107 | #define OMAP3ISP_AF_PAXEL_WIDTH_MIN 16 | ||
108 | #define OMAP3ISP_AF_PAXEL_WIDTH_MAX 256 | ||
109 | #define OMAP3ISP_AF_PAXEL_HZSTART_MIN 1 | ||
110 | #define OMAP3ISP_AF_PAXEL_HZSTART_MAX 4095 | ||
111 | #define OMAP3ISP_AF_PAXEL_VTSTART_MIN 0 | ||
112 | #define OMAP3ISP_AF_PAXEL_VTSTART_MAX 4095 | ||
113 | #define OMAP3ISP_AF_THRESHOLD_MAX 255 | ||
114 | #define OMAP3ISP_AF_COEF_MAX 4095 | ||
115 | #define OMAP3ISP_AF_PAXEL_SIZE 48 | ||
116 | #define OMAP3ISP_AF_MAX_BUF_SIZE 221184 | ||
117 | |||
118 | /** | ||
119 | * struct omap3isp_h3a_aewb_config - AE AWB configuration reset values | ||
120 | * saturation_limit: Saturation limit. | ||
121 | * @win_height: Window Height. Range 2 - 256, even values only. | ||
122 | * @win_width: Window Width. Range 6 - 256, even values only. | ||
123 | * @ver_win_count: Vertical Window Count. Range 1 - 128. | ||
124 | * @hor_win_count: Horizontal Window Count. Range 1 - 36. | ||
125 | * @ver_win_start: Vertical Window Start. Range 0 - 4095. | ||
126 | * @hor_win_start: Horizontal Window Start. Range 0 - 4095. | ||
127 | * @blk_ver_win_start: Black Vertical Windows Start. Range 0 - 4095. | ||
128 | * @blk_win_height: Black Window Height. Range 2 - 256, even values only. | ||
129 | * @subsample_ver_inc: Subsample Vertical points increment Range 2 - 32, even | ||
130 | * values only. | ||
131 | * @subsample_hor_inc: Subsample Horizontal points increment Range 2 - 32, even | ||
132 | * values only. | ||
133 | * @alaw_enable: AEW ALAW EN flag. | ||
134 | */ | ||
135 | struct omap3isp_h3a_aewb_config { | ||
136 | /* | ||
137 | * Common fields. | ||
138 | * They should be the first ones and must be in the same order as in | ||
139 | * ispstat_generic_config struct. | ||
140 | */ | ||
141 | __u32 buf_size; | ||
142 | __u16 config_counter; | ||
143 | |||
144 | /* Private fields */ | ||
145 | __u16 saturation_limit; | ||
146 | __u16 win_height; | ||
147 | __u16 win_width; | ||
148 | __u16 ver_win_count; | ||
149 | __u16 hor_win_count; | ||
150 | __u16 ver_win_start; | ||
151 | __u16 hor_win_start; | ||
152 | __u16 blk_ver_win_start; | ||
153 | __u16 blk_win_height; | ||
154 | __u16 subsample_ver_inc; | ||
155 | __u16 subsample_hor_inc; | ||
156 | __u8 alaw_enable; | ||
157 | }; | ||
158 | |||
159 | /** | ||
160 | * struct omap3isp_stat_data - Statistic data sent to or received from user | ||
161 | * @ts: Timestamp of returned framestats. | ||
162 | * @buf: Pointer to pass to user. | ||
163 | * @frame_number: Frame number of requested stats. | ||
164 | * @cur_frame: Current frame number being processed. | ||
165 | * @config_counter: Number of the configuration associated with the data. | ||
166 | */ | ||
167 | struct omap3isp_stat_data { | ||
168 | struct timeval ts; | ||
169 | void __user *buf; | ||
170 | __u32 buf_size; | ||
171 | __u16 frame_number; | ||
172 | __u16 cur_frame; | ||
173 | __u16 config_counter; | ||
174 | }; | ||
175 | |||
176 | |||
177 | /* Histogram related structs */ | ||
178 | |||
179 | /* Flags for number of bins */ | ||
180 | #define OMAP3ISP_HIST_BINS_32 0 | ||
181 | #define OMAP3ISP_HIST_BINS_64 1 | ||
182 | #define OMAP3ISP_HIST_BINS_128 2 | ||
183 | #define OMAP3ISP_HIST_BINS_256 3 | ||
184 | |||
185 | /* Number of bins * 4 colors * 4-bytes word */ | ||
186 | #define OMAP3ISP_HIST_MEM_SIZE_BINS(n) ((1 << ((n)+5))*4*4) | ||
187 | |||
188 | #define OMAP3ISP_HIST_MEM_SIZE 1024 | ||
189 | #define OMAP3ISP_HIST_MIN_REGIONS 1 | ||
190 | #define OMAP3ISP_HIST_MAX_REGIONS 4 | ||
191 | #define OMAP3ISP_HIST_MAX_WB_GAIN 255 | ||
192 | #define OMAP3ISP_HIST_MIN_WB_GAIN 0 | ||
193 | #define OMAP3ISP_HIST_MAX_BIT_WIDTH 14 | ||
194 | #define OMAP3ISP_HIST_MIN_BIT_WIDTH 8 | ||
195 | #define OMAP3ISP_HIST_MAX_WG 4 | ||
196 | #define OMAP3ISP_HIST_MAX_BUF_SIZE 4096 | ||
197 | |||
198 | /* Source */ | ||
199 | #define OMAP3ISP_HIST_SOURCE_CCDC 0 | ||
200 | #define OMAP3ISP_HIST_SOURCE_MEM 1 | ||
201 | |||
202 | /* CFA pattern */ | ||
203 | #define OMAP3ISP_HIST_CFA_BAYER 0 | ||
204 | #define OMAP3ISP_HIST_CFA_FOVEONX3 1 | ||
205 | |||
206 | struct omap3isp_hist_region { | ||
207 | __u16 h_start; | ||
208 | __u16 h_end; | ||
209 | __u16 v_start; | ||
210 | __u16 v_end; | ||
211 | }; | ||
212 | |||
213 | struct omap3isp_hist_config { | ||
214 | /* | ||
215 | * Common fields. | ||
216 | * They should be the first ones and must be in the same order as in | ||
217 | * ispstat_generic_config struct. | ||
218 | */ | ||
219 | __u32 buf_size; | ||
220 | __u16 config_counter; | ||
221 | |||
222 | __u8 num_acc_frames; /* Num of image frames to be processed and | ||
223 | accumulated for each histogram frame */ | ||
224 | __u16 hist_bins; /* number of bins: 32, 64, 128, or 256 */ | ||
225 | __u8 cfa; /* BAYER or FOVEON X3 */ | ||
226 | __u8 wg[OMAP3ISP_HIST_MAX_WG]; /* White Balance Gain */ | ||
227 | __u8 num_regions; /* number of regions to be configured */ | ||
228 | struct omap3isp_hist_region region[OMAP3ISP_HIST_MAX_REGIONS]; | ||
229 | }; | ||
230 | |||
231 | /* Auto Focus related structs */ | ||
232 | |||
233 | #define OMAP3ISP_AF_NUM_COEF 11 | ||
234 | |||
235 | enum omap3isp_h3a_af_fvmode { | ||
236 | OMAP3ISP_AF_MODE_SUMMED = 0, | ||
237 | OMAP3ISP_AF_MODE_PEAK = 1 | ||
238 | }; | ||
239 | |||
240 | /* Red, Green, and blue pixel location in the AF windows */ | ||
241 | enum omap3isp_h3a_af_rgbpos { | ||
242 | OMAP3ISP_AF_GR_GB_BAYER = 0, /* GR and GB as Bayer pattern */ | ||
243 | OMAP3ISP_AF_RG_GB_BAYER = 1, /* RG and GB as Bayer pattern */ | ||
244 | OMAP3ISP_AF_GR_BG_BAYER = 2, /* GR and BG as Bayer pattern */ | ||
245 | OMAP3ISP_AF_RG_BG_BAYER = 3, /* RG and BG as Bayer pattern */ | ||
246 | OMAP3ISP_AF_GG_RB_CUSTOM = 4, /* GG and RB as custom pattern */ | ||
247 | OMAP3ISP_AF_RB_GG_CUSTOM = 5 /* RB and GG as custom pattern */ | ||
248 | }; | ||
249 | |||
250 | /* Contains the information regarding the Horizontal Median Filter */ | ||
251 | struct omap3isp_h3a_af_hmf { | ||
252 | __u8 enable; /* Status of Horizontal Median Filter */ | ||
253 | __u8 threshold; /* Threshold Value for Horizontal Median Filter */ | ||
254 | }; | ||
255 | |||
256 | /* Contains the information regarding the IIR Filters */ | ||
257 | struct omap3isp_h3a_af_iir { | ||
258 | __u16 h_start; /* IIR horizontal start */ | ||
259 | __u16 coeff_set0[OMAP3ISP_AF_NUM_COEF]; /* Filter coefficient, set 0 */ | ||
260 | __u16 coeff_set1[OMAP3ISP_AF_NUM_COEF]; /* Filter coefficient, set 1 */ | ||
261 | }; | ||
262 | |||
263 | /* Contains the information regarding the Paxels Structure in AF Engine */ | ||
264 | struct omap3isp_h3a_af_paxel { | ||
265 | __u16 h_start; /* Horizontal Start Position */ | ||
266 | __u16 v_start; /* Vertical Start Position */ | ||
267 | __u8 width; /* Width of the Paxel */ | ||
268 | __u8 height; /* Height of the Paxel */ | ||
269 | __u8 h_cnt; /* Horizontal Count */ | ||
270 | __u8 v_cnt; /* vertical Count */ | ||
271 | __u8 line_inc; /* Line Increment */ | ||
272 | }; | ||
273 | |||
274 | /* Contains the parameters required for hardware set up of AF Engine */ | ||
275 | struct omap3isp_h3a_af_config { | ||
276 | /* | ||
277 | * Common fields. | ||
278 | * They should be the first ones and must be in the same order as in | ||
279 | * ispstat_generic_config struct. | ||
280 | */ | ||
281 | __u32 buf_size; | ||
282 | __u16 config_counter; | ||
283 | |||
284 | struct omap3isp_h3a_af_hmf hmf; /* HMF configurations */ | ||
285 | struct omap3isp_h3a_af_iir iir; /* IIR filter configurations */ | ||
286 | struct omap3isp_h3a_af_paxel paxel; /* Paxel parameters */ | ||
287 | enum omap3isp_h3a_af_rgbpos rgb_pos; /* RGB Positions */ | ||
288 | enum omap3isp_h3a_af_fvmode fvmode; /* Accumulator mode */ | ||
289 | __u8 alaw_enable; /* AF ALAW status */ | ||
290 | }; | ||
291 | |||
292 | /* ISP CCDC structs */ | ||
293 | |||
294 | /* Abstraction layer CCDC configurations */ | ||
295 | #define OMAP3ISP_CCDC_ALAW (1 << 0) | ||
296 | #define OMAP3ISP_CCDC_LPF (1 << 1) | ||
297 | #define OMAP3ISP_CCDC_BLCLAMP (1 << 2) | ||
298 | #define OMAP3ISP_CCDC_BCOMP (1 << 3) | ||
299 | #define OMAP3ISP_CCDC_FPC (1 << 4) | ||
300 | #define OMAP3ISP_CCDC_CULL (1 << 5) | ||
301 | #define OMAP3ISP_CCDC_CONFIG_LSC (1 << 7) | ||
302 | #define OMAP3ISP_CCDC_TBL_LSC (1 << 8) | ||
303 | |||
304 | #define OMAP3ISP_RGB_MAX 3 | ||
305 | |||
306 | /* Enumeration constants for Alaw input width */ | ||
307 | enum omap3isp_alaw_ipwidth { | ||
308 | OMAP3ISP_ALAW_BIT12_3 = 0x3, | ||
309 | OMAP3ISP_ALAW_BIT11_2 = 0x4, | ||
310 | OMAP3ISP_ALAW_BIT10_1 = 0x5, | ||
311 | OMAP3ISP_ALAW_BIT9_0 = 0x6 | ||
312 | }; | ||
313 | |||
314 | /** | ||
315 | * struct omap3isp_ccdc_lsc_config - LSC configuration | ||
316 | * @offset: Table Offset of the gain table. | ||
317 | * @gain_mode_n: Vertical dimension of a paxel in LSC configuration. | ||
318 | * @gain_mode_m: Horizontal dimension of a paxel in LSC configuration. | ||
319 | * @gain_format: Gain table format. | ||
320 | * @fmtsph: Start pixel horizontal from start of the HS sync pulse. | ||
321 | * @fmtlnh: Number of pixels in horizontal direction to use for the data | ||
322 | * reformatter. | ||
323 | * @fmtslv: Start line from start of VS sync pulse for the data reformatter. | ||
324 | * @fmtlnv: Number of lines in vertical direction for the data reformatter. | ||
325 | * @initial_x: X position, in pixels, of the first active pixel in reference | ||
326 | * to the first active paxel. Must be an even number. | ||
327 | * @initial_y: Y position, in pixels, of the first active pixel in reference | ||
328 | * to the first active paxel. Must be an even number. | ||
329 | * @size: Size of LSC gain table. Filled when loaded from userspace. | ||
330 | */ | ||
331 | struct omap3isp_ccdc_lsc_config { | ||
332 | __u16 offset; | ||
333 | __u8 gain_mode_n; | ||
334 | __u8 gain_mode_m; | ||
335 | __u8 gain_format; | ||
336 | __u16 fmtsph; | ||
337 | __u16 fmtlnh; | ||
338 | __u16 fmtslv; | ||
339 | __u16 fmtlnv; | ||
340 | __u8 initial_x; | ||
341 | __u8 initial_y; | ||
342 | __u32 size; | ||
343 | }; | ||
344 | |||
345 | /** | ||
346 | * struct omap3isp_ccdc_bclamp - Optical & Digital black clamp subtract | ||
347 | * @obgain: Optical black average gain. | ||
348 | * @obstpixel: Start Pixel w.r.t. HS pulse in Optical black sample. | ||
349 | * @oblines: Optical Black Sample lines. | ||
350 | * @oblen: Optical Black Sample Length. | ||
351 | * @dcsubval: Digital Black Clamp subtract value. | ||
352 | */ | ||
353 | struct omap3isp_ccdc_bclamp { | ||
354 | __u8 obgain; | ||
355 | __u8 obstpixel; | ||
356 | __u8 oblines; | ||
357 | __u8 oblen; | ||
358 | __u16 dcsubval; | ||
359 | }; | ||
360 | |||
361 | /** | ||
362 | * struct omap3isp_ccdc_fpc - Faulty Pixels Correction | ||
363 | * @fpnum: Number of faulty pixels to be corrected in the frame. | ||
364 | * @fpcaddr: Memory address of the FPC Table | ||
365 | */ | ||
366 | struct omap3isp_ccdc_fpc { | ||
367 | __u16 fpnum; | ||
368 | __u32 fpcaddr; | ||
369 | }; | ||
370 | |||
371 | /** | ||
372 | * struct omap3isp_ccdc_blcomp - Black Level Compensation parameters | ||
373 | * @b_mg: B/Mg pixels. 2's complement. -128 to +127. | ||
374 | * @gb_g: Gb/G pixels. 2's complement. -128 to +127. | ||
375 | * @gr_cy: Gr/Cy pixels. 2's complement. -128 to +127. | ||
376 | * @r_ye: R/Ye pixels. 2's complement. -128 to +127. | ||
377 | */ | ||
378 | struct omap3isp_ccdc_blcomp { | ||
379 | __u8 b_mg; | ||
380 | __u8 gb_g; | ||
381 | __u8 gr_cy; | ||
382 | __u8 r_ye; | ||
383 | }; | ||
384 | |||
385 | /** | ||
386 | * omap3isp_ccdc_culling - Culling parameters | ||
387 | * @v_pattern: Vertical culling pattern. | ||
388 | * @h_odd: Horizontal Culling pattern for odd lines. | ||
389 | * @h_even: Horizontal Culling pattern for even lines. | ||
390 | */ | ||
391 | struct omap3isp_ccdc_culling { | ||
392 | __u8 v_pattern; | ||
393 | __u16 h_odd; | ||
394 | __u16 h_even; | ||
395 | }; | ||
396 | |||
397 | /** | ||
398 | * omap3isp_ccdc_update_config - CCDC configuration | ||
399 | * @update: Specifies which CCDC registers should be updated. | ||
400 | * @flag: Specifies which CCDC functions should be enabled. | ||
401 | * @alawip: Enable/Disable A-Law compression. | ||
402 | * @bclamp: Black clamp control register. | ||
403 | * @blcomp: Black level compensation value for RGrGbB Pixels. 2's complement. | ||
404 | * @fpc: Number of faulty pixels corrected in the frame, address of FPC table. | ||
405 | * @cull: Cull control register. | ||
406 | * @lsc: Pointer to LSC gain table. | ||
407 | */ | ||
408 | struct omap3isp_ccdc_update_config { | ||
409 | __u16 update; | ||
410 | __u16 flag; | ||
411 | enum omap3isp_alaw_ipwidth alawip; | ||
412 | struct omap3isp_ccdc_bclamp __user *bclamp; | ||
413 | struct omap3isp_ccdc_blcomp __user *blcomp; | ||
414 | struct omap3isp_ccdc_fpc __user *fpc; | ||
415 | struct omap3isp_ccdc_lsc_config __user *lsc_cfg; | ||
416 | struct omap3isp_ccdc_culling __user *cull; | ||
417 | __u8 __user *lsc; | ||
418 | }; | ||
419 | |||
420 | /* Preview configurations */ | ||
421 | #define OMAP3ISP_PREV_LUMAENH (1 << 0) | ||
422 | #define OMAP3ISP_PREV_INVALAW (1 << 1) | ||
423 | #define OMAP3ISP_PREV_HRZ_MED (1 << 2) | ||
424 | #define OMAP3ISP_PREV_CFA (1 << 3) | ||
425 | #define OMAP3ISP_PREV_CHROMA_SUPP (1 << 4) | ||
426 | #define OMAP3ISP_PREV_WB (1 << 5) | ||
427 | #define OMAP3ISP_PREV_BLKADJ (1 << 6) | ||
428 | #define OMAP3ISP_PREV_RGB2RGB (1 << 7) | ||
429 | #define OMAP3ISP_PREV_COLOR_CONV (1 << 8) | ||
430 | #define OMAP3ISP_PREV_YC_LIMIT (1 << 9) | ||
431 | #define OMAP3ISP_PREV_DEFECT_COR (1 << 10) | ||
432 | #define OMAP3ISP_PREV_GAMMABYPASS (1 << 11) | ||
433 | #define OMAP3ISP_PREV_DRK_FRM_CAPTURE (1 << 12) | ||
434 | #define OMAP3ISP_PREV_DRK_FRM_SUBTRACT (1 << 13) | ||
435 | #define OMAP3ISP_PREV_LENS_SHADING (1 << 14) | ||
436 | #define OMAP3ISP_PREV_NF (1 << 15) | ||
437 | #define OMAP3ISP_PREV_GAMMA (1 << 16) | ||
438 | |||
439 | #define OMAP3ISP_PREV_NF_TBL_SIZE 64 | ||
440 | #define OMAP3ISP_PREV_CFA_TBL_SIZE 576 | ||
441 | #define OMAP3ISP_PREV_GAMMA_TBL_SIZE 1024 | ||
442 | #define OMAP3ISP_PREV_YENH_TBL_SIZE 128 | ||
443 | |||
444 | #define OMAP3ISP_PREV_DETECT_CORRECT_CHANNELS 4 | ||
445 | |||
446 | /** | ||
447 | * struct omap3isp_prev_hmed - Horizontal Median Filter | ||
448 | * @odddist: Distance between consecutive pixels of same color in the odd line. | ||
449 | * @evendist: Distance between consecutive pixels of same color in the even | ||
450 | * line. | ||
451 | * @thres: Horizontal median filter threshold. | ||
452 | */ | ||
453 | struct omap3isp_prev_hmed { | ||
454 | __u8 odddist; | ||
455 | __u8 evendist; | ||
456 | __u8 thres; | ||
457 | }; | ||
458 | |||
459 | /* | ||
460 | * Enumeration for CFA Formats supported by preview | ||
461 | */ | ||
462 | enum omap3isp_cfa_fmt { | ||
463 | OMAP3ISP_CFAFMT_BAYER, | ||
464 | OMAP3ISP_CFAFMT_SONYVGA, | ||
465 | OMAP3ISP_CFAFMT_RGBFOVEON, | ||
466 | OMAP3ISP_CFAFMT_DNSPL, | ||
467 | OMAP3ISP_CFAFMT_HONEYCOMB, | ||
468 | OMAP3ISP_CFAFMT_RRGGBBFOVEON | ||
469 | }; | ||
470 | |||
471 | /** | ||
472 | * struct omap3isp_prev_cfa - CFA Interpolation | ||
473 | * @format: CFA Format Enum value supported by preview. | ||
474 | * @gradthrs_vert: CFA Gradient Threshold - Vertical. | ||
475 | * @gradthrs_horz: CFA Gradient Threshold - Horizontal. | ||
476 | * @table: Pointer to the CFA table. | ||
477 | */ | ||
478 | struct omap3isp_prev_cfa { | ||
479 | enum omap3isp_cfa_fmt format; | ||
480 | __u8 gradthrs_vert; | ||
481 | __u8 gradthrs_horz; | ||
482 | __u32 table[OMAP3ISP_PREV_CFA_TBL_SIZE]; | ||
483 | }; | ||
484 | |||
485 | /** | ||
486 | * struct omap3isp_prev_csup - Chrominance Suppression | ||
487 | * @gain: Gain. | ||
488 | * @thres: Threshold. | ||
489 | * @hypf_en: Flag to enable/disable the High Pass Filter. | ||
490 | */ | ||
491 | struct omap3isp_prev_csup { | ||
492 | __u8 gain; | ||
493 | __u8 thres; | ||
494 | __u8 hypf_en; | ||
495 | }; | ||
496 | |||
497 | /** | ||
498 | * struct omap3isp_prev_wbal - White Balance | ||
499 | * @dgain: Digital gain (U10Q8). | ||
500 | * @coef3: White balance gain - COEF 3 (U8Q5). | ||
501 | * @coef2: White balance gain - COEF 2 (U8Q5). | ||
502 | * @coef1: White balance gain - COEF 1 (U8Q5). | ||
503 | * @coef0: White balance gain - COEF 0 (U8Q5). | ||
504 | */ | ||
505 | struct omap3isp_prev_wbal { | ||
506 | __u16 dgain; | ||
507 | __u8 coef3; | ||
508 | __u8 coef2; | ||
509 | __u8 coef1; | ||
510 | __u8 coef0; | ||
511 | }; | ||
512 | |||
513 | /** | ||
514 | * struct omap3isp_prev_blkadj - Black Level Adjustment | ||
515 | * @red: Black level offset adjustment for Red in 2's complement format | ||
516 | * @green: Black level offset adjustment for Green in 2's complement format | ||
517 | * @blue: Black level offset adjustment for Blue in 2's complement format | ||
518 | */ | ||
519 | struct omap3isp_prev_blkadj { | ||
520 | /*Black level offset adjustment for Red in 2's complement format */ | ||
521 | __u8 red; | ||
522 | /*Black level offset adjustment for Green in 2's complement format */ | ||
523 | __u8 green; | ||
524 | /* Black level offset adjustment for Blue in 2's complement format */ | ||
525 | __u8 blue; | ||
526 | }; | ||
527 | |||
528 | /** | ||
529 | * struct omap3isp_prev_rgbtorgb - RGB to RGB Blending | ||
530 | * @matrix: Blending values(S12Q8 format) | ||
531 | * [RR] [GR] [BR] | ||
532 | * [RG] [GG] [BG] | ||
533 | * [RB] [GB] [BB] | ||
534 | * @offset: Blending offset value for R,G,B in 2's complement integer format. | ||
535 | */ | ||
536 | struct omap3isp_prev_rgbtorgb { | ||
537 | __u16 matrix[OMAP3ISP_RGB_MAX][OMAP3ISP_RGB_MAX]; | ||
538 | __u16 offset[OMAP3ISP_RGB_MAX]; | ||
539 | }; | ||
540 | |||
541 | /** | ||
542 | * struct omap3isp_prev_csc - Color Space Conversion from RGB-YCbYCr | ||
543 | * @matrix: Color space conversion coefficients(S10Q8) | ||
544 | * [CSCRY] [CSCGY] [CSCBY] | ||
545 | * [CSCRCB] [CSCGCB] [CSCBCB] | ||
546 | * [CSCRCR] [CSCGCR] [CSCBCR] | ||
547 | * @offset: CSC offset values for Y offset, CB offset and CR offset respectively | ||
548 | */ | ||
549 | struct omap3isp_prev_csc { | ||
550 | __u16 matrix[OMAP3ISP_RGB_MAX][OMAP3ISP_RGB_MAX]; | ||
551 | __s16 offset[OMAP3ISP_RGB_MAX]; | ||
552 | }; | ||
553 | |||
554 | /** | ||
555 | * struct omap3isp_prev_yclimit - Y, C Value Limit | ||
556 | * @minC: Minimum C value | ||
557 | * @maxC: Maximum C value | ||
558 | * @minY: Minimum Y value | ||
559 | * @maxY: Maximum Y value | ||
560 | */ | ||
561 | struct omap3isp_prev_yclimit { | ||
562 | __u8 minC; | ||
563 | __u8 maxC; | ||
564 | __u8 minY; | ||
565 | __u8 maxY; | ||
566 | }; | ||
567 | |||
568 | /** | ||
569 | * struct omap3isp_prev_dcor - Defect correction | ||
570 | * @couplet_mode_en: Flag to enable or disable the couplet dc Correction in NF | ||
571 | * @detect_correct: Thresholds for correction bit 0:10 detect 16:25 correct | ||
572 | */ | ||
573 | struct omap3isp_prev_dcor { | ||
574 | __u8 couplet_mode_en; | ||
575 | __u32 detect_correct[OMAP3ISP_PREV_DETECT_CORRECT_CHANNELS]; | ||
576 | }; | ||
577 | |||
578 | /** | ||
579 | * struct omap3isp_prev_nf - Noise Filter | ||
580 | * @spread: Spread value to be used in Noise Filter | ||
581 | * @table: Pointer to the Noise Filter table | ||
582 | */ | ||
583 | struct omap3isp_prev_nf { | ||
584 | __u8 spread; | ||
585 | __u32 table[OMAP3ISP_PREV_NF_TBL_SIZE]; | ||
586 | }; | ||
587 | |||
588 | /** | ||
589 | * struct omap3isp_prev_gtables - Gamma correction tables | ||
590 | * @red: Array for red gamma table. | ||
591 | * @green: Array for green gamma table. | ||
592 | * @blue: Array for blue gamma table. | ||
593 | */ | ||
594 | struct omap3isp_prev_gtables { | ||
595 | __u32 red[OMAP3ISP_PREV_GAMMA_TBL_SIZE]; | ||
596 | __u32 green[OMAP3ISP_PREV_GAMMA_TBL_SIZE]; | ||
597 | __u32 blue[OMAP3ISP_PREV_GAMMA_TBL_SIZE]; | ||
598 | }; | ||
599 | |||
600 | /** | ||
601 | * struct omap3isp_prev_luma - Luma enhancement | ||
602 | * @table: Array for luma enhancement table. | ||
603 | */ | ||
604 | struct omap3isp_prev_luma { | ||
605 | __u32 table[OMAP3ISP_PREV_YENH_TBL_SIZE]; | ||
606 | }; | ||
607 | |||
608 | /** | ||
609 | * struct omap3isp_prev_update_config - Preview engine configuration (user) | ||
610 | * @update: Specifies which ISP Preview registers should be updated. | ||
611 | * @flag: Specifies which ISP Preview functions should be enabled. | ||
612 | * @shading_shift: 3bit value of shift used in shading compensation. | ||
613 | * @luma: Pointer to luma enhancement structure. | ||
614 | * @hmed: Pointer to structure containing the odd and even distance. | ||
615 | * between the pixels in the image along with the filter threshold. | ||
616 | * @cfa: Pointer to structure containing the CFA interpolation table, CFA. | ||
617 | * format in the image, vertical and horizontal gradient threshold. | ||
618 | * @csup: Pointer to Structure for Chrominance Suppression coefficients. | ||
619 | * @wbal: Pointer to structure for White Balance. | ||
620 | * @blkadj: Pointer to structure for Black Adjustment. | ||
621 | * @rgb2rgb: Pointer to structure for RGB to RGB Blending. | ||
622 | * @csc: Pointer to structure for Color Space Conversion from RGB-YCbYCr. | ||
623 | * @yclimit: Pointer to structure for Y, C Value Limit. | ||
624 | * @dcor: Pointer to structure for defect correction. | ||
625 | * @nf: Pointer to structure for Noise Filter | ||
626 | * @gamma: Pointer to gamma structure. | ||
627 | */ | ||
628 | struct omap3isp_prev_update_config { | ||
629 | __u32 update; | ||
630 | __u32 flag; | ||
631 | __u32 shading_shift; | ||
632 | struct omap3isp_prev_luma __user *luma; | ||
633 | struct omap3isp_prev_hmed __user *hmed; | ||
634 | struct omap3isp_prev_cfa __user *cfa; | ||
635 | struct omap3isp_prev_csup __user *csup; | ||
636 | struct omap3isp_prev_wbal __user *wbal; | ||
637 | struct omap3isp_prev_blkadj __user *blkadj; | ||
638 | struct omap3isp_prev_rgbtorgb __user *rgb2rgb; | ||
639 | struct omap3isp_prev_csc __user *csc; | ||
640 | struct omap3isp_prev_yclimit __user *yclimit; | ||
641 | struct omap3isp_prev_dcor __user *dcor; | ||
642 | struct omap3isp_prev_nf __user *nf; | ||
643 | struct omap3isp_prev_gtables __user *gamma; | ||
644 | }; | ||
645 | |||
646 | #endif /* OMAP3_ISP_USER_H */ | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 0db8037e2725..811183de1ef5 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -196,7 +196,7 @@ static inline int __TestClearPage##uname(struct page *page) { return 0; } | |||
196 | 196 | ||
197 | struct page; /* forward declaration */ | 197 | struct page; /* forward declaration */ |
198 | 198 | ||
199 | TESTPAGEFLAG(Locked, locked) TESTSETFLAG(Locked, locked) | 199 | TESTPAGEFLAG(Locked, locked) |
200 | PAGEFLAG(Error, error) TESTCLEARFLAG(Error, error) | 200 | PAGEFLAG(Error, error) TESTCLEARFLAG(Error, error) |
201 | PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced) | 201 | PAGEFLAG(Referenced, referenced) TESTCLEARFLAG(Referenced, referenced) |
202 | PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) | 202 | PAGEFLAG(Dirty, dirty) TESTSCFLAG(Dirty, dirty) __CLEARPAGEFLAG(Dirty, dirty) |
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 6d6cb7a57bb3..961ecc7d30bc 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -1,8 +1,26 @@ | |||
1 | #ifndef __LINUX_PAGE_CGROUP_H | 1 | #ifndef __LINUX_PAGE_CGROUP_H |
2 | #define __LINUX_PAGE_CGROUP_H | 2 | #define __LINUX_PAGE_CGROUP_H |
3 | 3 | ||
4 | enum { | ||
5 | /* flags for mem_cgroup */ | ||
6 | PCG_LOCK, /* Lock for pc->mem_cgroup and following bits. */ | ||
7 | PCG_CACHE, /* charged as cache */ | ||
8 | PCG_USED, /* this object is in use. */ | ||
9 | PCG_MIGRATION, /* under page migration */ | ||
10 | /* flags for mem_cgroup and file and I/O status */ | ||
11 | PCG_MOVE_LOCK, /* For race between move_account v.s. following bits */ | ||
12 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
13 | /* No lock in page_cgroup */ | ||
14 | PCG_ACCT_LRU, /* page has been accounted for (under lru_lock) */ | ||
15 | __NR_PCG_FLAGS, | ||
16 | }; | ||
17 | |||
18 | #ifndef __GENERATING_BOUNDS_H | ||
19 | #include <generated/bounds.h> | ||
20 | |||
4 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 21 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
5 | #include <linux/bit_spinlock.h> | 22 | #include <linux/bit_spinlock.h> |
23 | |||
6 | /* | 24 | /* |
7 | * Page Cgroup can be considered as an extended mem_map. | 25 | * Page Cgroup can be considered as an extended mem_map. |
8 | * A page_cgroup page is associated with every page descriptor. The | 26 | * A page_cgroup page is associated with every page descriptor. The |
@@ -13,7 +31,6 @@ | |||
13 | struct page_cgroup { | 31 | struct page_cgroup { |
14 | unsigned long flags; | 32 | unsigned long flags; |
15 | struct mem_cgroup *mem_cgroup; | 33 | struct mem_cgroup *mem_cgroup; |
16 | struct page *page; | ||
17 | struct list_head lru; /* per cgroup LRU list */ | 34 | struct list_head lru; /* per cgroup LRU list */ |
18 | }; | 35 | }; |
19 | 36 | ||
@@ -32,19 +49,7 @@ static inline void __init page_cgroup_init(void) | |||
32 | #endif | 49 | #endif |
33 | 50 | ||
34 | struct page_cgroup *lookup_page_cgroup(struct page *page); | 51 | struct page_cgroup *lookup_page_cgroup(struct page *page); |
35 | 52 | struct page *lookup_cgroup_page(struct page_cgroup *pc); | |
36 | enum { | ||
37 | /* flags for mem_cgroup */ | ||
38 | PCG_LOCK, /* Lock for pc->mem_cgroup and following bits. */ | ||
39 | PCG_CACHE, /* charged as cache */ | ||
40 | PCG_USED, /* this object is in use. */ | ||
41 | PCG_MIGRATION, /* under page migration */ | ||
42 | /* flags for mem_cgroup and file and I/O status */ | ||
43 | PCG_MOVE_LOCK, /* For race between move_account v.s. following bits */ | ||
44 | PCG_FILE_MAPPED, /* page is accounted as "mapped" */ | ||
45 | /* No lock in page_cgroup */ | ||
46 | PCG_ACCT_LRU, /* page has been accounted for (under lru_lock) */ | ||
47 | }; | ||
48 | 53 | ||
49 | #define TESTPCGFLAG(uname, lname) \ | 54 | #define TESTPCGFLAG(uname, lname) \ |
50 | static inline int PageCgroup##uname(struct page_cgroup *pc) \ | 55 | static inline int PageCgroup##uname(struct page_cgroup *pc) \ |
@@ -85,16 +90,6 @@ SETPCGFLAG(Migration, MIGRATION) | |||
85 | CLEARPCGFLAG(Migration, MIGRATION) | 90 | CLEARPCGFLAG(Migration, MIGRATION) |
86 | TESTPCGFLAG(Migration, MIGRATION) | 91 | TESTPCGFLAG(Migration, MIGRATION) |
87 | 92 | ||
88 | static inline int page_cgroup_nid(struct page_cgroup *pc) | ||
89 | { | ||
90 | return page_to_nid(pc->page); | ||
91 | } | ||
92 | |||
93 | static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc) | ||
94 | { | ||
95 | return page_zonenum(pc->page); | ||
96 | } | ||
97 | |||
98 | static inline void lock_page_cgroup(struct page_cgroup *pc) | 93 | static inline void lock_page_cgroup(struct page_cgroup *pc) |
99 | { | 94 | { |
100 | /* | 95 | /* |
@@ -109,11 +104,6 @@ static inline void unlock_page_cgroup(struct page_cgroup *pc) | |||
109 | bit_spin_unlock(PCG_LOCK, &pc->flags); | 104 | bit_spin_unlock(PCG_LOCK, &pc->flags); |
110 | } | 105 | } |
111 | 106 | ||
112 | static inline int page_is_cgroup_locked(struct page_cgroup *pc) | ||
113 | { | ||
114 | return bit_spin_is_locked(PCG_LOCK, &pc->flags); | ||
115 | } | ||
116 | |||
117 | static inline void move_lock_page_cgroup(struct page_cgroup *pc, | 107 | static inline void move_lock_page_cgroup(struct page_cgroup *pc, |
118 | unsigned long *flags) | 108 | unsigned long *flags) |
119 | { | 109 | { |
@@ -132,6 +122,39 @@ static inline void move_unlock_page_cgroup(struct page_cgroup *pc, | |||
132 | local_irq_restore(*flags); | 122 | local_irq_restore(*flags); |
133 | } | 123 | } |
134 | 124 | ||
125 | #ifdef CONFIG_SPARSEMEM | ||
126 | #define PCG_ARRAYID_WIDTH SECTIONS_SHIFT | ||
127 | #else | ||
128 | #define PCG_ARRAYID_WIDTH NODES_SHIFT | ||
129 | #endif | ||
130 | |||
131 | #if (PCG_ARRAYID_WIDTH > BITS_PER_LONG - NR_PCG_FLAGS) | ||
132 | #error Not enough space left in pc->flags to store page_cgroup array IDs | ||
133 | #endif | ||
134 | |||
135 | /* pc->flags: ARRAY-ID | FLAGS */ | ||
136 | |||
137 | #define PCG_ARRAYID_MASK ((1UL << PCG_ARRAYID_WIDTH) - 1) | ||
138 | |||
139 | #define PCG_ARRAYID_OFFSET (BITS_PER_LONG - PCG_ARRAYID_WIDTH) | ||
140 | /* | ||
141 | * Zero the shift count for non-existent fields, to prevent compiler | ||
142 | * warnings and ensure references are optimized away. | ||
143 | */ | ||
144 | #define PCG_ARRAYID_SHIFT (PCG_ARRAYID_OFFSET * (PCG_ARRAYID_WIDTH != 0)) | ||
145 | |||
146 | static inline void set_page_cgroup_array_id(struct page_cgroup *pc, | ||
147 | unsigned long id) | ||
148 | { | ||
149 | pc->flags &= ~(PCG_ARRAYID_MASK << PCG_ARRAYID_SHIFT); | ||
150 | pc->flags |= (id & PCG_ARRAYID_MASK) << PCG_ARRAYID_SHIFT; | ||
151 | } | ||
152 | |||
153 | static inline unsigned long page_cgroup_array_id(struct page_cgroup *pc) | ||
154 | { | ||
155 | return (pc->flags >> PCG_ARRAYID_SHIFT) & PCG_ARRAYID_MASK; | ||
156 | } | ||
157 | |||
135 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 158 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
136 | struct page_cgroup; | 159 | struct page_cgroup; |
137 | 160 | ||
@@ -152,7 +175,7 @@ static inline void __init page_cgroup_init_flatmem(void) | |||
152 | { | 175 | { |
153 | } | 176 | } |
154 | 177 | ||
155 | #endif | 178 | #endif /* CONFIG_CGROUP_MEM_RES_CTLR */ |
156 | 179 | ||
157 | #include <linux/swap.h> | 180 | #include <linux/swap.h> |
158 | 181 | ||
@@ -188,5 +211,8 @@ static inline void swap_cgroup_swapoff(int type) | |||
188 | return; | 211 | return; |
189 | } | 212 | } |
190 | 213 | ||
191 | #endif | 214 | #endif /* CONFIG_CGROUP_MEM_RES_CTLR_SWAP */ |
192 | #endif | 215 | |
216 | #endif /* !__GENERATING_BOUNDS_H */ | ||
217 | |||
218 | #endif /* __LINUX_PAGE_CGROUP_H */ | ||
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 9c66e994540f..c11950652646 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -298,7 +298,6 @@ static inline pgoff_t linear_page_index(struct vm_area_struct *vma, | |||
298 | 298 | ||
299 | extern void __lock_page(struct page *page); | 299 | extern void __lock_page(struct page *page); |
300 | extern int __lock_page_killable(struct page *page); | 300 | extern int __lock_page_killable(struct page *page); |
301 | extern void __lock_page_nosync(struct page *page); | ||
302 | extern int __lock_page_or_retry(struct page *page, struct mm_struct *mm, | 301 | extern int __lock_page_or_retry(struct page *page, struct mm_struct *mm, |
303 | unsigned int flags); | 302 | unsigned int flags); |
304 | extern void unlock_page(struct page *page); | 303 | extern void unlock_page(struct page *page); |
@@ -342,17 +341,6 @@ static inline int lock_page_killable(struct page *page) | |||
342 | } | 341 | } |
343 | 342 | ||
344 | /* | 343 | /* |
345 | * lock_page_nosync should only be used if we can't pin the page's inode. | ||
346 | * Doesn't play quite so well with block device plugging. | ||
347 | */ | ||
348 | static inline void lock_page_nosync(struct page *page) | ||
349 | { | ||
350 | might_sleep(); | ||
351 | if (!trylock_page(page)) | ||
352 | __lock_page_nosync(page); | ||
353 | } | ||
354 | |||
355 | /* | ||
356 | * lock_page_or_retry - Lock the page, unless this would block and the | 344 | * lock_page_or_retry - Lock the page, unless this would block and the |
357 | * caller indicated that it can handle a retry. | 345 | * caller indicated that it can handle a retry. |
358 | */ | 346 | */ |
@@ -455,8 +443,9 @@ int add_to_page_cache_locked(struct page *page, struct address_space *mapping, | |||
455 | pgoff_t index, gfp_t gfp_mask); | 443 | pgoff_t index, gfp_t gfp_mask); |
456 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, | 444 | int add_to_page_cache_lru(struct page *page, struct address_space *mapping, |
457 | pgoff_t index, gfp_t gfp_mask); | 445 | pgoff_t index, gfp_t gfp_mask); |
458 | extern void remove_from_page_cache(struct page *page); | 446 | extern void delete_from_page_cache(struct page *page); |
459 | extern void __remove_from_page_cache(struct page *page); | 447 | extern void __delete_from_page_cache(struct page *page); |
448 | int replace_page_cache_page(struct page *old, struct page *new, gfp_t gfp_mask); | ||
460 | 449 | ||
461 | /* | 450 | /* |
462 | * Like add_to_page_cache_locked, but used to add newly allocated pages: | 451 | * Like add_to_page_cache_locked, but used to add newly allocated pages: |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index ce6810512c66..67cb3ae38016 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -26,6 +26,7 @@ | |||
26 | extern void pcie_aspm_init_link_state(struct pci_dev *pdev); | 26 | extern void pcie_aspm_init_link_state(struct pci_dev *pdev); |
27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | 27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); |
28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
29 | extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); | ||
29 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 30 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); |
30 | extern void pcie_clear_aspm(void); | 31 | extern void pcie_clear_aspm(void); |
31 | extern void pcie_no_aspm(void); | 32 | extern void pcie_no_aspm(void); |
@@ -39,6 +40,9 @@ static inline void pcie_aspm_exit_link_state(struct pci_dev *pdev) | |||
39 | static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) | 40 | static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) |
40 | { | 41 | { |
41 | } | 42 | } |
43 | static inline void pcie_aspm_powersave_config_link(struct pci_dev *pdev) | ||
44 | { | ||
45 | } | ||
42 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) | 46 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) |
43 | { | 47 | { |
44 | } | 48 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 16c9f2e61977..96f70d7e058d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1002,12 +1002,11 @@ extern bool pcie_ports_auto; | |||
1002 | #endif | 1002 | #endif |
1003 | 1003 | ||
1004 | #ifndef CONFIG_PCIEASPM | 1004 | #ifndef CONFIG_PCIEASPM |
1005 | static inline int pcie_aspm_enabled(void) | 1005 | static inline int pcie_aspm_enabled(void) { return 0; } |
1006 | { | 1006 | static inline bool pcie_aspm_support_enabled(void) { return false; } |
1007 | return 0; | ||
1008 | } | ||
1009 | #else | 1007 | #else |
1010 | extern int pcie_aspm_enabled(void); | 1008 | extern int pcie_aspm_enabled(void); |
1009 | extern bool pcie_aspm_support_enabled(void); | ||
1011 | #endif | 1010 | #endif |
1012 | 1011 | ||
1013 | #ifdef CONFIG_PCIEAER | 1012 | #ifdef CONFIG_PCIEAER |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index bda221dfaf0a..4e2c9150a785 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -518,7 +518,7 @@ | |||
518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 | 518 | #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 |
519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 | 519 | #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 |
520 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 | 520 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 |
521 | #define PCI_DEVICE_ID_AMD_15H_NB_LINK 0x1604 | 521 | #define PCI_DEVICE_ID_AMD_15H_NB_F4 0x1604 |
522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | 522 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 |
523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 523 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 524 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
@@ -2737,6 +2737,7 @@ | |||
2737 | #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 | 2737 | #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 |
2738 | #define PCI_DEVICE_ID_INTEL_SCH_LPC 0x8119 | 2738 | #define PCI_DEVICE_ID_INTEL_SCH_LPC 0x8119 |
2739 | #define PCI_DEVICE_ID_INTEL_SCH_IDE 0x811a | 2739 | #define PCI_DEVICE_ID_INTEL_SCH_IDE 0x811a |
2740 | #define PCI_DEVICE_ID_INTEL_ITC_LPC 0x8186 | ||
2740 | #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 | 2741 | #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 |
2741 | #define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 | 2742 | #define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 |
2742 | #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca | 2743 | #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 5b7e6b1ba54f..be01380f798a 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -223,7 +223,7 @@ | |||
223 | #define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ | 223 | #define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ |
224 | #define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ | 224 | #define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ |
225 | #define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ | 225 | #define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ |
226 | #define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ | 226 | #define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxiliary power support mask */ |
227 | #define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ | 227 | #define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ |
228 | #define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ | 228 | #define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ |
229 | #define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ | 229 | #define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ |
@@ -435,7 +435,7 @@ | |||
435 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ | 435 | #define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */ |
436 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ | 436 | #define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */ |
437 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ | 437 | #define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */ |
438 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Suprise Down Error Reporting Capable */ | 438 | #define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Surprise Down Error Reporting Capable */ |
439 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ | 439 | #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ |
440 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ | 440 | #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ |
441 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ | 441 | #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f495c0147240..ee9f1e782800 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -662,7 +662,7 @@ struct pmu { | |||
662 | int (*commit_txn) (struct pmu *pmu); /* optional */ | 662 | int (*commit_txn) (struct pmu *pmu); /* optional */ |
663 | /* | 663 | /* |
664 | * Will cancel the transaction, assumes ->del() is called | 664 | * Will cancel the transaction, assumes ->del() is called |
665 | * for each successfull ->add() during the transaction. | 665 | * for each successful ->add() during the transaction. |
666 | */ | 666 | */ |
667 | void (*cancel_txn) (struct pmu *pmu); /* optional */ | 667 | void (*cancel_txn) (struct pmu *pmu); /* optional */ |
668 | }; | 668 | }; |
@@ -938,9 +938,7 @@ struct perf_cpu_context { | |||
938 | struct list_head rotation_list; | 938 | struct list_head rotation_list; |
939 | int jiffies_interval; | 939 | int jiffies_interval; |
940 | struct pmu *active_pmu; | 940 | struct pmu *active_pmu; |
941 | #ifdef CONFIG_CGROUP_PERF | ||
942 | struct perf_cgroup *cgrp; | 941 | struct perf_cgroup *cgrp; |
943 | #endif | ||
944 | }; | 942 | }; |
945 | 943 | ||
946 | struct perf_output_handle { | 944 | struct perf_output_handle { |
@@ -1088,7 +1086,7 @@ void perf_event_task_sched_out(struct task_struct *task, struct task_struct *nex | |||
1088 | { | 1086 | { |
1089 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); | 1087 | perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); |
1090 | 1088 | ||
1091 | COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next)); | 1089 | __perf_event_task_sched_out(task, next); |
1092 | } | 1090 | } |
1093 | 1091 | ||
1094 | extern void perf_event_mmap(struct vm_area_struct *vma); | 1092 | extern void perf_event_mmap(struct vm_area_struct *vma); |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 49f1c2f66e95..cdced84261d7 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -21,7 +21,7 @@ enum pid_type | |||
21 | * quickly from the numeric pid value. The attached processes may be | 21 | * quickly from the numeric pid value. The attached processes may be |
22 | * quickly accessed by following pointers from struct pid. | 22 | * quickly accessed by following pointers from struct pid. |
23 | * | 23 | * |
24 | * Storing pid_t values in the kernel and refering to them later has a | 24 | * Storing pid_t values in the kernel and referring to them later has a |
25 | * problem. The process originally with that pid may have exited and the | 25 | * problem. The process originally with that pid may have exited and the |
26 | * pid allocator wrapped, and another process could have come along | 26 | * pid allocator wrapped, and another process could have come along |
27 | * and been assigned that pid. | 27 | * and been assigned that pid. |
@@ -117,7 +117,7 @@ extern struct pid *find_vpid(int nr); | |||
117 | */ | 117 | */ |
118 | extern struct pid *find_get_pid(int nr); | 118 | extern struct pid *find_get_pid(int nr); |
119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | 119 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); |
120 | int next_pidmap(struct pid_namespace *pid_ns, int last); | 120 | int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); |
121 | 121 | ||
122 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 122 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
123 | extern void free_pid(struct pid *pid); | 123 | extern void free_pid(struct pid *pid); |
@@ -141,6 +141,17 @@ static inline struct pid_namespace *ns_of_pid(struct pid *pid) | |||
141 | } | 141 | } |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * is_child_reaper returns true if the pid is the init process | ||
145 | * of the current namespace. As this one could be checked before | ||
146 | * pid_ns->child_reaper is assigned in copy_process, we check | ||
147 | * with the pid number. | ||
148 | */ | ||
149 | static inline bool is_child_reaper(struct pid *pid) | ||
150 | { | ||
151 | return pid->numbers[pid->level].nr == 1; | ||
152 | } | ||
153 | |||
154 | /* | ||
144 | * the helpers to get the pid's id seen from different namespaces | 155 | * the helpers to get the pid's id seen from different namespaces |
145 | * | 156 | * |
146 | * pid_nr() : global id, i.e. the id seen from the init namespace; | 157 | * pid_nr() : global id, i.e. the id seen from the init namespace; |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index b1032a3fafdc..3a02e0208575 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -223,7 +223,7 @@ struct tc_gred_qopt { | |||
223 | __u32 limit; /* HARD maximal queue length (bytes) */ | 223 | __u32 limit; /* HARD maximal queue length (bytes) */ |
224 | __u32 qth_min; /* Min average length threshold (bytes) */ | 224 | __u32 qth_min; /* Min average length threshold (bytes) */ |
225 | __u32 qth_max; /* Max average length threshold (bytes) */ | 225 | __u32 qth_max; /* Max average length threshold (bytes) */ |
226 | __u32 DP; /* upto 2^32 DPs */ | 226 | __u32 DP; /* up to 2^32 DPs */ |
227 | __u32 backlog; | 227 | __u32 backlog; |
228 | __u32 qave; | 228 | __u32 qave; |
229 | __u32 forced; | 229 | __u32 forced; |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index d96db9825708..744942c95fec 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/mod_devicetable.h> | 15 | #include <linux/mod_devicetable.h> |
16 | 16 | ||
17 | struct mfd_cell; | ||
18 | |||
17 | struct platform_device { | 19 | struct platform_device { |
18 | const char * name; | 20 | const char * name; |
19 | int id; | 21 | int id; |
@@ -23,6 +25,9 @@ struct platform_device { | |||
23 | 25 | ||
24 | const struct platform_device_id *id_entry; | 26 | const struct platform_device_id *id_entry; |
25 | 27 | ||
28 | /* MFD cell pointer */ | ||
29 | struct mfd_cell *mfd_cell; | ||
30 | |||
26 | /* arch specific additions */ | 31 | /* arch specific additions */ |
27 | struct pdev_archdata archdata; | 32 | struct pdev_archdata archdata; |
28 | }; | 33 | }; |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 6618216bb973..512e09177e57 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -529,13 +529,19 @@ struct dev_power_domain { | |||
529 | */ | 529 | */ |
530 | 530 | ||
531 | #ifdef CONFIG_PM_SLEEP | 531 | #ifdef CONFIG_PM_SLEEP |
532 | extern void device_pm_lock(void); | 532 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS |
533 | extern int sysdev_suspend(pm_message_t state); | ||
533 | extern int sysdev_resume(void); | 534 | extern int sysdev_resume(void); |
535 | #else | ||
536 | static inline int sysdev_suspend(pm_message_t state) { return 0; } | ||
537 | static inline int sysdev_resume(void) { return 0; } | ||
538 | #endif | ||
539 | |||
540 | extern void device_pm_lock(void); | ||
534 | extern void dpm_resume_noirq(pm_message_t state); | 541 | extern void dpm_resume_noirq(pm_message_t state); |
535 | extern void dpm_resume_end(pm_message_t state); | 542 | extern void dpm_resume_end(pm_message_t state); |
536 | 543 | ||
537 | extern void device_pm_unlock(void); | 544 | extern void device_pm_unlock(void); |
538 | extern int sysdev_suspend(pm_message_t state); | ||
539 | extern int dpm_suspend_noirq(pm_message_t state); | 545 | extern int dpm_suspend_noirq(pm_message_t state); |
540 | extern int dpm_suspend_start(pm_message_t state); | 546 | extern int dpm_suspend_start(pm_message_t state); |
541 | 547 | ||
diff --git a/include/linux/poll.h b/include/linux/poll.h index 1a2ccd6f3823..cf40010ce0cd 100644 --- a/include/linux/poll.h +++ b/include/linux/poll.h | |||
@@ -82,7 +82,7 @@ static inline int poll_schedule(struct poll_wqueues *pwq, int state) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Scaleable version of the fd_set. | 85 | * Scalable version of the fd_set. |
86 | */ | 86 | */ |
87 | 87 | ||
88 | typedef struct { | 88 | typedef struct { |
diff --git a/include/linux/posix-clock.h b/include/linux/posix-clock.h index 369e19d3750b..7f1183dcd119 100644 --- a/include/linux/posix-clock.h +++ b/include/linux/posix-clock.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/poll.h> | 25 | #include <linux/poll.h> |
26 | #include <linux/posix-timers.h> | 26 | #include <linux/posix-timers.h> |
27 | #include <linux/rwsem.h> | ||
27 | 28 | ||
28 | struct posix_clock; | 29 | struct posix_clock; |
29 | 30 | ||
@@ -104,7 +105,7 @@ struct posix_clock_operations { | |||
104 | * @ops: Functional interface to the clock | 105 | * @ops: Functional interface to the clock |
105 | * @cdev: Character device instance for this clock | 106 | * @cdev: Character device instance for this clock |
106 | * @kref: Reference count. | 107 | * @kref: Reference count. |
107 | * @mutex: Protects the 'zombie' field from concurrent access. | 108 | * @rwsem: Protects the 'zombie' field from concurrent access. |
108 | * @zombie: If 'zombie' is true, then the hardware has disappeared. | 109 | * @zombie: If 'zombie' is true, then the hardware has disappeared. |
109 | * @release: A function to free the structure when the reference count reaches | 110 | * @release: A function to free the structure when the reference count reaches |
110 | * zero. May be NULL if structure is statically allocated. | 111 | * zero. May be NULL if structure is statically allocated. |
@@ -117,7 +118,7 @@ struct posix_clock { | |||
117 | struct posix_clock_operations ops; | 118 | struct posix_clock_operations ops; |
118 | struct cdev cdev; | 119 | struct cdev cdev; |
119 | struct kref kref; | 120 | struct kref kref; |
120 | struct mutex mutex; | 121 | struct rw_semaphore rwsem; |
121 | bool zombie; | 122 | bool zombie; |
122 | void (*release)(struct posix_clock *clk); | 123 | void (*release)(struct posix_clock *clk); |
123 | }; | 124 | }; |
diff --git a/include/linux/power/bq20z75.h b/include/linux/power/bq20z75.h new file mode 100644 index 000000000000..b0843b68af92 --- /dev/null +++ b/include/linux/power/bq20z75.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Gas Gauge driver for TI's BQ20Z75 | ||
3 | * | ||
4 | * Copyright (c) 2010, NVIDIA Corporation. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __LINUX_POWER_BQ20Z75_H_ | ||
22 | #define __LINUX_POWER_BQ20Z75_H_ | ||
23 | |||
24 | #include <linux/power_supply.h> | ||
25 | #include <linux/types.h> | ||
26 | |||
27 | /** | ||
28 | * struct bq20z75_platform_data - platform data for bq20z75 devices | ||
29 | * @battery_detect: GPIO which is used to detect battery presence | ||
30 | * @battery_detect_present: gpio state when battery is present (0 / 1) | ||
31 | * @i2c_retry_count: # of times to retry on i2c IO failure | ||
32 | */ | ||
33 | struct bq20z75_platform_data { | ||
34 | int battery_detect; | ||
35 | int battery_detect_present; | ||
36 | int i2c_retry_count; | ||
37 | }; | ||
38 | |||
39 | #endif | ||
diff --git a/include/linux/power/bq27x00_battery.h b/include/linux/power/bq27x00_battery.h new file mode 100644 index 000000000000..a857f719bf40 --- /dev/null +++ b/include/linux/power/bq27x00_battery.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __LINUX_BQ27X00_BATTERY_H__ | ||
2 | #define __LINUX_BQ27X00_BATTERY_H__ | ||
3 | |||
4 | /** | ||
5 | * struct bq27000_plaform_data - Platform data for bq27000 devices | ||
6 | * @name: Name of the battery. If NULL the driver will fallback to "bq27000". | ||
7 | * @read: HDQ read callback. | ||
8 | * This function should provide access to the HDQ bus the battery is | ||
9 | * connected to. | ||
10 | * The first parameter is a pointer to the battery device, the second the | ||
11 | * register to be read. The return value should either be the content of | ||
12 | * the passed register or an error value. | ||
13 | */ | ||
14 | struct bq27000_platform_data { | ||
15 | const char *name; | ||
16 | int (*read)(struct device *dev, unsigned int); | ||
17 | }; | ||
18 | |||
19 | #endif | ||
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 7d7325685c42..204c18dfdc9e 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -173,6 +173,8 @@ struct power_supply { | |||
173 | char *full_trig_name; | 173 | char *full_trig_name; |
174 | struct led_trigger *online_trig; | 174 | struct led_trigger *online_trig; |
175 | char *online_trig_name; | 175 | char *online_trig_name; |
176 | struct led_trigger *charging_blink_full_solid_trig; | ||
177 | char *charging_blink_full_solid_trig_name; | ||
176 | #endif | 178 | #endif |
177 | }; | 179 | }; |
178 | 180 | ||
@@ -213,4 +215,49 @@ extern void power_supply_unregister(struct power_supply *psy); | |||
213 | /* For APM emulation, think legacy userspace. */ | 215 | /* For APM emulation, think legacy userspace. */ |
214 | extern struct class *power_supply_class; | 216 | extern struct class *power_supply_class; |
215 | 217 | ||
218 | static inline bool power_supply_is_amp_property(enum power_supply_property psp) | ||
219 | { | ||
220 | switch (psp) { | ||
221 | case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: | ||
222 | case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN: | ||
223 | case POWER_SUPPLY_PROP_CHARGE_FULL: | ||
224 | case POWER_SUPPLY_PROP_CHARGE_EMPTY: | ||
225 | case POWER_SUPPLY_PROP_CHARGE_NOW: | ||
226 | case POWER_SUPPLY_PROP_CHARGE_AVG: | ||
227 | case POWER_SUPPLY_PROP_CHARGE_COUNTER: | ||
228 | case POWER_SUPPLY_PROP_CURRENT_MAX: | ||
229 | case POWER_SUPPLY_PROP_CURRENT_NOW: | ||
230 | case POWER_SUPPLY_PROP_CURRENT_AVG: | ||
231 | return 1; | ||
232 | default: | ||
233 | break; | ||
234 | } | ||
235 | |||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static inline bool power_supply_is_watt_property(enum power_supply_property psp) | ||
240 | { | ||
241 | switch (psp) { | ||
242 | case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: | ||
243 | case POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN: | ||
244 | case POWER_SUPPLY_PROP_ENERGY_FULL: | ||
245 | case POWER_SUPPLY_PROP_ENERGY_EMPTY: | ||
246 | case POWER_SUPPLY_PROP_ENERGY_NOW: | ||
247 | case POWER_SUPPLY_PROP_ENERGY_AVG: | ||
248 | case POWER_SUPPLY_PROP_VOLTAGE_MAX: | ||
249 | case POWER_SUPPLY_PROP_VOLTAGE_MIN: | ||
250 | case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: | ||
251 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: | ||
252 | case POWER_SUPPLY_PROP_VOLTAGE_NOW: | ||
253 | case POWER_SUPPLY_PROP_VOLTAGE_AVG: | ||
254 | case POWER_SUPPLY_PROP_POWER_NOW: | ||
255 | return 1; | ||
256 | default: | ||
257 | break; | ||
258 | } | ||
259 | |||
260 | return 0; | ||
261 | } | ||
262 | |||
216 | #endif /* __LINUX_POWER_SUPPLY_H__ */ | 263 | #endif /* __LINUX_POWER_SUPPLY_H__ */ |
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h index af7c36a5a521..a3bfbdf63d32 100644 --- a/include/linux/prefetch.h +++ b/include/linux/prefetch.h | |||
@@ -29,7 +29,7 @@ | |||
29 | prefetchw(x) - prefetches the cacheline at "x" for write | 29 | prefetchw(x) - prefetches the cacheline at "x" for write |
30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking | 30 | spin_lock_prefetch(x) - prefetches the spinlock *x for taking |
31 | 31 | ||
32 | there is also PREFETCH_STRIDE which is the architecure-prefered | 32 | there is also PREFETCH_STRIDE which is the architecure-preferred |
33 | "lookahead" size for prefetching streamed operations. | 33 | "lookahead" size for prefetching streamed operations. |
34 | 34 | ||
35 | */ | 35 | */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 379eaed72d4b..838c1149251a 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -50,7 +50,7 @@ typedef int (write_proc_t)(struct file *file, const char __user *buffer, | |||
50 | 50 | ||
51 | struct proc_dir_entry { | 51 | struct proc_dir_entry { |
52 | unsigned int low_ino; | 52 | unsigned int low_ino; |
53 | unsigned short namelen; | 53 | unsigned int namelen; |
54 | const char *name; | 54 | const char *name; |
55 | mode_t mode; | 55 | mode_t mode; |
56 | nlink_t nlink; | 56 | nlink_t nlink; |
diff --git a/include/linux/pwm_backlight.h b/include/linux/pwm_backlight.h index e031e1a486d9..5e3e25a3c9c3 100644 --- a/include/linux/pwm_backlight.h +++ b/include/linux/pwm_backlight.h | |||
@@ -4,6 +4,8 @@ | |||
4 | #ifndef __LINUX_PWM_BACKLIGHT_H | 4 | #ifndef __LINUX_PWM_BACKLIGHT_H |
5 | #define __LINUX_PWM_BACKLIGHT_H | 5 | #define __LINUX_PWM_BACKLIGHT_H |
6 | 6 | ||
7 | #include <linux/backlight.h> | ||
8 | |||
7 | struct platform_pwm_backlight_data { | 9 | struct platform_pwm_backlight_data { |
8 | int pwm_id; | 10 | int pwm_id; |
9 | unsigned int max_brightness; | 11 | unsigned int max_brightness; |
@@ -13,6 +15,7 @@ struct platform_pwm_backlight_data { | |||
13 | int (*init)(struct device *dev); | 15 | int (*init)(struct device *dev); |
14 | int (*notify)(struct device *dev, int brightness); | 16 | int (*notify)(struct device *dev, int brightness); |
15 | void (*exit)(struct device *dev); | 17 | void (*exit)(struct device *dev); |
18 | int (*check_fb)(struct device *dev, struct fb_info *info); | ||
16 | }; | 19 | }; |
17 | 20 | ||
18 | #endif | 21 | #endif |
diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h index 2f691e4e6222..44835fb39793 100644 --- a/include/linux/pxa2xx_ssp.h +++ b/include/linux/pxa2xx_ssp.h | |||
@@ -122,7 +122,7 @@ | |||
122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ | 122 | #define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */ |
123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ | 123 | #define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */ |
124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ | 124 | #define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */ |
125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */ | 125 | #define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interrupt Enable */ |
126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ | 126 | #define SSCR1_IFS (1 << 16) /* Invert Frame Signal */ |
127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ | 127 | #define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */ |
128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ | 128 | #define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index eb354f6f26b3..26f9e3612e0f 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -277,7 +277,7 @@ static inline int dquot_alloc_space(struct inode *inode, qsize_t nr) | |||
277 | /* | 277 | /* |
278 | * Mark inode fully dirty. Since we are allocating blocks, inode | 278 | * Mark inode fully dirty. Since we are allocating blocks, inode |
279 | * would become fully dirty soon anyway and it reportedly | 279 | * would become fully dirty soon anyway and it reportedly |
280 | * reduces inode_lock contention. | 280 | * reduces lock contention. |
281 | */ | 281 | */ |
282 | mark_inode_dirty(inode); | 282 | mark_inode_dirty(inode); |
283 | } | 283 | } |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index ffa2efbbe382..75cbf4f62fe8 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -251,7 +251,7 @@ struct mdp_superblock_1 { | |||
251 | __le64 utime; /* 40 bits second, 24 btes microseconds */ | 251 | __le64 utime; /* 40 bits second, 24 btes microseconds */ |
252 | __le64 events; /* incremented when superblock updated */ | 252 | __le64 events; /* incremented when superblock updated */ |
253 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ | 253 | __le64 resync_offset; /* data before this offset (from data_offset) known to be in sync */ |
254 | __le32 sb_csum; /* checksum upto devs[max_dev] */ | 254 | __le32 sb_csum; /* checksum up to devs[max_dev] */ |
255 | __le32 max_dev; /* size of devs[] array to consider */ | 255 | __le32 max_dev; /* size of devs[] array to consider */ |
256 | __u8 pad3[64-32]; /* set to 0 when writing */ | 256 | __u8 pad3[64-32]; /* set to 0 when writing */ |
257 | 257 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index af5614856285..ff422d2b7f90 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -339,6 +339,12 @@ extern int rcu_my_thread_group_empty(void); | |||
339 | ((typeof(*p) __force __kernel *)(p)); \ | 339 | ((typeof(*p) __force __kernel *)(p)); \ |
340 | }) | 340 | }) |
341 | 341 | ||
342 | #define __rcu_access_index(p, space) \ | ||
343 | ({ \ | ||
344 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | ||
345 | rcu_dereference_sparse(p, space); \ | ||
346 | (_________p1); \ | ||
347 | }) | ||
342 | #define __rcu_dereference_index_check(p, c) \ | 348 | #define __rcu_dereference_index_check(p, c) \ |
343 | ({ \ | 349 | ({ \ |
344 | typeof(p) _________p1 = ACCESS_ONCE(p); \ | 350 | typeof(p) _________p1 = ACCESS_ONCE(p); \ |
@@ -429,6 +435,20 @@ extern int rcu_my_thread_group_empty(void); | |||
429 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ | 435 | #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ |
430 | 436 | ||
431 | /** | 437 | /** |
438 | * rcu_access_index() - fetch RCU index with no dereferencing | ||
439 | * @p: The index to read | ||
440 | * | ||
441 | * Return the value of the specified RCU-protected index, but omit the | ||
442 | * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful | ||
443 | * when the value of this index is accessed, but the index is not | ||
444 | * dereferenced, for example, when testing an RCU-protected index against | ||
445 | * -1. Although rcu_access_index() may also be used in cases where | ||
446 | * update-side locks prevent the value of the index from changing, you | ||
447 | * should instead use rcu_dereference_index_protected() for this use case. | ||
448 | */ | ||
449 | #define rcu_access_index(p) __rcu_access_index((p), __rcu) | ||
450 | |||
451 | /** | ||
432 | * rcu_dereference_index_check() - rcu_dereference for indices with debug checking | 452 | * rcu_dereference_index_check() - rcu_dereference for indices with debug checking |
433 | * @p: The pointer to read, prior to dereferencing | 453 | * @p: The pointer to read, prior to dereferencing |
434 | * @c: The conditions under which the dereference will take place | 454 | * @c: The conditions under which the dereference will take place |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 6a210f1511fc..76579f964a29 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * License Terms: GNU General Public License v2 | 4 | * License Terms: GNU General Public License v2 |
5 | * | 5 | * |
6 | * Author: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson | 6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson |
7 | * | 7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H | 10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H |
@@ -17,6 +17,7 @@ enum ab8500_regulator_id { | |||
17 | AB8500_LDO_AUX3, | 17 | AB8500_LDO_AUX3, |
18 | AB8500_LDO_INTCORE, | 18 | AB8500_LDO_INTCORE, |
19 | AB8500_LDO_TVOUT, | 19 | AB8500_LDO_TVOUT, |
20 | AB8500_LDO_USB, | ||
20 | AB8500_LDO_AUDIO, | 21 | AB8500_LDO_AUDIO, |
21 | AB8500_LDO_ANAMIC1, | 22 | AB8500_LDO_ANAMIC1, |
22 | AB8500_LDO_ANAMIC2, | 23 | AB8500_LDO_ANAMIC2, |
@@ -24,4 +25,50 @@ enum ab8500_regulator_id { | |||
24 | AB8500_LDO_ANA, | 25 | AB8500_LDO_ANA, |
25 | AB8500_NUM_REGULATORS, | 26 | AB8500_NUM_REGULATORS, |
26 | }; | 27 | }; |
28 | |||
29 | /* AB8500 register initialization */ | ||
30 | struct ab8500_regulator_reg_init { | ||
31 | int id; | ||
32 | u8 value; | ||
33 | }; | ||
34 | |||
35 | #define INIT_REGULATOR_REGISTER(_id, _value) \ | ||
36 | { \ | ||
37 | .id = _id, \ | ||
38 | .value = _value, \ | ||
39 | } | ||
40 | |||
41 | /* AB8500 registers */ | ||
42 | enum ab8500_regulator_reg { | ||
43 | AB8500_REGUREQUESTCTRL2, | ||
44 | AB8500_REGUREQUESTCTRL3, | ||
45 | AB8500_REGUREQUESTCTRL4, | ||
46 | AB8500_REGUSYSCLKREQ1HPVALID1, | ||
47 | AB8500_REGUSYSCLKREQ1HPVALID2, | ||
48 | AB8500_REGUHWHPREQ1VALID1, | ||
49 | AB8500_REGUHWHPREQ1VALID2, | ||
50 | AB8500_REGUHWHPREQ2VALID1, | ||
51 | AB8500_REGUHWHPREQ2VALID2, | ||
52 | AB8500_REGUSWHPREQVALID1, | ||
53 | AB8500_REGUSWHPREQVALID2, | ||
54 | AB8500_REGUSYSCLKREQVALID1, | ||
55 | AB8500_REGUSYSCLKREQVALID2, | ||
56 | AB8500_REGUMISC1, | ||
57 | AB8500_VAUDIOSUPPLY, | ||
58 | AB8500_REGUCTRL1VAMIC, | ||
59 | AB8500_VPLLVANAREGU, | ||
60 | AB8500_VREFDDR, | ||
61 | AB8500_EXTSUPPLYREGU, | ||
62 | AB8500_VAUX12REGU, | ||
63 | AB8500_VRF1VAUX3REGU, | ||
64 | AB8500_VAUX1SEL, | ||
65 | AB8500_VAUX2SEL, | ||
66 | AB8500_VRF1VAUX3SEL, | ||
67 | AB8500_REGUCTRL2SPARE, | ||
68 | AB8500_REGUCTRLDISCH, | ||
69 | AB8500_REGUCTRLDISCH2, | ||
70 | AB8500_VSMPS1SEL1, | ||
71 | AB8500_NUM_REGULATOR_REGISTERS, | ||
72 | }; | ||
73 | |||
27 | #endif | 74 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 7954f6bd7edb..9e87c1cb7270 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -153,6 +153,8 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector); | |||
153 | int regulator_is_supported_voltage(struct regulator *regulator, | 153 | int regulator_is_supported_voltage(struct regulator *regulator, |
154 | int min_uV, int max_uV); | 154 | int min_uV, int max_uV); |
155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); | 155 | int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); |
156 | int regulator_set_voltage_time(struct regulator *regulator, | ||
157 | int old_uV, int new_uV); | ||
156 | int regulator_get_voltage(struct regulator *regulator); | 158 | int regulator_get_voltage(struct regulator *regulator); |
157 | int regulator_sync_voltage(struct regulator *regulator); | 159 | int regulator_sync_voltage(struct regulator *regulator); |
158 | int regulator_set_current_limit(struct regulator *regulator, | 160 | int regulator_set_current_limit(struct regulator *regulator, |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index b8ed16a33c47..6c433b89c80d 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -63,7 +63,11 @@ enum regulator_status { | |||
63 | * when running with the specified parameters. | 63 | * when running with the specified parameters. |
64 | * | 64 | * |
65 | * @enable_time: Time taken for the regulator voltage output voltage to | 65 | * @enable_time: Time taken for the regulator voltage output voltage to |
66 | * stabalise after being enabled, in microseconds. | 66 | * stabilise after being enabled, in microseconds. |
67 | * @set_voltage_time_sel: Time taken for the regulator voltage output voltage | ||
68 | * to stabilise after being set to a new value, in microseconds. | ||
69 | * The function provides the from and to voltage selector, the | ||
70 | * function should return the worst case. | ||
67 | * | 71 | * |
68 | * @set_suspend_voltage: Set the voltage for the regulator when the system | 72 | * @set_suspend_voltage: Set the voltage for the regulator when the system |
69 | * is suspended. | 73 | * is suspended. |
@@ -103,8 +107,11 @@ struct regulator_ops { | |||
103 | int (*set_mode) (struct regulator_dev *, unsigned int mode); | 107 | int (*set_mode) (struct regulator_dev *, unsigned int mode); |
104 | unsigned int (*get_mode) (struct regulator_dev *); | 108 | unsigned int (*get_mode) (struct regulator_dev *); |
105 | 109 | ||
106 | /* Time taken to enable the regulator */ | 110 | /* Time taken to enable or set voltage on the regulator */ |
107 | int (*enable_time) (struct regulator_dev *); | 111 | int (*enable_time) (struct regulator_dev *); |
112 | int (*set_voltage_time_sel) (struct regulator_dev *, | ||
113 | unsigned int old_selector, | ||
114 | unsigned int new_selector); | ||
108 | 115 | ||
109 | /* report regulator status ... most other accessors report | 116 | /* report regulator status ... most other accessors report |
110 | * control inputs, this reports results of combining inputs | 117 | * control inputs, this reports results of combining inputs |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 761c745b9c24..c4c4fc45f856 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -186,6 +186,7 @@ struct regulator_init_data { | |||
186 | }; | 186 | }; |
187 | 187 | ||
188 | int regulator_suspend_prepare(suspend_state_t state); | 188 | int regulator_suspend_prepare(suspend_state_t state); |
189 | int regulator_suspend_finish(void); | ||
189 | 190 | ||
190 | #ifdef CONFIG_REGULATOR | 191 | #ifdef CONFIG_REGULATOR |
191 | void regulator_has_full_constraints(void); | 192 | void regulator_has_full_constraints(void); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c21072adbfad..eca75df00fed 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1124,15 +1124,18 @@ struct reiserfs_de_head { | |||
1124 | # define aligned_address(addr) ((void *)((long)(addr) & ~((1UL << ADDR_UNALIGNED_BITS) - 1))) | 1124 | # define aligned_address(addr) ((void *)((long)(addr) & ~((1UL << ADDR_UNALIGNED_BITS) - 1))) |
1125 | # define unaligned_offset(addr) (((int)((long)(addr) & ((1 << ADDR_UNALIGNED_BITS) - 1))) << 3) | 1125 | # define unaligned_offset(addr) (((int)((long)(addr) & ((1 << ADDR_UNALIGNED_BITS) - 1))) << 3) |
1126 | 1126 | ||
1127 | # define set_bit_unaligned(nr, addr) ext2_set_bit((nr) + unaligned_offset(addr), aligned_address(addr)) | 1127 | # define set_bit_unaligned(nr, addr) \ |
1128 | # define clear_bit_unaligned(nr, addr) ext2_clear_bit((nr) + unaligned_offset(addr), aligned_address(addr)) | 1128 | __test_and_set_bit_le((nr) + unaligned_offset(addr), aligned_address(addr)) |
1129 | # define test_bit_unaligned(nr, addr) ext2_test_bit((nr) + unaligned_offset(addr), aligned_address(addr)) | 1129 | # define clear_bit_unaligned(nr, addr) \ |
1130 | __test_and_clear_bit_le((nr) + unaligned_offset(addr), aligned_address(addr)) | ||
1131 | # define test_bit_unaligned(nr, addr) \ | ||
1132 | test_bit_le((nr) + unaligned_offset(addr), aligned_address(addr)) | ||
1130 | 1133 | ||
1131 | #else | 1134 | #else |
1132 | 1135 | ||
1133 | # define set_bit_unaligned(nr, addr) ext2_set_bit(nr, addr) | 1136 | # define set_bit_unaligned(nr, addr) __test_and_set_bit_le(nr, addr) |
1134 | # define clear_bit_unaligned(nr, addr) ext2_clear_bit(nr, addr) | 1137 | # define clear_bit_unaligned(nr, addr) __test_and_clear_bit_le(nr, addr) |
1135 | # define test_bit_unaligned(nr, addr) ext2_test_bit(nr, addr) | 1138 | # define test_bit_unaligned(nr, addr) test_bit_le(nr, addr) |
1136 | 1139 | ||
1137 | #endif | 1140 | #endif |
1138 | 1141 | ||
@@ -1554,7 +1557,7 @@ struct tree_balance { | |||
1554 | /* When inserting an item. */ | 1557 | /* When inserting an item. */ |
1555 | #define M_INSERT 'i' | 1558 | #define M_INSERT 'i' |
1556 | /* When inserting into (directories only) or appending onto an already | 1559 | /* When inserting into (directories only) or appending onto an already |
1557 | existant item. */ | 1560 | existent item. */ |
1558 | #define M_PASTE 'p' | 1561 | #define M_PASTE 'p' |
1559 | /* When deleting an item. */ | 1562 | /* When deleting an item. */ |
1560 | #define M_DELETE 'd' | 1563 | #define M_DELETE 'd' |
@@ -2329,14 +2332,10 @@ __u32 keyed_hash(const signed char *msg, int len); | |||
2329 | __u32 yura_hash(const signed char *msg, int len); | 2332 | __u32 yura_hash(const signed char *msg, int len); |
2330 | __u32 r5_hash(const signed char *msg, int len); | 2333 | __u32 r5_hash(const signed char *msg, int len); |
2331 | 2334 | ||
2332 | /* the ext2 bit routines adjust for big or little endian as | 2335 | #define reiserfs_test_and_set_le_bit __test_and_set_bit_le |
2333 | ** appropriate for the arch, so in our laziness we use them rather | 2336 | #define reiserfs_test_and_clear_le_bit __test_and_clear_bit_le |
2334 | ** than using the bit routines they call more directly. These | 2337 | #define reiserfs_test_le_bit test_bit_le |
2335 | ** routines must be used when changing on disk bitmaps. */ | 2338 | #define reiserfs_find_next_zero_le_bit find_next_zero_bit_le |
2336 | #define reiserfs_test_and_set_le_bit ext2_set_bit | ||
2337 | #define reiserfs_test_and_clear_le_bit ext2_clear_bit | ||
2338 | #define reiserfs_test_le_bit ext2_test_bit | ||
2339 | #define reiserfs_find_next_zero_le_bit ext2_find_next_zero_bit | ||
2340 | 2339 | ||
2341 | /* sometimes reiserfs_truncate may require to allocate few new blocks | 2340 | /* sometimes reiserfs_truncate may require to allocate few new blocks |
2342 | to perform indirect2direct conversion. People probably used to | 2341 | to perform indirect2direct conversion. People probably used to |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index a5930cb66145..c9d625ca659e 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -129,20 +129,22 @@ int __must_check res_counter_charge(struct res_counter *counter, | |||
129 | void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val); | 129 | void res_counter_uncharge_locked(struct res_counter *counter, unsigned long val); |
130 | void res_counter_uncharge(struct res_counter *counter, unsigned long val); | 130 | void res_counter_uncharge(struct res_counter *counter, unsigned long val); |
131 | 131 | ||
132 | static inline bool res_counter_limit_check_locked(struct res_counter *cnt) | 132 | /** |
133 | { | 133 | * res_counter_margin - calculate chargeable space of a counter |
134 | if (cnt->usage < cnt->limit) | 134 | * @cnt: the counter |
135 | return true; | 135 | * |
136 | 136 | * Returns the difference between the hard limit and the current usage | |
137 | return false; | 137 | * of resource counter @cnt. |
138 | } | 138 | */ |
139 | 139 | static inline unsigned long long res_counter_margin(struct res_counter *cnt) | |
140 | static inline bool res_counter_soft_limit_check_locked(struct res_counter *cnt) | ||
141 | { | 140 | { |
142 | if (cnt->usage < cnt->soft_limit) | 141 | unsigned long long margin; |
143 | return true; | 142 | unsigned long flags; |
144 | 143 | ||
145 | return false; | 144 | spin_lock_irqsave(&cnt->lock, flags); |
145 | margin = cnt->limit - cnt->usage; | ||
146 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
147 | return margin; | ||
146 | } | 148 | } |
147 | 149 | ||
148 | /** | 150 | /** |
@@ -167,52 +169,6 @@ res_counter_soft_limit_excess(struct res_counter *cnt) | |||
167 | return excess; | 169 | return excess; |
168 | } | 170 | } |
169 | 171 | ||
170 | /* | ||
171 | * Helper function to detect if the cgroup is within it's limit or | ||
172 | * not. It's currently called from cgroup_rss_prepare() | ||
173 | */ | ||
174 | static inline bool res_counter_check_under_limit(struct res_counter *cnt) | ||
175 | { | ||
176 | bool ret; | ||
177 | unsigned long flags; | ||
178 | |||
179 | spin_lock_irqsave(&cnt->lock, flags); | ||
180 | ret = res_counter_limit_check_locked(cnt); | ||
181 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
182 | return ret; | ||
183 | } | ||
184 | |||
185 | /** | ||
186 | * res_counter_check_margin - check if the counter allows charging | ||
187 | * @cnt: the resource counter to check | ||
188 | * @bytes: the number of bytes to check the remaining space against | ||
189 | * | ||
190 | * Returns a boolean value on whether the counter can be charged | ||
191 | * @bytes or whether this would exceed the limit. | ||
192 | */ | ||
193 | static inline bool res_counter_check_margin(struct res_counter *cnt, | ||
194 | unsigned long bytes) | ||
195 | { | ||
196 | bool ret; | ||
197 | unsigned long flags; | ||
198 | |||
199 | spin_lock_irqsave(&cnt->lock, flags); | ||
200 | ret = cnt->limit - cnt->usage >= bytes; | ||
201 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
202 | return ret; | ||
203 | } | ||
204 | |||
205 | static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) | ||
206 | { | ||
207 | bool ret; | ||
208 | unsigned long flags; | ||
209 | |||
210 | spin_lock_irqsave(&cnt->lock, flags); | ||
211 | ret = res_counter_soft_limit_check_locked(cnt); | ||
212 | spin_unlock_irqrestore(&cnt->lock, flags); | ||
213 | return ret; | ||
214 | } | ||
215 | |||
216 | static inline void res_counter_reset_max(struct res_counter *cnt) | 172 | static inline void res_counter_reset_max(struct res_counter *cnt) |
217 | { | 173 | { |
218 | unsigned long flags; | 174 | unsigned long flags; |
diff --git a/include/linux/rio.h b/include/linux/rio.h index ff681ebba585..4d50611112ba 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -24,6 +24,7 @@ | |||
24 | #define RIO_NO_HOPCOUNT -1 | 24 | #define RIO_NO_HOPCOUNT -1 |
25 | #define RIO_INVALID_DESTID 0xffff | 25 | #define RIO_INVALID_DESTID 0xffff |
26 | 26 | ||
27 | #define RIO_MAX_MPORTS 8 | ||
27 | #define RIO_MAX_MPORT_RESOURCES 16 | 28 | #define RIO_MAX_MPORT_RESOURCES 16 |
28 | #define RIO_MAX_DEV_RESOURCES 16 | 29 | #define RIO_MAX_DEV_RESOURCES 16 |
29 | 30 | ||
@@ -241,7 +242,7 @@ struct rio_mport { | |||
241 | struct rio_msg inb_msg[RIO_MAX_MBOX]; | 242 | struct rio_msg inb_msg[RIO_MAX_MBOX]; |
242 | struct rio_msg outb_msg[RIO_MAX_MBOX]; | 243 | struct rio_msg outb_msg[RIO_MAX_MBOX]; |
243 | int host_deviceid; /* Host device ID */ | 244 | int host_deviceid; /* Host device ID */ |
244 | struct rio_ops *ops; /* maintenance transaction functions */ | 245 | struct rio_ops *ops; /* low-level architecture-dependent routines */ |
245 | unsigned char id; /* port ID, unique among all ports */ | 246 | unsigned char id; /* port ID, unique among all ports */ |
246 | unsigned char index; /* port index, unique among all port | 247 | unsigned char index; /* port index, unique among all port |
247 | interfaces of the same type */ | 248 | interfaces of the same type */ |
@@ -285,6 +286,13 @@ struct rio_net { | |||
285 | * @cwrite: Callback to perform network write of config space. | 286 | * @cwrite: Callback to perform network write of config space. |
286 | * @dsend: Callback to send a doorbell message. | 287 | * @dsend: Callback to send a doorbell message. |
287 | * @pwenable: Callback to enable/disable port-write message handling. | 288 | * @pwenable: Callback to enable/disable port-write message handling. |
289 | * @open_outb_mbox: Callback to initialize outbound mailbox. | ||
290 | * @close_outb_mbox: Callback to shut down outbound mailbox. | ||
291 | * @open_inb_mbox: Callback to initialize inbound mailbox. | ||
292 | * @close_inb_mbox: Callback to shut down inbound mailbox. | ||
293 | * @add_outb_message: Callback to add a message to an outbound mailbox queue. | ||
294 | * @add_inb_buffer: Callback to add a buffer to an inbound mailbox queue. | ||
295 | * @get_inb_message: Callback to get a message from an inbound mailbox queue. | ||
288 | */ | 296 | */ |
289 | struct rio_ops { | 297 | struct rio_ops { |
290 | int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len, | 298 | int (*lcread) (struct rio_mport *mport, int index, u32 offset, int len, |
@@ -297,6 +305,16 @@ struct rio_ops { | |||
297 | u8 hopcount, u32 offset, int len, u32 data); | 305 | u8 hopcount, u32 offset, int len, u32 data); |
298 | int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data); | 306 | int (*dsend) (struct rio_mport *mport, int index, u16 destid, u16 data); |
299 | int (*pwenable) (struct rio_mport *mport, int enable); | 307 | int (*pwenable) (struct rio_mport *mport, int enable); |
308 | int (*open_outb_mbox)(struct rio_mport *mport, void *dev_id, | ||
309 | int mbox, int entries); | ||
310 | void (*close_outb_mbox)(struct rio_mport *mport, int mbox); | ||
311 | int (*open_inb_mbox)(struct rio_mport *mport, void *dev_id, | ||
312 | int mbox, int entries); | ||
313 | void (*close_inb_mbox)(struct rio_mport *mport, int mbox); | ||
314 | int (*add_outb_message)(struct rio_mport *mport, struct rio_dev *rdev, | ||
315 | int mbox, void *buffer, size_t len); | ||
316 | int (*add_inb_buffer)(struct rio_mport *mport, int mbox, void *buf); | ||
317 | void *(*get_inb_message)(struct rio_mport *mport, int mbox); | ||
300 | }; | 318 | }; |
301 | 319 | ||
302 | #define RIO_RESOURCE_MEM 0x00000100 | 320 | #define RIO_RESOURCE_MEM 0x00000100 |
@@ -378,12 +396,7 @@ union rio_pw_msg { | |||
378 | }; | 396 | }; |
379 | 397 | ||
380 | /* Architecture and hardware-specific functions */ | 398 | /* Architecture and hardware-specific functions */ |
381 | extern int rio_init_mports(void); | 399 | extern int rio_register_mport(struct rio_mport *); |
382 | extern void rio_register_mport(struct rio_mport *); | ||
383 | extern int rio_hw_add_outb_message(struct rio_mport *, struct rio_dev *, int, | ||
384 | void *, size_t); | ||
385 | extern int rio_hw_add_inb_buffer(struct rio_mport *, int, void *); | ||
386 | extern void *rio_hw_get_inb_message(struct rio_mport *, int); | ||
387 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); | 400 | extern int rio_open_inb_mbox(struct rio_mport *, void *, int, int); |
388 | extern void rio_close_inb_mbox(struct rio_mport *, int); | 401 | extern void rio_close_inb_mbox(struct rio_mport *, int); |
389 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); | 402 | extern int rio_open_outb_mbox(struct rio_mport *, void *, int, int); |
diff --git a/include/linux/rio_drv.h b/include/linux/rio_drv.h index e09e565c4bce..229b3ca23134 100644 --- a/include/linux/rio_drv.h +++ b/include/linux/rio_drv.h | |||
@@ -317,7 +317,8 @@ static inline int rio_add_outb_message(struct rio_mport *mport, | |||
317 | struct rio_dev *rdev, int mbox, | 317 | struct rio_dev *rdev, int mbox, |
318 | void *buffer, size_t len) | 318 | void *buffer, size_t len) |
319 | { | 319 | { |
320 | return rio_hw_add_outb_message(mport, rdev, mbox, buffer, len); | 320 | return mport->ops->add_outb_message(mport, rdev, mbox, |
321 | buffer, len); | ||
321 | } | 322 | } |
322 | 323 | ||
323 | extern int rio_request_inb_mbox(struct rio_mport *, void *, int, int, | 324 | extern int rio_request_inb_mbox(struct rio_mport *, void *, int, int, |
@@ -336,7 +337,7 @@ extern int rio_release_inb_mbox(struct rio_mport *, int); | |||
336 | static inline int rio_add_inb_buffer(struct rio_mport *mport, int mbox, | 337 | static inline int rio_add_inb_buffer(struct rio_mport *mport, int mbox, |
337 | void *buffer) | 338 | void *buffer) |
338 | { | 339 | { |
339 | return rio_hw_add_inb_buffer(mport, mbox, buffer); | 340 | return mport->ops->add_inb_buffer(mport, mbox, buffer); |
340 | } | 341 | } |
341 | 342 | ||
342 | /** | 343 | /** |
@@ -348,7 +349,7 @@ static inline int rio_add_inb_buffer(struct rio_mport *mport, int mbox, | |||
348 | */ | 349 | */ |
349 | static inline void *rio_get_inb_message(struct rio_mport *mport, int mbox) | 350 | static inline void *rio_get_inb_message(struct rio_mport *mport, int mbox) |
350 | { | 351 | { |
351 | return rio_hw_get_inb_message(mport, mbox); | 352 | return mport->ops->get_inb_message(mport, mbox); |
352 | } | 353 | } |
353 | 354 | ||
354 | /* Doorbell management */ | 355 | /* Doorbell management */ |
diff --git a/include/linux/rio_ids.h b/include/linux/rio_ids.h index 7410d3365e2a..0cee0152aca9 100644 --- a/include/linux/rio_ids.h +++ b/include/linux/rio_ids.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #define RIO_DID_IDTCPS6Q 0x035f | 35 | #define RIO_DID_IDTCPS6Q 0x035f |
36 | #define RIO_DID_IDTCPS10Q 0x035e | 36 | #define RIO_DID_IDTCPS10Q 0x035e |
37 | #define RIO_DID_IDTCPS1848 0x0374 | 37 | #define RIO_DID_IDTCPS1848 0x0374 |
38 | #define RIO_DID_IDTCPS1432 0x0375 | ||
38 | #define RIO_DID_IDTCPS1616 0x0379 | 39 | #define RIO_DID_IDTCPS1616 0x0379 |
39 | #define RIO_DID_IDTVPS1616 0x0377 | 40 | #define RIO_DID_IDTVPS1616 0x0377 |
40 | #define RIO_DID_IDTSPS1616 0x0378 | 41 | #define RIO_DID_IDTSPS1616 0x0378 |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index e9fd04ca1e51..830e65dc01ee 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -27,18 +27,15 @@ | |||
27 | struct anon_vma { | 27 | struct anon_vma { |
28 | struct anon_vma *root; /* Root of this anon_vma tree */ | 28 | struct anon_vma *root; /* Root of this anon_vma tree */ |
29 | spinlock_t lock; /* Serialize access to vma list */ | 29 | spinlock_t lock; /* Serialize access to vma list */ |
30 | #if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION) | ||
31 | |||
32 | /* | 30 | /* |
33 | * The external_refcount is taken by either KSM or page migration | 31 | * The refcount is taken on an anon_vma when there is no |
34 | * to take a reference to an anon_vma when there is no | ||
35 | * guarantee that the vma of page tables will exist for | 32 | * guarantee that the vma of page tables will exist for |
36 | * the duration of the operation. A caller that takes | 33 | * the duration of the operation. A caller that takes |
37 | * the reference is responsible for clearing up the | 34 | * the reference is responsible for clearing up the |
38 | * anon_vma if they are the last user on release | 35 | * anon_vma if they are the last user on release |
39 | */ | 36 | */ |
40 | atomic_t external_refcount; | 37 | atomic_t refcount; |
41 | #endif | 38 | |
42 | /* | 39 | /* |
43 | * NOTE: the LSB of the head.next is set by | 40 | * NOTE: the LSB of the head.next is set by |
44 | * mm_take_all_locks() _after_ taking the above lock. So the | 41 | * mm_take_all_locks() _after_ taking the above lock. So the |
@@ -71,42 +68,19 @@ struct anon_vma_chain { | |||
71 | }; | 68 | }; |
72 | 69 | ||
73 | #ifdef CONFIG_MMU | 70 | #ifdef CONFIG_MMU |
74 | #if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION) | ||
75 | static inline void anonvma_external_refcount_init(struct anon_vma *anon_vma) | ||
76 | { | ||
77 | atomic_set(&anon_vma->external_refcount, 0); | ||
78 | } | ||
79 | |||
80 | static inline int anonvma_external_refcount(struct anon_vma *anon_vma) | ||
81 | { | ||
82 | return atomic_read(&anon_vma->external_refcount); | ||
83 | } | ||
84 | |||
85 | static inline void get_anon_vma(struct anon_vma *anon_vma) | 71 | static inline void get_anon_vma(struct anon_vma *anon_vma) |
86 | { | 72 | { |
87 | atomic_inc(&anon_vma->external_refcount); | 73 | atomic_inc(&anon_vma->refcount); |
88 | } | 74 | } |
89 | 75 | ||
90 | void drop_anon_vma(struct anon_vma *); | 76 | void __put_anon_vma(struct anon_vma *anon_vma); |
91 | #else | ||
92 | static inline void anonvma_external_refcount_init(struct anon_vma *anon_vma) | ||
93 | { | ||
94 | } | ||
95 | 77 | ||
96 | static inline int anonvma_external_refcount(struct anon_vma *anon_vma) | 78 | static inline void put_anon_vma(struct anon_vma *anon_vma) |
97 | { | ||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | static inline void get_anon_vma(struct anon_vma *anon_vma) | ||
102 | { | 79 | { |
80 | if (atomic_dec_and_test(&anon_vma->refcount)) | ||
81 | __put_anon_vma(anon_vma); | ||
103 | } | 82 | } |
104 | 83 | ||
105 | static inline void drop_anon_vma(struct anon_vma *anon_vma) | ||
106 | { | ||
107 | } | ||
108 | #endif /* CONFIG_KSM */ | ||
109 | |||
110 | static inline struct anon_vma *page_anon_vma(struct page *page) | 84 | static inline struct anon_vma *page_anon_vma(struct page *page) |
111 | { | 85 | { |
112 | if (((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) != | 86 | if (((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) != |
@@ -148,7 +122,6 @@ void unlink_anon_vmas(struct vm_area_struct *); | |||
148 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); | 122 | int anon_vma_clone(struct vm_area_struct *, struct vm_area_struct *); |
149 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); | 123 | int anon_vma_fork(struct vm_area_struct *, struct vm_area_struct *); |
150 | void __anon_vma_link(struct vm_area_struct *); | 124 | void __anon_vma_link(struct vm_area_struct *); |
151 | void anon_vma_free(struct anon_vma *); | ||
152 | 125 | ||
153 | static inline void anon_vma_merge(struct vm_area_struct *vma, | 126 | static inline void anon_vma_merge(struct vm_area_struct *vma, |
154 | struct vm_area_struct *next) | 127 | struct vm_area_struct *next) |
@@ -157,6 +130,8 @@ static inline void anon_vma_merge(struct vm_area_struct *vma, | |||
157 | unlink_anon_vmas(next); | 130 | unlink_anon_vmas(next); |
158 | } | 131 | } |
159 | 132 | ||
133 | struct anon_vma *page_get_anon_vma(struct page *page); | ||
134 | |||
160 | /* | 135 | /* |
161 | * rmap interfaces called when adding or removing pte of page | 136 | * rmap interfaces called when adding or removing pte of page |
162 | */ | 137 | */ |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 2ca7e8a78060..877ece45426f 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -228,6 +228,8 @@ extern int rtc_read_alarm(struct rtc_device *rtc, | |||
228 | struct rtc_wkalrm *alrm); | 228 | struct rtc_wkalrm *alrm); |
229 | extern int rtc_set_alarm(struct rtc_device *rtc, | 229 | extern int rtc_set_alarm(struct rtc_device *rtc, |
230 | struct rtc_wkalrm *alrm); | 230 | struct rtc_wkalrm *alrm); |
231 | extern int rtc_initialize_alarm(struct rtc_device *rtc, | ||
232 | struct rtc_wkalrm *alrm); | ||
231 | extern void rtc_update_irq(struct rtc_device *rtc, | 233 | extern void rtc_update_irq(struct rtc_device *rtc, |
232 | unsigned long num, unsigned long events); | 234 | unsigned long num, unsigned long events); |
233 | 235 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index c15936fe998b..18d63cea2848 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -99,6 +99,7 @@ struct robust_list_head; | |||
99 | struct bio_list; | 99 | struct bio_list; |
100 | struct fs_struct; | 100 | struct fs_struct; |
101 | struct perf_event_context; | 101 | struct perf_event_context; |
102 | struct blk_plug; | ||
102 | 103 | ||
103 | /* | 104 | /* |
104 | * List of flags we want to share for kernel threads, | 105 | * List of flags we want to share for kernel threads, |
@@ -516,7 +517,7 @@ struct thread_group_cputimer { | |||
516 | struct autogroup; | 517 | struct autogroup; |
517 | 518 | ||
518 | /* | 519 | /* |
519 | * NOTE! "signal_struct" does not have it's own | 520 | * NOTE! "signal_struct" does not have its own |
520 | * locking, because a shared signal_struct always | 521 | * locking, because a shared signal_struct always |
521 | * implies a shared sighand_struct, so locking | 522 | * implies a shared sighand_struct, so locking |
522 | * sighand_struct is always a proper superset of | 523 | * sighand_struct is always a proper superset of |
@@ -853,7 +854,7 @@ extern int __weak arch_sd_sibiling_asym_packing(void); | |||
853 | 854 | ||
854 | /* | 855 | /* |
855 | * Optimise SD flags for power savings: | 856 | * Optimise SD flags for power savings: |
856 | * SD_BALANCE_NEWIDLE helps agressive task consolidation and power savings. | 857 | * SD_BALANCE_NEWIDLE helps aggressive task consolidation and power savings. |
857 | * Keep default SD flags if sched_{smt,mc}_power_saving=0 | 858 | * Keep default SD flags if sched_{smt,mc}_power_saving=0 |
858 | */ | 859 | */ |
859 | 860 | ||
@@ -1253,6 +1254,9 @@ struct task_struct { | |||
1253 | #endif | 1254 | #endif |
1254 | 1255 | ||
1255 | struct mm_struct *mm, *active_mm; | 1256 | struct mm_struct *mm, *active_mm; |
1257 | #ifdef CONFIG_COMPAT_BRK | ||
1258 | unsigned brk_randomized:1; | ||
1259 | #endif | ||
1256 | #if defined(SPLIT_RSS_COUNTING) | 1260 | #if defined(SPLIT_RSS_COUNTING) |
1257 | struct task_rss_stat rss_stat; | 1261 | struct task_rss_stat rss_stat; |
1258 | #endif | 1262 | #endif |
@@ -1428,6 +1432,11 @@ struct task_struct { | |||
1428 | /* stacked block device info */ | 1432 | /* stacked block device info */ |
1429 | struct bio_list *bio_list; | 1433 | struct bio_list *bio_list; |
1430 | 1434 | ||
1435 | #ifdef CONFIG_BLOCK | ||
1436 | /* stack plugging */ | ||
1437 | struct blk_plug *plug; | ||
1438 | #endif | ||
1439 | |||
1431 | /* VM state */ | 1440 | /* VM state */ |
1432 | struct reclaim_state *reclaim_state; | 1441 | struct reclaim_state *reclaim_state; |
1433 | 1442 | ||
@@ -1471,6 +1480,7 @@ struct task_struct { | |||
1471 | #ifdef CONFIG_NUMA | 1480 | #ifdef CONFIG_NUMA |
1472 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ | 1481 | struct mempolicy *mempolicy; /* Protected by alloc_lock */ |
1473 | short il_next; | 1482 | short il_next; |
1483 | short pref_node_fork; | ||
1474 | #endif | 1484 | #endif |
1475 | atomic_t fs_excl; /* holding fs exclusive resources */ | 1485 | atomic_t fs_excl; /* holding fs exclusive resources */ |
1476 | struct rcu_head rcu; | 1486 | struct rcu_head rcu; |
@@ -1523,8 +1533,8 @@ struct task_struct { | |||
1523 | struct memcg_batch_info { | 1533 | struct memcg_batch_info { |
1524 | int do_batch; /* incremented when batch uncharge started */ | 1534 | int do_batch; /* incremented when batch uncharge started */ |
1525 | struct mem_cgroup *memcg; /* target memcg of uncharge */ | 1535 | struct mem_cgroup *memcg; /* target memcg of uncharge */ |
1526 | unsigned long bytes; /* uncharged usage */ | 1536 | unsigned long nr_pages; /* uncharged usage */ |
1527 | unsigned long memsw_bytes; /* uncharged mem+swap usage */ | 1537 | unsigned long memsw_nr_pages; /* uncharged mem+swap usage */ |
1528 | } memcg_batch; | 1538 | } memcg_batch; |
1529 | #endif | 1539 | #endif |
1530 | }; | 1540 | }; |
diff --git a/include/linux/security.h b/include/linux/security.h index 56cac520d014..8ce59ef3e5af 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -47,13 +47,14 @@ | |||
47 | 47 | ||
48 | struct ctl_table; | 48 | struct ctl_table; |
49 | struct audit_krule; | 49 | struct audit_krule; |
50 | struct user_namespace; | ||
50 | 51 | ||
51 | /* | 52 | /* |
52 | * These functions are in security/capability.c and are used | 53 | * These functions are in security/capability.c and are used |
53 | * as the default capabilities functions | 54 | * as the default capabilities functions |
54 | */ | 55 | */ |
55 | extern int cap_capable(struct task_struct *tsk, const struct cred *cred, | 56 | extern int cap_capable(struct task_struct *tsk, const struct cred *cred, |
56 | int cap, int audit); | 57 | struct user_namespace *ns, int cap, int audit); |
57 | extern int cap_settime(const struct timespec *ts, const struct timezone *tz); | 58 | extern int cap_settime(const struct timespec *ts, const struct timezone *tz); |
58 | extern int cap_ptrace_access_check(struct task_struct *child, unsigned int mode); | 59 | extern int cap_ptrace_access_check(struct task_struct *child, unsigned int mode); |
59 | extern int cap_ptrace_traceme(struct task_struct *parent); | 60 | extern int cap_ptrace_traceme(struct task_struct *parent); |
@@ -1262,6 +1263,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1262 | * credentials. | 1263 | * credentials. |
1263 | * @tsk contains the task_struct for the process. | 1264 | * @tsk contains the task_struct for the process. |
1264 | * @cred contains the credentials to use. | 1265 | * @cred contains the credentials to use. |
1266 | * @ns contains the user namespace we want the capability in | ||
1265 | * @cap contains the capability <include/linux/capability.h>. | 1267 | * @cap contains the capability <include/linux/capability.h>. |
1266 | * @audit: Whether to write an audit message or not | 1268 | * @audit: Whether to write an audit message or not |
1267 | * Return 0 if the capability is granted for @tsk. | 1269 | * Return 0 if the capability is granted for @tsk. |
@@ -1384,7 +1386,7 @@ struct security_operations { | |||
1384 | const kernel_cap_t *inheritable, | 1386 | const kernel_cap_t *inheritable, |
1385 | const kernel_cap_t *permitted); | 1387 | const kernel_cap_t *permitted); |
1386 | int (*capable) (struct task_struct *tsk, const struct cred *cred, | 1388 | int (*capable) (struct task_struct *tsk, const struct cred *cred, |
1387 | int cap, int audit); | 1389 | struct user_namespace *ns, int cap, int audit); |
1388 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1390 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
1389 | int (*quota_on) (struct dentry *dentry); | 1391 | int (*quota_on) (struct dentry *dentry); |
1390 | int (*syslog) (int type); | 1392 | int (*syslog) (int type); |
@@ -1454,7 +1456,7 @@ struct security_operations { | |||
1454 | struct inode *new_dir, struct dentry *new_dentry); | 1456 | struct inode *new_dir, struct dentry *new_dentry); |
1455 | int (*inode_readlink) (struct dentry *dentry); | 1457 | int (*inode_readlink) (struct dentry *dentry); |
1456 | int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); | 1458 | int (*inode_follow_link) (struct dentry *dentry, struct nameidata *nd); |
1457 | int (*inode_permission) (struct inode *inode, int mask); | 1459 | int (*inode_permission) (struct inode *inode, int mask, unsigned flags); |
1458 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); | 1460 | int (*inode_setattr) (struct dentry *dentry, struct iattr *attr); |
1459 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); | 1461 | int (*inode_getattr) (struct vfsmount *mnt, struct dentry *dentry); |
1460 | int (*inode_setxattr) (struct dentry *dentry, const char *name, | 1462 | int (*inode_setxattr) (struct dentry *dentry, const char *name, |
@@ -1665,9 +1667,12 @@ int security_capset(struct cred *new, const struct cred *old, | |||
1665 | const kernel_cap_t *effective, | 1667 | const kernel_cap_t *effective, |
1666 | const kernel_cap_t *inheritable, | 1668 | const kernel_cap_t *inheritable, |
1667 | const kernel_cap_t *permitted); | 1669 | const kernel_cap_t *permitted); |
1668 | int security_capable(const struct cred *cred, int cap); | 1670 | int security_capable(struct user_namespace *ns, const struct cred *cred, |
1669 | int security_real_capable(struct task_struct *tsk, int cap); | 1671 | int cap); |
1670 | int security_real_capable_noaudit(struct task_struct *tsk, int cap); | 1672 | int security_real_capable(struct task_struct *tsk, struct user_namespace *ns, |
1673 | int cap); | ||
1674 | int security_real_capable_noaudit(struct task_struct *tsk, | ||
1675 | struct user_namespace *ns, int cap); | ||
1671 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1676 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
1672 | int security_quota_on(struct dentry *dentry); | 1677 | int security_quota_on(struct dentry *dentry); |
1673 | int security_syslog(int type); | 1678 | int security_syslog(int type); |
@@ -1860,28 +1865,29 @@ static inline int security_capset(struct cred *new, | |||
1860 | return cap_capset(new, old, effective, inheritable, permitted); | 1865 | return cap_capset(new, old, effective, inheritable, permitted); |
1861 | } | 1866 | } |
1862 | 1867 | ||
1863 | static inline int security_capable(const struct cred *cred, int cap) | 1868 | static inline int security_capable(struct user_namespace *ns, |
1869 | const struct cred *cred, int cap) | ||
1864 | { | 1870 | { |
1865 | return cap_capable(current, cred, cap, SECURITY_CAP_AUDIT); | 1871 | return cap_capable(current, cred, ns, cap, SECURITY_CAP_AUDIT); |
1866 | } | 1872 | } |
1867 | 1873 | ||
1868 | static inline int security_real_capable(struct task_struct *tsk, int cap) | 1874 | static inline int security_real_capable(struct task_struct *tsk, struct user_namespace *ns, int cap) |
1869 | { | 1875 | { |
1870 | int ret; | 1876 | int ret; |
1871 | 1877 | ||
1872 | rcu_read_lock(); | 1878 | rcu_read_lock(); |
1873 | ret = cap_capable(tsk, __task_cred(tsk), cap, SECURITY_CAP_AUDIT); | 1879 | ret = cap_capable(tsk, __task_cred(tsk), ns, cap, SECURITY_CAP_AUDIT); |
1874 | rcu_read_unlock(); | 1880 | rcu_read_unlock(); |
1875 | return ret; | 1881 | return ret; |
1876 | } | 1882 | } |
1877 | 1883 | ||
1878 | static inline | 1884 | static inline |
1879 | int security_real_capable_noaudit(struct task_struct *tsk, int cap) | 1885 | int security_real_capable_noaudit(struct task_struct *tsk, struct user_namespace *ns, int cap) |
1880 | { | 1886 | { |
1881 | int ret; | 1887 | int ret; |
1882 | 1888 | ||
1883 | rcu_read_lock(); | 1889 | rcu_read_lock(); |
1884 | ret = cap_capable(tsk, __task_cred(tsk), cap, | 1890 | ret = cap_capable(tsk, __task_cred(tsk), ns, cap, |
1885 | SECURITY_CAP_NOAUDIT); | 1891 | SECURITY_CAP_NOAUDIT); |
1886 | rcu_read_unlock(); | 1892 | rcu_read_unlock(); |
1887 | return ret; | 1893 | return ret; |
diff --git a/include/linux/sigma.h b/include/linux/sigma.h new file mode 100644 index 000000000000..e2accb3164d8 --- /dev/null +++ b/include/linux/sigma.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * Load firmware files from Analog Devices SigmaStudio | ||
3 | * | ||
4 | * Copyright 2009-2011 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __SIGMA_FIRMWARE_H__ | ||
10 | #define __SIGMA_FIRMWARE_H__ | ||
11 | |||
12 | #include <linux/firmware.h> | ||
13 | #include <linux/types.h> | ||
14 | |||
15 | struct i2c_client; | ||
16 | |||
17 | #define SIGMA_MAGIC "ADISIGM" | ||
18 | |||
19 | struct sigma_firmware { | ||
20 | const struct firmware *fw; | ||
21 | size_t pos; | ||
22 | }; | ||
23 | |||
24 | struct sigma_firmware_header { | ||
25 | unsigned char magic[7]; | ||
26 | u8 version; | ||
27 | u32 crc; | ||
28 | }; | ||
29 | |||
30 | enum { | ||
31 | SIGMA_ACTION_WRITEXBYTES = 0, | ||
32 | SIGMA_ACTION_WRITESINGLE, | ||
33 | SIGMA_ACTION_WRITESAFELOAD, | ||
34 | SIGMA_ACTION_DELAY, | ||
35 | SIGMA_ACTION_PLLWAIT, | ||
36 | SIGMA_ACTION_NOOP, | ||
37 | SIGMA_ACTION_END, | ||
38 | }; | ||
39 | |||
40 | struct sigma_action { | ||
41 | u8 instr; | ||
42 | u8 len_hi; | ||
43 | u16 len; | ||
44 | u16 addr; | ||
45 | unsigned char payload[]; | ||
46 | }; | ||
47 | |||
48 | static inline u32 sigma_action_len(struct sigma_action *sa) | ||
49 | { | ||
50 | return (sa->len_hi << 16) | sa->len; | ||
51 | } | ||
52 | |||
53 | static inline size_t sigma_action_size(struct sigma_action *sa, u32 payload_len) | ||
54 | { | ||
55 | return sizeof(*sa) + payload_len + (payload_len % 2); | ||
56 | } | ||
57 | |||
58 | extern int process_sigma_firmware(struct i2c_client *client, const char *name); | ||
59 | |||
60 | #endif | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 24cfa626931e..d0ae90af0b40 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -122,8 +122,14 @@ struct sk_buff_head { | |||
122 | 122 | ||
123 | struct sk_buff; | 123 | struct sk_buff; |
124 | 124 | ||
125 | /* To allow 64K frame to be packed as single skb without frag_list */ | 125 | /* To allow 64K frame to be packed as single skb without frag_list. Since |
126 | * GRO uses frags we allocate at least 16 regardless of page size. | ||
127 | */ | ||
128 | #if (65536/PAGE_SIZE + 2) < 16 | ||
129 | #define MAX_SKB_FRAGS 16UL | ||
130 | #else | ||
126 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) | 131 | #define MAX_SKB_FRAGS (65536/PAGE_SIZE + 2) |
132 | #endif | ||
127 | 133 | ||
128 | typedef struct skb_frag_struct skb_frag_t; | 134 | typedef struct skb_frag_struct skb_frag_t; |
129 | 135 | ||
@@ -468,7 +474,7 @@ static inline void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst) | |||
468 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); | 474 | extern void skb_dst_set_noref(struct sk_buff *skb, struct dst_entry *dst); |
469 | 475 | ||
470 | /** | 476 | /** |
471 | * skb_dst_is_noref - Test if skb dst isnt refcounted | 477 | * skb_dst_is_noref - Test if skb dst isn't refcounted |
472 | * @skb: buffer | 478 | * @skb: buffer |
473 | */ | 479 | */ |
474 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) | 480 | static inline bool skb_dst_is_noref(const struct sk_buff *skb) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index fa9086647eb7..ad4dd1c8d30a 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -105,7 +105,6 @@ void kmem_cache_destroy(struct kmem_cache *); | |||
105 | int kmem_cache_shrink(struct kmem_cache *); | 105 | int kmem_cache_shrink(struct kmem_cache *); |
106 | void kmem_cache_free(struct kmem_cache *, void *); | 106 | void kmem_cache_free(struct kmem_cache *, void *); |
107 | unsigned int kmem_cache_size(struct kmem_cache *); | 107 | unsigned int kmem_cache_size(struct kmem_cache *); |
108 | const char *kmem_cache_name(struct kmem_cache *); | ||
109 | 108 | ||
110 | /* | 109 | /* |
111 | * Please use this macro to create slab caches. Simply specify the | 110 | * Please use this macro to create slab caches. Simply specify the |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 8b6e8ae5d5ca..45ca123e8002 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -32,10 +32,14 @@ enum stat_item { | |||
32 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ | 32 | DEACTIVATE_TO_TAIL, /* Cpu slab was moved to the tail of partials */ |
33 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ | 33 | DEACTIVATE_REMOTE_FREES,/* Slab contained remotely freed objects */ |
34 | ORDER_FALLBACK, /* Number of times fallback was necessary */ | 34 | ORDER_FALLBACK, /* Number of times fallback was necessary */ |
35 | CMPXCHG_DOUBLE_CPU_FAIL,/* Failure of this_cpu_cmpxchg_double */ | ||
35 | NR_SLUB_STAT_ITEMS }; | 36 | NR_SLUB_STAT_ITEMS }; |
36 | 37 | ||
37 | struct kmem_cache_cpu { | 38 | struct kmem_cache_cpu { |
38 | void **freelist; /* Pointer to first free per cpu object */ | 39 | void **freelist; /* Pointer to next available object */ |
40 | #ifdef CONFIG_CMPXCHG_LOCAL | ||
41 | unsigned long tid; /* Globally unique transaction id */ | ||
42 | #endif | ||
39 | struct page *page; /* The slab from which we are allocating */ | 43 | struct page *page; /* The slab from which we are allocating */ |
40 | int node; /* The node of the page (or -1 for debug) */ | 44 | int node; /* The node of the page (or -1 for debug) */ |
41 | #ifdef CONFIG_SLUB_STATS | 45 | #ifdef CONFIG_SLUB_STATS |
@@ -70,6 +74,7 @@ struct kmem_cache { | |||
70 | struct kmem_cache_cpu __percpu *cpu_slab; | 74 | struct kmem_cache_cpu __percpu *cpu_slab; |
71 | /* Used for retriving partial slabs etc */ | 75 | /* Used for retriving partial slabs etc */ |
72 | unsigned long flags; | 76 | unsigned long flags; |
77 | unsigned long min_partial; | ||
73 | int size; /* The size of an object including meta data */ | 78 | int size; /* The size of an object including meta data */ |
74 | int objsize; /* The size of an object without meta data */ | 79 | int objsize; /* The size of an object without meta data */ |
75 | int offset; /* Free pointer offset. */ | 80 | int offset; /* Free pointer offset. */ |
@@ -83,7 +88,7 @@ struct kmem_cache { | |||
83 | void (*ctor)(void *); | 88 | void (*ctor)(void *); |
84 | int inuse; /* Offset to metadata */ | 89 | int inuse; /* Offset to metadata */ |
85 | int align; /* Alignment */ | 90 | int align; /* Alignment */ |
86 | unsigned long min_partial; | 91 | int reserved; /* Reserved bytes at the end of slabs */ |
87 | const char *name; /* Name (only for display!) */ | 92 | const char *name; /* Name (only for display!) */ |
88 | struct list_head list; /* List of slab caches */ | 93 | struct list_head list; /* List of slab caches */ |
89 | #ifdef CONFIG_SYSFS | 94 | #ifdef CONFIG_SYSFS |
diff --git a/include/linux/sm501.h b/include/linux/sm501.h index 214f93209b8c..02fde50a79a5 100644 --- a/include/linux/sm501.h +++ b/include/linux/sm501.h | |||
@@ -172,3 +172,11 @@ struct sm501_platdata { | |||
172 | struct sm501_platdata_gpio_i2c *gpio_i2c; | 172 | struct sm501_platdata_gpio_i2c *gpio_i2c; |
173 | unsigned int gpio_i2c_nr; | 173 | unsigned int gpio_i2c_nr; |
174 | }; | 174 | }; |
175 | |||
176 | #if defined(CONFIG_PPC32) | ||
177 | #define smc501_readl(addr) ioread32be((addr)) | ||
178 | #define smc501_writel(val, addr) iowrite32be((val), (addr)) | ||
179 | #else | ||
180 | #define smc501_readl(addr) readl(addr) | ||
181 | #define smc501_writel(val, addr) writel(val, addr) | ||
182 | #endif | ||
diff --git a/include/linux/smc91x.h b/include/linux/smc91x.h index bc21db598c06..76199b75d584 100644 --- a/include/linux/smc91x.h +++ b/include/linux/smc91x.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define RPC_LED_10 (0x02) /* LED = 10Mbps link detect */ | 21 | #define RPC_LED_10 (0x02) /* LED = 10Mbps link detect */ |
22 | #define RPC_LED_FD (0x03) /* LED = Full Duplex Mode */ | 22 | #define RPC_LED_FD (0x03) /* LED = Full Duplex Mode */ |
23 | #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ | 23 | #define RPC_LED_TX_RX (0x04) /* LED = TX or RX packet occurred */ |
24 | #define RPC_LED_100 (0x05) /* LED = 100Mbps link dectect */ | 24 | #define RPC_LED_100 (0x05) /* LED = 100Mbps link detect */ |
25 | #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ | 25 | #define RPC_LED_TX (0x06) /* LED = TX packet occurred */ |
26 | #define RPC_LED_RX (0x07) /* LED = RX packet occurred */ | 26 | #define RPC_LED_RX (0x07) /* LED = RX packet occurred */ |
27 | 27 | ||
diff --git a/include/linux/smp.h b/include/linux/smp.h index 6dc95cac6b3d..74243c86ba39 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <linux/list.h> | 11 | #include <linux/list.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/init.h> | ||
13 | 14 | ||
14 | extern void cpu_idle(void); | 15 | extern void cpu_idle(void); |
15 | 16 | ||
@@ -114,6 +115,8 @@ int on_each_cpu(smp_call_func_t func, void *info, int wait); | |||
114 | void smp_prepare_boot_cpu(void); | 115 | void smp_prepare_boot_cpu(void); |
115 | 116 | ||
116 | extern unsigned int setup_max_cpus; | 117 | extern unsigned int setup_max_cpus; |
118 | extern void __init setup_nr_cpu_ids(void); | ||
119 | extern void __init smp_init(void); | ||
117 | 120 | ||
118 | #else /* !SMP */ | 121 | #else /* !SMP */ |
119 | 122 | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index edbb1d07ddf4..d2b5e982f079 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -88,7 +88,7 @@ struct cmsghdr { | |||
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Ancilliary data object information MACROS | 91 | * Ancillary data object information MACROS |
92 | * Table 5-14 of POSIX 1003.1g | 92 | * Table 5-14 of POSIX 1003.1g |
93 | */ | 93 | */ |
94 | 94 | ||
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 0e6dc3891942..c0f87da78f8a 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -40,6 +40,7 @@ | |||
40 | 40 | ||
41 | /* events the user application reading /dev/sonypi can use */ | 41 | /* events the user application reading /dev/sonypi can use */ |
42 | 42 | ||
43 | #define SONYPI_EVENT_IGNORE 0 | ||
43 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 | 44 | #define SONYPI_EVENT_JOGDIAL_DOWN 1 |
44 | #define SONYPI_EVENT_JOGDIAL_UP 2 | 45 | #define SONYPI_EVENT_JOGDIAL_UP 2 |
45 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 | 46 | #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED 3 |
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 1904afedb82f..fe204fe39f7c 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
@@ -1231,7 +1231,7 @@ void seqbuf_dump(void); /* This function must be provided by programs */ | |||
1231 | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) | 1231 | #define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) |
1232 | 1232 | ||
1233 | /* | 1233 | /* |
1234 | * Timing and syncronization macros | 1234 | * Timing and synchronization macros |
1235 | */ | 1235 | */ |
1236 | 1236 | ||
1237 | #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ | 1237 | #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index bf0570a84f7a..52d9ed01855f 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
@@ -66,7 +66,7 @@ | |||
66 | * are in a different address space (and may be of different sizes in some | 66 | * are in a different address space (and may be of different sizes in some |
67 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). | 67 | * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). |
68 | * Zero-initialize the structure, including currently unused fields, to | 68 | * Zero-initialize the structure, including currently unused fields, to |
69 | * accomodate potential future updates. | 69 | * accommodate potential future updates. |
70 | * | 70 | * |
71 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). | 71 | * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). |
72 | * Pass it an array of related transfers, they'll execute together. | 72 | * Pass it an array of related transfers, they'll execute together. |
diff --git a/include/linux/spi/tsc2005.h b/include/linux/spi/tsc2005.h new file mode 100644 index 000000000000..d9b0c84220c7 --- /dev/null +++ b/include/linux/spi/tsc2005.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * This file is part of TSC2005 touchscreen driver | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Nokia Corporation | ||
5 | * | ||
6 | * Contact: Aaro Koskinen <aaro.koskinen@nokia.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef _LINUX_SPI_TSC2005_H | ||
25 | #define _LINUX_SPI_TSC2005_H | ||
26 | |||
27 | #include <linux/types.h> | ||
28 | |||
29 | struct tsc2005_platform_data { | ||
30 | int ts_pressure_max; | ||
31 | int ts_pressure_fudge; | ||
32 | int ts_x_max; | ||
33 | int ts_x_fudge; | ||
34 | int ts_y_max; | ||
35 | int ts_y_fudge; | ||
36 | int ts_x_plate_ohm; | ||
37 | unsigned int esd_timeout_ms; | ||
38 | void (*set_reset)(bool enable); | ||
39 | }; | ||
40 | |||
41 | #endif | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 80e535897de6..0b22d51258e6 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -81,7 +81,7 @@ | |||
81 | #include <linux/spinlock_types.h> | 81 | #include <linux/spinlock_types.h> |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * Pull the arch_spin*() functions/declarations (UP-nondebug doesnt need them): | 84 | * Pull the arch_spin*() functions/declarations (UP-nondebug doesn't need them): |
85 | */ | 85 | */ |
86 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
87 | # include <asm/spinlock.h> | 87 | # include <asm/spinlock.h> |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index e10352915698..f29197a4b227 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #ifndef __STMMAC_PLATFORM_DATA | 26 | #ifndef __STMMAC_PLATFORM_DATA |
27 | #define __STMMAC_PLATFORM_DATA | 27 | #define __STMMAC_PLATFORM_DATA |
28 | 28 | ||
29 | /* platfrom data for platfrom device structure's platfrom_data field */ | 29 | /* platform data for platform device structure's platform_data field */ |
30 | 30 | ||
31 | /* Private data for the STM on-board ethernet driver */ | 31 | /* Private data for the STM on-board ethernet driver */ |
32 | struct plat_stmmacenet_data { | 32 | struct plat_stmmacenet_data { |
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 1808960c5059..092dc9b1ce7d 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h | |||
@@ -105,7 +105,7 @@ static inline int try_stop_cpus(const struct cpumask *cpumask, | |||
105 | * @cpus: the cpus to run the @fn() on (NULL = any online cpu) | 105 | * @cpus: the cpus to run the @fn() on (NULL = any online cpu) |
106 | * | 106 | * |
107 | * Description: This causes a thread to be scheduled on every cpu, | 107 | * Description: This causes a thread to be scheduled on every cpu, |
108 | * each of which disables interrupts. The result is that noone is | 108 | * each of which disables interrupts. The result is that no one is |
109 | * holding a spinlock or inside any other preempt-disabled region when | 109 | * holding a spinlock or inside any other preempt-disabled region when |
110 | * @fn() runs. | 110 | * @fn() runs. |
111 | * | 111 | * |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 7898ea13de70..8d2eef1a8582 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -35,10 +35,10 @@ | |||
35 | * Each cache must be registered so that it can be cleaned regularly. | 35 | * Each cache must be registered so that it can be cleaned regularly. |
36 | * When the cache is unregistered, it is flushed completely. | 36 | * When the cache is unregistered, it is flushed completely. |
37 | * | 37 | * |
38 | * Entries have a ref count and a 'hashed' flag which counts the existance | 38 | * Entries have a ref count and a 'hashed' flag which counts the existence |
39 | * in the hash table. | 39 | * in the hash table. |
40 | * We only expire entries when refcount is zero. | 40 | * We only expire entries when refcount is zero. |
41 | * Existance in the cache is counted the refcount. | 41 | * Existence in the cache is counted the refcount. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | /* Every cache item has a common header that is used | 44 | /* Every cache item has a common header that is used |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 5d8048beb051..332da61cf8b7 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -126,6 +126,9 @@ struct gss_api_mech *gss_mech_get_by_name(const char *); | |||
126 | /* Similar, but get by pseudoflavor. */ | 126 | /* Similar, but get by pseudoflavor. */ |
127 | struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); | 127 | struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); |
128 | 128 | ||
129 | /* Fill in an array with a list of supported pseudoflavors */ | ||
130 | int gss_mech_list_pseudoflavors(u32 *); | ||
131 | |||
129 | /* Just increments the mechanism's reference count and returns its input: */ | 132 | /* Just increments the mechanism's reference count and returns its input: */ |
130 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); | 133 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); |
131 | 134 | ||
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index ca7d725861fc..83bbee3f089c 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/include/linux/sunrpc/svcauth_gss.h | 2 | * linux/include/linux/sunrpc/svcauth_gss.h |
3 | * | 3 | * |
4 | * Bruce Fields <bfields@umich.edu> | 4 | * Bruce Fields <bfields@umich.edu> |
5 | * Copyright (c) 2002 The Regents of the Unviersity of Michigan | 5 | * Copyright (c) 2002 The Regents of the University of Michigan |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H | 8 | #ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5a89e3612875..083ffea7ba18 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -249,6 +249,8 @@ extern void hibernation_set_ops(const struct platform_hibernation_ops *ops); | |||
249 | extern int hibernate(void); | 249 | extern int hibernate(void); |
250 | extern bool system_entering_hibernation(void); | 250 | extern bool system_entering_hibernation(void); |
251 | #else /* CONFIG_HIBERNATION */ | 251 | #else /* CONFIG_HIBERNATION */ |
252 | static inline void register_nosave_region(unsigned long b, unsigned long e) {} | ||
253 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} | ||
252 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 254 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
253 | static inline void swsusp_set_page_free(struct page *p) {} | 255 | static inline void swsusp_set_page_free(struct page *p) {} |
254 | static inline void swsusp_unset_page_free(struct page *p) {} | 256 | static inline void swsusp_unset_page_free(struct page *p) {} |
@@ -297,14 +299,7 @@ static inline bool pm_wakeup_pending(void) { return false; } | |||
297 | 299 | ||
298 | extern struct mutex pm_mutex; | 300 | extern struct mutex pm_mutex; |
299 | 301 | ||
300 | #ifndef CONFIG_HIBERNATION | 302 | #ifndef CONFIG_HIBERNATE_CALLBACKS |
301 | static inline void register_nosave_region(unsigned long b, unsigned long e) | ||
302 | { | ||
303 | } | ||
304 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | ||
305 | { | ||
306 | } | ||
307 | |||
308 | static inline void lock_system_sleep(void) {} | 303 | static inline void lock_system_sleep(void) {} |
309 | static inline void unlock_system_sleep(void) {} | 304 | static inline void unlock_system_sleep(void) {} |
310 | 305 | ||
diff --git a/include/linux/svga.h b/include/linux/svga.h index c59a51a2b0e7..bfa68e837d6a 100644 --- a/include/linux/svga.h +++ b/include/linux/svga.h | |||
@@ -67,25 +67,25 @@ struct svga_pll { | |||
67 | 67 | ||
68 | /* Write a value to the attribute register */ | 68 | /* Write a value to the attribute register */ |
69 | 69 | ||
70 | static inline void svga_wattr(u8 index, u8 data) | 70 | static inline void svga_wattr(void __iomem *regbase, u8 index, u8 data) |
71 | { | 71 | { |
72 | inb(0x3DA); | 72 | vga_r(regbase, VGA_IS1_RC); |
73 | outb(index, 0x3C0); | 73 | vga_w(regbase, VGA_ATT_IW, index); |
74 | outb(data, 0x3C0); | 74 | vga_w(regbase, VGA_ATT_W, data); |
75 | } | 75 | } |
76 | 76 | ||
77 | /* Write a value to a sequence register with a mask */ | 77 | /* Write a value to a sequence register with a mask */ |
78 | 78 | ||
79 | static inline void svga_wseq_mask(u8 index, u8 data, u8 mask) | 79 | static inline void svga_wseq_mask(void __iomem *regbase, u8 index, u8 data, u8 mask) |
80 | { | 80 | { |
81 | vga_wseq(NULL, index, (data & mask) | (vga_rseq(NULL, index) & ~mask)); | 81 | vga_wseq(regbase, index, (data & mask) | (vga_rseq(regbase, index) & ~mask)); |
82 | } | 82 | } |
83 | 83 | ||
84 | /* Write a value to a CRT register with a mask */ | 84 | /* Write a value to a CRT register with a mask */ |
85 | 85 | ||
86 | static inline void svga_wcrt_mask(u8 index, u8 data, u8 mask) | 86 | static inline void svga_wcrt_mask(void __iomem *regbase, u8 index, u8 data, u8 mask) |
87 | { | 87 | { |
88 | vga_wcrt(NULL, index, (data & mask) | (vga_rcrt(NULL, index) & ~mask)); | 88 | vga_wcrt(regbase, index, (data & mask) | (vga_rcrt(regbase, index) & ~mask)); |
89 | } | 89 | } |
90 | 90 | ||
91 | static inline int svga_primary_device(struct pci_dev *dev) | 91 | static inline int svga_primary_device(struct pci_dev *dev) |
@@ -96,27 +96,27 @@ static inline int svga_primary_device(struct pci_dev *dev) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | void svga_wcrt_multi(const struct vga_regset *regset, u32 value); | 99 | void svga_wcrt_multi(void __iomem *regbase, const struct vga_regset *regset, u32 value); |
100 | void svga_wseq_multi(const struct vga_regset *regset, u32 value); | 100 | void svga_wseq_multi(void __iomem *regbase, const struct vga_regset *regset, u32 value); |
101 | 101 | ||
102 | void svga_set_default_gfx_regs(void); | 102 | void svga_set_default_gfx_regs(void __iomem *regbase); |
103 | void svga_set_default_atc_regs(void); | 103 | void svga_set_default_atc_regs(void __iomem *regbase); |
104 | void svga_set_default_seq_regs(void); | 104 | void svga_set_default_seq_regs(void __iomem *regbase); |
105 | void svga_set_default_crt_regs(void); | 105 | void svga_set_default_crt_regs(void __iomem *regbase); |
106 | void svga_set_textmode_vga_regs(void); | 106 | void svga_set_textmode_vga_regs(void __iomem *regbase); |
107 | 107 | ||
108 | void svga_settile(struct fb_info *info, struct fb_tilemap *map); | 108 | void svga_settile(struct fb_info *info, struct fb_tilemap *map); |
109 | void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area); | 109 | void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area); |
110 | void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); | 110 | void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); |
111 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); | 111 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); |
112 | void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); | 112 | void svga_tilecursor(void __iomem *regbase, struct fb_info *info, struct fb_tilecursor *cursor); |
113 | int svga_get_tilemax(struct fb_info *info); | 113 | int svga_get_tilemax(struct fb_info *info); |
114 | void svga_get_caps(struct fb_info *info, struct fb_blit_caps *caps, | 114 | void svga_get_caps(struct fb_info *info, struct fb_blit_caps *caps, |
115 | struct fb_var_screeninfo *var); | 115 | struct fb_var_screeninfo *var); |
116 | 116 | ||
117 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); | 117 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); |
118 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); | 118 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); |
119 | void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); | 119 | void svga_set_timings(void __iomem *regbase, const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); |
120 | 120 | ||
121 | int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); | 121 | int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); |
122 | 122 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 4d559325d919..a5c6da5d8df8 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -155,6 +155,15 @@ enum { | |||
155 | #define SWAP_CLUSTER_MAX 32 | 155 | #define SWAP_CLUSTER_MAX 32 |
156 | #define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX | 156 | #define COMPACT_CLUSTER_MAX SWAP_CLUSTER_MAX |
157 | 157 | ||
158 | /* | ||
159 | * Ratio between the present memory in the zone and the "gap" that | ||
160 | * we're allowing kswapd to shrink in addition to the per-zone high | ||
161 | * wmark, even for zones that already have the high wmark satisfied, | ||
162 | * in order to provide better per-zone lru behavior. We are ok to | ||
163 | * spend not more than 1% of the memory for this zone balancing "gap". | ||
164 | */ | ||
165 | #define KSWAPD_ZONE_BALANCE_GAP_RATIO 100 | ||
166 | |||
158 | #define SWAP_MAP_MAX 0x3e /* Max duplication count, in first swap_map */ | 167 | #define SWAP_MAP_MAX 0x3e /* Max duplication count, in first swap_map */ |
159 | #define SWAP_MAP_BAD 0x3f /* Note pageblock is bad, in first swap_map */ | 168 | #define SWAP_MAP_BAD 0x3f /* Note pageblock is bad, in first swap_map */ |
160 | #define SWAP_HAS_CACHE 0x40 /* Flag page is cached, in first swap_map */ | 169 | #define SWAP_HAS_CACHE 0x40 /* Flag page is cached, in first swap_map */ |
@@ -215,6 +224,7 @@ extern void mark_page_accessed(struct page *); | |||
215 | extern void lru_add_drain(void); | 224 | extern void lru_add_drain(void); |
216 | extern int lru_add_drain_all(void); | 225 | extern int lru_add_drain_all(void); |
217 | extern void rotate_reclaimable_page(struct page *page); | 226 | extern void rotate_reclaimable_page(struct page *page); |
227 | extern void deactivate_page(struct page *page); | ||
218 | extern void swap_setup(void); | 228 | extern void swap_setup(void); |
219 | 229 | ||
220 | extern void add_page_to_unevictable_list(struct page *page); | 230 | extern void add_page_to_unevictable_list(struct page *page); |
@@ -299,8 +309,6 @@ extern void mem_cgroup_get_shmem_target(struct inode *inode, pgoff_t pgoff, | |||
299 | struct page **pagep, swp_entry_t *ent); | 309 | struct page **pagep, swp_entry_t *ent); |
300 | #endif | 310 | #endif |
301 | 311 | ||
302 | extern void swap_unplug_io_fn(struct backing_dev_info *, struct page *); | ||
303 | |||
304 | #ifdef CONFIG_SWAP | 312 | #ifdef CONFIG_SWAP |
305 | /* linux/mm/page_io.c */ | 313 | /* linux/mm/page_io.c */ |
306 | extern int swap_readpage(struct page *); | 314 | extern int swap_readpage(struct page *); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 1f5c18e6f4f1..83ecc1749ef6 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -825,6 +825,7 @@ asmlinkage long sys_fanotify_init(unsigned int flags, unsigned int event_f_flags | |||
825 | asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, | 825 | asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, |
826 | u64 mask, int fd, | 826 | u64 mask, int fd, |
827 | const char __user *pathname); | 827 | const char __user *pathname); |
828 | asmlinkage long sys_syncfs(int fd); | ||
828 | 829 | ||
829 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); | 830 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); |
830 | 831 | ||
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 1154c29f4101..dfb078db8ebb 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -7,13 +7,13 @@ | |||
7 | * We still have a notion of a driver for a system device, because we still | 7 | * We still have a notion of a driver for a system device, because we still |
8 | * want to perform basic operations on these devices. | 8 | * want to perform basic operations on these devices. |
9 | * | 9 | * |
10 | * We also support auxillary drivers binding to devices of a certain class. | 10 | * We also support auxiliary drivers binding to devices of a certain class. |
11 | * | 11 | * |
12 | * This allows configurable drivers to register themselves for devices of | 12 | * This allows configurable drivers to register themselves for devices of |
13 | * a certain type. And, it allows class definitions to reside in generic | 13 | * a certain type. And, it allows class definitions to reside in generic |
14 | * code while arch-specific code can register specific drivers. | 14 | * code while arch-specific code can register specific drivers. |
15 | * | 15 | * |
16 | * Auxillary drivers registered with a NULL cls are registered as drivers | 16 | * Auxiliary drivers registered with a NULL cls are registered as drivers |
17 | * for all system devices, and get notification calls for each device. | 17 | * for all system devices, and get notification calls for each device. |
18 | */ | 18 | */ |
19 | 19 | ||
@@ -33,12 +33,13 @@ struct sysdev_class { | |||
33 | const char *name; | 33 | const char *name; |
34 | struct list_head drivers; | 34 | struct list_head drivers; |
35 | struct sysdev_class_attribute **attrs; | 35 | struct sysdev_class_attribute **attrs; |
36 | 36 | struct kset kset; | |
37 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
37 | /* Default operations for these types of devices */ | 38 | /* Default operations for these types of devices */ |
38 | int (*shutdown)(struct sys_device *); | 39 | int (*shutdown)(struct sys_device *); |
39 | int (*suspend)(struct sys_device *, pm_message_t state); | 40 | int (*suspend)(struct sys_device *, pm_message_t state); |
40 | int (*resume)(struct sys_device *); | 41 | int (*resume)(struct sys_device *); |
41 | struct kset kset; | 42 | #endif |
42 | }; | 43 | }; |
43 | 44 | ||
44 | struct sysdev_class_attribute { | 45 | struct sysdev_class_attribute { |
@@ -69,16 +70,18 @@ extern int sysdev_class_create_file(struct sysdev_class *, | |||
69 | extern void sysdev_class_remove_file(struct sysdev_class *, | 70 | extern void sysdev_class_remove_file(struct sysdev_class *, |
70 | struct sysdev_class_attribute *); | 71 | struct sysdev_class_attribute *); |
71 | /** | 72 | /** |
72 | * Auxillary system device drivers. | 73 | * Auxiliary system device drivers. |
73 | */ | 74 | */ |
74 | 75 | ||
75 | struct sysdev_driver { | 76 | struct sysdev_driver { |
76 | struct list_head entry; | 77 | struct list_head entry; |
77 | int (*add)(struct sys_device *); | 78 | int (*add)(struct sys_device *); |
78 | int (*remove)(struct sys_device *); | 79 | int (*remove)(struct sys_device *); |
80 | #ifndef CONFIG_ARCH_NO_SYSDEV_OPS | ||
79 | int (*shutdown)(struct sys_device *); | 81 | int (*shutdown)(struct sys_device *); |
80 | int (*suspend)(struct sys_device *, pm_message_t state); | 82 | int (*suspend)(struct sys_device *, pm_message_t state); |
81 | int (*resume)(struct sys_device *); | 83 | int (*resume)(struct sys_device *); |
84 | #endif | ||
82 | }; | 85 | }; |
83 | 86 | ||
84 | 87 | ||
diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h index d24aabaca474..a520fd70a59f 100644 --- a/include/linux/timerqueue.h +++ b/include/linux/timerqueue.h | |||
@@ -24,7 +24,7 @@ extern struct timerqueue_node *timerqueue_iterate_next( | |||
24 | struct timerqueue_node *node); | 24 | struct timerqueue_node *node); |
25 | 25 | ||
26 | /** | 26 | /** |
27 | * timerqueue_getnext - Returns the timer with the earlies expiration time | 27 | * timerqueue_getnext - Returns the timer with the earliest expiration time |
28 | * | 28 | * |
29 | * @head: head of timerqueue | 29 | * @head: head of timerqueue |
30 | * | 30 | * |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 3a2e66d88a32..ebcfa4ebdbf8 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -169,7 +169,7 @@ static inline int tracehook_unsafe_exec(struct task_struct *task) | |||
169 | * tracehook_tracer_task - return the task that is tracing the given task | 169 | * tracehook_tracer_task - return the task that is tracing the given task |
170 | * @tsk: task to consider | 170 | * @tsk: task to consider |
171 | * | 171 | * |
172 | * Returns NULL if noone is tracing @task, or the &struct task_struct | 172 | * Returns NULL if no one is tracing @task, or the &struct task_struct |
173 | * pointer to its tracer. | 173 | * pointer to its tracer. |
174 | * | 174 | * |
175 | * Must called under rcu_read_lock(). The pointer returned might be kept | 175 | * Must called under rcu_read_lock(). The pointer returned might be kept |
@@ -448,7 +448,7 @@ static inline int tracehook_force_sigpending(void) | |||
448 | * | 448 | * |
449 | * Return zero to check for a real pending signal normally. | 449 | * Return zero to check for a real pending signal normally. |
450 | * Return -1 after releasing the siglock to repeat the check. | 450 | * Return -1 after releasing the siglock to repeat the check. |
451 | * Return a signal number to induce an artifical signal delivery, | 451 | * Return a signal number to induce an artificial signal delivery, |
452 | * setting *@info and *@return_ka to specify its details and behavior. | 452 | * setting *@info and *@return_ka to specify its details and behavior. |
453 | * | 453 | * |
454 | * The @return_ka->sa_handler value controls the disposition of the | 454 | * The @return_ka->sa_handler value controls the disposition of the |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 4e53d4641b38..9f469c700550 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -82,7 +82,7 @@ struct tty_buffer { | |||
82 | 82 | ||
83 | 83 | ||
84 | struct tty_bufhead { | 84 | struct tty_bufhead { |
85 | struct delayed_work work; | 85 | struct work_struct work; |
86 | spinlock_t lock; | 86 | spinlock_t lock; |
87 | struct tty_buffer *head; /* Queue head */ | 87 | struct tty_buffer *head; /* Queue head */ |
88 | struct tty_buffer *tail; /* Active buffer */ | 88 | struct tty_buffer *tail; /* Active buffer */ |
diff --git a/include/linux/types.h b/include/linux/types.h index c2a9eb44f2fa..176da8c1fbb1 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -150,6 +150,12 @@ typedef unsigned long blkcnt_t; | |||
150 | #define pgoff_t unsigned long | 150 | #define pgoff_t unsigned long |
151 | #endif | 151 | #endif |
152 | 152 | ||
153 | #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT | ||
154 | typedef u64 dma_addr_t; | ||
155 | #else | ||
156 | typedef u32 dma_addr_t; | ||
157 | #endif /* dma_addr_t */ | ||
158 | |||
153 | #endif /* __KERNEL__ */ | 159 | #endif /* __KERNEL__ */ |
154 | 160 | ||
155 | /* | 161 | /* |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index 1b4790911052..5c75153f9441 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Copyright: MontaVista Software, Inc. | 8 | * Copyright: MontaVista Software, Inc. |
9 | * | 9 | * |
10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> | 10 | * Spliting done by: Marek Vasut <marek.vasut@gmail.com> |
11 | * If something doesnt work and it worked before spliting, e-mail me, | 11 | * If something doesn't work and it worked before spliting, e-mail me, |
12 | * dont bother Nicolas please ;-) | 12 | * dont bother Nicolas please ;-) |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
diff --git a/include/linux/usb.h b/include/linux/usb.h index e63efeb378e3..65f78ca5d88e 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -623,7 +623,7 @@ extern struct usb_host_interface *usb_find_alt_setting( | |||
623 | * USB hubs. That makes it stay the same until systems are physically | 623 | * USB hubs. That makes it stay the same until systems are physically |
624 | * reconfigured, by re-cabling a tree of USB devices or by moving USB host | 624 | * reconfigured, by re-cabling a tree of USB devices or by moving USB host |
625 | * controllers. Adding and removing devices, including virtual root hubs | 625 | * controllers. Adding and removing devices, including virtual root hubs |
626 | * in host controller driver modules, does not change these path identifers; | 626 | * in host controller driver modules, does not change these path identifiers; |
627 | * neither does rebooting or re-enumerating. These are more useful identifiers | 627 | * neither does rebooting or re-enumerating. These are more useful identifiers |
628 | * than changeable ("unstable") ones like bus numbers or device addresses. | 628 | * than changeable ("unstable") ones like bus numbers or device addresses. |
629 | * | 629 | * |
@@ -793,7 +793,7 @@ struct usbdrv_wrap { | |||
793 | * usb_set_intfdata() to associate driver-specific data with the | 793 | * usb_set_intfdata() to associate driver-specific data with the |
794 | * interface. It may also use usb_set_interface() to specify the | 794 | * interface. It may also use usb_set_interface() to specify the |
795 | * appropriate altsetting. If unwilling to manage the interface, | 795 | * appropriate altsetting. If unwilling to manage the interface, |
796 | * return -ENODEV, if genuine IO errors occured, an appropriate | 796 | * return -ENODEV, if genuine IO errors occurred, an appropriate |
797 | * negative errno value. | 797 | * negative errno value. |
798 | * @disconnect: Called when the interface is no longer accessible, usually | 798 | * @disconnect: Called when the interface is no longer accessible, usually |
799 | * because its device has been (or is being) disconnected or the | 799 | * because its device has been (or is being) disconnected or the |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 3d29a7dcac2d..882a084a8411 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -188,7 +188,7 @@ ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs, | |||
188 | * @bind() method is then used to initialize all the functions and then | 188 | * @bind() method is then used to initialize all the functions and then |
189 | * call @usb_add_function() for them. | 189 | * call @usb_add_function() for them. |
190 | * | 190 | * |
191 | * Those functions would normally be independant of each other, but that's | 191 | * Those functions would normally be independent of each other, but that's |
192 | * not mandatory. CDC WMC devices are an example where functions often | 192 | * not mandatory. CDC WMC devices are an example where functions often |
193 | * depend on other functions, with some functions subsidiary to others. | 193 | * depend on other functions, with some functions subsidiary to others. |
194 | * Such interdependency may be managed in any way, so long as all of the | 194 | * Such interdependency may be managed in any way, so long as all of the |
diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h index 656380245198..e49dfd45baa4 100644 --- a/include/linux/usb/ehci_def.h +++ b/include/linux/usb/ehci_def.h | |||
@@ -159,7 +159,7 @@ struct ehci_regs { | |||
159 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ | 159 | #define USBMODE_CM_IDLE (0<<0) /* idle state */ |
160 | 160 | ||
161 | /* Moorestown has some non-standard registers, partially due to the fact that | 161 | /* Moorestown has some non-standard registers, partially due to the fact that |
162 | * its EHCI controller has both TT and LPM support. HOSTPCx are extentions to | 162 | * its EHCI controller has both TT and LPM support. HOSTPCx are extensions to |
163 | * PORTSCx | 163 | * PORTSCx |
164 | */ | 164 | */ |
165 | #define HOSTPC0 0x84 /* HOSTPC extension */ | 165 | #define HOSTPC0 0x84 /* HOSTPC extension */ |
diff --git a/include/linux/usb/functionfs.h b/include/linux/usb/functionfs.h index 6f649c13193b..7587ef934ba8 100644 --- a/include/linux/usb/functionfs.h +++ b/include/linux/usb/functionfs.h | |||
@@ -45,7 +45,7 @@ struct usb_functionfs_descs_head { | |||
45 | * | off | name | type | description | | 45 | * | off | name | type | description | |
46 | * |-----+-----------+--------------+--------------------------------------| | 46 | * |-----+-----------+--------------+--------------------------------------| |
47 | * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC | | 47 | * | 0 | magic | LE32 | FUNCTIONFS_{FS,HS}_DESCRIPTORS_MAGIC | |
48 | * | 4 | lenght | LE32 | length of the whole data chunk | | 48 | * | 4 | length | LE32 | length of the whole data chunk | |
49 | * | 8 | fs_count | LE32 | number of full-speed descriptors | | 49 | * | 8 | fs_count | LE32 | number of full-speed descriptors | |
50 | * | 12 | hs_count | LE32 | number of high-speed descriptors | | 50 | * | 12 | hs_count | LE32 | number of high-speed descriptors | |
51 | * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors | | 51 | * | 16 | fs_descrs | Descriptor[] | list of full-speed descriptors | |
@@ -86,7 +86,7 @@ struct usb_functionfs_strings_head { | |||
86 | * | 0 | lang | LE16 | language code | | 86 | * | 0 | lang | LE16 | language code | |
87 | * | 2 | strings | String[str_count] | array of strings in given language | | 87 | * | 2 | strings | String[str_count] | array of strings in given language | |
88 | * | 88 | * |
89 | * For each string ther is one strings entry (ie. there are str_count | 89 | * For each string there is one strings entry (ie. there are str_count |
90 | * string entries). Each String is a NUL terminated string encoded in | 90 | * string entries). Each String is a NUL terminated string encoded in |
91 | * UTF-8. | 91 | * UTF-8. |
92 | */ | 92 | */ |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 006412ce2303..e538172c0f64 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -72,7 +72,7 @@ struct usb_ep; | |||
72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt | 72 | * Bulk endpoints can use any size buffers, and can also be used for interrupt |
73 | * transfers. interrupt-only endpoints can be much less functional. | 73 | * transfers. interrupt-only endpoints can be much less functional. |
74 | * | 74 | * |
75 | * NOTE: this is analagous to 'struct urb' on the host side, except that | 75 | * NOTE: this is analogous to 'struct urb' on the host side, except that |
76 | * it's thinner and promotes more pre-allocation. | 76 | * it's thinner and promotes more pre-allocation. |
77 | */ | 77 | */ |
78 | 78 | ||
@@ -269,7 +269,7 @@ static inline void usb_ep_free_request(struct usb_ep *ep, | |||
269 | * | 269 | * |
270 | * Control endpoints ... after getting a setup() callback, the driver queues | 270 | * Control endpoints ... after getting a setup() callback, the driver queues |
271 | * one response (even if it would be zero length). That enables the | 271 | * one response (even if it would be zero length). That enables the |
272 | * status ack, after transfering data as specified in the response. Setup | 272 | * status ack, after transferring data as specified in the response. Setup |
273 | * functions may return negative error codes to generate protocol stalls. | 273 | * functions may return negative error codes to generate protocol stalls. |
274 | * (Note that some USB device controllers disallow protocol stall responses | 274 | * (Note that some USB device controllers disallow protocol stall responses |
275 | * in some cases.) When control responses are deferred (the response is | 275 | * in some cases.) When control responses are deferred (the response is |
diff --git a/include/linux/usb/midi.h b/include/linux/usb/midi.h index 1d1040865661..c8c52e3c91de 100644 --- a/include/linux/usb/midi.h +++ b/include/linux/usb/midi.h | |||
@@ -70,7 +70,7 @@ struct usb_midi_out_jack_descriptor { | |||
70 | __u8 bJackID; | 70 | __u8 bJackID; |
71 | __u8 bNrInputPins; /* p */ | 71 | __u8 bNrInputPins; /* p */ |
72 | struct usb_midi_source_pin pins[]; /* [p] */ | 72 | struct usb_midi_source_pin pins[]; /* [p] */ |
73 | /*__u8 iJack; -- ommitted due to variable-sized pins[] */ | 73 | /*__u8 iJack; -- omitted due to variable-sized pins[] */ |
74 | } __attribute__ ((packed)); | 74 | } __attribute__ ((packed)); |
75 | 75 | ||
76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) | 76 | #define USB_DT_MIDI_OUT_SIZE(p) (7 + 2 * (p)) |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 44842c8d38c0..0e1855079fbb 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -97,11 +97,14 @@ struct driver_info { | |||
97 | 97 | ||
98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ | 98 | #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ |
99 | 99 | ||
100 | #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ | ||
101 | |||
100 | /* | 102 | /* |
101 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. | 103 | * Indicates to usbnet, that USB driver accumulates multiple IP packets. |
102 | * Affects statistic (counters) and short packet handling. | 104 | * Affects statistic (counters) and short packet handling. |
103 | */ | 105 | */ |
104 | #define FLAG_MULTI_PACKET 0x1000 | 106 | #define FLAG_MULTI_PACKET 0x2000 |
107 | #define FLAG_RX_ASSEMBLE 0x4000 /* rx packets may span >1 frames */ | ||
105 | 108 | ||
106 | /* init device ... can sleep, or cause probe() failure */ | 109 | /* init device ... can sleep, or cause probe() failure */ |
107 | int (*bind)(struct usbnet *, struct usb_interface *); | 110 | int (*bind)(struct usbnet *, struct usb_interface *); |
@@ -172,7 +175,9 @@ struct cdc_state { | |||
172 | }; | 175 | }; |
173 | 176 | ||
174 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); | 177 | extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *); |
178 | extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *); | ||
175 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); | 179 | extern void usbnet_cdc_unbind(struct usbnet *, struct usb_interface *); |
180 | extern void usbnet_cdc_status(struct usbnet *, struct urb *); | ||
176 | 181 | ||
177 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ | 182 | /* CDC and RNDIS support the same host-chosen packet filters for IN transfers */ |
178 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ | 183 | #define DEFAULT_FILTER (USB_CDC_PACKET_TYPE_BROADCAST \ |
diff --git a/include/linux/usb/wusb.h b/include/linux/usb/wusb.h index 63ebdcc5dda6..0c4d4ca370ec 100644 --- a/include/linux/usb/wusb.h +++ b/include/linux/usb/wusb.h | |||
@@ -126,7 +126,7 @@ enum { | |||
126 | /** | 126 | /** |
127 | * WUSB IE: Channel Stop (WUSB1.0[7.5.8]) | 127 | * WUSB IE: Channel Stop (WUSB1.0[7.5.8]) |
128 | * | 128 | * |
129 | * Tells devices the host is going to stop sending MMCs and will dissapear. | 129 | * Tells devices the host is going to stop sending MMCs and will disappear. |
130 | */ | 130 | */ |
131 | struct wuie_channel_stop { | 131 | struct wuie_channel_stop { |
132 | struct wuie_hdr hdr; | 132 | struct wuie_hdr hdr; |
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 69f39974c041..4e5b0213fdc1 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -37,9 +37,13 @@ struct new_utsname { | |||
37 | #include <linux/nsproxy.h> | 37 | #include <linux/nsproxy.h> |
38 | #include <linux/err.h> | 38 | #include <linux/err.h> |
39 | 39 | ||
40 | struct user_namespace; | ||
41 | extern struct user_namespace init_user_ns; | ||
42 | |||
40 | struct uts_namespace { | 43 | struct uts_namespace { |
41 | struct kref kref; | 44 | struct kref kref; |
42 | struct new_utsname name; | 45 | struct new_utsname name; |
46 | struct user_namespace *user_ns; | ||
43 | }; | 47 | }; |
44 | extern struct uts_namespace init_uts_ns; | 48 | extern struct uts_namespace init_uts_ns; |
45 | 49 | ||
@@ -50,7 +54,7 @@ static inline void get_uts_ns(struct uts_namespace *ns) | |||
50 | } | 54 | } |
51 | 55 | ||
52 | extern struct uts_namespace *copy_utsname(unsigned long flags, | 56 | extern struct uts_namespace *copy_utsname(unsigned long flags, |
53 | struct uts_namespace *ns); | 57 | struct task_struct *tsk); |
54 | extern void free_uts_ns(struct kref *kref); | 58 | extern void free_uts_ns(struct kref *kref); |
55 | 59 | ||
56 | static inline void put_uts_ns(struct uts_namespace *ns) | 60 | static inline void put_uts_ns(struct uts_namespace *ns) |
@@ -67,12 +71,12 @@ static inline void put_uts_ns(struct uts_namespace *ns) | |||
67 | } | 71 | } |
68 | 72 | ||
69 | static inline struct uts_namespace *copy_utsname(unsigned long flags, | 73 | static inline struct uts_namespace *copy_utsname(unsigned long flags, |
70 | struct uts_namespace *ns) | 74 | struct task_struct *tsk) |
71 | { | 75 | { |
72 | if (flags & CLONE_NEWUTS) | 76 | if (flags & CLONE_NEWUTS) |
73 | return ERR_PTR(-EINVAL); | 77 | return ERR_PTR(-EINVAL); |
74 | 78 | ||
75 | return ns; | 79 | return tsk->nsproxy->uts_ns; |
76 | } | 80 | } |
77 | #endif | 81 | #endif |
78 | 82 | ||
diff --git a/include/linux/uwb.h b/include/linux/uwb.h index 7fc9746f22cd..b0c564ec2160 100644 --- a/include/linux/uwb.h +++ b/include/linux/uwb.h | |||
@@ -274,7 +274,7 @@ static inline void uwb_mas_bm_copy_le(void *dst, const struct uwb_mas_bm *mas) | |||
274 | 274 | ||
275 | /** | 275 | /** |
276 | * struct uwb_drp_avail - a radio controller's view of MAS usage | 276 | * struct uwb_drp_avail - a radio controller's view of MAS usage |
277 | * @global: MAS unused by neighbors (excluding reservations targetted | 277 | * @global: MAS unused by neighbors (excluding reservations targeted |
278 | * or owned by the local radio controller) or the beaon period | 278 | * or owned by the local radio controller) or the beaon period |
279 | * @local: MAS unused by local established reservations | 279 | * @local: MAS unused by local established reservations |
280 | * @pending: MAS unused by local pending reservations | 280 | * @pending: MAS unused by local pending reservations |
@@ -702,10 +702,10 @@ void edc_init(struct edc *edc) | |||
702 | edc->timestart = jiffies; | 702 | edc->timestart = jiffies; |
703 | } | 703 | } |
704 | 704 | ||
705 | /* Called when an error occured. | 705 | /* Called when an error occurred. |
706 | * This is way to determine if the number of acceptable errors per time | 706 | * This is way to determine if the number of acceptable errors per time |
707 | * period has been exceeded. It is not accurate as there are cases in which | 707 | * period has been exceeded. It is not accurate as there are cases in which |
708 | * this scheme will not work, for example if there are periodic occurences | 708 | * this scheme will not work, for example if there are periodic occurrences |
709 | * of errors that straddle updates to the start time. This scheme is | 709 | * of errors that straddle updates to the start time. This scheme is |
710 | * sufficient for our usage. | 710 | * sufficient for our usage. |
711 | * | 711 | * |
diff --git a/include/linux/uwb/umc.h b/include/linux/uwb/umc.h index 4b4fc0f43855..7b4842028ca7 100644 --- a/include/linux/uwb/umc.h +++ b/include/linux/uwb/umc.h | |||
@@ -132,7 +132,7 @@ int umc_match_pci_id(struct umc_driver *umc_drv, struct umc_dev *umc); | |||
132 | * | 132 | * |
133 | * FIXME: This is as dirty as it gets, but we need some way to check | 133 | * FIXME: This is as dirty as it gets, but we need some way to check |
134 | * the correct type of umc_dev->parent (so that for example, we can | 134 | * the correct type of umc_dev->parent (so that for example, we can |
135 | * cast to pci_dev). Casting to pci_dev is necesary because at some | 135 | * cast to pci_dev). Casting to pci_dev is necessary because at some |
136 | * point we need to request resources from the device. Mapping is | 136 | * point we need to request resources from the device. Mapping is |
137 | * easily over come (ioremap and stuff are bus agnostic), but hooking | 137 | * easily over come (ioremap and stuff are bus agnostic), but hooking |
138 | * up to some error handlers (such as pci error handlers) might need | 138 | * up to some error handlers (such as pci error handlers) might need |
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h new file mode 100644 index 000000000000..7054a7a8065e --- /dev/null +++ b/include/linux/v4l2-mediabus.h | |||
@@ -0,0 +1,108 @@ | |||
1 | /* | ||
2 | * Media Bus API header | ||
3 | * | ||
4 | * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.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_V4L2_MEDIABUS_H | ||
12 | #define __LINUX_V4L2_MEDIABUS_H | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/videodev2.h> | ||
16 | |||
17 | /* | ||
18 | * These pixel codes uniquely identify data formats on the media bus. Mostly | ||
19 | * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is | ||
20 | * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the | ||
21 | * data format is fixed. Additionally, "2X8" means that one pixel is transferred | ||
22 | * in two 8-bit samples, "BE" or "LE" specify in which order those samples are | ||
23 | * transferred over the bus: "LE" means that the least significant bits are | ||
24 | * transferred first, "BE" means that the most significant bits are transferred | ||
25 | * first, and "PADHI" and "PADLO" define which bits - low or high, in the | ||
26 | * incomplete high byte, are filled with padding bits. | ||
27 | * | ||
28 | * The pixel codes are grouped by type, bus_width, bits per component, samples | ||
29 | * per pixel and order of subsamples. Numerical values are sorted using generic | ||
30 | * numerical sort order (8 thus comes before 10). | ||
31 | * | ||
32 | * As their value can't change when a new pixel code is inserted in the | ||
33 | * enumeration, the pixel codes are explicitly given a numerical value. The next | ||
34 | * free values for each category are listed below, update them when inserting | ||
35 | * new pixel codes. | ||
36 | */ | ||
37 | enum v4l2_mbus_pixelcode { | ||
38 | V4L2_MBUS_FMT_FIXED = 0x0001, | ||
39 | |||
40 | /* RGB - next is 0x1009 */ | ||
41 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, | ||
42 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, | ||
43 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, | ||
44 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE = 0x1004, | ||
45 | V4L2_MBUS_FMT_BGR565_2X8_BE = 0x1005, | ||
46 | V4L2_MBUS_FMT_BGR565_2X8_LE = 0x1006, | ||
47 | V4L2_MBUS_FMT_RGB565_2X8_BE = 0x1007, | ||
48 | V4L2_MBUS_FMT_RGB565_2X8_LE = 0x1008, | ||
49 | |||
50 | /* YUV (including grey) - next is 0x2013 */ | ||
51 | V4L2_MBUS_FMT_Y8_1X8 = 0x2001, | ||
52 | V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, | ||
53 | V4L2_MBUS_FMT_VYUY8_1_5X8 = 0x2003, | ||
54 | V4L2_MBUS_FMT_YUYV8_1_5X8 = 0x2004, | ||
55 | V4L2_MBUS_FMT_YVYU8_1_5X8 = 0x2005, | ||
56 | V4L2_MBUS_FMT_UYVY8_2X8 = 0x2006, | ||
57 | V4L2_MBUS_FMT_VYUY8_2X8 = 0x2007, | ||
58 | V4L2_MBUS_FMT_YUYV8_2X8 = 0x2008, | ||
59 | V4L2_MBUS_FMT_YVYU8_2X8 = 0x2009, | ||
60 | V4L2_MBUS_FMT_Y10_1X10 = 0x200a, | ||
61 | V4L2_MBUS_FMT_YUYV10_2X10 = 0x200b, | ||
62 | V4L2_MBUS_FMT_YVYU10_2X10 = 0x200c, | ||
63 | V4L2_MBUS_FMT_UYVY8_1X16 = 0x200f, | ||
64 | V4L2_MBUS_FMT_VYUY8_1X16 = 0x2010, | ||
65 | V4L2_MBUS_FMT_YUYV8_1X16 = 0x2011, | ||
66 | V4L2_MBUS_FMT_YVYU8_1X16 = 0x2012, | ||
67 | V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, | ||
68 | V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, | ||
69 | |||
70 | /* Bayer - next is 0x3013 */ | ||
71 | V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, | ||
72 | V4L2_MBUS_FMT_SGRBG8_1X8 = 0x3002, | ||
73 | V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8 = 0x300b, | ||
74 | V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, | ||
75 | V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, | ||
76 | V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d, | ||
77 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003, | ||
78 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004, | ||
79 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE = 0x3005, | ||
80 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE = 0x3006, | ||
81 | V4L2_MBUS_FMT_SBGGR10_1X10 = 0x3007, | ||
82 | V4L2_MBUS_FMT_SGBRG10_1X10 = 0x300e, | ||
83 | V4L2_MBUS_FMT_SGRBG10_1X10 = 0x300a, | ||
84 | V4L2_MBUS_FMT_SRGGB10_1X10 = 0x300f, | ||
85 | V4L2_MBUS_FMT_SBGGR12_1X12 = 0x3008, | ||
86 | V4L2_MBUS_FMT_SGBRG12_1X12 = 0x3010, | ||
87 | V4L2_MBUS_FMT_SGRBG12_1X12 = 0x3011, | ||
88 | V4L2_MBUS_FMT_SRGGB12_1X12 = 0x3012, | ||
89 | }; | ||
90 | |||
91 | /** | ||
92 | * struct v4l2_mbus_framefmt - frame format on the media bus | ||
93 | * @width: frame width | ||
94 | * @height: frame height | ||
95 | * @code: data format code (from enum v4l2_mbus_pixelcode) | ||
96 | * @field: used interlacing type (from enum v4l2_field) | ||
97 | * @colorspace: colorspace of the data (from enum v4l2_colorspace) | ||
98 | */ | ||
99 | struct v4l2_mbus_framefmt { | ||
100 | __u32 width; | ||
101 | __u32 height; | ||
102 | __u32 code; | ||
103 | __u32 field; | ||
104 | __u32 colorspace; | ||
105 | __u32 reserved[7]; | ||
106 | }; | ||
107 | |||
108 | #endif | ||
diff --git a/include/linux/v4l2-subdev.h b/include/linux/v4l2-subdev.h new file mode 100644 index 000000000000..ed29cbbebfef --- /dev/null +++ b/include/linux/v4l2-subdev.h | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * V4L2 subdev userspace API | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
7 | * Sakari Ailus <sakari.ailus@iki.fi> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef __LINUX_V4L2_SUBDEV_H | ||
24 | #define __LINUX_V4L2_SUBDEV_H | ||
25 | |||
26 | #include <linux/ioctl.h> | ||
27 | #include <linux/types.h> | ||
28 | #include <linux/v4l2-mediabus.h> | ||
29 | |||
30 | /** | ||
31 | * enum v4l2_subdev_format_whence - Media bus format type | ||
32 | * @V4L2_SUBDEV_FORMAT_TRY: try format, for negotiation only | ||
33 | * @V4L2_SUBDEV_FORMAT_ACTIVE: active format, applied to the device | ||
34 | */ | ||
35 | enum v4l2_subdev_format_whence { | ||
36 | V4L2_SUBDEV_FORMAT_TRY = 0, | ||
37 | V4L2_SUBDEV_FORMAT_ACTIVE = 1, | ||
38 | }; | ||
39 | |||
40 | /** | ||
41 | * struct v4l2_subdev_format - Pad-level media bus format | ||
42 | * @which: format type (from enum v4l2_subdev_format_whence) | ||
43 | * @pad: pad number, as reported by the media API | ||
44 | * @format: media bus format (format code and frame size) | ||
45 | */ | ||
46 | struct v4l2_subdev_format { | ||
47 | __u32 which; | ||
48 | __u32 pad; | ||
49 | struct v4l2_mbus_framefmt format; | ||
50 | __u32 reserved[8]; | ||
51 | }; | ||
52 | |||
53 | /** | ||
54 | * struct v4l2_subdev_crop - Pad-level crop settings | ||
55 | * @which: format type (from enum v4l2_subdev_format_whence) | ||
56 | * @pad: pad number, as reported by the media API | ||
57 | * @rect: pad crop rectangle boundaries | ||
58 | */ | ||
59 | struct v4l2_subdev_crop { | ||
60 | __u32 which; | ||
61 | __u32 pad; | ||
62 | struct v4l2_rect rect; | ||
63 | __u32 reserved[8]; | ||
64 | }; | ||
65 | |||
66 | /** | ||
67 | * struct v4l2_subdev_mbus_code_enum - Media bus format enumeration | ||
68 | * @pad: pad number, as reported by the media API | ||
69 | * @index: format index during enumeration | ||
70 | * @code: format code (from enum v4l2_mbus_pixelcode) | ||
71 | */ | ||
72 | struct v4l2_subdev_mbus_code_enum { | ||
73 | __u32 pad; | ||
74 | __u32 index; | ||
75 | __u32 code; | ||
76 | __u32 reserved[9]; | ||
77 | }; | ||
78 | |||
79 | /** | ||
80 | * struct v4l2_subdev_frame_size_enum - Media bus format enumeration | ||
81 | * @pad: pad number, as reported by the media API | ||
82 | * @index: format index during enumeration | ||
83 | * @code: format code (from enum v4l2_mbus_pixelcode) | ||
84 | */ | ||
85 | struct v4l2_subdev_frame_size_enum { | ||
86 | __u32 index; | ||
87 | __u32 pad; | ||
88 | __u32 code; | ||
89 | __u32 min_width; | ||
90 | __u32 max_width; | ||
91 | __u32 min_height; | ||
92 | __u32 max_height; | ||
93 | __u32 reserved[9]; | ||
94 | }; | ||
95 | |||
96 | /** | ||
97 | * struct v4l2_subdev_frame_interval - Pad-level frame rate | ||
98 | * @pad: pad number, as reported by the media API | ||
99 | * @interval: frame interval in seconds | ||
100 | */ | ||
101 | struct v4l2_subdev_frame_interval { | ||
102 | __u32 pad; | ||
103 | struct v4l2_fract interval; | ||
104 | __u32 reserved[9]; | ||
105 | }; | ||
106 | |||
107 | /** | ||
108 | * struct v4l2_subdev_frame_interval_enum - Frame interval enumeration | ||
109 | * @pad: pad number, as reported by the media API | ||
110 | * @index: frame interval index during enumeration | ||
111 | * @code: format code (from enum v4l2_mbus_pixelcode) | ||
112 | * @width: frame width in pixels | ||
113 | * @height: frame height in pixels | ||
114 | * @interval: frame interval in seconds | ||
115 | */ | ||
116 | struct v4l2_subdev_frame_interval_enum { | ||
117 | __u32 index; | ||
118 | __u32 pad; | ||
119 | __u32 code; | ||
120 | __u32 width; | ||
121 | __u32 height; | ||
122 | struct v4l2_fract interval; | ||
123 | __u32 reserved[9]; | ||
124 | }; | ||
125 | |||
126 | #define VIDIOC_SUBDEV_G_FMT _IOWR('V', 4, struct v4l2_subdev_format) | ||
127 | #define VIDIOC_SUBDEV_S_FMT _IOWR('V', 5, struct v4l2_subdev_format) | ||
128 | #define VIDIOC_SUBDEV_G_FRAME_INTERVAL \ | ||
129 | _IOWR('V', 21, struct v4l2_subdev_frame_interval) | ||
130 | #define VIDIOC_SUBDEV_S_FRAME_INTERVAL \ | ||
131 | _IOWR('V', 22, struct v4l2_subdev_frame_interval) | ||
132 | #define VIDIOC_SUBDEV_ENUM_MBUS_CODE \ | ||
133 | _IOWR('V', 2, struct v4l2_subdev_mbus_code_enum) | ||
134 | #define VIDIOC_SUBDEV_ENUM_FRAME_SIZE \ | ||
135 | _IOWR('V', 74, struct v4l2_subdev_frame_size_enum) | ||
136 | #define VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL \ | ||
137 | _IOWR('V', 75, struct v4l2_subdev_frame_interval_enum) | ||
138 | #define VIDIOC_SUBDEV_G_CROP _IOWR('V', 59, struct v4l2_subdev_crop) | ||
139 | #define VIDIOC_SUBDEV_S_CROP _IOWR('V', 60, struct v4l2_subdev_crop) | ||
140 | |||
141 | #endif | ||
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index e9e1524b582c..9c3120dca294 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
@@ -78,7 +78,7 @@ extern void vga_set_legacy_decoding(struct pci_dev *pdev, | |||
78 | * wether the card is doing legacy decoding for that type of resource. If | 78 | * wether the card is doing legacy decoding for that type of resource. If |
79 | * yes, the lock is "converted" into a legacy resource lock. | 79 | * yes, the lock is "converted" into a legacy resource lock. |
80 | * The arbiter will first look for all VGA cards that might conflict | 80 | * The arbiter will first look for all VGA cards that might conflict |
81 | * and disable their IOs and/or Memory access, inlcuding VGA forwarding | 81 | * and disable their IOs and/or Memory access, including VGA forwarding |
82 | * on P2P bridges if necessary, so that the requested resources can | 82 | * on P2P bridges if necessary, so that the requested resources can |
83 | * be used. Then, the card is marked as locking these resources and | 83 | * be used. Then, the card is marked as locking these resources and |
84 | * the IO and/or Memory accesse are enabled on the card (including | 84 | * the IO and/or Memory accesse are enabled on the card (including |
@@ -187,7 +187,7 @@ extern struct pci_dev *vga_default_device(void); | |||
187 | * vga_conflicts | 187 | * vga_conflicts |
188 | * | 188 | * |
189 | * Architectures should define this if they have several | 189 | * Architectures should define this if they have several |
190 | * independant PCI domains that can afford concurrent VGA | 190 | * independent PCI domains that can afford concurrent VGA |
191 | * decoding | 191 | * decoding |
192 | */ | 192 | */ |
193 | 193 | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 5f6f47044abf..aa6c393b7ae9 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -70,6 +70,7 @@ | |||
70 | * Moved from videodev.h | 70 | * Moved from videodev.h |
71 | */ | 71 | */ |
72 | #define VIDEO_MAX_FRAME 32 | 72 | #define VIDEO_MAX_FRAME 32 |
73 | #define VIDEO_MAX_PLANES 8 | ||
73 | 74 | ||
74 | #ifndef __KERNEL__ | 75 | #ifndef __KERNEL__ |
75 | 76 | ||
@@ -157,9 +158,23 @@ enum v4l2_buf_type { | |||
157 | /* Experimental */ | 158 | /* Experimental */ |
158 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, | 159 | V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8, |
159 | #endif | 160 | #endif |
161 | V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9, | ||
162 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, | ||
160 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 163 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
161 | }; | 164 | }; |
162 | 165 | ||
166 | #define V4L2_TYPE_IS_MULTIPLANAR(type) \ | ||
167 | ((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \ | ||
168 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) | ||
169 | |||
170 | #define V4L2_TYPE_IS_OUTPUT(type) \ | ||
171 | ((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \ | ||
172 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \ | ||
173 | || (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \ | ||
174 | || (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \ | ||
175 | || (type) == V4L2_BUF_TYPE_VBI_OUTPUT \ | ||
176 | || (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT) | ||
177 | |||
163 | enum v4l2_tuner_type { | 178 | enum v4l2_tuner_type { |
164 | V4L2_TUNER_RADIO = 1, | 179 | V4L2_TUNER_RADIO = 1, |
165 | V4L2_TUNER_ANALOG_TV = 2, | 180 | V4L2_TUNER_ANALOG_TV = 2, |
@@ -245,6 +260,11 @@ struct v4l2_capability { | |||
245 | #define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ | 260 | #define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */ |
246 | #define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */ | 261 | #define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */ |
247 | 262 | ||
263 | /* Is a video capture device that supports multiplanar formats */ | ||
264 | #define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000 | ||
265 | /* Is a video output device that supports multiplanar formats */ | ||
266 | #define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000 | ||
267 | |||
248 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 268 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
249 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ | 269 | #define V4L2_CAP_AUDIO 0x00020000 /* has audio support */ |
250 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ | 270 | #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */ |
@@ -319,6 +339,13 @@ struct v4l2_pix_format { | |||
319 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ | 339 | #define V4L2_PIX_FMT_NV16 v4l2_fourcc('N', 'V', '1', '6') /* 16 Y/CbCr 4:2:2 */ |
320 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ | 340 | #define V4L2_PIX_FMT_NV61 v4l2_fourcc('N', 'V', '6', '1') /* 16 Y/CrCb 4:2:2 */ |
321 | 341 | ||
342 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ | ||
343 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ | ||
344 | #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ | ||
345 | |||
346 | /* three non contiguous planes - Y, Cb, Cr */ | ||
347 | #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ | ||
348 | |||
322 | /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 349 | /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
323 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | 350 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
324 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ | 351 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
@@ -328,6 +355,10 @@ struct v4l2_pix_format { | |||
328 | #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ | 355 | #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10 GBGB.. RGRG.. */ |
329 | #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ | 356 | #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10 GRGR.. BGBG.. */ |
330 | #define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ | 357 | #define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0') /* 10 RGRG.. GBGB.. */ |
358 | #define V4L2_PIX_FMT_SBGGR12 v4l2_fourcc('B', 'G', '1', '2') /* 12 BGBG.. GRGR.. */ | ||
359 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ | ||
360 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ | ||
361 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ | ||
331 | /* 10bit raw bayer DPCM compressed to 8 bits */ | 362 | /* 10bit raw bayer DPCM compressed to 8 bits */ |
332 | #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') | 363 | #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0') |
333 | /* | 364 | /* |
@@ -365,6 +396,7 @@ struct v4l2_pix_format { | |||
365 | #define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ | 396 | #define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ |
366 | #define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */ | 397 | #define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */ |
367 | #define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ | 398 | #define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ |
399 | #define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ | ||
368 | 400 | ||
369 | /* | 401 | /* |
370 | * F O R M A T E N U M E R A T I O N | 402 | * F O R M A T E N U M E R A T I O N |
@@ -517,6 +549,62 @@ struct v4l2_requestbuffers { | |||
517 | __u32 reserved[2]; | 549 | __u32 reserved[2]; |
518 | }; | 550 | }; |
519 | 551 | ||
552 | /** | ||
553 | * struct v4l2_plane - plane info for multi-planar buffers | ||
554 | * @bytesused: number of bytes occupied by data in the plane (payload) | ||
555 | * @length: size of this plane (NOT the payload) in bytes | ||
556 | * @mem_offset: when memory in the associated struct v4l2_buffer is | ||
557 | * V4L2_MEMORY_MMAP, equals the offset from the start of | ||
558 | * the device memory for this plane (or is a "cookie" that | ||
559 | * should be passed to mmap() called on the video node) | ||
560 | * @userptr: when memory is V4L2_MEMORY_USERPTR, a userspace pointer | ||
561 | * pointing to this plane | ||
562 | * @data_offset: offset in the plane to the start of data; usually 0, | ||
563 | * unless there is a header in front of the data | ||
564 | * | ||
565 | * Multi-planar buffers consist of one or more planes, e.g. an YCbCr buffer | ||
566 | * with two planes can have one plane for Y, and another for interleaved CbCr | ||
567 | * components. Each plane can reside in a separate memory buffer, or even in | ||
568 | * a completely separate memory node (e.g. in embedded devices). | ||
569 | */ | ||
570 | struct v4l2_plane { | ||
571 | __u32 bytesused; | ||
572 | __u32 length; | ||
573 | union { | ||
574 | __u32 mem_offset; | ||
575 | unsigned long userptr; | ||
576 | } m; | ||
577 | __u32 data_offset; | ||
578 | __u32 reserved[11]; | ||
579 | }; | ||
580 | |||
581 | /** | ||
582 | * struct v4l2_buffer - video buffer info | ||
583 | * @index: id number of the buffer | ||
584 | * @type: buffer type (type == *_MPLANE for multiplanar buffers) | ||
585 | * @bytesused: number of bytes occupied by data in the buffer (payload); | ||
586 | * unused (set to 0) for multiplanar buffers | ||
587 | * @flags: buffer informational flags | ||
588 | * @field: field order of the image in the buffer | ||
589 | * @timestamp: frame timestamp | ||
590 | * @timecode: frame timecode | ||
591 | * @sequence: sequence count of this frame | ||
592 | * @memory: the method, in which the actual video data is passed | ||
593 | * @offset: for non-multiplanar buffers with memory == V4L2_MEMORY_MMAP; | ||
594 | * offset from the start of the device memory for this plane, | ||
595 | * (or a "cookie" that should be passed to mmap() as offset) | ||
596 | * @userptr: for non-multiplanar buffers with memory == V4L2_MEMORY_USERPTR; | ||
597 | * a userspace pointer pointing to this buffer | ||
598 | * @planes: for multiplanar buffers; userspace pointer to the array of plane | ||
599 | * info structs for this buffer | ||
600 | * @length: size in bytes of the buffer (NOT its payload) for single-plane | ||
601 | * buffers (when type != *_MPLANE); number of elements in the | ||
602 | * planes array for multi-plane buffers | ||
603 | * @input: input number from which the video data has has been captured | ||
604 | * | ||
605 | * Contains data exchanged by application and driver using one of the Streaming | ||
606 | * I/O methods. | ||
607 | */ | ||
520 | struct v4l2_buffer { | 608 | struct v4l2_buffer { |
521 | __u32 index; | 609 | __u32 index; |
522 | enum v4l2_buf_type type; | 610 | enum v4l2_buf_type type; |
@@ -532,6 +620,7 @@ struct v4l2_buffer { | |||
532 | union { | 620 | union { |
533 | __u32 offset; | 621 | __u32 offset; |
534 | unsigned long userptr; | 622 | unsigned long userptr; |
623 | struct v4l2_plane *planes; | ||
535 | } m; | 624 | } m; |
536 | __u32 length; | 625 | __u32 length; |
537 | __u32 input; | 626 | __u32 input; |
@@ -1622,12 +1711,56 @@ struct v4l2_mpeg_vbi_fmt_ivtv { | |||
1622 | * A G G R E G A T E S T R U C T U R E S | 1711 | * A G G R E G A T E S T R U C T U R E S |
1623 | */ | 1712 | */ |
1624 | 1713 | ||
1625 | /* Stream data format | 1714 | /** |
1715 | * struct v4l2_plane_pix_format - additional, per-plane format definition | ||
1716 | * @sizeimage: maximum size in bytes required for data, for which | ||
1717 | * this plane will be used | ||
1718 | * @bytesperline: distance in bytes between the leftmost pixels in two | ||
1719 | * adjacent lines | ||
1720 | */ | ||
1721 | struct v4l2_plane_pix_format { | ||
1722 | __u32 sizeimage; | ||
1723 | __u16 bytesperline; | ||
1724 | __u16 reserved[7]; | ||
1725 | } __attribute__ ((packed)); | ||
1726 | |||
1727 | /** | ||
1728 | * struct v4l2_pix_format_mplane - multiplanar format definition | ||
1729 | * @width: image width in pixels | ||
1730 | * @height: image height in pixels | ||
1731 | * @pixelformat: little endian four character code (fourcc) | ||
1732 | * @field: field order (for interlaced video) | ||
1733 | * @colorspace: supplemental to pixelformat | ||
1734 | * @plane_fmt: per-plane information | ||
1735 | * @num_planes: number of planes for this format | ||
1736 | */ | ||
1737 | struct v4l2_pix_format_mplane { | ||
1738 | __u32 width; | ||
1739 | __u32 height; | ||
1740 | __u32 pixelformat; | ||
1741 | enum v4l2_field field; | ||
1742 | enum v4l2_colorspace colorspace; | ||
1743 | |||
1744 | struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; | ||
1745 | __u8 num_planes; | ||
1746 | __u8 reserved[11]; | ||
1747 | } __attribute__ ((packed)); | ||
1748 | |||
1749 | /** | ||
1750 | * struct v4l2_format - stream data format | ||
1751 | * @type: type of the data stream | ||
1752 | * @pix: definition of an image format | ||
1753 | * @pix_mp: definition of a multiplanar image format | ||
1754 | * @win: definition of an overlaid image | ||
1755 | * @vbi: raw VBI capture or output parameters | ||
1756 | * @sliced: sliced VBI capture or output parameters | ||
1757 | * @raw_data: placeholder for future extensions and custom formats | ||
1626 | */ | 1758 | */ |
1627 | struct v4l2_format { | 1759 | struct v4l2_format { |
1628 | enum v4l2_buf_type type; | 1760 | enum v4l2_buf_type type; |
1629 | union { | 1761 | union { |
1630 | struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ | 1762 | struct v4l2_pix_format pix; /* V4L2_BUF_TYPE_VIDEO_CAPTURE */ |
1763 | struct v4l2_pix_format_mplane pix_mp; /* V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE */ | ||
1631 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ | 1764 | struct v4l2_window win; /* V4L2_BUF_TYPE_VIDEO_OVERLAY */ |
1632 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ | 1765 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ |
1633 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ | 1766 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ |
@@ -1635,7 +1768,6 @@ struct v4l2_format { | |||
1635 | } fmt; | 1768 | } fmt; |
1636 | }; | 1769 | }; |
1637 | 1770 | ||
1638 | |||
1639 | /* Stream type-dependent parameters | 1771 | /* Stream type-dependent parameters |
1640 | */ | 1772 | */ |
1641 | struct v4l2_streamparm { | 1773 | struct v4l2_streamparm { |
@@ -1808,16 +1940,6 @@ struct v4l2_dbg_chip_ident { | |||
1808 | /* Reminder: when adding new ioctls please add support for them to | 1940 | /* Reminder: when adding new ioctls please add support for them to |
1809 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ | 1941 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
1810 | 1942 | ||
1811 | #ifdef __OLD_VIDIOC_ | ||
1812 | /* for compatibility, will go away some day */ | ||
1813 | #define VIDIOC_OVERLAY_OLD _IOWR('V', 14, int) | ||
1814 | #define VIDIOC_S_PARM_OLD _IOW('V', 22, struct v4l2_streamparm) | ||
1815 | #define VIDIOC_S_CTRL_OLD _IOW('V', 28, struct v4l2_control) | ||
1816 | #define VIDIOC_G_AUDIO_OLD _IOWR('V', 33, struct v4l2_audio) | ||
1817 | #define VIDIOC_G_AUDOUT_OLD _IOWR('V', 49, struct v4l2_audioout) | ||
1818 | #define VIDIOC_CROPCAP_OLD _IOR('V', 58, struct v4l2_cropcap) | ||
1819 | #endif | ||
1820 | |||
1821 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ | 1943 | #define BASE_VIDIOC_PRIVATE 192 /* 192-255 are private */ |
1822 | 1944 | ||
1823 | #endif /* __LINUX_VIDEODEV2_H */ | 1945 | #endif /* __LINUX_VIDEODEV2_H */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4ed6fcd6b726..9332e52ea8c2 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -95,10 +95,27 @@ extern struct vm_struct *remove_vm_area(const void *addr); | |||
95 | 95 | ||
96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
97 | struct page ***pages); | 97 | struct page ***pages); |
98 | #ifdef CONFIG_MMU | ||
98 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, | 99 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, |
99 | pgprot_t prot, struct page **pages); | 100 | pgprot_t prot, struct page **pages); |
100 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); | 101 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); |
101 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); | 102 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); |
103 | #else | ||
104 | static inline int | ||
105 | map_kernel_range_noflush(unsigned long start, unsigned long size, | ||
106 | pgprot_t prot, struct page **pages) | ||
107 | { | ||
108 | return size >> PAGE_SHIFT; | ||
109 | } | ||
110 | static inline void | ||
111 | unmap_kernel_range_noflush(unsigned long addr, unsigned long size) | ||
112 | { | ||
113 | } | ||
114 | static inline void | ||
115 | unmap_kernel_range(unsigned long addr, unsigned long size) | ||
116 | { | ||
117 | } | ||
118 | #endif | ||
102 | 119 | ||
103 | /* Allocate/destroy a 'vmalloc' VM area. */ | 120 | /* Allocate/destroy a 'vmalloc' VM area. */ |
104 | extern struct vm_struct *alloc_vm_area(size_t size); | 121 | extern struct vm_struct *alloc_vm_area(size_t size); |
@@ -116,11 +133,26 @@ extern struct vm_struct *vmlist; | |||
116 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | 133 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
117 | 134 | ||
118 | #ifdef CONFIG_SMP | 135 | #ifdef CONFIG_SMP |
136 | # ifdef CONFIG_MMU | ||
119 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, | 137 | struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, |
120 | const size_t *sizes, int nr_vms, | 138 | const size_t *sizes, int nr_vms, |
121 | size_t align); | 139 | size_t align); |
122 | 140 | ||
123 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); | 141 | void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); |
142 | # else | ||
143 | static inline struct vm_struct ** | ||
144 | pcpu_get_vm_areas(const unsigned long *offsets, | ||
145 | const size_t *sizes, int nr_vms, | ||
146 | size_t align) | ||
147 | { | ||
148 | return NULL; | ||
149 | } | ||
150 | |||
151 | static inline void | ||
152 | pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms) | ||
153 | { | ||
154 | } | ||
155 | # endif | ||
124 | #endif | 156 | #endif |
125 | 157 | ||
126 | #endif /* _LINUX_VMALLOC_H */ | 158 | #endif /* _LINUX_VMALLOC_H */ |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 833e676d6d92..2b3831b58aa4 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -58,6 +58,13 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ | 58 | UNEVICTABLE_PGCLEARED, /* on COW, page truncate */ |
59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ | 59 | UNEVICTABLE_PGSTRANDED, /* unable to isolate on unlock */ |
60 | UNEVICTABLE_MLOCKFREED, | 60 | UNEVICTABLE_MLOCKFREED, |
61 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | ||
62 | THP_FAULT_ALLOC, | ||
63 | THP_FAULT_FALLBACK, | ||
64 | THP_COLLAPSE_ALLOC, | ||
65 | THP_COLLAPSE_ALLOC_FAILED, | ||
66 | THP_SPLIT, | ||
67 | #endif | ||
61 | NR_VM_EVENT_ITEMS | 68 | NR_VM_EVENT_ITEMS |
62 | }; | 69 | }; |
63 | 70 | ||
@@ -220,12 +227,12 @@ static inline unsigned long node_page_state(int node, | |||
220 | zone_page_state(&zones[ZONE_MOVABLE], item); | 227 | zone_page_state(&zones[ZONE_MOVABLE], item); |
221 | } | 228 | } |
222 | 229 | ||
223 | extern void zone_statistics(struct zone *, struct zone *); | 230 | extern void zone_statistics(struct zone *, struct zone *, gfp_t gfp); |
224 | 231 | ||
225 | #else | 232 | #else |
226 | 233 | ||
227 | #define node_page_state(node, item) global_page_state(item) | 234 | #define node_page_state(node, item) global_page_state(item) |
228 | #define zone_statistics(_zl,_z) do { } while (0) | 235 | #define zone_statistics(_zl, _z, gfp) do { } while (0) |
229 | 236 | ||
230 | #endif /* CONFIG_NUMA */ | 237 | #endif /* CONFIG_NUMA */ |
231 | 238 | ||
diff --git a/include/linux/wimax.h b/include/linux/wimax.h index 4fdcc5635518..9f6b77af2f6d 100644 --- a/include/linux/wimax.h +++ b/include/linux/wimax.h | |||
@@ -114,7 +114,7 @@ enum { | |||
114 | WIMAX_GNL_RESET_IFIDX = 1, | 114 | WIMAX_GNL_RESET_IFIDX = 1, |
115 | }; | 115 | }; |
116 | 116 | ||
117 | /* Atributes for wimax_state_get() */ | 117 | /* Attributes for wimax_state_get() */ |
118 | enum { | 118 | enum { |
119 | WIMAX_GNL_STGET_IFIDX = 1, | 119 | WIMAX_GNL_STGET_IFIDX = 1, |
120 | }; | 120 | }; |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 0ead399e08b5..17e7ccc322a5 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | struct backing_dev_info; | 10 | struct backing_dev_info; |
11 | 11 | ||
12 | extern spinlock_t inode_lock; | 12 | extern spinlock_t inode_wb_list_lock; |
13 | 13 | ||
14 | /* | 14 | /* |
15 | * fs/fs-writeback.c | 15 | * fs/fs-writeback.c |
diff --git a/include/linux/xilinxfb.h b/include/linux/xilinxfb.h index f2463f559fb9..5a155a968054 100644 --- a/include/linux/xilinxfb.h +++ b/include/linux/xilinxfb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | /* ML300/403 reference design framebuffer driver platform data struct */ | 16 | /* ML300/403 reference design framebuffer driver platform data struct */ |
17 | struct xilinxfb_platform_data { | 17 | struct xilinxfb_platform_data { |
18 | u32 rotate_screen; /* Flag to rotate display 180 degrees */ | 18 | u32 rotate_screen; /* Flag to rotate display 180 degrees */ |
19 | u32 screen_height_mm; /* Physical dimentions of screen in mm */ | 19 | u32 screen_height_mm; /* Physical dimensions of screen in mm */ |
20 | u32 screen_width_mm; | 20 | u32 screen_width_mm; |
21 | u32 xres, yres; /* resolution of screen in pixels */ | 21 | u32 xres, yres; /* resolution of screen in pixels */ |
22 | u32 xvirt, yvirt; /* resolution of memory buffer */ | 22 | u32 xvirt, yvirt; /* resolution of memory buffer */ |
diff --git a/include/linux/zlib.h b/include/linux/zlib.h index 40c49cb3eb51..9c5a6b4de0a3 100644 --- a/include/linux/zlib.h +++ b/include/linux/zlib.h | |||
@@ -179,11 +179,16 @@ typedef z_stream *z_streamp; | |||
179 | 179 | ||
180 | /* basic functions */ | 180 | /* basic functions */ |
181 | 181 | ||
182 | extern int zlib_deflate_workspacesize (void); | 182 | extern int zlib_deflate_workspacesize (int windowBits, int memLevel); |
183 | /* | 183 | /* |
184 | Returns the number of bytes that needs to be allocated for a per- | 184 | Returns the number of bytes that needs to be allocated for a per- |
185 | stream workspace. A pointer to this number of bytes should be | 185 | stream workspace with the specified parameters. A pointer to this |
186 | returned in stream->workspace before calling zlib_deflateInit(). | 186 | number of bytes should be returned in stream->workspace before |
187 | you call zlib_deflateInit() or zlib_deflateInit2(). If you call | ||
188 | zlib_deflateInit(), specify windowBits = MAX_WBITS and memLevel = | ||
189 | MAX_MEM_LEVEL here. If you call zlib_deflateInit2(), the windowBits | ||
190 | and memLevel parameters passed to zlib_deflateInit2() must not | ||
191 | exceed those passed here. | ||
187 | */ | 192 | */ |
188 | 193 | ||
189 | /* | 194 | /* |
diff --git a/include/media/davinci/dm355_ccdc.h b/include/media/davinci/dm355_ccdc.h index df8a7b107477..adf2fe4bf0bb 100644 --- a/include/media/davinci/dm355_ccdc.h +++ b/include/media/davinci/dm355_ccdc.h | |||
@@ -193,7 +193,7 @@ struct ccdc_dft_corr_mem_ctl { | |||
193 | #define CCDC_DFT_TABLE_SIZE 16 | 193 | #define CCDC_DFT_TABLE_SIZE 16 |
194 | /* | 194 | /* |
195 | * Main Structure for vertical defect correction. Vertical defect | 195 | * Main Structure for vertical defect correction. Vertical defect |
196 | * correction can correct upto 16 defects if defects less than 16 | 196 | * correction can correct up to 16 defects if defects less than 16 |
197 | * then pad the rest with 0 | 197 | * then pad the rest with 0 |
198 | */ | 198 | */ |
199 | struct ccdc_vertical_dft { | 199 | struct ccdc_vertical_dft { |
diff --git a/include/media/davinci/isif.h b/include/media/davinci/isif.h index b0b74ad618cc..7f3d76a4b9e3 100644 --- a/include/media/davinci/isif.h +++ b/include/media/davinci/isif.h | |||
@@ -199,7 +199,7 @@ struct isif_black_clamp { | |||
199 | }; | 199 | }; |
200 | 200 | ||
201 | /************************************************************************* | 201 | /************************************************************************* |
202 | ** Color Space Convertion (CSC) | 202 | ** Color Space Conversion (CSC) |
203 | *************************************************************************/ | 203 | *************************************************************************/ |
204 | #define ISIF_CSC_NUM_COEFF 16 | 204 | #define ISIF_CSC_NUM_COEFF 16 |
205 | struct isif_color_space_conv { | 205 | struct isif_color_space_conv { |
diff --git a/include/media/lirc.h b/include/media/lirc.h index 6678a169fd9e..4b3ab2966b5a 100644 --- a/include/media/lirc.h +++ b/include/media/lirc.h | |||
@@ -137,7 +137,7 @@ | |||
137 | */ | 137 | */ |
138 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) | 138 | #define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) |
139 | /* | 139 | /* |
140 | * if filter cannot be set independantly for pulse/space, this should | 140 | * if filter cannot be set independently for pulse/space, this should |
141 | * be used | 141 | * be used |
142 | */ | 142 | */ |
143 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) | 143 | #define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) |
diff --git a/include/media/media-device.h b/include/media/media-device.h new file mode 100644 index 000000000000..6a27d916c250 --- /dev/null +++ b/include/media/media-device.h | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Media device | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
7 | * Sakari Ailus <sakari.ailus@iki.fi> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef _MEDIA_DEVICE_H | ||
24 | #define _MEDIA_DEVICE_H | ||
25 | |||
26 | #include <linux/device.h> | ||
27 | #include <linux/list.h> | ||
28 | #include <linux/mutex.h> | ||
29 | #include <linux/spinlock.h> | ||
30 | |||
31 | #include <media/media-devnode.h> | ||
32 | #include <media/media-entity.h> | ||
33 | |||
34 | /** | ||
35 | * struct media_device - Media device | ||
36 | * @dev: Parent device | ||
37 | * @devnode: Media device node | ||
38 | * @model: Device model name | ||
39 | * @serial: Device serial number (optional) | ||
40 | * @bus_info: Unique and stable device location identifier | ||
41 | * @hw_revision: Hardware device revision | ||
42 | * @driver_version: Device driver version | ||
43 | * @entity_id: ID of the next entity to be registered | ||
44 | * @entities: List of registered entities | ||
45 | * @lock: Entities list lock | ||
46 | * @graph_mutex: Entities graph operation lock | ||
47 | * | ||
48 | * This structure represents an abstract high-level media device. It allows easy | ||
49 | * access to entities and provides basic media device-level support. The | ||
50 | * structure can be allocated directly or embedded in a larger structure. | ||
51 | * | ||
52 | * The parent @dev is a physical device. It must be set before registering the | ||
53 | * media device. | ||
54 | * | ||
55 | * @model is a descriptive model name exported through sysfs. It doesn't have to | ||
56 | * be unique. | ||
57 | */ | ||
58 | struct media_device { | ||
59 | /* dev->driver_data points to this struct. */ | ||
60 | struct device *dev; | ||
61 | struct media_devnode devnode; | ||
62 | |||
63 | char model[32]; | ||
64 | char serial[40]; | ||
65 | char bus_info[32]; | ||
66 | u32 hw_revision; | ||
67 | u32 driver_version; | ||
68 | |||
69 | u32 entity_id; | ||
70 | struct list_head entities; | ||
71 | |||
72 | /* Protects the entities list */ | ||
73 | spinlock_t lock; | ||
74 | /* Serializes graph operations. */ | ||
75 | struct mutex graph_mutex; | ||
76 | |||
77 | int (*link_notify)(struct media_pad *source, | ||
78 | struct media_pad *sink, u32 flags); | ||
79 | }; | ||
80 | |||
81 | /* media_devnode to media_device */ | ||
82 | #define to_media_device(node) container_of(node, struct media_device, devnode) | ||
83 | |||
84 | int __must_check media_device_register(struct media_device *mdev); | ||
85 | void media_device_unregister(struct media_device *mdev); | ||
86 | |||
87 | int __must_check media_device_register_entity(struct media_device *mdev, | ||
88 | struct media_entity *entity); | ||
89 | void media_device_unregister_entity(struct media_entity *entity); | ||
90 | |||
91 | /* Iterate over all entities. */ | ||
92 | #define media_device_for_each_entity(entity, mdev) \ | ||
93 | list_for_each_entry(entity, &(mdev)->entities, list) | ||
94 | |||
95 | #endif | ||
diff --git a/include/media/media-devnode.h b/include/media/media-devnode.h new file mode 100644 index 000000000000..f6caafc874cb --- /dev/null +++ b/include/media/media-devnode.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * Media device node | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
7 | * Sakari Ailus <sakari.ailus@iki.fi> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | * -- | ||
23 | * | ||
24 | * Common functions for media-related drivers to register and unregister media | ||
25 | * device nodes. | ||
26 | */ | ||
27 | |||
28 | #ifndef _MEDIA_DEVNODE_H | ||
29 | #define _MEDIA_DEVNODE_H | ||
30 | |||
31 | #include <linux/poll.h> | ||
32 | #include <linux/fs.h> | ||
33 | #include <linux/device.h> | ||
34 | #include <linux/cdev.h> | ||
35 | |||
36 | /* | ||
37 | * Flag to mark the media_devnode struct as registered. Drivers must not touch | ||
38 | * this flag directly, it will be set and cleared by media_devnode_register and | ||
39 | * media_devnode_unregister. | ||
40 | */ | ||
41 | #define MEDIA_FLAG_REGISTERED 0 | ||
42 | |||
43 | struct media_file_operations { | ||
44 | struct module *owner; | ||
45 | ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); | ||
46 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | ||
47 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | ||
48 | long (*ioctl) (struct file *, unsigned int, unsigned long); | ||
49 | int (*open) (struct file *); | ||
50 | int (*release) (struct file *); | ||
51 | }; | ||
52 | |||
53 | /** | ||
54 | * struct media_devnode - Media device node | ||
55 | * @parent: parent device | ||
56 | * @minor: device node minor number | ||
57 | * @flags: flags, combination of the MEDIA_FLAG_* constants | ||
58 | * | ||
59 | * This structure represents a media-related device node. | ||
60 | * | ||
61 | * The @parent is a physical device. It must be set by core or device drivers | ||
62 | * before registering the node. | ||
63 | */ | ||
64 | struct media_devnode { | ||
65 | /* device ops */ | ||
66 | const struct media_file_operations *fops; | ||
67 | |||
68 | /* sysfs */ | ||
69 | struct device dev; /* media device */ | ||
70 | struct cdev cdev; /* character device */ | ||
71 | struct device *parent; /* device parent */ | ||
72 | |||
73 | /* device info */ | ||
74 | int minor; | ||
75 | unsigned long flags; /* Use bitops to access flags */ | ||
76 | |||
77 | /* callbacks */ | ||
78 | void (*release)(struct media_devnode *mdev); | ||
79 | }; | ||
80 | |||
81 | /* dev to media_devnode */ | ||
82 | #define to_media_devnode(cd) container_of(cd, struct media_devnode, dev) | ||
83 | |||
84 | int __must_check media_devnode_register(struct media_devnode *mdev); | ||
85 | void media_devnode_unregister(struct media_devnode *mdev); | ||
86 | |||
87 | static inline struct media_devnode *media_devnode_data(struct file *filp) | ||
88 | { | ||
89 | return filp->private_data; | ||
90 | } | ||
91 | |||
92 | static inline int media_devnode_is_registered(struct media_devnode *mdev) | ||
93 | { | ||
94 | return test_bit(MEDIA_FLAG_REGISTERED, &mdev->flags); | ||
95 | } | ||
96 | |||
97 | #endif /* _MEDIA_DEVNODE_H */ | ||
diff --git a/include/media/media-entity.h b/include/media/media-entity.h new file mode 100644 index 000000000000..cd8bca63a502 --- /dev/null +++ b/include/media/media-entity.h | |||
@@ -0,0 +1,151 @@ | |||
1 | /* | ||
2 | * Media entity | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia Corporation | ||
5 | * | ||
6 | * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com> | ||
7 | * Sakari Ailus <sakari.ailus@iki.fi> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #ifndef _MEDIA_ENTITY_H | ||
24 | #define _MEDIA_ENTITY_H | ||
25 | |||
26 | #include <linux/list.h> | ||
27 | #include <linux/media.h> | ||
28 | |||
29 | struct media_pipeline { | ||
30 | }; | ||
31 | |||
32 | struct media_link { | ||
33 | struct media_pad *source; /* Source pad */ | ||
34 | struct media_pad *sink; /* Sink pad */ | ||
35 | struct media_link *reverse; /* Link in the reverse direction */ | ||
36 | unsigned long flags; /* Link flags (MEDIA_LNK_FL_*) */ | ||
37 | }; | ||
38 | |||
39 | struct media_pad { | ||
40 | struct media_entity *entity; /* Entity this pad belongs to */ | ||
41 | u16 index; /* Pad index in the entity pads array */ | ||
42 | unsigned long flags; /* Pad flags (MEDIA_PAD_FL_*) */ | ||
43 | }; | ||
44 | |||
45 | struct media_entity_operations { | ||
46 | int (*link_setup)(struct media_entity *entity, | ||
47 | const struct media_pad *local, | ||
48 | const struct media_pad *remote, u32 flags); | ||
49 | }; | ||
50 | |||
51 | struct media_entity { | ||
52 | struct list_head list; | ||
53 | struct media_device *parent; /* Media device this entity belongs to*/ | ||
54 | u32 id; /* Entity ID, unique in the parent media | ||
55 | * device context */ | ||
56 | const char *name; /* Entity name */ | ||
57 | u32 type; /* Entity type (MEDIA_ENT_T_*) */ | ||
58 | u32 revision; /* Entity revision, driver specific */ | ||
59 | unsigned long flags; /* Entity flags (MEDIA_ENT_FL_*) */ | ||
60 | u32 group_id; /* Entity group ID */ | ||
61 | |||
62 | u16 num_pads; /* Number of sink and source pads */ | ||
63 | u16 num_links; /* Number of existing links, both | ||
64 | * enabled and disabled */ | ||
65 | u16 num_backlinks; /* Number of backlinks */ | ||
66 | u16 max_links; /* Maximum number of links */ | ||
67 | |||
68 | struct media_pad *pads; /* Pads array (num_pads elements) */ | ||
69 | struct media_link *links; /* Links array (max_links elements)*/ | ||
70 | |||
71 | const struct media_entity_operations *ops; /* Entity operations */ | ||
72 | |||
73 | /* Reference counts must never be negative, but are signed integers on | ||
74 | * purpose: a simple WARN_ON(<0) check can be used to detect reference | ||
75 | * count bugs that would make them negative. | ||
76 | */ | ||
77 | int stream_count; /* Stream count for the entity. */ | ||
78 | int use_count; /* Use count for the entity. */ | ||
79 | |||
80 | struct media_pipeline *pipe; /* Pipeline this entity belongs to. */ | ||
81 | |||
82 | union { | ||
83 | /* Node specifications */ | ||
84 | struct { | ||
85 | u32 major; | ||
86 | u32 minor; | ||
87 | } v4l; | ||
88 | struct { | ||
89 | u32 major; | ||
90 | u32 minor; | ||
91 | } fb; | ||
92 | struct { | ||
93 | u32 card; | ||
94 | u32 device; | ||
95 | u32 subdevice; | ||
96 | } alsa; | ||
97 | int dvb; | ||
98 | |||
99 | /* Sub-device specifications */ | ||
100 | /* Nothing needed yet */ | ||
101 | }; | ||
102 | }; | ||
103 | |||
104 | static inline u32 media_entity_type(struct media_entity *entity) | ||
105 | { | ||
106 | return entity->type & MEDIA_ENT_TYPE_MASK; | ||
107 | } | ||
108 | |||
109 | static inline u32 media_entity_subtype(struct media_entity *entity) | ||
110 | { | ||
111 | return entity->type & MEDIA_ENT_SUBTYPE_MASK; | ||
112 | } | ||
113 | |||
114 | #define MEDIA_ENTITY_ENUM_MAX_DEPTH 16 | ||
115 | |||
116 | struct media_entity_graph { | ||
117 | struct { | ||
118 | struct media_entity *entity; | ||
119 | int link; | ||
120 | } stack[MEDIA_ENTITY_ENUM_MAX_DEPTH]; | ||
121 | int top; | ||
122 | }; | ||
123 | |||
124 | int media_entity_init(struct media_entity *entity, u16 num_pads, | ||
125 | struct media_pad *pads, u16 extra_links); | ||
126 | void media_entity_cleanup(struct media_entity *entity); | ||
127 | |||
128 | int media_entity_create_link(struct media_entity *source, u16 source_pad, | ||
129 | struct media_entity *sink, u16 sink_pad, u32 flags); | ||
130 | int __media_entity_setup_link(struct media_link *link, u32 flags); | ||
131 | int media_entity_setup_link(struct media_link *link, u32 flags); | ||
132 | struct media_link *media_entity_find_link(struct media_pad *source, | ||
133 | struct media_pad *sink); | ||
134 | struct media_pad *media_entity_remote_source(struct media_pad *pad); | ||
135 | |||
136 | struct media_entity *media_entity_get(struct media_entity *entity); | ||
137 | void media_entity_put(struct media_entity *entity); | ||
138 | |||
139 | void media_entity_graph_walk_start(struct media_entity_graph *graph, | ||
140 | struct media_entity *entity); | ||
141 | struct media_entity * | ||
142 | media_entity_graph_walk_next(struct media_entity_graph *graph); | ||
143 | void media_entity_pipeline_start(struct media_entity *entity, | ||
144 | struct media_pipeline *pipe); | ||
145 | void media_entity_pipeline_stop(struct media_entity *entity); | ||
146 | |||
147 | #define media_entity_call(entity, operation, args...) \ | ||
148 | (((entity)->ops && (entity)->ops->operation) ? \ | ||
149 | (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD) | ||
150 | |||
151 | #endif | ||
diff --git a/include/media/noon010pc30.h b/include/media/noon010pc30.h new file mode 100644 index 000000000000..58eafee36b30 --- /dev/null +++ b/include/media/noon010pc30.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Driver header for NOON010PC30L camera sensor chip. | ||
3 | * | ||
4 | * Copyright (c) 2010 Samsung Electronics, Co. Ltd | ||
5 | * Contact: Sylwester Nawrocki <s.nawrocki@samsung.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef NOON010PC30_H | ||
14 | #define NOON010PC30_H | ||
15 | |||
16 | /** | ||
17 | * @clk_rate: the clock frequency in Hz | ||
18 | * @gpio_nreset: GPIO driving nRESET pin | ||
19 | * @gpio_nstby: GPIO driving nSTBY pin | ||
20 | */ | ||
21 | |||
22 | struct noon010pc30_platform_data { | ||
23 | unsigned long clk_rate; | ||
24 | int gpio_nreset; | ||
25 | int gpio_nstby; | ||
26 | }; | ||
27 | |||
28 | #endif /* NOON010PC30_H */ | ||
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index ee9e2f747c76..9184751f19c0 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -94,7 +94,7 @@ void rc_map_init(void); | |||
94 | #define RC_MAP_GADMEI_RM008Z "rc-gadmei-rm008z" | 94 | #define RC_MAP_GADMEI_RM008Z "rc-gadmei-rm008z" |
95 | #define RC_MAP_GENIUS_TVGO_A11MCE "rc-genius-tvgo-a11mce" | 95 | #define RC_MAP_GENIUS_TVGO_A11MCE "rc-genius-tvgo-a11mce" |
96 | #define RC_MAP_GOTVIEW7135 "rc-gotview7135" | 96 | #define RC_MAP_GOTVIEW7135 "rc-gotview7135" |
97 | #define RC_MAP_HAUPPAUGE_NEW "rc-hauppauge-new" | 97 | #define RC_MAP_HAUPPAUGE_NEW "rc-hauppauge" |
98 | #define RC_MAP_IMON_MCE "rc-imon-mce" | 98 | #define RC_MAP_IMON_MCE "rc-imon-mce" |
99 | #define RC_MAP_IMON_PAD "rc-imon-pad" | 99 | #define RC_MAP_IMON_PAD "rc-imon-pad" |
100 | #define RC_MAP_IODATA_BCTV7E "rc-iodata-bctv7e" | 100 | #define RC_MAP_IODATA_BCTV7E "rc-iodata-bctv7e" |
@@ -125,14 +125,16 @@ void rc_map_init(void); | |||
125 | #define RC_MAP_PROTEUS_2309 "rc-proteus-2309" | 125 | #define RC_MAP_PROTEUS_2309 "rc-proteus-2309" |
126 | #define RC_MAP_PURPLETV "rc-purpletv" | 126 | #define RC_MAP_PURPLETV "rc-purpletv" |
127 | #define RC_MAP_PV951 "rc-pv951" | 127 | #define RC_MAP_PV951 "rc-pv951" |
128 | #define RC_MAP_RC5_HAUPPAUGE_NEW "rc-rc5-hauppauge-new" | 128 | #define RC_MAP_HAUPPAUGE "rc-hauppauge" |
129 | #define RC_MAP_RC5_TV "rc-rc5-tv" | 129 | #define RC_MAP_RC5_TV "rc-rc5-tv" |
130 | #define RC_MAP_RC6_MCE "rc-rc6-mce" | 130 | #define RC_MAP_RC6_MCE "rc-rc6-mce" |
131 | #define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" | 131 | #define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" |
132 | #define RC_MAP_STREAMZAP "rc-streamzap" | 132 | #define RC_MAP_STREAMZAP "rc-streamzap" |
133 | #define RC_MAP_TBS_NEC "rc-tbs-nec" | 133 | #define RC_MAP_TBS_NEC "rc-tbs-nec" |
134 | #define RC_MAP_TECHNISAT_USB2 "rc-technisat-usb2" | ||
134 | #define RC_MAP_TERRATEC_CINERGY_XS "rc-terratec-cinergy-xs" | 135 | #define RC_MAP_TERRATEC_CINERGY_XS "rc-terratec-cinergy-xs" |
135 | #define RC_MAP_TERRATEC_SLIM "rc-terratec-slim" | 136 | #define RC_MAP_TERRATEC_SLIM "rc-terratec-slim" |
137 | #define RC_MAP_TERRATEC_SLIM_2 "rc-terratec-slim-2" | ||
136 | #define RC_MAP_TEVII_NEC "rc-tevii-nec" | 138 | #define RC_MAP_TEVII_NEC "rc-tevii-nec" |
137 | #define RC_MAP_TOTAL_MEDIA_IN_HAND "rc-total-media-in-hand" | 139 | #define RC_MAP_TOTAL_MEDIA_IN_HAND "rc-total-media-in-hand" |
138 | #define RC_MAP_TREKSTOR "rc-trekstor" | 140 | #define RC_MAP_TREKSTOR "rc-trekstor" |
diff --git a/include/media/s3c_fimc.h b/include/media/s5p_fimc.h index ca1b6738e4a4..9fdff8a4ed26 100644 --- a/include/media/s3c_fimc.h +++ b/include/media/s5p_fimc.h | |||
@@ -9,8 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef S3C_FIMC_H_ | 12 | #ifndef S5P_FIMC_H_ |
13 | #define S3C_FIMC_H_ | 13 | #define S5P_FIMC_H_ |
14 | 14 | ||
15 | enum cam_bus_type { | 15 | enum cam_bus_type { |
16 | FIMC_ITU_601 = 1, | 16 | FIMC_ITU_601 = 1, |
@@ -27,34 +27,35 @@ enum cam_bus_type { | |||
27 | struct i2c_board_info; | 27 | struct i2c_board_info; |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * struct s3c_fimc_isp_info - image sensor information required for host | 30 | * struct s5p_fimc_isp_info - image sensor information required for host |
31 | * interace configuration. | 31 | * interace configuration. |
32 | * | 32 | * |
33 | * @board_info: pointer to I2C subdevice's board info | 33 | * @board_info: pointer to I2C subdevice's board info |
34 | * @clk_frequency: frequency of the clock the host interface provides to sensor | ||
34 | * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc. | 35 | * @bus_type: determines bus type, MIPI, ITU-R BT.601 etc. |
36 | * @csi_data_align: MIPI-CSI interface data alignment in bits | ||
35 | * @i2c_bus_num: i2c control bus id the sensor is attached to | 37 | * @i2c_bus_num: i2c control bus id the sensor is attached to |
36 | * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) | 38 | * @mux_id: FIMC camera interface multiplexer index (separate for MIPI and ITU) |
37 | * @bus_width: camera data bus width in bits | ||
38 | * @flags: flags defining bus signals polarity inversion (High by default) | 39 | * @flags: flags defining bus signals polarity inversion (High by default) |
39 | */ | 40 | */ |
40 | struct s3c_fimc_isp_info { | 41 | struct s5p_fimc_isp_info { |
41 | struct i2c_board_info *board_info; | 42 | struct i2c_board_info *board_info; |
43 | unsigned long clk_frequency; | ||
42 | enum cam_bus_type bus_type; | 44 | enum cam_bus_type bus_type; |
45 | u16 csi_data_align; | ||
43 | u16 i2c_bus_num; | 46 | u16 i2c_bus_num; |
44 | u16 mux_id; | 47 | u16 mux_id; |
45 | u16 bus_width; | ||
46 | u16 flags; | 48 | u16 flags; |
47 | }; | 49 | }; |
48 | 50 | ||
49 | |||
50 | #define FIMC_MAX_CAMIF_CLIENTS 2 | ||
51 | |||
52 | /** | 51 | /** |
53 | * struct s3c_platform_fimc - camera host interface platform data | 52 | * struct s5p_platform_fimc - camera host interface platform data |
54 | * | 53 | * |
55 | * @isp_info: properties of camera sensor required for host interface setup | 54 | * @isp_info: properties of camera sensor required for host interface setup |
55 | * @num_clients: the number of attached image sensors | ||
56 | */ | 56 | */ |
57 | struct s3c_platform_fimc { | 57 | struct s5p_platform_fimc { |
58 | struct s3c_fimc_isp_info *isp_info[FIMC_MAX_CAMIF_CLIENTS]; | 58 | struct s5p_fimc_isp_info *isp_info; |
59 | int num_clients; | ||
59 | }; | 60 | }; |
60 | #endif /* S3C_FIMC_H_ */ | 61 | #endif /* S5P_FIMC_H_ */ |
diff --git a/include/media/soc_camera.h b/include/media/soc_camera.h index 9386db829fb7..f80b5372baf3 100644 --- a/include/media/soc_camera.h +++ b/include/media/soc_camera.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/pm.h> | 17 | #include <linux/pm.h> |
18 | #include <linux/videodev2.h> | 18 | #include <linux/videodev2.h> |
19 | #include <media/videobuf-core.h> | 19 | #include <media/videobuf-core.h> |
20 | #include <media/videobuf2-core.h> | ||
20 | #include <media/v4l2-device.h> | 21 | #include <media/v4l2-device.h> |
21 | 22 | ||
22 | extern struct bus_type soc_camera_bus_type; | 23 | extern struct bus_type soc_camera_bus_type; |
@@ -29,6 +30,8 @@ struct soc_camera_device { | |||
29 | struct device *pdev; /* Platform device */ | 30 | struct device *pdev; /* Platform device */ |
30 | s32 user_width; | 31 | s32 user_width; |
31 | s32 user_height; | 32 | s32 user_height; |
33 | u32 bytesperline; /* for padding, zero if unused */ | ||
34 | u32 sizeimage; | ||
32 | enum v4l2_colorspace colorspace; | 35 | enum v4l2_colorspace colorspace; |
33 | unsigned char iface; /* Host number */ | 36 | unsigned char iface; /* Host number */ |
34 | unsigned char devnum; /* Device number per host */ | 37 | unsigned char devnum; /* Device number per host */ |
@@ -44,7 +47,10 @@ struct soc_camera_device { | |||
44 | int use_count; | 47 | int use_count; |
45 | struct mutex video_lock; /* Protects device data */ | 48 | struct mutex video_lock; /* Protects device data */ |
46 | struct file *streamer; /* stream owner */ | 49 | struct file *streamer; /* stream owner */ |
47 | struct videobuf_queue vb_vidq; | 50 | union { |
51 | struct videobuf_queue vb_vidq; | ||
52 | struct vb2_queue vb2_vidq; | ||
53 | }; | ||
48 | }; | 54 | }; |
49 | 55 | ||
50 | struct soc_camera_host { | 56 | struct soc_camera_host { |
@@ -78,6 +84,8 @@ struct soc_camera_host_ops { | |||
78 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); | 84 | int (*try_fmt)(struct soc_camera_device *, struct v4l2_format *); |
79 | void (*init_videobuf)(struct videobuf_queue *, | 85 | void (*init_videobuf)(struct videobuf_queue *, |
80 | struct soc_camera_device *); | 86 | struct soc_camera_device *); |
87 | int (*init_videobuf2)(struct vb2_queue *, | ||
88 | struct soc_camera_device *); | ||
81 | int (*reqbufs)(struct soc_camera_device *, struct v4l2_requestbuffers *); | 89 | int (*reqbufs)(struct soc_camera_device *, struct v4l2_requestbuffers *); |
82 | int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); | 90 | int (*querycap)(struct soc_camera_host *, struct v4l2_capability *); |
83 | int (*set_bus_param)(struct soc_camera_device *, __u32); | 91 | int (*set_bus_param)(struct soc_camera_device *, __u32); |
@@ -85,6 +93,7 @@ struct soc_camera_host_ops { | |||
85 | int (*set_ctrl)(struct soc_camera_device *, struct v4l2_control *); | 93 | int (*set_ctrl)(struct soc_camera_device *, struct v4l2_control *); |
86 | int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *); | 94 | int (*get_parm)(struct soc_camera_device *, struct v4l2_streamparm *); |
87 | int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *); | 95 | int (*set_parm)(struct soc_camera_device *, struct v4l2_streamparm *); |
96 | int (*enum_fsizes)(struct soc_camera_device *, struct v4l2_frmsizeenum *); | ||
88 | unsigned int (*poll)(struct file *, poll_table *); | 97 | unsigned int (*poll)(struct file *, poll_table *); |
89 | const struct v4l2_queryctrl *controls; | 98 | const struct v4l2_queryctrl *controls; |
90 | int num_controls; | 99 | int num_controls; |
@@ -299,4 +308,17 @@ static inline struct video_device *soc_camera_i2c_to_vdev(struct i2c_client *cli | |||
299 | return icd->vdev; | 308 | return icd->vdev; |
300 | } | 309 | } |
301 | 310 | ||
311 | static inline struct soc_camera_device *soc_camera_from_vb2q(struct vb2_queue *vq) | ||
312 | { | ||
313 | return container_of(vq, struct soc_camera_device, vb2_vidq); | ||
314 | } | ||
315 | |||
316 | static inline struct soc_camera_device *soc_camera_from_vbq(struct videobuf_queue *vq) | ||
317 | { | ||
318 | return container_of(vq, struct soc_camera_device, vb_vidq); | ||
319 | } | ||
320 | |||
321 | void soc_camera_lock(struct vb2_queue *vq); | ||
322 | void soc_camera_unlock(struct vb2_queue *vq); | ||
323 | |||
302 | #endif | 324 | #endif |
diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h index 037cd7be001e..b338108ec305 100644 --- a/include/media/soc_mediabus.h +++ b/include/media/soc_mediabus.h | |||
@@ -12,8 +12,7 @@ | |||
12 | #define SOC_MEDIABUS_H | 12 | #define SOC_MEDIABUS_H |
13 | 13 | ||
14 | #include <linux/videodev2.h> | 14 | #include <linux/videodev2.h> |
15 | 15 | #include <linux/v4l2-mediabus.h> | |
16 | #include <media/v4l2-mediabus.h> | ||
17 | 16 | ||
18 | /** | 17 | /** |
19 | * enum soc_mbus_packing - data packing types on the media-bus | 18 | * enum soc_mbus_packing - data packing types on the media-bus |
@@ -61,5 +60,6 @@ struct soc_mbus_pixelfmt { | |||
61 | const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc( | 60 | const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc( |
62 | enum v4l2_mbus_pixelcode code); | 61 | enum v4l2_mbus_pixelcode code); |
63 | s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf); | 62 | s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf); |
63 | int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf); | ||
64 | 64 | ||
65 | #endif | 65 | #endif |
diff --git a/include/media/tuner.h b/include/media/tuner.h index 51811eac46f1..963e33471835 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #ifndef _TUNER_H | 22 | #ifndef _TUNER_H |
23 | #define _TUNER_H | 23 | #define _TUNER_H |
24 | #ifdef __KERNEL__ | ||
24 | 25 | ||
25 | #include <linux/videodev2.h> | 26 | #include <linux/videodev2.h> |
26 | 27 | ||
@@ -131,6 +132,7 @@ | |||
131 | #define TUNER_NXP_TDA18271 83 | 132 | #define TUNER_NXP_TDA18271 83 |
132 | #define TUNER_SONY_BTF_PXN01Z 84 | 133 | #define TUNER_SONY_BTF_PXN01Z 84 |
133 | #define TUNER_PHILIPS_FQ1236_MK5 85 /* NTSC, TDA9885, no FM radio */ | 134 | #define TUNER_PHILIPS_FQ1236_MK5 85 /* NTSC, TDA9885, no FM radio */ |
135 | #define TUNER_TENA_TNF_5337 86 | ||
134 | 136 | ||
135 | /* tv card specific */ | 137 | /* tv card specific */ |
136 | #define TDA9887_PRESENT (1<<0) | 138 | #define TDA9887_PRESENT (1<<0) |
@@ -156,14 +158,10 @@ | |||
156 | #define TDA9887_GAIN_NORMAL (1<<20) | 158 | #define TDA9887_GAIN_NORMAL (1<<20) |
157 | #define TDA9887_RIF_41_3 (1<<21) /* radio IF1 41.3 vs 33.3 */ | 159 | #define TDA9887_RIF_41_3 (1<<21) /* radio IF1 41.3 vs 33.3 */ |
158 | 160 | ||
159 | #ifdef __KERNEL__ | ||
160 | |||
161 | enum tuner_mode { | 161 | enum tuner_mode { |
162 | T_UNINITIALIZED = 0, | ||
163 | T_RADIO = 1 << V4L2_TUNER_RADIO, | 162 | T_RADIO = 1 << V4L2_TUNER_RADIO, |
164 | T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, | 163 | T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, |
165 | T_DIGITAL_TV = 1 << V4L2_TUNER_DIGITAL_TV, | 164 | /* Don't need to map V4L2_TUNER_DIGITAL_TV, as tuner-core won't use it */ |
166 | T_STANDBY = 1 << 31 | ||
167 | }; | 165 | }; |
168 | 166 | ||
169 | /* Older boards only had a single tuner device. Nowadays multiple tuner | 167 | /* Older boards only had a single tuner device. Nowadays multiple tuner |
@@ -193,11 +191,3 @@ struct tuner_setup { | |||
193 | #endif /* __KERNEL__ */ | 191 | #endif /* __KERNEL__ */ |
194 | 192 | ||
195 | #endif /* _TUNER_H */ | 193 | #endif /* _TUNER_H */ |
196 | |||
197 | /* | ||
198 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
199 | * --------------------------------------------------------------------------- | ||
200 | * Local variables: | ||
201 | * c-basic-offset: 8 | ||
202 | * End: | ||
203 | */ | ||
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 44fe44ec9ea7..b3edb67a8311 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
@@ -75,6 +75,7 @@ enum { | |||
75 | V4L2_IDENT_OV9640 = 257, | 75 | V4L2_IDENT_OV9640 = 257, |
76 | V4L2_IDENT_OV6650 = 258, | 76 | V4L2_IDENT_OV6650 = 258, |
77 | V4L2_IDENT_OV2640 = 259, | 77 | V4L2_IDENT_OV2640 = 259, |
78 | V4L2_IDENT_OV9740 = 260, | ||
78 | 79 | ||
79 | /* module saa7146: reserved range 300-309 */ | 80 | /* module saa7146: reserved range 300-309 */ |
80 | V4L2_IDENT_SAA7146 = 300, | 81 | V4L2_IDENT_SAA7146 = 300, |
@@ -209,6 +210,9 @@ enum { | |||
209 | /* module sn9c20x: just ident 10000 */ | 210 | /* module sn9c20x: just ident 10000 */ |
210 | V4L2_IDENT_SN9C20X = 10000, | 211 | V4L2_IDENT_SN9C20X = 10000, |
211 | 212 | ||
213 | /* Siliconfile sensors: reserved range 10100 - 10199 */ | ||
214 | V4L2_IDENT_NOON010PC30 = 10100, | ||
215 | |||
212 | /* module cx231xx and cx25840 */ | 216 | /* module cx231xx and cx25840 */ |
213 | V4L2_IDENT_CX2310X_AV = 23099, /* Integrated A/V decoder; not in '100 */ | 217 | V4L2_IDENT_CX2310X_AV = 23099, /* Integrated A/V decoder; not in '100 */ |
214 | V4L2_IDENT_CX23100 = 23100, | 218 | V4L2_IDENT_CX23100 = 23100, |
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index a659319e8582..a298ec49ddc4 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -80,21 +80,6 @@ | |||
80 | 80 | ||
81 | /* ------------------------------------------------------------------------- */ | 81 | /* ------------------------------------------------------------------------- */ |
82 | 82 | ||
83 | /* Priority helper functions */ | ||
84 | |||
85 | struct v4l2_prio_state { | ||
86 | atomic_t prios[4]; | ||
87 | }; | ||
88 | void v4l2_prio_init(struct v4l2_prio_state *global); | ||
89 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | ||
90 | enum v4l2_priority new); | ||
91 | void v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
92 | void v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority local); | ||
93 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
94 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority local); | ||
95 | |||
96 | /* ------------------------------------------------------------------------- */ | ||
97 | |||
98 | /* Control helper functions */ | 83 | /* Control helper functions */ |
99 | 84 | ||
100 | int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, | 85 | int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 15802a067a12..8266d5ade2ff 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -16,12 +16,15 @@ | |||
16 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
17 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
18 | 18 | ||
19 | #include <media/media-entity.h> | ||
20 | |||
19 | #define VIDEO_MAJOR 81 | 21 | #define VIDEO_MAJOR 81 |
20 | 22 | ||
21 | #define VFL_TYPE_GRABBER 0 | 23 | #define VFL_TYPE_GRABBER 0 |
22 | #define VFL_TYPE_VBI 1 | 24 | #define VFL_TYPE_VBI 1 |
23 | #define VFL_TYPE_RADIO 2 | 25 | #define VFL_TYPE_RADIO 2 |
24 | #define VFL_TYPE_MAX 3 | 26 | #define VFL_TYPE_SUBDEV 3 |
27 | #define VFL_TYPE_MAX 4 | ||
25 | 28 | ||
26 | struct v4l2_ioctl_callbacks; | 29 | struct v4l2_ioctl_callbacks; |
27 | struct video_device; | 30 | struct video_device; |
@@ -32,7 +35,25 @@ struct v4l2_ctrl_handler; | |||
32 | Drivers can clear this flag if they want to block all future | 35 | Drivers can clear this flag if they want to block all future |
33 | device access. It is cleared by video_unregister_device. */ | 36 | device access. It is cleared by video_unregister_device. */ |
34 | #define V4L2_FL_REGISTERED (0) | 37 | #define V4L2_FL_REGISTERED (0) |
38 | /* file->private_data points to struct v4l2_fh */ | ||
35 | #define V4L2_FL_USES_V4L2_FH (1) | 39 | #define V4L2_FL_USES_V4L2_FH (1) |
40 | /* Use the prio field of v4l2_fh for core priority checking */ | ||
41 | #define V4L2_FL_USE_FH_PRIO (2) | ||
42 | |||
43 | /* Priority helper functions */ | ||
44 | |||
45 | struct v4l2_prio_state { | ||
46 | atomic_t prios[4]; | ||
47 | }; | ||
48 | |||
49 | void v4l2_prio_init(struct v4l2_prio_state *global); | ||
50 | int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local, | ||
51 | enum v4l2_priority new); | ||
52 | void v4l2_prio_open(struct v4l2_prio_state *global, enum v4l2_priority *local); | ||
53 | void v4l2_prio_close(struct v4l2_prio_state *global, enum v4l2_priority local); | ||
54 | enum v4l2_priority v4l2_prio_max(struct v4l2_prio_state *global); | ||
55 | int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority local); | ||
56 | |||
36 | 57 | ||
37 | struct v4l2_file_operations { | 58 | struct v4l2_file_operations { |
38 | struct module *owner; | 59 | struct module *owner; |
@@ -54,6 +75,9 @@ struct v4l2_file_operations { | |||
54 | 75 | ||
55 | struct video_device | 76 | struct video_device |
56 | { | 77 | { |
78 | #if defined(CONFIG_MEDIA_CONTROLLER) | ||
79 | struct media_entity entity; | ||
80 | #endif | ||
57 | /* device ops */ | 81 | /* device ops */ |
58 | const struct v4l2_file_operations *fops; | 82 | const struct v4l2_file_operations *fops; |
59 | 83 | ||
@@ -68,6 +92,9 @@ struct video_device | |||
68 | /* Control handler associated with this device node. May be NULL. */ | 92 | /* Control handler associated with this device node. May be NULL. */ |
69 | struct v4l2_ctrl_handler *ctrl_handler; | 93 | struct v4l2_ctrl_handler *ctrl_handler; |
70 | 94 | ||
95 | /* Priority state. If NULL, then v4l2_dev->prio will be used. */ | ||
96 | struct v4l2_prio_state *prio; | ||
97 | |||
71 | /* device info */ | 98 | /* device info */ |
72 | char name[32]; | 99 | char name[32]; |
73 | int vfl_type; | 100 | int vfl_type; |
@@ -99,18 +126,31 @@ struct video_device | |||
99 | struct mutex *lock; | 126 | struct mutex *lock; |
100 | }; | 127 | }; |
101 | 128 | ||
129 | #define media_entity_to_video_device(entity) \ | ||
130 | container_of(entity, struct video_device, entity) | ||
102 | /* dev to video-device */ | 131 | /* dev to video-device */ |
103 | #define to_video_device(cd) container_of(cd, struct video_device, dev) | 132 | #define to_video_device(cd) container_of(cd, struct video_device, dev) |
104 | 133 | ||
134 | int __must_check __video_register_device(struct video_device *vdev, int type, | ||
135 | int nr, int warn_if_nr_in_use, struct module *owner); | ||
136 | |||
105 | /* Register video devices. Note that if video_register_device fails, | 137 | /* Register video devices. Note that if video_register_device fails, |
106 | the release() callback of the video_device structure is *not* called, so | 138 | the release() callback of the video_device structure is *not* called, so |
107 | the caller is responsible for freeing any data. Usually that means that | 139 | the caller is responsible for freeing any data. Usually that means that |
108 | you call video_device_release() on failure. */ | 140 | you call video_device_release() on failure. */ |
109 | int __must_check video_register_device(struct video_device *vdev, int type, int nr); | 141 | static inline int __must_check video_register_device(struct video_device *vdev, |
142 | int type, int nr) | ||
143 | { | ||
144 | return __video_register_device(vdev, type, nr, 1, vdev->fops->owner); | ||
145 | } | ||
110 | 146 | ||
111 | /* Same as video_register_device, but no warning is issued if the desired | 147 | /* Same as video_register_device, but no warning is issued if the desired |
112 | device node number was already in use. */ | 148 | device node number was already in use. */ |
113 | int __must_check video_register_device_no_warn(struct video_device *vdev, int type, int nr); | 149 | static inline int __must_check video_register_device_no_warn( |
150 | struct video_device *vdev, int type, int nr) | ||
151 | { | ||
152 | return __video_register_device(vdev, type, nr, 0, vdev->fops->owner); | ||
153 | } | ||
114 | 154 | ||
115 | /* Unregister video devices. Will do nothing if vdev == NULL or | 155 | /* Unregister video devices. Will do nothing if vdev == NULL or |
116 | video_is_registered() returns false. */ | 156 | video_is_registered() returns false. */ |
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index b16f307d471a..bd102cf509ac 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
@@ -21,7 +21,9 @@ | |||
21 | #ifndef _V4L2_DEVICE_H | 21 | #ifndef _V4L2_DEVICE_H |
22 | #define _V4L2_DEVICE_H | 22 | #define _V4L2_DEVICE_H |
23 | 23 | ||
24 | #include <media/media-device.h> | ||
24 | #include <media/v4l2-subdev.h> | 25 | #include <media/v4l2-subdev.h> |
26 | #include <media/v4l2-dev.h> | ||
25 | 27 | ||
26 | /* Each instance of a V4L2 device should create the v4l2_device struct, | 28 | /* Each instance of a V4L2 device should create the v4l2_device struct, |
27 | either stand-alone or embedded in a larger struct. | 29 | either stand-alone or embedded in a larger struct. |
@@ -39,6 +41,9 @@ struct v4l2_device { | |||
39 | Note: dev might be NULL if there is no parent device | 41 | Note: dev might be NULL if there is no parent device |
40 | as is the case with e.g. ISA devices. */ | 42 | as is the case with e.g. ISA devices. */ |
41 | struct device *dev; | 43 | struct device *dev; |
44 | #if defined(CONFIG_MEDIA_CONTROLLER) | ||
45 | struct media_device *mdev; | ||
46 | #endif | ||
42 | /* used to keep track of the registered subdevs */ | 47 | /* used to keep track of the registered subdevs */ |
43 | struct list_head subdevs; | 48 | struct list_head subdevs; |
44 | /* lock this struct; can be used by the driver as well if this | 49 | /* lock this struct; can be used by the driver as well if this |
@@ -51,10 +56,23 @@ struct v4l2_device { | |||
51 | unsigned int notification, void *arg); | 56 | unsigned int notification, void *arg); |
52 | /* The control handler. May be NULL. */ | 57 | /* The control handler. May be NULL. */ |
53 | struct v4l2_ctrl_handler *ctrl_handler; | 58 | struct v4l2_ctrl_handler *ctrl_handler; |
59 | /* Device's priority state */ | ||
60 | struct v4l2_prio_state prio; | ||
54 | /* BKL replacement mutex. Temporary solution only. */ | 61 | /* BKL replacement mutex. Temporary solution only. */ |
55 | struct mutex ioctl_lock; | 62 | struct mutex ioctl_lock; |
63 | /* Keep track of the references to this struct. */ | ||
64 | struct kref ref; | ||
65 | /* Release function that is called when the ref count goes to 0. */ | ||
66 | void (*release)(struct v4l2_device *v4l2_dev); | ||
56 | }; | 67 | }; |
57 | 68 | ||
69 | static inline void v4l2_device_get(struct v4l2_device *v4l2_dev) | ||
70 | { | ||
71 | kref_get(&v4l2_dev->ref); | ||
72 | } | ||
73 | |||
74 | int v4l2_device_put(struct v4l2_device *v4l2_dev); | ||
75 | |||
58 | /* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev. | 76 | /* Initialize v4l2_dev and make dev->driver_data point to v4l2_dev. |
59 | dev may be NULL in rare cases (ISA devices). In that case you | 77 | dev may be NULL in rare cases (ISA devices). In that case you |
60 | must fill in the v4l2_dev->name field before calling this function. */ | 78 | must fill in the v4l2_dev->name field before calling this function. */ |
@@ -96,6 +114,12 @@ int __must_check v4l2_device_register_subdev(struct v4l2_device *v4l2_dev, | |||
96 | wasn't registered. In that case it will do nothing. */ | 114 | wasn't registered. In that case it will do nothing. */ |
97 | void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); | 115 | void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); |
98 | 116 | ||
117 | /* Register device nodes for all subdev of the v4l2 device that are marked with | ||
118 | * the V4L2_SUBDEV_FL_HAS_DEVNODE flag. | ||
119 | */ | ||
120 | int __must_check | ||
121 | v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev); | ||
122 | |||
99 | /* Iterate over all subdevs. */ | 123 | /* Iterate over all subdevs. */ |
100 | #define v4l2_device_for_each_subdev(sd, v4l2_dev) \ | 124 | #define v4l2_device_for_each_subdev(sd, v4l2_dev) \ |
101 | list_for_each_entry(sd, &(v4l2_dev)->subdevs, list) | 125 | list_for_each_entry(sd, &(v4l2_dev)->subdevs, list) |
diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h index 1d72dde320bf..0206aa55be24 100644 --- a/include/media/v4l2-fh.h +++ b/include/media/v4l2-fh.h | |||
@@ -35,6 +35,7 @@ struct v4l2_fh { | |||
35 | struct list_head list; | 35 | struct list_head list; |
36 | struct video_device *vdev; | 36 | struct video_device *vdev; |
37 | struct v4l2_events *events; /* events, pending and subscribed */ | 37 | struct v4l2_events *events; /* events, pending and subscribed */ |
38 | enum v4l2_priority prio; | ||
38 | }; | 39 | }; |
39 | 40 | ||
40 | /* | 41 | /* |
@@ -50,8 +51,16 @@ int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev); | |||
50 | */ | 51 | */ |
51 | void v4l2_fh_add(struct v4l2_fh *fh); | 52 | void v4l2_fh_add(struct v4l2_fh *fh); |
52 | /* | 53 | /* |
54 | * Can be used as the open() op of v4l2_file_operations. | ||
55 | * It allocates a v4l2_fh and inits and adds it to the video_device associated | ||
56 | * with the file pointer. | ||
57 | */ | ||
58 | int v4l2_fh_open(struct file *filp); | ||
59 | /* | ||
53 | * Remove file handle from the list of file handles. Must be called in | 60 | * Remove file handle from the list of file handles. Must be called in |
54 | * v4l2_file_operations->release() handler if the driver uses v4l2_fh. | 61 | * v4l2_file_operations->release() handler if the driver uses v4l2_fh. |
62 | * On error filp->private_data will be NULL, otherwise it will point to | ||
63 | * the v4l2_fh struct. | ||
55 | */ | 64 | */ |
56 | void v4l2_fh_del(struct v4l2_fh *fh); | 65 | void v4l2_fh_del(struct v4l2_fh *fh); |
57 | /* | 66 | /* |
@@ -61,5 +70,25 @@ void v4l2_fh_del(struct v4l2_fh *fh); | |||
61 | * driver uses v4l2_fh. | 70 | * driver uses v4l2_fh. |
62 | */ | 71 | */ |
63 | void v4l2_fh_exit(struct v4l2_fh *fh); | 72 | void v4l2_fh_exit(struct v4l2_fh *fh); |
73 | /* | ||
74 | * Can be used as the release() op of v4l2_file_operations. | ||
75 | * It deletes and exits the v4l2_fh associated with the file pointer and | ||
76 | * frees it. It will do nothing if filp->private_data (the pointer to the | ||
77 | * v4l2_fh struct) is NULL. This function always returns 0. | ||
78 | */ | ||
79 | int v4l2_fh_release(struct file *filp); | ||
80 | /* | ||
81 | * Returns 1 if this filehandle is the only filehandle opened for the | ||
82 | * associated video_device. If fh is NULL, then it returns 0. | ||
83 | */ | ||
84 | int v4l2_fh_is_singular(struct v4l2_fh *fh); | ||
85 | /* | ||
86 | * Helper function with struct file as argument. If filp->private_data is | ||
87 | * NULL, then it will return 0. | ||
88 | */ | ||
89 | static inline int v4l2_fh_is_singular_file(struct file *filp) | ||
90 | { | ||
91 | return v4l2_fh_is_singular(filp->private_data); | ||
92 | } | ||
64 | 93 | ||
65 | #endif /* V4L2_EVENT_H */ | 94 | #endif /* V4L2_EVENT_H */ |
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 67df37542c68..dd9f1e7b8ff7 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h | |||
@@ -37,6 +37,10 @@ struct v4l2_ioctl_ops { | |||
37 | struct v4l2_fmtdesc *f); | 37 | struct v4l2_fmtdesc *f); |
38 | int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh, | 38 | int (*vidioc_enum_fmt_vid_out) (struct file *file, void *fh, |
39 | struct v4l2_fmtdesc *f); | 39 | struct v4l2_fmtdesc *f); |
40 | int (*vidioc_enum_fmt_vid_cap_mplane)(struct file *file, void *fh, | ||
41 | struct v4l2_fmtdesc *f); | ||
42 | int (*vidioc_enum_fmt_vid_out_mplane)(struct file *file, void *fh, | ||
43 | struct v4l2_fmtdesc *f); | ||
40 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, | 44 | int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh, |
41 | struct v4l2_fmtdesc *f); | 45 | struct v4l2_fmtdesc *f); |
42 | 46 | ||
@@ -57,6 +61,10 @@ struct v4l2_ioctl_ops { | |||
57 | struct v4l2_format *f); | 61 | struct v4l2_format *f); |
58 | int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh, | 62 | int (*vidioc_g_fmt_sliced_vbi_out)(struct file *file, void *fh, |
59 | struct v4l2_format *f); | 63 | struct v4l2_format *f); |
64 | int (*vidioc_g_fmt_vid_cap_mplane)(struct file *file, void *fh, | ||
65 | struct v4l2_format *f); | ||
66 | int (*vidioc_g_fmt_vid_out_mplane)(struct file *file, void *fh, | ||
67 | struct v4l2_format *f); | ||
60 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, | 68 | int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, |
61 | struct v4l2_format *f); | 69 | struct v4l2_format *f); |
62 | 70 | ||
@@ -77,6 +85,10 @@ struct v4l2_ioctl_ops { | |||
77 | struct v4l2_format *f); | 85 | struct v4l2_format *f); |
78 | int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh, | 86 | int (*vidioc_s_fmt_sliced_vbi_out)(struct file *file, void *fh, |
79 | struct v4l2_format *f); | 87 | struct v4l2_format *f); |
88 | int (*vidioc_s_fmt_vid_cap_mplane)(struct file *file, void *fh, | ||
89 | struct v4l2_format *f); | ||
90 | int (*vidioc_s_fmt_vid_out_mplane)(struct file *file, void *fh, | ||
91 | struct v4l2_format *f); | ||
80 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, | 92 | int (*vidioc_s_fmt_type_private)(struct file *file, void *fh, |
81 | struct v4l2_format *f); | 93 | struct v4l2_format *f); |
82 | 94 | ||
@@ -97,6 +109,10 @@ struct v4l2_ioctl_ops { | |||
97 | struct v4l2_format *f); | 109 | struct v4l2_format *f); |
98 | int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh, | 110 | int (*vidioc_try_fmt_sliced_vbi_out)(struct file *file, void *fh, |
99 | struct v4l2_format *f); | 111 | struct v4l2_format *f); |
112 | int (*vidioc_try_fmt_vid_cap_mplane)(struct file *file, void *fh, | ||
113 | struct v4l2_format *f); | ||
114 | int (*vidioc_try_fmt_vid_out_mplane)(struct file *file, void *fh, | ||
115 | struct v4l2_format *f); | ||
100 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, | 116 | int (*vidioc_try_fmt_type_private)(struct file *file, void *fh, |
101 | struct v4l2_format *f); | 117 | struct v4l2_format *f); |
102 | 118 | ||
@@ -254,7 +270,7 @@ struct v4l2_ioctl_ops { | |||
254 | 270 | ||
255 | /* For other private ioctls */ | 271 | /* For other private ioctls */ |
256 | long (*vidioc_default) (struct file *file, void *fh, | 272 | long (*vidioc_default) (struct file *file, void *fh, |
257 | int cmd, void *arg); | 273 | bool valid_prio, int cmd, void *arg); |
258 | }; | 274 | }; |
259 | 275 | ||
260 | 276 | ||
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 8e6559838ae3..971c7fa29614 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h | |||
@@ -11,66 +11,7 @@ | |||
11 | #ifndef V4L2_MEDIABUS_H | 11 | #ifndef V4L2_MEDIABUS_H |
12 | #define V4L2_MEDIABUS_H | 12 | #define V4L2_MEDIABUS_H |
13 | 13 | ||
14 | /* | 14 | #include <linux/v4l2-mediabus.h> |
15 | * These pixel codes uniquely identify data formats on the media bus. Mostly | ||
16 | * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is | ||
17 | * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the | ||
18 | * data format is fixed. Additionally, "2X8" means that one pixel is transferred | ||
19 | * in two 8-bit samples, "BE" or "LE" specify in which order those samples are | ||
20 | * transferred over the bus: "LE" means that the least significant bits are | ||
21 | * transferred first, "BE" means that the most significant bits are transferred | ||
22 | * first, and "PADHI" and "PADLO" define which bits - low or high, in the | ||
23 | * incomplete high byte, are filled with padding bits. | ||
24 | */ | ||
25 | enum v4l2_mbus_pixelcode { | ||
26 | V4L2_MBUS_FMT_FIXED = 1, | ||
27 | V4L2_MBUS_FMT_YUYV8_2X8, | ||
28 | V4L2_MBUS_FMT_YVYU8_2X8, | ||
29 | V4L2_MBUS_FMT_UYVY8_2X8, | ||
30 | V4L2_MBUS_FMT_VYUY8_2X8, | ||
31 | V4L2_MBUS_FMT_YVYU10_2X10, | ||
32 | V4L2_MBUS_FMT_YUYV10_2X10, | ||
33 | V4L2_MBUS_FMT_YVYU10_1X20, | ||
34 | V4L2_MBUS_FMT_YUYV10_1X20, | ||
35 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE, | ||
36 | V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE, | ||
37 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE, | ||
38 | V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE, | ||
39 | V4L2_MBUS_FMT_RGB565_2X8_LE, | ||
40 | V4L2_MBUS_FMT_RGB565_2X8_BE, | ||
41 | V4L2_MBUS_FMT_BGR565_2X8_LE, | ||
42 | V4L2_MBUS_FMT_BGR565_2X8_BE, | ||
43 | V4L2_MBUS_FMT_SBGGR8_1X8, | ||
44 | V4L2_MBUS_FMT_SBGGR10_1X10, | ||
45 | V4L2_MBUS_FMT_GREY8_1X8, | ||
46 | V4L2_MBUS_FMT_Y10_1X10, | ||
47 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE, | ||
48 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE, | ||
49 | V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE, | ||
50 | V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE, | ||
51 | V4L2_MBUS_FMT_SGRBG8_1X8, | ||
52 | V4L2_MBUS_FMT_SBGGR12_1X12, | ||
53 | V4L2_MBUS_FMT_YUYV8_1_5X8, | ||
54 | V4L2_MBUS_FMT_YVYU8_1_5X8, | ||
55 | V4L2_MBUS_FMT_UYVY8_1_5X8, | ||
56 | V4L2_MBUS_FMT_VYUY8_1_5X8, | ||
57 | }; | ||
58 | |||
59 | /** | ||
60 | * struct v4l2_mbus_framefmt - frame format on the media bus | ||
61 | * @width: frame width | ||
62 | * @height: frame height | ||
63 | * @code: data format code | ||
64 | * @field: used interlacing type | ||
65 | * @colorspace: colorspace of the data | ||
66 | */ | ||
67 | struct v4l2_mbus_framefmt { | ||
68 | __u32 width; | ||
69 | __u32 height; | ||
70 | enum v4l2_mbus_pixelcode code; | ||
71 | enum v4l2_field field; | ||
72 | enum v4l2_colorspace colorspace; | ||
73 | }; | ||
74 | 15 | ||
75 | static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, | 16 | static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, |
76 | const struct v4l2_mbus_framefmt *mbus_fmt) | 17 | const struct v4l2_mbus_framefmt *mbus_fmt) |
diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h index 8d149f1c58d0..16ac4733e80d 100644 --- a/include/media/v4l2-mem2mem.h +++ b/include/media/v4l2-mem2mem.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * and destination. | 5 | * and destination. |
6 | * | 6 | * |
7 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | 7 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. |
8 | * Pawel Osciak, <p.osciak@samsung.com> | 8 | * Pawel Osciak, <pawel@osciak.com> |
9 | * Marek Szyprowski, <m.szyprowski@samsung.com> | 9 | * Marek Szyprowski, <m.szyprowski@samsung.com> |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
@@ -17,7 +17,7 @@ | |||
17 | #ifndef _MEDIA_V4L2_MEM2MEM_H | 17 | #ifndef _MEDIA_V4L2_MEM2MEM_H |
18 | #define _MEDIA_V4L2_MEM2MEM_H | 18 | #define _MEDIA_V4L2_MEM2MEM_H |
19 | 19 | ||
20 | #include <media/videobuf-core.h> | 20 | #include <media/videobuf2-core.h> |
21 | 21 | ||
22 | /** | 22 | /** |
23 | * struct v4l2_m2m_ops - mem-to-mem device driver callbacks | 23 | * struct v4l2_m2m_ops - mem-to-mem device driver callbacks |
@@ -45,17 +45,20 @@ struct v4l2_m2m_ops { | |||
45 | void (*device_run)(void *priv); | 45 | void (*device_run)(void *priv); |
46 | int (*job_ready)(void *priv); | 46 | int (*job_ready)(void *priv); |
47 | void (*job_abort)(void *priv); | 47 | void (*job_abort)(void *priv); |
48 | void (*lock)(void *priv); | ||
49 | void (*unlock)(void *priv); | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | struct v4l2_m2m_dev; | 52 | struct v4l2_m2m_dev; |
51 | 53 | ||
52 | struct v4l2_m2m_queue_ctx { | 54 | struct v4l2_m2m_queue_ctx { |
53 | /* private: internal use only */ | 55 | /* private: internal use only */ |
54 | struct videobuf_queue q; | 56 | struct vb2_queue q; |
55 | 57 | ||
56 | /* Queue for buffers ready to be processed as soon as this | 58 | /* Queue for buffers ready to be processed as soon as this |
57 | * instance receives access to the device */ | 59 | * instance receives access to the device */ |
58 | struct list_head rdy_queue; | 60 | struct list_head rdy_queue; |
61 | spinlock_t rdy_spinlock; | ||
59 | u8 num_rdy; | 62 | u8 num_rdy; |
60 | }; | 63 | }; |
61 | 64 | ||
@@ -72,19 +75,31 @@ struct v4l2_m2m_ctx { | |||
72 | /* For device job queue */ | 75 | /* For device job queue */ |
73 | struct list_head queue; | 76 | struct list_head queue; |
74 | unsigned long job_flags; | 77 | unsigned long job_flags; |
78 | wait_queue_head_t finished; | ||
75 | 79 | ||
76 | /* Instance private data */ | 80 | /* Instance private data */ |
77 | void *priv; | 81 | void *priv; |
78 | }; | 82 | }; |
79 | 83 | ||
84 | struct v4l2_m2m_buffer { | ||
85 | struct vb2_buffer vb; | ||
86 | struct list_head list; | ||
87 | }; | ||
88 | |||
80 | void *v4l2_m2m_get_curr_priv(struct v4l2_m2m_dev *m2m_dev); | 89 | void *v4l2_m2m_get_curr_priv(struct v4l2_m2m_dev *m2m_dev); |
81 | 90 | ||
82 | struct videobuf_queue *v4l2_m2m_get_vq(struct v4l2_m2m_ctx *m2m_ctx, | 91 | struct vb2_queue *v4l2_m2m_get_vq(struct v4l2_m2m_ctx *m2m_ctx, |
83 | enum v4l2_buf_type type); | 92 | enum v4l2_buf_type type); |
84 | 93 | ||
85 | void v4l2_m2m_job_finish(struct v4l2_m2m_dev *m2m_dev, | 94 | void v4l2_m2m_job_finish(struct v4l2_m2m_dev *m2m_dev, |
86 | struct v4l2_m2m_ctx *m2m_ctx); | 95 | struct v4l2_m2m_ctx *m2m_ctx); |
87 | 96 | ||
97 | static inline void | ||
98 | v4l2_m2m_buf_done(struct vb2_buffer *buf, enum vb2_buffer_state state) | ||
99 | { | ||
100 | vb2_buffer_done(buf, state); | ||
101 | } | ||
102 | |||
88 | int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, | 103 | int v4l2_m2m_reqbufs(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, |
89 | struct v4l2_requestbuffers *reqbufs); | 104 | struct v4l2_requestbuffers *reqbufs); |
90 | 105 | ||
@@ -110,13 +125,13 @@ int v4l2_m2m_mmap(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, | |||
110 | struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops); | 125 | struct v4l2_m2m_dev *v4l2_m2m_init(struct v4l2_m2m_ops *m2m_ops); |
111 | void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev); | 126 | void v4l2_m2m_release(struct v4l2_m2m_dev *m2m_dev); |
112 | 127 | ||
113 | struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(void *priv, struct v4l2_m2m_dev *m2m_dev, | 128 | struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev, |
114 | void (*vq_init)(void *priv, struct videobuf_queue *, | 129 | void *drv_priv, |
115 | enum v4l2_buf_type)); | 130 | int (*queue_init)(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)); |
131 | |||
116 | void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx); | 132 | void v4l2_m2m_ctx_release(struct v4l2_m2m_ctx *m2m_ctx); |
117 | 133 | ||
118 | void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx, struct videobuf_queue *vq, | 134 | void v4l2_m2m_buf_queue(struct v4l2_m2m_ctx *m2m_ctx, struct vb2_buffer *vb); |
119 | struct videobuf_buffer *vb); | ||
120 | 135 | ||
121 | /** | 136 | /** |
122 | * v4l2_m2m_num_src_bufs_ready() - return the number of source buffers ready for | 137 | * v4l2_m2m_num_src_bufs_ready() - return the number of source buffers ready for |
@@ -138,7 +153,7 @@ unsigned int v4l2_m2m_num_dst_bufs_ready(struct v4l2_m2m_ctx *m2m_ctx) | |||
138 | return m2m_ctx->out_q_ctx.num_rdy; | 153 | return m2m_ctx->out_q_ctx.num_rdy; |
139 | } | 154 | } |
140 | 155 | ||
141 | void *v4l2_m2m_next_buf(struct v4l2_m2m_ctx *m2m_ctx, enum v4l2_buf_type type); | 156 | void *v4l2_m2m_next_buf(struct v4l2_m2m_queue_ctx *q_ctx); |
142 | 157 | ||
143 | /** | 158 | /** |
144 | * v4l2_m2m_next_src_buf() - return next source buffer from the list of ready | 159 | * v4l2_m2m_next_src_buf() - return next source buffer from the list of ready |
@@ -146,7 +161,7 @@ void *v4l2_m2m_next_buf(struct v4l2_m2m_ctx *m2m_ctx, enum v4l2_buf_type type); | |||
146 | */ | 161 | */ |
147 | static inline void *v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx) | 162 | static inline void *v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx) |
148 | { | 163 | { |
149 | return v4l2_m2m_next_buf(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | 164 | return v4l2_m2m_next_buf(&m2m_ctx->out_q_ctx); |
150 | } | 165 | } |
151 | 166 | ||
152 | /** | 167 | /** |
@@ -155,29 +170,28 @@ static inline void *v4l2_m2m_next_src_buf(struct v4l2_m2m_ctx *m2m_ctx) | |||
155 | */ | 170 | */ |
156 | static inline void *v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx) | 171 | static inline void *v4l2_m2m_next_dst_buf(struct v4l2_m2m_ctx *m2m_ctx) |
157 | { | 172 | { |
158 | return v4l2_m2m_next_buf(m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE); | 173 | return v4l2_m2m_next_buf(&m2m_ctx->cap_q_ctx); |
159 | } | 174 | } |
160 | 175 | ||
161 | /** | 176 | /** |
162 | * v4l2_m2m_get_src_vq() - return videobuf_queue for source buffers | 177 | * v4l2_m2m_get_src_vq() - return vb2_queue for source buffers |
163 | */ | 178 | */ |
164 | static inline | 179 | static inline |
165 | struct videobuf_queue *v4l2_m2m_get_src_vq(struct v4l2_m2m_ctx *m2m_ctx) | 180 | struct vb2_queue *v4l2_m2m_get_src_vq(struct v4l2_m2m_ctx *m2m_ctx) |
166 | { | 181 | { |
167 | return v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | 182 | return &m2m_ctx->out_q_ctx.q; |
168 | } | 183 | } |
169 | 184 | ||
170 | /** | 185 | /** |
171 | * v4l2_m2m_get_dst_vq() - return videobuf_queue for destination buffers | 186 | * v4l2_m2m_get_dst_vq() - return vb2_queue for destination buffers |
172 | */ | 187 | */ |
173 | static inline | 188 | static inline |
174 | struct videobuf_queue *v4l2_m2m_get_dst_vq(struct v4l2_m2m_ctx *m2m_ctx) | 189 | struct vb2_queue *v4l2_m2m_get_dst_vq(struct v4l2_m2m_ctx *m2m_ctx) |
175 | { | 190 | { |
176 | return v4l2_m2m_get_vq(m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE); | 191 | return &m2m_ctx->cap_q_ctx.q; |
177 | } | 192 | } |
178 | 193 | ||
179 | void *v4l2_m2m_buf_remove(struct v4l2_m2m_ctx *m2m_ctx, | 194 | void *v4l2_m2m_buf_remove(struct v4l2_m2m_queue_ctx *q_ctx); |
180 | enum v4l2_buf_type type); | ||
181 | 195 | ||
182 | /** | 196 | /** |
183 | * v4l2_m2m_src_buf_remove() - take off a source buffer from the list of ready | 197 | * v4l2_m2m_src_buf_remove() - take off a source buffer from the list of ready |
@@ -185,7 +199,7 @@ void *v4l2_m2m_buf_remove(struct v4l2_m2m_ctx *m2m_ctx, | |||
185 | */ | 199 | */ |
186 | static inline void *v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) | 200 | static inline void *v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) |
187 | { | 201 | { |
188 | return v4l2_m2m_buf_remove(m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); | 202 | return v4l2_m2m_buf_remove(&m2m_ctx->out_q_ctx); |
189 | } | 203 | } |
190 | 204 | ||
191 | /** | 205 | /** |
@@ -194,7 +208,7 @@ static inline void *v4l2_m2m_src_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) | |||
194 | */ | 208 | */ |
195 | static inline void *v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) | 209 | static inline void *v4l2_m2m_dst_buf_remove(struct v4l2_m2m_ctx *m2m_ctx) |
196 | { | 210 | { |
197 | return v4l2_m2m_buf_remove(m2m_ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE); | 211 | return v4l2_m2m_buf_remove(&m2m_ctx->cap_q_ctx); |
198 | } | 212 | } |
199 | 213 | ||
200 | #endif /* _MEDIA_V4L2_MEM2MEM_H */ | 214 | #endif /* _MEDIA_V4L2_MEM2MEM_H */ |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index daf1e57d9b26..1562c4ff3a65 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
@@ -21,7 +21,11 @@ | |||
21 | #ifndef _V4L2_SUBDEV_H | 21 | #ifndef _V4L2_SUBDEV_H |
22 | #define _V4L2_SUBDEV_H | 22 | #define _V4L2_SUBDEV_H |
23 | 23 | ||
24 | #include <linux/v4l2-subdev.h> | ||
25 | #include <media/media-entity.h> | ||
24 | #include <media/v4l2-common.h> | 26 | #include <media/v4l2-common.h> |
27 | #include <media/v4l2-dev.h> | ||
28 | #include <media/v4l2-fh.h> | ||
25 | #include <media/v4l2-mediabus.h> | 29 | #include <media/v4l2-mediabus.h> |
26 | 30 | ||
27 | /* generic v4l2_device notify callback notification values */ | 31 | /* generic v4l2_device notify callback notification values */ |
@@ -36,7 +40,10 @@ | |||
36 | 40 | ||
37 | struct v4l2_device; | 41 | struct v4l2_device; |
38 | struct v4l2_ctrl_handler; | 42 | struct v4l2_ctrl_handler; |
43 | struct v4l2_event_subscription; | ||
44 | struct v4l2_fh; | ||
39 | struct v4l2_subdev; | 45 | struct v4l2_subdev; |
46 | struct v4l2_subdev_fh; | ||
40 | struct tuner_setup; | 47 | struct tuner_setup; |
41 | 48 | ||
42 | /* decode_vbi_line */ | 49 | /* decode_vbi_line */ |
@@ -160,6 +167,10 @@ struct v4l2_subdev_core_ops { | |||
160 | int (*s_power)(struct v4l2_subdev *sd, int on); | 167 | int (*s_power)(struct v4l2_subdev *sd, int on); |
161 | int (*interrupt_service_routine)(struct v4l2_subdev *sd, | 168 | int (*interrupt_service_routine)(struct v4l2_subdev *sd, |
162 | u32 status, bool *handled); | 169 | u32 status, bool *handled); |
170 | int (*subscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh, | ||
171 | struct v4l2_event_subscription *sub); | ||
172 | int (*unsubscribe_event)(struct v4l2_subdev *sd, struct v4l2_fh *fh, | ||
173 | struct v4l2_event_subscription *sub); | ||
163 | }; | 174 | }; |
164 | 175 | ||
165 | /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. | 176 | /* s_mode: switch the tuner to a specific tuner mode. Replacement of s_radio. |
@@ -257,6 +268,10 @@ struct v4l2_subdev_video_ops { | |||
257 | int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); | 268 | int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop); |
258 | int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | 269 | int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); |
259 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); | 270 | int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param); |
271 | int (*g_frame_interval)(struct v4l2_subdev *sd, | ||
272 | struct v4l2_subdev_frame_interval *interval); | ||
273 | int (*s_frame_interval)(struct v4l2_subdev *sd, | ||
274 | struct v4l2_subdev_frame_interval *interval); | ||
260 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); | 275 | int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize); |
261 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); | 276 | int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival); |
262 | int (*enum_dv_presets) (struct v4l2_subdev *sd, | 277 | int (*enum_dv_presets) (struct v4l2_subdev *sd, |
@@ -271,6 +286,8 @@ struct v4l2_subdev_video_ops { | |||
271 | struct v4l2_dv_timings *timings); | 286 | struct v4l2_dv_timings *timings); |
272 | int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, | 287 | int (*enum_mbus_fmt)(struct v4l2_subdev *sd, unsigned int index, |
273 | enum v4l2_mbus_pixelcode *code); | 288 | enum v4l2_mbus_pixelcode *code); |
289 | int (*enum_mbus_fsizes)(struct v4l2_subdev *sd, | ||
290 | struct v4l2_frmsizeenum *fsize); | ||
274 | int (*g_mbus_fmt)(struct v4l2_subdev *sd, | 291 | int (*g_mbus_fmt)(struct v4l2_subdev *sd, |
275 | struct v4l2_mbus_framefmt *fmt); | 292 | struct v4l2_mbus_framefmt *fmt); |
276 | int (*try_mbus_fmt)(struct v4l2_subdev *sd, | 293 | int (*try_mbus_fmt)(struct v4l2_subdev *sd, |
@@ -324,9 +341,13 @@ struct v4l2_subdev_vbi_ops { | |||
324 | * This is needed for some sensors, which always corrupt | 341 | * This is needed for some sensors, which always corrupt |
325 | * several top lines of the output image, or which send their | 342 | * several top lines of the output image, or which send their |
326 | * metadata in them. | 343 | * metadata in them. |
344 | * @g_skip_frames: number of frames to skip at stream start. This is needed for | ||
345 | * buggy sensors that generate faulty frames when they are | ||
346 | * turned on. | ||
327 | */ | 347 | */ |
328 | struct v4l2_subdev_sensor_ops { | 348 | struct v4l2_subdev_sensor_ops { |
329 | int (*g_skip_top_lines)(struct v4l2_subdev *sd, u32 *lines); | 349 | int (*g_skip_top_lines)(struct v4l2_subdev *sd, u32 *lines); |
350 | int (*g_skip_frames)(struct v4l2_subdev *sd, u32 *frames); | ||
330 | }; | 351 | }; |
331 | 352 | ||
332 | /* | 353 | /* |
@@ -401,6 +422,25 @@ struct v4l2_subdev_ir_ops { | |||
401 | struct v4l2_subdev_ir_parameters *params); | 422 | struct v4l2_subdev_ir_parameters *params); |
402 | }; | 423 | }; |
403 | 424 | ||
425 | struct v4l2_subdev_pad_ops { | ||
426 | int (*enum_mbus_code)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | ||
427 | struct v4l2_subdev_mbus_code_enum *code); | ||
428 | int (*enum_frame_size)(struct v4l2_subdev *sd, | ||
429 | struct v4l2_subdev_fh *fh, | ||
430 | struct v4l2_subdev_frame_size_enum *fse); | ||
431 | int (*enum_frame_interval)(struct v4l2_subdev *sd, | ||
432 | struct v4l2_subdev_fh *fh, | ||
433 | struct v4l2_subdev_frame_interval_enum *fie); | ||
434 | int (*get_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | ||
435 | struct v4l2_subdev_format *format); | ||
436 | int (*set_fmt)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | ||
437 | struct v4l2_subdev_format *format); | ||
438 | int (*set_crop)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | ||
439 | struct v4l2_subdev_crop *crop); | ||
440 | int (*get_crop)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh, | ||
441 | struct v4l2_subdev_crop *crop); | ||
442 | }; | ||
443 | |||
404 | struct v4l2_subdev_ops { | 444 | struct v4l2_subdev_ops { |
405 | const struct v4l2_subdev_core_ops *core; | 445 | const struct v4l2_subdev_core_ops *core; |
406 | const struct v4l2_subdev_tuner_ops *tuner; | 446 | const struct v4l2_subdev_tuner_ops *tuner; |
@@ -409,6 +449,7 @@ struct v4l2_subdev_ops { | |||
409 | const struct v4l2_subdev_vbi_ops *vbi; | 449 | const struct v4l2_subdev_vbi_ops *vbi; |
410 | const struct v4l2_subdev_ir_ops *ir; | 450 | const struct v4l2_subdev_ir_ops *ir; |
411 | const struct v4l2_subdev_sensor_ops *sensor; | 451 | const struct v4l2_subdev_sensor_ops *sensor; |
452 | const struct v4l2_subdev_pad_ops *pad; | ||
412 | }; | 453 | }; |
413 | 454 | ||
414 | /* | 455 | /* |
@@ -420,23 +461,36 @@ struct v4l2_subdev_ops { | |||
420 | * | 461 | * |
421 | * unregistered: called when this subdev is unregistered. When called the | 462 | * unregistered: called when this subdev is unregistered. When called the |
422 | * v4l2_dev field is still set to the correct v4l2_device. | 463 | * v4l2_dev field is still set to the correct v4l2_device. |
464 | * | ||
465 | * open: called when the subdev device node is opened by an application. | ||
466 | * | ||
467 | * close: called when the subdev device node is closed. | ||
423 | */ | 468 | */ |
424 | struct v4l2_subdev_internal_ops { | 469 | struct v4l2_subdev_internal_ops { |
425 | int (*registered)(struct v4l2_subdev *sd); | 470 | int (*registered)(struct v4l2_subdev *sd); |
426 | void (*unregistered)(struct v4l2_subdev *sd); | 471 | void (*unregistered)(struct v4l2_subdev *sd); |
472 | int (*open)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); | ||
473 | int (*close)(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh); | ||
427 | }; | 474 | }; |
428 | 475 | ||
429 | #define V4L2_SUBDEV_NAME_SIZE 32 | 476 | #define V4L2_SUBDEV_NAME_SIZE 32 |
430 | 477 | ||
431 | /* Set this flag if this subdev is a i2c device. */ | 478 | /* Set this flag if this subdev is a i2c device. */ |
432 | #define V4L2_SUBDEV_FL_IS_I2C (1U << 0) | 479 | #define V4L2_SUBDEV_FL_IS_I2C (1U << 0) |
433 | /* Set this flag if this subdev is a spi device. */ | 480 | /* Set this flag if this subdev is a spi device. */ |
434 | #define V4L2_SUBDEV_FL_IS_SPI (1U << 1) | 481 | #define V4L2_SUBDEV_FL_IS_SPI (1U << 1) |
482 | /* Set this flag if this subdev needs a device node. */ | ||
483 | #define V4L2_SUBDEV_FL_HAS_DEVNODE (1U << 2) | ||
484 | /* Set this flag if this subdev generates events. */ | ||
485 | #define V4L2_SUBDEV_FL_HAS_EVENTS (1U << 3) | ||
435 | 486 | ||
436 | /* Each instance of a subdev driver should create this struct, either | 487 | /* Each instance of a subdev driver should create this struct, either |
437 | stand-alone or embedded in a larger struct. | 488 | stand-alone or embedded in a larger struct. |
438 | */ | 489 | */ |
439 | struct v4l2_subdev { | 490 | struct v4l2_subdev { |
491 | #if defined(CONFIG_MEDIA_CONTROLLER) | ||
492 | struct media_entity entity; | ||
493 | #endif | ||
440 | struct list_head list; | 494 | struct list_head list; |
441 | struct module *owner; | 495 | struct module *owner; |
442 | u32 flags; | 496 | u32 flags; |
@@ -453,8 +507,47 @@ struct v4l2_subdev { | |||
453 | /* pointer to private data */ | 507 | /* pointer to private data */ |
454 | void *dev_priv; | 508 | void *dev_priv; |
455 | void *host_priv; | 509 | void *host_priv; |
510 | /* subdev device node */ | ||
511 | struct video_device devnode; | ||
512 | /* number of events to be allocated on open */ | ||
513 | unsigned int nevents; | ||
514 | }; | ||
515 | |||
516 | #define media_entity_to_v4l2_subdev(ent) \ | ||
517 | container_of(ent, struct v4l2_subdev, entity) | ||
518 | #define vdev_to_v4l2_subdev(vdev) \ | ||
519 | container_of(vdev, struct v4l2_subdev, devnode) | ||
520 | |||
521 | /* | ||
522 | * Used for storing subdev information per file handle | ||
523 | */ | ||
524 | struct v4l2_subdev_fh { | ||
525 | struct v4l2_fh vfh; | ||
526 | #if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) | ||
527 | struct v4l2_mbus_framefmt *try_fmt; | ||
528 | struct v4l2_rect *try_crop; | ||
529 | #endif | ||
456 | }; | 530 | }; |
457 | 531 | ||
532 | #define to_v4l2_subdev_fh(fh) \ | ||
533 | container_of(fh, struct v4l2_subdev_fh, vfh) | ||
534 | |||
535 | #if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) | ||
536 | static inline struct v4l2_mbus_framefmt * | ||
537 | v4l2_subdev_get_try_format(struct v4l2_subdev_fh *fh, unsigned int pad) | ||
538 | { | ||
539 | return &fh->try_fmt[pad]; | ||
540 | } | ||
541 | |||
542 | static inline struct v4l2_rect * | ||
543 | v4l2_subdev_get_try_crop(struct v4l2_subdev_fh *fh, unsigned int pad) | ||
544 | { | ||
545 | return &fh->try_crop[pad]; | ||
546 | } | ||
547 | #endif | ||
548 | |||
549 | extern const struct v4l2_file_operations v4l2_subdev_fops; | ||
550 | |||
458 | static inline void v4l2_set_subdevdata(struct v4l2_subdev *sd, void *p) | 551 | static inline void v4l2_set_subdevdata(struct v4l2_subdev *sd, void *p) |
459 | { | 552 | { |
460 | sd->dev_priv = p; | 553 | sd->dev_priv = p; |
@@ -475,20 +568,8 @@ static inline void *v4l2_get_subdev_hostdata(const struct v4l2_subdev *sd) | |||
475 | return sd->host_priv; | 568 | return sd->host_priv; |
476 | } | 569 | } |
477 | 570 | ||
478 | static inline void v4l2_subdev_init(struct v4l2_subdev *sd, | 571 | void v4l2_subdev_init(struct v4l2_subdev *sd, |
479 | const struct v4l2_subdev_ops *ops) | 572 | const struct v4l2_subdev_ops *ops); |
480 | { | ||
481 | INIT_LIST_HEAD(&sd->list); | ||
482 | /* ops->core MUST be set */ | ||
483 | BUG_ON(!ops || !ops->core); | ||
484 | sd->ops = ops; | ||
485 | sd->v4l2_dev = NULL; | ||
486 | sd->flags = 0; | ||
487 | sd->name[0] = '\0'; | ||
488 | sd->grp_id = 0; | ||
489 | sd->dev_priv = NULL; | ||
490 | sd->host_priv = NULL; | ||
491 | } | ||
492 | 573 | ||
493 | /* Call an ops of a v4l2_subdev, doing the right checks against | 574 | /* Call an ops of a v4l2_subdev, doing the right checks against |
494 | NULL pointers. | 575 | NULL pointers. |
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h new file mode 100644 index 000000000000..f87472acbc51 --- /dev/null +++ b/include/media/videobuf2-core.h | |||
@@ -0,0 +1,380 @@ | |||
1 | /* | ||
2 | * videobuf2-core.h - V4L2 driver helper framework | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics | ||
5 | * | ||
6 | * Author: Pawel Osciak <pawel@osciak.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef _MEDIA_VIDEOBUF2_CORE_H | ||
13 | #define _MEDIA_VIDEOBUF2_CORE_H | ||
14 | |||
15 | #include <linux/mm_types.h> | ||
16 | #include <linux/mutex.h> | ||
17 | #include <linux/poll.h> | ||
18 | #include <linux/videodev2.h> | ||
19 | |||
20 | struct vb2_alloc_ctx; | ||
21 | struct vb2_fileio_data; | ||
22 | |||
23 | /** | ||
24 | * struct vb2_mem_ops - memory handling/memory allocator operations | ||
25 | * @alloc: allocate video memory and, optionally, allocator private data, | ||
26 | * return NULL on failure or a pointer to allocator private, | ||
27 | * per-buffer data on success; the returned private structure | ||
28 | * will then be passed as buf_priv argument to other ops in this | ||
29 | * structure | ||
30 | * @put: inform the allocator that the buffer will no longer be used; | ||
31 | * usually will result in the allocator freeing the buffer (if | ||
32 | * no other users of this buffer are present); the buf_priv | ||
33 | * argument is the allocator private per-buffer structure | ||
34 | * previously returned from the alloc callback | ||
35 | * @get_userptr: acquire userspace memory for a hardware operation; used for | ||
36 | * USERPTR memory types; vaddr is the address passed to the | ||
37 | * videobuf layer when queuing a video buffer of USERPTR type; | ||
38 | * should return an allocator private per-buffer structure | ||
39 | * associated with the buffer on success, NULL on failure; | ||
40 | * the returned private structure will then be passed as buf_priv | ||
41 | * argument to other ops in this structure | ||
42 | * @put_userptr: inform the allocator that a USERPTR buffer will no longer | ||
43 | * be used | ||
44 | * @vaddr: return a kernel virtual address to a given memory buffer | ||
45 | * associated with the passed private structure or NULL if no | ||
46 | * such mapping exists | ||
47 | * @cookie: return allocator specific cookie for a given memory buffer | ||
48 | * associated with the passed private structure or NULL if not | ||
49 | * available | ||
50 | * @num_users: return the current number of users of a memory buffer; | ||
51 | * return 1 if the videobuf layer (or actually the driver using | ||
52 | * it) is the only user | ||
53 | * @mmap: setup a userspace mapping for a given memory buffer under | ||
54 | * the provided virtual memory region | ||
55 | * | ||
56 | * Required ops for USERPTR types: get_userptr, put_userptr. | ||
57 | * Required ops for MMAP types: alloc, put, num_users, mmap. | ||
58 | * Required ops for read/write access types: alloc, put, num_users, vaddr | ||
59 | */ | ||
60 | struct vb2_mem_ops { | ||
61 | void *(*alloc)(void *alloc_ctx, unsigned long size); | ||
62 | void (*put)(void *buf_priv); | ||
63 | |||
64 | void *(*get_userptr)(void *alloc_ctx, unsigned long vaddr, | ||
65 | unsigned long size, int write); | ||
66 | void (*put_userptr)(void *buf_priv); | ||
67 | |||
68 | void *(*vaddr)(void *buf_priv); | ||
69 | void *(*cookie)(void *buf_priv); | ||
70 | |||
71 | unsigned int (*num_users)(void *buf_priv); | ||
72 | |||
73 | int (*mmap)(void *buf_priv, struct vm_area_struct *vma); | ||
74 | }; | ||
75 | |||
76 | struct vb2_plane { | ||
77 | void *mem_priv; | ||
78 | int mapped:1; | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * enum vb2_io_modes - queue access methods | ||
83 | * @VB2_MMAP: driver supports MMAP with streaming API | ||
84 | * @VB2_USERPTR: driver supports USERPTR with streaming API | ||
85 | * @VB2_READ: driver supports read() style access | ||
86 | * @VB2_WRITE: driver supports write() style access | ||
87 | */ | ||
88 | enum vb2_io_modes { | ||
89 | VB2_MMAP = (1 << 0), | ||
90 | VB2_USERPTR = (1 << 1), | ||
91 | VB2_READ = (1 << 2), | ||
92 | VB2_WRITE = (1 << 3), | ||
93 | }; | ||
94 | |||
95 | /** | ||
96 | * enum vb2_fileio_flags - flags for selecting a mode of the file io emulator, | ||
97 | * by default the 'streaming' style is used by the file io emulator | ||
98 | * @VB2_FILEIO_READ_ONCE: report EOF after reading the first buffer | ||
99 | * @VB2_FILEIO_WRITE_IMMEDIATELY: queue buffer after each write() call | ||
100 | */ | ||
101 | enum vb2_fileio_flags { | ||
102 | VB2_FILEIO_READ_ONCE = (1 << 0), | ||
103 | VB2_FILEIO_WRITE_IMMEDIATELY = (1 << 1), | ||
104 | }; | ||
105 | |||
106 | /** | ||
107 | * enum vb2_buffer_state - current video buffer state | ||
108 | * @VB2_BUF_STATE_DEQUEUED: buffer under userspace control | ||
109 | * @VB2_BUF_STATE_QUEUED: buffer queued in videobuf, but not in driver | ||
110 | * @VB2_BUF_STATE_ACTIVE: buffer queued in driver and possibly used | ||
111 | * in a hardware operation | ||
112 | * @VB2_BUF_STATE_DONE: buffer returned from driver to videobuf, but | ||
113 | * not yet dequeued to userspace | ||
114 | * @VB2_BUF_STATE_ERROR: same as above, but the operation on the buffer | ||
115 | * has ended with an error, which will be reported | ||
116 | * to the userspace when it is dequeued | ||
117 | */ | ||
118 | enum vb2_buffer_state { | ||
119 | VB2_BUF_STATE_DEQUEUED, | ||
120 | VB2_BUF_STATE_QUEUED, | ||
121 | VB2_BUF_STATE_ACTIVE, | ||
122 | VB2_BUF_STATE_DONE, | ||
123 | VB2_BUF_STATE_ERROR, | ||
124 | }; | ||
125 | |||
126 | struct vb2_queue; | ||
127 | |||
128 | /** | ||
129 | * struct vb2_buffer - represents a video buffer | ||
130 | * @v4l2_buf: struct v4l2_buffer associated with this buffer; can | ||
131 | * be read by the driver and relevant entries can be | ||
132 | * changed by the driver in case of CAPTURE types | ||
133 | * (such as timestamp) | ||
134 | * @v4l2_planes: struct v4l2_planes associated with this buffer; can | ||
135 | * be read by the driver and relevant entries can be | ||
136 | * changed by the driver in case of CAPTURE types | ||
137 | * (such as bytesused); NOTE that even for single-planar | ||
138 | * types, the v4l2_planes[0] struct should be used | ||
139 | * instead of v4l2_buf for filling bytesused - drivers | ||
140 | * should use the vb2_set_plane_payload() function for that | ||
141 | * @vb2_queue: the queue to which this driver belongs | ||
142 | * @num_planes: number of planes in the buffer | ||
143 | * on an internal driver queue | ||
144 | * @state: current buffer state; do not change | ||
145 | * @queued_entry: entry on the queued buffers list, which holds all | ||
146 | * buffers queued from userspace | ||
147 | * @done_entry: entry on the list that stores all buffers ready to | ||
148 | * be dequeued to userspace | ||
149 | * @planes: private per-plane information; do not change | ||
150 | * @num_planes_mapped: number of mapped planes; do not change | ||
151 | */ | ||
152 | struct vb2_buffer { | ||
153 | struct v4l2_buffer v4l2_buf; | ||
154 | struct v4l2_plane v4l2_planes[VIDEO_MAX_PLANES]; | ||
155 | |||
156 | struct vb2_queue *vb2_queue; | ||
157 | |||
158 | unsigned int num_planes; | ||
159 | |||
160 | /* Private: internal use only */ | ||
161 | enum vb2_buffer_state state; | ||
162 | |||
163 | struct list_head queued_entry; | ||
164 | struct list_head done_entry; | ||
165 | |||
166 | struct vb2_plane planes[VIDEO_MAX_PLANES]; | ||
167 | unsigned int num_planes_mapped; | ||
168 | }; | ||
169 | |||
170 | /** | ||
171 | * struct vb2_ops - driver-specific callbacks | ||
172 | * | ||
173 | * @queue_setup: called from a VIDIOC_REQBUFS handler, before | ||
174 | * memory allocation; driver should return the required | ||
175 | * number of buffers in num_buffers, the required number | ||
176 | * of planes per buffer in num_planes; the size of each | ||
177 | * plane should be set in the sizes[] array and optional | ||
178 | * per-plane allocator specific context in alloc_ctxs[] | ||
179 | * array | ||
180 | * @wait_prepare: release any locks taken while calling vb2 functions; | ||
181 | * it is called before an ioctl needs to wait for a new | ||
182 | * buffer to arrive; required to avoid a deadlock in | ||
183 | * blocking access type | ||
184 | * @wait_finish: reacquire all locks released in the previous callback; | ||
185 | * required to continue operation after sleeping while | ||
186 | * waiting for a new buffer to arrive | ||
187 | * @buf_init: called once after allocating a buffer (in MMAP case) | ||
188 | * or after acquiring a new USERPTR buffer; drivers may | ||
189 | * perform additional buffer-related initialization; | ||
190 | * initialization failure (return != 0) will prevent | ||
191 | * queue setup from completing successfully; optional | ||
192 | * @buf_prepare: called every time the buffer is queued from userspace; | ||
193 | * drivers may perform any initialization required before | ||
194 | * each hardware operation in this callback; | ||
195 | * if an error is returned, the buffer will not be queued | ||
196 | * in driver; optional | ||
197 | * @buf_finish: called before every dequeue of the buffer back to | ||
198 | * userspace; drivers may perform any operations required | ||
199 | * before userspace accesses the buffer; optional | ||
200 | * @buf_cleanup: called once before the buffer is freed; drivers may | ||
201 | * perform any additional cleanup; optional | ||
202 | * @start_streaming: called once before entering 'streaming' state; enables | ||
203 | * driver to receive buffers over buf_queue() callback | ||
204 | * @stop_streaming: called when 'streaming' state must be disabled; driver | ||
205 | * should stop any DMA transactions or wait until they | ||
206 | * finish and give back all buffers it got from buf_queue() | ||
207 | * callback; may use vb2_wait_for_all_buffers() function | ||
208 | * @buf_queue: passes buffer vb to the driver; driver may start | ||
209 | * hardware operation on this buffer; driver should give | ||
210 | * the buffer back by calling vb2_buffer_done() function | ||
211 | */ | ||
212 | struct vb2_ops { | ||
213 | int (*queue_setup)(struct vb2_queue *q, unsigned int *num_buffers, | ||
214 | unsigned int *num_planes, unsigned long sizes[], | ||
215 | void *alloc_ctxs[]); | ||
216 | |||
217 | void (*wait_prepare)(struct vb2_queue *q); | ||
218 | void (*wait_finish)(struct vb2_queue *q); | ||
219 | |||
220 | int (*buf_init)(struct vb2_buffer *vb); | ||
221 | int (*buf_prepare)(struct vb2_buffer *vb); | ||
222 | int (*buf_finish)(struct vb2_buffer *vb); | ||
223 | void (*buf_cleanup)(struct vb2_buffer *vb); | ||
224 | |||
225 | int (*start_streaming)(struct vb2_queue *q); | ||
226 | int (*stop_streaming)(struct vb2_queue *q); | ||
227 | |||
228 | void (*buf_queue)(struct vb2_buffer *vb); | ||
229 | }; | ||
230 | |||
231 | /** | ||
232 | * struct vb2_queue - a videobuf queue | ||
233 | * | ||
234 | * @type: queue type (see V4L2_BUF_TYPE_* in linux/videodev2.h | ||
235 | * @io_modes: supported io methods (see vb2_io_modes enum) | ||
236 | * @io_flags: additional io flags (see vb2_fileio_flags enum) | ||
237 | * @ops: driver-specific callbacks | ||
238 | * @mem_ops: memory allocator specific callbacks | ||
239 | * @drv_priv: driver private data | ||
240 | * @buf_struct_size: size of the driver-specific buffer structure; | ||
241 | * "0" indicates the driver doesn't want to use a custom buffer | ||
242 | * structure type, so sizeof(struct vb2_buffer) will is used | ||
243 | * | ||
244 | * @memory: current memory type used | ||
245 | * @bufs: videobuf buffer structures | ||
246 | * @num_buffers: number of allocated/used buffers | ||
247 | * @queued_list: list of buffers currently queued from userspace | ||
248 | * @queued_count: number of buffers owned by the driver | ||
249 | * @done_list: list of buffers ready to be dequeued to userspace | ||
250 | * @done_lock: lock to protect done_list list | ||
251 | * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued | ||
252 | * @alloc_ctx: memory type/allocator-specific contexts for each plane | ||
253 | * @streaming: current streaming state | ||
254 | * @fileio: file io emulator internal data, used only if emulator is active | ||
255 | */ | ||
256 | struct vb2_queue { | ||
257 | enum v4l2_buf_type type; | ||
258 | unsigned int io_modes; | ||
259 | unsigned int io_flags; | ||
260 | |||
261 | const struct vb2_ops *ops; | ||
262 | const struct vb2_mem_ops *mem_ops; | ||
263 | void *drv_priv; | ||
264 | unsigned int buf_struct_size; | ||
265 | |||
266 | /* private: internal use only */ | ||
267 | enum v4l2_memory memory; | ||
268 | struct vb2_buffer *bufs[VIDEO_MAX_FRAME]; | ||
269 | unsigned int num_buffers; | ||
270 | |||
271 | struct list_head queued_list; | ||
272 | |||
273 | atomic_t queued_count; | ||
274 | struct list_head done_list; | ||
275 | spinlock_t done_lock; | ||
276 | wait_queue_head_t done_wq; | ||
277 | |||
278 | void *alloc_ctx[VIDEO_MAX_PLANES]; | ||
279 | |||
280 | unsigned int streaming:1; | ||
281 | |||
282 | struct vb2_fileio_data *fileio; | ||
283 | }; | ||
284 | |||
285 | void *vb2_plane_vaddr(struct vb2_buffer *vb, unsigned int plane_no); | ||
286 | void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no); | ||
287 | |||
288 | void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state); | ||
289 | int vb2_wait_for_all_buffers(struct vb2_queue *q); | ||
290 | |||
291 | int vb2_querybuf(struct vb2_queue *q, struct v4l2_buffer *b); | ||
292 | int vb2_reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req); | ||
293 | |||
294 | int vb2_queue_init(struct vb2_queue *q); | ||
295 | |||
296 | void vb2_queue_release(struct vb2_queue *q); | ||
297 | |||
298 | int vb2_qbuf(struct vb2_queue *q, struct v4l2_buffer *b); | ||
299 | int vb2_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b, bool nonblocking); | ||
300 | |||
301 | int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type); | ||
302 | int vb2_streamoff(struct vb2_queue *q, enum v4l2_buf_type type); | ||
303 | |||
304 | int vb2_mmap(struct vb2_queue *q, struct vm_area_struct *vma); | ||
305 | unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait); | ||
306 | size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, | ||
307 | loff_t *ppos, int nonblock); | ||
308 | size_t vb2_write(struct vb2_queue *q, char __user *data, size_t count, | ||
309 | loff_t *ppos, int nonblock); | ||
310 | |||
311 | /** | ||
312 | * vb2_is_streaming() - return streaming status of the queue | ||
313 | * @q: videobuf queue | ||
314 | */ | ||
315 | static inline bool vb2_is_streaming(struct vb2_queue *q) | ||
316 | { | ||
317 | return q->streaming; | ||
318 | } | ||
319 | |||
320 | /** | ||
321 | * vb2_is_busy() - return busy status of the queue | ||
322 | * @q: videobuf queue | ||
323 | * | ||
324 | * This function checks if queue has any buffers allocated. | ||
325 | */ | ||
326 | static inline bool vb2_is_busy(struct vb2_queue *q) | ||
327 | { | ||
328 | return (q->num_buffers > 0); | ||
329 | } | ||
330 | |||
331 | /** | ||
332 | * vb2_get_drv_priv() - return driver private data associated with the queue | ||
333 | * @q: videobuf queue | ||
334 | */ | ||
335 | static inline void *vb2_get_drv_priv(struct vb2_queue *q) | ||
336 | { | ||
337 | return q->drv_priv; | ||
338 | } | ||
339 | |||
340 | /** | ||
341 | * vb2_set_plane_payload() - set bytesused for the plane plane_no | ||
342 | * @vb: buffer for which plane payload should be set | ||
343 | * @plane_no: plane number for which payload should be set | ||
344 | * @size: payload in bytes | ||
345 | */ | ||
346 | static inline void vb2_set_plane_payload(struct vb2_buffer *vb, | ||
347 | unsigned int plane_no, unsigned long size) | ||
348 | { | ||
349 | if (plane_no < vb->num_planes) | ||
350 | vb->v4l2_planes[plane_no].bytesused = size; | ||
351 | } | ||
352 | |||
353 | /** | ||
354 | * vb2_get_plane_payload() - get bytesused for the plane plane_no | ||
355 | * @vb: buffer for which plane payload should be set | ||
356 | * @plane_no: plane number for which payload should be set | ||
357 | * @size: payload in bytes | ||
358 | */ | ||
359 | static inline unsigned long vb2_get_plane_payload(struct vb2_buffer *vb, | ||
360 | unsigned int plane_no) | ||
361 | { | ||
362 | if (plane_no < vb->num_planes) | ||
363 | return vb->v4l2_planes[plane_no].bytesused; | ||
364 | return 0; | ||
365 | } | ||
366 | |||
367 | /** | ||
368 | * vb2_plane_size() - return plane size in bytes | ||
369 | * @vb: buffer for which plane size should be returned | ||
370 | * @plane_no: plane number for which size should be returned | ||
371 | */ | ||
372 | static inline unsigned long | ||
373 | vb2_plane_size(struct vb2_buffer *vb, unsigned int plane_no) | ||
374 | { | ||
375 | if (plane_no < vb->num_planes) | ||
376 | return vb->v4l2_planes[plane_no].length; | ||
377 | return 0; | ||
378 | } | ||
379 | |||
380 | #endif /* _MEDIA_VIDEOBUF2_CORE_H */ | ||
diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h new file mode 100644 index 000000000000..7e6c68b23773 --- /dev/null +++ b/include/media/videobuf2-dma-contig.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * videobuf2-dma-coherent.h - DMA coherent memory allocator for videobuf2 | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics | ||
5 | * | ||
6 | * Author: Pawel Osciak <pawel@osciak.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef _MEDIA_VIDEOBUF2_DMA_COHERENT_H | ||
14 | #define _MEDIA_VIDEOBUF2_DMA_COHERENT_H | ||
15 | |||
16 | #include <media/videobuf2-core.h> | ||
17 | #include <linux/dma-mapping.h> | ||
18 | |||
19 | static inline dma_addr_t | ||
20 | vb2_dma_contig_plane_paddr(struct vb2_buffer *vb, unsigned int plane_no) | ||
21 | { | ||
22 | dma_addr_t *paddr = vb2_plane_cookie(vb, plane_no); | ||
23 | |||
24 | return *paddr; | ||
25 | } | ||
26 | |||
27 | void *vb2_dma_contig_init_ctx(struct device *dev); | ||
28 | void vb2_dma_contig_cleanup_ctx(void *alloc_ctx); | ||
29 | |||
30 | extern const struct vb2_mem_ops vb2_dma_contig_memops; | ||
31 | |||
32 | #endif | ||
diff --git a/include/media/videobuf2-dma-sg.h b/include/media/videobuf2-dma-sg.h new file mode 100644 index 000000000000..0038526b8ef7 --- /dev/null +++ b/include/media/videobuf2-dma-sg.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * videobuf2-dma-sg.h - DMA scatter/gather memory allocator for videobuf2 | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics | ||
5 | * | ||
6 | * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef _MEDIA_VIDEOBUF2_DMA_SG_H | ||
14 | #define _MEDIA_VIDEOBUF2_DMA_SG_H | ||
15 | |||
16 | #include <media/videobuf2-core.h> | ||
17 | |||
18 | struct vb2_dma_sg_desc { | ||
19 | unsigned long size; | ||
20 | unsigned int num_pages; | ||
21 | struct scatterlist *sglist; | ||
22 | }; | ||
23 | |||
24 | static inline struct vb2_dma_sg_desc *vb2_dma_sg_plane_desc( | ||
25 | struct vb2_buffer *vb, unsigned int plane_no) | ||
26 | { | ||
27 | return (struct vb2_dma_sg_desc *)vb2_plane_cookie(vb, plane_no); | ||
28 | } | ||
29 | |||
30 | extern const struct vb2_mem_ops vb2_dma_sg_memops; | ||
31 | |||
32 | #endif | ||
diff --git a/include/media/videobuf2-memops.h b/include/media/videobuf2-memops.h new file mode 100644 index 000000000000..84e1f6c031c5 --- /dev/null +++ b/include/media/videobuf2-memops.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * videobuf2-memops.h - generic memory handling routines for videobuf2 | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics | ||
5 | * | ||
6 | * Author: Pawel Osciak <pawel@osciak.com> | ||
7 | * Marek Szyprowski <m.szyprowski@samsung.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef _MEDIA_VIDEOBUF2_MEMOPS_H | ||
15 | #define _MEDIA_VIDEOBUF2_MEMOPS_H | ||
16 | |||
17 | #include <media/videobuf2-core.h> | ||
18 | |||
19 | /** | ||
20 | * vb2_vmarea_handler - common vma refcount tracking handler | ||
21 | * @refcount: pointer to refcount entry in the buffer | ||
22 | * @put: callback to function that decreases buffer refcount | ||
23 | * @arg: argument for @put callback | ||
24 | */ | ||
25 | struct vb2_vmarea_handler { | ||
26 | atomic_t *refcount; | ||
27 | void (*put)(void *arg); | ||
28 | void *arg; | ||
29 | }; | ||
30 | |||
31 | extern const struct vm_operations_struct vb2_common_vm_ops; | ||
32 | |||
33 | int vb2_get_contig_userptr(unsigned long vaddr, unsigned long size, | ||
34 | struct vm_area_struct **res_vma, dma_addr_t *res_pa); | ||
35 | |||
36 | int vb2_mmap_pfn_range(struct vm_area_struct *vma, unsigned long paddr, | ||
37 | unsigned long size, | ||
38 | const struct vm_operations_struct *vm_ops, | ||
39 | void *priv); | ||
40 | |||
41 | struct vm_area_struct *vb2_get_vma(struct vm_area_struct *vma); | ||
42 | void vb2_put_vma(struct vm_area_struct *vma); | ||
43 | |||
44 | |||
45 | #endif | ||
diff --git a/include/media/videobuf2-vmalloc.h b/include/media/videobuf2-vmalloc.h new file mode 100644 index 000000000000..93a76b43038d --- /dev/null +++ b/include/media/videobuf2-vmalloc.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * videobuf2-vmalloc.h - vmalloc memory allocator for videobuf2 | ||
3 | * | ||
4 | * Copyright (C) 2010 Samsung Electronics | ||
5 | * | ||
6 | * Author: Pawel Osciak <pawel@osciak.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef _MEDIA_VIDEOBUF2_VMALLOC_H | ||
14 | #define _MEDIA_VIDEOBUF2_VMALLOC_H | ||
15 | |||
16 | #include <media/videobuf2-core.h> | ||
17 | |||
18 | extern const struct vb2_mem_ops vb2_vmalloc_memops; | ||
19 | |||
20 | #endif | ||
diff --git a/include/media/wm8775.h b/include/media/wm8775.h index 60739c5a23ae..d0e801a9935c 100644 --- a/include/media/wm8775.h +++ b/include/media/wm8775.h | |||
@@ -32,4 +32,13 @@ | |||
32 | #define WM8775_AIN3 4 | 32 | #define WM8775_AIN3 4 |
33 | #define WM8775_AIN4 8 | 33 | #define WM8775_AIN4 8 |
34 | 34 | ||
35 | |||
36 | struct wm8775_platform_data { | ||
37 | /* | ||
38 | * FIXME: Instead, we should parametrize the params | ||
39 | * that need different settings between ivtv, pvrusb2, and Nova-S | ||
40 | */ | ||
41 | bool is_nova_s; | ||
42 | }; | ||
43 | |||
35 | #endif | 44 | #endif |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 6b75a6971346..d2df55b0c213 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -119,7 +119,7 @@ do { \ | |||
119 | * @P9_TREAD: request to transfer data from a file or directory | 119 | * @P9_TREAD: request to transfer data from a file or directory |
120 | * @P9_RREAD: response with data requested | 120 | * @P9_RREAD: response with data requested |
121 | * @P9_TWRITE: reuqest to transfer data to a file | 121 | * @P9_TWRITE: reuqest to transfer data to a file |
122 | * @P9_RWRITE: response with out much data was transfered to file | 122 | * @P9_RWRITE: response with out much data was transferred to file |
123 | * @P9_TCLUNK: forget about a handle to an entity within the file system | 123 | * @P9_TCLUNK: forget about a handle to an entity within the file system |
124 | * @P9_RCLUNK: response when server has forgotten about the handle | 124 | * @P9_RCLUNK: response when server has forgotten about the handle |
125 | * @P9_TREMOVE: request to remove an entity from the hierarchy | 125 | * @P9_TREMOVE: request to remove an entity from the hierarchy |
@@ -139,8 +139,6 @@ do { \ | |||
139 | */ | 139 | */ |
140 | 140 | ||
141 | enum p9_msg_t { | 141 | enum p9_msg_t { |
142 | P9_TSYNCFS = 0, | ||
143 | P9_RSYNCFS, | ||
144 | P9_TLERROR = 6, | 142 | P9_TLERROR = 6, |
145 | P9_RLERROR, | 143 | P9_RLERROR, |
146 | P9_TSTATFS = 8, | 144 | P9_TSTATFS = 8, |
@@ -294,7 +292,7 @@ enum p9_perm_t { | |||
294 | * | 292 | * |
295 | * QID types are a subset of permissions - they are primarily | 293 | * QID types are a subset of permissions - they are primarily |
296 | * used to differentiate semantics for a file system entity via | 294 | * used to differentiate semantics for a file system entity via |
297 | * a jump-table. Their value is also the most signifigant 16 bits | 295 | * a jump-table. Their value is also the most significant 16 bits |
298 | * of the permission_t | 296 | * of the permission_t |
299 | * | 297 | * |
300 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat | 298 | * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat |
@@ -366,8 +364,8 @@ struct p9_qid { | |||
366 | /** | 364 | /** |
367 | * struct p9_stat - file system metadata information | 365 | * struct p9_stat - file system metadata information |
368 | * @size: length prefix for this stat structure instance | 366 | * @size: length prefix for this stat structure instance |
369 | * @type: the type of the server (equivilent to a major number) | 367 | * @type: the type of the server (equivalent to a major number) |
370 | * @dev: the sub-type of the server (equivilent to a minor number) | 368 | * @dev: the sub-type of the server (equivalent to a minor number) |
371 | * @qid: unique id from the server of type &p9_qid | 369 | * @qid: unique id from the server of type &p9_qid |
372 | * @mode: Plan 9 format permissions of type &p9_perm_t | 370 | * @mode: Plan 9 format permissions of type &p9_perm_t |
373 | * @atime: Last access/read time | 371 | * @atime: Last access/read time |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 0a30977e3c1f..051a99f79769 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -101,7 +101,7 @@ enum p9_req_status_t { | |||
101 | * Transport use an array to track outstanding requests | 101 | * Transport use an array to track outstanding requests |
102 | * instead of a list. While this may incurr overhead during initial | 102 | * instead of a list. While this may incurr overhead during initial |
103 | * allocation or expansion, it makes request lookup much easier as the | 103 | * allocation or expansion, it makes request lookup much easier as the |
104 | * tag id is a index into an array. (We use tag+1 so that we can accomodate | 104 | * tag id is a index into an array. (We use tag+1 so that we can accommodate |
105 | * the -1 tag for the T_VERSION request). | 105 | * the -1 tag for the T_VERSION request). |
106 | * This also has the nice effect of only having to allocate wait_queues | 106 | * This also has the nice effect of only having to allocate wait_queues |
107 | * once, instead of constantly allocating and freeing them. Its possible | 107 | * once, instead of constantly allocating and freeing them. Its possible |
@@ -218,8 +218,8 @@ void p9_client_disconnect(struct p9_client *clnt); | |||
218 | void p9_client_begin_disconnect(struct p9_client *clnt); | 218 | void p9_client_begin_disconnect(struct p9_client *clnt); |
219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, | 219 | struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid, |
220 | char *uname, u32 n_uname, char *aname); | 220 | char *uname, u32 n_uname, char *aname); |
221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, int nwname, char **wnames, | 221 | struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname, |
222 | int clone); | 222 | char **wnames, int clone); |
223 | int p9_client_open(struct p9_fid *fid, int mode); | 223 | int p9_client_open(struct p9_fid *fid, int mode); |
224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, | 224 | int p9_client_fcreate(struct p9_fid *fid, char *name, u32 perm, int mode, |
225 | char *extension); | 225 | char *extension); |
@@ -230,7 +230,6 @@ int p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, | |||
230 | gid_t gid, struct p9_qid *qid); | 230 | gid_t gid, struct p9_qid *qid); |
231 | int p9_client_clunk(struct p9_fid *fid); | 231 | int p9_client_clunk(struct p9_fid *fid); |
232 | int p9_client_fsync(struct p9_fid *fid, int datasync); | 232 | int p9_client_fsync(struct p9_fid *fid, int datasync); |
233 | int p9_client_sync_fs(struct p9_fid *fid); | ||
234 | int p9_client_remove(struct p9_fid *fid); | 233 | int p9_client_remove(struct p9_fid *fid); |
235 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, | 234 | int p9_client_read(struct p9_fid *fid, char *data, char __user *udata, |
236 | u64 offset, u32 count); | 235 | u64 offset, u32 count); |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 82868f18c573..8f08c736c4c3 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | /* Default. Add Payload to PDU before sending it down to transport layer */ | 31 | /* Default. Add Payload to PDU before sending it down to transport layer */ |
32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 | 32 | #define P9_TRANS_PREF_PAYLOAD_DEF 0x0 |
33 | /* Send pay load seperately to transport layer along with PDU.*/ | 33 | /* Send pay load separately to transport layer along with PDU.*/ |
34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 | 34 | #define P9_TRANS_PREF_PAYLOAD_SEP 0x1 |
35 | 35 | ||
36 | /** | 36 | /** |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index ec6acf2f1c0b..2c0d309c7381 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -84,6 +84,8 @@ enum { | |||
84 | HCI_SERVICE_CACHE, | 84 | HCI_SERVICE_CACHE, |
85 | HCI_LINK_KEYS, | 85 | HCI_LINK_KEYS, |
86 | HCI_DEBUG_KEYS, | 86 | HCI_DEBUG_KEYS, |
87 | |||
88 | HCI_RESET, | ||
87 | }; | 89 | }; |
88 | 90 | ||
89 | /* HCI ioctl defines */ | 91 | /* HCI ioctl defines */ |
diff --git a/include/net/caif/cfcnfg.h b/include/net/caif/cfcnfg.h index f688478bfb84..f33d36341132 100644 --- a/include/net/caif/cfcnfg.h +++ b/include/net/caif/cfcnfg.h | |||
@@ -69,7 +69,7 @@ void cfcnfg_remove(struct cfcnfg *cfg); | |||
69 | * cfcnfg_add_adapt_layer to specify PHY for the link. | 69 | * cfcnfg_add_adapt_layer to specify PHY for the link. |
70 | * @pref: The phy (link layer) preference. | 70 | * @pref: The phy (link layer) preference. |
71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. | 71 | * @fcs: Specify if checksum is used in CAIF Framing Layer. |
72 | * @stx: Specify if Start Of Frame eXtention is used. | 72 | * @stx: Specify if Start Of Frame extension is used. |
73 | */ | 73 | */ |
74 | 74 | ||
75 | void | 75 | void |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 60f7876b6da8..b2b9d28cb4ab 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -486,7 +486,8 @@ struct rate_info { | |||
486 | * @plink_state: mesh peer link state | 486 | * @plink_state: mesh peer link state |
487 | * @signal: signal strength of last received packet in dBm | 487 | * @signal: signal strength of last received packet in dBm |
488 | * @signal_avg: signal strength average in dBm | 488 | * @signal_avg: signal strength average in dBm |
489 | * @txrate: current unicast bitrate to this station | 489 | * @txrate: current unicast bitrate from this station |
490 | * @rxrate: current unicast bitrate to this station | ||
490 | * @rx_packets: packets received from this station | 491 | * @rx_packets: packets received from this station |
491 | * @tx_packets: packets transmitted to this station | 492 | * @tx_packets: packets transmitted to this station |
492 | * @tx_retries: cumulative retry counts | 493 | * @tx_retries: cumulative retry counts |
diff --git a/include/net/dst.h b/include/net/dst.h index 2a46cbaef92d..75b95df4afe7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -345,7 +345,7 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) | |||
345 | 345 | ||
346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | 346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) |
347 | { | 347 | { |
348 | struct dst_entry *child = skb_dst(skb)->child; | 348 | struct dst_entry *child = dst_clone(skb_dst(skb)->child); |
349 | 349 | ||
350 | skb_dst_drop(skb); | 350 | skb_dst_drop(skb); |
351 | return child; | 351 | return child; |
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index fa157712e982..a79b6cfb02a8 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
@@ -11,7 +11,7 @@ struct gnet_dump { | |||
11 | struct sk_buff * skb; | 11 | struct sk_buff * skb; |
12 | struct nlattr * tail; | 12 | struct nlattr * tail; |
13 | 13 | ||
14 | /* Backward compatability */ | 14 | /* Backward compatibility */ |
15 | int compat_tc_stats; | 15 | int compat_tc_stats; |
16 | int compat_xstats; | 16 | int compat_xstats; |
17 | void * xstats; | 17 | void * xstats; |
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h index 04977eefb0ee..fccc2180c61b 100644 --- a/include/net/if_inet6.h +++ b/include/net/if_inet6.h | |||
@@ -286,5 +286,21 @@ static inline void ipv6_ib_mc_map(const struct in6_addr *addr, | |||
286 | buf[9] = broadcast[9]; | 286 | buf[9] = broadcast[9]; |
287 | memcpy(buf + 10, addr->s6_addr + 6, 10); | 287 | memcpy(buf + 10, addr->s6_addr + 6, 10); |
288 | } | 288 | } |
289 | |||
290 | static inline int ipv6_ipgre_mc_map(const struct in6_addr *addr, | ||
291 | const unsigned char *broadcast, char *buf) | ||
292 | { | ||
293 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) { | ||
294 | memcpy(buf, broadcast, 4); | ||
295 | } else { | ||
296 | /* v4mapped? */ | ||
297 | if ((addr->s6_addr32[0] | addr->s6_addr32[1] | | ||
298 | (addr->s6_addr32[2] ^ htonl(0x0000ffff))) != 0) | ||
299 | return -EINVAL; | ||
300 | memcpy(buf, &addr->s6_addr32[3], 4); | ||
301 | } | ||
302 | return 0; | ||
303 | } | ||
304 | |||
289 | #endif | 305 | #endif |
290 | #endif | 306 | #endif |
diff --git a/include/net/ip.h b/include/net/ip.h index a4f631108c54..7c416583b710 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -339,6 +339,14 @@ static inline void ip_ib_mc_map(__be32 naddr, const unsigned char *broadcast, ch | |||
339 | buf[16] = addr & 0x0f; | 339 | buf[16] = addr & 0x0f; |
340 | } | 340 | } |
341 | 341 | ||
342 | static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast, char *buf) | ||
343 | { | ||
344 | if ((broadcast[0] | broadcast[1] | broadcast[2] | broadcast[3]) != 0) | ||
345 | memcpy(buf, broadcast, 4); | ||
346 | else | ||
347 | memcpy(buf, &naddr, sizeof(naddr)); | ||
348 | } | ||
349 | |||
342 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 350 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
343 | #include <linux/ipv6.h> | 351 | #include <linux/ipv6.h> |
344 | #endif | 352 | #endif |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 642a80bb42cf..c850e5fb967c 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -70,7 +70,7 @@ static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt) | |||
70 | extern void ip6_route_input(struct sk_buff *skb); | 70 | extern void ip6_route_input(struct sk_buff *skb); |
71 | 71 | ||
72 | extern struct dst_entry * ip6_route_output(struct net *net, | 72 | extern struct dst_entry * ip6_route_output(struct net *net, |
73 | struct sock *sk, | 73 | const struct sock *sk, |
74 | struct flowi6 *fl6); | 74 | struct flowi6 *fl6); |
75 | 75 | ||
76 | extern int ip6_route_init(void); | 76 | extern int ip6_route_init(void); |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index a1a858035913..e5d66ec88cf6 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -51,7 +51,6 @@ struct fib_nh { | |||
51 | struct fib_info *nh_parent; | 51 | struct fib_info *nh_parent; |
52 | unsigned nh_flags; | 52 | unsigned nh_flags; |
53 | unsigned char nh_scope; | 53 | unsigned char nh_scope; |
54 | unsigned char nh_cfg_scope; | ||
55 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 54 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
56 | int nh_weight; | 55 | int nh_weight; |
57 | int nh_power; | 56 | int nh_power; |
@@ -62,6 +61,7 @@ struct fib_nh { | |||
62 | int nh_oif; | 61 | int nh_oif; |
63 | __be32 nh_gw; | 62 | __be32 nh_gw; |
64 | __be32 nh_saddr; | 63 | __be32 nh_saddr; |
64 | int nh_saddr_genid; | ||
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* | 67 | /* |
@@ -74,9 +74,10 @@ struct fib_info { | |||
74 | struct net *fib_net; | 74 | struct net *fib_net; |
75 | int fib_treeref; | 75 | int fib_treeref; |
76 | atomic_t fib_clntref; | 76 | atomic_t fib_clntref; |
77 | int fib_dead; | ||
78 | unsigned fib_flags; | 77 | unsigned fib_flags; |
79 | int fib_protocol; | 78 | unsigned char fib_dead; |
79 | unsigned char fib_protocol; | ||
80 | unsigned char fib_scope; | ||
80 | __be32 fib_prefsrc; | 81 | __be32 fib_prefsrc; |
81 | u32 fib_priority; | 82 | u32 fib_priority; |
82 | u32 *fib_metrics; | 83 | u32 *fib_metrics; |
@@ -141,12 +142,19 @@ struct fib_result_nl { | |||
141 | 142 | ||
142 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | 143 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ |
143 | 144 | ||
144 | #define FIB_RES_SADDR(res) (FIB_RES_NH(res).nh_saddr) | 145 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); |
146 | |||
147 | #define FIB_RES_SADDR(net, res) \ | ||
148 | ((FIB_RES_NH(res).nh_saddr_genid == \ | ||
149 | atomic_read(&(net)->ipv4.dev_addr_genid)) ? \ | ||
150 | FIB_RES_NH(res).nh_saddr : \ | ||
151 | fib_info_update_nh_saddr((net), &FIB_RES_NH(res))) | ||
145 | #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) | 152 | #define FIB_RES_GW(res) (FIB_RES_NH(res).nh_gw) |
146 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) | 153 | #define FIB_RES_DEV(res) (FIB_RES_NH(res).nh_dev) |
147 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) | 154 | #define FIB_RES_OIF(res) (FIB_RES_NH(res).nh_oif) |
148 | 155 | ||
149 | #define FIB_RES_PREFSRC(res) ((res).fi->fib_prefsrc ? : FIB_RES_SADDR(res)) | 156 | #define FIB_RES_PREFSRC(net, res) ((res).fi->fib_prefsrc ? : \ |
157 | FIB_RES_SADDR(net, res)) | ||
150 | 158 | ||
151 | struct fib_table { | 159 | struct fib_table { |
152 | struct hlist_node tb_hlist; | 160 | struct hlist_node tb_hlist; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 272f59336b73..d516f00c8e0f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -52,7 +52,7 @@ static inline struct net *skb_net(const struct sk_buff *skb) | |||
52 | */ | 52 | */ |
53 | if (likely(skb->dev && skb->dev->nd_net)) | 53 | if (likely(skb->dev && skb->dev->nd_net)) |
54 | return dev_net(skb->dev); | 54 | return dev_net(skb->dev); |
55 | if (skb_dst(skb)->dev) | 55 | if (skb_dst(skb) && skb_dst(skb)->dev) |
56 | return dev_net(skb_dst(skb)->dev); | 56 | return dev_net(skb_dst(skb)->dev); |
57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", | 57 | WARN(skb->sk, "Maybe skb_sknet should be used in %s() at line:%d\n", |
58 | __func__, __LINE__); | 58 | __func__, __LINE__); |
@@ -92,7 +92,7 @@ static inline struct net *skb_sknet(const struct sk_buff *skb) | |||
92 | } | 92 | } |
93 | /* | 93 | /* |
94 | * This one needed for single_open_net since net is stored directly in | 94 | * This one needed for single_open_net since net is stored directly in |
95 | * private not as a struct i.e. seq_file_net cant be used. | 95 | * private not as a struct i.e. seq_file_net can't be used. |
96 | */ | 96 | */ |
97 | static inline struct net *seq_file_single_net(struct seq_file *seq) | 97 | static inline struct net *seq_file_single_net(struct seq_file *seq) |
98 | { | 98 | { |
@@ -801,8 +801,6 @@ struct netns_ipvs { | |||
801 | struct list_head rs_table[IP_VS_RTAB_SIZE]; | 801 | struct list_head rs_table[IP_VS_RTAB_SIZE]; |
802 | /* ip_vs_app */ | 802 | /* ip_vs_app */ |
803 | struct list_head app_list; | 803 | struct list_head app_list; |
804 | struct mutex app_mutex; | ||
805 | struct lock_class_key app_key; /* mutex debuging */ | ||
806 | 804 | ||
807 | /* ip_vs_proto */ | 805 | /* ip_vs_proto */ |
808 | #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ | 806 | #define IP_VS_PROTO_TAB_SIZE 32 /* must be power of 2 */ |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index 17fcd964f9d9..fb4b76d5d7f1 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -204,7 +204,7 @@ struct irlap_cb { | |||
204 | 204 | ||
205 | notify_t notify; /* Callbacks to IrLMP */ | 205 | notify_t notify; /* Callbacks to IrLMP */ |
206 | 206 | ||
207 | int mtt_required; /* Minumum turnaround time required */ | 207 | int mtt_required; /* Minimum turnaround time required */ |
208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ | 208 | int xbofs_delay; /* Nr of XBOF's used to MTT */ |
209 | int bofs_count; /* Negotiated extra BOFs */ | 209 | int bofs_count; /* Negotiated extra BOFs */ |
210 | int next_bofs; /* Negotiated extra BOFs after next frame */ | 210 | int next_bofs; /* Negotiated extra BOFs after next frame */ |
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h index 2942ad6ab932..eef53ebe3d76 100644 --- a/include/net/irda/wrapper.h +++ b/include/net/irda/wrapper.h | |||
@@ -42,7 +42,7 @@ | |||
42 | 42 | ||
43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ | 43 | #define IRDA_TRANS 0x20 /* Asynchronous transparency modifier */ |
44 | 44 | ||
45 | /* States for receving a frame in async mode */ | 45 | /* States for receiving a frame in async mode */ |
46 | enum { | 46 | enum { |
47 | OUTSIDE_FRAME, | 47 | OUTSIDE_FRAME, |
48 | BEGIN_FRAME, | 48 | BEGIN_FRAME, |
diff --git a/include/net/iucv/iucv.h b/include/net/iucv/iucv.h index 205a3360156e..1121baa9f695 100644 --- a/include/net/iucv/iucv.h +++ b/include/net/iucv/iucv.h | |||
@@ -173,7 +173,7 @@ struct iucv_handler { | |||
173 | /* | 173 | /* |
174 | * The message_pending function is called after an icuv interrupt | 174 | * The message_pending function is called after an icuv interrupt |
175 | * type 0x06 or type 0x07 has been received. A new message is | 175 | * type 0x06 or type 0x07 has been received. A new message is |
176 | * availabe and can be received with iucv_message_receive. | 176 | * available and can be received with iucv_message_receive. |
177 | */ | 177 | */ |
178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); | 178 | void (*message_pending)(struct iucv_path *, struct iucv_message *); |
179 | /* | 179 | /* |
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h index 3afdb21cc31d..5d5a6a4732ef 100644 --- a/include/net/iw_handler.h +++ b/include/net/iw_handler.h | |||
@@ -91,7 +91,7 @@ | |||
91 | * -------------------- | 91 | * -------------------- |
92 | * The implementation goals were as follow : | 92 | * The implementation goals were as follow : |
93 | * o Obvious : you should not need a PhD to understand what's happening, | 93 | * o Obvious : you should not need a PhD to understand what's happening, |
94 | * the benefit is easier maintainance. | 94 | * the benefit is easier maintenance. |
95 | * o Flexible : it should accommodate a wide variety of driver | 95 | * o Flexible : it should accommodate a wide variety of driver |
96 | * implementations and be as flexible as the old API. | 96 | * implementations and be as flexible as the old API. |
97 | * o Lean : it should be efficient memory wise to minimise the impact | 97 | * o Lean : it should be efficient memory wise to minimise the impact |
@@ -129,7 +129,7 @@ | |||
129 | * | 129 | * |
130 | * Functions prototype uses union iwreq_data | 130 | * Functions prototype uses union iwreq_data |
131 | * ----------------------------------------- | 131 | * ----------------------------------------- |
132 | * Some would have prefered functions defined this way : | 132 | * Some would have preferred functions defined this way : |
133 | * static int mydriver_ioctl_setrate(struct net_device *dev, | 133 | * static int mydriver_ioctl_setrate(struct net_device *dev, |
134 | * long rate, int auto) | 134 | * long rate, int auto) |
135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and | 135 | * 1) The kernel code doesn't "validate" the content of iwreq_data, and |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 8650e7bf2ed0..025d4cc7bbf8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1160,7 +1160,7 @@ enum ieee80211_hw_flags { | |||
1160 | * @napi_weight: weight used for NAPI polling. You must specify an | 1160 | * @napi_weight: weight used for NAPI polling. You must specify an |
1161 | * appropriate value here if a napi_poll operation is provided | 1161 | * appropriate value here if a napi_poll operation is provided |
1162 | * by your driver. | 1162 | * by your driver. |
1163 | 1163 | * | |
1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of | 1164 | * @max_rx_aggregation_subframes: maximum buffer size (number of |
1165 | * sub-frames) to be used for A-MPDU block ack receiver | 1165 | * sub-frames) to be used for A-MPDU block ack receiver |
1166 | * aggregation. | 1166 | * aggregation. |
@@ -1294,7 +1294,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key | 1294 | * acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key |
1295 | * handler. | 1295 | * handler. |
1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. | 1296 | * The update_tkip_key() call updates the driver with the new phase 1 key. |
1297 | * This happens everytime the iv16 wraps around (every 65536 packets). The | 1297 | * This happens every time the iv16 wraps around (every 65536 packets). The |
1298 | * set_key() call will happen only once for each key (unless the AP did | 1298 | * set_key() call will happen only once for each key (unless the AP did |
1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is | 1299 | * rekeying), it will not include a valid phase 1 key. The valid phase 1 key is |
1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this | 1300 | * provided by update_tkip_key only. The trigger that makes mac80211 call this |
@@ -1753,8 +1753,19 @@ enum ieee80211_ampdu_mlme_action { | |||
1753 | * that TX/RX_STOP can pass NULL for this parameter. | 1753 | * that TX/RX_STOP can pass NULL for this parameter. |
1754 | * The @buf_size parameter is only valid when the action is set to | 1754 | * The @buf_size parameter is only valid when the action is set to |
1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder | 1755 | * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder |
1756 | * buffer size (number of subframes) for this session -- aggregates | 1756 | * buffer size (number of subframes) for this session -- the driver |
1757 | * containing more subframes than this may not be transmitted to the peer. | 1757 | * may neither send aggregates containing more subframes than this |
1758 | * nor send aggregates in a way that lost frames would exceed the | ||
1759 | * buffer size. If just limiting the aggregate size, this would be | ||
1760 | * possible with a buf_size of 8: | ||
1761 | * - TX: 1.....7 | ||
1762 | * - RX: 2....7 (lost frame #1) | ||
1763 | * - TX: 8..1... | ||
1764 | * which is invalid since #1 was now re-transmitted well past the | ||
1765 | * buffer size of 8. Correct ways to retransmit #1 would be: | ||
1766 | * - TX: 1 or 18 or 81 | ||
1767 | * Even "189" would be wrong since 1 could be lost again. | ||
1768 | * | ||
1758 | * Returns a negative error code on failure. | 1769 | * Returns a negative error code on failure. |
1759 | * The callback can sleep. | 1770 | * The callback can sleep. |
1760 | * | 1771 | * |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index e2e2ef57eca2..542195d9469e 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -55,6 +55,7 @@ struct netns_ipv4 { | |||
55 | int current_rt_cache_rebuild_count; | 55 | int current_rt_cache_rebuild_count; |
56 | 56 | ||
57 | atomic_t rt_genid; | 57 | atomic_t rt_genid; |
58 | atomic_t dev_addr_genid; | ||
58 | 59 | ||
59 | #ifdef CONFIG_IP_MROUTE | 60 | #ifdef CONFIG_IP_MROUTE |
60 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 61 | #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index d9549af6929a..65afc4966204 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -32,7 +32,7 @@ static inline void *qdisc_priv(struct Qdisc *q) | |||
32 | 32 | ||
33 | The result: [34]86 is not good choice for QoS router :-( | 33 | The result: [34]86 is not good choice for QoS router :-( |
34 | 34 | ||
35 | The things are not so bad, because we may use artifical | 35 | The things are not so bad, because we may use artificial |
36 | clock evaluated by integration of network data flow | 36 | clock evaluated by integration of network data flow |
37 | in the most critical places. | 37 | in the most critical places. |
38 | */ | 38 | */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 5ba9f02731eb..555dd198aab7 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -14,6 +14,12 @@ | |||
14 | 14 | ||
15 | #define ROSE_MIN_LEN 3 | 15 | #define ROSE_MIN_LEN 3 |
16 | 16 | ||
17 | #define ROSE_CALL_REQ_ADDR_LEN_OFF 3 | ||
18 | #define ROSE_CALL_REQ_ADDR_LEN_VAL 0xAA /* each address is 10 digits */ | ||
19 | #define ROSE_CALL_REQ_DEST_ADDR_OFF 4 | ||
20 | #define ROSE_CALL_REQ_SRC_ADDR_OFF 9 | ||
21 | #define ROSE_CALL_REQ_FACILITIES_OFF 14 | ||
22 | |||
17 | #define ROSE_GFI 0x10 | 23 | #define ROSE_GFI 0x10 |
18 | #define ROSE_Q_BIT 0x80 | 24 | #define ROSE_Q_BIT 0x80 |
19 | #define ROSE_D_BIT 0x40 | 25 | #define ROSE_D_BIT 0x40 |
@@ -214,7 +220,7 @@ extern void rose_requeue_frames(struct sock *); | |||
214 | extern int rose_validate_nr(struct sock *, unsigned short); | 220 | extern int rose_validate_nr(struct sock *, unsigned short); |
215 | extern void rose_write_internal(struct sock *, int); | 221 | extern void rose_write_internal(struct sock *, int); |
216 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); | 222 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); |
217 | extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *); | 223 | extern int rose_parse_facilities(unsigned char *, unsigned int, struct rose_facilities_struct *); |
218 | extern void rose_disconnect(struct sock *, int, int, int); | 224 | extern void rose_disconnect(struct sock *, int, int, int); |
219 | 225 | ||
220 | /* rose_timer.c */ | 226 | /* rose_timer.c */ |
diff --git a/include/net/route.h b/include/net/route.h index 30d6cae3841a..8fce0621cad1 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -64,6 +64,7 @@ struct rtable { | |||
64 | 64 | ||
65 | __be32 rt_dst; /* Path destination */ | 65 | __be32 rt_dst; /* Path destination */ |
66 | __be32 rt_src; /* Path source */ | 66 | __be32 rt_src; /* Path source */ |
67 | int rt_route_iif; | ||
67 | int rt_iif; | 68 | int rt_iif; |
68 | int rt_oif; | 69 | int rt_oif; |
69 | __u32 rt_mark; | 70 | __u32 rt_mark; |
@@ -80,12 +81,12 @@ struct rtable { | |||
80 | 81 | ||
81 | static inline bool rt_is_input_route(struct rtable *rt) | 82 | static inline bool rt_is_input_route(struct rtable *rt) |
82 | { | 83 | { |
83 | return rt->rt_iif != 0; | 84 | return rt->rt_route_iif != 0; |
84 | } | 85 | } |
85 | 86 | ||
86 | static inline bool rt_is_output_route(struct rtable *rt) | 87 | static inline bool rt_is_output_route(struct rtable *rt) |
87 | { | 88 | { |
88 | return rt->rt_iif == 0; | 89 | return rt->rt_route_iif == 0; |
89 | } | 90 | } |
90 | 91 | ||
91 | struct ip_rt_acct { | 92 | struct ip_rt_acct { |
@@ -207,6 +208,7 @@ extern int ip_rt_dump(struct sk_buff *skb, struct netlink_callback *cb); | |||
207 | 208 | ||
208 | struct in_ifaddr; | 209 | struct in_ifaddr; |
209 | extern void fib_add_ifaddr(struct in_ifaddr *); | 210 | extern void fib_add_ifaddr(struct in_ifaddr *); |
211 | extern void fib_del_ifaddr(struct in_ifaddr *, struct in_ifaddr *); | ||
210 | 212 | ||
211 | static inline void ip_rt_put(struct rtable * rt) | 213 | static inline void ip_rt_put(struct rtable * rt) |
212 | { | 214 | { |
@@ -269,8 +271,8 @@ static inline struct rtable *ip_route_newports(struct rtable *rt, | |||
269 | struct flowi4 fl4 = { | 271 | struct flowi4 fl4 = { |
270 | .flowi4_oif = rt->rt_oif, | 272 | .flowi4_oif = rt->rt_oif, |
271 | .flowi4_mark = rt->rt_mark, | 273 | .flowi4_mark = rt->rt_mark, |
272 | .daddr = rt->rt_key_dst, | 274 | .daddr = rt->rt_dst, |
273 | .saddr = rt->rt_key_src, | 275 | .saddr = rt->rt_src, |
274 | .flowi4_tos = rt->rt_tos, | 276 | .flowi4_tos = rt->rt_tos, |
275 | .flowi4_proto = protocol, | 277 | .flowi4_proto = protocol, |
276 | .fl4_sport = sport, | 278 | .fl4_sport = sport, |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a9505b6a18e3..b931f021d7ab 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -25,6 +25,7 @@ struct qdisc_rate_table { | |||
25 | enum qdisc_state_t { | 25 | enum qdisc_state_t { |
26 | __QDISC_STATE_SCHED, | 26 | __QDISC_STATE_SCHED, |
27 | __QDISC_STATE_DEACTIVATED, | 27 | __QDISC_STATE_DEACTIVATED, |
28 | __QDISC_STATE_THROTTLED, | ||
28 | }; | 29 | }; |
29 | 30 | ||
30 | /* | 31 | /* |
@@ -32,7 +33,6 @@ enum qdisc_state_t { | |||
32 | */ | 33 | */ |
33 | enum qdisc___state_t { | 34 | enum qdisc___state_t { |
34 | __QDISC___STATE_RUNNING = 1, | 35 | __QDISC___STATE_RUNNING = 1, |
35 | __QDISC___STATE_THROTTLED = 2, | ||
36 | }; | 36 | }; |
37 | 37 | ||
38 | struct qdisc_size_table { | 38 | struct qdisc_size_table { |
@@ -106,17 +106,17 @@ static inline void qdisc_run_end(struct Qdisc *qdisc) | |||
106 | 106 | ||
107 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) | 107 | static inline bool qdisc_is_throttled(const struct Qdisc *qdisc) |
108 | { | 108 | { |
109 | return (qdisc->__state & __QDISC___STATE_THROTTLED) ? true : false; | 109 | return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false; |
110 | } | 110 | } |
111 | 111 | ||
112 | static inline void qdisc_throttled(struct Qdisc *qdisc) | 112 | static inline void qdisc_throttled(struct Qdisc *qdisc) |
113 | { | 113 | { |
114 | qdisc->__state |= __QDISC___STATE_THROTTLED; | 114 | set_bit(__QDISC_STATE_THROTTLED, &qdisc->state); |
115 | } | 115 | } |
116 | 116 | ||
117 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) | 117 | static inline void qdisc_unthrottled(struct Qdisc *qdisc) |
118 | { | 118 | { |
119 | qdisc->__state &= ~__QDISC___STATE_THROTTLED; | 119 | clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state); |
120 | } | 120 | } |
121 | 121 | ||
122 | struct Qdisc_class_ops { | 122 | struct Qdisc_class_ops { |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index cc9185ca8fd1..0f6e60a9c308 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -422,7 +422,7 @@ struct sctp_cookie { | |||
422 | __u32 adaptation_ind; | 422 | __u32 adaptation_ind; |
423 | 423 | ||
424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; | 424 | __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; |
425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; | 425 | __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; |
426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; | 426 | __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; |
427 | 427 | ||
428 | /* This is a shim for my peer's INIT packet, followed by | 428 | /* This is a shim for my peer's INIT packet, followed by |
diff --git a/include/net/snmp.h b/include/net/snmp.h index 762e2abce889..27461d6dd46f 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -150,7 +150,7 @@ struct linux_xfrm_mib { | |||
150 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ | 150 | #define SNMP_UPD_PO_STATS_BH(mib, basefield, addend) \ |
151 | do { \ | 151 | do { \ |
152 | __typeof__(*mib[0]) *ptr = \ | 152 | __typeof__(*mib[0]) *ptr = \ |
153 | __this_cpu_ptr((mib)[!in_softirq()]); \ | 153 | __this_cpu_ptr((mib)[0]); \ |
154 | ptr->mibs[basefield##PKTS]++; \ | 154 | ptr->mibs[basefield##PKTS]++; \ |
155 | ptr->mibs[basefield##OCTETS] += addend;\ | 155 | ptr->mibs[basefield##OCTETS] += addend;\ |
156 | } while (0) | 156 | } while (0) |
@@ -202,7 +202,7 @@ struct linux_xfrm_mib { | |||
202 | #define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \ | 202 | #define SNMP_UPD_PO_STATS64_BH(mib, basefield, addend) \ |
203 | do { \ | 203 | do { \ |
204 | __typeof__(*mib[0]) *ptr; \ | 204 | __typeof__(*mib[0]) *ptr; \ |
205 | ptr = __this_cpu_ptr((mib)[!in_softirq()]); \ | 205 | ptr = __this_cpu_ptr((mib)[0]); \ |
206 | u64_stats_update_begin(&ptr->syncp); \ | 206 | u64_stats_update_begin(&ptr->syncp); \ |
207 | ptr->mibs[basefield##PKTS]++; \ | 207 | ptr->mibs[basefield##PKTS]++; \ |
208 | ptr->mibs[basefield##OCTETS] += addend; \ | 208 | ptr->mibs[basefield##OCTETS] += addend; \ |
diff --git a/include/net/sock.h b/include/net/sock.h index da0534d3401c..01810a3f19df 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1749,7 +1749,7 @@ void sock_net_set(struct sock *sk, struct net *net) | |||
1749 | 1749 | ||
1750 | /* | 1750 | /* |
1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. | 1751 | * Kernel sockets, f.e. rtnl or icmp_socket, are a part of a namespace. |
1752 | * They should not hold a referrence to a namespace in order to allow | 1752 | * They should not hold a reference to a namespace in order to allow |
1753 | * to stop it. | 1753 | * to stop it. |
1754 | * Sockets after sk_change_net should be released using sk_release_kernel | 1754 | * Sockets after sk_change_net should be released using sk_release_kernel |
1755 | */ | 1755 | */ |
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index eeb077dd735f..a8122dc56410 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -16,7 +16,7 @@ extern struct proto tcpv6_prot; | |||
16 | 16 | ||
17 | struct flowi6; | 17 | struct flowi6; |
18 | 18 | ||
19 | /* extention headers */ | 19 | /* extension headers */ |
20 | extern int ipv6_exthdrs_init(void); | 20 | extern int ipv6_exthdrs_init(void); |
21 | extern void ipv6_exthdrs_exit(void); | 21 | extern void ipv6_exthdrs_exit(void); |
22 | extern int ipv6_frag_init(void); | 22 | extern int ipv6_frag_init(void); |
diff --git a/include/net/wimax.h b/include/net/wimax.h index 3461aa1df1e0..c799ba7b708b 100644 --- a/include/net/wimax.h +++ b/include/net/wimax.h | |||
@@ -286,7 +286,7 @@ struct wimax_dev; | |||
286 | * does not disconnect the device from the bus and return 0. | 286 | * does not disconnect the device from the bus and return 0. |
287 | * If that fails, it should resort to some sort of cold or bus | 287 | * If that fails, it should resort to some sort of cold or bus |
288 | * reset (even if it implies a bus disconnection and device | 288 | * reset (even if it implies a bus disconnection and device |
289 | * dissapearance). In that case, -ENODEV should be returned to | 289 | * disappearance). In that case, -ENODEV should be returned to |
290 | * indicate the device is gone. | 290 | * indicate the device is gone. |
291 | * This operation has to be synchronous, and return only when the | 291 | * This operation has to be synchronous, and return only when the |
292 | * reset is complete. In case of having had to resort to bus/cold | 292 | * reset is complete. In case of having had to resort to bus/cold |
diff --git a/include/net/wpan-phy.h b/include/net/wpan-phy.h index 85926231c07a..d86fffd3c03c 100644 --- a/include/net/wpan-phy.h +++ b/include/net/wpan-phy.h | |||
@@ -28,7 +28,7 @@ struct wpan_phy { | |||
28 | struct mutex pib_lock; | 28 | struct mutex pib_lock; |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * This is a PIB acording to 802.15.4-2006. | 31 | * This is a PIB according to 802.15.4-2006. |
32 | * We do not provide timing-related variables, as they | 32 | * We do not provide timing-related variables, as they |
33 | * aren't used outside of driver | 33 | * aren't used outside of driver |
34 | */ | 34 | */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 42a8c32a10e2..6ae4bc5ce8a7 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1430,6 +1430,7 @@ extern void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); | |||
1430 | extern u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq); | 1430 | extern u32 xfrm_replay_seqhi(struct xfrm_state *x, __be32 net_seq); |
1431 | extern int xfrm_init_replay(struct xfrm_state *x); | 1431 | extern int xfrm_init_replay(struct xfrm_state *x); |
1432 | extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | 1432 | extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); |
1433 | extern int __xfrm_init_state(struct xfrm_state *x, bool init_replay); | ||
1433 | extern int xfrm_init_state(struct xfrm_state *x); | 1434 | extern int xfrm_init_state(struct xfrm_state *x); |
1434 | extern int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); | 1435 | extern int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb); |
1435 | extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, | 1436 | extern int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, |
@@ -1600,6 +1601,28 @@ static inline int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay | |||
1600 | } | 1601 | } |
1601 | 1602 | ||
1602 | #ifdef CONFIG_XFRM_MIGRATE | 1603 | #ifdef CONFIG_XFRM_MIGRATE |
1604 | static inline int xfrm_replay_clone(struct xfrm_state *x, | ||
1605 | struct xfrm_state *orig) | ||
1606 | { | ||
1607 | x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn), | ||
1608 | GFP_KERNEL); | ||
1609 | if (!x->replay_esn) | ||
1610 | return -ENOMEM; | ||
1611 | |||
1612 | x->replay_esn->bmp_len = orig->replay_esn->bmp_len; | ||
1613 | x->replay_esn->replay_window = orig->replay_esn->replay_window; | ||
1614 | |||
1615 | x->preplay_esn = kmemdup(x->replay_esn, | ||
1616 | xfrm_replay_state_esn_len(x->replay_esn), | ||
1617 | GFP_KERNEL); | ||
1618 | if (!x->preplay_esn) { | ||
1619 | kfree(x->replay_esn); | ||
1620 | return -ENOMEM; | ||
1621 | } | ||
1622 | |||
1623 | return 0; | ||
1624 | } | ||
1625 | |||
1603 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | 1626 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) |
1604 | { | 1627 | { |
1605 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); | 1628 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); |
diff --git a/include/rxrpc/packet.h b/include/rxrpc/packet.h index 9b2c30897e50..f2902ef7ab75 100644 --- a/include/rxrpc/packet.h +++ b/include/rxrpc/packet.h | |||
@@ -148,7 +148,7 @@ struct rxkad_challenge { | |||
148 | * Kerberos security type-2 response packet | 148 | * Kerberos security type-2 response packet |
149 | */ | 149 | */ |
150 | struct rxkad_response { | 150 | struct rxkad_response { |
151 | __be32 version; /* version of this reponse type */ | 151 | __be32 version; /* version of this response type */ |
152 | __be32 __pad; | 152 | __be32 __pad; |
153 | 153 | ||
154 | /* encrypted bit of the response */ | 154 | /* encrypted bit of the response */ |
diff --git a/include/scsi/fc/fc_fcp.h b/include/scsi/fc/fc_fcp.h index 8a143ca79878..652dec230514 100644 --- a/include/scsi/fc/fc_fcp.h +++ b/include/scsi/fc/fc_fcp.h | |||
@@ -75,7 +75,7 @@ struct fcp_cmnd32 { | |||
75 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ | 75 | #define FCP_PTA_SIMPLE 0 /* simple task attribute */ |
76 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ | 76 | #define FCP_PTA_HEADQ 1 /* head of queue task attribute */ |
77 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ | 77 | #define FCP_PTA_ORDERED 2 /* ordered task attribute */ |
78 | #define FCP_PTA_ACA 4 /* auto. contigent allegiance */ | 78 | #define FCP_PTA_ACA 4 /* auto. contingent allegiance */ |
79 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ | 79 | #define FCP_PTA_MASK 7 /* mask for task attribute field */ |
80 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ | 80 | #define FCP_PRI_SHIFT 3 /* priority field starts in bit 3 */ |
81 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ | 81 | #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */ |
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index c3e1cbcc2ad2..ddb04568a509 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -292,7 +292,7 @@ enum iscsi_param { | |||
292 | ISCSI_PARAM_PERSISTENT_PORT, | 292 | ISCSI_PARAM_PERSISTENT_PORT, |
293 | ISCSI_PARAM_SESS_RECOVERY_TMO, | 293 | ISCSI_PARAM_SESS_RECOVERY_TMO, |
294 | 294 | ||
295 | /* pased in through bind conn using transport_fd */ | 295 | /* passed in through bind conn using transport_fd */ |
296 | ISCSI_PARAM_CONN_PORT, | 296 | ISCSI_PARAM_CONN_PORT, |
297 | ISCSI_PARAM_CONN_ADDRESS, | 297 | ISCSI_PARAM_CONN_ADDRESS, |
298 | 298 | ||
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 24193c1b0da0..a3cbda4ddb5c 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -260,7 +260,7 @@ struct fcoe_dev_stats { | |||
260 | /** | 260 | /** |
261 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses | 261 | * struct fc_seq_els_data - ELS data used for passing ELS specific responses |
262 | * @reason: The reason for rejection | 262 | * @reason: The reason for rejection |
263 | * @explan: The explaination of the rejection | 263 | * @explan: The explanation of the rejection |
264 | * | 264 | * |
265 | * Mainly used by the exchange manager layer. | 265 | * Mainly used by the exchange manager layer. |
266 | */ | 266 | */ |
@@ -525,7 +525,7 @@ struct libfc_function_template { | |||
525 | struct fc_frame *); | 525 | struct fc_frame *); |
526 | 526 | ||
527 | /* | 527 | /* |
528 | * Send an ELS response using infomation from the received frame. | 528 | * Send an ELS response using information from the received frame. |
529 | * | 529 | * |
530 | * STATUS: OPTIONAL | 530 | * STATUS: OPTIONAL |
531 | */ | 531 | */ |
@@ -663,7 +663,7 @@ struct libfc_function_template { | |||
663 | int (*rport_logoff)(struct fc_rport_priv *); | 663 | int (*rport_logoff)(struct fc_rport_priv *); |
664 | 664 | ||
665 | /* | 665 | /* |
666 | * Recieve a request from a remote port. | 666 | * Receive a request from a remote port. |
667 | * | 667 | * |
668 | * STATUS: OPTIONAL | 668 | * STATUS: OPTIONAL |
669 | */ | 669 | */ |
@@ -704,7 +704,7 @@ struct libfc_function_template { | |||
704 | void *)); | 704 | void *)); |
705 | 705 | ||
706 | /* | 706 | /* |
707 | * Cleanup the FCP layer, used durring link down and reset | 707 | * Cleanup the FCP layer, used during link down and reset |
708 | * | 708 | * |
709 | * STATUS: OPTIONAL | 709 | * STATUS: OPTIONAL |
710 | */ | 710 | */ |
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h index 741ae7ed4394..ac0cc1d925ef 100644 --- a/include/scsi/libiscsi_tcp.h +++ b/include/scsi/libiscsi_tcp.h | |||
@@ -47,11 +47,12 @@ struct iscsi_segment { | |||
47 | struct scatterlist *sg; | 47 | struct scatterlist *sg; |
48 | void *sg_mapped; | 48 | void *sg_mapped; |
49 | unsigned int sg_offset; | 49 | unsigned int sg_offset; |
50 | bool atomic_mapped; | ||
50 | 51 | ||
51 | iscsi_segment_done_fn_t *done; | 52 | iscsi_segment_done_fn_t *done; |
52 | }; | 53 | }; |
53 | 54 | ||
54 | /* Socket connection recieve helper */ | 55 | /* Socket connection receive helper */ |
55 | struct iscsi_tcp_recv { | 56 | struct iscsi_tcp_recv { |
56 | struct iscsi_hdr *hdr; | 57 | struct iscsi_hdr *hdr; |
57 | struct iscsi_segment segment; | 58 | struct iscsi_segment segment; |
diff --git a/include/scsi/osd_initiator.h b/include/scsi/osd_initiator.h index 53a9e886612b..0a5079974fe9 100644 --- a/include/scsi/osd_initiator.h +++ b/include/scsi/osd_initiator.h | |||
@@ -265,7 +265,7 @@ int osd_execute_request_async(struct osd_request *or, | |||
265 | * @osi - Recievs a more detailed error report information (optional). | 265 | * @osi - Recievs a more detailed error report information (optional). |
266 | * @silent - Do not print to dmsg (Even if enabled) | 266 | * @silent - Do not print to dmsg (Even if enabled) |
267 | * @bad_obj_list - Some commands act on multiple objects. Failed objects will | 267 | * @bad_obj_list - Some commands act on multiple objects. Failed objects will |
268 | * be recieved here (optional) | 268 | * be received here (optional) |
269 | * @max_obj - Size of @bad_obj_list. | 269 | * @max_obj - Size of @bad_obj_list. |
270 | * @bad_attr_list - List of failing attributes (optional) | 270 | * @bad_attr_list - List of failing attributes (optional) |
271 | * @max_attr - Size of @bad_attr_list. | 271 | * @max_attr - Size of @bad_attr_list. |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index f171c65dc5a8..2d3ec5094685 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -462,7 +462,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev) | |||
462 | } | 462 | } |
463 | static inline int scsi_device_enclosure(struct scsi_device *sdev) | 463 | static inline int scsi_device_enclosure(struct scsi_device *sdev) |
464 | { | 464 | { |
465 | return sdev->inquiry[6] & (1<<6); | 465 | return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1; |
466 | } | 466 | } |
467 | 467 | ||
468 | static inline int scsi_device_protection(struct scsi_device *sdev) | 468 | static inline int scsi_device_protection(struct scsi_device *sdev) |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index e7e385842a38..f1f2644137b8 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -46,7 +46,7 @@ struct blk_queue_tags; | |||
46 | enum { | 46 | enum { |
47 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ | 47 | SCSI_QDEPTH_DEFAULT, /* default requested change, e.g. from sysfs */ |
48 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ | 48 | SCSI_QDEPTH_QFULL, /* scsi-ml requested due to queue full */ |
49 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshhold event */ | 49 | SCSI_QDEPTH_RAMP_UP, /* scsi-ml requested due to threshold event */ |
50 | }; | 50 | }; |
51 | 51 | ||
52 | struct scsi_host_template { | 52 | struct scsi_host_template { |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 59816fe31e68..2a65167a8f10 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -192,9 +192,9 @@ struct fc_vport_identifiers { | |||
192 | * | 192 | * |
193 | * This structure exists for each FC port is a virtual FC port. Virtual | 193 | * This structure exists for each FC port is a virtual FC port. Virtual |
194 | * ports share the physical link with the Physical port. Each virtual | 194 | * ports share the physical link with the Physical port. Each virtual |
195 | * ports has a unique presense on the SAN, and may be instantiated via | 195 | * ports has a unique presence on the SAN, and may be instantiated via |
196 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a | 196 | * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a |
197 | * unique presense, each vport has it's own view of the fabric, | 197 | * unique presence, each vport has it's own view of the fabric, |
198 | * authentication privilege, and priorities. | 198 | * authentication privilege, and priorities. |
199 | * | 199 | * |
200 | * A virtual port may support 1 or more FC4 roles. Typically it is a | 200 | * A virtual port may support 1 or more FC4 roles. Typically it is a |
@@ -370,7 +370,7 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
370 | /* | 370 | /* |
371 | * FC SCSI Target Attributes | 371 | * FC SCSI Target Attributes |
372 | * | 372 | * |
373 | * The SCSI Target is considered an extention of a remote port (as | 373 | * The SCSI Target is considered an extension of a remote port (as |
374 | * a remote port can be more than a SCSI Target). Within the scsi | 374 | * a remote port can be more than a SCSI Target). Within the scsi |
375 | * subsystem, we leave the Target as a separate entity. Doing so | 375 | * subsystem, we leave the Target as a separate entity. Doing so |
376 | * provides backward compatibility with prior FC transport api's, | 376 | * provides backward compatibility with prior FC transport api's, |
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index f1dcefe4532b..02cbb50225bb 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -385,7 +385,7 @@ | |||
385 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ | 385 | #define AC97_SCAP_DETECT_BY_VENDOR (1<<8) /* use vendor registers for read tests */ |
386 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ | 386 | #define AC97_SCAP_NO_SPDIF (1<<9) /* don't build SPDIF controls */ |
387 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ | 387 | #define AC97_SCAP_EAPD_LED (1<<10) /* EAPD as mute LED */ |
388 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggresive power-saving */ | 388 | #define AC97_SCAP_POWER_SAVE (1<<11) /* capable for aggressive power-saving */ |
389 | 389 | ||
390 | /* ac97->flags */ | 390 | /* ac97->flags */ |
391 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ | 391 | #define AC97_HAS_PC_BEEP (1<<0) /* force PC Speaker usage */ |
diff --git a/include/sound/control.h b/include/sound/control.h index e67db2869360..404acb859cee 100644 --- a/include/sound/control.h +++ b/include/sound/control.h | |||
@@ -191,7 +191,7 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, | |||
191 | * Returns zero if successful or a negative error code. | 191 | * Returns zero if successful or a negative error code. |
192 | * | 192 | * |
193 | * All slaves must be the same type (returning the same information | 193 | * All slaves must be the same type (returning the same information |
194 | * via info callback). The fucntion doesn't check it, so it's your | 194 | * via info callback). The function doesn't check it, so it's your |
195 | * responsibility. | 195 | * responsibility. |
196 | * | 196 | * |
197 | * Also, some additional limitations: | 197 | * Also, some additional limitations: |
diff --git a/include/sound/cs46xx_dsp_spos.h b/include/sound/cs46xx_dsp_spos.h index 49b03c9e5e55..8008c59288a6 100644 --- a/include/sound/cs46xx_dsp_spos.h +++ b/include/sound/cs46xx_dsp_spos.h | |||
@@ -147,7 +147,7 @@ struct dsp_pcm_channel_descriptor { | |||
147 | }; | 147 | }; |
148 | 148 | ||
149 | struct dsp_spos_instance { | 149 | struct dsp_spos_instance { |
150 | struct dsp_symbol_desc symbol_table; /* currently availble loaded symbols in SP */ | 150 | struct dsp_symbol_desc symbol_table; /* currently available loaded symbols in SP */ |
151 | 151 | ||
152 | int nmodules; | 152 | int nmodules; |
153 | struct dsp_module_desc * modules; /* modules loaded into SP */ | 153 | struct dsp_module_desc * modules; /* modules loaded into SP */ |
diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h index 1774ff5ff632..1f59ea2a4a76 100644 --- a/include/sound/hdspm.h +++ b/include/sound/hdspm.h | |||
@@ -193,7 +193,7 @@ struct hdspm_version { | |||
193 | * 32768 Bytes | 193 | * 32768 Bytes |
194 | */ | 194 | */ |
195 | 195 | ||
196 | /* organisation is 64 channelfader in a continous memory block */ | 196 | /* organisation is 64 channelfader in a continuous memory block */ |
197 | /* equivalent to hardware definition, maybe for future feature of mmap of | 197 | /* equivalent to hardware definition, maybe for future feature of mmap of |
198 | * them | 198 | * them |
199 | */ | 199 | */ |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 430a9cc045e2..e1bad1130616 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -1031,9 +1031,7 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s | |||
1031 | #define snd_pcm_lib_mmap_iomem NULL | 1031 | #define snd_pcm_lib_mmap_iomem NULL |
1032 | #endif | 1032 | #endif |
1033 | 1033 | ||
1034 | int snd_pcm_lib_mmap_noncached(struct snd_pcm_substream *substream, | 1034 | #define snd_pcm_lib_mmap_vmalloc NULL |
1035 | struct vm_area_struct *area); | ||
1036 | #define snd_pcm_lib_mmap_vmalloc snd_pcm_lib_mmap_noncached | ||
1037 | 1035 | ||
1038 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) | 1036 | static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max) |
1039 | { | 1037 | { |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 979ed84e07d6..f72c1039a6fb 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -23,7 +23,7 @@ | |||
23 | /* | 23 | /* |
24 | * SoC dynamic audio power management | 24 | * SoC dynamic audio power management |
25 | * | 25 | * |
26 | * We can have upto 4 power domains | 26 | * We can have up to 4 power domains |
27 | * 1. Codec domain - VREF, VMID | 27 | * 1. Codec domain - VREF, VMID |
28 | * Usually controlled at codec probe/remove, although can be set | 28 | * Usually controlled at codec probe/remove, although can be set |
29 | * at stream time if power is not needed for sidetone, etc. | 29 | * at stream time if power is not needed for sidetone, etc. |
@@ -45,25 +45,25 @@ | |||
45 | /* platform domain */ | 45 | /* platform domain */ |
46 | #define SND_SOC_DAPM_INPUT(wname) \ | 46 | #define SND_SOC_DAPM_INPUT(wname) \ |
47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ | 47 | { .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \ |
48 | .num_kcontrols = 0} | 48 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
49 | #define SND_SOC_DAPM_OUTPUT(wname) \ | 49 | #define SND_SOC_DAPM_OUTPUT(wname) \ |
50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ | 50 | { .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \ |
51 | .num_kcontrols = 0} | 51 | .num_kcontrols = 0, .reg = SND_SOC_NOPM } |
52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ | 52 | #define SND_SOC_DAPM_MIC(wname, wevent) \ |
53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ | 53 | { .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \ |
54 | .num_kcontrols = 0, .event = wevent, \ | 54 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} | 55 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} |
56 | #define SND_SOC_DAPM_HP(wname, wevent) \ | 56 | #define SND_SOC_DAPM_HP(wname, wevent) \ |
57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ | 57 | { .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \ |
58 | .num_kcontrols = 0, .event = wevent, \ | 58 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 59 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ | 60 | #define SND_SOC_DAPM_SPK(wname, wevent) \ |
61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ | 61 | { .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \ |
62 | .num_kcontrols = 0, .event = wevent, \ | 62 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 63 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ | 64 | #define SND_SOC_DAPM_LINE(wname, wevent) \ |
65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ | 65 | { .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \ |
66 | .num_kcontrols = 0, .event = wevent, \ | 66 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} | 67 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD} |
68 | 68 | ||
69 | /* path domain */ | 69 | /* path domain */ |
@@ -189,11 +189,11 @@ | |||
189 | /* events that are pre and post DAPM */ | 189 | /* events that are pre and post DAPM */ |
190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ | 190 | #define SND_SOC_DAPM_PRE(wname, wevent) \ |
191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ | 191 | { .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \ |
192 | .num_kcontrols = 0, .event = wevent, \ | 192 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} | 193 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD} |
194 | #define SND_SOC_DAPM_POST(wname, wevent) \ | 194 | #define SND_SOC_DAPM_POST(wname, wevent) \ |
195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ | 195 | { .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \ |
196 | .num_kcontrols = 0, .event = wevent, \ | 196 | .num_kcontrols = 0, .reg = SND_SOC_NOPM, .event = wevent, \ |
197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} | 197 | .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD} |
198 | 198 | ||
199 | /* stream domain */ | 199 | /* stream domain */ |
diff --git a/include/staging/altera.h b/include/staging/altera.h new file mode 100644 index 000000000000..94c0c6181daf --- /dev/null +++ b/include/staging/altera.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * altera.h | ||
3 | * | ||
4 | * altera FPGA driver | ||
5 | * | ||
6 | * Copyright (C) Altera Corporation 1998-2001 | ||
7 | * Copyright (C) 2010 NetUP Inc. | ||
8 | * Copyright (C) 2010 Igor M. Liplianin <liplianin@netup.ru> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | */ | ||
25 | |||
26 | #ifndef _ALTERA_H_ | ||
27 | #define _ALTERA_H_ | ||
28 | |||
29 | struct altera_config { | ||
30 | void *dev; | ||
31 | u8 *action; | ||
32 | int (*jtag_io) (void *dev, int tms, int tdi, int tdo); | ||
33 | }; | ||
34 | |||
35 | #if defined(CONFIG_ALTERA_STAPL) || \ | ||
36 | (defined(CONFIG_ALTERA_STAPL_MODULE) && defined(MODULE)) | ||
37 | |||
38 | extern int altera_init(struct altera_config *config, const struct firmware *fw); | ||
39 | #else | ||
40 | |||
41 | static inline int altera_init(struct altera_config *config, | ||
42 | const struct firmware *fw) | ||
43 | { | ||
44 | printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); | ||
45 | return 0; | ||
46 | } | ||
47 | #endif /* CONFIG_ALTERA_STAPL */ | ||
48 | |||
49 | #endif /* _ALTERA_H_ */ | ||
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 0828b6c8610a..1d3b5b2f0dbc 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <net/sock.h> | 9 | #include <net/sock.h> |
10 | #include <net/tcp.h> | 10 | #include <net/tcp.h> |
11 | 11 | ||
12 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc6" | 12 | #define TARGET_CORE_MOD_VERSION "v4.0.0-rc7-ml" |
13 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) | 13 | #define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT)) |
14 | 14 | ||
15 | /* Used by transport_generic_allocate_iovecs() */ | 15 | /* Used by transport_generic_allocate_iovecs() */ |
@@ -22,7 +22,7 @@ | |||
22 | * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and | 22 | * Note that both include/scsi/scsi_cmnd.h:MAX_COMMAND_SIZE and |
23 | * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use | 23 | * include/linux/blkdev.h:BLOCK_MAX_CDB as of v2.6.36-rc4 still use |
24 | * 16-byte CDBs by default and require an extra allocation for | 24 | * 16-byte CDBs by default and require an extra allocation for |
25 | * 32-byte CDBs to becasue of legacy issues. | 25 | * 32-byte CDBs to because of legacy issues. |
26 | * | 26 | * |
27 | * Within TCM Core there are no such legacy limitiations, so we go ahead | 27 | * Within TCM Core there are no such legacy limitiations, so we go ahead |
28 | * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size() | 28 | * use 32-byte CDBs by default and use include/scsi/scsi.h:scsi_command_size() |
@@ -239,7 +239,7 @@ struct t10_alua_lu_gp { | |||
239 | } ____cacheline_aligned; | 239 | } ____cacheline_aligned; |
240 | 240 | ||
241 | struct t10_alua_lu_gp_member { | 241 | struct t10_alua_lu_gp_member { |
242 | int lu_gp_assoc:1; | 242 | bool lu_gp_assoc; |
243 | atomic_t lu_gp_mem_ref_cnt; | 243 | atomic_t lu_gp_mem_ref_cnt; |
244 | spinlock_t lu_gp_mem_lock; | 244 | spinlock_t lu_gp_mem_lock; |
245 | struct t10_alua_lu_gp *lu_gp; | 245 | struct t10_alua_lu_gp *lu_gp; |
@@ -271,7 +271,7 @@ struct t10_alua_tg_pt_gp { | |||
271 | } ____cacheline_aligned; | 271 | } ____cacheline_aligned; |
272 | 272 | ||
273 | struct t10_alua_tg_pt_gp_member { | 273 | struct t10_alua_tg_pt_gp_member { |
274 | int tg_pt_gp_assoc:1; | 274 | bool tg_pt_gp_assoc; |
275 | atomic_t tg_pt_gp_mem_ref_cnt; | 275 | atomic_t tg_pt_gp_mem_ref_cnt; |
276 | spinlock_t tg_pt_gp_mem_lock; | 276 | spinlock_t tg_pt_gp_mem_lock; |
277 | struct t10_alua_tg_pt_gp *tg_pt_gp; | 277 | struct t10_alua_tg_pt_gp *tg_pt_gp; |
@@ -302,7 +302,7 @@ struct t10_wwn { | |||
302 | 302 | ||
303 | 303 | ||
304 | /* | 304 | /* |
305 | * Used by TCM Core internally to signal if >= SPC-3 peristent reservations | 305 | * Used by TCM Core internally to signal if >= SPC-3 persistent reservations |
306 | * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough | 306 | * emulation is enabled or disabled, or running in with TCM/pSCSI passthrough |
307 | * mode | 307 | * mode |
308 | */ | 308 | */ |
@@ -336,7 +336,7 @@ struct t10_pr_registration { | |||
336 | int pr_res_type; | 336 | int pr_res_type; |
337 | int pr_res_scope; | 337 | int pr_res_scope; |
338 | /* Used for fabric initiator WWPNs using a ISID */ | 338 | /* Used for fabric initiator WWPNs using a ISID */ |
339 | int isid_present_at_reg:1; | 339 | bool isid_present_at_reg; |
340 | u32 pr_res_mapped_lun; | 340 | u32 pr_res_mapped_lun; |
341 | u32 pr_aptpl_target_lun; | 341 | u32 pr_aptpl_target_lun; |
342 | u32 pr_res_generation; | 342 | u32 pr_res_generation; |
@@ -418,7 +418,7 @@ struct se_transport_task { | |||
418 | unsigned long long t_task_lba; | 418 | unsigned long long t_task_lba; |
419 | int t_tasks_failed; | 419 | int t_tasks_failed; |
420 | int t_tasks_fua; | 420 | int t_tasks_fua; |
421 | int t_tasks_bidi:1; | 421 | bool t_tasks_bidi; |
422 | u32 t_task_cdbs; | 422 | u32 t_task_cdbs; |
423 | u32 t_tasks_check; | 423 | u32 t_tasks_check; |
424 | u32 t_tasks_no; | 424 | u32 t_tasks_no; |
@@ -470,7 +470,7 @@ struct se_task { | |||
470 | u8 task_flags; | 470 | u8 task_flags; |
471 | int task_error_status; | 471 | int task_error_status; |
472 | int task_state_flags; | 472 | int task_state_flags; |
473 | int task_padded_sg:1; | 473 | bool task_padded_sg; |
474 | unsigned long long task_lba; | 474 | unsigned long long task_lba; |
475 | u32 task_no; | 475 | u32 task_no; |
476 | u32 task_sectors; | 476 | u32 task_sectors; |
@@ -494,8 +494,8 @@ struct se_task { | |||
494 | struct list_head t_state_list; | 494 | struct list_head t_state_list; |
495 | } ____cacheline_aligned; | 495 | } ____cacheline_aligned; |
496 | 496 | ||
497 | #define TASK_CMD(task) ((struct se_cmd *)task->task_se_cmd) | 497 | #define TASK_CMD(task) ((task)->task_se_cmd) |
498 | #define TASK_DEV(task) ((struct se_device *)task->se_dev) | 498 | #define TASK_DEV(task) ((task)->se_dev) |
499 | 499 | ||
500 | struct se_cmd { | 500 | struct se_cmd { |
501 | /* SAM response code being sent to initiator */ | 501 | /* SAM response code being sent to initiator */ |
@@ -551,8 +551,8 @@ struct se_cmd { | |||
551 | void (*transport_complete_callback)(struct se_cmd *); | 551 | void (*transport_complete_callback)(struct se_cmd *); |
552 | } ____cacheline_aligned; | 552 | } ____cacheline_aligned; |
553 | 553 | ||
554 | #define T_TASK(cmd) ((struct se_transport_task *)(cmd->t_task)) | 554 | #define T_TASK(cmd) ((cmd)->t_task) |
555 | #define CMD_TFO(cmd) ((struct target_core_fabric_ops *)cmd->se_tfo) | 555 | #define CMD_TFO(cmd) ((cmd)->se_tfo) |
556 | 556 | ||
557 | struct se_tmr_req { | 557 | struct se_tmr_req { |
558 | /* Task Management function to be preformed */ | 558 | /* Task Management function to be preformed */ |
@@ -583,7 +583,7 @@ struct se_ua { | |||
583 | struct se_node_acl { | 583 | struct se_node_acl { |
584 | char initiatorname[TRANSPORT_IQN_LEN]; | 584 | char initiatorname[TRANSPORT_IQN_LEN]; |
585 | /* Used to signal demo mode created ACL, disabled by default */ | 585 | /* Used to signal demo mode created ACL, disabled by default */ |
586 | int dynamic_node_acl:1; | 586 | bool dynamic_node_acl; |
587 | u32 queue_depth; | 587 | u32 queue_depth; |
588 | u32 acl_index; | 588 | u32 acl_index; |
589 | u64 num_cmds; | 589 | u64 num_cmds; |
@@ -601,7 +601,8 @@ struct se_node_acl { | |||
601 | struct config_group acl_attrib_group; | 601 | struct config_group acl_attrib_group; |
602 | struct config_group acl_auth_group; | 602 | struct config_group acl_auth_group; |
603 | struct config_group acl_param_group; | 603 | struct config_group acl_param_group; |
604 | struct config_group *acl_default_groups[4]; | 604 | struct config_group acl_fabric_stat_group; |
605 | struct config_group *acl_default_groups[5]; | ||
605 | struct list_head acl_list; | 606 | struct list_head acl_list; |
606 | struct list_head acl_sess_list; | 607 | struct list_head acl_sess_list; |
607 | } ____cacheline_aligned; | 608 | } ____cacheline_aligned; |
@@ -615,13 +616,19 @@ struct se_session { | |||
615 | struct list_head sess_acl_list; | 616 | struct list_head sess_acl_list; |
616 | } ____cacheline_aligned; | 617 | } ____cacheline_aligned; |
617 | 618 | ||
618 | #define SE_SESS(cmd) ((struct se_session *)(cmd)->se_sess) | 619 | #define SE_SESS(cmd) ((cmd)->se_sess) |
619 | #define SE_NODE_ACL(sess) ((struct se_node_acl *)(sess)->se_node_acl) | 620 | #define SE_NODE_ACL(sess) ((sess)->se_node_acl) |
620 | 621 | ||
621 | struct se_device; | 622 | struct se_device; |
622 | struct se_transform_info; | 623 | struct se_transform_info; |
623 | struct scatterlist; | 624 | struct scatterlist; |
624 | 625 | ||
626 | struct se_ml_stat_grps { | ||
627 | struct config_group stat_group; | ||
628 | struct config_group scsi_auth_intr_group; | ||
629 | struct config_group scsi_att_intr_port_group; | ||
630 | }; | ||
631 | |||
625 | struct se_lun_acl { | 632 | struct se_lun_acl { |
626 | char initiatorname[TRANSPORT_IQN_LEN]; | 633 | char initiatorname[TRANSPORT_IQN_LEN]; |
627 | u32 mapped_lun; | 634 | u32 mapped_lun; |
@@ -629,10 +636,13 @@ struct se_lun_acl { | |||
629 | struct se_lun *se_lun; | 636 | struct se_lun *se_lun; |
630 | struct list_head lacl_list; | 637 | struct list_head lacl_list; |
631 | struct config_group se_lun_group; | 638 | struct config_group se_lun_group; |
639 | struct se_ml_stat_grps ml_stat_grps; | ||
632 | } ____cacheline_aligned; | 640 | } ____cacheline_aligned; |
633 | 641 | ||
642 | #define ML_STAT_GRPS(lacl) (&(lacl)->ml_stat_grps) | ||
643 | |||
634 | struct se_dev_entry { | 644 | struct se_dev_entry { |
635 | int def_pr_registered:1; | 645 | bool def_pr_registered; |
636 | /* See transport_lunflags_table */ | 646 | /* See transport_lunflags_table */ |
637 | u32 lun_flags; | 647 | u32 lun_flags; |
638 | u32 deve_cmds; | 648 | u32 deve_cmds; |
@@ -693,6 +703,13 @@ struct se_dev_attrib { | |||
693 | struct config_group da_group; | 703 | struct config_group da_group; |
694 | } ____cacheline_aligned; | 704 | } ____cacheline_aligned; |
695 | 705 | ||
706 | struct se_dev_stat_grps { | ||
707 | struct config_group stat_group; | ||
708 | struct config_group scsi_dev_group; | ||
709 | struct config_group scsi_tgt_dev_group; | ||
710 | struct config_group scsi_lu_group; | ||
711 | }; | ||
712 | |||
696 | struct se_subsystem_dev { | 713 | struct se_subsystem_dev { |
697 | /* Used for struct se_subsystem_dev-->se_dev_alias, must be less than PAGE_SIZE */ | 714 | /* Used for struct se_subsystem_dev-->se_dev_alias, must be less than PAGE_SIZE */ |
698 | #define SE_DEV_ALIAS_LEN 512 | 715 | #define SE_DEV_ALIAS_LEN 512 |
@@ -716,11 +733,14 @@ struct se_subsystem_dev { | |||
716 | struct config_group se_dev_group; | 733 | struct config_group se_dev_group; |
717 | /* For T10 Reservations */ | 734 | /* For T10 Reservations */ |
718 | struct config_group se_dev_pr_group; | 735 | struct config_group se_dev_pr_group; |
736 | /* For target_core_stat.c groups */ | ||
737 | struct se_dev_stat_grps dev_stat_grps; | ||
719 | } ____cacheline_aligned; | 738 | } ____cacheline_aligned; |
720 | 739 | ||
721 | #define T10_ALUA(su_dev) (&(su_dev)->t10_alua) | 740 | #define T10_ALUA(su_dev) (&(su_dev)->t10_alua) |
722 | #define T10_RES(su_dev) (&(su_dev)->t10_reservation) | 741 | #define T10_RES(su_dev) (&(su_dev)->t10_reservation) |
723 | #define T10_PR_OPS(su_dev) (&(su_dev)->t10_reservation.pr_ops) | 742 | #define T10_PR_OPS(su_dev) (&(su_dev)->t10_reservation.pr_ops) |
743 | #define DEV_STAT_GRP(dev) (&(dev)->dev_stat_grps) | ||
724 | 744 | ||
725 | struct se_device { | 745 | struct se_device { |
726 | /* Set to 1 if thread is NOT sleeping on thread_sem */ | 746 | /* Set to 1 if thread is NOT sleeping on thread_sem */ |
@@ -803,8 +823,8 @@ struct se_device { | |||
803 | struct list_head g_se_dev_list; | 823 | struct list_head g_se_dev_list; |
804 | } ____cacheline_aligned; | 824 | } ____cacheline_aligned; |
805 | 825 | ||
806 | #define SE_DEV(cmd) ((struct se_device *)(cmd)->se_lun->lun_se_dev) | 826 | #define SE_DEV(cmd) ((cmd)->se_lun->lun_se_dev) |
807 | #define SU_DEV(dev) ((struct se_subsystem_dev *)(dev)->se_sub_dev) | 827 | #define SU_DEV(dev) ((dev)->se_sub_dev) |
808 | #define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib) | 828 | #define DEV_ATTRIB(dev) (&(dev)->se_sub_dev->se_dev_attrib) |
809 | #define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn) | 829 | #define DEV_T10_WWN(dev) (&(dev)->se_sub_dev->t10_wwn) |
810 | 830 | ||
@@ -832,7 +852,14 @@ struct se_hba { | |||
832 | struct se_subsystem_api *transport; | 852 | struct se_subsystem_api *transport; |
833 | } ____cacheline_aligned; | 853 | } ____cacheline_aligned; |
834 | 854 | ||
835 | #define SE_HBA(d) ((struct se_hba *)(d)->se_hba) | 855 | #define SE_HBA(dev) ((dev)->se_hba) |
856 | |||
857 | struct se_port_stat_grps { | ||
858 | struct config_group stat_group; | ||
859 | struct config_group scsi_port_group; | ||
860 | struct config_group scsi_tgt_port_group; | ||
861 | struct config_group scsi_transport_group; | ||
862 | }; | ||
836 | 863 | ||
837 | struct se_lun { | 864 | struct se_lun { |
838 | /* See transport_lun_status_table */ | 865 | /* See transport_lun_status_table */ |
@@ -848,11 +875,13 @@ struct se_lun { | |||
848 | struct list_head lun_cmd_list; | 875 | struct list_head lun_cmd_list; |
849 | struct list_head lun_acl_list; | 876 | struct list_head lun_acl_list; |
850 | struct se_device *lun_se_dev; | 877 | struct se_device *lun_se_dev; |
878 | struct se_port *lun_sep; | ||
851 | struct config_group lun_group; | 879 | struct config_group lun_group; |
852 | struct se_port *lun_sep; | 880 | struct se_port_stat_grps port_stat_grps; |
853 | } ____cacheline_aligned; | 881 | } ____cacheline_aligned; |
854 | 882 | ||
855 | #define SE_LUN(c) ((struct se_lun *)(c)->se_lun) | 883 | #define SE_LUN(cmd) ((cmd)->se_lun) |
884 | #define PORT_STAT_GRP(lun) (&(lun)->port_stat_grps) | ||
856 | 885 | ||
857 | struct scsi_port_stats { | 886 | struct scsi_port_stats { |
858 | u64 cmd_pdus; | 887 | u64 cmd_pdus; |
@@ -905,7 +934,7 @@ struct se_portal_group { | |||
905 | struct list_head acl_node_list; | 934 | struct list_head acl_node_list; |
906 | struct se_lun *tpg_lun_list; | 935 | struct se_lun *tpg_lun_list; |
907 | struct se_lun tpg_virt_lun0; | 936 | struct se_lun tpg_virt_lun0; |
908 | /* List of TCM sessions assoicated wth this TPG */ | 937 | /* List of TCM sessions associated wth this TPG */ |
909 | struct list_head tpg_sess_list; | 938 | struct list_head tpg_sess_list; |
910 | /* Pointer to $FABRIC_MOD dependent code */ | 939 | /* Pointer to $FABRIC_MOD dependent code */ |
911 | struct target_core_fabric_ops *se_tpg_tfo; | 940 | struct target_core_fabric_ops *se_tpg_tfo; |
@@ -919,11 +948,13 @@ struct se_portal_group { | |||
919 | struct config_group tpg_param_group; | 948 | struct config_group tpg_param_group; |
920 | } ____cacheline_aligned; | 949 | } ____cacheline_aligned; |
921 | 950 | ||
922 | #define TPG_TFO(se_tpg) ((struct target_core_fabric_ops *)(se_tpg)->se_tpg_tfo) | 951 | #define TPG_TFO(se_tpg) ((se_tpg)->se_tpg_tfo) |
923 | 952 | ||
924 | struct se_wwn { | 953 | struct se_wwn { |
925 | struct target_fabric_configfs *wwn_tf; | 954 | struct target_fabric_configfs *wwn_tf; |
926 | struct config_group wwn_group; | 955 | struct config_group wwn_group; |
956 | struct config_group *wwn_default_groups[2]; | ||
957 | struct config_group fabric_stat_group; | ||
927 | } ____cacheline_aligned; | 958 | } ____cacheline_aligned; |
928 | 959 | ||
929 | struct se_global { | 960 | struct se_global { |
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h index 40e6e740527c..612509592ffd 100644 --- a/include/target/target_core_configfs.h +++ b/include/target/target_core_configfs.h | |||
@@ -14,10 +14,12 @@ extern void target_fabric_configfs_deregister(struct target_fabric_configfs *); | |||
14 | struct target_fabric_configfs_template { | 14 | struct target_fabric_configfs_template { |
15 | struct config_item_type tfc_discovery_cit; | 15 | struct config_item_type tfc_discovery_cit; |
16 | struct config_item_type tfc_wwn_cit; | 16 | struct config_item_type tfc_wwn_cit; |
17 | struct config_item_type tfc_wwn_fabric_stats_cit; | ||
17 | struct config_item_type tfc_tpg_cit; | 18 | struct config_item_type tfc_tpg_cit; |
18 | struct config_item_type tfc_tpg_base_cit; | 19 | struct config_item_type tfc_tpg_base_cit; |
19 | struct config_item_type tfc_tpg_lun_cit; | 20 | struct config_item_type tfc_tpg_lun_cit; |
20 | struct config_item_type tfc_tpg_port_cit; | 21 | struct config_item_type tfc_tpg_port_cit; |
22 | struct config_item_type tfc_tpg_port_stat_cit; | ||
21 | struct config_item_type tfc_tpg_np_cit; | 23 | struct config_item_type tfc_tpg_np_cit; |
22 | struct config_item_type tfc_tpg_np_base_cit; | 24 | struct config_item_type tfc_tpg_np_base_cit; |
23 | struct config_item_type tfc_tpg_attrib_cit; | 25 | struct config_item_type tfc_tpg_attrib_cit; |
@@ -27,7 +29,9 @@ struct target_fabric_configfs_template { | |||
27 | struct config_item_type tfc_tpg_nacl_attrib_cit; | 29 | struct config_item_type tfc_tpg_nacl_attrib_cit; |
28 | struct config_item_type tfc_tpg_nacl_auth_cit; | 30 | struct config_item_type tfc_tpg_nacl_auth_cit; |
29 | struct config_item_type tfc_tpg_nacl_param_cit; | 31 | struct config_item_type tfc_tpg_nacl_param_cit; |
32 | struct config_item_type tfc_tpg_nacl_stat_cit; | ||
30 | struct config_item_type tfc_tpg_mappedlun_cit; | 33 | struct config_item_type tfc_tpg_mappedlun_cit; |
34 | struct config_item_type tfc_tpg_mappedlun_stat_cit; | ||
31 | }; | 35 | }; |
32 | 36 | ||
33 | struct target_fabric_configfs { | 37 | struct target_fabric_configfs { |
diff --git a/include/target/target_core_fabric_ops.h b/include/target/target_core_fabric_ops.h index f3ac12b019c2..dc78f77f9450 100644 --- a/include/target/target_core_fabric_ops.h +++ b/include/target/target_core_fabric_ops.h | |||
@@ -8,7 +8,7 @@ struct target_core_fabric_ops { | |||
8 | * for scatterlist chaining using transport_do_task_sg_link(), | 8 | * for scatterlist chaining using transport_do_task_sg_link(), |
9 | * disabled by default | 9 | * disabled by default |
10 | */ | 10 | */ |
11 | int task_sg_chaining:1; | 11 | bool task_sg_chaining; |
12 | char *(*get_fabric_name)(void); | 12 | char *(*get_fabric_name)(void); |
13 | u8 (*get_fabric_proto_ident)(struct se_portal_group *); | 13 | u8 (*get_fabric_proto_ident)(struct se_portal_group *); |
14 | char *(*tpg_get_wwn)(struct se_portal_group *); | 14 | char *(*tpg_get_wwn)(struct se_portal_group *); |
@@ -35,7 +35,7 @@ struct target_core_fabric_ops { | |||
35 | /* | 35 | /* |
36 | * Optional function pointer for TCM to perform command map | 36 | * Optional function pointer for TCM to perform command map |
37 | * from TCM processing thread context, for those struct se_cmd | 37 | * from TCM processing thread context, for those struct se_cmd |
38 | * initally allocated in interrupt context. | 38 | * initially allocated in interrupt context. |
39 | */ | 39 | */ |
40 | int (*new_cmd_map)(struct se_cmd *); | 40 | int (*new_cmd_map)(struct se_cmd *); |
41 | /* | 41 | /* |
diff --git a/include/target/target_core_tmr.h b/include/target/target_core_tmr.h index 6c8248bc2c66..bd5596807478 100644 --- a/include/target/target_core_tmr.h +++ b/include/target/target_core_tmr.h | |||
@@ -1,37 +1,29 @@ | |||
1 | #ifndef TARGET_CORE_TMR_H | 1 | #ifndef TARGET_CORE_TMR_H |
2 | #define TARGET_CORE_TMR_H | 2 | #define TARGET_CORE_TMR_H |
3 | 3 | ||
4 | /* task management function values */ | 4 | /* fabric independent task management function values */ |
5 | #ifdef ABORT_TASK | 5 | enum tcm_tmreq_table { |
6 | #undef ABORT_TASK | 6 | TMR_ABORT_TASK = 1, |
7 | #endif /* ABORT_TASK */ | 7 | TMR_ABORT_TASK_SET = 2, |
8 | #define ABORT_TASK 1 | 8 | TMR_CLEAR_ACA = 3, |
9 | #ifdef ABORT_TASK_SET | 9 | TMR_CLEAR_TASK_SET = 4, |
10 | #undef ABORT_TASK_SET | 10 | TMR_LUN_RESET = 5, |
11 | #endif /* ABORT_TASK_SET */ | 11 | TMR_TARGET_WARM_RESET = 6, |
12 | #define ABORT_TASK_SET 2 | 12 | TMR_TARGET_COLD_RESET = 7, |
13 | #ifdef CLEAR_ACA | 13 | TMR_FABRIC_TMR = 255, |
14 | #undef CLEAR_ACA | 14 | }; |
15 | #endif /* CLEAR_ACA */ | ||
16 | #define CLEAR_ACA 3 | ||
17 | #ifdef CLEAR_TASK_SET | ||
18 | #undef CLEAR_TASK_SET | ||
19 | #endif /* CLEAR_TASK_SET */ | ||
20 | #define CLEAR_TASK_SET 4 | ||
21 | #define LUN_RESET 5 | ||
22 | #define TARGET_WARM_RESET 6 | ||
23 | #define TARGET_COLD_RESET 7 | ||
24 | #define TASK_REASSIGN 8 | ||
25 | 15 | ||
26 | /* task management response values */ | 16 | /* fabric independent task management response values */ |
27 | #define TMR_FUNCTION_COMPLETE 0 | 17 | enum tcm_tmrsp_table { |
28 | #define TMR_TASK_DOES_NOT_EXIST 1 | 18 | TMR_FUNCTION_COMPLETE = 0, |
29 | #define TMR_LUN_DOES_NOT_EXIST 2 | 19 | TMR_TASK_DOES_NOT_EXIST = 1, |
30 | #define TMR_TASK_STILL_ALLEGIANT 3 | 20 | TMR_LUN_DOES_NOT_EXIST = 2, |
31 | #define TMR_TASK_FAILOVER_NOT_SUPPORTED 4 | 21 | TMR_TASK_STILL_ALLEGIANT = 3, |
32 | #define TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED 5 | 22 | TMR_TASK_FAILOVER_NOT_SUPPORTED = 4, |
33 | #define TMR_FUNCTION_AUTHORIZATION_FAILED 6 | 23 | TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5, |
34 | #define TMR_FUNCTION_REJECTED 255 | 24 | TMR_FUNCTION_AUTHORIZATION_FAILED = 6, |
25 | TMR_FUNCTION_REJECTED = 255, | ||
26 | }; | ||
35 | 27 | ||
36 | extern struct kmem_cache *se_tmr_req_cache; | 28 | extern struct kmem_cache *se_tmr_req_cache; |
37 | 29 | ||
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 2e8ec51f0615..59aa464f6ee2 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h | |||
@@ -109,6 +109,8 @@ | |||
109 | struct se_mem; | 109 | struct se_mem; |
110 | struct se_subsystem_api; | 110 | struct se_subsystem_api; |
111 | 111 | ||
112 | extern struct kmem_cache *se_mem_cache; | ||
113 | |||
112 | extern int init_se_global(void); | 114 | extern int init_se_global(void); |
113 | extern void release_se_global(void); | 115 | extern void release_se_global(void); |
114 | extern void init_scsi_index_table(void); | 116 | extern void init_scsi_index_table(void); |
@@ -190,6 +192,8 @@ extern void transport_generic_process_write(struct se_cmd *); | |||
190 | extern int transport_generic_do_tmr(struct se_cmd *); | 192 | extern int transport_generic_do_tmr(struct se_cmd *); |
191 | /* From target_core_alua.c */ | 193 | /* From target_core_alua.c */ |
192 | extern int core_alua_check_nonop_delay(struct se_cmd *); | 194 | extern int core_alua_check_nonop_delay(struct se_cmd *); |
195 | /* From target_core_cdb.c */ | ||
196 | extern int transport_emulate_control_cdb(struct se_task *); | ||
193 | 197 | ||
194 | /* | 198 | /* |
195 | * Each se_transport_task_t can have N number of possible struct se_task's | 199 | * Each se_transport_task_t can have N number of possible struct se_task's |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 78f18adb49c8..bf366547da25 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -401,9 +401,9 @@ TRACE_EVENT(block_plug, | |||
401 | 401 | ||
402 | DECLARE_EVENT_CLASS(block_unplug, | 402 | DECLARE_EVENT_CLASS(block_unplug, |
403 | 403 | ||
404 | TP_PROTO(struct request_queue *q), | 404 | TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), |
405 | 405 | ||
406 | TP_ARGS(q), | 406 | TP_ARGS(q, depth, explicit), |
407 | 407 | ||
408 | TP_STRUCT__entry( | 408 | TP_STRUCT__entry( |
409 | __field( int, nr_rq ) | 409 | __field( int, nr_rq ) |
@@ -411,7 +411,7 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
411 | ), | 411 | ), |
412 | 412 | ||
413 | TP_fast_assign( | 413 | TP_fast_assign( |
414 | __entry->nr_rq = q->rq.count[READ] + q->rq.count[WRITE]; | 414 | __entry->nr_rq = depth; |
415 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); | 415 | memcpy(__entry->comm, current->comm, TASK_COMM_LEN); |
416 | ), | 416 | ), |
417 | 417 | ||
@@ -419,31 +419,19 @@ DECLARE_EVENT_CLASS(block_unplug, | |||
419 | ); | 419 | ); |
420 | 420 | ||
421 | /** | 421 | /** |
422 | * block_unplug_timer - timed release of operations requests in queue to device driver | 422 | * block_unplug - release of operations requests in request queue |
423 | * @q: request queue to unplug | ||
424 | * | ||
425 | * Unplug the request queue @q because a timer expired and allow block | ||
426 | * operation requests to be sent to the device driver. | ||
427 | */ | ||
428 | DEFINE_EVENT(block_unplug, block_unplug_timer, | ||
429 | |||
430 | TP_PROTO(struct request_queue *q), | ||
431 | |||
432 | TP_ARGS(q) | ||
433 | ); | ||
434 | |||
435 | /** | ||
436 | * block_unplug_io - release of operations requests in request queue | ||
437 | * @q: request queue to unplug | 423 | * @q: request queue to unplug |
424 | * @depth: number of requests just added to the queue | ||
425 | * @explicit: whether this was an explicit unplug, or one from schedule() | ||
438 | * | 426 | * |
439 | * Unplug request queue @q because device driver is scheduled to work | 427 | * Unplug request queue @q because device driver is scheduled to work |
440 | * on elements in the request queue. | 428 | * on elements in the request queue. |
441 | */ | 429 | */ |
442 | DEFINE_EVENT(block_unplug, block_unplug_io, | 430 | DEFINE_EVENT(block_unplug, block_unplug, |
443 | 431 | ||
444 | TP_PROTO(struct request_queue *q), | 432 | TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), |
445 | 433 | ||
446 | TP_ARGS(q) | 434 | TP_ARGS(q, depth, explicit) |
447 | ); | 435 | ); |
448 | 436 | ||
449 | /** | 437 | /** |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h new file mode 100644 index 000000000000..f445cff66ab7 --- /dev/null +++ b/include/trace/events/btrfs.h | |||
@@ -0,0 +1,667 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM btrfs | ||
3 | |||
4 | #if !defined(_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_BTRFS_H | ||
6 | |||
7 | #include <linux/writeback.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | struct btrfs_root; | ||
11 | struct btrfs_fs_info; | ||
12 | struct btrfs_inode; | ||
13 | struct extent_map; | ||
14 | struct btrfs_ordered_extent; | ||
15 | struct btrfs_delayed_ref_node; | ||
16 | struct btrfs_delayed_tree_ref; | ||
17 | struct btrfs_delayed_data_ref; | ||
18 | struct btrfs_delayed_ref_head; | ||
19 | struct map_lookup; | ||
20 | struct extent_buffer; | ||
21 | |||
22 | #define show_ref_type(type) \ | ||
23 | __print_symbolic(type, \ | ||
24 | { BTRFS_TREE_BLOCK_REF_KEY, "TREE_BLOCK_REF" }, \ | ||
25 | { BTRFS_EXTENT_DATA_REF_KEY, "EXTENT_DATA_REF" }, \ | ||
26 | { BTRFS_EXTENT_REF_V0_KEY, "EXTENT_REF_V0" }, \ | ||
27 | { BTRFS_SHARED_BLOCK_REF_KEY, "SHARED_BLOCK_REF" }, \ | ||
28 | { BTRFS_SHARED_DATA_REF_KEY, "SHARED_DATA_REF" }) | ||
29 | |||
30 | #define __show_root_type(obj) \ | ||
31 | __print_symbolic(obj, \ | ||
32 | { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \ | ||
33 | { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \ | ||
34 | { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \ | ||
35 | { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \ | ||
36 | { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \ | ||
37 | { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \ | ||
38 | { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \ | ||
39 | { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \ | ||
40 | { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \ | ||
41 | { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" }) | ||
42 | |||
43 | #define show_root_type(obj) \ | ||
44 | obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ | ||
45 | (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-" | ||
46 | |||
47 | TRACE_EVENT(btrfs_transaction_commit, | ||
48 | |||
49 | TP_PROTO(struct btrfs_root *root), | ||
50 | |||
51 | TP_ARGS(root), | ||
52 | |||
53 | TP_STRUCT__entry( | ||
54 | __field( u64, generation ) | ||
55 | __field( u64, root_objectid ) | ||
56 | ), | ||
57 | |||
58 | TP_fast_assign( | ||
59 | __entry->generation = root->fs_info->generation; | ||
60 | __entry->root_objectid = root->root_key.objectid; | ||
61 | ), | ||
62 | |||
63 | TP_printk("root = %llu(%s), gen = %llu", | ||
64 | show_root_type(__entry->root_objectid), | ||
65 | (unsigned long long)__entry->generation) | ||
66 | ); | ||
67 | |||
68 | DECLARE_EVENT_CLASS(btrfs__inode, | ||
69 | |||
70 | TP_PROTO(struct inode *inode), | ||
71 | |||
72 | TP_ARGS(inode), | ||
73 | |||
74 | TP_STRUCT__entry( | ||
75 | __field( ino_t, ino ) | ||
76 | __field( blkcnt_t, blocks ) | ||
77 | __field( u64, disk_i_size ) | ||
78 | __field( u64, generation ) | ||
79 | __field( u64, last_trans ) | ||
80 | __field( u64, logged_trans ) | ||
81 | __field( u64, root_objectid ) | ||
82 | ), | ||
83 | |||
84 | TP_fast_assign( | ||
85 | __entry->ino = inode->i_ino; | ||
86 | __entry->blocks = inode->i_blocks; | ||
87 | __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; | ||
88 | __entry->generation = BTRFS_I(inode)->generation; | ||
89 | __entry->last_trans = BTRFS_I(inode)->last_trans; | ||
90 | __entry->logged_trans = BTRFS_I(inode)->logged_trans; | ||
91 | __entry->root_objectid = | ||
92 | BTRFS_I(inode)->root->root_key.objectid; | ||
93 | ), | ||
94 | |||
95 | TP_printk("root = %llu(%s), gen = %llu, ino = %lu, blocks = %llu, " | ||
96 | "disk_i_size = %llu, last_trans = %llu, logged_trans = %llu", | ||
97 | show_root_type(__entry->root_objectid), | ||
98 | (unsigned long long)__entry->generation, | ||
99 | (unsigned long)__entry->ino, | ||
100 | (unsigned long long)__entry->blocks, | ||
101 | (unsigned long long)__entry->disk_i_size, | ||
102 | (unsigned long long)__entry->last_trans, | ||
103 | (unsigned long long)__entry->logged_trans) | ||
104 | ); | ||
105 | |||
106 | DEFINE_EVENT(btrfs__inode, btrfs_inode_new, | ||
107 | |||
108 | TP_PROTO(struct inode *inode), | ||
109 | |||
110 | TP_ARGS(inode) | ||
111 | ); | ||
112 | |||
113 | DEFINE_EVENT(btrfs__inode, btrfs_inode_request, | ||
114 | |||
115 | TP_PROTO(struct inode *inode), | ||
116 | |||
117 | TP_ARGS(inode) | ||
118 | ); | ||
119 | |||
120 | DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, | ||
121 | |||
122 | TP_PROTO(struct inode *inode), | ||
123 | |||
124 | TP_ARGS(inode) | ||
125 | ); | ||
126 | |||
127 | #define __show_map_type(type) \ | ||
128 | __print_symbolic(type, \ | ||
129 | { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \ | ||
130 | { EXTENT_MAP_HOLE, "HOLE" }, \ | ||
131 | { EXTENT_MAP_INLINE, "INLINE" }, \ | ||
132 | { EXTENT_MAP_DELALLOC, "DELALLOC" }) | ||
133 | |||
134 | #define show_map_type(type) \ | ||
135 | type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type) | ||
136 | |||
137 | #define show_map_flags(flag) \ | ||
138 | __print_flags(flag, "|", \ | ||
139 | { EXTENT_FLAG_PINNED, "PINNED" }, \ | ||
140 | { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \ | ||
141 | { EXTENT_FLAG_VACANCY, "VACANCY" }, \ | ||
142 | { EXTENT_FLAG_PREALLOC, "PREALLOC" }) | ||
143 | |||
144 | TRACE_EVENT(btrfs_get_extent, | ||
145 | |||
146 | TP_PROTO(struct btrfs_root *root, struct extent_map *map), | ||
147 | |||
148 | TP_ARGS(root, map), | ||
149 | |||
150 | TP_STRUCT__entry( | ||
151 | __field( u64, root_objectid ) | ||
152 | __field( u64, start ) | ||
153 | __field( u64, len ) | ||
154 | __field( u64, orig_start ) | ||
155 | __field( u64, block_start ) | ||
156 | __field( u64, block_len ) | ||
157 | __field( unsigned long, flags ) | ||
158 | __field( int, refs ) | ||
159 | __field( unsigned int, compress_type ) | ||
160 | ), | ||
161 | |||
162 | TP_fast_assign( | ||
163 | __entry->root_objectid = root->root_key.objectid; | ||
164 | __entry->start = map->start; | ||
165 | __entry->len = map->len; | ||
166 | __entry->orig_start = map->orig_start; | ||
167 | __entry->block_start = map->block_start; | ||
168 | __entry->block_len = map->block_len; | ||
169 | __entry->flags = map->flags; | ||
170 | __entry->refs = atomic_read(&map->refs); | ||
171 | __entry->compress_type = map->compress_type; | ||
172 | ), | ||
173 | |||
174 | TP_printk("root = %llu(%s), start = %llu, len = %llu, " | ||
175 | "orig_start = %llu, block_start = %llu(%s), " | ||
176 | "block_len = %llu, flags = %s, refs = %u, " | ||
177 | "compress_type = %u", | ||
178 | show_root_type(__entry->root_objectid), | ||
179 | (unsigned long long)__entry->start, | ||
180 | (unsigned long long)__entry->len, | ||
181 | (unsigned long long)__entry->orig_start, | ||
182 | show_map_type(__entry->block_start), | ||
183 | (unsigned long long)__entry->block_len, | ||
184 | show_map_flags(__entry->flags), | ||
185 | __entry->refs, __entry->compress_type) | ||
186 | ); | ||
187 | |||
188 | #define show_ordered_flags(flags) \ | ||
189 | __print_symbolic(flags, \ | ||
190 | { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \ | ||
191 | { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \ | ||
192 | { BTRFS_ORDERED_NOCOW, "NOCOW" }, \ | ||
193 | { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \ | ||
194 | { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \ | ||
195 | { BTRFS_ORDERED_DIRECT, "DIRECT" }) | ||
196 | |||
197 | DECLARE_EVENT_CLASS(btrfs__ordered_extent, | ||
198 | |||
199 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
200 | |||
201 | TP_ARGS(inode, ordered), | ||
202 | |||
203 | TP_STRUCT__entry( | ||
204 | __field( ino_t, ino ) | ||
205 | __field( u64, file_offset ) | ||
206 | __field( u64, start ) | ||
207 | __field( u64, len ) | ||
208 | __field( u64, disk_len ) | ||
209 | __field( u64, bytes_left ) | ||
210 | __field( unsigned long, flags ) | ||
211 | __field( int, compress_type ) | ||
212 | __field( int, refs ) | ||
213 | __field( u64, root_objectid ) | ||
214 | ), | ||
215 | |||
216 | TP_fast_assign( | ||
217 | __entry->ino = inode->i_ino; | ||
218 | __entry->file_offset = ordered->file_offset; | ||
219 | __entry->start = ordered->start; | ||
220 | __entry->len = ordered->len; | ||
221 | __entry->disk_len = ordered->disk_len; | ||
222 | __entry->bytes_left = ordered->bytes_left; | ||
223 | __entry->flags = ordered->flags; | ||
224 | __entry->compress_type = ordered->compress_type; | ||
225 | __entry->refs = atomic_read(&ordered->refs); | ||
226 | __entry->root_objectid = | ||
227 | BTRFS_I(inode)->root->root_key.objectid; | ||
228 | ), | ||
229 | |||
230 | TP_printk("root = %llu(%s), ino = %llu, file_offset = %llu, " | ||
231 | "start = %llu, len = %llu, disk_len = %llu, " | ||
232 | "bytes_left = %llu, flags = %s, compress_type = %d, " | ||
233 | "refs = %d", | ||
234 | show_root_type(__entry->root_objectid), | ||
235 | (unsigned long long)__entry->ino, | ||
236 | (unsigned long long)__entry->file_offset, | ||
237 | (unsigned long long)__entry->start, | ||
238 | (unsigned long long)__entry->len, | ||
239 | (unsigned long long)__entry->disk_len, | ||
240 | (unsigned long long)__entry->bytes_left, | ||
241 | show_ordered_flags(__entry->flags), | ||
242 | __entry->compress_type, __entry->refs) | ||
243 | ); | ||
244 | |||
245 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add, | ||
246 | |||
247 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
248 | |||
249 | TP_ARGS(inode, ordered) | ||
250 | ); | ||
251 | |||
252 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove, | ||
253 | |||
254 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
255 | |||
256 | TP_ARGS(inode, ordered) | ||
257 | ); | ||
258 | |||
259 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start, | ||
260 | |||
261 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
262 | |||
263 | TP_ARGS(inode, ordered) | ||
264 | ); | ||
265 | |||
266 | DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put, | ||
267 | |||
268 | TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), | ||
269 | |||
270 | TP_ARGS(inode, ordered) | ||
271 | ); | ||
272 | |||
273 | DECLARE_EVENT_CLASS(btrfs__writepage, | ||
274 | |||
275 | TP_PROTO(struct page *page, struct inode *inode, | ||
276 | struct writeback_control *wbc), | ||
277 | |||
278 | TP_ARGS(page, inode, wbc), | ||
279 | |||
280 | TP_STRUCT__entry( | ||
281 | __field( ino_t, ino ) | ||
282 | __field( pgoff_t, index ) | ||
283 | __field( long, nr_to_write ) | ||
284 | __field( long, pages_skipped ) | ||
285 | __field( loff_t, range_start ) | ||
286 | __field( loff_t, range_end ) | ||
287 | __field( char, nonblocking ) | ||
288 | __field( char, for_kupdate ) | ||
289 | __field( char, for_reclaim ) | ||
290 | __field( char, range_cyclic ) | ||
291 | __field( pgoff_t, writeback_index ) | ||
292 | __field( u64, root_objectid ) | ||
293 | ), | ||
294 | |||
295 | TP_fast_assign( | ||
296 | __entry->ino = inode->i_ino; | ||
297 | __entry->index = page->index; | ||
298 | __entry->nr_to_write = wbc->nr_to_write; | ||
299 | __entry->pages_skipped = wbc->pages_skipped; | ||
300 | __entry->range_start = wbc->range_start; | ||
301 | __entry->range_end = wbc->range_end; | ||
302 | __entry->nonblocking = wbc->nonblocking; | ||
303 | __entry->for_kupdate = wbc->for_kupdate; | ||
304 | __entry->for_reclaim = wbc->for_reclaim; | ||
305 | __entry->range_cyclic = wbc->range_cyclic; | ||
306 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
307 | __entry->root_objectid = | ||
308 | BTRFS_I(inode)->root->root_key.objectid; | ||
309 | ), | ||
310 | |||
311 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, " | ||
312 | "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, " | ||
313 | "range_end = %llu, nonblocking = %d, for_kupdate = %d, " | ||
314 | "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu", | ||
315 | show_root_type(__entry->root_objectid), | ||
316 | (unsigned long)__entry->ino, __entry->index, | ||
317 | __entry->nr_to_write, __entry->pages_skipped, | ||
318 | __entry->range_start, __entry->range_end, | ||
319 | __entry->nonblocking, __entry->for_kupdate, | ||
320 | __entry->for_reclaim, __entry->range_cyclic, | ||
321 | (unsigned long)__entry->writeback_index) | ||
322 | ); | ||
323 | |||
324 | DEFINE_EVENT(btrfs__writepage, __extent_writepage, | ||
325 | |||
326 | TP_PROTO(struct page *page, struct inode *inode, | ||
327 | struct writeback_control *wbc), | ||
328 | |||
329 | TP_ARGS(page, inode, wbc) | ||
330 | ); | ||
331 | |||
332 | TRACE_EVENT(btrfs_writepage_end_io_hook, | ||
333 | |||
334 | TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), | ||
335 | |||
336 | TP_ARGS(page, start, end, uptodate), | ||
337 | |||
338 | TP_STRUCT__entry( | ||
339 | __field( ino_t, ino ) | ||
340 | __field( pgoff_t, index ) | ||
341 | __field( u64, start ) | ||
342 | __field( u64, end ) | ||
343 | __field( int, uptodate ) | ||
344 | __field( u64, root_objectid ) | ||
345 | ), | ||
346 | |||
347 | TP_fast_assign( | ||
348 | __entry->ino = page->mapping->host->i_ino; | ||
349 | __entry->index = page->index; | ||
350 | __entry->start = start; | ||
351 | __entry->end = end; | ||
352 | __entry->uptodate = uptodate; | ||
353 | __entry->root_objectid = | ||
354 | BTRFS_I(page->mapping->host)->root->root_key.objectid; | ||
355 | ), | ||
356 | |||
357 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, start = %llu, " | ||
358 | "end = %llu, uptodate = %d", | ||
359 | show_root_type(__entry->root_objectid), | ||
360 | (unsigned long)__entry->ino, (unsigned long)__entry->index, | ||
361 | (unsigned long long)__entry->start, | ||
362 | (unsigned long long)__entry->end, __entry->uptodate) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(btrfs_sync_file, | ||
366 | |||
367 | TP_PROTO(struct file *file, int datasync), | ||
368 | |||
369 | TP_ARGS(file, datasync), | ||
370 | |||
371 | TP_STRUCT__entry( | ||
372 | __field( ino_t, ino ) | ||
373 | __field( ino_t, parent ) | ||
374 | __field( int, datasync ) | ||
375 | __field( u64, root_objectid ) | ||
376 | ), | ||
377 | |||
378 | TP_fast_assign( | ||
379 | struct dentry *dentry = file->f_path.dentry; | ||
380 | struct inode *inode = dentry->d_inode; | ||
381 | |||
382 | __entry->ino = inode->i_ino; | ||
383 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
384 | __entry->datasync = datasync; | ||
385 | __entry->root_objectid = | ||
386 | BTRFS_I(inode)->root->root_key.objectid; | ||
387 | ), | ||
388 | |||
389 | TP_printk("root = %llu(%s), ino = %ld, parent = %ld, datasync = %d", | ||
390 | show_root_type(__entry->root_objectid), | ||
391 | (unsigned long)__entry->ino, (unsigned long)__entry->parent, | ||
392 | __entry->datasync) | ||
393 | ); | ||
394 | |||
395 | TRACE_EVENT(btrfs_sync_fs, | ||
396 | |||
397 | TP_PROTO(int wait), | ||
398 | |||
399 | TP_ARGS(wait), | ||
400 | |||
401 | TP_STRUCT__entry( | ||
402 | __field( int, wait ) | ||
403 | ), | ||
404 | |||
405 | TP_fast_assign( | ||
406 | __entry->wait = wait; | ||
407 | ), | ||
408 | |||
409 | TP_printk("wait = %d", __entry->wait) | ||
410 | ); | ||
411 | |||
412 | #define show_ref_action(action) \ | ||
413 | __print_symbolic(action, \ | ||
414 | { BTRFS_ADD_DELAYED_REF, "ADD_DELAYED_REF" }, \ | ||
415 | { BTRFS_DROP_DELAYED_REF, "DROP_DELAYED_REF" }, \ | ||
416 | { BTRFS_ADD_DELAYED_EXTENT, "ADD_DELAYED_EXTENT" }, \ | ||
417 | { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) | ||
418 | |||
419 | |||
420 | TRACE_EVENT(btrfs_delayed_tree_ref, | ||
421 | |||
422 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
423 | struct btrfs_delayed_tree_ref *full_ref, | ||
424 | int action), | ||
425 | |||
426 | TP_ARGS(ref, full_ref, action), | ||
427 | |||
428 | TP_STRUCT__entry( | ||
429 | __field( u64, bytenr ) | ||
430 | __field( u64, num_bytes ) | ||
431 | __field( int, action ) | ||
432 | __field( u64, parent ) | ||
433 | __field( u64, ref_root ) | ||
434 | __field( int, level ) | ||
435 | __field( int, type ) | ||
436 | ), | ||
437 | |||
438 | TP_fast_assign( | ||
439 | __entry->bytenr = ref->bytenr; | ||
440 | __entry->num_bytes = ref->num_bytes; | ||
441 | __entry->action = action; | ||
442 | __entry->parent = full_ref->parent; | ||
443 | __entry->ref_root = full_ref->root; | ||
444 | __entry->level = full_ref->level; | ||
445 | __entry->type = ref->type; | ||
446 | ), | ||
447 | |||
448 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | ||
449 | "parent = %llu(%s), ref_root = %llu(%s), level = %d, " | ||
450 | "type = %s", | ||
451 | (unsigned long long)__entry->bytenr, | ||
452 | (unsigned long long)__entry->num_bytes, | ||
453 | show_ref_action(__entry->action), | ||
454 | show_root_type(__entry->parent), | ||
455 | show_root_type(__entry->ref_root), | ||
456 | __entry->level, show_ref_type(__entry->type)) | ||
457 | ); | ||
458 | |||
459 | TRACE_EVENT(btrfs_delayed_data_ref, | ||
460 | |||
461 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
462 | struct btrfs_delayed_data_ref *full_ref, | ||
463 | int action), | ||
464 | |||
465 | TP_ARGS(ref, full_ref, action), | ||
466 | |||
467 | TP_STRUCT__entry( | ||
468 | __field( u64, bytenr ) | ||
469 | __field( u64, num_bytes ) | ||
470 | __field( int, action ) | ||
471 | __field( u64, parent ) | ||
472 | __field( u64, ref_root ) | ||
473 | __field( u64, owner ) | ||
474 | __field( u64, offset ) | ||
475 | __field( int, type ) | ||
476 | ), | ||
477 | |||
478 | TP_fast_assign( | ||
479 | __entry->bytenr = ref->bytenr; | ||
480 | __entry->num_bytes = ref->num_bytes; | ||
481 | __entry->action = action; | ||
482 | __entry->parent = full_ref->parent; | ||
483 | __entry->ref_root = full_ref->root; | ||
484 | __entry->owner = full_ref->objectid; | ||
485 | __entry->offset = full_ref->offset; | ||
486 | __entry->type = ref->type; | ||
487 | ), | ||
488 | |||
489 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " | ||
490 | "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, " | ||
491 | "offset = %llu, type = %s", | ||
492 | (unsigned long long)__entry->bytenr, | ||
493 | (unsigned long long)__entry->num_bytes, | ||
494 | show_ref_action(__entry->action), | ||
495 | show_root_type(__entry->parent), | ||
496 | show_root_type(__entry->ref_root), | ||
497 | (unsigned long long)__entry->owner, | ||
498 | (unsigned long long)__entry->offset, | ||
499 | show_ref_type(__entry->type)) | ||
500 | ); | ||
501 | |||
502 | TRACE_EVENT(btrfs_delayed_ref_head, | ||
503 | |||
504 | TP_PROTO(struct btrfs_delayed_ref_node *ref, | ||
505 | struct btrfs_delayed_ref_head *head_ref, | ||
506 | int action), | ||
507 | |||
508 | TP_ARGS(ref, head_ref, action), | ||
509 | |||
510 | TP_STRUCT__entry( | ||
511 | __field( u64, bytenr ) | ||
512 | __field( u64, num_bytes ) | ||
513 | __field( int, action ) | ||
514 | __field( int, is_data ) | ||
515 | ), | ||
516 | |||
517 | TP_fast_assign( | ||
518 | __entry->bytenr = ref->bytenr; | ||
519 | __entry->num_bytes = ref->num_bytes; | ||
520 | __entry->action = action; | ||
521 | __entry->is_data = head_ref->is_data; | ||
522 | ), | ||
523 | |||
524 | TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, is_data = %d", | ||
525 | (unsigned long long)__entry->bytenr, | ||
526 | (unsigned long long)__entry->num_bytes, | ||
527 | show_ref_action(__entry->action), | ||
528 | __entry->is_data) | ||
529 | ); | ||
530 | |||
531 | #define show_chunk_type(type) \ | ||
532 | __print_flags(type, "|", \ | ||
533 | { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ | ||
534 | { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \ | ||
535 | { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \ | ||
536 | { BTRFS_BLOCK_GROUP_RAID0, "RAID0" }, \ | ||
537 | { BTRFS_BLOCK_GROUP_RAID1, "RAID1" }, \ | ||
538 | { BTRFS_BLOCK_GROUP_DUP, "DUP" }, \ | ||
539 | { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}) | ||
540 | |||
541 | DECLARE_EVENT_CLASS(btrfs__chunk, | ||
542 | |||
543 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
544 | u64 offset, u64 size), | ||
545 | |||
546 | TP_ARGS(root, map, offset, size), | ||
547 | |||
548 | TP_STRUCT__entry( | ||
549 | __field( int, num_stripes ) | ||
550 | __field( u64, type ) | ||
551 | __field( int, sub_stripes ) | ||
552 | __field( u64, offset ) | ||
553 | __field( u64, size ) | ||
554 | __field( u64, root_objectid ) | ||
555 | ), | ||
556 | |||
557 | TP_fast_assign( | ||
558 | __entry->num_stripes = map->num_stripes; | ||
559 | __entry->type = map->type; | ||
560 | __entry->sub_stripes = map->sub_stripes; | ||
561 | __entry->offset = offset; | ||
562 | __entry->size = size; | ||
563 | __entry->root_objectid = root->root_key.objectid; | ||
564 | ), | ||
565 | |||
566 | TP_printk("root = %llu(%s), offset = %llu, size = %llu, " | ||
567 | "num_stripes = %d, sub_stripes = %d, type = %s", | ||
568 | show_root_type(__entry->root_objectid), | ||
569 | (unsigned long long)__entry->offset, | ||
570 | (unsigned long long)__entry->size, | ||
571 | __entry->num_stripes, __entry->sub_stripes, | ||
572 | show_chunk_type(__entry->type)) | ||
573 | ); | ||
574 | |||
575 | DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, | ||
576 | |||
577 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
578 | u64 offset, u64 size), | ||
579 | |||
580 | TP_ARGS(root, map, offset, size) | ||
581 | ); | ||
582 | |||
583 | DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free, | ||
584 | |||
585 | TP_PROTO(struct btrfs_root *root, struct map_lookup *map, | ||
586 | u64 offset, u64 size), | ||
587 | |||
588 | TP_ARGS(root, map, offset, size) | ||
589 | ); | ||
590 | |||
591 | TRACE_EVENT(btrfs_cow_block, | ||
592 | |||
593 | TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, | ||
594 | struct extent_buffer *cow), | ||
595 | |||
596 | TP_ARGS(root, buf, cow), | ||
597 | |||
598 | TP_STRUCT__entry( | ||
599 | __field( u64, root_objectid ) | ||
600 | __field( u64, buf_start ) | ||
601 | __field( int, refs ) | ||
602 | __field( u64, cow_start ) | ||
603 | __field( int, buf_level ) | ||
604 | __field( int, cow_level ) | ||
605 | ), | ||
606 | |||
607 | TP_fast_assign( | ||
608 | __entry->root_objectid = root->root_key.objectid; | ||
609 | __entry->buf_start = buf->start; | ||
610 | __entry->refs = atomic_read(&buf->refs); | ||
611 | __entry->cow_start = cow->start; | ||
612 | __entry->buf_level = btrfs_header_level(buf); | ||
613 | __entry->cow_level = btrfs_header_level(cow); | ||
614 | ), | ||
615 | |||
616 | TP_printk("root = %llu(%s), refs = %d, orig_buf = %llu " | ||
617 | "(orig_level = %d), cow_buf = %llu (cow_level = %d)", | ||
618 | show_root_type(__entry->root_objectid), | ||
619 | __entry->refs, | ||
620 | (unsigned long long)__entry->buf_start, | ||
621 | __entry->buf_level, | ||
622 | (unsigned long long)__entry->cow_start, | ||
623 | __entry->cow_level) | ||
624 | ); | ||
625 | |||
626 | DECLARE_EVENT_CLASS(btrfs__reserved_extent, | ||
627 | |||
628 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
629 | |||
630 | TP_ARGS(root, start, len), | ||
631 | |||
632 | TP_STRUCT__entry( | ||
633 | __field( u64, root_objectid ) | ||
634 | __field( u64, start ) | ||
635 | __field( u64, len ) | ||
636 | ), | ||
637 | |||
638 | TP_fast_assign( | ||
639 | __entry->root_objectid = root->root_key.objectid; | ||
640 | __entry->start = start; | ||
641 | __entry->len = len; | ||
642 | ), | ||
643 | |||
644 | TP_printk("root = %llu(%s), start = %llu, len = %llu", | ||
645 | show_root_type(__entry->root_objectid), | ||
646 | (unsigned long long)__entry->start, | ||
647 | (unsigned long long)__entry->len) | ||
648 | ); | ||
649 | |||
650 | DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_alloc, | ||
651 | |||
652 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
653 | |||
654 | TP_ARGS(root, start, len) | ||
655 | ); | ||
656 | |||
657 | DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_free, | ||
658 | |||
659 | TP_PROTO(struct btrfs_root *root, u64 start, u64 len), | ||
660 | |||
661 | TP_ARGS(root, start, len) | ||
662 | ); | ||
663 | |||
664 | #endif /* _TRACE_BTRFS_H */ | ||
665 | |||
666 | /* This part must be outside protection */ | ||
667 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index e5e345fb2a5c..e09592d2f916 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -21,8 +21,7 @@ TRACE_EVENT(ext4_free_inode, | |||
21 | TP_ARGS(inode), | 21 | TP_ARGS(inode), |
22 | 22 | ||
23 | TP_STRUCT__entry( | 23 | TP_STRUCT__entry( |
24 | __field( int, dev_major ) | 24 | __field( dev_t, dev ) |
25 | __field( int, dev_minor ) | ||
26 | __field( ino_t, ino ) | 25 | __field( ino_t, ino ) |
27 | __field( umode_t, mode ) | 26 | __field( umode_t, mode ) |
28 | __field( uid_t, uid ) | 27 | __field( uid_t, uid ) |
@@ -31,8 +30,7 @@ TRACE_EVENT(ext4_free_inode, | |||
31 | ), | 30 | ), |
32 | 31 | ||
33 | TP_fast_assign( | 32 | TP_fast_assign( |
34 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 33 | __entry->dev = inode->i_sb->s_dev; |
35 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
36 | __entry->ino = inode->i_ino; | 34 | __entry->ino = inode->i_ino; |
37 | __entry->mode = inode->i_mode; | 35 | __entry->mode = inode->i_mode; |
38 | __entry->uid = inode->i_uid; | 36 | __entry->uid = inode->i_uid; |
@@ -41,9 +39,9 @@ TRACE_EVENT(ext4_free_inode, | |||
41 | ), | 39 | ), |
42 | 40 | ||
43 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", | 41 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", |
44 | __entry->dev_major, __entry->dev_minor, | 42 | MAJOR(__entry->dev), MINOR(__entry->dev), |
45 | (unsigned long) __entry->ino, __entry->mode, | 43 | (unsigned long) __entry->ino, |
46 | __entry->uid, __entry->gid, | 44 | __entry->mode, __entry->uid, __entry->gid, |
47 | (unsigned long long) __entry->blocks) | 45 | (unsigned long long) __entry->blocks) |
48 | ); | 46 | ); |
49 | 47 | ||
@@ -53,21 +51,19 @@ TRACE_EVENT(ext4_request_inode, | |||
53 | TP_ARGS(dir, mode), | 51 | TP_ARGS(dir, mode), |
54 | 52 | ||
55 | TP_STRUCT__entry( | 53 | TP_STRUCT__entry( |
56 | __field( int, dev_major ) | 54 | __field( dev_t, dev ) |
57 | __field( int, dev_minor ) | ||
58 | __field( ino_t, dir ) | 55 | __field( ino_t, dir ) |
59 | __field( umode_t, mode ) | 56 | __field( umode_t, mode ) |
60 | ), | 57 | ), |
61 | 58 | ||
62 | TP_fast_assign( | 59 | TP_fast_assign( |
63 | __entry->dev_major = MAJOR(dir->i_sb->s_dev); | 60 | __entry->dev = dir->i_sb->s_dev; |
64 | __entry->dev_minor = MINOR(dir->i_sb->s_dev); | ||
65 | __entry->dir = dir->i_ino; | 61 | __entry->dir = dir->i_ino; |
66 | __entry->mode = mode; | 62 | __entry->mode = mode; |
67 | ), | 63 | ), |
68 | 64 | ||
69 | TP_printk("dev %d,%d dir %lu mode 0%o", | 65 | TP_printk("dev %d,%d dir %lu mode 0%o", |
70 | __entry->dev_major, __entry->dev_minor, | 66 | MAJOR(__entry->dev), MINOR(__entry->dev), |
71 | (unsigned long) __entry->dir, __entry->mode) | 67 | (unsigned long) __entry->dir, __entry->mode) |
72 | ); | 68 | ); |
73 | 69 | ||
@@ -77,23 +73,21 @@ TRACE_EVENT(ext4_allocate_inode, | |||
77 | TP_ARGS(inode, dir, mode), | 73 | TP_ARGS(inode, dir, mode), |
78 | 74 | ||
79 | TP_STRUCT__entry( | 75 | TP_STRUCT__entry( |
80 | __field( int, dev_major ) | 76 | __field( dev_t, dev ) |
81 | __field( int, dev_minor ) | ||
82 | __field( ino_t, ino ) | 77 | __field( ino_t, ino ) |
83 | __field( ino_t, dir ) | 78 | __field( ino_t, dir ) |
84 | __field( umode_t, mode ) | 79 | __field( umode_t, mode ) |
85 | ), | 80 | ), |
86 | 81 | ||
87 | TP_fast_assign( | 82 | TP_fast_assign( |
88 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 83 | __entry->dev = inode->i_sb->s_dev; |
89 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
90 | __entry->ino = inode->i_ino; | 84 | __entry->ino = inode->i_ino; |
91 | __entry->dir = dir->i_ino; | 85 | __entry->dir = dir->i_ino; |
92 | __entry->mode = mode; | 86 | __entry->mode = mode; |
93 | ), | 87 | ), |
94 | 88 | ||
95 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", | 89 | TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", |
96 | __entry->dev_major, __entry->dev_minor, | 90 | MAJOR(__entry->dev), MINOR(__entry->dev), |
97 | (unsigned long) __entry->ino, | 91 | (unsigned long) __entry->ino, |
98 | (unsigned long) __entry->dir, __entry->mode) | 92 | (unsigned long) __entry->dir, __entry->mode) |
99 | ); | 93 | ); |
@@ -104,21 +98,19 @@ TRACE_EVENT(ext4_evict_inode, | |||
104 | TP_ARGS(inode), | 98 | TP_ARGS(inode), |
105 | 99 | ||
106 | TP_STRUCT__entry( | 100 | TP_STRUCT__entry( |
107 | __field( int, dev_major ) | 101 | __field( dev_t, dev ) |
108 | __field( int, dev_minor ) | ||
109 | __field( ino_t, ino ) | 102 | __field( ino_t, ino ) |
110 | __field( int, nlink ) | 103 | __field( int, nlink ) |
111 | ), | 104 | ), |
112 | 105 | ||
113 | TP_fast_assign( | 106 | TP_fast_assign( |
114 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 107 | __entry->dev = inode->i_sb->s_dev; |
115 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
116 | __entry->ino = inode->i_ino; | 108 | __entry->ino = inode->i_ino; |
117 | __entry->nlink = inode->i_nlink; | 109 | __entry->nlink = inode->i_nlink; |
118 | ), | 110 | ), |
119 | 111 | ||
120 | TP_printk("dev %d,%d ino %lu nlink %d", | 112 | TP_printk("dev %d,%d ino %lu nlink %d", |
121 | __entry->dev_major, __entry->dev_minor, | 113 | MAJOR(__entry->dev), MINOR(__entry->dev), |
122 | (unsigned long) __entry->ino, __entry->nlink) | 114 | (unsigned long) __entry->ino, __entry->nlink) |
123 | ); | 115 | ); |
124 | 116 | ||
@@ -128,21 +120,19 @@ TRACE_EVENT(ext4_drop_inode, | |||
128 | TP_ARGS(inode, drop), | 120 | TP_ARGS(inode, drop), |
129 | 121 | ||
130 | TP_STRUCT__entry( | 122 | TP_STRUCT__entry( |
131 | __field( int, dev_major ) | 123 | __field( dev_t, dev ) |
132 | __field( int, dev_minor ) | ||
133 | __field( ino_t, ino ) | 124 | __field( ino_t, ino ) |
134 | __field( int, drop ) | 125 | __field( int, drop ) |
135 | ), | 126 | ), |
136 | 127 | ||
137 | TP_fast_assign( | 128 | TP_fast_assign( |
138 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 129 | __entry->dev = inode->i_sb->s_dev; |
139 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
140 | __entry->ino = inode->i_ino; | 130 | __entry->ino = inode->i_ino; |
141 | __entry->drop = drop; | 131 | __entry->drop = drop; |
142 | ), | 132 | ), |
143 | 133 | ||
144 | TP_printk("dev %d,%d ino %lu drop %d", | 134 | TP_printk("dev %d,%d ino %lu drop %d", |
145 | __entry->dev_major, __entry->dev_minor, | 135 | MAJOR(__entry->dev), MINOR(__entry->dev), |
146 | (unsigned long) __entry->ino, __entry->drop) | 136 | (unsigned long) __entry->ino, __entry->drop) |
147 | ); | 137 | ); |
148 | 138 | ||
@@ -152,21 +142,19 @@ TRACE_EVENT(ext4_mark_inode_dirty, | |||
152 | TP_ARGS(inode, IP), | 142 | TP_ARGS(inode, IP), |
153 | 143 | ||
154 | TP_STRUCT__entry( | 144 | TP_STRUCT__entry( |
155 | __field( int, dev_major ) | 145 | __field( dev_t, dev ) |
156 | __field( int, dev_minor ) | ||
157 | __field( ino_t, ino ) | 146 | __field( ino_t, ino ) |
158 | __field(unsigned long, ip ) | 147 | __field(unsigned long, ip ) |
159 | ), | 148 | ), |
160 | 149 | ||
161 | TP_fast_assign( | 150 | TP_fast_assign( |
162 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 151 | __entry->dev = inode->i_sb->s_dev; |
163 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
164 | __entry->ino = inode->i_ino; | 152 | __entry->ino = inode->i_ino; |
165 | __entry->ip = IP; | 153 | __entry->ip = IP; |
166 | ), | 154 | ), |
167 | 155 | ||
168 | TP_printk("dev %d,%d ino %lu caller %pF", | 156 | TP_printk("dev %d,%d ino %lu caller %pF", |
169 | __entry->dev_major, __entry->dev_minor, | 157 | MAJOR(__entry->dev), MINOR(__entry->dev), |
170 | (unsigned long) __entry->ino, (void *)__entry->ip) | 158 | (unsigned long) __entry->ino, (void *)__entry->ip) |
171 | ); | 159 | ); |
172 | 160 | ||
@@ -176,21 +164,19 @@ TRACE_EVENT(ext4_begin_ordered_truncate, | |||
176 | TP_ARGS(inode, new_size), | 164 | TP_ARGS(inode, new_size), |
177 | 165 | ||
178 | TP_STRUCT__entry( | 166 | TP_STRUCT__entry( |
179 | __field( int, dev_major ) | 167 | __field( dev_t, dev ) |
180 | __field( int, dev_minor ) | ||
181 | __field( ino_t, ino ) | 168 | __field( ino_t, ino ) |
182 | __field( loff_t, new_size ) | 169 | __field( loff_t, new_size ) |
183 | ), | 170 | ), |
184 | 171 | ||
185 | TP_fast_assign( | 172 | TP_fast_assign( |
186 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 173 | __entry->dev = inode->i_sb->s_dev; |
187 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
188 | __entry->ino = inode->i_ino; | 174 | __entry->ino = inode->i_ino; |
189 | __entry->new_size = new_size; | 175 | __entry->new_size = new_size; |
190 | ), | 176 | ), |
191 | 177 | ||
192 | TP_printk("dev %d,%d ino %lu new_size %lld", | 178 | TP_printk("dev %d,%d ino %lu new_size %lld", |
193 | __entry->dev_major, __entry->dev_minor, | 179 | MAJOR(__entry->dev), MINOR(__entry->dev), |
194 | (unsigned long) __entry->ino, | 180 | (unsigned long) __entry->ino, |
195 | (long long) __entry->new_size) | 181 | (long long) __entry->new_size) |
196 | ); | 182 | ); |
@@ -203,8 +189,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin, | |||
203 | TP_ARGS(inode, pos, len, flags), | 189 | TP_ARGS(inode, pos, len, flags), |
204 | 190 | ||
205 | TP_STRUCT__entry( | 191 | TP_STRUCT__entry( |
206 | __field( int, dev_major ) | 192 | __field( dev_t, dev ) |
207 | __field( int, dev_minor ) | ||
208 | __field( ino_t, ino ) | 193 | __field( ino_t, ino ) |
209 | __field( loff_t, pos ) | 194 | __field( loff_t, pos ) |
210 | __field( unsigned int, len ) | 195 | __field( unsigned int, len ) |
@@ -212,8 +197,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin, | |||
212 | ), | 197 | ), |
213 | 198 | ||
214 | TP_fast_assign( | 199 | TP_fast_assign( |
215 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 200 | __entry->dev = inode->i_sb->s_dev; |
216 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
217 | __entry->ino = inode->i_ino; | 201 | __entry->ino = inode->i_ino; |
218 | __entry->pos = pos; | 202 | __entry->pos = pos; |
219 | __entry->len = len; | 203 | __entry->len = len; |
@@ -221,7 +205,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin, | |||
221 | ), | 205 | ), |
222 | 206 | ||
223 | TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", | 207 | TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", |
224 | __entry->dev_major, __entry->dev_minor, | 208 | MAJOR(__entry->dev), MINOR(__entry->dev), |
225 | (unsigned long) __entry->ino, | 209 | (unsigned long) __entry->ino, |
226 | __entry->pos, __entry->len, __entry->flags) | 210 | __entry->pos, __entry->len, __entry->flags) |
227 | ); | 211 | ); |
@@ -249,8 +233,7 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
249 | TP_ARGS(inode, pos, len, copied), | 233 | TP_ARGS(inode, pos, len, copied), |
250 | 234 | ||
251 | TP_STRUCT__entry( | 235 | TP_STRUCT__entry( |
252 | __field( int, dev_major ) | 236 | __field( dev_t, dev ) |
253 | __field( int, dev_minor ) | ||
254 | __field( ino_t, ino ) | 237 | __field( ino_t, ino ) |
255 | __field( loff_t, pos ) | 238 | __field( loff_t, pos ) |
256 | __field( unsigned int, len ) | 239 | __field( unsigned int, len ) |
@@ -258,8 +241,7 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
258 | ), | 241 | ), |
259 | 242 | ||
260 | TP_fast_assign( | 243 | TP_fast_assign( |
261 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 244 | __entry->dev = inode->i_sb->s_dev; |
262 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
263 | __entry->ino = inode->i_ino; | 245 | __entry->ino = inode->i_ino; |
264 | __entry->pos = pos; | 246 | __entry->pos = pos; |
265 | __entry->len = len; | 247 | __entry->len = len; |
@@ -267,9 +249,9 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
267 | ), | 249 | ), |
268 | 250 | ||
269 | TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", | 251 | TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", |
270 | __entry->dev_major, __entry->dev_minor, | 252 | MAJOR(__entry->dev), MINOR(__entry->dev), |
271 | (unsigned long) __entry->ino, __entry->pos, | 253 | (unsigned long) __entry->ino, |
272 | __entry->len, __entry->copied) | 254 | __entry->pos, __entry->len, __entry->copied) |
273 | ); | 255 | ); |
274 | 256 | ||
275 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, | 257 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, |
@@ -310,22 +292,20 @@ TRACE_EVENT(ext4_writepage, | |||
310 | TP_ARGS(inode, page), | 292 | TP_ARGS(inode, page), |
311 | 293 | ||
312 | TP_STRUCT__entry( | 294 | TP_STRUCT__entry( |
313 | __field( int, dev_major ) | 295 | __field( dev_t, dev ) |
314 | __field( int, dev_minor ) | ||
315 | __field( ino_t, ino ) | 296 | __field( ino_t, ino ) |
316 | __field( pgoff_t, index ) | 297 | __field( pgoff_t, index ) |
317 | 298 | ||
318 | ), | 299 | ), |
319 | 300 | ||
320 | TP_fast_assign( | 301 | TP_fast_assign( |
321 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 302 | __entry->dev = inode->i_sb->s_dev; |
322 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
323 | __entry->ino = inode->i_ino; | 303 | __entry->ino = inode->i_ino; |
324 | __entry->index = page->index; | 304 | __entry->index = page->index; |
325 | ), | 305 | ), |
326 | 306 | ||
327 | TP_printk("dev %d,%d ino %lu page_index %lu", | 307 | TP_printk("dev %d,%d ino %lu page_index %lu", |
328 | __entry->dev_major, __entry->dev_minor, | 308 | MAJOR(__entry->dev), MINOR(__entry->dev), |
329 | (unsigned long) __entry->ino, __entry->index) | 309 | (unsigned long) __entry->ino, __entry->index) |
330 | ); | 310 | ); |
331 | 311 | ||
@@ -335,43 +315,39 @@ TRACE_EVENT(ext4_da_writepages, | |||
335 | TP_ARGS(inode, wbc), | 315 | TP_ARGS(inode, wbc), |
336 | 316 | ||
337 | TP_STRUCT__entry( | 317 | TP_STRUCT__entry( |
338 | __field( int, dev_major ) | 318 | __field( dev_t, dev ) |
339 | __field( int, dev_minor ) | ||
340 | __field( ino_t, ino ) | 319 | __field( ino_t, ino ) |
341 | __field( long, nr_to_write ) | 320 | __field( long, nr_to_write ) |
342 | __field( long, pages_skipped ) | 321 | __field( long, pages_skipped ) |
343 | __field( loff_t, range_start ) | 322 | __field( loff_t, range_start ) |
344 | __field( loff_t, range_end ) | 323 | __field( loff_t, range_end ) |
324 | __field( int, sync_mode ) | ||
345 | __field( char, for_kupdate ) | 325 | __field( char, for_kupdate ) |
346 | __field( char, for_reclaim ) | ||
347 | __field( char, range_cyclic ) | 326 | __field( char, range_cyclic ) |
348 | __field( pgoff_t, writeback_index ) | 327 | __field( pgoff_t, writeback_index ) |
349 | ), | 328 | ), |
350 | 329 | ||
351 | TP_fast_assign( | 330 | TP_fast_assign( |
352 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 331 | __entry->dev = inode->i_sb->s_dev; |
353 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
354 | __entry->ino = inode->i_ino; | 332 | __entry->ino = inode->i_ino; |
355 | __entry->nr_to_write = wbc->nr_to_write; | 333 | __entry->nr_to_write = wbc->nr_to_write; |
356 | __entry->pages_skipped = wbc->pages_skipped; | 334 | __entry->pages_skipped = wbc->pages_skipped; |
357 | __entry->range_start = wbc->range_start; | 335 | __entry->range_start = wbc->range_start; |
358 | __entry->range_end = wbc->range_end; | 336 | __entry->range_end = wbc->range_end; |
337 | __entry->sync_mode = wbc->sync_mode; | ||
359 | __entry->for_kupdate = wbc->for_kupdate; | 338 | __entry->for_kupdate = wbc->for_kupdate; |
360 | __entry->for_reclaim = wbc->for_reclaim; | ||
361 | __entry->range_cyclic = wbc->range_cyclic; | 339 | __entry->range_cyclic = wbc->range_cyclic; |
362 | __entry->writeback_index = inode->i_mapping->writeback_index; | 340 | __entry->writeback_index = inode->i_mapping->writeback_index; |
363 | ), | 341 | ), |
364 | 342 | ||
365 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " | 343 | TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " |
366 | "range_start %llu range_end %llu " | 344 | "range_start %llu range_end %llu sync_mode %d" |
367 | "for_kupdate %d for_reclaim %d " | 345 | "for_kupdate %d range_cyclic %d writeback_index %lu", |
368 | "range_cyclic %d writeback_index %lu", | 346 | MAJOR(__entry->dev), MINOR(__entry->dev), |
369 | __entry->dev_major, __entry->dev_minor, | ||
370 | (unsigned long) __entry->ino, __entry->nr_to_write, | 347 | (unsigned long) __entry->ino, __entry->nr_to_write, |
371 | __entry->pages_skipped, __entry->range_start, | 348 | __entry->pages_skipped, __entry->range_start, |
372 | __entry->range_end, | 349 | __entry->range_end, __entry->sync_mode, |
373 | __entry->for_kupdate, __entry->for_reclaim, | 350 | __entry->for_kupdate, __entry->range_cyclic, |
374 | __entry->range_cyclic, | ||
375 | (unsigned long) __entry->writeback_index) | 351 | (unsigned long) __entry->writeback_index) |
376 | ); | 352 | ); |
377 | 353 | ||
@@ -381,8 +357,7 @@ TRACE_EVENT(ext4_da_write_pages, | |||
381 | TP_ARGS(inode, mpd), | 357 | TP_ARGS(inode, mpd), |
382 | 358 | ||
383 | TP_STRUCT__entry( | 359 | TP_STRUCT__entry( |
384 | __field( int, dev_major ) | 360 | __field( dev_t, dev ) |
385 | __field( int, dev_minor ) | ||
386 | __field( ino_t, ino ) | 361 | __field( ino_t, ino ) |
387 | __field( __u64, b_blocknr ) | 362 | __field( __u64, b_blocknr ) |
388 | __field( __u32, b_size ) | 363 | __field( __u32, b_size ) |
@@ -390,11 +365,11 @@ TRACE_EVENT(ext4_da_write_pages, | |||
390 | __field( unsigned long, first_page ) | 365 | __field( unsigned long, first_page ) |
391 | __field( int, io_done ) | 366 | __field( int, io_done ) |
392 | __field( int, pages_written ) | 367 | __field( int, pages_written ) |
368 | __field( int, sync_mode ) | ||
393 | ), | 369 | ), |
394 | 370 | ||
395 | TP_fast_assign( | 371 | TP_fast_assign( |
396 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 372 | __entry->dev = inode->i_sb->s_dev; |
397 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
398 | __entry->ino = inode->i_ino; | 373 | __entry->ino = inode->i_ino; |
399 | __entry->b_blocknr = mpd->b_blocknr; | 374 | __entry->b_blocknr = mpd->b_blocknr; |
400 | __entry->b_size = mpd->b_size; | 375 | __entry->b_size = mpd->b_size; |
@@ -402,14 +377,18 @@ TRACE_EVENT(ext4_da_write_pages, | |||
402 | __entry->first_page = mpd->first_page; | 377 | __entry->first_page = mpd->first_page; |
403 | __entry->io_done = mpd->io_done; | 378 | __entry->io_done = mpd->io_done; |
404 | __entry->pages_written = mpd->pages_written; | 379 | __entry->pages_written = mpd->pages_written; |
380 | __entry->sync_mode = mpd->wbc->sync_mode; | ||
405 | ), | 381 | ), |
406 | 382 | ||
407 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", | 383 | TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " |
408 | __entry->dev_major, __entry->dev_minor, | 384 | "first_page %lu io_done %d pages_written %d sync_mode %d", |
385 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
409 | (unsigned long) __entry->ino, | 386 | (unsigned long) __entry->ino, |
410 | __entry->b_blocknr, __entry->b_size, | 387 | __entry->b_blocknr, __entry->b_size, |
411 | __entry->b_state, __entry->first_page, | 388 | __entry->b_state, __entry->first_page, |
412 | __entry->io_done, __entry->pages_written) | 389 | __entry->io_done, __entry->pages_written, |
390 | __entry->sync_mode | ||
391 | ) | ||
413 | ); | 392 | ); |
414 | 393 | ||
415 | TRACE_EVENT(ext4_da_writepages_result, | 394 | TRACE_EVENT(ext4_da_writepages_result, |
@@ -419,35 +398,100 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
419 | TP_ARGS(inode, wbc, ret, pages_written), | 398 | TP_ARGS(inode, wbc, ret, pages_written), |
420 | 399 | ||
421 | TP_STRUCT__entry( | 400 | TP_STRUCT__entry( |
422 | __field( int, dev_major ) | 401 | __field( dev_t, dev ) |
423 | __field( int, dev_minor ) | ||
424 | __field( ino_t, ino ) | 402 | __field( ino_t, ino ) |
425 | __field( int, ret ) | 403 | __field( int, ret ) |
426 | __field( int, pages_written ) | 404 | __field( int, pages_written ) |
427 | __field( long, pages_skipped ) | 405 | __field( long, pages_skipped ) |
406 | __field( int, sync_mode ) | ||
428 | __field( char, more_io ) | 407 | __field( char, more_io ) |
429 | __field( pgoff_t, writeback_index ) | 408 | __field( pgoff_t, writeback_index ) |
430 | ), | 409 | ), |
431 | 410 | ||
432 | TP_fast_assign( | 411 | TP_fast_assign( |
433 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 412 | __entry->dev = inode->i_sb->s_dev; |
434 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
435 | __entry->ino = inode->i_ino; | 413 | __entry->ino = inode->i_ino; |
436 | __entry->ret = ret; | 414 | __entry->ret = ret; |
437 | __entry->pages_written = pages_written; | 415 | __entry->pages_written = pages_written; |
438 | __entry->pages_skipped = wbc->pages_skipped; | 416 | __entry->pages_skipped = wbc->pages_skipped; |
417 | __entry->sync_mode = wbc->sync_mode; | ||
439 | __entry->more_io = wbc->more_io; | 418 | __entry->more_io = wbc->more_io; |
440 | __entry->writeback_index = inode->i_mapping->writeback_index; | 419 | __entry->writeback_index = inode->i_mapping->writeback_index; |
441 | ), | 420 | ), |
442 | 421 | ||
443 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu", | 422 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " |
444 | __entry->dev_major, __entry->dev_minor, | 423 | " more_io %d sync_mode %d writeback_index %lu", |
424 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
445 | (unsigned long) __entry->ino, __entry->ret, | 425 | (unsigned long) __entry->ino, __entry->ret, |
446 | __entry->pages_written, __entry->pages_skipped, | 426 | __entry->pages_written, __entry->pages_skipped, |
447 | __entry->more_io, | 427 | __entry->more_io, __entry->sync_mode, |
448 | (unsigned long) __entry->writeback_index) | 428 | (unsigned long) __entry->writeback_index) |
449 | ); | 429 | ); |
450 | 430 | ||
431 | DECLARE_EVENT_CLASS(ext4__page_op, | ||
432 | TP_PROTO(struct page *page), | ||
433 | |||
434 | TP_ARGS(page), | ||
435 | |||
436 | TP_STRUCT__entry( | ||
437 | __field( pgoff_t, index ) | ||
438 | __field( ino_t, ino ) | ||
439 | __field( dev_t, dev ) | ||
440 | |||
441 | ), | ||
442 | |||
443 | TP_fast_assign( | ||
444 | __entry->index = page->index; | ||
445 | __entry->ino = page->mapping->host->i_ino; | ||
446 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
447 | ), | ||
448 | |||
449 | TP_printk("dev %d,%d ino %lu page_index %lu", | ||
450 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
451 | (unsigned long) __entry->ino, | ||
452 | __entry->index) | ||
453 | ); | ||
454 | |||
455 | DEFINE_EVENT(ext4__page_op, ext4_readpage, | ||
456 | |||
457 | TP_PROTO(struct page *page), | ||
458 | |||
459 | TP_ARGS(page) | ||
460 | ); | ||
461 | |||
462 | DEFINE_EVENT(ext4__page_op, ext4_releasepage, | ||
463 | |||
464 | TP_PROTO(struct page *page), | ||
465 | |||
466 | TP_ARGS(page) | ||
467 | ); | ||
468 | |||
469 | TRACE_EVENT(ext4_invalidatepage, | ||
470 | TP_PROTO(struct page *page, unsigned long offset), | ||
471 | |||
472 | TP_ARGS(page, offset), | ||
473 | |||
474 | TP_STRUCT__entry( | ||
475 | __field( pgoff_t, index ) | ||
476 | __field( unsigned long, offset ) | ||
477 | __field( ino_t, ino ) | ||
478 | __field( dev_t, dev ) | ||
479 | |||
480 | ), | ||
481 | |||
482 | TP_fast_assign( | ||
483 | __entry->index = page->index; | ||
484 | __entry->offset = offset; | ||
485 | __entry->ino = page->mapping->host->i_ino; | ||
486 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
487 | ), | ||
488 | |||
489 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", | ||
490 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
491 | (unsigned long) __entry->ino, | ||
492 | __entry->index, __entry->offset) | ||
493 | ); | ||
494 | |||
451 | TRACE_EVENT(ext4_discard_blocks, | 495 | TRACE_EVENT(ext4_discard_blocks, |
452 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 496 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
453 | unsigned long long count), | 497 | unsigned long long count), |
@@ -455,22 +499,20 @@ TRACE_EVENT(ext4_discard_blocks, | |||
455 | TP_ARGS(sb, blk, count), | 499 | TP_ARGS(sb, blk, count), |
456 | 500 | ||
457 | TP_STRUCT__entry( | 501 | TP_STRUCT__entry( |
458 | __field( int, dev_major ) | 502 | __field( dev_t, dev ) |
459 | __field( int, dev_minor ) | ||
460 | __field( __u64, blk ) | 503 | __field( __u64, blk ) |
461 | __field( __u64, count ) | 504 | __field( __u64, count ) |
462 | 505 | ||
463 | ), | 506 | ), |
464 | 507 | ||
465 | TP_fast_assign( | 508 | TP_fast_assign( |
466 | __entry->dev_major = MAJOR(sb->s_dev); | 509 | __entry->dev = sb->s_dev; |
467 | __entry->dev_minor = MINOR(sb->s_dev); | ||
468 | __entry->blk = blk; | 510 | __entry->blk = blk; |
469 | __entry->count = count; | 511 | __entry->count = count; |
470 | ), | 512 | ), |
471 | 513 | ||
472 | TP_printk("dev %d,%d blk %llu count %llu", | 514 | TP_printk("dev %d,%d blk %llu count %llu", |
473 | __entry->dev_major, __entry->dev_minor, | 515 | MAJOR(__entry->dev), MINOR(__entry->dev), |
474 | __entry->blk, __entry->count) | 516 | __entry->blk, __entry->count) |
475 | ); | 517 | ); |
476 | 518 | ||
@@ -481,8 +523,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
481 | TP_ARGS(ac, pa), | 523 | TP_ARGS(ac, pa), |
482 | 524 | ||
483 | TP_STRUCT__entry( | 525 | TP_STRUCT__entry( |
484 | __field( int, dev_major ) | 526 | __field( dev_t, dev ) |
485 | __field( int, dev_minor ) | ||
486 | __field( ino_t, ino ) | 527 | __field( ino_t, ino ) |
487 | __field( __u64, pa_pstart ) | 528 | __field( __u64, pa_pstart ) |
488 | __field( __u32, pa_len ) | 529 | __field( __u32, pa_len ) |
@@ -491,8 +532,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
491 | ), | 532 | ), |
492 | 533 | ||
493 | TP_fast_assign( | 534 | TP_fast_assign( |
494 | __entry->dev_major = MAJOR(ac->ac_sb->s_dev); | 535 | __entry->dev = ac->ac_sb->s_dev; |
495 | __entry->dev_minor = MINOR(ac->ac_sb->s_dev); | ||
496 | __entry->ino = ac->ac_inode->i_ino; | 536 | __entry->ino = ac->ac_inode->i_ino; |
497 | __entry->pa_pstart = pa->pa_pstart; | 537 | __entry->pa_pstart = pa->pa_pstart; |
498 | __entry->pa_len = pa->pa_len; | 538 | __entry->pa_len = pa->pa_len; |
@@ -500,9 +540,9 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa, | |||
500 | ), | 540 | ), |
501 | 541 | ||
502 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", | 542 | TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", |
503 | __entry->dev_major, __entry->dev_minor, | 543 | MAJOR(__entry->dev), MINOR(__entry->dev), |
504 | (unsigned long) __entry->ino, __entry->pa_pstart, | 544 | (unsigned long) __entry->ino, |
505 | __entry->pa_len, __entry->pa_lstart) | 545 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
506 | ); | 546 | ); |
507 | 547 | ||
508 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, | 548 | DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, |
@@ -530,8 +570,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
530 | TP_ARGS(sb, inode, pa, block, count), | 570 | TP_ARGS(sb, inode, pa, block, count), |
531 | 571 | ||
532 | TP_STRUCT__entry( | 572 | TP_STRUCT__entry( |
533 | __field( int, dev_major ) | 573 | __field( dev_t, dev ) |
534 | __field( int, dev_minor ) | ||
535 | __field( ino_t, ino ) | 574 | __field( ino_t, ino ) |
536 | __field( __u64, block ) | 575 | __field( __u64, block ) |
537 | __field( __u32, count ) | 576 | __field( __u32, count ) |
@@ -539,16 +578,16 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
539 | ), | 578 | ), |
540 | 579 | ||
541 | TP_fast_assign( | 580 | TP_fast_assign( |
542 | __entry->dev_major = MAJOR(sb->s_dev); | 581 | __entry->dev = sb->s_dev; |
543 | __entry->dev_minor = MINOR(sb->s_dev); | ||
544 | __entry->ino = inode->i_ino; | 582 | __entry->ino = inode->i_ino; |
545 | __entry->block = block; | 583 | __entry->block = block; |
546 | __entry->count = count; | 584 | __entry->count = count; |
547 | ), | 585 | ), |
548 | 586 | ||
549 | TP_printk("dev %d,%d ino %lu block %llu count %u", | 587 | TP_printk("dev %d,%d ino %lu block %llu count %u", |
550 | __entry->dev_major, __entry->dev_minor, | 588 | MAJOR(__entry->dev), MINOR(__entry->dev), |
551 | (unsigned long) __entry->ino, __entry->block, __entry->count) | 589 | (unsigned long) __entry->ino, |
590 | __entry->block, __entry->count) | ||
552 | ); | 591 | ); |
553 | 592 | ||
554 | TRACE_EVENT(ext4_mb_release_group_pa, | 593 | TRACE_EVENT(ext4_mb_release_group_pa, |
@@ -558,22 +597,20 @@ TRACE_EVENT(ext4_mb_release_group_pa, | |||
558 | TP_ARGS(sb, pa), | 597 | TP_ARGS(sb, pa), |
559 | 598 | ||
560 | TP_STRUCT__entry( | 599 | TP_STRUCT__entry( |
561 | __field( int, dev_major ) | 600 | __field( dev_t, dev ) |
562 | __field( int, dev_minor ) | ||
563 | __field( __u64, pa_pstart ) | 601 | __field( __u64, pa_pstart ) |
564 | __field( __u32, pa_len ) | 602 | __field( __u32, pa_len ) |
565 | 603 | ||
566 | ), | 604 | ), |
567 | 605 | ||
568 | TP_fast_assign( | 606 | TP_fast_assign( |
569 | __entry->dev_major = MAJOR(sb->s_dev); | 607 | __entry->dev = sb->s_dev; |
570 | __entry->dev_minor = MINOR(sb->s_dev); | ||
571 | __entry->pa_pstart = pa->pa_pstart; | 608 | __entry->pa_pstart = pa->pa_pstart; |
572 | __entry->pa_len = pa->pa_len; | 609 | __entry->pa_len = pa->pa_len; |
573 | ), | 610 | ), |
574 | 611 | ||
575 | TP_printk("dev %d,%d pstart %llu len %u", | 612 | TP_printk("dev %d,%d pstart %llu len %u", |
576 | __entry->dev_major, __entry->dev_minor, | 613 | MAJOR(__entry->dev), MINOR(__entry->dev), |
577 | __entry->pa_pstart, __entry->pa_len) | 614 | __entry->pa_pstart, __entry->pa_len) |
578 | ); | 615 | ); |
579 | 616 | ||
@@ -583,20 +620,18 @@ TRACE_EVENT(ext4_discard_preallocations, | |||
583 | TP_ARGS(inode), | 620 | TP_ARGS(inode), |
584 | 621 | ||
585 | TP_STRUCT__entry( | 622 | TP_STRUCT__entry( |
586 | __field( int, dev_major ) | 623 | __field( dev_t, dev ) |
587 | __field( int, dev_minor ) | ||
588 | __field( ino_t, ino ) | 624 | __field( ino_t, ino ) |
589 | 625 | ||
590 | ), | 626 | ), |
591 | 627 | ||
592 | TP_fast_assign( | 628 | TP_fast_assign( |
593 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 629 | __entry->dev = inode->i_sb->s_dev; |
594 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
595 | __entry->ino = inode->i_ino; | 630 | __entry->ino = inode->i_ino; |
596 | ), | 631 | ), |
597 | 632 | ||
598 | TP_printk("dev %d,%d ino %lu", | 633 | TP_printk("dev %d,%d ino %lu", |
599 | __entry->dev_major, __entry->dev_minor, | 634 | MAJOR(__entry->dev), MINOR(__entry->dev), |
600 | (unsigned long) __entry->ino) | 635 | (unsigned long) __entry->ino) |
601 | ); | 636 | ); |
602 | 637 | ||
@@ -606,20 +641,19 @@ TRACE_EVENT(ext4_mb_discard_preallocations, | |||
606 | TP_ARGS(sb, needed), | 641 | TP_ARGS(sb, needed), |
607 | 642 | ||
608 | TP_STRUCT__entry( | 643 | TP_STRUCT__entry( |
609 | __field( int, dev_major ) | 644 | __field( dev_t, dev ) |
610 | __field( int, dev_minor ) | ||
611 | __field( int, needed ) | 645 | __field( int, needed ) |
612 | 646 | ||
613 | ), | 647 | ), |
614 | 648 | ||
615 | TP_fast_assign( | 649 | TP_fast_assign( |
616 | __entry->dev_major = MAJOR(sb->s_dev); | 650 | __entry->dev = sb->s_dev; |
617 | __entry->dev_minor = MINOR(sb->s_dev); | ||
618 | __entry->needed = needed; | 651 | __entry->needed = needed; |
619 | ), | 652 | ), |
620 | 653 | ||
621 | TP_printk("dev %d,%d needed %d", | 654 | TP_printk("dev %d,%d needed %d", |
622 | __entry->dev_major, __entry->dev_minor, __entry->needed) | 655 | MAJOR(__entry->dev), MINOR(__entry->dev), |
656 | __entry->needed) | ||
623 | ); | 657 | ); |
624 | 658 | ||
625 | TRACE_EVENT(ext4_request_blocks, | 659 | TRACE_EVENT(ext4_request_blocks, |
@@ -628,8 +662,7 @@ TRACE_EVENT(ext4_request_blocks, | |||
628 | TP_ARGS(ar), | 662 | TP_ARGS(ar), |
629 | 663 | ||
630 | TP_STRUCT__entry( | 664 | TP_STRUCT__entry( |
631 | __field( int, dev_major ) | 665 | __field( dev_t, dev ) |
632 | __field( int, dev_minor ) | ||
633 | __field( ino_t, ino ) | 666 | __field( ino_t, ino ) |
634 | __field( unsigned int, flags ) | 667 | __field( unsigned int, flags ) |
635 | __field( unsigned int, len ) | 668 | __field( unsigned int, len ) |
@@ -642,8 +675,7 @@ TRACE_EVENT(ext4_request_blocks, | |||
642 | ), | 675 | ), |
643 | 676 | ||
644 | TP_fast_assign( | 677 | TP_fast_assign( |
645 | __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev); | 678 | __entry->dev = ar->inode->i_sb->s_dev; |
646 | __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev); | ||
647 | __entry->ino = ar->inode->i_ino; | 679 | __entry->ino = ar->inode->i_ino; |
648 | __entry->flags = ar->flags; | 680 | __entry->flags = ar->flags; |
649 | __entry->len = ar->len; | 681 | __entry->len = ar->len; |
@@ -655,8 +687,9 @@ TRACE_EVENT(ext4_request_blocks, | |||
655 | __entry->pright = ar->pright; | 687 | __entry->pright = ar->pright; |
656 | ), | 688 | ), |
657 | 689 | ||
658 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | 690 | TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu " |
659 | __entry->dev_major, __entry->dev_minor, | 691 | "lleft %llu lright %llu pleft %llu pright %llu ", |
692 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
660 | (unsigned long) __entry->ino, | 693 | (unsigned long) __entry->ino, |
661 | __entry->flags, __entry->len, | 694 | __entry->flags, __entry->len, |
662 | (unsigned long long) __entry->logical, | 695 | (unsigned long long) __entry->logical, |
@@ -673,8 +706,7 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
673 | TP_ARGS(ar, block), | 706 | TP_ARGS(ar, block), |
674 | 707 | ||
675 | TP_STRUCT__entry( | 708 | TP_STRUCT__entry( |
676 | __field( int, dev_major ) | 709 | __field( dev_t, dev ) |
677 | __field( int, dev_minor ) | ||
678 | __field( ino_t, ino ) | 710 | __field( ino_t, ino ) |
679 | __field( __u64, block ) | 711 | __field( __u64, block ) |
680 | __field( unsigned int, flags ) | 712 | __field( unsigned int, flags ) |
@@ -688,8 +720,7 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
688 | ), | 720 | ), |
689 | 721 | ||
690 | TP_fast_assign( | 722 | TP_fast_assign( |
691 | __entry->dev_major = MAJOR(ar->inode->i_sb->s_dev); | 723 | __entry->dev = ar->inode->i_sb->s_dev; |
692 | __entry->dev_minor = MINOR(ar->inode->i_sb->s_dev); | ||
693 | __entry->ino = ar->inode->i_ino; | 724 | __entry->ino = ar->inode->i_ino; |
694 | __entry->block = block; | 725 | __entry->block = block; |
695 | __entry->flags = ar->flags; | 726 | __entry->flags = ar->flags; |
@@ -702,10 +733,11 @@ TRACE_EVENT(ext4_allocate_blocks, | |||
702 | __entry->pright = ar->pright; | 733 | __entry->pright = ar->pright; |
703 | ), | 734 | ), |
704 | 735 | ||
705 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | 736 | TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu " |
706 | __entry->dev_major, __entry->dev_minor, | 737 | "goal %llu lleft %llu lright %llu pleft %llu pright %llu", |
707 | (unsigned long) __entry->ino, __entry->flags, | 738 | MAJOR(__entry->dev), MINOR(__entry->dev), |
708 | __entry->len, __entry->block, | 739 | (unsigned long) __entry->ino, |
740 | __entry->flags, __entry->len, __entry->block, | ||
709 | (unsigned long long) __entry->logical, | 741 | (unsigned long long) __entry->logical, |
710 | (unsigned long long) __entry->goal, | 742 | (unsigned long long) __entry->goal, |
711 | (unsigned long long) __entry->lleft, | 743 | (unsigned long long) __entry->lleft, |
@@ -721,8 +753,7 @@ TRACE_EVENT(ext4_free_blocks, | |||
721 | TP_ARGS(inode, block, count, flags), | 753 | TP_ARGS(inode, block, count, flags), |
722 | 754 | ||
723 | TP_STRUCT__entry( | 755 | TP_STRUCT__entry( |
724 | __field( int, dev_major ) | 756 | __field( dev_t, dev ) |
725 | __field( int, dev_minor ) | ||
726 | __field( ino_t, ino ) | 757 | __field( ino_t, ino ) |
727 | __field( umode_t, mode ) | 758 | __field( umode_t, mode ) |
728 | __field( __u64, block ) | 759 | __field( __u64, block ) |
@@ -731,8 +762,7 @@ TRACE_EVENT(ext4_free_blocks, | |||
731 | ), | 762 | ), |
732 | 763 | ||
733 | TP_fast_assign( | 764 | TP_fast_assign( |
734 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 765 | __entry->dev = inode->i_sb->s_dev; |
735 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
736 | __entry->ino = inode->i_ino; | 766 | __entry->ino = inode->i_ino; |
737 | __entry->mode = inode->i_mode; | 767 | __entry->mode = inode->i_mode; |
738 | __entry->block = block; | 768 | __entry->block = block; |
@@ -741,20 +771,19 @@ TRACE_EVENT(ext4_free_blocks, | |||
741 | ), | 771 | ), |
742 | 772 | ||
743 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", | 773 | TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", |
744 | __entry->dev_major, __entry->dev_minor, | 774 | MAJOR(__entry->dev), MINOR(__entry->dev), |
745 | (unsigned long) __entry->ino, | 775 | (unsigned long) __entry->ino, |
746 | __entry->mode, __entry->block, __entry->count, | 776 | __entry->mode, __entry->block, __entry->count, |
747 | __entry->flags) | 777 | __entry->flags) |
748 | ); | 778 | ); |
749 | 779 | ||
750 | TRACE_EVENT(ext4_sync_file, | 780 | TRACE_EVENT(ext4_sync_file_enter, |
751 | TP_PROTO(struct file *file, int datasync), | 781 | TP_PROTO(struct file *file, int datasync), |
752 | 782 | ||
753 | TP_ARGS(file, datasync), | 783 | TP_ARGS(file, datasync), |
754 | 784 | ||
755 | TP_STRUCT__entry( | 785 | TP_STRUCT__entry( |
756 | __field( int, dev_major ) | 786 | __field( dev_t, dev ) |
757 | __field( int, dev_minor ) | ||
758 | __field( ino_t, ino ) | 787 | __field( ino_t, ino ) |
759 | __field( ino_t, parent ) | 788 | __field( ino_t, parent ) |
760 | __field( int, datasync ) | 789 | __field( int, datasync ) |
@@ -763,39 +792,60 @@ TRACE_EVENT(ext4_sync_file, | |||
763 | TP_fast_assign( | 792 | TP_fast_assign( |
764 | struct dentry *dentry = file->f_path.dentry; | 793 | struct dentry *dentry = file->f_path.dentry; |
765 | 794 | ||
766 | __entry->dev_major = MAJOR(dentry->d_inode->i_sb->s_dev); | 795 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
767 | __entry->dev_minor = MINOR(dentry->d_inode->i_sb->s_dev); | ||
768 | __entry->ino = dentry->d_inode->i_ino; | 796 | __entry->ino = dentry->d_inode->i_ino; |
769 | __entry->datasync = datasync; | 797 | __entry->datasync = datasync; |
770 | __entry->parent = dentry->d_parent->d_inode->i_ino; | 798 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
771 | ), | 799 | ), |
772 | 800 | ||
773 | TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", | 801 | TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", |
774 | __entry->dev_major, __entry->dev_minor, | 802 | MAJOR(__entry->dev), MINOR(__entry->dev), |
775 | (unsigned long) __entry->ino, | 803 | (unsigned long) __entry->ino, |
776 | (unsigned long) __entry->parent, __entry->datasync) | 804 | (unsigned long) __entry->parent, __entry->datasync) |
777 | ); | 805 | ); |
778 | 806 | ||
807 | TRACE_EVENT(ext4_sync_file_exit, | ||
808 | TP_PROTO(struct inode *inode, int ret), | ||
809 | |||
810 | TP_ARGS(inode, ret), | ||
811 | |||
812 | TP_STRUCT__entry( | ||
813 | __field( int, ret ) | ||
814 | __field( ino_t, ino ) | ||
815 | __field( dev_t, dev ) | ||
816 | ), | ||
817 | |||
818 | TP_fast_assign( | ||
819 | __entry->ret = ret; | ||
820 | __entry->ino = inode->i_ino; | ||
821 | __entry->dev = inode->i_sb->s_dev; | ||
822 | ), | ||
823 | |||
824 | TP_printk("dev %d,%d ino %ld ret %d", | ||
825 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
826 | (unsigned long) __entry->ino, | ||
827 | __entry->ret) | ||
828 | ); | ||
829 | |||
779 | TRACE_EVENT(ext4_sync_fs, | 830 | TRACE_EVENT(ext4_sync_fs, |
780 | TP_PROTO(struct super_block *sb, int wait), | 831 | TP_PROTO(struct super_block *sb, int wait), |
781 | 832 | ||
782 | TP_ARGS(sb, wait), | 833 | TP_ARGS(sb, wait), |
783 | 834 | ||
784 | TP_STRUCT__entry( | 835 | TP_STRUCT__entry( |
785 | __field( int, dev_major ) | 836 | __field( dev_t, dev ) |
786 | __field( int, dev_minor ) | ||
787 | __field( int, wait ) | 837 | __field( int, wait ) |
788 | 838 | ||
789 | ), | 839 | ), |
790 | 840 | ||
791 | TP_fast_assign( | 841 | TP_fast_assign( |
792 | __entry->dev_major = MAJOR(sb->s_dev); | 842 | __entry->dev = sb->s_dev; |
793 | __entry->dev_minor = MINOR(sb->s_dev); | ||
794 | __entry->wait = wait; | 843 | __entry->wait = wait; |
795 | ), | 844 | ), |
796 | 845 | ||
797 | TP_printk("dev %d,%d wait %d", __entry->dev_major, | 846 | TP_printk("dev %d,%d wait %d", |
798 | __entry->dev_minor, __entry->wait) | 847 | MAJOR(__entry->dev), MINOR(__entry->dev), |
848 | __entry->wait) | ||
799 | ); | 849 | ); |
800 | 850 | ||
801 | TRACE_EVENT(ext4_alloc_da_blocks, | 851 | TRACE_EVENT(ext4_alloc_da_blocks, |
@@ -804,23 +854,21 @@ TRACE_EVENT(ext4_alloc_da_blocks, | |||
804 | TP_ARGS(inode), | 854 | TP_ARGS(inode), |
805 | 855 | ||
806 | TP_STRUCT__entry( | 856 | TP_STRUCT__entry( |
807 | __field( int, dev_major ) | 857 | __field( dev_t, dev ) |
808 | __field( int, dev_minor ) | ||
809 | __field( ino_t, ino ) | 858 | __field( ino_t, ino ) |
810 | __field( unsigned int, data_blocks ) | 859 | __field( unsigned int, data_blocks ) |
811 | __field( unsigned int, meta_blocks ) | 860 | __field( unsigned int, meta_blocks ) |
812 | ), | 861 | ), |
813 | 862 | ||
814 | TP_fast_assign( | 863 | TP_fast_assign( |
815 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 864 | __entry->dev = inode->i_sb->s_dev; |
816 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
817 | __entry->ino = inode->i_ino; | 865 | __entry->ino = inode->i_ino; |
818 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | 866 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
819 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 867 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
820 | ), | 868 | ), |
821 | 869 | ||
822 | TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", | 870 | TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", |
823 | __entry->dev_major, __entry->dev_minor, | 871 | MAJOR(__entry->dev), MINOR(__entry->dev), |
824 | (unsigned long) __entry->ino, | 872 | (unsigned long) __entry->ino, |
825 | __entry->data_blocks, __entry->meta_blocks) | 873 | __entry->data_blocks, __entry->meta_blocks) |
826 | ); | 874 | ); |
@@ -831,8 +879,7 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
831 | TP_ARGS(ac), | 879 | TP_ARGS(ac), |
832 | 880 | ||
833 | TP_STRUCT__entry( | 881 | TP_STRUCT__entry( |
834 | __field( int, dev_major ) | 882 | __field( dev_t, dev ) |
835 | __field( int, dev_minor ) | ||
836 | __field( ino_t, ino ) | 883 | __field( ino_t, ino ) |
837 | __field( __u16, found ) | 884 | __field( __u16, found ) |
838 | __field( __u16, groups ) | 885 | __field( __u16, groups ) |
@@ -855,8 +902,7 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
855 | ), | 902 | ), |
856 | 903 | ||
857 | TP_fast_assign( | 904 | TP_fast_assign( |
858 | __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev); | 905 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
859 | __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev); | ||
860 | __entry->ino = ac->ac_inode->i_ino; | 906 | __entry->ino = ac->ac_inode->i_ino; |
861 | __entry->found = ac->ac_found; | 907 | __entry->found = ac->ac_found; |
862 | __entry->flags = ac->ac_flags; | 908 | __entry->flags = ac->ac_flags; |
@@ -881,7 +927,7 @@ TRACE_EVENT(ext4_mballoc_alloc, | |||
881 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " | 927 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
882 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " | 928 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " |
883 | "tail %u broken %u", | 929 | "tail %u broken %u", |
884 | __entry->dev_major, __entry->dev_minor, | 930 | MAJOR(__entry->dev), MINOR(__entry->dev), |
885 | (unsigned long) __entry->ino, | 931 | (unsigned long) __entry->ino, |
886 | __entry->orig_group, __entry->orig_start, | 932 | __entry->orig_group, __entry->orig_start, |
887 | __entry->orig_len, __entry->orig_logical, | 933 | __entry->orig_len, __entry->orig_logical, |
@@ -900,8 +946,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
900 | TP_ARGS(ac), | 946 | TP_ARGS(ac), |
901 | 947 | ||
902 | TP_STRUCT__entry( | 948 | TP_STRUCT__entry( |
903 | __field( int, dev_major ) | 949 | __field( dev_t, dev ) |
904 | __field( int, dev_minor ) | ||
905 | __field( ino_t, ino ) | 950 | __field( ino_t, ino ) |
906 | __field( __u32, orig_logical ) | 951 | __field( __u32, orig_logical ) |
907 | __field( int, orig_start ) | 952 | __field( int, orig_start ) |
@@ -914,8 +959,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
914 | ), | 959 | ), |
915 | 960 | ||
916 | TP_fast_assign( | 961 | TP_fast_assign( |
917 | __entry->dev_major = MAJOR(ac->ac_inode->i_sb->s_dev); | 962 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
918 | __entry->dev_minor = MINOR(ac->ac_inode->i_sb->s_dev); | ||
919 | __entry->ino = ac->ac_inode->i_ino; | 963 | __entry->ino = ac->ac_inode->i_ino; |
920 | __entry->orig_logical = ac->ac_o_ex.fe_logical; | 964 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
921 | __entry->orig_start = ac->ac_o_ex.fe_start; | 965 | __entry->orig_start = ac->ac_o_ex.fe_start; |
@@ -928,7 +972,7 @@ TRACE_EVENT(ext4_mballoc_prealloc, | |||
928 | ), | 972 | ), |
929 | 973 | ||
930 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", | 974 | TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", |
931 | __entry->dev_major, __entry->dev_minor, | 975 | MAJOR(__entry->dev), MINOR(__entry->dev), |
932 | (unsigned long) __entry->ino, | 976 | (unsigned long) __entry->ino, |
933 | __entry->orig_group, __entry->orig_start, | 977 | __entry->orig_group, __entry->orig_start, |
934 | __entry->orig_len, __entry->orig_logical, | 978 | __entry->orig_len, __entry->orig_logical, |
@@ -946,8 +990,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc, | |||
946 | TP_ARGS(sb, inode, group, start, len), | 990 | TP_ARGS(sb, inode, group, start, len), |
947 | 991 | ||
948 | TP_STRUCT__entry( | 992 | TP_STRUCT__entry( |
949 | __field( int, dev_major ) | 993 | __field( dev_t, dev ) |
950 | __field( int, dev_minor ) | ||
951 | __field( ino_t, ino ) | 994 | __field( ino_t, ino ) |
952 | __field( int, result_start ) | 995 | __field( int, result_start ) |
953 | __field( __u32, result_group ) | 996 | __field( __u32, result_group ) |
@@ -955,8 +998,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc, | |||
955 | ), | 998 | ), |
956 | 999 | ||
957 | TP_fast_assign( | 1000 | TP_fast_assign( |
958 | __entry->dev_major = MAJOR(sb->s_dev); | 1001 | __entry->dev = sb->s_dev; |
959 | __entry->dev_minor = MINOR(sb->s_dev); | ||
960 | __entry->ino = inode ? inode->i_ino : 0; | 1002 | __entry->ino = inode ? inode->i_ino : 0; |
961 | __entry->result_start = start; | 1003 | __entry->result_start = start; |
962 | __entry->result_group = group; | 1004 | __entry->result_group = group; |
@@ -964,7 +1006,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc, | |||
964 | ), | 1006 | ), |
965 | 1007 | ||
966 | TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", | 1008 | TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", |
967 | __entry->dev_major, __entry->dev_minor, | 1009 | MAJOR(__entry->dev), MINOR(__entry->dev), |
968 | (unsigned long) __entry->ino, | 1010 | (unsigned long) __entry->ino, |
969 | __entry->result_group, __entry->result_start, | 1011 | __entry->result_group, __entry->result_start, |
970 | __entry->result_len) | 1012 | __entry->result_len) |
@@ -998,8 +1040,7 @@ TRACE_EVENT(ext4_forget, | |||
998 | TP_ARGS(inode, is_metadata, block), | 1040 | TP_ARGS(inode, is_metadata, block), |
999 | 1041 | ||
1000 | TP_STRUCT__entry( | 1042 | TP_STRUCT__entry( |
1001 | __field( int, dev_major ) | 1043 | __field( dev_t, dev ) |
1002 | __field( int, dev_minor ) | ||
1003 | __field( ino_t, ino ) | 1044 | __field( ino_t, ino ) |
1004 | __field( umode_t, mode ) | 1045 | __field( umode_t, mode ) |
1005 | __field( int, is_metadata ) | 1046 | __field( int, is_metadata ) |
@@ -1007,8 +1048,7 @@ TRACE_EVENT(ext4_forget, | |||
1007 | ), | 1048 | ), |
1008 | 1049 | ||
1009 | TP_fast_assign( | 1050 | TP_fast_assign( |
1010 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1051 | __entry->dev = inode->i_sb->s_dev; |
1011 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1012 | __entry->ino = inode->i_ino; | 1052 | __entry->ino = inode->i_ino; |
1013 | __entry->mode = inode->i_mode; | 1053 | __entry->mode = inode->i_mode; |
1014 | __entry->is_metadata = is_metadata; | 1054 | __entry->is_metadata = is_metadata; |
@@ -1016,9 +1056,9 @@ TRACE_EVENT(ext4_forget, | |||
1016 | ), | 1056 | ), |
1017 | 1057 | ||
1018 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", | 1058 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", |
1019 | __entry->dev_major, __entry->dev_minor, | 1059 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1020 | (unsigned long) __entry->ino, __entry->mode, | 1060 | (unsigned long) __entry->ino, |
1021 | __entry->is_metadata, __entry->block) | 1061 | __entry->mode, __entry->is_metadata, __entry->block) |
1022 | ); | 1062 | ); |
1023 | 1063 | ||
1024 | TRACE_EVENT(ext4_da_update_reserve_space, | 1064 | TRACE_EVENT(ext4_da_update_reserve_space, |
@@ -1027,8 +1067,7 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1027 | TP_ARGS(inode, used_blocks), | 1067 | TP_ARGS(inode, used_blocks), |
1028 | 1068 | ||
1029 | TP_STRUCT__entry( | 1069 | TP_STRUCT__entry( |
1030 | __field( int, dev_major ) | 1070 | __field( dev_t, dev ) |
1031 | __field( int, dev_minor ) | ||
1032 | __field( ino_t, ino ) | 1071 | __field( ino_t, ino ) |
1033 | __field( umode_t, mode ) | 1072 | __field( umode_t, mode ) |
1034 | __field( __u64, i_blocks ) | 1073 | __field( __u64, i_blocks ) |
@@ -1039,8 +1078,7 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1039 | ), | 1078 | ), |
1040 | 1079 | ||
1041 | TP_fast_assign( | 1080 | TP_fast_assign( |
1042 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1081 | __entry->dev = inode->i_sb->s_dev; |
1043 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1044 | __entry->ino = inode->i_ino; | 1082 | __entry->ino = inode->i_ino; |
1045 | __entry->mode = inode->i_mode; | 1083 | __entry->mode = inode->i_mode; |
1046 | __entry->i_blocks = inode->i_blocks; | 1084 | __entry->i_blocks = inode->i_blocks; |
@@ -1050,10 +1088,12 @@ TRACE_EVENT(ext4_da_update_reserve_space, | |||
1050 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | 1088 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
1051 | ), | 1089 | ), |
1052 | 1090 | ||
1053 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | 1091 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " |
1054 | __entry->dev_major, __entry->dev_minor, | 1092 | "reserved_data_blocks %d reserved_meta_blocks %d " |
1055 | (unsigned long) __entry->ino, __entry->mode, | 1093 | "allocated_meta_blocks %d", |
1056 | (unsigned long long) __entry->i_blocks, | 1094 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1095 | (unsigned long) __entry->ino, | ||
1096 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
1057 | __entry->used_blocks, __entry->reserved_data_blocks, | 1097 | __entry->used_blocks, __entry->reserved_data_blocks, |
1058 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | 1098 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) |
1059 | ); | 1099 | ); |
@@ -1064,8 +1104,7 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
1064 | TP_ARGS(inode, md_needed), | 1104 | TP_ARGS(inode, md_needed), |
1065 | 1105 | ||
1066 | TP_STRUCT__entry( | 1106 | TP_STRUCT__entry( |
1067 | __field( int, dev_major ) | 1107 | __field( dev_t, dev ) |
1068 | __field( int, dev_minor ) | ||
1069 | __field( ino_t, ino ) | 1108 | __field( ino_t, ino ) |
1070 | __field( umode_t, mode ) | 1109 | __field( umode_t, mode ) |
1071 | __field( __u64, i_blocks ) | 1110 | __field( __u64, i_blocks ) |
@@ -1075,8 +1114,7 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
1075 | ), | 1114 | ), |
1076 | 1115 | ||
1077 | TP_fast_assign( | 1116 | TP_fast_assign( |
1078 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1117 | __entry->dev = inode->i_sb->s_dev; |
1079 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1080 | __entry->ino = inode->i_ino; | 1118 | __entry->ino = inode->i_ino; |
1081 | __entry->mode = inode->i_mode; | 1119 | __entry->mode = inode->i_mode; |
1082 | __entry->i_blocks = inode->i_blocks; | 1120 | __entry->i_blocks = inode->i_blocks; |
@@ -1085,8 +1123,9 @@ TRACE_EVENT(ext4_da_reserve_space, | |||
1085 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | 1123 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
1086 | ), | 1124 | ), |
1087 | 1125 | ||
1088 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", | 1126 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " |
1089 | __entry->dev_major, __entry->dev_minor, | 1127 | "reserved_data_blocks %d reserved_meta_blocks %d", |
1128 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1090 | (unsigned long) __entry->ino, | 1129 | (unsigned long) __entry->ino, |
1091 | __entry->mode, (unsigned long long) __entry->i_blocks, | 1130 | __entry->mode, (unsigned long long) __entry->i_blocks, |
1092 | __entry->md_needed, __entry->reserved_data_blocks, | 1131 | __entry->md_needed, __entry->reserved_data_blocks, |
@@ -1099,8 +1138,7 @@ TRACE_EVENT(ext4_da_release_space, | |||
1099 | TP_ARGS(inode, freed_blocks), | 1138 | TP_ARGS(inode, freed_blocks), |
1100 | 1139 | ||
1101 | TP_STRUCT__entry( | 1140 | TP_STRUCT__entry( |
1102 | __field( int, dev_major ) | 1141 | __field( dev_t, dev ) |
1103 | __field( int, dev_minor ) | ||
1104 | __field( ino_t, ino ) | 1142 | __field( ino_t, ino ) |
1105 | __field( umode_t, mode ) | 1143 | __field( umode_t, mode ) |
1106 | __field( __u64, i_blocks ) | 1144 | __field( __u64, i_blocks ) |
@@ -1111,8 +1149,7 @@ TRACE_EVENT(ext4_da_release_space, | |||
1111 | ), | 1149 | ), |
1112 | 1150 | ||
1113 | TP_fast_assign( | 1151 | TP_fast_assign( |
1114 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 1152 | __entry->dev = inode->i_sb->s_dev; |
1115 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
1116 | __entry->ino = inode->i_ino; | 1153 | __entry->ino = inode->i_ino; |
1117 | __entry->mode = inode->i_mode; | 1154 | __entry->mode = inode->i_mode; |
1118 | __entry->i_blocks = inode->i_blocks; | 1155 | __entry->i_blocks = inode->i_blocks; |
@@ -1122,8 +1159,10 @@ TRACE_EVENT(ext4_da_release_space, | |||
1122 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | 1159 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; |
1123 | ), | 1160 | ), |
1124 | 1161 | ||
1125 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | 1162 | TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " |
1126 | __entry->dev_major, __entry->dev_minor, | 1163 | "reserved_data_blocks %d reserved_meta_blocks %d " |
1164 | "allocated_meta_blocks %d", | ||
1165 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1127 | (unsigned long) __entry->ino, | 1166 | (unsigned long) __entry->ino, |
1128 | __entry->mode, (unsigned long long) __entry->i_blocks, | 1167 | __entry->mode, (unsigned long long) __entry->i_blocks, |
1129 | __entry->freed_blocks, __entry->reserved_data_blocks, | 1168 | __entry->freed_blocks, __entry->reserved_data_blocks, |
@@ -1136,20 +1175,19 @@ DECLARE_EVENT_CLASS(ext4__bitmap_load, | |||
1136 | TP_ARGS(sb, group), | 1175 | TP_ARGS(sb, group), |
1137 | 1176 | ||
1138 | TP_STRUCT__entry( | 1177 | TP_STRUCT__entry( |
1139 | __field( int, dev_major ) | 1178 | __field( dev_t, dev ) |
1140 | __field( int, dev_minor ) | ||
1141 | __field( __u32, group ) | 1179 | __field( __u32, group ) |
1142 | 1180 | ||
1143 | ), | 1181 | ), |
1144 | 1182 | ||
1145 | TP_fast_assign( | 1183 | TP_fast_assign( |
1146 | __entry->dev_major = MAJOR(sb->s_dev); | 1184 | __entry->dev = sb->s_dev; |
1147 | __entry->dev_minor = MINOR(sb->s_dev); | ||
1148 | __entry->group = group; | 1185 | __entry->group = group; |
1149 | ), | 1186 | ), |
1150 | 1187 | ||
1151 | TP_printk("dev %d,%d group %u", | 1188 | TP_printk("dev %d,%d group %u", |
1152 | __entry->dev_major, __entry->dev_minor, __entry->group) | 1189 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1190 | __entry->group) | ||
1153 | ); | 1191 | ); |
1154 | 1192 | ||
1155 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, | 1193 | DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, |
@@ -1166,6 +1204,349 @@ DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, | |||
1166 | TP_ARGS(sb, group) | 1204 | TP_ARGS(sb, group) |
1167 | ); | 1205 | ); |
1168 | 1206 | ||
1207 | DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, | ||
1208 | |||
1209 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
1210 | |||
1211 | TP_ARGS(sb, group) | ||
1212 | ); | ||
1213 | |||
1214 | DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, | ||
1215 | |||
1216 | TP_PROTO(struct super_block *sb, unsigned long group), | ||
1217 | |||
1218 | TP_ARGS(sb, group) | ||
1219 | ); | ||
1220 | |||
1221 | TRACE_EVENT(ext4_direct_IO_enter, | ||
1222 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), | ||
1223 | |||
1224 | TP_ARGS(inode, offset, len, rw), | ||
1225 | |||
1226 | TP_STRUCT__entry( | ||
1227 | __field( ino_t, ino ) | ||
1228 | __field( dev_t, dev ) | ||
1229 | __field( loff_t, pos ) | ||
1230 | __field( unsigned long, len ) | ||
1231 | __field( int, rw ) | ||
1232 | ), | ||
1233 | |||
1234 | TP_fast_assign( | ||
1235 | __entry->ino = inode->i_ino; | ||
1236 | __entry->dev = inode->i_sb->s_dev; | ||
1237 | __entry->pos = offset; | ||
1238 | __entry->len = len; | ||
1239 | __entry->rw = rw; | ||
1240 | ), | ||
1241 | |||
1242 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d", | ||
1243 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1244 | (unsigned long) __entry->ino, | ||
1245 | (unsigned long long) __entry->pos, __entry->len, __entry->rw) | ||
1246 | ); | ||
1247 | |||
1248 | TRACE_EVENT(ext4_direct_IO_exit, | ||
1249 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw, int ret), | ||
1250 | |||
1251 | TP_ARGS(inode, offset, len, rw, ret), | ||
1252 | |||
1253 | TP_STRUCT__entry( | ||
1254 | __field( ino_t, ino ) | ||
1255 | __field( dev_t, dev ) | ||
1256 | __field( loff_t, pos ) | ||
1257 | __field( unsigned long, len ) | ||
1258 | __field( int, rw ) | ||
1259 | __field( int, ret ) | ||
1260 | ), | ||
1261 | |||
1262 | TP_fast_assign( | ||
1263 | __entry->ino = inode->i_ino; | ||
1264 | __entry->dev = inode->i_sb->s_dev; | ||
1265 | __entry->pos = offset; | ||
1266 | __entry->len = len; | ||
1267 | __entry->rw = rw; | ||
1268 | __entry->ret = ret; | ||
1269 | ), | ||
1270 | |||
1271 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d", | ||
1272 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1273 | (unsigned long) __entry->ino, | ||
1274 | (unsigned long long) __entry->pos, __entry->len, | ||
1275 | __entry->rw, __entry->ret) | ||
1276 | ); | ||
1277 | |||
1278 | TRACE_EVENT(ext4_fallocate_enter, | ||
1279 | TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), | ||
1280 | |||
1281 | TP_ARGS(inode, offset, len, mode), | ||
1282 | |||
1283 | TP_STRUCT__entry( | ||
1284 | __field( ino_t, ino ) | ||
1285 | __field( dev_t, dev ) | ||
1286 | __field( loff_t, pos ) | ||
1287 | __field( loff_t, len ) | ||
1288 | __field( int, mode ) | ||
1289 | ), | ||
1290 | |||
1291 | TP_fast_assign( | ||
1292 | __entry->ino = inode->i_ino; | ||
1293 | __entry->dev = inode->i_sb->s_dev; | ||
1294 | __entry->pos = offset; | ||
1295 | __entry->len = len; | ||
1296 | __entry->mode = mode; | ||
1297 | ), | ||
1298 | |||
1299 | TP_printk("dev %d,%d ino %ld pos %llu len %llu mode %d", | ||
1300 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1301 | (unsigned long) __entry->ino, | ||
1302 | (unsigned long long) __entry->pos, | ||
1303 | (unsigned long long) __entry->len, __entry->mode) | ||
1304 | ); | ||
1305 | |||
1306 | TRACE_EVENT(ext4_fallocate_exit, | ||
1307 | TP_PROTO(struct inode *inode, loff_t offset, unsigned int max_blocks, int ret), | ||
1308 | |||
1309 | TP_ARGS(inode, offset, max_blocks, ret), | ||
1310 | |||
1311 | TP_STRUCT__entry( | ||
1312 | __field( ino_t, ino ) | ||
1313 | __field( dev_t, dev ) | ||
1314 | __field( loff_t, pos ) | ||
1315 | __field( unsigned, blocks ) | ||
1316 | __field( int, ret ) | ||
1317 | ), | ||
1318 | |||
1319 | TP_fast_assign( | ||
1320 | __entry->ino = inode->i_ino; | ||
1321 | __entry->dev = inode->i_sb->s_dev; | ||
1322 | __entry->pos = offset; | ||
1323 | __entry->blocks = max_blocks; | ||
1324 | __entry->ret = ret; | ||
1325 | ), | ||
1326 | |||
1327 | TP_printk("dev %d,%d ino %ld pos %llu blocks %d ret %d", | ||
1328 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1329 | (unsigned long) __entry->ino, | ||
1330 | (unsigned long long) __entry->pos, __entry->blocks, | ||
1331 | __entry->ret) | ||
1332 | ); | ||
1333 | |||
1334 | TRACE_EVENT(ext4_unlink_enter, | ||
1335 | TP_PROTO(struct inode *parent, struct dentry *dentry), | ||
1336 | |||
1337 | TP_ARGS(parent, dentry), | ||
1338 | |||
1339 | TP_STRUCT__entry( | ||
1340 | __field( ino_t, parent ) | ||
1341 | __field( ino_t, ino ) | ||
1342 | __field( loff_t, size ) | ||
1343 | __field( dev_t, dev ) | ||
1344 | ), | ||
1345 | |||
1346 | TP_fast_assign( | ||
1347 | __entry->parent = parent->i_ino; | ||
1348 | __entry->ino = dentry->d_inode->i_ino; | ||
1349 | __entry->size = dentry->d_inode->i_size; | ||
1350 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
1351 | ), | ||
1352 | |||
1353 | TP_printk("dev %d,%d ino %ld size %lld parent %ld", | ||
1354 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1355 | (unsigned long) __entry->ino, __entry->size, | ||
1356 | (unsigned long) __entry->parent) | ||
1357 | ); | ||
1358 | |||
1359 | TRACE_EVENT(ext4_unlink_exit, | ||
1360 | TP_PROTO(struct dentry *dentry, int ret), | ||
1361 | |||
1362 | TP_ARGS(dentry, ret), | ||
1363 | |||
1364 | TP_STRUCT__entry( | ||
1365 | __field( ino_t, ino ) | ||
1366 | __field( dev_t, dev ) | ||
1367 | __field( int, ret ) | ||
1368 | ), | ||
1369 | |||
1370 | TP_fast_assign( | ||
1371 | __entry->ino = dentry->d_inode->i_ino; | ||
1372 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
1373 | __entry->ret = ret; | ||
1374 | ), | ||
1375 | |||
1376 | TP_printk("dev %d,%d ino %ld ret %d", | ||
1377 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1378 | (unsigned long) __entry->ino, | ||
1379 | __entry->ret) | ||
1380 | ); | ||
1381 | |||
1382 | DECLARE_EVENT_CLASS(ext4__truncate, | ||
1383 | TP_PROTO(struct inode *inode), | ||
1384 | |||
1385 | TP_ARGS(inode), | ||
1386 | |||
1387 | TP_STRUCT__entry( | ||
1388 | __field( ino_t, ino ) | ||
1389 | __field( dev_t, dev ) | ||
1390 | __field( blkcnt_t, blocks ) | ||
1391 | ), | ||
1392 | |||
1393 | TP_fast_assign( | ||
1394 | __entry->ino = inode->i_ino; | ||
1395 | __entry->dev = inode->i_sb->s_dev; | ||
1396 | __entry->blocks = inode->i_blocks; | ||
1397 | ), | ||
1398 | |||
1399 | TP_printk("dev %d,%d ino %lu blocks %lu", | ||
1400 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1401 | (unsigned long) __entry->ino, (unsigned long) __entry->blocks) | ||
1402 | ); | ||
1403 | |||
1404 | DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, | ||
1405 | |||
1406 | TP_PROTO(struct inode *inode), | ||
1407 | |||
1408 | TP_ARGS(inode) | ||
1409 | ); | ||
1410 | |||
1411 | DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, | ||
1412 | |||
1413 | TP_PROTO(struct inode *inode), | ||
1414 | |||
1415 | TP_ARGS(inode) | ||
1416 | ); | ||
1417 | |||
1418 | DECLARE_EVENT_CLASS(ext4__map_blocks_enter, | ||
1419 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1420 | unsigned len, unsigned flags), | ||
1421 | |||
1422 | TP_ARGS(inode, lblk, len, flags), | ||
1423 | |||
1424 | TP_STRUCT__entry( | ||
1425 | __field( ino_t, ino ) | ||
1426 | __field( dev_t, dev ) | ||
1427 | __field( ext4_lblk_t, lblk ) | ||
1428 | __field( unsigned, len ) | ||
1429 | __field( unsigned, flags ) | ||
1430 | ), | ||
1431 | |||
1432 | TP_fast_assign( | ||
1433 | __entry->ino = inode->i_ino; | ||
1434 | __entry->dev = inode->i_sb->s_dev; | ||
1435 | __entry->lblk = lblk; | ||
1436 | __entry->len = len; | ||
1437 | __entry->flags = flags; | ||
1438 | ), | ||
1439 | |||
1440 | TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", | ||
1441 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1442 | (unsigned long) __entry->ino, | ||
1443 | (unsigned) __entry->lblk, __entry->len, __entry->flags) | ||
1444 | ); | ||
1445 | |||
1446 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, | ||
1447 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1448 | unsigned len, unsigned flags), | ||
1449 | |||
1450 | TP_ARGS(inode, lblk, len, flags) | ||
1451 | ); | ||
1452 | |||
1453 | DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, | ||
1454 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1455 | unsigned len, unsigned flags), | ||
1456 | |||
1457 | TP_ARGS(inode, lblk, len, flags) | ||
1458 | ); | ||
1459 | |||
1460 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, | ||
1461 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1462 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1463 | |||
1464 | TP_ARGS(inode, lblk, pblk, len, ret), | ||
1465 | |||
1466 | TP_STRUCT__entry( | ||
1467 | __field( ino_t, ino ) | ||
1468 | __field( dev_t, dev ) | ||
1469 | __field( ext4_lblk_t, lblk ) | ||
1470 | __field( ext4_fsblk_t, pblk ) | ||
1471 | __field( unsigned, len ) | ||
1472 | __field( int, ret ) | ||
1473 | ), | ||
1474 | |||
1475 | TP_fast_assign( | ||
1476 | __entry->ino = inode->i_ino; | ||
1477 | __entry->dev = inode->i_sb->s_dev; | ||
1478 | __entry->lblk = lblk; | ||
1479 | __entry->pblk = pblk; | ||
1480 | __entry->len = len; | ||
1481 | __entry->ret = ret; | ||
1482 | ), | ||
1483 | |||
1484 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", | ||
1485 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1486 | (unsigned long) __entry->ino, | ||
1487 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, | ||
1488 | __entry->len, __entry->ret) | ||
1489 | ); | ||
1490 | |||
1491 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, | ||
1492 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1493 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1494 | |||
1495 | TP_ARGS(inode, lblk, pblk, len, ret) | ||
1496 | ); | ||
1497 | |||
1498 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, | ||
1499 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | ||
1500 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1501 | |||
1502 | TP_ARGS(inode, lblk, pblk, len, ret) | ||
1503 | ); | ||
1504 | |||
1505 | TRACE_EVENT(ext4_ext_load_extent, | ||
1506 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), | ||
1507 | |||
1508 | TP_ARGS(inode, lblk, pblk), | ||
1509 | |||
1510 | TP_STRUCT__entry( | ||
1511 | __field( ino_t, ino ) | ||
1512 | __field( dev_t, dev ) | ||
1513 | __field( ext4_lblk_t, lblk ) | ||
1514 | __field( ext4_fsblk_t, pblk ) | ||
1515 | ), | ||
1516 | |||
1517 | TP_fast_assign( | ||
1518 | __entry->ino = inode->i_ino; | ||
1519 | __entry->dev = inode->i_sb->s_dev; | ||
1520 | __entry->lblk = lblk; | ||
1521 | __entry->pblk = pblk; | ||
1522 | ), | ||
1523 | |||
1524 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", | ||
1525 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1526 | (unsigned long) __entry->ino, | ||
1527 | (unsigned) __entry->lblk, (unsigned long long) __entry->pblk) | ||
1528 | ); | ||
1529 | |||
1530 | TRACE_EVENT(ext4_load_inode, | ||
1531 | TP_PROTO(struct inode *inode), | ||
1532 | |||
1533 | TP_ARGS(inode), | ||
1534 | |||
1535 | TP_STRUCT__entry( | ||
1536 | __field( ino_t, ino ) | ||
1537 | __field( dev_t, dev ) | ||
1538 | ), | ||
1539 | |||
1540 | TP_fast_assign( | ||
1541 | __entry->ino = inode->i_ino; | ||
1542 | __entry->dev = inode->i_sb->s_dev; | ||
1543 | ), | ||
1544 | |||
1545 | TP_printk("dev %d,%d ino %ld", | ||
1546 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
1547 | (unsigned long) __entry->ino) | ||
1548 | ); | ||
1549 | |||
1169 | #endif /* _TRACE_EXT4_H */ | 1550 | #endif /* _TRACE_EXT4_H */ |
1170 | 1551 | ||
1171 | /* This part must be outside protection */ | 1552 | /* This part must be outside protection */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 7447ea9305b5..bf16545cc977 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -17,19 +17,17 @@ TRACE_EVENT(jbd2_checkpoint, | |||
17 | TP_ARGS(journal, result), | 17 | TP_ARGS(journal, result), |
18 | 18 | ||
19 | TP_STRUCT__entry( | 19 | TP_STRUCT__entry( |
20 | __field( int, dev_major ) | 20 | __field( dev_t, dev ) |
21 | __field( int, dev_minor ) | ||
22 | __field( int, result ) | 21 | __field( int, result ) |
23 | ), | 22 | ), |
24 | 23 | ||
25 | TP_fast_assign( | 24 | TP_fast_assign( |
26 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 25 | __entry->dev = journal->j_fs_dev->bd_dev; |
27 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
28 | __entry->result = result; | 26 | __entry->result = result; |
29 | ), | 27 | ), |
30 | 28 | ||
31 | TP_printk("dev %d,%d result %d", | 29 | TP_printk("dev %s result %d", |
32 | __entry->dev_major, __entry->dev_minor, __entry->result) | 30 | jbd2_dev_to_name(__entry->dev), __entry->result) |
33 | ); | 31 | ); |
34 | 32 | ||
35 | DECLARE_EVENT_CLASS(jbd2_commit, | 33 | DECLARE_EVENT_CLASS(jbd2_commit, |
@@ -39,22 +37,20 @@ DECLARE_EVENT_CLASS(jbd2_commit, | |||
39 | TP_ARGS(journal, commit_transaction), | 37 | TP_ARGS(journal, commit_transaction), |
40 | 38 | ||
41 | TP_STRUCT__entry( | 39 | TP_STRUCT__entry( |
42 | __field( int, dev_major ) | 40 | __field( dev_t, dev ) |
43 | __field( int, dev_minor ) | ||
44 | __field( char, sync_commit ) | 41 | __field( char, sync_commit ) |
45 | __field( int, transaction ) | 42 | __field( int, transaction ) |
46 | ), | 43 | ), |
47 | 44 | ||
48 | TP_fast_assign( | 45 | TP_fast_assign( |
49 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 46 | __entry->dev = journal->j_fs_dev->bd_dev; |
50 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
51 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | 47 | __entry->sync_commit = commit_transaction->t_synchronous_commit; |
52 | __entry->transaction = commit_transaction->t_tid; | 48 | __entry->transaction = commit_transaction->t_tid; |
53 | ), | 49 | ), |
54 | 50 | ||
55 | TP_printk("dev %d,%d transaction %d sync %d", | 51 | TP_printk("dev %s transaction %d sync %d", |
56 | __entry->dev_major, __entry->dev_minor, | 52 | jbd2_dev_to_name(__entry->dev), __entry->transaction, |
57 | __entry->transaction, __entry->sync_commit) | 53 | __entry->sync_commit) |
58 | ); | 54 | ); |
59 | 55 | ||
60 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, | 56 | DEFINE_EVENT(jbd2_commit, jbd2_start_commit, |
@@ -91,24 +87,22 @@ TRACE_EVENT(jbd2_end_commit, | |||
91 | TP_ARGS(journal, commit_transaction), | 87 | TP_ARGS(journal, commit_transaction), |
92 | 88 | ||
93 | TP_STRUCT__entry( | 89 | TP_STRUCT__entry( |
94 | __field( int, dev_major ) | 90 | __field( dev_t, dev ) |
95 | __field( int, dev_minor ) | ||
96 | __field( char, sync_commit ) | 91 | __field( char, sync_commit ) |
97 | __field( int, transaction ) | 92 | __field( int, transaction ) |
98 | __field( int, head ) | 93 | __field( int, head ) |
99 | ), | 94 | ), |
100 | 95 | ||
101 | TP_fast_assign( | 96 | TP_fast_assign( |
102 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 97 | __entry->dev = journal->j_fs_dev->bd_dev; |
103 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
104 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | 98 | __entry->sync_commit = commit_transaction->t_synchronous_commit; |
105 | __entry->transaction = commit_transaction->t_tid; | 99 | __entry->transaction = commit_transaction->t_tid; |
106 | __entry->head = journal->j_tail_sequence; | 100 | __entry->head = journal->j_tail_sequence; |
107 | ), | 101 | ), |
108 | 102 | ||
109 | TP_printk("dev %d,%d transaction %d sync %d head %d", | 103 | TP_printk("dev %s transaction %d sync %d head %d", |
110 | __entry->dev_major, __entry->dev_minor, | 104 | jbd2_dev_to_name(__entry->dev), __entry->transaction, |
111 | __entry->transaction, __entry->sync_commit, __entry->head) | 105 | __entry->sync_commit, __entry->head) |
112 | ); | 106 | ); |
113 | 107 | ||
114 | TRACE_EVENT(jbd2_submit_inode_data, | 108 | TRACE_EVENT(jbd2_submit_inode_data, |
@@ -117,20 +111,17 @@ TRACE_EVENT(jbd2_submit_inode_data, | |||
117 | TP_ARGS(inode), | 111 | TP_ARGS(inode), |
118 | 112 | ||
119 | TP_STRUCT__entry( | 113 | TP_STRUCT__entry( |
120 | __field( int, dev_major ) | 114 | __field( dev_t, dev ) |
121 | __field( int, dev_minor ) | ||
122 | __field( ino_t, ino ) | 115 | __field( ino_t, ino ) |
123 | ), | 116 | ), |
124 | 117 | ||
125 | TP_fast_assign( | 118 | TP_fast_assign( |
126 | __entry->dev_major = MAJOR(inode->i_sb->s_dev); | 119 | __entry->dev = inode->i_sb->s_dev; |
127 | __entry->dev_minor = MINOR(inode->i_sb->s_dev); | ||
128 | __entry->ino = inode->i_ino; | 120 | __entry->ino = inode->i_ino; |
129 | ), | 121 | ), |
130 | 122 | ||
131 | TP_printk("dev %d,%d ino %lu", | 123 | TP_printk("dev %s ino %lu", |
132 | __entry->dev_major, __entry->dev_minor, | 124 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
133 | (unsigned long) __entry->ino) | ||
134 | ); | 125 | ); |
135 | 126 | ||
136 | TRACE_EVENT(jbd2_run_stats, | 127 | TRACE_EVENT(jbd2_run_stats, |
@@ -140,8 +131,7 @@ TRACE_EVENT(jbd2_run_stats, | |||
140 | TP_ARGS(dev, tid, stats), | 131 | TP_ARGS(dev, tid, stats), |
141 | 132 | ||
142 | TP_STRUCT__entry( | 133 | TP_STRUCT__entry( |
143 | __field( int, dev_major ) | 134 | __field( dev_t, dev ) |
144 | __field( int, dev_minor ) | ||
145 | __field( unsigned long, tid ) | 135 | __field( unsigned long, tid ) |
146 | __field( unsigned long, wait ) | 136 | __field( unsigned long, wait ) |
147 | __field( unsigned long, running ) | 137 | __field( unsigned long, running ) |
@@ -154,8 +144,7 @@ TRACE_EVENT(jbd2_run_stats, | |||
154 | ), | 144 | ), |
155 | 145 | ||
156 | TP_fast_assign( | 146 | TP_fast_assign( |
157 | __entry->dev_major = MAJOR(dev); | 147 | __entry->dev = dev; |
158 | __entry->dev_minor = MINOR(dev); | ||
159 | __entry->tid = tid; | 148 | __entry->tid = tid; |
160 | __entry->wait = stats->rs_wait; | 149 | __entry->wait = stats->rs_wait; |
161 | __entry->running = stats->rs_running; | 150 | __entry->running = stats->rs_running; |
@@ -167,9 +156,9 @@ TRACE_EVENT(jbd2_run_stats, | |||
167 | __entry->blocks_logged = stats->rs_blocks_logged; | 156 | __entry->blocks_logged = stats->rs_blocks_logged; |
168 | ), | 157 | ), |
169 | 158 | ||
170 | TP_printk("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " | 159 | TP_printk("dev %s tid %lu wait %u running %u locked %u flushing %u " |
171 | "logging %u handle_count %u blocks %u blocks_logged %u", | 160 | "logging %u handle_count %u blocks %u blocks_logged %u", |
172 | __entry->dev_major, __entry->dev_minor, __entry->tid, | 161 | jbd2_dev_to_name(__entry->dev), __entry->tid, |
173 | jiffies_to_msecs(__entry->wait), | 162 | jiffies_to_msecs(__entry->wait), |
174 | jiffies_to_msecs(__entry->running), | 163 | jiffies_to_msecs(__entry->running), |
175 | jiffies_to_msecs(__entry->locked), | 164 | jiffies_to_msecs(__entry->locked), |
@@ -186,8 +175,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
186 | TP_ARGS(dev, tid, stats), | 175 | TP_ARGS(dev, tid, stats), |
187 | 176 | ||
188 | TP_STRUCT__entry( | 177 | TP_STRUCT__entry( |
189 | __field( int, dev_major ) | 178 | __field( dev_t, dev ) |
190 | __field( int, dev_minor ) | ||
191 | __field( unsigned long, tid ) | 179 | __field( unsigned long, tid ) |
192 | __field( unsigned long, chp_time ) | 180 | __field( unsigned long, chp_time ) |
193 | __field( __u32, forced_to_close ) | 181 | __field( __u32, forced_to_close ) |
@@ -196,8 +184,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
196 | ), | 184 | ), |
197 | 185 | ||
198 | TP_fast_assign( | 186 | TP_fast_assign( |
199 | __entry->dev_major = MAJOR(dev); | 187 | __entry->dev = dev; |
200 | __entry->dev_minor = MINOR(dev); | ||
201 | __entry->tid = tid; | 188 | __entry->tid = tid; |
202 | __entry->chp_time = stats->cs_chp_time; | 189 | __entry->chp_time = stats->cs_chp_time; |
203 | __entry->forced_to_close= stats->cs_forced_to_close; | 190 | __entry->forced_to_close= stats->cs_forced_to_close; |
@@ -205,9 +192,9 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
205 | __entry->dropped = stats->cs_dropped; | 192 | __entry->dropped = stats->cs_dropped; |
206 | ), | 193 | ), |
207 | 194 | ||
208 | TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u " | 195 | TP_printk("dev %s tid %lu chp_time %u forced_to_close %u " |
209 | "written %u dropped %u", | 196 | "written %u dropped %u", |
210 | __entry->dev_major, __entry->dev_minor, __entry->tid, | 197 | jbd2_dev_to_name(__entry->dev), __entry->tid, |
211 | jiffies_to_msecs(__entry->chp_time), | 198 | jiffies_to_msecs(__entry->chp_time), |
212 | __entry->forced_to_close, __entry->written, __entry->dropped) | 199 | __entry->forced_to_close, __entry->written, __entry->dropped) |
213 | ); | 200 | ); |
@@ -220,8 +207,7 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
220 | TP_ARGS(journal, first_tid, block_nr, freed), | 207 | TP_ARGS(journal, first_tid, block_nr, freed), |
221 | 208 | ||
222 | TP_STRUCT__entry( | 209 | TP_STRUCT__entry( |
223 | __field( int, dev_major ) | 210 | __field( dev_t, dev ) |
224 | __field( int, dev_minor ) | ||
225 | __field( tid_t, tail_sequence ) | 211 | __field( tid_t, tail_sequence ) |
226 | __field( tid_t, first_tid ) | 212 | __field( tid_t, first_tid ) |
227 | __field(unsigned long, block_nr ) | 213 | __field(unsigned long, block_nr ) |
@@ -229,18 +215,16 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
229 | ), | 215 | ), |
230 | 216 | ||
231 | TP_fast_assign( | 217 | TP_fast_assign( |
232 | __entry->dev_major = MAJOR(journal->j_fs_dev->bd_dev); | 218 | __entry->dev = journal->j_fs_dev->bd_dev; |
233 | __entry->dev_minor = MINOR(journal->j_fs_dev->bd_dev); | ||
234 | __entry->tail_sequence = journal->j_tail_sequence; | 219 | __entry->tail_sequence = journal->j_tail_sequence; |
235 | __entry->first_tid = first_tid; | 220 | __entry->first_tid = first_tid; |
236 | __entry->block_nr = block_nr; | 221 | __entry->block_nr = block_nr; |
237 | __entry->freed = freed; | 222 | __entry->freed = freed; |
238 | ), | 223 | ), |
239 | 224 | ||
240 | TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", | 225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", |
241 | __entry->dev_major, __entry->dev_minor, | 226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, |
242 | __entry->tail_sequence, __entry->first_tid, | 227 | __entry->first_tid, __entry->block_nr, __entry->freed) |
243 | __entry->block_nr, __entry->freed) | ||
244 | ); | 228 | ); |
245 | 229 | ||
246 | #endif /* _TRACE_JBD2_H */ | 230 | #endif /* _TRACE_JBD2_H */ |
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 0c864db1a466..28447f1594fa 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -52,6 +52,7 @@ struct atmel_lcdfb_info { | |||
52 | u8 bl_power; | 52 | u8 bl_power; |
53 | #endif | 53 | #endif |
54 | bool lcdcon_is_backlight; | 54 | bool lcdcon_is_backlight; |
55 | bool lcdcon_pol_negative; | ||
55 | u8 saved_lcdcon; | 56 | u8 saved_lcdcon; |
56 | 57 | ||
57 | u8 default_bpp; | 58 | u8 default_bpp; |
diff --git a/include/video/kyro.h b/include/video/kyro.h index dba7de2ee4a8..c563968e926c 100644 --- a/include/video/kyro.h +++ b/include/video/kyro.h | |||
@@ -32,7 +32,7 @@ struct kyrofb_info { | |||
32 | u32 PIXCLK; /* Pixel Clock */ | 32 | u32 PIXCLK; /* Pixel Clock */ |
33 | u32 HCLK; /* Hor Clock */ | 33 | u32 HCLK; /* Hor Clock */ |
34 | 34 | ||
35 | /* Usefull to hold depth here for Linux */ | 35 | /* Useful to hold depth here for Linux */ |
36 | u8 PIXDEPTH; | 36 | u8 PIXDEPTH; |
37 | 37 | ||
38 | #ifdef CONFIG_MTRR | 38 | #ifdef CONFIG_MTRR |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 08b663782956..bc5013e8059d 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
@@ -129,7 +129,7 @@ struct neofb_par { | |||
129 | unsigned char CRTC[25]; /* Crtc Controller */ | 129 | unsigned char CRTC[25]; /* Crtc Controller */ |
130 | unsigned char Sequencer[5]; /* Video Sequencer */ | 130 | unsigned char Sequencer[5]; /* Video Sequencer */ |
131 | unsigned char Graphics[9]; /* Video Graphics */ | 131 | unsigned char Graphics[9]; /* Video Graphics */ |
132 | unsigned char Attribute[21]; /* Video Atribute */ | 132 | unsigned char Attribute[21]; /* Video Attribute */ |
133 | 133 | ||
134 | unsigned char GeneralLockReg; | 134 | unsigned char GeneralLockReg; |
135 | unsigned char ExtCRTDispAddr; | 135 | unsigned char ExtCRTDispAddr; |
diff --git a/include/video/newport.h b/include/video/newport.h index db9d9e3d6cc0..de980a3b60c9 100644 --- a/include/video/newport.h +++ b/include/video/newport.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) | 6 | * Copyright (C) 1996 David S. Miller (davem@davemloft.net) |
7 | * | 7 | * |
8 | * Ulf Carlsson - Compability with the IRIX structures added | 8 | * Ulf Carlsson - Compatibility with the IRIX structures added |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef _SGI_NEWPORT_H | 11 | #ifndef _SGI_NEWPORT_H |
diff --git a/include/video/sisfb.h b/include/video/sisfb.h index fdd74f1a6791..6dc5df9e43f3 100644 --- a/include/video/sisfb.h +++ b/include/video/sisfb.h | |||
@@ -151,7 +151,7 @@ struct sisfb_cmd { | |||
151 | __u32 sisfb_result[4]; | 151 | __u32 sisfb_result[4]; |
152 | }; | 152 | }; |
153 | 153 | ||
154 | /* Addtional IOCTLs for communication sisfb <> X driver */ | 154 | /* Additional IOCTLs for communication sisfb <> X driver */ |
155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ | 155 | /* If changing this, vgatypes.h must also be changed (for X driver) */ |
156 | 156 | ||
157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ | 157 | /* ioctl for identifying and giving some info (esp. memory heap start) */ |
diff --git a/include/video/sstfb.h b/include/video/sstfb.h index b52f07381243..c449eace12cd 100644 --- a/include/video/sstfb.h +++ b/include/video/sstfb.h | |||
@@ -156,7 +156,7 @@ | |||
156 | #define DAC_READ FBIINIT2 /* in remap mode */ | 156 | #define DAC_READ FBIINIT2 /* in remap mode */ |
157 | #define FBIINIT3 0x021c /* fbi controls */ | 157 | #define FBIINIT3 0x021c /* fbi controls */ |
158 | # define DISABLE_TEXTURE BIT(6) | 158 | # define DISABLE_TEXTURE BIT(6) |
159 | # define Y_SWAP_ORIGIN_SHIFT 22 /* Y swap substraction value */ | 159 | # define Y_SWAP_ORIGIN_SHIFT 22 /* Y swap subtraction value */ |
160 | #define HSYNC 0x0220 | 160 | #define HSYNC 0x0220 |
161 | #define VSYNC 0x0224 | 161 | #define VSYNC 0x0224 |
162 | #define DAC_DATA 0x022c | 162 | #define DAC_DATA 0x022c |
@@ -212,9 +212,9 @@ | |||
212 | # define DACREG_CR0_24BPP 0x50 /* mode 5 */ | 212 | # define DACREG_CR0_24BPP 0x50 /* mode 5 */ |
213 | #define DACREG_CR1_I 0x05 | 213 | #define DACREG_CR1_I 0x05 |
214 | #define DACREG_CC_I 0x06 | 214 | #define DACREG_CC_I 0x06 |
215 | # define DACREG_CC_CLKA BIT(7) /* clk A controled by regs */ | 215 | # define DACREG_CC_CLKA BIT(7) /* clk A controlled by regs */ |
216 | # define DACREG_CC_CLKA_C (2<<4) /* clk A uses reg C */ | 216 | # define DACREG_CC_CLKA_C (2<<4) /* clk A uses reg C */ |
217 | # define DACREG_CC_CLKB BIT(3) /* clk B controled by regs */ | 217 | # define DACREG_CC_CLKB BIT(3) /* clk B controlled by regs */ |
218 | # define DACREG_CC_CLKB_D 3 /* clkB uses reg D */ | 218 | # define DACREG_CC_CLKB_D 3 /* clkB uses reg D */ |
219 | #define DACREG_AC0_I 0x48 /* clock A reg C */ | 219 | #define DACREG_AC0_I 0x48 /* clock A reg C */ |
220 | #define DACREG_AC1_I 0x49 | 220 | #define DACREG_AC1_I 0x49 |
diff --git a/include/xen/interface/elfnote.h b/include/xen/interface/elfnote.h index 7a8262c375cc..0360b15f4883 100644 --- a/include/xen/interface/elfnote.h +++ b/include/xen/interface/elfnote.h | |||
@@ -51,7 +51,7 @@ | |||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * The offset of the ELF paddr field from the acutal required | 53 | * The offset of the ELF paddr field from the acutal required |
54 | * psuedo-physical address (numeric). | 54 | * pseudo-physical address (numeric). |
55 | * | 55 | * |
56 | * This is used to maintain backwards compatibility with older kernels | 56 | * This is used to maintain backwards compatibility with older kernels |
57 | * which wrote __PAGE_OFFSET into that field. This field defaults to 0 | 57 | * which wrote __PAGE_OFFSET into that field. This field defaults to 0 |