diff options
Diffstat (limited to 'include')
254 files changed, 4770 insertions, 2775 deletions
diff --git a/include/Kbuild b/include/Kbuild index 1dfd33e8d43b..bab1145bc7a7 100644 --- a/include/Kbuild +++ b/include/Kbuild | |||
@@ -1,5 +1,2 @@ | |||
1 | # Top-level Makefile calls into asm-$(ARCH) | 1 | # Top-level Makefile calls into asm-$(ARCH) |
2 | # List only non-arch directories below | 2 | # List only non-arch directories below |
3 | |||
4 | header-y += video/ | ||
5 | header-y += scsi/ | ||
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 9bf59d0e8aaa..cf051e05a8fe 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -44,17 +44,50 @@ | |||
44 | #ifndef __ACEXCEP_H__ | 44 | #ifndef __ACEXCEP_H__ |
45 | #define __ACEXCEP_H__ | 45 | #define __ACEXCEP_H__ |
46 | 46 | ||
47 | /* This module contains all possible exception codes for acpi_status */ | ||
48 | |||
47 | /* | 49 | /* |
48 | * Exceptions returned by external ACPI interfaces | 50 | * Exception code classes |
49 | */ | 51 | */ |
50 | #define AE_CODE_ENVIRONMENTAL 0x0000 | 52 | #define AE_CODE_ENVIRONMENTAL 0x0000 /* General ACPICA environment */ |
51 | #define AE_CODE_PROGRAMMER 0x1000 | 53 | #define AE_CODE_PROGRAMMER 0x1000 /* External ACPICA interface caller */ |
52 | #define AE_CODE_ACPI_TABLES 0x2000 | 54 | #define AE_CODE_ACPI_TABLES 0x2000 /* ACPI tables */ |
53 | #define AE_CODE_AML 0x3000 | 55 | #define AE_CODE_AML 0x3000 /* From executing AML code */ |
54 | #define AE_CODE_CONTROL 0x4000 | 56 | #define AE_CODE_CONTROL 0x4000 /* Internal control codes */ |
57 | |||
55 | #define AE_CODE_MAX 0x4000 | 58 | #define AE_CODE_MAX 0x4000 |
56 | #define AE_CODE_MASK 0xF000 | 59 | #define AE_CODE_MASK 0xF000 |
57 | 60 | ||
61 | /* | ||
62 | * Macros to insert the exception code classes | ||
63 | */ | ||
64 | #define EXCEP_ENV(code) ((acpi_status) (code | AE_CODE_ENVIRONMENTAL)) | ||
65 | #define EXCEP_PGM(code) ((acpi_status) (code | AE_CODE_PROGRAMMER)) | ||
66 | #define EXCEP_TBL(code) ((acpi_status) (code | AE_CODE_ACPI_TABLES)) | ||
67 | #define EXCEP_AML(code) ((acpi_status) (code | AE_CODE_AML)) | ||
68 | #define EXCEP_CTL(code) ((acpi_status) (code | AE_CODE_CONTROL)) | ||
69 | |||
70 | /* | ||
71 | * Exception info table. The "Description" field is used only by the | ||
72 | * ACPICA help application (acpihelp). | ||
73 | */ | ||
74 | struct acpi_exception_info { | ||
75 | char *name; | ||
76 | |||
77 | #ifdef ACPI_HELP_APP | ||
78 | char *description; | ||
79 | #endif | ||
80 | }; | ||
81 | |||
82 | #ifdef ACPI_HELP_APP | ||
83 | #define EXCEP_TXT(name,description) {name, description} | ||
84 | #else | ||
85 | #define EXCEP_TXT(name,description) {name} | ||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * Success is always zero, failure is non-zero | ||
90 | */ | ||
58 | #define ACPI_SUCCESS(a) (!(a)) | 91 | #define ACPI_SUCCESS(a) (!(a)) |
59 | #define ACPI_FAILURE(a) (a) | 92 | #define ACPI_FAILURE(a) (a) |
60 | 93 | ||
@@ -64,60 +97,60 @@ | |||
64 | /* | 97 | /* |
65 | * Environmental exceptions | 98 | * Environmental exceptions |
66 | */ | 99 | */ |
67 | #define AE_ERROR (acpi_status) (0x0001 | AE_CODE_ENVIRONMENTAL) | 100 | #define AE_ERROR EXCEP_ENV (0x0001) |
68 | #define AE_NO_ACPI_TABLES (acpi_status) (0x0002 | AE_CODE_ENVIRONMENTAL) | 101 | #define AE_NO_ACPI_TABLES EXCEP_ENV (0x0002) |
69 | #define AE_NO_NAMESPACE (acpi_status) (0x0003 | AE_CODE_ENVIRONMENTAL) | 102 | #define AE_NO_NAMESPACE EXCEP_ENV (0x0003) |
70 | #define AE_NO_MEMORY (acpi_status) (0x0004 | AE_CODE_ENVIRONMENTAL) | 103 | #define AE_NO_MEMORY EXCEP_ENV (0x0004) |
71 | #define AE_NOT_FOUND (acpi_status) (0x0005 | AE_CODE_ENVIRONMENTAL) | 104 | #define AE_NOT_FOUND EXCEP_ENV (0x0005) |
72 | #define AE_NOT_EXIST (acpi_status) (0x0006 | AE_CODE_ENVIRONMENTAL) | 105 | #define AE_NOT_EXIST EXCEP_ENV (0x0006) |
73 | #define AE_ALREADY_EXISTS (acpi_status) (0x0007 | AE_CODE_ENVIRONMENTAL) | 106 | #define AE_ALREADY_EXISTS EXCEP_ENV (0x0007) |
74 | #define AE_TYPE (acpi_status) (0x0008 | AE_CODE_ENVIRONMENTAL) | 107 | #define AE_TYPE EXCEP_ENV (0x0008) |
75 | #define AE_NULL_OBJECT (acpi_status) (0x0009 | AE_CODE_ENVIRONMENTAL) | 108 | #define AE_NULL_OBJECT EXCEP_ENV (0x0009) |
76 | #define AE_NULL_ENTRY (acpi_status) (0x000A | AE_CODE_ENVIRONMENTAL) | 109 | #define AE_NULL_ENTRY EXCEP_ENV (0x000A) |
77 | #define AE_BUFFER_OVERFLOW (acpi_status) (0x000B | AE_CODE_ENVIRONMENTAL) | 110 | #define AE_BUFFER_OVERFLOW EXCEP_ENV (0x000B) |
78 | #define AE_STACK_OVERFLOW (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL) | 111 | #define AE_STACK_OVERFLOW EXCEP_ENV (0x000C) |
79 | #define AE_STACK_UNDERFLOW (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL) | 112 | #define AE_STACK_UNDERFLOW EXCEP_ENV (0x000D) |
80 | #define AE_NOT_IMPLEMENTED (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL) | 113 | #define AE_NOT_IMPLEMENTED EXCEP_ENV (0x000E) |
81 | #define AE_SUPPORT (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL) | 114 | #define AE_SUPPORT EXCEP_ENV (0x000F) |
82 | #define AE_LIMIT (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL) | 115 | #define AE_LIMIT EXCEP_ENV (0x0010) |
83 | #define AE_TIME (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL) | 116 | #define AE_TIME EXCEP_ENV (0x0011) |
84 | #define AE_ACQUIRE_DEADLOCK (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL) | 117 | #define AE_ACQUIRE_DEADLOCK EXCEP_ENV (0x0012) |
85 | #define AE_RELEASE_DEADLOCK (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL) | 118 | #define AE_RELEASE_DEADLOCK EXCEP_ENV (0x0013) |
86 | #define AE_NOT_ACQUIRED (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL) | 119 | #define AE_NOT_ACQUIRED EXCEP_ENV (0x0014) |
87 | #define AE_ALREADY_ACQUIRED (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL) | 120 | #define AE_ALREADY_ACQUIRED EXCEP_ENV (0x0015) |
88 | #define AE_NO_HARDWARE_RESPONSE (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL) | 121 | #define AE_NO_HARDWARE_RESPONSE EXCEP_ENV (0x0016) |
89 | #define AE_NO_GLOBAL_LOCK (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL) | 122 | #define AE_NO_GLOBAL_LOCK EXCEP_ENV (0x0017) |
90 | #define AE_ABORT_METHOD (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL) | 123 | #define AE_ABORT_METHOD EXCEP_ENV (0x0018) |
91 | #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) | 124 | #define AE_SAME_HANDLER EXCEP_ENV (0x0019) |
92 | #define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) | 125 | #define AE_NO_HANDLER EXCEP_ENV (0x001A) |
93 | #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) | 126 | #define AE_OWNER_ID_LIMIT EXCEP_ENV (0x001B) |
94 | #define AE_NOT_CONFIGURED (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL) | 127 | #define AE_NOT_CONFIGURED EXCEP_ENV (0x001C) |
95 | 128 | ||
96 | #define AE_CODE_ENV_MAX 0x001C | 129 | #define AE_CODE_ENV_MAX 0x001C |
97 | 130 | ||
98 | /* | 131 | /* |
99 | * Programmer exceptions | 132 | * Programmer exceptions |
100 | */ | 133 | */ |
101 | #define AE_BAD_PARAMETER (acpi_status) (0x0001 | AE_CODE_PROGRAMMER) | 134 | #define AE_BAD_PARAMETER EXCEP_PGM (0x0001) |
102 | #define AE_BAD_CHARACTER (acpi_status) (0x0002 | AE_CODE_PROGRAMMER) | 135 | #define AE_BAD_CHARACTER EXCEP_PGM (0x0002) |
103 | #define AE_BAD_PATHNAME (acpi_status) (0x0003 | AE_CODE_PROGRAMMER) | 136 | #define AE_BAD_PATHNAME EXCEP_PGM (0x0003) |
104 | #define AE_BAD_DATA (acpi_status) (0x0004 | AE_CODE_PROGRAMMER) | 137 | #define AE_BAD_DATA EXCEP_PGM (0x0004) |
105 | #define AE_BAD_HEX_CONSTANT (acpi_status) (0x0005 | AE_CODE_PROGRAMMER) | 138 | #define AE_BAD_HEX_CONSTANT EXCEP_PGM (0x0005) |
106 | #define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) | 139 | #define AE_BAD_OCTAL_CONSTANT EXCEP_PGM (0x0006) |
107 | #define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) | 140 | #define AE_BAD_DECIMAL_CONSTANT EXCEP_PGM (0x0007) |
108 | #define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) | 141 | #define AE_MISSING_ARGUMENTS EXCEP_PGM (0x0008) |
109 | #define AE_BAD_ADDRESS (acpi_status) (0x0009 | AE_CODE_PROGRAMMER) | 142 | #define AE_BAD_ADDRESS EXCEP_PGM (0x0009) |
110 | 143 | ||
111 | #define AE_CODE_PGM_MAX 0x0009 | 144 | #define AE_CODE_PGM_MAX 0x0009 |
112 | 145 | ||
113 | /* | 146 | /* |
114 | * Acpi table exceptions | 147 | * Acpi table exceptions |
115 | */ | 148 | */ |
116 | #define AE_BAD_SIGNATURE (acpi_status) (0x0001 | AE_CODE_ACPI_TABLES) | 149 | #define AE_BAD_SIGNATURE EXCEP_TBL (0x0001) |
117 | #define AE_BAD_HEADER (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES) | 150 | #define AE_BAD_HEADER EXCEP_TBL (0x0002) |
118 | #define AE_BAD_CHECKSUM (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES) | 151 | #define AE_BAD_CHECKSUM EXCEP_TBL (0x0003) |
119 | #define AE_BAD_VALUE (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES) | 152 | #define AE_BAD_VALUE EXCEP_TBL (0x0004) |
120 | #define AE_INVALID_TABLE_LENGTH (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES) | 153 | #define AE_INVALID_TABLE_LENGTH EXCEP_TBL (0x0005) |
121 | 154 | ||
122 | #define AE_CODE_TBL_MAX 0x0005 | 155 | #define AE_CODE_TBL_MAX 0x0005 |
123 | 156 | ||
@@ -125,58 +158,58 @@ | |||
125 | * AML exceptions. These are caused by problems with | 158 | * AML exceptions. These are caused by problems with |
126 | * the actual AML byte stream | 159 | * the actual AML byte stream |
127 | */ | 160 | */ |
128 | #define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML) | 161 | #define AE_AML_BAD_OPCODE EXCEP_AML (0x0001) |
129 | #define AE_AML_NO_OPERAND (acpi_status) (0x0002 | AE_CODE_AML) | 162 | #define AE_AML_NO_OPERAND EXCEP_AML (0x0002) |
130 | #define AE_AML_OPERAND_TYPE (acpi_status) (0x0003 | AE_CODE_AML) | 163 | #define AE_AML_OPERAND_TYPE EXCEP_AML (0x0003) |
131 | #define AE_AML_OPERAND_VALUE (acpi_status) (0x0004 | AE_CODE_AML) | 164 | #define AE_AML_OPERAND_VALUE EXCEP_AML (0x0004) |
132 | #define AE_AML_UNINITIALIZED_LOCAL (acpi_status) (0x0005 | AE_CODE_AML) | 165 | #define AE_AML_UNINITIALIZED_LOCAL EXCEP_AML (0x0005) |
133 | #define AE_AML_UNINITIALIZED_ARG (acpi_status) (0x0006 | AE_CODE_AML) | 166 | #define AE_AML_UNINITIALIZED_ARG EXCEP_AML (0x0006) |
134 | #define AE_AML_UNINITIALIZED_ELEMENT (acpi_status) (0x0007 | AE_CODE_AML) | 167 | #define AE_AML_UNINITIALIZED_ELEMENT EXCEP_AML (0x0007) |
135 | #define AE_AML_NUMERIC_OVERFLOW (acpi_status) (0x0008 | AE_CODE_AML) | 168 | #define AE_AML_NUMERIC_OVERFLOW EXCEP_AML (0x0008) |
136 | #define AE_AML_REGION_LIMIT (acpi_status) (0x0009 | AE_CODE_AML) | 169 | #define AE_AML_REGION_LIMIT EXCEP_AML (0x0009) |
137 | #define AE_AML_BUFFER_LIMIT (acpi_status) (0x000A | AE_CODE_AML) | 170 | #define AE_AML_BUFFER_LIMIT EXCEP_AML (0x000A) |
138 | #define AE_AML_PACKAGE_LIMIT (acpi_status) (0x000B | AE_CODE_AML) | 171 | #define AE_AML_PACKAGE_LIMIT EXCEP_AML (0x000B) |
139 | #define AE_AML_DIVIDE_BY_ZERO (acpi_status) (0x000C | AE_CODE_AML) | 172 | #define AE_AML_DIVIDE_BY_ZERO EXCEP_AML (0x000C) |
140 | #define AE_AML_BAD_NAME (acpi_status) (0x000D | AE_CODE_AML) | 173 | #define AE_AML_BAD_NAME EXCEP_AML (0x000D) |
141 | #define AE_AML_NAME_NOT_FOUND (acpi_status) (0x000E | AE_CODE_AML) | 174 | #define AE_AML_NAME_NOT_FOUND EXCEP_AML (0x000E) |
142 | #define AE_AML_INTERNAL (acpi_status) (0x000F | AE_CODE_AML) | 175 | #define AE_AML_INTERNAL EXCEP_AML (0x000F) |
143 | #define AE_AML_INVALID_SPACE_ID (acpi_status) (0x0010 | AE_CODE_AML) | 176 | #define AE_AML_INVALID_SPACE_ID EXCEP_AML (0x0010) |
144 | #define AE_AML_STRING_LIMIT (acpi_status) (0x0011 | AE_CODE_AML) | 177 | #define AE_AML_STRING_LIMIT EXCEP_AML (0x0011) |
145 | #define AE_AML_NO_RETURN_VALUE (acpi_status) (0x0012 | AE_CODE_AML) | 178 | #define AE_AML_NO_RETURN_VALUE EXCEP_AML (0x0012) |
146 | #define AE_AML_METHOD_LIMIT (acpi_status) (0x0013 | AE_CODE_AML) | 179 | #define AE_AML_METHOD_LIMIT EXCEP_AML (0x0013) |
147 | #define AE_AML_NOT_OWNER (acpi_status) (0x0014 | AE_CODE_AML) | 180 | #define AE_AML_NOT_OWNER EXCEP_AML (0x0014) |
148 | #define AE_AML_MUTEX_ORDER (acpi_status) (0x0015 | AE_CODE_AML) | 181 | #define AE_AML_MUTEX_ORDER EXCEP_AML (0x0015) |
149 | #define AE_AML_MUTEX_NOT_ACQUIRED (acpi_status) (0x0016 | AE_CODE_AML) | 182 | #define AE_AML_MUTEX_NOT_ACQUIRED EXCEP_AML (0x0016) |
150 | #define AE_AML_INVALID_RESOURCE_TYPE (acpi_status) (0x0017 | AE_CODE_AML) | 183 | #define AE_AML_INVALID_RESOURCE_TYPE EXCEP_AML (0x0017) |
151 | #define AE_AML_INVALID_INDEX (acpi_status) (0x0018 | AE_CODE_AML) | 184 | #define AE_AML_INVALID_INDEX EXCEP_AML (0x0018) |
152 | #define AE_AML_REGISTER_LIMIT (acpi_status) (0x0019 | AE_CODE_AML) | 185 | #define AE_AML_REGISTER_LIMIT EXCEP_AML (0x0019) |
153 | #define AE_AML_NO_WHILE (acpi_status) (0x001A | AE_CODE_AML) | 186 | #define AE_AML_NO_WHILE EXCEP_AML (0x001A) |
154 | #define AE_AML_ALIGNMENT (acpi_status) (0x001B | AE_CODE_AML) | 187 | #define AE_AML_ALIGNMENT EXCEP_AML (0x001B) |
155 | #define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001C | AE_CODE_AML) | 188 | #define AE_AML_NO_RESOURCE_END_TAG EXCEP_AML (0x001C) |
156 | #define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001D | AE_CODE_AML) | 189 | #define AE_AML_BAD_RESOURCE_VALUE EXCEP_AML (0x001D) |
157 | #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x001E | AE_CODE_AML) | 190 | #define AE_AML_CIRCULAR_REFERENCE EXCEP_AML (0x001E) |
158 | #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x001F | AE_CODE_AML) | 191 | #define AE_AML_BAD_RESOURCE_LENGTH EXCEP_AML (0x001F) |
159 | #define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0020 | AE_CODE_AML) | 192 | #define AE_AML_ILLEGAL_ADDRESS EXCEP_AML (0x0020) |
160 | #define AE_AML_INFINITE_LOOP (acpi_status) (0x0021 | AE_CODE_AML) | 193 | #define AE_AML_INFINITE_LOOP EXCEP_AML (0x0021) |
161 | 194 | ||
162 | #define AE_CODE_AML_MAX 0x0021 | 195 | #define AE_CODE_AML_MAX 0x0021 |
163 | 196 | ||
164 | /* | 197 | /* |
165 | * Internal exceptions used for control | 198 | * Internal exceptions used for control |
166 | */ | 199 | */ |
167 | #define AE_CTRL_RETURN_VALUE (acpi_status) (0x0001 | AE_CODE_CONTROL) | 200 | #define AE_CTRL_RETURN_VALUE EXCEP_CTL (0x0001) |
168 | #define AE_CTRL_PENDING (acpi_status) (0x0002 | AE_CODE_CONTROL) | 201 | #define AE_CTRL_PENDING EXCEP_CTL (0x0002) |
169 | #define AE_CTRL_TERMINATE (acpi_status) (0x0003 | AE_CODE_CONTROL) | 202 | #define AE_CTRL_TERMINATE EXCEP_CTL (0x0003) |
170 | #define AE_CTRL_TRUE (acpi_status) (0x0004 | AE_CODE_CONTROL) | 203 | #define AE_CTRL_TRUE EXCEP_CTL (0x0004) |
171 | #define AE_CTRL_FALSE (acpi_status) (0x0005 | AE_CODE_CONTROL) | 204 | #define AE_CTRL_FALSE EXCEP_CTL (0x0005) |
172 | #define AE_CTRL_DEPTH (acpi_status) (0x0006 | AE_CODE_CONTROL) | 205 | #define AE_CTRL_DEPTH EXCEP_CTL (0x0006) |
173 | #define AE_CTRL_END (acpi_status) (0x0007 | AE_CODE_CONTROL) | 206 | #define AE_CTRL_END EXCEP_CTL (0x0007) |
174 | #define AE_CTRL_TRANSFER (acpi_status) (0x0008 | AE_CODE_CONTROL) | 207 | #define AE_CTRL_TRANSFER EXCEP_CTL (0x0008) |
175 | #define AE_CTRL_BREAK (acpi_status) (0x0009 | AE_CODE_CONTROL) | 208 | #define AE_CTRL_BREAK EXCEP_CTL (0x0009) |
176 | #define AE_CTRL_CONTINUE (acpi_status) (0x000A | AE_CODE_CONTROL) | 209 | #define AE_CTRL_CONTINUE EXCEP_CTL (0x000A) |
177 | #define AE_CTRL_SKIP (acpi_status) (0x000B | AE_CODE_CONTROL) | 210 | #define AE_CTRL_SKIP EXCEP_CTL (0x000B) |
178 | #define AE_CTRL_PARSE_CONTINUE (acpi_status) (0x000C | AE_CODE_CONTROL) | 211 | #define AE_CTRL_PARSE_CONTINUE EXCEP_CTL (0x000C) |
179 | #define AE_CTRL_PARSE_PENDING (acpi_status) (0x000D | AE_CODE_CONTROL) | 212 | #define AE_CTRL_PARSE_PENDING EXCEP_CTL (0x000D) |
180 | 213 | ||
181 | #define AE_CODE_CTRL_MAX 0x000D | 214 | #define AE_CODE_CTRL_MAX 0x000D |
182 | 215 | ||
@@ -188,112 +221,156 @@ | |||
188 | * String versions of the exception codes above | 221 | * String versions of the exception codes above |
189 | * These strings must match the corresponding defines exactly | 222 | * These strings must match the corresponding defines exactly |
190 | */ | 223 | */ |
191 | char const *acpi_gbl_exception_names_env[] = { | 224 | static const struct acpi_exception_info acpi_gbl_exception_names_env[] = { |
192 | "AE_OK", | 225 | EXCEP_TXT("AE_OK", "No error"), |
193 | "AE_ERROR", | 226 | EXCEP_TXT("AE_ERROR", "Unspecified error"), |
194 | "AE_NO_ACPI_TABLES", | 227 | EXCEP_TXT("AE_NO_ACPI_TABLES", "ACPI tables could not be found"), |
195 | "AE_NO_NAMESPACE", | 228 | EXCEP_TXT("AE_NO_NAMESPACE", "A namespace has not been loaded"), |
196 | "AE_NO_MEMORY", | 229 | EXCEP_TXT("AE_NO_MEMORY", "Insufficient dynamic memory"), |
197 | "AE_NOT_FOUND", | 230 | EXCEP_TXT("AE_NOT_FOUND", "The name was not found in the namespace"), |
198 | "AE_NOT_EXIST", | 231 | EXCEP_TXT("AE_NOT_EXIST", "A required entity does not exist"), |
199 | "AE_ALREADY_EXISTS", | 232 | EXCEP_TXT("AE_ALREADY_EXISTS", "An entity already exists"), |
200 | "AE_TYPE", | 233 | EXCEP_TXT("AE_TYPE", "The object type is incorrect"), |
201 | "AE_NULL_OBJECT", | 234 | EXCEP_TXT("AE_NULL_OBJECT", "A required object was missing"), |
202 | "AE_NULL_ENTRY", | 235 | EXCEP_TXT("AE_NULL_ENTRY", "The requested object does not exist"), |
203 | "AE_BUFFER_OVERFLOW", | 236 | EXCEP_TXT("AE_BUFFER_OVERFLOW", "The buffer provided is too small"), |
204 | "AE_STACK_OVERFLOW", | 237 | EXCEP_TXT("AE_STACK_OVERFLOW", "An internal stack overflowed"), |
205 | "AE_STACK_UNDERFLOW", | 238 | EXCEP_TXT("AE_STACK_UNDERFLOW", "An internal stack underflowed"), |
206 | "AE_NOT_IMPLEMENTED", | 239 | EXCEP_TXT("AE_NOT_IMPLEMENTED", "The feature is not implemented"), |
207 | "AE_SUPPORT", | 240 | EXCEP_TXT("AE_SUPPORT", "The feature is not supported"), |
208 | "AE_LIMIT", | 241 | EXCEP_TXT("AE_LIMIT", "A predefined limit was exceeded"), |
209 | "AE_TIME", | 242 | EXCEP_TXT("AE_TIME", "A time limit or timeout expired"), |
210 | "AE_ACQUIRE_DEADLOCK", | 243 | EXCEP_TXT("AE_ACQUIRE_DEADLOCK", |
211 | "AE_RELEASE_DEADLOCK", | 244 | "Internal error, attempt was made to acquire a mutex in improper order"), |
212 | "AE_NOT_ACQUIRED", | 245 | EXCEP_TXT("AE_RELEASE_DEADLOCK", |
213 | "AE_ALREADY_ACQUIRED", | 246 | "Internal error, attempt was made to release a mutex in improper order"), |
214 | "AE_NO_HARDWARE_RESPONSE", | 247 | EXCEP_TXT("AE_NOT_ACQUIRED", |
215 | "AE_NO_GLOBAL_LOCK", | 248 | "An attempt to release a mutex or Global Lock without a previous acquire"), |
216 | "AE_ABORT_METHOD", | 249 | EXCEP_TXT("AE_ALREADY_ACQUIRED", |
217 | "AE_SAME_HANDLER", | 250 | "Internal error, attempt was made to acquire a mutex twice"), |
218 | "AE_NO_HANDLER", | 251 | EXCEP_TXT("AE_NO_HARDWARE_RESPONSE", |
219 | "AE_OWNER_ID_LIMIT", | 252 | "Hardware did not respond after an I/O operation"), |
220 | "AE_NOT_CONFIGURED" | 253 | EXCEP_TXT("AE_NO_GLOBAL_LOCK", "There is no FACS Global Lock"), |
254 | EXCEP_TXT("AE_ABORT_METHOD", "A control method was aborted"), | ||
255 | EXCEP_TXT("AE_SAME_HANDLER", | ||
256 | "Attempt was made to install the same handler that is already installed"), | ||
257 | EXCEP_TXT("AE_NO_HANDLER", | ||
258 | "A handler for the operation is not installed"), | ||
259 | EXCEP_TXT("AE_OWNER_ID_LIMIT", | ||
260 | "There are no more Owner IDs available for ACPI tables or control methods"), | ||
261 | EXCEP_TXT("AE_NOT_CONFIGURED", | ||
262 | "The interface is not part of the current subsystem configuration") | ||
221 | }; | 263 | }; |
222 | 264 | ||
223 | char const *acpi_gbl_exception_names_pgm[] = { | 265 | static const struct acpi_exception_info acpi_gbl_exception_names_pgm[] = { |
224 | NULL, | 266 | EXCEP_TXT(NULL, NULL), |
225 | "AE_BAD_PARAMETER", | 267 | EXCEP_TXT("AE_BAD_PARAMETER", "A parameter is out of range or invalid"), |
226 | "AE_BAD_CHARACTER", | 268 | EXCEP_TXT("AE_BAD_CHARACTER", |
227 | "AE_BAD_PATHNAME", | 269 | "An invalid character was found in a name"), |
228 | "AE_BAD_DATA", | 270 | EXCEP_TXT("AE_BAD_PATHNAME", |
229 | "AE_BAD_HEX_CONSTANT", | 271 | "An invalid character was found in a pathname"), |
230 | "AE_BAD_OCTAL_CONSTANT", | 272 | EXCEP_TXT("AE_BAD_DATA", |
231 | "AE_BAD_DECIMAL_CONSTANT", | 273 | "A package or buffer contained incorrect data"), |
232 | "AE_MISSING_ARGUMENTS", | 274 | EXCEP_TXT("AE_BAD_HEX_CONSTANT", "Invalid character in a Hex constant"), |
233 | "AE_BAD_ADDRESS" | 275 | EXCEP_TXT("AE_BAD_OCTAL_CONSTANT", |
276 | "Invalid character in an Octal constant"), | ||
277 | EXCEP_TXT("AE_BAD_DECIMAL_CONSTANT", | ||
278 | "Invalid character in a Decimal constant"), | ||
279 | EXCEP_TXT("AE_MISSING_ARGUMENTS", | ||
280 | "Too few arguments were passed to a control method"), | ||
281 | EXCEP_TXT("AE_BAD_ADDRESS", "An illegal null I/O address") | ||
234 | }; | 282 | }; |
235 | 283 | ||
236 | char const *acpi_gbl_exception_names_tbl[] = { | 284 | static const struct acpi_exception_info acpi_gbl_exception_names_tbl[] = { |
237 | NULL, | 285 | EXCEP_TXT(NULL, NULL), |
238 | "AE_BAD_SIGNATURE", | 286 | EXCEP_TXT("AE_BAD_SIGNATURE", "An ACPI table has an invalid signature"), |
239 | "AE_BAD_HEADER", | 287 | EXCEP_TXT("AE_BAD_HEADER", "Invalid field in an ACPI table header"), |
240 | "AE_BAD_CHECKSUM", | 288 | EXCEP_TXT("AE_BAD_CHECKSUM", "An ACPI table checksum is not correct"), |
241 | "AE_BAD_VALUE", | 289 | EXCEP_TXT("AE_BAD_VALUE", "An invalid value was found in a table"), |
242 | "AE_INVALID_TABLE_LENGTH" | 290 | EXCEP_TXT("AE_INVALID_TABLE_LENGTH", |
291 | "The FADT or FACS has improper length") | ||
243 | }; | 292 | }; |
244 | 293 | ||
245 | char const *acpi_gbl_exception_names_aml[] = { | 294 | static const struct acpi_exception_info acpi_gbl_exception_names_aml[] = { |
246 | NULL, | 295 | EXCEP_TXT(NULL, NULL), |
247 | "AE_AML_BAD_OPCODE", | 296 | EXCEP_TXT("AE_AML_BAD_OPCODE", "Invalid AML opcode encountered"), |
248 | "AE_AML_NO_OPERAND", | 297 | EXCEP_TXT("AE_AML_NO_OPERAND", "A required operand is missing"), |
249 | "AE_AML_OPERAND_TYPE", | 298 | EXCEP_TXT("AE_AML_OPERAND_TYPE", |
250 | "AE_AML_OPERAND_VALUE", | 299 | "An operand of an incorrect type was encountered"), |
251 | "AE_AML_UNINITIALIZED_LOCAL", | 300 | EXCEP_TXT("AE_AML_OPERAND_VALUE", |
252 | "AE_AML_UNINITIALIZED_ARG", | 301 | "The operand had an inappropriate or invalid value"), |
253 | "AE_AML_UNINITIALIZED_ELEMENT", | 302 | EXCEP_TXT("AE_AML_UNINITIALIZED_LOCAL", |
254 | "AE_AML_NUMERIC_OVERFLOW", | 303 | "Method tried to use an uninitialized local variable"), |
255 | "AE_AML_REGION_LIMIT", | 304 | EXCEP_TXT("AE_AML_UNINITIALIZED_ARG", |
256 | "AE_AML_BUFFER_LIMIT", | 305 | "Method tried to use an uninitialized argument"), |
257 | "AE_AML_PACKAGE_LIMIT", | 306 | EXCEP_TXT("AE_AML_UNINITIALIZED_ELEMENT", |
258 | "AE_AML_DIVIDE_BY_ZERO", | 307 | "Method tried to use an empty package element"), |
259 | "AE_AML_BAD_NAME", | 308 | EXCEP_TXT("AE_AML_NUMERIC_OVERFLOW", |
260 | "AE_AML_NAME_NOT_FOUND", | 309 | "Overflow during BCD conversion or other"), |
261 | "AE_AML_INTERNAL", | 310 | EXCEP_TXT("AE_AML_REGION_LIMIT", |
262 | "AE_AML_INVALID_SPACE_ID", | 311 | "Tried to access beyond the end of an Operation Region"), |
263 | "AE_AML_STRING_LIMIT", | 312 | EXCEP_TXT("AE_AML_BUFFER_LIMIT", |
264 | "AE_AML_NO_RETURN_VALUE", | 313 | "Tried to access beyond the end of a buffer"), |
265 | "AE_AML_METHOD_LIMIT", | 314 | EXCEP_TXT("AE_AML_PACKAGE_LIMIT", |
266 | "AE_AML_NOT_OWNER", | 315 | "Tried to access beyond the end of a package"), |
267 | "AE_AML_MUTEX_ORDER", | 316 | EXCEP_TXT("AE_AML_DIVIDE_BY_ZERO", |
268 | "AE_AML_MUTEX_NOT_ACQUIRED", | 317 | "During execution of AML Divide operator"), |
269 | "AE_AML_INVALID_RESOURCE_TYPE", | 318 | EXCEP_TXT("AE_AML_BAD_NAME", |
270 | "AE_AML_INVALID_INDEX", | 319 | "An ACPI name contains invalid character(s)"), |
271 | "AE_AML_REGISTER_LIMIT", | 320 | EXCEP_TXT("AE_AML_NAME_NOT_FOUND", |
272 | "AE_AML_NO_WHILE", | 321 | "Could not resolve a named reference"), |
273 | "AE_AML_ALIGNMENT", | 322 | EXCEP_TXT("AE_AML_INTERNAL", "An internal error within the interprete"), |
274 | "AE_AML_NO_RESOURCE_END_TAG", | 323 | EXCEP_TXT("AE_AML_INVALID_SPACE_ID", |
275 | "AE_AML_BAD_RESOURCE_VALUE", | 324 | "An Operation Region SpaceID is invalid"), |
276 | "AE_AML_CIRCULAR_REFERENCE", | 325 | EXCEP_TXT("AE_AML_STRING_LIMIT", |
277 | "AE_AML_BAD_RESOURCE_LENGTH", | 326 | "String is longer than 200 characters"), |
278 | "AE_AML_ILLEGAL_ADDRESS", | 327 | EXCEP_TXT("AE_AML_NO_RETURN_VALUE", |
279 | "AE_AML_INFINITE_LOOP" | 328 | "A method did not return a required value"), |
329 | EXCEP_TXT("AE_AML_METHOD_LIMIT", | ||
330 | "A control method reached the maximum reentrancy limit of 255"), | ||
331 | EXCEP_TXT("AE_AML_NOT_OWNER", | ||
332 | "A thread tried to release a mutex that it does not own"), | ||
333 | EXCEP_TXT("AE_AML_MUTEX_ORDER", "Mutex SyncLevel release mismatch"), | ||
334 | EXCEP_TXT("AE_AML_MUTEX_NOT_ACQUIRED", | ||
335 | "Attempt to release a mutex that was not previously acquired"), | ||
336 | EXCEP_TXT("AE_AML_INVALID_RESOURCE_TYPE", | ||
337 | "Invalid resource type in resource list"), | ||
338 | EXCEP_TXT("AE_AML_INVALID_INDEX", | ||
339 | "Invalid Argx or Localx (x too large)"), | ||
340 | EXCEP_TXT("AE_AML_REGISTER_LIMIT", | ||
341 | "Bank value or Index value beyond range of register"), | ||
342 | EXCEP_TXT("AE_AML_NO_WHILE", "Break or Continue without a While"), | ||
343 | EXCEP_TXT("AE_AML_ALIGNMENT", | ||
344 | "Non-aligned memory transfer on platform that does not support this"), | ||
345 | EXCEP_TXT("AE_AML_NO_RESOURCE_END_TAG", | ||
346 | "No End Tag in a resource list"), | ||
347 | EXCEP_TXT("AE_AML_BAD_RESOURCE_VALUE", | ||
348 | "Invalid value of a resource element"), | ||
349 | EXCEP_TXT("AE_AML_CIRCULAR_REFERENCE", | ||
350 | "Two references refer to each other"), | ||
351 | EXCEP_TXT("AE_AML_BAD_RESOURCE_LENGTH", | ||
352 | "The length of a Resource Descriptor in the AML is incorrect"), | ||
353 | EXCEP_TXT("AE_AML_ILLEGAL_ADDRESS", | ||
354 | "A memory, I/O, or PCI configuration address is invalid"), | ||
355 | EXCEP_TXT("AE_AML_INFINITE_LOOP", | ||
356 | "An apparent infinite AML While loop, method was aborted") | ||
280 | }; | 357 | }; |
281 | 358 | ||
282 | char const *acpi_gbl_exception_names_ctrl[] = { | 359 | static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = { |
283 | NULL, | 360 | EXCEP_TXT(NULL, NULL), |
284 | "AE_CTRL_RETURN_VALUE", | 361 | EXCEP_TXT("AE_CTRL_RETURN_VALUE", "A Method returned a value"), |
285 | "AE_CTRL_PENDING", | 362 | EXCEP_TXT("AE_CTRL_PENDING", "Method is calling another method"), |
286 | "AE_CTRL_TERMINATE", | 363 | EXCEP_TXT("AE_CTRL_TERMINATE", "Terminate the executing method"), |
287 | "AE_CTRL_TRUE", | 364 | EXCEP_TXT("AE_CTRL_TRUE", "An If or While predicate result"), |
288 | "AE_CTRL_FALSE", | 365 | EXCEP_TXT("AE_CTRL_FALSE", "An If or While predicate result"), |
289 | "AE_CTRL_DEPTH", | 366 | EXCEP_TXT("AE_CTRL_DEPTH", "Maximum search depth has been reached"), |
290 | "AE_CTRL_END", | 367 | EXCEP_TXT("AE_CTRL_END", "An If or While predicate is false"), |
291 | "AE_CTRL_TRANSFER", | 368 | EXCEP_TXT("AE_CTRL_TRANSFER", "Transfer control to called method"), |
292 | "AE_CTRL_BREAK", | 369 | EXCEP_TXT("AE_CTRL_BREAK", "A Break has been executed"), |
293 | "AE_CTRL_CONTINUE", | 370 | EXCEP_TXT("AE_CTRL_CONTINUE", "A Continue has been executed"), |
294 | "AE_CTRL_SKIP", | 371 | EXCEP_TXT("AE_CTRL_SKIP", "Not currently used"), |
295 | "AE_CTRL_PARSE_CONTINUE", | 372 | EXCEP_TXT("AE_CTRL_PARSE_CONTINUE", "Used to skip over bad opcodes"), |
296 | "AE_CTRL_PARSE_PENDING" | 373 | EXCEP_TXT("AE_CTRL_PARSE_PENDING", "Used to implement AML While loops") |
297 | }; | 374 | }; |
298 | 375 | ||
299 | #endif /* EXCEPTION_TABLE */ | 376 | #endif /* EXCEPTION_TABLE */ |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 9885276178e0..4f52ea795c7a 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -324,9 +324,9 @@ | |||
324 | 324 | ||
325 | /* Helper macro */ | 325 | /* Helper macro */ |
326 | 326 | ||
327 | #define ACPI_TRACE_ENTRY(name, function, cast, param) \ | 327 | #define ACPI_TRACE_ENTRY(name, function, type, param) \ |
328 | ACPI_FUNCTION_NAME (name) \ | 328 | ACPI_FUNCTION_NAME (name) \ |
329 | function (ACPI_DEBUG_PARAMETERS, cast (param)) | 329 | function (ACPI_DEBUG_PARAMETERS, (type) (param)) |
330 | 330 | ||
331 | /* The actual entry trace macros */ | 331 | /* The actual entry trace macros */ |
332 | 332 | ||
@@ -335,13 +335,13 @@ | |||
335 | acpi_ut_trace (ACPI_DEBUG_PARAMETERS) | 335 | acpi_ut_trace (ACPI_DEBUG_PARAMETERS) |
336 | 336 | ||
337 | #define ACPI_FUNCTION_TRACE_PTR(name, pointer) \ | 337 | #define ACPI_FUNCTION_TRACE_PTR(name, pointer) \ |
338 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_ptr, (void *), pointer) | 338 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_ptr, void *, pointer) |
339 | 339 | ||
340 | #define ACPI_FUNCTION_TRACE_U32(name, value) \ | 340 | #define ACPI_FUNCTION_TRACE_U32(name, value) \ |
341 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, (u32), value) | 341 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, u32, value) |
342 | 342 | ||
343 | #define ACPI_FUNCTION_TRACE_STR(name, string) \ | 343 | #define ACPI_FUNCTION_TRACE_STR(name, string) \ |
344 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, (char *), string) | 344 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, char *, string) |
345 | 345 | ||
346 | #define ACPI_FUNCTION_ENTRY() \ | 346 | #define ACPI_FUNCTION_ENTRY() \ |
347 | acpi_ut_track_stack_ptr() | 347 | acpi_ut_track_stack_ptr() |
@@ -355,16 +355,37 @@ | |||
355 | * | 355 | * |
356 | * One of the FUNCTION_TRACE macros above must be used in conjunction | 356 | * One of the FUNCTION_TRACE macros above must be used in conjunction |
357 | * with these macros so that "_AcpiFunctionName" is defined. | 357 | * with these macros so that "_AcpiFunctionName" is defined. |
358 | * | ||
359 | * There are two versions of most of the return macros. The default version is | ||
360 | * safer, since it avoids side-effects by guaranteeing that the argument will | ||
361 | * not be evaluated twice. | ||
362 | * | ||
363 | * A less-safe version of the macros is provided for optional use if the | ||
364 | * compiler uses excessive CPU stack (for example, this may happen in the | ||
365 | * debug case if code optimzation is disabled.) | ||
358 | */ | 366 | */ |
359 | 367 | ||
360 | /* Exit trace helper macro */ | 368 | /* Exit trace helper macro */ |
361 | 369 | ||
362 | #define ACPI_TRACE_EXIT(function, cast, param) \ | 370 | #ifndef ACPI_SIMPLE_RETURN_MACROS |
371 | |||
372 | #define ACPI_TRACE_EXIT(function, type, param) \ | ||
373 | ACPI_DO_WHILE0 ({ \ | ||
374 | register type _param = (type) (param); \ | ||
375 | function (ACPI_DEBUG_PARAMETERS, _param); \ | ||
376 | return (_param); \ | ||
377 | }) | ||
378 | |||
379 | #else /* Use original less-safe macros */ | ||
380 | |||
381 | #define ACPI_TRACE_EXIT(function, type, param) \ | ||
363 | ACPI_DO_WHILE0 ({ \ | 382 | ACPI_DO_WHILE0 ({ \ |
364 | function (ACPI_DEBUG_PARAMETERS, cast (param)); \ | 383 | function (ACPI_DEBUG_PARAMETERS, (type) (param)); \ |
365 | return ((param)); \ | 384 | return (param); \ |
366 | }) | 385 | }) |
367 | 386 | ||
387 | #endif /* ACPI_SIMPLE_RETURN_MACROS */ | ||
388 | |||
368 | /* The actual exit macros */ | 389 | /* The actual exit macros */ |
369 | 390 | ||
370 | #define return_VOID \ | 391 | #define return_VOID \ |
@@ -374,13 +395,19 @@ | |||
374 | }) | 395 | }) |
375 | 396 | ||
376 | #define return_ACPI_STATUS(status) \ | 397 | #define return_ACPI_STATUS(status) \ |
377 | ACPI_TRACE_EXIT (acpi_ut_status_exit, (acpi_status), status) | 398 | ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status) |
378 | 399 | ||
379 | #define return_PTR(pointer) \ | 400 | #define return_PTR(pointer) \ |
380 | ACPI_TRACE_EXIT (acpi_ut_ptr_exit, (u8 *), pointer) | 401 | ACPI_TRACE_EXIT (acpi_ut_ptr_exit, void *, pointer) |
381 | 402 | ||
382 | #define return_VALUE(value) \ | 403 | #define return_VALUE(value) \ |
383 | ACPI_TRACE_EXIT (acpi_ut_value_exit, (u64), value) | 404 | ACPI_TRACE_EXIT (acpi_ut_value_exit, u64, value) |
405 | |||
406 | #define return_UINT32(value) \ | ||
407 | ACPI_TRACE_EXIT (acpi_ut_value_exit, u32, value) | ||
408 | |||
409 | #define return_UINT8(value) \ | ||
410 | ACPI_TRACE_EXIT (acpi_ut_value_exit, u8, value) | ||
384 | 411 | ||
385 | /* Conditional execution */ | 412 | /* Conditional execution */ |
386 | 413 | ||
@@ -428,8 +455,10 @@ | |||
428 | 455 | ||
429 | #define return_VOID return | 456 | #define return_VOID return |
430 | #define return_ACPI_STATUS(s) return(s) | 457 | #define return_ACPI_STATUS(s) return(s) |
431 | #define return_VALUE(s) return(s) | ||
432 | #define return_PTR(s) return(s) | 458 | #define return_PTR(s) return(s) |
459 | #define return_VALUE(s) return(s) | ||
460 | #define return_UINT8(s) return(s) | ||
461 | #define return_UINT32(s) return(s) | ||
433 | 462 | ||
434 | #endif /* ACPI_DEBUG_OUTPUT */ | 463 | #endif /* ACPI_DEBUG_OUTPUT */ |
435 | 464 | ||
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 22ba56e834e2..98db31d9f9b4 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -88,11 +88,30 @@ struct acpi_device; | |||
88 | * ----------------- | 88 | * ----------------- |
89 | */ | 89 | */ |
90 | 90 | ||
91 | enum acpi_hotplug_mode { | ||
92 | AHM_GENERIC = 0, | ||
93 | AHM_CONTAINER, | ||
94 | AHM_COUNT | ||
95 | }; | ||
96 | |||
97 | struct acpi_hotplug_profile { | ||
98 | struct kobject kobj; | ||
99 | bool enabled:1; | ||
100 | enum acpi_hotplug_mode mode; | ||
101 | }; | ||
102 | |||
103 | static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile( | ||
104 | struct kobject *kobj) | ||
105 | { | ||
106 | return container_of(kobj, struct acpi_hotplug_profile, kobj); | ||
107 | } | ||
108 | |||
91 | struct acpi_scan_handler { | 109 | struct acpi_scan_handler { |
92 | const struct acpi_device_id *ids; | 110 | const struct acpi_device_id *ids; |
93 | struct list_head list_node; | 111 | struct list_head list_node; |
94 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); | 112 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); |
95 | void (*detach)(struct acpi_device *dev); | 113 | void (*detach)(struct acpi_device *dev); |
114 | struct acpi_hotplug_profile hotplug; | ||
96 | }; | 115 | }; |
97 | 116 | ||
98 | /* | 117 | /* |
@@ -142,7 +161,6 @@ struct acpi_device_status { | |||
142 | 161 | ||
143 | struct acpi_device_flags { | 162 | struct acpi_device_flags { |
144 | u32 dynamic_status:1; | 163 | u32 dynamic_status:1; |
145 | u32 bus_address:1; | ||
146 | u32 removable:1; | 164 | u32 removable:1; |
147 | u32 ejectable:1; | 165 | u32 ejectable:1; |
148 | u32 suprise_removal_ok:1; | 166 | u32 suprise_removal_ok:1; |
@@ -150,7 +168,7 @@ struct acpi_device_flags { | |||
150 | u32 performance_manageable:1; | 168 | u32 performance_manageable:1; |
151 | u32 eject_pending:1; | 169 | u32 eject_pending:1; |
152 | u32 match_driver:1; | 170 | u32 match_driver:1; |
153 | u32 reserved:23; | 171 | u32 reserved:24; |
154 | }; | 172 | }; |
155 | 173 | ||
156 | /* File System */ | 174 | /* File System */ |
@@ -173,10 +191,17 @@ struct acpi_hardware_id { | |||
173 | char *id; | 191 | char *id; |
174 | }; | 192 | }; |
175 | 193 | ||
194 | struct acpi_pnp_type { | ||
195 | u32 hardware_id:1; | ||
196 | u32 bus_address:1; | ||
197 | u32 reserved:30; | ||
198 | }; | ||
199 | |||
176 | struct acpi_device_pnp { | 200 | struct acpi_device_pnp { |
177 | acpi_bus_id bus_id; /* Object name */ | 201 | acpi_bus_id bus_id; /* Object name */ |
202 | struct acpi_pnp_type type; /* ID type */ | ||
178 | acpi_bus_address bus_address; /* _ADR */ | 203 | acpi_bus_address bus_address; /* _ADR */ |
179 | char *unique_id; /* _UID */ | 204 | char *unique_id; /* _UID */ |
180 | struct list_head ids; /* _HID and _CIDs */ | 205 | struct list_head ids; /* _HID and _CIDs */ |
181 | acpi_device_name device_name; /* Driver-determined */ | 206 | acpi_device_name device_name; /* Driver-determined */ |
182 | acpi_device_class device_class; /* " */ | 207 | acpi_device_class device_class; /* " */ |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 627749af0ba7..e6168a24b9f0 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -95,7 +95,6 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
95 | struct pci_bus; | 95 | struct pci_bus; |
96 | 96 | ||
97 | struct pci_dev *acpi_get_pci_dev(acpi_handle); | 97 | struct pci_dev *acpi_get_pci_dev(acpi_handle); |
98 | int acpi_pci_bind_root(struct acpi_device *device); | ||
99 | 98 | ||
100 | /* Arch-defined function to add a bus to the system */ | 99 | /* Arch-defined function to add a bus to the system */ |
101 | 100 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 03322dddd88e..454881e6450a 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
48 | 48 | ||
49 | #define ACPI_CA_VERSION 0x20130117 | 49 | #define ACPI_CA_VERSION 0x20130328 |
50 | 50 | ||
51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 77dc7a4099a3..ffaac0e7e0c6 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -72,11 +72,13 @@ | |||
72 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ | 72 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ |
73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ | 73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
74 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ | 74 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ |
75 | #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ | ||
75 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ | 76 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ |
76 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ | 77 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ |
77 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ | 78 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ |
78 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ | 79 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ |
79 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ | 80 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ |
81 | #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ | ||
80 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ | 82 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ |
81 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ | 83 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ |
82 | #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ | 84 | #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ |
@@ -852,6 +854,29 @@ struct acpi_table_mchi { | |||
852 | 854 | ||
853 | /******************************************************************************* | 855 | /******************************************************************************* |
854 | * | 856 | * |
857 | * MTMR - MID Timer Table | ||
858 | * Version 1 | ||
859 | * | ||
860 | * Conforms to "Simple Firmware Interface Specification", | ||
861 | * Draft 0.8.2, Oct 19, 2010 | ||
862 | * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table. | ||
863 | * | ||
864 | ******************************************************************************/ | ||
865 | |||
866 | struct acpi_table_mtmr { | ||
867 | struct acpi_table_header header; /* Common ACPI table header */ | ||
868 | }; | ||
869 | |||
870 | /* MTMR entry */ | ||
871 | |||
872 | struct acpi_mtmr_entry { | ||
873 | struct acpi_generic_address physical_address; | ||
874 | u32 frequency; | ||
875 | u32 irq; | ||
876 | }; | ||
877 | |||
878 | /******************************************************************************* | ||
879 | * | ||
855 | * SLIC - Software Licensing Description Table | 880 | * SLIC - Software Licensing Description Table |
856 | * Version 1 | 881 | * Version 1 |
857 | * | 882 | * |
@@ -1025,6 +1050,28 @@ struct acpi_table_uefi { | |||
1025 | 1050 | ||
1026 | /******************************************************************************* | 1051 | /******************************************************************************* |
1027 | * | 1052 | * |
1053 | * VRTC - Virtual Real Time Clock Table | ||
1054 | * Version 1 | ||
1055 | * | ||
1056 | * Conforms to "Simple Firmware Interface Specification", | ||
1057 | * Draft 0.8.2, Oct 19, 2010 | ||
1058 | * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. | ||
1059 | * | ||
1060 | ******************************************************************************/ | ||
1061 | |||
1062 | struct acpi_table_vrtc { | ||
1063 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1064 | }; | ||
1065 | |||
1066 | /* VRTC entry */ | ||
1067 | |||
1068 | struct acpi_vrtc_entry { | ||
1069 | struct acpi_generic_address physical_address; | ||
1070 | u32 irq; | ||
1071 | }; | ||
1072 | |||
1073 | /******************************************************************************* | ||
1074 | * | ||
1028 | * WAET - Windows ACPI Emulated devices Table | 1075 | * WAET - Windows ACPI Emulated devices Table |
1029 | * Version 1 | 1076 | * Version 1 |
1030 | * | 1077 | * |
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 332b17e3bec8..e2c0931a3d67 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h | |||
@@ -174,7 +174,7 @@ struct acpi_fpdt_header { | |||
174 | 174 | ||
175 | enum acpi_fpdt_type { | 175 | enum acpi_fpdt_type { |
176 | ACPI_FPDT_TYPE_BOOT = 0, | 176 | ACPI_FPDT_TYPE_BOOT = 0, |
177 | ACPI_FPDT_TYPE_S3PERF = 1, | 177 | ACPI_FPDT_TYPE_S3PERF = 1 |
178 | }; | 178 | }; |
179 | 179 | ||
180 | /* | 180 | /* |
@@ -223,7 +223,7 @@ struct acpi_s3pt_header { | |||
223 | 223 | ||
224 | enum acpi_s3pt_type { | 224 | enum acpi_s3pt_type { |
225 | ACPI_S3PT_TYPE_RESUME = 0, | 225 | ACPI_S3PT_TYPE_RESUME = 0, |
226 | ACPI_S3PT_TYPE_SUSPEND = 1, | 226 | ACPI_S3PT_TYPE_SUSPEND = 1 |
227 | }; | 227 | }; |
228 | 228 | ||
229 | struct acpi_s3pt_resume { | 229 | struct acpi_s3pt_resume { |
@@ -505,26 +505,59 @@ struct acpi_rasf_shared_memory { | |||
505 | u32 signature; | 505 | u32 signature; |
506 | u16 command; | 506 | u16 command; |
507 | u16 status; | 507 | u16 status; |
508 | u64 requested_address; | 508 | u16 version; |
509 | u64 requested_length; | 509 | u8 capabilities[16]; |
510 | u64 actual_address; | 510 | u8 set_capabilities[16]; |
511 | u64 actual_length; | 511 | u16 num_parameter_blocks; |
512 | u32 set_capabilities_status; | ||
513 | }; | ||
514 | |||
515 | /* RASF Parameter Block Structure Header */ | ||
516 | |||
517 | struct acpi_rasf_parameter_block { | ||
518 | u16 type; | ||
519 | u16 version; | ||
520 | u16 length; | ||
521 | }; | ||
522 | |||
523 | /* RASF Parameter Block Structure for PATROL_SCRUB */ | ||
524 | |||
525 | struct acpi_rasf_patrol_scrub_parameter { | ||
526 | struct acpi_rasf_parameter_block header; | ||
527 | u16 patrol_scrub_command; | ||
528 | u64 requested_address_range[2]; | ||
529 | u64 actual_address_range[2]; | ||
512 | u16 flags; | 530 | u16 flags; |
513 | u8 speed; | 531 | u8 requested_speed; |
514 | }; | 532 | }; |
515 | 533 | ||
516 | /* Masks for Flags and Speed fields above */ | 534 | /* Masks for Flags and Speed fields above */ |
517 | 535 | ||
518 | #define ACPI_RASF_SCRUBBER_RUNNING 1 | 536 | #define ACPI_RASF_SCRUBBER_RUNNING 1 |
519 | #define ACPI_RASF_SPEED (7<<1) | 537 | #define ACPI_RASF_SPEED (7<<1) |
538 | #define ACPI_RASF_SPEED_SLOW (0<<1) | ||
539 | #define ACPI_RASF_SPEED_MEDIUM (4<<1) | ||
540 | #define ACPI_RASF_SPEED_FAST (7<<1) | ||
520 | 541 | ||
521 | /* Channel Commands */ | 542 | /* Channel Commands */ |
522 | 543 | ||
523 | enum acpi_rasf_commands { | 544 | enum acpi_rasf_commands { |
524 | ACPI_RASF_GET_RAS_CAPABILITIES = 1, | 545 | ACPI_RASF_EXECUTE_RASF_COMMAND = 1 |
525 | ACPI_RASF_GET_PATROL_PARAMETERS = 2, | 546 | }; |
526 | ACPI_RASF_START_PATROL_SCRUBBER = 3, | 547 | |
527 | ACPI_RASF_STOP_PATROL_SCRUBBER = 4 | 548 | /* Platform RAS Capabilities */ |
549 | |||
550 | enum acpi_rasf_capabiliities { | ||
551 | ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, | ||
552 | ACPI_SW_PATROL_SCRUB_EXPOSED = 1 | ||
553 | }; | ||
554 | |||
555 | /* Patrol Scrub Commands */ | ||
556 | |||
557 | enum acpi_rasf_patrol_scrub_commands { | ||
558 | ACPI_RASF_GET_PATROL_PARAMETERS = 1, | ||
559 | ACPI_RASF_START_PATROL_SCRUBBER = 2, | ||
560 | ACPI_RASF_STOP_PATROL_SCRUBBER = 3 | ||
528 | }; | 561 | }; |
529 | 562 | ||
530 | /* Channel Command flags */ | 563 | /* Channel Command flags */ |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 845e75f1ffd8..a64adcc29ae5 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -650,13 +650,14 @@ typedef u32 acpi_event_type; | |||
650 | * The encoding of acpi_event_status is illustrated below. | 650 | * The encoding of acpi_event_status is illustrated below. |
651 | * Note that a set bit (1) indicates the property is TRUE | 651 | * Note that a set bit (1) indicates the property is TRUE |
652 | * (e.g. if bit 0 is set then the event is enabled). | 652 | * (e.g. if bit 0 is set then the event is enabled). |
653 | * +-------------+-+-+-+ | 653 | * +-------------+-+-+-+-+ |
654 | * | Bits 31:3 |2|1|0| | 654 | * | Bits 31:4 |3|2|1|0| |
655 | * +-------------+-+-+-+ | 655 | * +-------------+-+-+-+-+ |
656 | * | | | | | 656 | * | | | | | |
657 | * | | | +- Enabled? | 657 | * | | | | +- Enabled? |
658 | * | | +--- Enabled for wake? | 658 | * | | | +--- Enabled for wake? |
659 | * | +----- Set? | 659 | * | | +----- Set? |
660 | * | +------- Has a handler? | ||
660 | * +----------- <Reserved> | 661 | * +----------- <Reserved> |
661 | */ | 662 | */ |
662 | typedef u32 acpi_event_status; | 663 | typedef u32 acpi_event_status; |
@@ -1128,7 +1129,6 @@ struct acpi_memory_list { | |||
1128 | u16 object_size; | 1129 | u16 object_size; |
1129 | u16 max_depth; | 1130 | u16 max_depth; |
1130 | u16 current_depth; | 1131 | u16 current_depth; |
1131 | u16 link_offset; | ||
1132 | 1132 | ||
1133 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | 1133 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
1134 | 1134 | ||
diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h new file mode 100644 index 000000000000..d06079c774a0 --- /dev/null +++ b/include/asm-generic/hugetlb.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _ASM_GENERIC_HUGETLB_H | ||
2 | #define _ASM_GENERIC_HUGETLB_H | ||
3 | |||
4 | static inline pte_t mk_huge_pte(struct page *page, pgprot_t pgprot) | ||
5 | { | ||
6 | return mk_pte(page, pgprot); | ||
7 | } | ||
8 | |||
9 | static inline int huge_pte_write(pte_t pte) | ||
10 | { | ||
11 | return pte_write(pte); | ||
12 | } | ||
13 | |||
14 | static inline int huge_pte_dirty(pte_t pte) | ||
15 | { | ||
16 | return pte_dirty(pte); | ||
17 | } | ||
18 | |||
19 | static inline pte_t huge_pte_mkwrite(pte_t pte) | ||
20 | { | ||
21 | return pte_mkwrite(pte); | ||
22 | } | ||
23 | |||
24 | static inline pte_t huge_pte_mkdirty(pte_t pte) | ||
25 | { | ||
26 | return pte_mkdirty(pte); | ||
27 | } | ||
28 | |||
29 | static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot) | ||
30 | { | ||
31 | return pte_modify(pte, newprot); | ||
32 | } | ||
33 | |||
34 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, | ||
35 | pte_t *ptep) | ||
36 | { | ||
37 | pte_clear(mm, addr, ptep); | ||
38 | } | ||
39 | |||
40 | #endif /* _ASM_GENERIC_HUGETLB_H */ | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index bfd87685fc1f..a59ff51b0166 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -7,6 +7,16 @@ | |||
7 | #include <linux/mm_types.h> | 7 | #include <linux/mm_types.h> |
8 | #include <linux/bug.h> | 8 | #include <linux/bug.h> |
9 | 9 | ||
10 | /* | ||
11 | * On almost all architectures and configurations, 0 can be used as the | ||
12 | * upper ceiling to free_pgtables(): on many architectures it has the same | ||
13 | * effect as using TASK_SIZE. However, there is one configuration which | ||
14 | * must impose a more careful limit, to avoid freeing kernel pgtables. | ||
15 | */ | ||
16 | #ifndef USER_PGTABLES_CEILING | ||
17 | #define USER_PGTABLES_CEILING 0UL | ||
18 | #endif | ||
19 | |||
10 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 20 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
11 | extern int ptep_set_access_flags(struct vm_area_struct *vma, | 21 | extern int ptep_set_access_flags(struct vm_area_struct *vma, |
12 | unsigned long address, pte_t *ptep, | 22 | unsigned long address, pte_t *ptep, |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 25f01d0bc149..b1b1fa6ffffe 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -99,7 +99,12 @@ struct mmu_gather { | |||
99 | unsigned int need_flush : 1, /* Did free PTEs */ | 99 | unsigned int need_flush : 1, /* Did free PTEs */ |
100 | fast_mode : 1; /* No batching */ | 100 | fast_mode : 1; /* No batching */ |
101 | 101 | ||
102 | unsigned int fullmm; | 102 | /* we are in the middle of an operation to clear |
103 | * a full mm and can make some optimizations */ | ||
104 | unsigned int fullmm : 1, | ||
105 | /* we have performed an operation which | ||
106 | * requires a complete flush of the tlb */ | ||
107 | need_flush_all : 1; | ||
103 | 108 | ||
104 | struct mmu_gather_batch *active; | 109 | struct mmu_gather_batch *active; |
105 | struct mmu_gather_batch local; | 110 | struct mmu_gather_batch local; |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 4077b5d9ff81..0501fa3f783d 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
@@ -9,20 +9,3 @@ | |||
9 | #define __ARCH_WANT_STAT64 | 9 | #define __ARCH_WANT_STAT64 |
10 | #define __ARCH_WANT_SYS_LLSEEK | 10 | #define __ARCH_WANT_SYS_LLSEEK |
11 | #endif | 11 | #endif |
12 | |||
13 | /* | ||
14 | * "Conditional" syscalls | ||
15 | * | ||
16 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
17 | * but it doesn't work on all toolchains, so we just do it by hand | ||
18 | */ | ||
19 | #ifndef cond_syscall | ||
20 | #ifdef CONFIG_SYMBOL_PREFIX | ||
21 | #define __SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX | ||
22 | #else | ||
23 | #define __SYMBOL_PREFIX | ||
24 | #endif | ||
25 | #define cond_syscall(x) asm(".weak\t" __SYMBOL_PREFIX #x "\n\t" \ | ||
26 | ".set\t" __SYMBOL_PREFIX #x "," \ | ||
27 | __SYMBOL_PREFIX "sys_ni_syscall") | ||
28 | #endif | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index bcbdd7484e58..17b5b5967641 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -152,15 +152,6 @@ void acpi_penalize_isa_irq(int irq, int active); | |||
152 | 152 | ||
153 | void acpi_pci_irq_disable (struct pci_dev *dev); | 153 | void acpi_pci_irq_disable (struct pci_dev *dev); |
154 | 154 | ||
155 | struct acpi_pci_driver { | ||
156 | struct list_head node; | ||
157 | int (*add)(struct acpi_pci_root *root); | ||
158 | void (*remove)(struct acpi_pci_root *root); | ||
159 | }; | ||
160 | |||
161 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | ||
162 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); | ||
163 | |||
164 | extern int ec_read(u8 addr, u8 *val); | 155 | extern int ec_read(u8 addr, u8 *val); |
165 | extern int ec_write(u8 addr, u8 val); | 156 | extern int ec_write(u8 addr, u8 val); |
166 | extern int ec_transaction(u8 command, | 157 | extern int ec_transaction(u8 command, |
@@ -204,7 +195,7 @@ extern bool wmi_has_guid(const char *guid); | |||
204 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) | 195 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) |
205 | 196 | ||
206 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); | 197 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); |
207 | extern long acpi_is_video_device(struct acpi_device *device); | 198 | extern long acpi_is_video_device(acpi_handle handle); |
208 | extern void acpi_video_dmi_promote_vendor(void); | 199 | extern void acpi_video_dmi_promote_vendor(void); |
209 | extern void acpi_video_dmi_demote_vendor(void); | 200 | extern void acpi_video_dmi_demote_vendor(void); |
210 | extern int acpi_video_backlight_support(void); | 201 | extern int acpi_video_backlight_support(void); |
@@ -217,7 +208,7 @@ static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle) | |||
217 | return 0; | 208 | return 0; |
218 | } | 209 | } |
219 | 210 | ||
220 | static inline long acpi_is_video_device(struct acpi_device *device) | 211 | static inline long acpi_is_video_device(acpi_handle handle) |
221 | { | 212 | { |
222 | return 0; | 213 | return 0; |
223 | } | 214 | } |
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index f612c783170f..62d9303c2837 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
@@ -203,6 +203,9 @@ struct amba_pl011_data { | |||
203 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | 203 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); |
204 | void *dma_rx_param; | 204 | void *dma_rx_param; |
205 | void *dma_tx_param; | 205 | void *dma_tx_param; |
206 | bool dma_rx_poll_enable; | ||
207 | unsigned int dma_rx_poll_rate; | ||
208 | unsigned int dma_rx_poll_timeout; | ||
206 | void (*init) (void); | 209 | void (*init) (void); |
207 | void (*exit) (void); | 210 | void (*exit) (void); |
208 | }; | 211 | }; |
diff --git a/include/linux/async.h b/include/linux/async.h index a2e3f18b2ad6..6b0226bdaadc 100644 --- a/include/linux/async.h +++ b/include/linux/async.h | |||
@@ -16,9 +16,8 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | 17 | ||
18 | typedef u64 async_cookie_t; | 18 | typedef u64 async_cookie_t; |
19 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); | 19 | typedef void (*async_func_t) (void *data, async_cookie_t cookie); |
20 | struct async_domain { | 20 | struct async_domain { |
21 | struct list_head node; | ||
22 | struct list_head pending; | 21 | struct list_head pending; |
23 | unsigned registered:1; | 22 | unsigned registered:1; |
24 | }; | 23 | }; |
@@ -27,8 +26,7 @@ struct async_domain { | |||
27 | * domain participates in global async_synchronize_full | 26 | * domain participates in global async_synchronize_full |
28 | */ | 27 | */ |
29 | #define ASYNC_DOMAIN(_name) \ | 28 | #define ASYNC_DOMAIN(_name) \ |
30 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | 29 | struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending), \ |
31 | .pending = LIST_HEAD_INIT(_name.pending), \ | ||
32 | .registered = 1 } | 30 | .registered = 1 } |
33 | 31 | ||
34 | /* | 32 | /* |
@@ -36,12 +34,11 @@ struct async_domain { | |||
36 | * complete, this domain does not participate in async_synchronize_full | 34 | * complete, this domain does not participate in async_synchronize_full |
37 | */ | 35 | */ |
38 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ | 36 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ |
39 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | 37 | struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending), \ |
40 | .pending = LIST_HEAD_INIT(_name.pending), \ | ||
41 | .registered = 0 } | 38 | .registered = 0 } |
42 | 39 | ||
43 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); | 40 | extern async_cookie_t async_schedule(async_func_t func, void *data); |
44 | extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data, | 41 | extern async_cookie_t async_schedule_domain(async_func_t func, void *data, |
45 | struct async_domain *domain); | 42 | struct async_domain *domain); |
46 | void async_unregister_domain(struct async_domain *domain); | 43 | void async_unregister_domain(struct async_domain *domain); |
47 | extern void async_synchronize_full(void); | 44 | extern void async_synchronize_full(void); |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 8f7a3d68371a..ee0bd9524055 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -954,7 +954,7 @@ static inline int atapi_cdb_len(const u16 *dev_id) | |||
954 | } | 954 | } |
955 | } | 955 | } |
956 | 956 | ||
957 | static inline bool atapi_command_packet_set(const u16 *dev_id) | 957 | static inline int atapi_command_packet_set(const u16 *dev_id) |
958 | { | 958 | { |
959 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; | 959 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; |
960 | } | 960 | } |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index cdf11191e645..22990cf4439d 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
@@ -111,12 +111,13 @@ struct bio { | |||
111 | #define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */ | 111 | #define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */ |
112 | #define BIO_QUIET 10 /* Make BIO Quiet */ | 112 | #define BIO_QUIET 10 /* Make BIO Quiet */ |
113 | #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */ | 113 | #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */ |
114 | #define BIO_SNAP_STABLE 12 /* bio data must be snapshotted during write */ | ||
114 | 115 | ||
115 | /* | 116 | /* |
116 | * Flags starting here get preserved by bio_reset() - this includes | 117 | * Flags starting here get preserved by bio_reset() - this includes |
117 | * BIO_POOL_IDX() | 118 | * BIO_POOL_IDX() |
118 | */ | 119 | */ |
119 | #define BIO_RESET_BITS 12 | 120 | #define BIO_RESET_BITS 13 |
120 | 121 | ||
121 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) | 122 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) |
122 | 123 | ||
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 0ea61e07a91c..7c2e030e72f1 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | struct blk_trace { | 13 | struct blk_trace { |
14 | int trace_state; | 14 | int trace_state; |
15 | bool rq_based; | ||
16 | struct rchan *rchan; | 15 | struct rchan *rchan; |
17 | unsigned long __percpu *sequence; | 16 | unsigned long __percpu *sequence; |
18 | unsigned char __percpu *msg_data; | 17 | unsigned char __percpu *msg_data; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index cdc3bab01832..5f0b0e1f7c08 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -44,7 +44,6 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
44 | unsigned long endpfn); | 44 | unsigned long endpfn); |
45 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 45 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
46 | 46 | ||
47 | extern unsigned long free_low_memory_core_early(int nodeid); | ||
48 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | 47 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); |
49 | extern unsigned long free_all_bootmem(void); | 48 | extern unsigned long free_all_bootmem(void); |
50 | 49 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5afc4f94d110..9e52b0626b39 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -34,6 +34,8 @@ enum bh_state_bits { | |||
34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
35 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | 35 | BH_Unwritten, /* Buffer is allocated on disk but not written */ |
36 | BH_Quiet, /* Buffer Error Prinks to be quiet */ | 36 | BH_Quiet, /* Buffer Error Prinks to be quiet */ |
37 | BH_Meta, /* Buffer contains metadata */ | ||
38 | BH_Prio, /* Buffer should be submitted with REQ_PRIO */ | ||
37 | 39 | ||
38 | BH_PrivateStart,/* not a state bit, but the first bit available | 40 | BH_PrivateStart,/* not a state bit, but the first bit available |
39 | * for private allocation by other entities | 41 | * for private allocation by other entities |
@@ -124,6 +126,8 @@ BUFFER_FNS(Delay, delay) | |||
124 | BUFFER_FNS(Boundary, boundary) | 126 | BUFFER_FNS(Boundary, boundary) |
125 | BUFFER_FNS(Write_EIO, write_io_error) | 127 | BUFFER_FNS(Write_EIO, write_io_error) |
126 | BUFFER_FNS(Unwritten, unwritten) | 128 | BUFFER_FNS(Unwritten, unwritten) |
129 | BUFFER_FNS(Meta, meta) | ||
130 | BUFFER_FNS(Prio, prio) | ||
127 | 131 | ||
128 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) | 132 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) |
129 | 133 | ||
@@ -181,6 +185,7 @@ void ll_rw_block(int, int, struct buffer_head * bh[]); | |||
181 | int sync_dirty_buffer(struct buffer_head *bh); | 185 | int sync_dirty_buffer(struct buffer_head *bh); |
182 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); | 186 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); |
183 | void write_dirty_buffer(struct buffer_head *bh, int rw); | 187 | void write_dirty_buffer(struct buffer_head *bh, int rw); |
188 | int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags); | ||
184 | int submit_bh(int, struct buffer_head *); | 189 | int submit_bh(int, struct buffer_head *); |
185 | void write_boundary_block(struct block_device *bdev, | 190 | void write_boundary_block(struct block_device *bdev, |
186 | sector_t bblock, unsigned blocksize); | 191 | sector_t bblock, unsigned blocksize); |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 98503b792369..d9a4f7f40f32 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -35,6 +35,7 @@ struct cpu_vfs_cap_data { | |||
35 | #define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) | 35 | #define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) |
36 | 36 | ||
37 | 37 | ||
38 | struct file; | ||
38 | struct inode; | 39 | struct inode; |
39 | struct dentry; | 40 | struct dentry; |
40 | struct user_namespace; | 41 | struct user_namespace; |
@@ -211,6 +212,7 @@ extern bool capable(int cap); | |||
211 | extern bool ns_capable(struct user_namespace *ns, int cap); | 212 | extern bool ns_capable(struct user_namespace *ns, int cap); |
212 | extern bool nsown_capable(int cap); | 213 | extern bool nsown_capable(int cap); |
213 | extern bool inode_capable(const struct inode *inode, int cap); | 214 | extern bool inode_capable(const struct inode *inode, int cap); |
215 | extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); | ||
214 | 216 | ||
215 | /* audit system wants to get cap info from files as well */ | 217 | /* audit system wants to get cap info from files as well */ |
216 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); | 218 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 900af5964f55..646ab9d15e42 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/idr.h> | 19 | #include <linux/idr.h> |
20 | #include <linux/workqueue.h> | 20 | #include <linux/workqueue.h> |
21 | #include <linux/xattr.h> | 21 | #include <linux/xattr.h> |
22 | #include <linux/fs.h> | ||
22 | 23 | ||
23 | #ifdef CONFIG_CGROUPS | 24 | #ifdef CONFIG_CGROUPS |
24 | 25 | ||
@@ -30,10 +31,6 @@ struct css_id; | |||
30 | 31 | ||
31 | extern int cgroup_init_early(void); | 32 | extern int cgroup_init_early(void); |
32 | extern int cgroup_init(void); | 33 | extern int cgroup_init(void); |
33 | extern void cgroup_lock(void); | ||
34 | extern int cgroup_lock_is_held(void); | ||
35 | extern bool cgroup_lock_live_group(struct cgroup *cgrp); | ||
36 | extern void cgroup_unlock(void); | ||
37 | extern void cgroup_fork(struct task_struct *p); | 34 | extern void cgroup_fork(struct task_struct *p); |
38 | extern void cgroup_post_fork(struct task_struct *p); | 35 | extern void cgroup_post_fork(struct task_struct *p); |
39 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 36 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); |
@@ -44,14 +41,25 @@ extern void cgroup_unload_subsys(struct cgroup_subsys *ss); | |||
44 | 41 | ||
45 | extern const struct file_operations proc_cgroup_operations; | 42 | extern const struct file_operations proc_cgroup_operations; |
46 | 43 | ||
47 | /* Define the enumeration of all builtin cgroup subsystems */ | 44 | /* |
45 | * Define the enumeration of all cgroup subsystems. | ||
46 | * | ||
47 | * We define ids for builtin subsystems and then modular ones. | ||
48 | */ | ||
48 | #define SUBSYS(_x) _x ## _subsys_id, | 49 | #define SUBSYS(_x) _x ## _subsys_id, |
49 | #define IS_SUBSYS_ENABLED(option) IS_ENABLED(option) | ||
50 | enum cgroup_subsys_id { | 50 | enum cgroup_subsys_id { |
51 | #define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option) | ||
51 | #include <linux/cgroup_subsys.h> | 52 | #include <linux/cgroup_subsys.h> |
53 | #undef IS_SUBSYS_ENABLED | ||
54 | CGROUP_BUILTIN_SUBSYS_COUNT, | ||
55 | |||
56 | __CGROUP_SUBSYS_TEMP_PLACEHOLDER = CGROUP_BUILTIN_SUBSYS_COUNT - 1, | ||
57 | |||
58 | #define IS_SUBSYS_ENABLED(option) IS_MODULE(option) | ||
59 | #include <linux/cgroup_subsys.h> | ||
60 | #undef IS_SUBSYS_ENABLED | ||
52 | CGROUP_SUBSYS_COUNT, | 61 | CGROUP_SUBSYS_COUNT, |
53 | }; | 62 | }; |
54 | #undef IS_SUBSYS_ENABLED | ||
55 | #undef SUBSYS | 63 | #undef SUBSYS |
56 | 64 | ||
57 | /* Per-subsystem/per-cgroup state maintained by the system. */ | 65 | /* Per-subsystem/per-cgroup state maintained by the system. */ |
@@ -148,6 +156,13 @@ enum { | |||
148 | * specified at mount time and thus is implemented here. | 156 | * specified at mount time and thus is implemented here. |
149 | */ | 157 | */ |
150 | CGRP_CPUSET_CLONE_CHILDREN, | 158 | CGRP_CPUSET_CLONE_CHILDREN, |
159 | /* see the comment above CGRP_ROOT_SANE_BEHAVIOR for details */ | ||
160 | CGRP_SANE_BEHAVIOR, | ||
161 | }; | ||
162 | |||
163 | struct cgroup_name { | ||
164 | struct rcu_head rcu_head; | ||
165 | char name[]; | ||
151 | }; | 166 | }; |
152 | 167 | ||
153 | struct cgroup { | 168 | struct cgroup { |
@@ -172,11 +187,23 @@ struct cgroup { | |||
172 | struct cgroup *parent; /* my parent */ | 187 | struct cgroup *parent; /* my parent */ |
173 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ | 188 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ |
174 | 189 | ||
190 | /* | ||
191 | * This is a copy of dentry->d_name, and it's needed because | ||
192 | * we can't use dentry->d_name in cgroup_path(). | ||
193 | * | ||
194 | * You must acquire rcu_read_lock() to access cgrp->name, and | ||
195 | * the only place that can change it is rename(), which is | ||
196 | * protected by parent dir's i_mutex. | ||
197 | * | ||
198 | * Normally you should use cgroup_name() wrapper rather than | ||
199 | * access it directly. | ||
200 | */ | ||
201 | struct cgroup_name __rcu *name; | ||
202 | |||
175 | /* Private pointers for each registered subsystem */ | 203 | /* Private pointers for each registered subsystem */ |
176 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 204 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
177 | 205 | ||
178 | struct cgroupfs_root *root; | 206 | struct cgroupfs_root *root; |
179 | struct cgroup *top_cgroup; | ||
180 | 207 | ||
181 | /* | 208 | /* |
182 | * List of cg_cgroup_links pointing at css_sets with | 209 | * List of cg_cgroup_links pointing at css_sets with |
@@ -213,6 +240,96 @@ struct cgroup { | |||
213 | struct simple_xattrs xattrs; | 240 | struct simple_xattrs xattrs; |
214 | }; | 241 | }; |
215 | 242 | ||
243 | #define MAX_CGROUP_ROOT_NAMELEN 64 | ||
244 | |||
245 | /* cgroupfs_root->flags */ | ||
246 | enum { | ||
247 | /* | ||
248 | * Unfortunately, cgroup core and various controllers are riddled | ||
249 | * with idiosyncrasies and pointless options. The following flag, | ||
250 | * when set, will force sane behavior - some options are forced on, | ||
251 | * others are disallowed, and some controllers will change their | ||
252 | * hierarchical or other behaviors. | ||
253 | * | ||
254 | * The set of behaviors affected by this flag are still being | ||
255 | * determined and developed and the mount option for this flag is | ||
256 | * prefixed with __DEVEL__. The prefix will be dropped once we | ||
257 | * reach the point where all behaviors are compatible with the | ||
258 | * planned unified hierarchy, which will automatically turn on this | ||
259 | * flag. | ||
260 | * | ||
261 | * The followings are the behaviors currently affected this flag. | ||
262 | * | ||
263 | * - Mount options "noprefix" and "clone_children" are disallowed. | ||
264 | * Also, cgroupfs file cgroup.clone_children is not created. | ||
265 | * | ||
266 | * - When mounting an existing superblock, mount options should | ||
267 | * match. | ||
268 | * | ||
269 | * - Remount is disallowed. | ||
270 | * | ||
271 | * - memcg: use_hierarchy is on by default and the cgroup file for | ||
272 | * the flag is not created. | ||
273 | * | ||
274 | * The followings are planned changes. | ||
275 | * | ||
276 | * - release_agent will be disallowed once replacement notification | ||
277 | * mechanism is implemented. | ||
278 | */ | ||
279 | CGRP_ROOT_SANE_BEHAVIOR = (1 << 0), | ||
280 | |||
281 | CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */ | ||
282 | CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */ | ||
283 | }; | ||
284 | |||
285 | /* | ||
286 | * A cgroupfs_root represents the root of a cgroup hierarchy, and may be | ||
287 | * associated with a superblock to form an active hierarchy. This is | ||
288 | * internal to cgroup core. Don't access directly from controllers. | ||
289 | */ | ||
290 | struct cgroupfs_root { | ||
291 | struct super_block *sb; | ||
292 | |||
293 | /* | ||
294 | * The bitmask of subsystems intended to be attached to this | ||
295 | * hierarchy | ||
296 | */ | ||
297 | unsigned long subsys_mask; | ||
298 | |||
299 | /* Unique id for this hierarchy. */ | ||
300 | int hierarchy_id; | ||
301 | |||
302 | /* The bitmask of subsystems currently attached to this hierarchy */ | ||
303 | unsigned long actual_subsys_mask; | ||
304 | |||
305 | /* A list running through the attached subsystems */ | ||
306 | struct list_head subsys_list; | ||
307 | |||
308 | /* The root cgroup for this hierarchy */ | ||
309 | struct cgroup top_cgroup; | ||
310 | |||
311 | /* Tracks how many cgroups are currently defined in hierarchy.*/ | ||
312 | int number_of_cgroups; | ||
313 | |||
314 | /* A list running through the active hierarchies */ | ||
315 | struct list_head root_list; | ||
316 | |||
317 | /* All cgroups on this root, cgroup_mutex protected */ | ||
318 | struct list_head allcg_list; | ||
319 | |||
320 | /* Hierarchy-specific flags */ | ||
321 | unsigned long flags; | ||
322 | |||
323 | /* IDs for cgroups in this hierarchy */ | ||
324 | struct ida cgroup_ida; | ||
325 | |||
326 | /* The path to use for release notifications. */ | ||
327 | char release_agent_path[PATH_MAX]; | ||
328 | |||
329 | /* The name for this hierarchy - may be empty */ | ||
330 | char name[MAX_CGROUP_ROOT_NAMELEN]; | ||
331 | }; | ||
332 | |||
216 | /* | 333 | /* |
217 | * A css_set is a structure holding pointers to a set of | 334 | * A css_set is a structure holding pointers to a set of |
218 | * cgroup_subsys_state objects. This saves space in the task struct | 335 | * cgroup_subsys_state objects. This saves space in the task struct |
@@ -278,6 +395,7 @@ struct cgroup_map_cb { | |||
278 | /* cftype->flags */ | 395 | /* cftype->flags */ |
279 | #define CFTYPE_ONLY_ON_ROOT (1U << 0) /* only create on root cg */ | 396 | #define CFTYPE_ONLY_ON_ROOT (1U << 0) /* only create on root cg */ |
280 | #define CFTYPE_NOT_ON_ROOT (1U << 1) /* don't create on root cg */ | 397 | #define CFTYPE_NOT_ON_ROOT (1U << 1) /* don't create on root cg */ |
398 | #define CFTYPE_INSANE (1U << 2) /* don't create if sane_behavior */ | ||
281 | 399 | ||
282 | #define MAX_CFTYPE_NAME 64 | 400 | #define MAX_CFTYPE_NAME 64 |
283 | 401 | ||
@@ -304,9 +422,6 @@ struct cftype { | |||
304 | /* CFTYPE_* flags */ | 422 | /* CFTYPE_* flags */ |
305 | unsigned int flags; | 423 | unsigned int flags; |
306 | 424 | ||
307 | /* file xattrs */ | ||
308 | struct simple_xattrs xattrs; | ||
309 | |||
310 | int (*open)(struct inode *inode, struct file *file); | 425 | int (*open)(struct inode *inode, struct file *file); |
311 | ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft, | 426 | ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft, |
312 | struct file *file, | 427 | struct file *file, |
@@ -404,18 +519,31 @@ struct cgroup_scanner { | |||
404 | void *data; | 519 | void *data; |
405 | }; | 520 | }; |
406 | 521 | ||
522 | /* | ||
523 | * See the comment above CGRP_ROOT_SANE_BEHAVIOR for details. This | ||
524 | * function can be called as long as @cgrp is accessible. | ||
525 | */ | ||
526 | static inline bool cgroup_sane_behavior(const struct cgroup *cgrp) | ||
527 | { | ||
528 | return cgrp->root->flags & CGRP_ROOT_SANE_BEHAVIOR; | ||
529 | } | ||
530 | |||
531 | /* Caller should hold rcu_read_lock() */ | ||
532 | static inline const char *cgroup_name(const struct cgroup *cgrp) | ||
533 | { | ||
534 | return rcu_dereference(cgrp->name)->name; | ||
535 | } | ||
536 | |||
407 | int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); | 537 | int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); |
408 | int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); | 538 | int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); |
409 | 539 | ||
410 | int cgroup_is_removed(const struct cgroup *cgrp); | 540 | int cgroup_is_removed(const struct cgroup *cgrp); |
541 | bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor); | ||
411 | 542 | ||
412 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); | 543 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); |
413 | 544 | ||
414 | int cgroup_task_count(const struct cgroup *cgrp); | 545 | int cgroup_task_count(const struct cgroup *cgrp); |
415 | 546 | ||
416 | /* Return true if cgrp is a descendant of the task's cgroup */ | ||
417 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); | ||
418 | |||
419 | /* | 547 | /* |
420 | * Control Group taskset, used to pass around set of tasks to cgroup_subsys | 548 | * Control Group taskset, used to pass around set of tasks to cgroup_subsys |
421 | * methods. | 549 | * methods. |
@@ -458,7 +586,6 @@ struct cgroup_subsys { | |||
458 | void (*bind)(struct cgroup *root); | 586 | void (*bind)(struct cgroup *root); |
459 | 587 | ||
460 | int subsys_id; | 588 | int subsys_id; |
461 | int active; | ||
462 | int disabled; | 589 | int disabled; |
463 | int early_init; | 590 | int early_init; |
464 | /* | 591 | /* |
@@ -523,10 +650,16 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state( | |||
523 | * rcu_dereference_check() conditions, such as locks used during the | 650 | * rcu_dereference_check() conditions, such as locks used during the |
524 | * cgroup_subsys::attach() methods. | 651 | * cgroup_subsys::attach() methods. |
525 | */ | 652 | */ |
653 | #ifdef CONFIG_PROVE_RCU | ||
654 | extern struct mutex cgroup_mutex; | ||
526 | #define task_subsys_state_check(task, subsys_id, __c) \ | 655 | #define task_subsys_state_check(task, subsys_id, __c) \ |
527 | rcu_dereference_check(task->cgroups->subsys[subsys_id], \ | 656 | rcu_dereference_check((task)->cgroups->subsys[(subsys_id)], \ |
528 | lockdep_is_held(&task->alloc_lock) || \ | 657 | lockdep_is_held(&(task)->alloc_lock) || \ |
529 | cgroup_lock_is_held() || (__c)) | 658 | lockdep_is_held(&cgroup_mutex) || (__c)) |
659 | #else | ||
660 | #define task_subsys_state_check(task, subsys_id, __c) \ | ||
661 | rcu_dereference((task)->cgroups->subsys[(subsys_id)]) | ||
662 | #endif | ||
530 | 663 | ||
531 | static inline struct cgroup_subsys_state * | 664 | static inline struct cgroup_subsys_state * |
532 | task_subsys_state(struct task_struct *task, int subsys_id) | 665 | task_subsys_state(struct task_struct *task, int subsys_id) |
@@ -661,8 +794,8 @@ struct task_struct *cgroup_iter_next(struct cgroup *cgrp, | |||
661 | struct cgroup_iter *it); | 794 | struct cgroup_iter *it); |
662 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); | 795 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); |
663 | int cgroup_scan_tasks(struct cgroup_scanner *scan); | 796 | int cgroup_scan_tasks(struct cgroup_scanner *scan); |
664 | int cgroup_attach_task(struct cgroup *, struct task_struct *); | ||
665 | int cgroup_attach_task_all(struct task_struct *from, struct task_struct *); | 797 | int cgroup_attach_task_all(struct task_struct *from, struct task_struct *); |
798 | int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from); | ||
666 | 799 | ||
667 | /* | 800 | /* |
668 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works | 801 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works |
@@ -687,13 +820,6 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css); | |||
687 | 820 | ||
688 | struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id); | 821 | struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id); |
689 | 822 | ||
690 | /* | ||
691 | * Get a cgroup whose id is greater than or equal to id under tree of root. | ||
692 | * Returning a cgroup_subsys_state or NULL. | ||
693 | */ | ||
694 | struct cgroup_subsys_state *css_get_next(struct cgroup_subsys *ss, int id, | ||
695 | struct cgroup_subsys_state *root, int *foundid); | ||
696 | |||
697 | /* Returns true if root is ancestor of cg */ | 823 | /* Returns true if root is ancestor of cg */ |
698 | bool css_is_ancestor(struct cgroup_subsys_state *cg, | 824 | bool css_is_ancestor(struct cgroup_subsys_state *cg, |
699 | const struct cgroup_subsys_state *root); | 825 | const struct cgroup_subsys_state *root); |
diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h index 42e55deee757..4ce9056b31a8 100644 --- a/include/linux/cleancache.h +++ b/include/linux/cleancache.h | |||
@@ -33,7 +33,7 @@ struct cleancache_ops { | |||
33 | void (*invalidate_fs)(int); | 33 | void (*invalidate_fs)(int); |
34 | }; | 34 | }; |
35 | 35 | ||
36 | extern struct cleancache_ops | 36 | extern struct cleancache_ops * |
37 | cleancache_register_ops(struct cleancache_ops *ops); | 37 | cleancache_register_ops(struct cleancache_ops *ops); |
38 | extern void __cleancache_init_fs(struct super_block *); | 38 | extern void __cleancache_init_fs(struct super_block *); |
39 | extern void __cleancache_init_shared_fs(char *, struct super_block *); | 39 | extern void __cleancache_init_shared_fs(char *, struct super_block *); |
@@ -42,9 +42,9 @@ extern void __cleancache_put_page(struct page *); | |||
42 | extern void __cleancache_invalidate_page(struct address_space *, struct page *); | 42 | extern void __cleancache_invalidate_page(struct address_space *, struct page *); |
43 | extern void __cleancache_invalidate_inode(struct address_space *); | 43 | extern void __cleancache_invalidate_inode(struct address_space *); |
44 | extern void __cleancache_invalidate_fs(struct super_block *); | 44 | extern void __cleancache_invalidate_fs(struct super_block *); |
45 | extern int cleancache_enabled; | ||
46 | 45 | ||
47 | #ifdef CONFIG_CLEANCACHE | 46 | #ifdef CONFIG_CLEANCACHE |
47 | #define cleancache_enabled (1) | ||
48 | static inline bool cleancache_fs_enabled(struct page *page) | 48 | static inline bool cleancache_fs_enabled(struct page *page) |
49 | { | 49 | { |
50 | return page->mapping->host->i_sb->cleancache_poolid >= 0; | 50 | return page->mapping->host->i_sb->cleancache_poolid >= 0; |
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h index 9c7f5807824b..dd7adff76e81 100644 --- a/include/linux/clk-private.h +++ b/include/linux/clk-private.h | |||
@@ -152,7 +152,7 @@ struct clk { | |||
152 | }, \ | 152 | }, \ |
153 | .reg = _reg, \ | 153 | .reg = _reg, \ |
154 | .shift = _shift, \ | 154 | .shift = _shift, \ |
155 | .width = _width, \ | 155 | .mask = BIT(_width) - 1, \ |
156 | .flags = _mux_flags, \ | 156 | .flags = _mux_flags, \ |
157 | .lock = _lock, \ | 157 | .lock = _lock, \ |
158 | }; \ | 158 | }; \ |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 7f197d7addb0..11860985fecb 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -45,6 +45,14 @@ struct clk_hw; | |||
45 | * undo any work done in the @prepare callback. Called with | 45 | * undo any work done in the @prepare callback. Called with |
46 | * prepare_lock held. | 46 | * prepare_lock held. |
47 | * | 47 | * |
48 | * @is_prepared: Queries the hardware to determine if the clock is prepared. | ||
49 | * This function is allowed to sleep. Optional, if this op is not | ||
50 | * set then the prepare count will be used. | ||
51 | * | ||
52 | * @unprepare_unused: Unprepare the clock atomically. Only called from | ||
53 | * clk_disable_unused for prepare clocks with special needs. | ||
54 | * Called with prepare mutex held. This function may sleep. | ||
55 | * | ||
48 | * @enable: Enable the clock atomically. This must not return until the | 56 | * @enable: Enable the clock atomically. This must not return until the |
49 | * clock is generating a valid clock signal, usable by consumer | 57 | * clock is generating a valid clock signal, usable by consumer |
50 | * devices. Called with enable_lock held. This function must not | 58 | * devices. Called with enable_lock held. This function must not |
@@ -108,6 +116,8 @@ struct clk_hw; | |||
108 | struct clk_ops { | 116 | struct clk_ops { |
109 | int (*prepare)(struct clk_hw *hw); | 117 | int (*prepare)(struct clk_hw *hw); |
110 | void (*unprepare)(struct clk_hw *hw); | 118 | void (*unprepare)(struct clk_hw *hw); |
119 | int (*is_prepared)(struct clk_hw *hw); | ||
120 | void (*unprepare_unused)(struct clk_hw *hw); | ||
111 | int (*enable)(struct clk_hw *hw); | 121 | int (*enable)(struct clk_hw *hw); |
112 | void (*disable)(struct clk_hw *hw); | 122 | void (*disable)(struct clk_hw *hw); |
113 | int (*is_enabled)(struct clk_hw *hw); | 123 | int (*is_enabled)(struct clk_hw *hw); |
@@ -239,9 +249,14 @@ struct clk_div_table { | |||
239 | * CLK_DIVIDER_ONE_BASED - by default the divisor is the value read from the | 249 | * CLK_DIVIDER_ONE_BASED - by default the divisor is the value read from the |
240 | * register plus one. If CLK_DIVIDER_ONE_BASED is set then the divider is | 250 | * register plus one. If CLK_DIVIDER_ONE_BASED is set then the divider is |
241 | * the raw value read from the register, with the value of zero considered | 251 | * the raw value read from the register, with the value of zero considered |
242 | * invalid | 252 | * invalid, unless CLK_DIVIDER_ALLOW_ZERO is set. |
243 | * CLK_DIVIDER_POWER_OF_TWO - clock divisor is 2 raised to the value read from | 253 | * CLK_DIVIDER_POWER_OF_TWO - clock divisor is 2 raised to the value read from |
244 | * the hardware register | 254 | * the hardware register |
255 | * CLK_DIVIDER_ALLOW_ZERO - Allow zero divisors. For dividers which have | ||
256 | * CLK_DIVIDER_ONE_BASED set, it is possible to end up with a zero divisor. | ||
257 | * Some hardware implementations gracefully handle this case and allow a | ||
258 | * zero divisor by not modifying their input clock | ||
259 | * (divide by one / bypass). | ||
245 | */ | 260 | */ |
246 | struct clk_divider { | 261 | struct clk_divider { |
247 | struct clk_hw hw; | 262 | struct clk_hw hw; |
@@ -255,6 +270,7 @@ struct clk_divider { | |||
255 | 270 | ||
256 | #define CLK_DIVIDER_ONE_BASED BIT(0) | 271 | #define CLK_DIVIDER_ONE_BASED BIT(0) |
257 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) | 272 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) |
273 | #define CLK_DIVIDER_ALLOW_ZERO BIT(2) | ||
258 | 274 | ||
259 | extern const struct clk_ops clk_divider_ops; | 275 | extern const struct clk_ops clk_divider_ops; |
260 | struct clk *clk_register_divider(struct device *dev, const char *name, | 276 | struct clk *clk_register_divider(struct device *dev, const char *name, |
@@ -274,7 +290,7 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, | |||
274 | * @reg: register controlling multiplexer | 290 | * @reg: register controlling multiplexer |
275 | * @shift: shift to multiplexer bit field | 291 | * @shift: shift to multiplexer bit field |
276 | * @width: width of mutliplexer bit field | 292 | * @width: width of mutliplexer bit field |
277 | * @num_clks: number of parent clocks | 293 | * @flags: hardware-specific flags |
278 | * @lock: register lock | 294 | * @lock: register lock |
279 | * | 295 | * |
280 | * Clock with multiple selectable parents. Implements .get_parent, .set_parent | 296 | * Clock with multiple selectable parents. Implements .get_parent, .set_parent |
@@ -287,8 +303,9 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, | |||
287 | struct clk_mux { | 303 | struct clk_mux { |
288 | struct clk_hw hw; | 304 | struct clk_hw hw; |
289 | void __iomem *reg; | 305 | void __iomem *reg; |
306 | u32 *table; | ||
307 | u32 mask; | ||
290 | u8 shift; | 308 | u8 shift; |
291 | u8 width; | ||
292 | u8 flags; | 309 | u8 flags; |
293 | spinlock_t *lock; | 310 | spinlock_t *lock; |
294 | }; | 311 | }; |
@@ -297,11 +314,19 @@ struct clk_mux { | |||
297 | #define CLK_MUX_INDEX_BIT BIT(1) | 314 | #define CLK_MUX_INDEX_BIT BIT(1) |
298 | 315 | ||
299 | extern const struct clk_ops clk_mux_ops; | 316 | extern const struct clk_ops clk_mux_ops; |
317 | |||
300 | struct clk *clk_register_mux(struct device *dev, const char *name, | 318 | struct clk *clk_register_mux(struct device *dev, const char *name, |
301 | const char **parent_names, u8 num_parents, unsigned long flags, | 319 | const char **parent_names, u8 num_parents, unsigned long flags, |
302 | void __iomem *reg, u8 shift, u8 width, | 320 | void __iomem *reg, u8 shift, u8 width, |
303 | u8 clk_mux_flags, spinlock_t *lock); | 321 | u8 clk_mux_flags, spinlock_t *lock); |
304 | 322 | ||
323 | struct clk *clk_register_mux_table(struct device *dev, const char *name, | ||
324 | const char **parent_names, u8 num_parents, unsigned long flags, | ||
325 | void __iomem *reg, u8 shift, u32 mask, | ||
326 | u8 clk_mux_flags, u32 *table, spinlock_t *lock); | ||
327 | |||
328 | void of_fixed_factor_clk_setup(struct device_node *node); | ||
329 | |||
305 | /** | 330 | /** |
306 | * struct clk_fixed_factor - fixed multiplier and divider clock | 331 | * struct clk_fixed_factor - fixed multiplier and divider clock |
307 | * | 332 | * |
@@ -325,6 +350,37 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, | |||
325 | const char *parent_name, unsigned long flags, | 350 | const char *parent_name, unsigned long flags, |
326 | unsigned int mult, unsigned int div); | 351 | unsigned int mult, unsigned int div); |
327 | 352 | ||
353 | /*** | ||
354 | * struct clk_composite - aggregate clock of mux, divider and gate clocks | ||
355 | * | ||
356 | * @hw: handle between common and hardware-specific interfaces | ||
357 | * @mux_hw: handle between composite and hardware-specific mux clock | ||
358 | * @rate_hw: handle between composite and hardware-specific rate clock | ||
359 | * @gate_hw: handle between composite and hardware-specific gate clock | ||
360 | * @mux_ops: clock ops for mux | ||
361 | * @rate_ops: clock ops for rate | ||
362 | * @gate_ops: clock ops for gate | ||
363 | */ | ||
364 | struct clk_composite { | ||
365 | struct clk_hw hw; | ||
366 | struct clk_ops ops; | ||
367 | |||
368 | struct clk_hw *mux_hw; | ||
369 | struct clk_hw *rate_hw; | ||
370 | struct clk_hw *gate_hw; | ||
371 | |||
372 | const struct clk_ops *mux_ops; | ||
373 | const struct clk_ops *rate_ops; | ||
374 | const struct clk_ops *gate_ops; | ||
375 | }; | ||
376 | |||
377 | struct clk *clk_register_composite(struct device *dev, const char *name, | ||
378 | const char **parent_names, int num_parents, | ||
379 | struct clk_hw *mux_hw, const struct clk_ops *mux_ops, | ||
380 | struct clk_hw *rate_hw, const struct clk_ops *rate_ops, | ||
381 | struct clk_hw *gate_hw, const struct clk_ops *gate_ops, | ||
382 | unsigned long flags); | ||
383 | |||
328 | /** | 384 | /** |
329 | * clk_register - allocate a new clock, register it and return an opaque cookie | 385 | * clk_register - allocate a new clock, register it and return an opaque cookie |
330 | * @dev: device that is registering this clock | 386 | * @dev: device that is registering this clock |
@@ -351,6 +407,7 @@ unsigned int __clk_get_enable_count(struct clk *clk); | |||
351 | unsigned int __clk_get_prepare_count(struct clk *clk); | 407 | unsigned int __clk_get_prepare_count(struct clk *clk); |
352 | unsigned long __clk_get_rate(struct clk *clk); | 408 | unsigned long __clk_get_rate(struct clk *clk); |
353 | unsigned long __clk_get_flags(struct clk *clk); | 409 | unsigned long __clk_get_flags(struct clk *clk); |
410 | bool __clk_is_prepared(struct clk *clk); | ||
354 | bool __clk_is_enabled(struct clk *clk); | 411 | bool __clk_is_enabled(struct clk *clk); |
355 | struct clk *__clk_lookup(const char *name); | 412 | struct clk *__clk_lookup(const char *name); |
356 | 413 | ||
diff --git a/include/linux/clk.h b/include/linux/clk.h index b3ac22d0fc1f..9a6d04524b1a 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
@@ -28,16 +28,16 @@ struct clk; | |||
28 | * PRE_RATE_CHANGE - called immediately before the clk rate is changed, | 28 | * PRE_RATE_CHANGE - called immediately before the clk rate is changed, |
29 | * to indicate that the rate change will proceed. Drivers must | 29 | * to indicate that the rate change will proceed. Drivers must |
30 | * immediately terminate any operations that will be affected by the | 30 | * immediately terminate any operations that will be affected by the |
31 | * rate change. Callbacks may either return NOTIFY_DONE or | 31 | * rate change. Callbacks may either return NOTIFY_DONE, NOTIFY_OK, |
32 | * NOTIFY_STOP. | 32 | * NOTIFY_STOP or NOTIFY_BAD. |
33 | * | 33 | * |
34 | * ABORT_RATE_CHANGE: called if the rate change failed for some reason | 34 | * ABORT_RATE_CHANGE: called if the rate change failed for some reason |
35 | * after PRE_RATE_CHANGE. In this case, all registered notifiers on | 35 | * after PRE_RATE_CHANGE. In this case, all registered notifiers on |
36 | * the clk will be called with ABORT_RATE_CHANGE. Callbacks must | 36 | * the clk will be called with ABORT_RATE_CHANGE. Callbacks must |
37 | * always return NOTIFY_DONE. | 37 | * always return NOTIFY_DONE or NOTIFY_OK. |
38 | * | 38 | * |
39 | * POST_RATE_CHANGE - called after the clk rate change has successfully | 39 | * POST_RATE_CHANGE - called after the clk rate change has successfully |
40 | * completed. Callbacks must always return NOTIFY_DONE. | 40 | * completed. Callbacks must always return NOTIFY_DONE or NOTIFY_OK. |
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | #define PRE_RATE_CHANGE BIT(0) | 43 | #define PRE_RATE_CHANGE BIT(0) |
diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000000000000..e074fdd5a236 --- /dev/null +++ b/include/linux/clk/sunxi.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
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 | |||
17 | #ifndef __LINUX_CLK_SUNXI_H_ | ||
18 | #define __LINUX_CLK_SUNXI_H_ | ||
19 | |||
20 | void __init sunxi_init_clocks(void); | ||
21 | |||
22 | #endif | ||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 66346521cb65..963d71431388 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -8,6 +8,20 @@ | |||
8 | #ifndef _LINUX_CLOCKCHIPS_H | 8 | #ifndef _LINUX_CLOCKCHIPS_H |
9 | #define _LINUX_CLOCKCHIPS_H | 9 | #define _LINUX_CLOCKCHIPS_H |
10 | 10 | ||
11 | /* Clock event notification values */ | ||
12 | enum clock_event_nofitiers { | ||
13 | CLOCK_EVT_NOTIFY_ADD, | ||
14 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
15 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
16 | CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | ||
17 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
18 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
19 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
20 | CLOCK_EVT_NOTIFY_RESUME, | ||
21 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
22 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
23 | }; | ||
24 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD | 25 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD |
12 | 26 | ||
13 | #include <linux/clocksource.h> | 27 | #include <linux/clocksource.h> |
@@ -26,20 +40,6 @@ enum clock_event_mode { | |||
26 | CLOCK_EVT_MODE_RESUME, | 40 | CLOCK_EVT_MODE_RESUME, |
27 | }; | 41 | }; |
28 | 42 | ||
29 | /* Clock event notification values */ | ||
30 | enum clock_event_nofitiers { | ||
31 | CLOCK_EVT_NOTIFY_ADD, | ||
32 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
33 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
34 | CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | ||
35 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
37 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
38 | CLOCK_EVT_NOTIFY_RESUME, | ||
39 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
40 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
41 | }; | ||
42 | |||
43 | /* | 43 | /* |
44 | * Clock event features | 44 | * Clock event features |
45 | */ | 45 | */ |
@@ -55,6 +55,11 @@ enum clock_event_nofitiers { | |||
55 | #define CLOCK_EVT_FEAT_C3STOP 0x000008 | 55 | #define CLOCK_EVT_FEAT_C3STOP 0x000008 |
56 | #define CLOCK_EVT_FEAT_DUMMY 0x000010 | 56 | #define CLOCK_EVT_FEAT_DUMMY 0x000010 |
57 | 57 | ||
58 | /* | ||
59 | * Core shall set the interrupt affinity dynamically in broadcast mode | ||
60 | */ | ||
61 | #define CLOCK_EVT_FEAT_DYNIRQ 0x000020 | ||
62 | |||
58 | /** | 63 | /** |
59 | * struct clock_event_device - clock event device descriptor | 64 | * struct clock_event_device - clock event device descriptor |
60 | * @event_handler: Assigned by the framework to be called by the low | 65 | * @event_handler: Assigned by the framework to be called by the low |
@@ -170,10 +175,16 @@ extern void tick_broadcast(const struct cpumask *mask); | |||
170 | extern int tick_receive_broadcast(void); | 175 | extern int tick_receive_broadcast(void); |
171 | #endif | 176 | #endif |
172 | 177 | ||
178 | #if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) | ||
179 | extern int tick_check_broadcast_expired(void); | ||
180 | #else | ||
181 | static inline int tick_check_broadcast_expired(void) { return 0; } | ||
182 | #endif | ||
183 | |||
173 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 184 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
174 | extern void clockevents_notify(unsigned long reason, void *arg); | 185 | extern void clockevents_notify(unsigned long reason, void *arg); |
175 | #else | 186 | #else |
176 | # define clockevents_notify(reason, arg) do { } while (0) | 187 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
177 | #endif | 188 | #endif |
178 | 189 | ||
179 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | 190 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ |
@@ -181,7 +192,8 @@ extern void clockevents_notify(unsigned long reason, void *arg); | |||
181 | static inline void clockevents_suspend(void) {} | 192 | static inline void clockevents_suspend(void) {} |
182 | static inline void clockevents_resume(void) {} | 193 | static inline void clockevents_resume(void) {} |
183 | 194 | ||
184 | #define clockevents_notify(reason, arg) do { } while (0) | 195 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
196 | static inline int tick_check_broadcast_expired(void) { return 0; } | ||
185 | 197 | ||
186 | #endif | 198 | #endif |
187 | 199 | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 27cfda427dd9..aa7032c7238f 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -206,6 +206,7 @@ struct clocksource { | |||
206 | #define CLOCK_SOURCE_WATCHDOG 0x10 | 206 | #define CLOCK_SOURCE_WATCHDOG 0x10 |
207 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 | 207 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 |
208 | #define CLOCK_SOURCE_UNSTABLE 0x40 | 208 | #define CLOCK_SOURCE_UNSTABLE 0x40 |
209 | #define CLOCK_SOURCE_SUSPEND_NONSTOP 0x80 | ||
209 | 210 | ||
210 | /* simplify initialization of mask field */ | 211 | /* simplify initialization of mask field */ |
211 | #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) | 212 | #define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 76a87fb57ac2..d53c35352ea9 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -27,12 +27,6 @@ | |||
27 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) | 27 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define __SC_CCAST1(t1, a1) __SC_DELOUSE(t1,a1) | ||
31 | #define __SC_CCAST2(t2, a2, ...) __SC_DELOUSE(t2,a2), __SC_CCAST1(__VA_ARGS__) | ||
32 | #define __SC_CCAST3(t3, a3, ...) __SC_DELOUSE(t3,a3), __SC_CCAST2(__VA_ARGS__) | ||
33 | #define __SC_CCAST4(t4, a4, ...) __SC_DELOUSE(t4,a4), __SC_CCAST3(__VA_ARGS__) | ||
34 | #define __SC_CCAST5(t5, a5, ...) __SC_DELOUSE(t5,a5), __SC_CCAST4(__VA_ARGS__) | ||
35 | #define __SC_CCAST6(t6, a6, ...) __SC_DELOUSE(t6,a6), __SC_CCAST5(__VA_ARGS__) | ||
36 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ | 30 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ |
37 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) | 31 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
38 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ | 32 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ |
@@ -46,24 +40,15 @@ | |||
46 | #define COMPAT_SYSCALL_DEFINE6(name, ...) \ | 40 | #define COMPAT_SYSCALL_DEFINE6(name, ...) \ |
47 | COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) | 41 | COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
48 | 42 | ||
49 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
50 | |||
51 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 43 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
52 | asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)); \ | 44 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ |
53 | static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ | 45 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ |
54 | asmlinkage long compat_SyS##name(__SC_LONG##x(__VA_ARGS__)) \ | 46 | asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ |
55 | { \ | 47 | { \ |
56 | return (long) C_SYSC##name(__SC_CCAST##x(__VA_ARGS__)); \ | 48 | return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \ |
57 | } \ | 49 | } \ |
58 | SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ | 50 | SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ |
59 | static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)) | 51 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
60 | |||
61 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
62 | |||
63 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | ||
64 | asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)) | ||
65 | |||
66 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
67 | 52 | ||
68 | #ifndef compat_user_stack_pointer | 53 | #ifndef compat_user_stack_pointer |
69 | #define compat_user_stack_pointer() current_user_stack_pointer() | 54 | #define compat_user_stack_pointer() current_user_stack_pointer() |
@@ -141,11 +126,11 @@ typedef struct { | |||
141 | } compat_sigset_t; | 126 | } compat_sigset_t; |
142 | 127 | ||
143 | struct compat_sigaction { | 128 | struct compat_sigaction { |
144 | #ifndef __ARCH_HAS_ODD_SIGACTION | 129 | #ifndef __ARCH_HAS_IRIX_SIGACTION |
145 | compat_uptr_t sa_handler; | 130 | compat_uptr_t sa_handler; |
146 | compat_ulong_t sa_flags; | 131 | compat_ulong_t sa_flags; |
147 | #else | 132 | #else |
148 | compat_ulong_t sa_flags; | 133 | compat_uint_t sa_flags; |
149 | compat_uptr_t sa_handler; | 134 | compat_uptr_t sa_handler; |
150 | #endif | 135 | #endif |
151 | #ifdef __ARCH_HAS_SA_RESTORER | 136 | #ifdef __ARCH_HAS_SA_RESTORER |
@@ -326,21 +311,13 @@ asmlinkage long | |||
326 | compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, | 311 | compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, |
327 | compat_size_t __user *len_ptr); | 312 | compat_size_t __user *len_ptr); |
328 | 313 | ||
329 | #ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC | 314 | asmlinkage long compat_sys_ipc(u32, int, int, u32, compat_uptr_t, u32); |
330 | long compat_sys_semctl(int first, int second, int third, void __user *uptr); | 315 | asmlinkage long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg); |
331 | long compat_sys_msgsnd(int first, int second, int third, void __user *uptr); | 316 | asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg); |
332 | long compat_sys_msgrcv(int first, int second, int msgtyp, int third, | 317 | asmlinkage long compat_sys_msgsnd(int msqid, compat_uptr_t msgp, |
333 | int version, void __user *uptr); | ||
334 | long compat_sys_shmat(int first, int second, compat_uptr_t third, int version, | ||
335 | void __user *uptr); | ||
336 | #else | ||
337 | long compat_sys_semctl(int semid, int semnum, int cmd, int arg); | ||
338 | long compat_sys_msgsnd(int msqid, struct compat_msgbuf __user *msgp, | ||
339 | compat_ssize_t msgsz, int msgflg); | 318 | compat_ssize_t msgsz, int msgflg); |
340 | long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp, | 319 | asmlinkage long compat_sys_msgrcv(int msqid, compat_uptr_t msgp, |
341 | compat_ssize_t msgsz, long msgtyp, int msgflg); | 320 | compat_ssize_t msgsz, long msgtyp, int msgflg); |
342 | long compat_sys_shmat(int shmid, compat_uptr_t shmaddr, int shmflg); | ||
343 | #endif | ||
344 | long compat_sys_msgctl(int first, int second, void __user *uptr); | 321 | long compat_sys_msgctl(int first, int second, void __user *uptr); |
345 | long compat_sys_shmctl(int first, int second, void __user *uptr); | 322 | long compat_sys_shmctl(int first, int second, void __user *uptr); |
346 | long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, | 323 | long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, |
@@ -444,13 +421,13 @@ extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request, | |||
444 | asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, | 421 | asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid, |
445 | compat_long_t addr, compat_long_t data); | 422 | compat_long_t addr, compat_long_t data); |
446 | 423 | ||
424 | asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, size_t); | ||
447 | /* | 425 | /* |
448 | * epoll (fs/eventpoll.c) compat bits follow ... | 426 | * epoll (fs/eventpoll.c) compat bits follow ... |
449 | */ | 427 | */ |
450 | struct epoll_event; | 428 | struct epoll_event; /* fortunately, this one is fixed-layout */ |
451 | #define compat_epoll_event epoll_event | ||
452 | asmlinkage long compat_sys_epoll_pwait(int epfd, | 429 | asmlinkage long compat_sys_epoll_pwait(int epfd, |
453 | struct compat_epoll_event __user *events, | 430 | struct epoll_event __user *events, |
454 | int maxevents, int timeout, | 431 | int maxevents, int timeout, |
455 | const compat_sigset_t __user *sigmask, | 432 | const compat_sigset_t __user *sigmask, |
456 | compat_size_t sigsetsize); | 433 | compat_size_t sigsetsize); |
@@ -685,6 +662,8 @@ asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid, | |||
685 | 662 | ||
686 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, | 663 | asmlinkage long compat_sys_sendfile(int out_fd, int in_fd, |
687 | compat_off_t __user *offset, compat_size_t count); | 664 | compat_off_t __user *offset, compat_size_t count); |
665 | asmlinkage long compat_sys_sendfile64(int out_fd, int in_fd, | ||
666 | compat_loff_t __user *offset, compat_size_t count); | ||
688 | asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr, | 667 | asmlinkage long compat_sys_sigaltstack(const compat_stack_t __user *uss_ptr, |
689 | compat_stack_t __user *uoss_ptr); | 668 | compat_stack_t __user *uoss_ptr); |
690 | 669 | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 68b162d92254..842de225055f 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -13,7 +13,7 @@ | |||
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 | 15 | ||
16 | #if GCC_VERSION >= 40100 | 16 | #if GCC_VERSION >= 40100 && GCC_VERSION < 40600 |
17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
18 | #endif | 18 | #endif |
19 | 19 | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 10b8f23fab0f..92669cd182a6 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -351,4 +351,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
351 | */ | 351 | */ |
352 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | 352 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) |
353 | 353 | ||
354 | /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ | ||
355 | #ifdef CONFIG_KPROBES | ||
356 | # define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
357 | #else | ||
358 | # define __kprobes | ||
359 | #endif | ||
354 | #endif /* __LINUX_COMPILER_H */ | 360 | #endif /* __LINUX_COMPILER_H */ |
diff --git a/include/linux/console.h b/include/linux/console.h index 29680a8cda99..73bab0f58af5 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -141,6 +141,7 @@ struct console { | |||
141 | for (con = console_drivers; con != NULL; con = con->next) | 141 | for (con = console_drivers; con != NULL; con = con->next) |
142 | 142 | ||
143 | extern int console_set_on_cmdline; | 143 | extern int console_set_on_cmdline; |
144 | extern struct console *early_console; | ||
144 | 145 | ||
145 | extern int add_preferred_console(char *name, int idx, char *options); | 146 | extern int add_preferred_console(char *name, int idx, char *options); |
146 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); | 147 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); |
diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h index b28d161c1091..365f4a61bf04 100644 --- a/include/linux/context_tracking.h +++ b/include/linux/context_tracking.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #ifndef _LINUX_CONTEXT_TRACKING_H | 1 | #ifndef _LINUX_CONTEXT_TRACKING_H |
2 | #define _LINUX_CONTEXT_TRACKING_H | 2 | #define _LINUX_CONTEXT_TRACKING_H |
3 | 3 | ||
4 | #ifdef CONFIG_CONTEXT_TRACKING | ||
5 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
6 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <asm/ptrace.h> | ||
7 | 7 | ||
8 | struct context_tracking { | 8 | struct context_tracking { |
9 | /* | 9 | /* |
@@ -13,12 +13,13 @@ struct context_tracking { | |||
13 | * may be further optimized using static keys. | 13 | * may be further optimized using static keys. |
14 | */ | 14 | */ |
15 | bool active; | 15 | bool active; |
16 | enum { | 16 | enum ctx_state { |
17 | IN_KERNEL = 0, | 17 | IN_KERNEL = 0, |
18 | IN_USER, | 18 | IN_USER, |
19 | } state; | 19 | } state; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #ifdef CONFIG_CONTEXT_TRACKING | ||
22 | DECLARE_PER_CPU(struct context_tracking, context_tracking); | 23 | DECLARE_PER_CPU(struct context_tracking, context_tracking); |
23 | 24 | ||
24 | static inline bool context_tracking_in_user(void) | 25 | static inline bool context_tracking_in_user(void) |
@@ -33,12 +34,31 @@ static inline bool context_tracking_active(void) | |||
33 | 34 | ||
34 | extern void user_enter(void); | 35 | extern void user_enter(void); |
35 | extern void user_exit(void); | 36 | extern void user_exit(void); |
37 | |||
38 | static inline enum ctx_state exception_enter(void) | ||
39 | { | ||
40 | enum ctx_state prev_ctx; | ||
41 | |||
42 | prev_ctx = this_cpu_read(context_tracking.state); | ||
43 | user_exit(); | ||
44 | |||
45 | return prev_ctx; | ||
46 | } | ||
47 | |||
48 | static inline void exception_exit(enum ctx_state prev_ctx) | ||
49 | { | ||
50 | if (prev_ctx == IN_USER) | ||
51 | user_enter(); | ||
52 | } | ||
53 | |||
36 | extern void context_tracking_task_switch(struct task_struct *prev, | 54 | extern void context_tracking_task_switch(struct task_struct *prev, |
37 | struct task_struct *next); | 55 | struct task_struct *next); |
38 | #else | 56 | #else |
39 | static inline bool context_tracking_in_user(void) { return false; } | 57 | static inline bool context_tracking_in_user(void) { return false; } |
40 | static inline void user_enter(void) { } | 58 | static inline void user_enter(void) { } |
41 | static inline void user_exit(void) { } | 59 | static inline void user_exit(void) { } |
60 | static inline enum ctx_state exception_enter(void) { return 0; } | ||
61 | static inline void exception_exit(enum ctx_state prev_ctx) { } | ||
42 | static inline void context_tracking_task_switch(struct task_struct *prev, | 62 | static inline void context_tracking_task_switch(struct task_struct *prev, |
43 | struct task_struct *next) { } | 63 | struct task_struct *next) { } |
44 | #endif /* !CONFIG_CONTEXT_TRACKING */ | 64 | #endif /* !CONFIG_CONTEXT_TRACKING */ |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index ce7a074f2519..c6f6e0839b61 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -212,4 +212,20 @@ static inline int disable_nonboot_cpus(void) { return 0; } | |||
212 | static inline void enable_nonboot_cpus(void) {} | 212 | static inline void enable_nonboot_cpus(void) {} |
213 | #endif /* !CONFIG_PM_SLEEP_SMP */ | 213 | #endif /* !CONFIG_PM_SLEEP_SMP */ |
214 | 214 | ||
215 | enum cpuhp_state { | ||
216 | CPUHP_OFFLINE, | ||
217 | CPUHP_ONLINE, | ||
218 | }; | ||
219 | |||
220 | void cpu_startup_entry(enum cpuhp_state state); | ||
221 | void cpu_idle(void); | ||
222 | |||
223 | void cpu_idle_poll_ctrl(bool enable); | ||
224 | |||
225 | void arch_cpu_idle(void); | ||
226 | void arch_cpu_idle_prepare(void); | ||
227 | void arch_cpu_idle_enter(void); | ||
228 | void arch_cpu_idle_exit(void); | ||
229 | void arch_cpu_idle_dead(void); | ||
230 | |||
215 | #endif /* _LINUX_CPU_H_ */ | 231 | #endif /* _LINUX_CPU_H_ */ |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a22944ca0526..037d36ae63e5 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -106,6 +106,7 @@ struct cpufreq_policy { | |||
106 | * governors are used */ | 106 | * governors are used */ |
107 | unsigned int policy; /* see above */ | 107 | unsigned int policy; /* see above */ |
108 | struct cpufreq_governor *governor; /* see below */ | 108 | struct cpufreq_governor *governor; /* see below */ |
109 | void *governor_data; | ||
109 | 110 | ||
110 | struct work_struct update; /* if update_policy() needs to be | 111 | struct work_struct update; /* if update_policy() needs to be |
111 | * called, but you're in IRQ context */ | 112 | * called, but you're in IRQ context */ |
@@ -178,9 +179,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu | |||
178 | * CPUFREQ GOVERNORS * | 179 | * CPUFREQ GOVERNORS * |
179 | *********************************************************************/ | 180 | *********************************************************************/ |
180 | 181 | ||
181 | #define CPUFREQ_GOV_START 1 | 182 | #define CPUFREQ_GOV_START 1 |
182 | #define CPUFREQ_GOV_STOP 2 | 183 | #define CPUFREQ_GOV_STOP 2 |
183 | #define CPUFREQ_GOV_LIMITS 3 | 184 | #define CPUFREQ_GOV_LIMITS 3 |
185 | #define CPUFREQ_GOV_POLICY_INIT 4 | ||
186 | #define CPUFREQ_GOV_POLICY_EXIT 5 | ||
184 | 187 | ||
185 | struct cpufreq_governor { | 188 | struct cpufreq_governor { |
186 | char name[CPUFREQ_NAME_LEN]; | 189 | char name[CPUFREQ_NAME_LEN]; |
@@ -229,6 +232,13 @@ struct cpufreq_driver { | |||
229 | struct module *owner; | 232 | struct module *owner; |
230 | char name[CPUFREQ_NAME_LEN]; | 233 | char name[CPUFREQ_NAME_LEN]; |
231 | u8 flags; | 234 | u8 flags; |
235 | /* | ||
236 | * This should be set by platforms having multiple clock-domains, i.e. | ||
237 | * supporting multiple policies. With this sysfs directories of governor | ||
238 | * would be created in cpu/cpu<num>/cpufreq/ directory and so they can | ||
239 | * use the same governor with different tunables for different clusters. | ||
240 | */ | ||
241 | bool have_governor_per_policy; | ||
232 | 242 | ||
233 | /* needed by all drivers */ | 243 | /* needed by all drivers */ |
234 | int (*init) (struct cpufreq_policy *policy); | 244 | int (*init) (struct cpufreq_policy *policy); |
@@ -268,8 +278,8 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data); | |||
268 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 278 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
269 | 279 | ||
270 | 280 | ||
271 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); | 281 | void cpufreq_notify_transition(struct cpufreq_policy *policy, |
272 | 282 | struct cpufreq_freqs *freqs, unsigned int state); | |
273 | 283 | ||
274 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 284 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) |
275 | { | 285 | { |
@@ -329,6 +339,7 @@ const char *cpufreq_get_current_driver(void); | |||
329 | *********************************************************************/ | 339 | *********************************************************************/ |
330 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 340 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
331 | int cpufreq_update_policy(unsigned int cpu); | 341 | int cpufreq_update_policy(unsigned int cpu); |
342 | bool have_governor_per_policy(void); | ||
332 | 343 | ||
333 | #ifdef CONFIG_CPU_FREQ | 344 | #ifdef CONFIG_CPU_FREQ |
334 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 345 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 480c14dc1ddd..3c86faa59798 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -57,6 +57,7 @@ struct cpuidle_state { | |||
57 | /* Idle State Flags */ | 57 | /* Idle State Flags */ |
58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ | 58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ |
59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ | 59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ |
60 | #define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */ | ||
60 | 61 | ||
61 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 62 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
62 | 63 | ||
@@ -104,8 +105,8 @@ struct cpuidle_driver { | |||
104 | struct module *owner; | 105 | struct module *owner; |
105 | int refcnt; | 106 | int refcnt; |
106 | 107 | ||
107 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 108 | /* used by the cpuidle framework to setup the broadcast timer */ |
108 | unsigned int en_core_tk_irqen:1; | 109 | unsigned int bctimer:1; |
109 | /* states array must be ordered in decreasing power consumption */ | 110 | /* states array must be ordered in decreasing power consumption */ |
110 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 111 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
111 | int state_count; | 112 | int state_count; |
@@ -122,17 +123,15 @@ extern void cpuidle_driver_unref(void); | |||
122 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | 123 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); |
123 | extern int cpuidle_register_device(struct cpuidle_device *dev); | 124 | extern int cpuidle_register_device(struct cpuidle_device *dev); |
124 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); | 125 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); |
125 | 126 | extern int cpuidle_register(struct cpuidle_driver *drv, | |
127 | const struct cpumask *const coupled_cpus); | ||
128 | extern void cpuidle_unregister(struct cpuidle_driver *drv); | ||
126 | extern void cpuidle_pause_and_lock(void); | 129 | extern void cpuidle_pause_and_lock(void); |
127 | extern void cpuidle_resume_and_unlock(void); | 130 | extern void cpuidle_resume_and_unlock(void); |
128 | extern void cpuidle_pause(void); | 131 | extern void cpuidle_pause(void); |
129 | extern void cpuidle_resume(void); | 132 | extern void cpuidle_resume(void); |
130 | extern int cpuidle_enable_device(struct cpuidle_device *dev); | 133 | extern int cpuidle_enable_device(struct cpuidle_device *dev); |
131 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | 134 | extern void cpuidle_disable_device(struct cpuidle_device *dev); |
132 | extern int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
133 | struct cpuidle_driver *drv, int index, | ||
134 | int (*enter)(struct cpuidle_device *dev, | ||
135 | struct cpuidle_driver *drv, int index)); | ||
136 | extern int cpuidle_play_dead(void); | 135 | extern int cpuidle_play_dead(void); |
137 | 136 | ||
138 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | 137 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); |
@@ -151,7 +150,10 @@ static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } | |||
151 | static inline int cpuidle_register_device(struct cpuidle_device *dev) | 150 | static inline int cpuidle_register_device(struct cpuidle_device *dev) |
152 | {return -ENODEV; } | 151 | {return -ENODEV; } |
153 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } | 152 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } |
154 | 153 | static inline int cpuidle_register(struct cpuidle_driver *drv, | |
154 | const struct cpumask *const coupled_cpus) | ||
155 | {return -ENODEV; } | ||
156 | static inline void cpuidle_unregister(struct cpuidle_driver *drv) { } | ||
155 | static inline void cpuidle_pause_and_lock(void) { } | 157 | static inline void cpuidle_pause_and_lock(void) { } |
156 | static inline void cpuidle_resume_and_unlock(void) { } | 158 | static inline void cpuidle_resume_and_unlock(void) { } |
157 | static inline void cpuidle_pause(void) { } | 159 | static inline void cpuidle_pause(void) { } |
@@ -159,11 +161,6 @@ static inline void cpuidle_resume(void) { } | |||
159 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) | 161 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) |
160 | {return -ENODEV; } | 162 | {return -ENODEV; } |
161 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 163 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
162 | static inline int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
163 | struct cpuidle_driver *drv, int index, | ||
164 | int (*enter)(struct cpuidle_device *dev, | ||
165 | struct cpuidle_driver *drv, int index)) | ||
166 | { return -ENODEV; } | ||
167 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | 164 | static inline int cpuidle_play_dead(void) {return -ENODEV; } |
168 | #endif | 165 | #endif |
169 | 166 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 032560295fcb..d08e4d2a9b92 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -591,6 +591,21 @@ static inline int cpulist_scnprintf(char *buf, int len, | |||
591 | } | 591 | } |
592 | 592 | ||
593 | /** | 593 | /** |
594 | * cpumask_parse - extract a cpumask from from a string | ||
595 | * @buf: the buffer to extract from | ||
596 | * @dstp: the cpumask to set. | ||
597 | * | ||
598 | * Returns -errno, or 0 for success. | ||
599 | */ | ||
600 | static inline int cpumask_parse(const char *buf, struct cpumask *dstp) | ||
601 | { | ||
602 | char *nl = strchr(buf, '\n'); | ||
603 | int len = nl ? nl - buf : strlen(buf); | ||
604 | |||
605 | return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits); | ||
606 | } | ||
607 | |||
608 | /** | ||
594 | * cpulist_parse - extract a cpumask from a user string of ranges | 609 | * cpulist_parse - extract a cpumask from a user string of ranges |
595 | * @buf: the buffer to extract from | 610 | * @buf: the buffer to extract from |
596 | * @dstp: the cpumask to set. | 611 | * @dstp: the cpumask to set. |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 8c8a60d29407..ccd1de8ad822 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <linux/cgroup.h> | ||
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
16 | 15 | ||
17 | #ifdef CONFIG_CPUSETS | 16 | #ifdef CONFIG_CPUSETS |
diff --git a/include/linux/ctype.h b/include/linux/ctype.h index 8acfe312f947..653589e3e30e 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h | |||
@@ -61,4 +61,10 @@ static inline char _tolower(const char c) | |||
61 | return c | 0x20; | 61 | return c | 0x20; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* Fast check for octal digit */ | ||
65 | static inline int isodigit(const char c) | ||
66 | { | ||
67 | return c >= '0' && c <= '7'; | ||
68 | } | ||
69 | |||
64 | #endif | 70 | #endif |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 3bd46f766751..21ca773f77bf 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -27,7 +27,7 @@ extern int debug_locks_off(void); | |||
27 | \ | 27 | \ |
28 | if (!oops_in_progress && unlikely(c)) { \ | 28 | if (!oops_in_progress && unlikely(c)) { \ |
29 | if (debug_locks_off() && !debug_locks_silent) \ | 29 | if (debug_locks_off() && !debug_locks_silent) \ |
30 | WARN_ON(1); \ | 30 | WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \ |
31 | __ret = 1; \ | 31 | __ret = 1; \ |
32 | } \ | 32 | } \ |
33 | __ret; \ | 33 | __ret; \ |
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index e83ef39b3bea..fe8c4476f7e4 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -213,7 +213,7 @@ struct devfreq_simple_ondemand_data { | |||
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | #else /* !CONFIG_PM_DEVFREQ */ | 215 | #else /* !CONFIG_PM_DEVFREQ */ |
216 | static struct devfreq *devfreq_add_device(struct device *dev, | 216 | static inline struct devfreq *devfreq_add_device(struct device *dev, |
217 | struct devfreq_dev_profile *profile, | 217 | struct devfreq_dev_profile *profile, |
218 | const char *governor_name, | 218 | const char *governor_name, |
219 | void *data) | 219 | void *data) |
@@ -221,34 +221,34 @@ static struct devfreq *devfreq_add_device(struct device *dev, | |||
221 | return NULL; | 221 | return NULL; |
222 | } | 222 | } |
223 | 223 | ||
224 | static int devfreq_remove_device(struct devfreq *devfreq) | 224 | static inline int devfreq_remove_device(struct devfreq *devfreq) |
225 | { | 225 | { |
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
228 | 228 | ||
229 | static int devfreq_suspend_device(struct devfreq *devfreq) | 229 | static inline int devfreq_suspend_device(struct devfreq *devfreq) |
230 | { | 230 | { |
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||
234 | static int devfreq_resume_device(struct devfreq *devfreq) | 234 | static inline int devfreq_resume_device(struct devfreq *devfreq) |
235 | { | 235 | { |
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static struct opp *devfreq_recommended_opp(struct device *dev, | 239 | static inline struct opp *devfreq_recommended_opp(struct device *dev, |
240 | unsigned long *freq, u32 flags) | 240 | unsigned long *freq, u32 flags) |
241 | { | 241 | { |
242 | return -EINVAL; | 242 | return ERR_PTR(-EINVAL); |
243 | } | 243 | } |
244 | 244 | ||
245 | static int devfreq_register_opp_notifier(struct device *dev, | 245 | static inline int devfreq_register_opp_notifier(struct device *dev, |
246 | struct devfreq *devfreq) | 246 | struct devfreq *devfreq) |
247 | { | 247 | { |
248 | return -EINVAL; | 248 | return -EINVAL; |
249 | } | 249 | } |
250 | 250 | ||
251 | static int devfreq_unregister_opp_notifier(struct device *dev, | 251 | static inline int devfreq_unregister_opp_notifier(struct device *dev, |
252 | struct devfreq *devfreq) | 252 | struct devfreq *devfreq) |
253 | { | 253 | { |
254 | return -EINVAL; | 254 | return -EINVAL; |
diff --git a/include/linux/device.h b/include/linux/device.h index 9d6464ea99c6..711793b145ff 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <linux/ratelimit.h> | 27 | #include <linux/ratelimit.h> |
28 | #include <linux/uidgid.h> | ||
28 | #include <asm/device.h> | 29 | #include <asm/device.h> |
29 | 30 | ||
30 | struct device; | 31 | struct device; |
@@ -111,17 +112,11 @@ struct bus_type { | |||
111 | struct iommu_ops *iommu_ops; | 112 | struct iommu_ops *iommu_ops; |
112 | 113 | ||
113 | struct subsys_private *p; | 114 | struct subsys_private *p; |
115 | struct lock_class_key lock_key; | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | /* This is a #define to keep the compiler from merging different | 118 | extern int __must_check bus_register(struct bus_type *bus); |
117 | * instances of the __key variable */ | 119 | |
118 | #define bus_register(subsys) \ | ||
119 | ({ \ | ||
120 | static struct lock_class_key __key; \ | ||
121 | __bus_register(subsys, &__key); \ | ||
122 | }) | ||
123 | extern int __must_check __bus_register(struct bus_type *bus, | ||
124 | struct lock_class_key *key); | ||
125 | extern void bus_unregister(struct bus_type *bus); | 120 | extern void bus_unregister(struct bus_type *bus); |
126 | 121 | ||
127 | extern int __must_check bus_rescan_devices(struct bus_type *bus); | 122 | extern int __must_check bus_rescan_devices(struct bus_type *bus); |
@@ -302,6 +297,8 @@ void subsys_interface_unregister(struct subsys_interface *sif); | |||
302 | 297 | ||
303 | int subsys_system_register(struct bus_type *subsys, | 298 | int subsys_system_register(struct bus_type *subsys, |
304 | const struct attribute_group **groups); | 299 | const struct attribute_group **groups); |
300 | int subsys_virtual_register(struct bus_type *subsys, | ||
301 | const struct attribute_group **groups); | ||
305 | 302 | ||
306 | /** | 303 | /** |
307 | * struct class - device classes | 304 | * struct class - device classes |
@@ -471,7 +468,8 @@ struct device_type { | |||
471 | const char *name; | 468 | const char *name; |
472 | const struct attribute_group **groups; | 469 | const struct attribute_group **groups; |
473 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 470 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
474 | char *(*devnode)(struct device *dev, umode_t *mode); | 471 | char *(*devnode)(struct device *dev, umode_t *mode, |
472 | kuid_t *uid, kgid_t *gid); | ||
475 | void (*release)(struct device *dev); | 473 | void (*release)(struct device *dev); |
476 | 474 | ||
477 | const struct dev_pm_ops *pm; | 475 | const struct dev_pm_ops *pm; |
@@ -849,7 +847,8 @@ extern int device_rename(struct device *dev, const char *new_name); | |||
849 | extern int device_move(struct device *dev, struct device *new_parent, | 847 | extern int device_move(struct device *dev, struct device *new_parent, |
850 | enum dpm_order dpm_order); | 848 | enum dpm_order dpm_order); |
851 | extern const char *device_get_devnode(struct device *dev, | 849 | extern const char *device_get_devnode(struct device *dev, |
852 | umode_t *mode, const char **tmp); | 850 | umode_t *mode, kuid_t *uid, kgid_t *gid, |
851 | const char **tmp); | ||
853 | extern void *dev_get_drvdata(const struct device *dev); | 852 | extern void *dev_get_drvdata(const struct device *dev); |
854 | extern int dev_set_drvdata(struct device *dev, void *data); | 853 | extern int dev_set_drvdata(struct device *dev, void *data); |
855 | 854 | ||
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 9978b614a1aa..dfac5ed31120 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
@@ -112,6 +112,8 @@ struct dma_buf_ops { | |||
112 | * @file: file pointer used for sharing buffers across, and for refcounting. | 112 | * @file: file pointer used for sharing buffers across, and for refcounting. |
113 | * @attachments: list of dma_buf_attachment that denotes all devices attached. | 113 | * @attachments: list of dma_buf_attachment that denotes all devices attached. |
114 | * @ops: dma_buf_ops associated with this buffer object. | 114 | * @ops: dma_buf_ops associated with this buffer object. |
115 | * @exp_name: name of the exporter; useful for debugging. | ||
116 | * @list_node: node for dma_buf accounting and debugging. | ||
115 | * @priv: exporter specific private data for this buffer object. | 117 | * @priv: exporter specific private data for this buffer object. |
116 | */ | 118 | */ |
117 | struct dma_buf { | 119 | struct dma_buf { |
@@ -123,6 +125,8 @@ struct dma_buf { | |||
123 | struct mutex lock; | 125 | struct mutex lock; |
124 | unsigned vmapping_counter; | 126 | unsigned vmapping_counter; |
125 | void *vmap_ptr; | 127 | void *vmap_ptr; |
128 | const char *exp_name; | ||
129 | struct list_head list_node; | ||
126 | void *priv; | 130 | void *priv; |
127 | }; | 131 | }; |
128 | 132 | ||
@@ -162,8 +166,13 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, | |||
162 | struct device *dev); | 166 | struct device *dev); |
163 | void dma_buf_detach(struct dma_buf *dmabuf, | 167 | void dma_buf_detach(struct dma_buf *dmabuf, |
164 | struct dma_buf_attachment *dmabuf_attach); | 168 | struct dma_buf_attachment *dmabuf_attach); |
165 | struct dma_buf *dma_buf_export(void *priv, const struct dma_buf_ops *ops, | 169 | |
166 | size_t size, int flags); | 170 | struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, |
171 | size_t size, int flags, const char *); | ||
172 | |||
173 | #define dma_buf_export(priv, ops, size, flags) \ | ||
174 | dma_buf_export_named(priv, ops, size, flags, __FILE__) | ||
175 | |||
167 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); | 176 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); |
168 | struct dma_buf *dma_buf_get(int fd); | 177 | struct dma_buf *dma_buf_get(int fd); |
169 | void dma_buf_put(struct dma_buf *dmabuf); | 178 | void dma_buf_put(struct dma_buf *dmabuf); |
@@ -185,5 +194,6 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, | |||
185 | unsigned long); | 194 | unsigned long); |
186 | void *dma_buf_vmap(struct dma_buf *); | 195 | void *dma_buf_vmap(struct dma_buf *); |
187 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); | 196 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); |
188 | 197 | int dma_buf_debugfs_create_file(const char *name, | |
198 | int (*write)(struct seq_file *)); | ||
189 | #endif /* __DMA_BUF_H__ */ | 199 | #endif /* __DMA_BUF_H__ */ |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index f156cca25ad0..b6eb7a05d58e 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -99,6 +99,7 @@ extern const char * dmi_get_system_info(int field); | |||
99 | extern const struct dmi_device * dmi_find_device(int type, const char *name, | 99 | extern const struct dmi_device * dmi_find_device(int type, const char *name, |
100 | const struct dmi_device *from); | 100 | const struct dmi_device *from); |
101 | extern void dmi_scan_machine(void); | 101 | extern void dmi_scan_machine(void); |
102 | extern void dmi_set_dump_stack_arch_desc(void); | ||
102 | extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp); | 103 | extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp); |
103 | extern int dmi_name_in_vendors(const char *str); | 104 | extern int dmi_name_in_vendors(const char *str); |
104 | extern int dmi_name_in_serial(const char *str); | 105 | extern int dmi_name_in_serial(const char *str); |
@@ -114,6 +115,7 @@ static inline const char * dmi_get_system_info(int field) { return NULL; } | |||
114 | static inline const struct dmi_device * dmi_find_device(int type, const char *name, | 115 | static inline const struct dmi_device * dmi_find_device(int type, const char *name, |
115 | const struct dmi_device *from) { return NULL; } | 116 | const struct dmi_device *from) { return NULL; } |
116 | static inline void dmi_scan_machine(void) { return; } | 117 | static inline void dmi_scan_machine(void) { return; } |
118 | static inline void dmi_set_dump_stack_arch_desc(void) { } | ||
117 | static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp) | 119 | static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp) |
118 | { | 120 | { |
119 | if (yearp) | 121 | if (yearp) |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 9bf2f1fcae27..3d7df3d32c66 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -333,6 +333,7 @@ typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules, | |||
333 | unsigned long count, | 333 | unsigned long count, |
334 | u64 *max_size, | 334 | u64 *max_size, |
335 | int *reset_type); | 335 | int *reset_type); |
336 | typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long size); | ||
336 | 337 | ||
337 | /* | 338 | /* |
338 | * EFI Configuration Table and GUID definitions | 339 | * EFI Configuration Table and GUID definitions |
@@ -575,9 +576,15 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos | |||
575 | #ifdef CONFIG_X86 | 576 | #ifdef CONFIG_X86 |
576 | extern void efi_late_init(void); | 577 | extern void efi_late_init(void); |
577 | extern void efi_free_boot_services(void); | 578 | extern void efi_free_boot_services(void); |
579 | extern efi_status_t efi_query_variable_store(u32 attributes, unsigned long size); | ||
578 | #else | 580 | #else |
579 | static inline void efi_late_init(void) {} | 581 | static inline void efi_late_init(void) {} |
580 | static inline void efi_free_boot_services(void) {} | 582 | static inline void efi_free_boot_services(void) {} |
583 | |||
584 | static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) | ||
585 | { | ||
586 | return EFI_SUCCESS; | ||
587 | } | ||
581 | #endif | 588 | #endif |
582 | extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); | 589 | extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); |
583 | extern u64 efi_get_iobase (void); | 590 | extern u64 efi_get_iobase (void); |
@@ -731,7 +738,7 @@ struct efivar_operations { | |||
731 | efi_get_variable_t *get_variable; | 738 | efi_get_variable_t *get_variable; |
732 | efi_get_next_variable_t *get_next_variable; | 739 | efi_get_next_variable_t *get_next_variable; |
733 | efi_set_variable_t *set_variable; | 740 | efi_set_variable_t *set_variable; |
734 | efi_query_variable_info_t *query_variable_info; | 741 | efi_query_variable_store_t *query_variable_store; |
735 | }; | 742 | }; |
736 | 743 | ||
737 | struct efivars { | 744 | struct efivars { |
diff --git a/include/linux/evm.h b/include/linux/evm.h index 9fc13a760928..1fcb88ca88de 100644 --- a/include/linux/evm.h +++ b/include/linux/evm.h | |||
@@ -96,5 +96,5 @@ static inline int evm_inode_init_security(struct inode *inode, | |||
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | #endif /* CONFIG_EVM_H */ | 99 | #endif /* CONFIG_EVM */ |
100 | #endif /* LINUX_EVM_H */ | 100 | #endif /* LINUX_EVM_H */ |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 5b9b5b317180..41b223a59a63 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -85,6 +85,17 @@ enum fid_type { | |||
85 | FILEID_NILFS_WITH_PARENT = 0x62, | 85 | FILEID_NILFS_WITH_PARENT = 0x62, |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * 32 bit generation number, 40 bit i_pos. | ||
89 | */ | ||
90 | FILEID_FAT_WITHOUT_PARENT = 0x71, | ||
91 | |||
92 | /* | ||
93 | * 32 bit generation number, 40 bit i_pos, | ||
94 | * 32 bit parent generation number, 40 bit parent i_pos | ||
95 | */ | ||
96 | FILEID_FAT_WITH_PARENT = 0x72, | ||
97 | |||
98 | /* | ||
88 | * Filesystems must not use 0xff file ID. | 99 | * Filesystems must not use 0xff file ID. |
89 | */ | 100 | */ |
90 | FILEID_INVALID = 0xff, | 101 | FILEID_INVALID = 0xff, |
diff --git a/include/linux/frontswap.h b/include/linux/frontswap.h index 30442547b9e6..8293262401de 100644 --- a/include/linux/frontswap.h +++ b/include/linux/frontswap.h | |||
@@ -14,7 +14,7 @@ struct frontswap_ops { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | extern bool frontswap_enabled; | 16 | extern bool frontswap_enabled; |
17 | extern struct frontswap_ops | 17 | extern struct frontswap_ops * |
18 | frontswap_register_ops(struct frontswap_ops *ops); | 18 | frontswap_register_ops(struct frontswap_ops *ops); |
19 | extern void frontswap_shrink(unsigned long); | 19 | extern void frontswap_shrink(unsigned long); |
20 | extern unsigned long frontswap_curr_pages(void); | 20 | extern unsigned long frontswap_curr_pages(void); |
@@ -22,33 +22,19 @@ extern void frontswap_writethrough(bool); | |||
22 | #define FRONTSWAP_HAS_EXCLUSIVE_GETS | 22 | #define FRONTSWAP_HAS_EXCLUSIVE_GETS |
23 | extern void frontswap_tmem_exclusive_gets(bool); | 23 | extern void frontswap_tmem_exclusive_gets(bool); |
24 | 24 | ||
25 | extern void __frontswap_init(unsigned type); | 25 | extern bool __frontswap_test(struct swap_info_struct *, pgoff_t); |
26 | extern void __frontswap_init(unsigned type, unsigned long *map); | ||
26 | extern int __frontswap_store(struct page *page); | 27 | extern int __frontswap_store(struct page *page); |
27 | extern int __frontswap_load(struct page *page); | 28 | extern int __frontswap_load(struct page *page); |
28 | extern void __frontswap_invalidate_page(unsigned, pgoff_t); | 29 | extern void __frontswap_invalidate_page(unsigned, pgoff_t); |
29 | extern void __frontswap_invalidate_area(unsigned); | 30 | extern void __frontswap_invalidate_area(unsigned); |
30 | 31 | ||
31 | #ifdef CONFIG_FRONTSWAP | 32 | #ifdef CONFIG_FRONTSWAP |
33 | #define frontswap_enabled (1) | ||
32 | 34 | ||
33 | static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset) | 35 | static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset) |
34 | { | 36 | { |
35 | bool ret = false; | 37 | return __frontswap_test(sis, offset); |
36 | |||
37 | if (frontswap_enabled && sis->frontswap_map) | ||
38 | ret = test_bit(offset, sis->frontswap_map); | ||
39 | return ret; | ||
40 | } | ||
41 | |||
42 | static inline void frontswap_set(struct swap_info_struct *sis, pgoff_t offset) | ||
43 | { | ||
44 | if (frontswap_enabled && sis->frontswap_map) | ||
45 | set_bit(offset, sis->frontswap_map); | ||
46 | } | ||
47 | |||
48 | static inline void frontswap_clear(struct swap_info_struct *sis, pgoff_t offset) | ||
49 | { | ||
50 | if (frontswap_enabled && sis->frontswap_map) | ||
51 | clear_bit(offset, sis->frontswap_map); | ||
52 | } | 38 | } |
53 | 39 | ||
54 | static inline void frontswap_map_set(struct swap_info_struct *p, | 40 | static inline void frontswap_map_set(struct swap_info_struct *p, |
@@ -71,14 +57,6 @@ static inline bool frontswap_test(struct swap_info_struct *sis, pgoff_t offset) | |||
71 | return false; | 57 | return false; |
72 | } | 58 | } |
73 | 59 | ||
74 | static inline void frontswap_set(struct swap_info_struct *sis, pgoff_t offset) | ||
75 | { | ||
76 | } | ||
77 | |||
78 | static inline void frontswap_clear(struct swap_info_struct *sis, pgoff_t offset) | ||
79 | { | ||
80 | } | ||
81 | |||
82 | static inline void frontswap_map_set(struct swap_info_struct *p, | 60 | static inline void frontswap_map_set(struct swap_info_struct *p, |
83 | unsigned long *map) | 61 | unsigned long *map) |
84 | { | 62 | { |
@@ -120,10 +98,10 @@ static inline void frontswap_invalidate_area(unsigned type) | |||
120 | __frontswap_invalidate_area(type); | 98 | __frontswap_invalidate_area(type); |
121 | } | 99 | } |
122 | 100 | ||
123 | static inline void frontswap_init(unsigned type) | 101 | static inline void frontswap_init(unsigned type, unsigned long *map) |
124 | { | 102 | { |
125 | if (frontswap_enabled) | 103 | if (frontswap_enabled) |
126 | __frontswap_init(type); | 104 | __frontswap_init(type, map); |
127 | } | 105 | } |
128 | 106 | ||
129 | #endif /* _LINUX_FRONTSWAP_H */ | 107 | #endif /* _LINUX_FRONTSWAP_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2c28271ab9d4..17d8b1596215 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -675,9 +675,11 @@ static inline loff_t i_size_read(const struct inode *inode) | |||
675 | static inline void i_size_write(struct inode *inode, loff_t i_size) | 675 | static inline void i_size_write(struct inode *inode, loff_t i_size) |
676 | { | 676 | { |
677 | #if BITS_PER_LONG==32 && defined(CONFIG_SMP) | 677 | #if BITS_PER_LONG==32 && defined(CONFIG_SMP) |
678 | preempt_disable(); | ||
678 | write_seqcount_begin(&inode->i_size_seqcount); | 679 | write_seqcount_begin(&inode->i_size_seqcount); |
679 | inode->i_size = i_size; | 680 | inode->i_size = i_size; |
680 | write_seqcount_end(&inode->i_size_seqcount); | 681 | write_seqcount_end(&inode->i_size_seqcount); |
682 | preempt_enable(); | ||
681 | #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT) | 683 | #elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT) |
682 | preempt_disable(); | 684 | preempt_disable(); |
683 | inode->i_size = i_size; | 685 | inode->i_size = i_size; |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index d5b0910d4961..4b2ee8d12f5e 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -157,7 +157,6 @@ struct fsnotify_group { | |||
157 | struct inotify_group_private_data { | 157 | struct inotify_group_private_data { |
158 | spinlock_t idr_lock; | 158 | spinlock_t idr_lock; |
159 | struct idr idr; | 159 | struct idr idr; |
160 | u32 last_wd; | ||
161 | struct user_struct *user; | 160 | struct user_struct *user; |
162 | } inotify_data; | 161 | } inotify_data; |
163 | #endif | 162 | #endif |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e5ca8ef50e9b..f83e17a40e8b 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -89,6 +89,7 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip, | |||
89 | * that the call back has its own recursion protection. If it does | 89 | * that the call back has its own recursion protection. If it does |
90 | * not set this, then the ftrace infrastructure will add recursion | 90 | * not set this, then the ftrace infrastructure will add recursion |
91 | * protection for the caller. | 91 | * protection for the caller. |
92 | * STUB - The ftrace_ops is just a place holder. | ||
92 | */ | 93 | */ |
93 | enum { | 94 | enum { |
94 | FTRACE_OPS_FL_ENABLED = 1 << 0, | 95 | FTRACE_OPS_FL_ENABLED = 1 << 0, |
@@ -98,6 +99,7 @@ enum { | |||
98 | FTRACE_OPS_FL_SAVE_REGS = 1 << 4, | 99 | FTRACE_OPS_FL_SAVE_REGS = 1 << 4, |
99 | FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, | 100 | FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, |
100 | FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, | 101 | FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, |
102 | FTRACE_OPS_FL_STUB = 1 << 7, | ||
101 | }; | 103 | }; |
102 | 104 | ||
103 | struct ftrace_ops { | 105 | struct ftrace_ops { |
@@ -259,8 +261,10 @@ struct ftrace_probe_ops { | |||
259 | void (*func)(unsigned long ip, | 261 | void (*func)(unsigned long ip, |
260 | unsigned long parent_ip, | 262 | unsigned long parent_ip, |
261 | void **data); | 263 | void **data); |
262 | int (*callback)(unsigned long ip, void **data); | 264 | int (*init)(struct ftrace_probe_ops *ops, |
263 | void (*free)(void **data); | 265 | unsigned long ip, void **data); |
266 | void (*free)(struct ftrace_probe_ops *ops, | ||
267 | unsigned long ip, void **data); | ||
264 | int (*print)(struct seq_file *m, | 268 | int (*print)(struct seq_file *m, |
265 | unsigned long ip, | 269 | unsigned long ip, |
266 | struct ftrace_probe_ops *ops, | 270 | struct ftrace_probe_ops *ops, |
@@ -394,7 +398,6 @@ ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf, | |||
394 | size_t cnt, loff_t *ppos); | 398 | size_t cnt, loff_t *ppos); |
395 | ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, | 399 | ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, |
396 | size_t cnt, loff_t *ppos); | 400 | size_t cnt, loff_t *ppos); |
397 | loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int whence); | ||
398 | int ftrace_regex_release(struct inode *inode, struct file *file); | 401 | int ftrace_regex_release(struct inode *inode, struct file *file); |
399 | 402 | ||
400 | void __init | 403 | void __init |
@@ -567,6 +570,8 @@ static inline int | |||
567 | ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } | 570 | ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } |
568 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 571 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
569 | 572 | ||
573 | loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int whence); | ||
574 | |||
570 | /* totally disable ftrace - can not re-enable after this */ | 575 | /* totally disable ftrace - can not re-enable after this */ |
571 | void ftrace_kill(void); | 576 | void ftrace_kill(void); |
572 | 577 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 13a54d0bdfa8..34e00fb49bec 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/perf_event.h> | 8 | #include <linux/perf_event.h> |
9 | 9 | ||
10 | struct trace_array; | 10 | struct trace_array; |
11 | struct trace_buffer; | ||
11 | struct tracer; | 12 | struct tracer; |
12 | struct dentry; | 13 | struct dentry; |
13 | 14 | ||
@@ -38,6 +39,12 @@ const char *ftrace_print_symbols_seq_u64(struct trace_seq *p, | |||
38 | const char *ftrace_print_hex_seq(struct trace_seq *p, | 39 | const char *ftrace_print_hex_seq(struct trace_seq *p, |
39 | const unsigned char *buf, int len); | 40 | const unsigned char *buf, int len); |
40 | 41 | ||
42 | struct trace_iterator; | ||
43 | struct trace_event; | ||
44 | |||
45 | int ftrace_raw_output_prep(struct trace_iterator *iter, | ||
46 | struct trace_event *event); | ||
47 | |||
41 | /* | 48 | /* |
42 | * The trace entry - the most basic unit of tracing. This is what | 49 | * The trace entry - the most basic unit of tracing. This is what |
43 | * is printed in the end as a single line in the trace output, such as: | 50 | * is printed in the end as a single line in the trace output, such as: |
@@ -61,6 +68,7 @@ struct trace_entry { | |||
61 | struct trace_iterator { | 68 | struct trace_iterator { |
62 | struct trace_array *tr; | 69 | struct trace_array *tr; |
63 | struct tracer *trace; | 70 | struct tracer *trace; |
71 | struct trace_buffer *trace_buffer; | ||
64 | void *private; | 72 | void *private; |
65 | int cpu_file; | 73 | int cpu_file; |
66 | struct mutex mutex; | 74 | struct mutex mutex; |
@@ -95,8 +103,6 @@ enum trace_iter_flags { | |||
95 | }; | 103 | }; |
96 | 104 | ||
97 | 105 | ||
98 | struct trace_event; | ||
99 | |||
100 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, | 106 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, |
101 | int flags, struct trace_event *event); | 107 | int flags, struct trace_event *event); |
102 | 108 | ||
@@ -128,6 +134,13 @@ enum print_line_t { | |||
128 | void tracing_generic_entry_update(struct trace_entry *entry, | 134 | void tracing_generic_entry_update(struct trace_entry *entry, |
129 | unsigned long flags, | 135 | unsigned long flags, |
130 | int pc); | 136 | int pc); |
137 | struct ftrace_event_file; | ||
138 | |||
139 | struct ring_buffer_event * | ||
140 | trace_event_buffer_lock_reserve(struct ring_buffer **current_buffer, | ||
141 | struct ftrace_event_file *ftrace_file, | ||
142 | int type, unsigned long len, | ||
143 | unsigned long flags, int pc); | ||
131 | struct ring_buffer_event * | 144 | struct ring_buffer_event * |
132 | trace_current_buffer_lock_reserve(struct ring_buffer **current_buffer, | 145 | trace_current_buffer_lock_reserve(struct ring_buffer **current_buffer, |
133 | int type, unsigned long len, | 146 | int type, unsigned long len, |
@@ -182,53 +195,49 @@ extern int ftrace_event_reg(struct ftrace_event_call *event, | |||
182 | enum trace_reg type, void *data); | 195 | enum trace_reg type, void *data); |
183 | 196 | ||
184 | enum { | 197 | enum { |
185 | TRACE_EVENT_FL_ENABLED_BIT, | ||
186 | TRACE_EVENT_FL_FILTERED_BIT, | 198 | TRACE_EVENT_FL_FILTERED_BIT, |
187 | TRACE_EVENT_FL_RECORDED_CMD_BIT, | ||
188 | TRACE_EVENT_FL_CAP_ANY_BIT, | 199 | TRACE_EVENT_FL_CAP_ANY_BIT, |
189 | TRACE_EVENT_FL_NO_SET_FILTER_BIT, | 200 | TRACE_EVENT_FL_NO_SET_FILTER_BIT, |
190 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, | 201 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, |
202 | TRACE_EVENT_FL_WAS_ENABLED_BIT, | ||
191 | }; | 203 | }; |
192 | 204 | ||
205 | /* | ||
206 | * Event flags: | ||
207 | * FILTERED - The event has a filter attached | ||
208 | * CAP_ANY - Any user can enable for perf | ||
209 | * NO_SET_FILTER - Set when filter has error and is to be ignored | ||
210 | * IGNORE_ENABLE - For ftrace internal events, do not enable with debugfs file | ||
211 | * WAS_ENABLED - Set and stays set when an event was ever enabled | ||
212 | * (used for module unloading, if a module event is enabled, | ||
213 | * it is best to clear the buffers that used it). | ||
214 | */ | ||
193 | enum { | 215 | enum { |
194 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), | ||
195 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), | 216 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), |
196 | TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), | ||
197 | TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), | 217 | TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), |
198 | TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), | 218 | TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), |
199 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), | 219 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), |
220 | TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT), | ||
200 | }; | 221 | }; |
201 | 222 | ||
202 | struct ftrace_event_call { | 223 | struct ftrace_event_call { |
203 | struct list_head list; | 224 | struct list_head list; |
204 | struct ftrace_event_class *class; | 225 | struct ftrace_event_class *class; |
205 | char *name; | 226 | char *name; |
206 | struct dentry *dir; | ||
207 | struct trace_event event; | 227 | struct trace_event event; |
208 | const char *print_fmt; | 228 | const char *print_fmt; |
209 | struct event_filter *filter; | 229 | struct event_filter *filter; |
230 | struct list_head *files; | ||
210 | void *mod; | 231 | void *mod; |
211 | void *data; | 232 | void *data; |
212 | |||
213 | /* | 233 | /* |
214 | * 32 bit flags: | 234 | * bit 0: filter_active |
215 | * bit 1: enabled | 235 | * bit 1: allow trace by non root (cap any) |
216 | * bit 2: filter_active | 236 | * bit 2: failed to apply filter |
217 | * bit 3: enabled cmd record | 237 | * bit 3: ftrace internal event (do not enable) |
218 | * bit 4: allow trace by non root (cap any) | 238 | * bit 4: Event was enabled by module |
219 | * bit 5: failed to apply filter | ||
220 | * bit 6: ftrace internal event (do not enable) | ||
221 | * | ||
222 | * Changes to flags must hold the event_mutex. | ||
223 | * | ||
224 | * Note: Reads of flags do not hold the event_mutex since | ||
225 | * they occur in critical sections. But the way flags | ||
226 | * is currently used, these changes do no affect the code | ||
227 | * except that when a change is made, it may have a slight | ||
228 | * delay in propagating the changes to other CPUs due to | ||
229 | * caching and such. | ||
230 | */ | 239 | */ |
231 | unsigned int flags; | 240 | int flags; /* static flags of different events */ |
232 | 241 | ||
233 | #ifdef CONFIG_PERF_EVENTS | 242 | #ifdef CONFIG_PERF_EVENTS |
234 | int perf_refcount; | 243 | int perf_refcount; |
@@ -236,6 +245,56 @@ struct ftrace_event_call { | |||
236 | #endif | 245 | #endif |
237 | }; | 246 | }; |
238 | 247 | ||
248 | struct trace_array; | ||
249 | struct ftrace_subsystem_dir; | ||
250 | |||
251 | enum { | ||
252 | FTRACE_EVENT_FL_ENABLED_BIT, | ||
253 | FTRACE_EVENT_FL_RECORDED_CMD_BIT, | ||
254 | FTRACE_EVENT_FL_SOFT_MODE_BIT, | ||
255 | FTRACE_EVENT_FL_SOFT_DISABLED_BIT, | ||
256 | }; | ||
257 | |||
258 | /* | ||
259 | * Ftrace event file flags: | ||
260 | * ENABLED - The event is enabled | ||
261 | * RECORDED_CMD - The comms should be recorded at sched_switch | ||
262 | * SOFT_MODE - The event is enabled/disabled by SOFT_DISABLED | ||
263 | * SOFT_DISABLED - When set, do not trace the event (even though its | ||
264 | * tracepoint may be enabled) | ||
265 | */ | ||
266 | enum { | ||
267 | FTRACE_EVENT_FL_ENABLED = (1 << FTRACE_EVENT_FL_ENABLED_BIT), | ||
268 | FTRACE_EVENT_FL_RECORDED_CMD = (1 << FTRACE_EVENT_FL_RECORDED_CMD_BIT), | ||
269 | FTRACE_EVENT_FL_SOFT_MODE = (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT), | ||
270 | FTRACE_EVENT_FL_SOFT_DISABLED = (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT), | ||
271 | }; | ||
272 | |||
273 | struct ftrace_event_file { | ||
274 | struct list_head list; | ||
275 | struct ftrace_event_call *event_call; | ||
276 | struct dentry *dir; | ||
277 | struct trace_array *tr; | ||
278 | struct ftrace_subsystem_dir *system; | ||
279 | |||
280 | /* | ||
281 | * 32 bit flags: | ||
282 | * bit 0: enabled | ||
283 | * bit 1: enabled cmd record | ||
284 | * bit 2: enable/disable with the soft disable bit | ||
285 | * bit 3: soft disabled | ||
286 | * | ||
287 | * Note: The bits must be set atomically to prevent races | ||
288 | * from other writers. Reads of flags do not need to be in | ||
289 | * sync as they occur in critical sections. But the way flags | ||
290 | * is currently used, these changes do not affect the code | ||
291 | * except that when a change is made, it may have a slight | ||
292 | * delay in propagating the changes to other CPUs due to | ||
293 | * caching and such. Which is mostly OK ;-) | ||
294 | */ | ||
295 | unsigned long flags; | ||
296 | }; | ||
297 | |||
239 | #define __TRACE_EVENT_FLAGS(name, value) \ | 298 | #define __TRACE_EVENT_FLAGS(name, value) \ |
240 | static int __init trace_init_flags_##name(void) \ | 299 | static int __init trace_init_flags_##name(void) \ |
241 | { \ | 300 | { \ |
@@ -274,7 +333,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type, | |||
274 | extern int trace_add_event_call(struct ftrace_event_call *call); | 333 | extern int trace_add_event_call(struct ftrace_event_call *call); |
275 | extern void trace_remove_event_call(struct ftrace_event_call *call); | 334 | extern void trace_remove_event_call(struct ftrace_event_call *call); |
276 | 335 | ||
277 | #define is_signed_type(type) (((type)(-1)) < (type)0) | 336 | #define is_signed_type(type) (((type)(-1)) < (type)1) |
278 | 337 | ||
279 | int trace_set_clr_event(const char *system, const char *event, int set); | 338 | int trace_set_clr_event(const char *system, const char *event, int set); |
280 | 339 | ||
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index dd7c569aacad..661d374aeb2d 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h | |||
@@ -29,6 +29,10 @@ | |||
29 | 29 | ||
30 | #ifndef __GENALLOC_H__ | 30 | #ifndef __GENALLOC_H__ |
31 | #define __GENALLOC_H__ | 31 | #define __GENALLOC_H__ |
32 | |||
33 | struct device; | ||
34 | struct device_node; | ||
35 | |||
32 | /** | 36 | /** |
33 | * Allocation callback function type definition | 37 | * Allocation callback function type definition |
34 | * @map: Pointer to bitmap | 38 | * @map: Pointer to bitmap |
@@ -105,4 +109,18 @@ extern unsigned long gen_pool_first_fit(unsigned long *map, unsigned long size, | |||
105 | extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, | 109 | extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, |
106 | unsigned long start, unsigned int nr, void *data); | 110 | unsigned long start, unsigned int nr, void *data); |
107 | 111 | ||
112 | extern struct gen_pool *devm_gen_pool_create(struct device *dev, | ||
113 | int min_alloc_order, int nid); | ||
114 | extern struct gen_pool *dev_get_gen_pool(struct device *dev); | ||
115 | |||
116 | #ifdef CONFIG_OF | ||
117 | extern struct gen_pool *of_get_named_gen_pool(struct device_node *np, | ||
118 | const char *propname, int index); | ||
119 | #else | ||
120 | static inline struct gen_pool *of_get_named_gen_pool(struct device_node *np, | ||
121 | const char *propname, int index) | ||
122 | { | ||
123 | return NULL; | ||
124 | } | ||
125 | #endif | ||
108 | #endif /* __GENALLOC_H__ */ | 126 | #endif /* __GENALLOC_H__ */ |
diff --git a/include/linux/hid-debug.h b/include/linux/hid-debug.h index 53744fa1c8b7..8663f216c563 100644 --- a/include/linux/hid-debug.h +++ b/include/linux/hid-debug.h | |||
@@ -22,11 +22,12 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define HID_DEBUG_BUFSIZE 512 | ||
26 | |||
27 | #ifdef CONFIG_DEBUG_FS | 25 | #ifdef CONFIG_DEBUG_FS |
28 | 26 | ||
27 | #define HID_DEBUG_BUFSIZE 512 | ||
28 | |||
29 | void hid_dump_input(struct hid_device *, struct hid_usage *, __s32); | 29 | void hid_dump_input(struct hid_device *, struct hid_usage *, __s32); |
30 | void hid_dump_report(struct hid_device *, int , u8 *, int); | ||
30 | void hid_dump_device(struct hid_device *, struct seq_file *); | 31 | void hid_dump_device(struct hid_device *, struct seq_file *); |
31 | void hid_dump_field(struct hid_field *, int, struct seq_file *); | 32 | void hid_dump_field(struct hid_field *, int, struct seq_file *); |
32 | char *hid_resolv_usage(unsigned, struct seq_file *); | 33 | char *hid_resolv_usage(unsigned, struct seq_file *); |
@@ -50,6 +51,7 @@ struct hid_debug_list { | |||
50 | #else | 51 | #else |
51 | 52 | ||
52 | #define hid_dump_input(a,b,c) do { } while (0) | 53 | #define hid_dump_input(a,b,c) do { } while (0) |
54 | #define hid_dump_report(a,b,c,d) do { } while (0) | ||
53 | #define hid_dump_device(a,b) do { } while (0) | 55 | #define hid_dump_device(a,b) do { } while (0) |
54 | #define hid_dump_field(a,b,c) do { } while (0) | 56 | #define hid_dump_field(a,b,c) do { } while (0) |
55 | #define hid_resolv_usage(a,b) do { } while (0) | 57 | #define hid_resolv_usage(a,b) do { } while (0) |
diff --git a/include/linux/hid.h b/include/linux/hid.h index e14b465b1146..af1b86d46f6e 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -282,6 +282,7 @@ struct hid_item { | |||
282 | #define HID_QUIRK_BADPAD 0x00000020 | 282 | #define HID_QUIRK_BADPAD 0x00000020 |
283 | #define HID_QUIRK_MULTI_INPUT 0x00000040 | 283 | #define HID_QUIRK_MULTI_INPUT 0x00000040 |
284 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 | 284 | #define HID_QUIRK_HIDINPUT_FORCE 0x00000080 |
285 | #define HID_QUIRK_NO_EMPTY_INPUT 0x00000100 | ||
285 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 | 286 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 |
286 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 | 287 | #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 |
287 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 | 288 | #define HID_QUIRK_NO_INIT_REPORTS 0x20000000 |
@@ -456,7 +457,8 @@ struct hid_device { /* device report descriptor */ | |||
456 | unsigned country; /* HID country */ | 457 | unsigned country; /* HID country */ |
457 | struct hid_report_enum report_enum[HID_REPORT_TYPES]; | 458 | struct hid_report_enum report_enum[HID_REPORT_TYPES]; |
458 | 459 | ||
459 | struct semaphore driver_lock; /* protects the current driver */ | 460 | struct semaphore driver_lock; /* protects the current driver, except during input */ |
461 | struct semaphore driver_input_lock; /* protects the current driver */ | ||
460 | struct device dev; /* device */ | 462 | struct device dev; /* device */ |
461 | struct hid_driver *driver; | 463 | struct hid_driver *driver; |
462 | struct hid_ll_driver *ll_driver; | 464 | struct hid_ll_driver *ll_driver; |
@@ -477,6 +479,7 @@ struct hid_device { /* device report descriptor */ | |||
477 | unsigned int status; /* see STAT flags above */ | 479 | unsigned int status; /* see STAT flags above */ |
478 | unsigned claimed; /* Claimed by hidinput, hiddev? */ | 480 | unsigned claimed; /* Claimed by hidinput, hiddev? */ |
479 | unsigned quirks; /* Various quirks the device can pull on us */ | 481 | unsigned quirks; /* Various quirks the device can pull on us */ |
482 | bool io_started; /* Protected by driver_lock. If IO has started */ | ||
480 | 483 | ||
481 | struct list_head inputs; /* The list of inputs */ | 484 | struct list_head inputs; /* The list of inputs */ |
482 | void *hiddev; /* The hiddev structure */ | 485 | void *hiddev; /* The hiddev structure */ |
@@ -512,6 +515,7 @@ struct hid_device { /* device report descriptor */ | |||
512 | struct dentry *debug_rdesc; | 515 | struct dentry *debug_rdesc; |
513 | struct dentry *debug_events; | 516 | struct dentry *debug_events; |
514 | struct list_head debug_list; | 517 | struct list_head debug_list; |
518 | struct mutex debug_list_lock; | ||
515 | wait_queue_head_t debug_wait; | 519 | wait_queue_head_t debug_wait; |
516 | }; | 520 | }; |
517 | 521 | ||
@@ -599,6 +603,10 @@ struct hid_usage_id { | |||
599 | * @resume: invoked on resume if device was not reset (NULL means nop) | 603 | * @resume: invoked on resume if device was not reset (NULL means nop) |
600 | * @reset_resume: invoked on resume if device was reset (NULL means nop) | 604 | * @reset_resume: invoked on resume if device was reset (NULL means nop) |
601 | * | 605 | * |
606 | * probe should return -errno on error, or 0 on success. During probe, | ||
607 | * input will not be passed to raw_event unless hid_device_io_start is | ||
608 | * called. | ||
609 | * | ||
602 | * raw_event and event should return 0 on no action performed, 1 when no | 610 | * raw_event and event should return 0 on no action performed, 1 when no |
603 | * further processing should be done and negative on error | 611 | * further processing should be done and negative on error |
604 | * | 612 | * |
@@ -662,6 +670,9 @@ struct hid_driver { | |||
662 | * @hidinput_input_event: event input event (e.g. ff or leds) | 670 | * @hidinput_input_event: event input event (e.g. ff or leds) |
663 | * @parse: this method is called only once to parse the device data, | 671 | * @parse: this method is called only once to parse the device data, |
664 | * shouldn't allocate anything to not leak memory | 672 | * shouldn't allocate anything to not leak memory |
673 | * @request: send report request to device (e.g. feature report) | ||
674 | * @wait: wait for buffered io to complete (send/recv reports) | ||
675 | * @idle: send idle request to device | ||
665 | */ | 676 | */ |
666 | struct hid_ll_driver { | 677 | struct hid_ll_driver { |
667 | int (*start)(struct hid_device *hdev); | 678 | int (*start)(struct hid_device *hdev); |
@@ -676,6 +687,13 @@ struct hid_ll_driver { | |||
676 | unsigned int code, int value); | 687 | unsigned int code, int value); |
677 | 688 | ||
678 | int (*parse)(struct hid_device *hdev); | 689 | int (*parse)(struct hid_device *hdev); |
690 | |||
691 | void (*request)(struct hid_device *hdev, | ||
692 | struct hid_report *report, int reqtype); | ||
693 | |||
694 | int (*wait)(struct hid_device *hdev); | ||
695 | int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); | ||
696 | |||
679 | }; | 697 | }; |
680 | 698 | ||
681 | #define PM_HINT_FULLON 1<<5 | 699 | #define PM_HINT_FULLON 1<<5 |
@@ -738,6 +756,44 @@ const struct hid_device_id *hid_match_id(struct hid_device *hdev, | |||
738 | s32 hid_snto32(__u32 value, unsigned n); | 756 | s32 hid_snto32(__u32 value, unsigned n); |
739 | 757 | ||
740 | /** | 758 | /** |
759 | * hid_device_io_start - enable HID input during probe, remove | ||
760 | * | ||
761 | * @hid - the device | ||
762 | * | ||
763 | * This should only be called during probe or remove and only be | ||
764 | * called by the thread calling probe or remove. It will allow | ||
765 | * incoming packets to be delivered to the driver. | ||
766 | */ | ||
767 | static inline void hid_device_io_start(struct hid_device *hid) { | ||
768 | if (hid->io_started) { | ||
769 | dev_warn(&hid->dev, "io already started"); | ||
770 | return; | ||
771 | } | ||
772 | hid->io_started = true; | ||
773 | up(&hid->driver_input_lock); | ||
774 | } | ||
775 | |||
776 | /** | ||
777 | * hid_device_io_stop - disable HID input during probe, remove | ||
778 | * | ||
779 | * @hid - the device | ||
780 | * | ||
781 | * Should only be called after hid_device_io_start. It will prevent | ||
782 | * incoming packets from going to the driver for the duration of | ||
783 | * probe, remove. If called during probe, packets will still go to the | ||
784 | * driver after probe is complete. This function should only be called | ||
785 | * by the thread calling probe or remove. | ||
786 | */ | ||
787 | static inline void hid_device_io_stop(struct hid_device *hid) { | ||
788 | if (!hid->io_started) { | ||
789 | dev_warn(&hid->dev, "io already stopped"); | ||
790 | return; | ||
791 | } | ||
792 | hid->io_started = false; | ||
793 | down(&hid->driver_input_lock); | ||
794 | } | ||
795 | |||
796 | /** | ||
741 | * hid_map_usage - map usage input bits | 797 | * hid_map_usage - map usage input bits |
742 | * | 798 | * |
743 | * @hidinput: hidinput which we are interested in | 799 | * @hidinput: hidinput which we are interested in |
@@ -883,6 +939,49 @@ static inline int hid_hw_power(struct hid_device *hdev, int level) | |||
883 | return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; | 939 | return hdev->ll_driver->power ? hdev->ll_driver->power(hdev, level) : 0; |
884 | } | 940 | } |
885 | 941 | ||
942 | |||
943 | /** | ||
944 | * hid_hw_request - send report request to device | ||
945 | * | ||
946 | * @hdev: hid device | ||
947 | * @report: report to send | ||
948 | * @reqtype: hid request type | ||
949 | */ | ||
950 | static inline void hid_hw_request(struct hid_device *hdev, | ||
951 | struct hid_report *report, int reqtype) | ||
952 | { | ||
953 | if (hdev->ll_driver->request) | ||
954 | hdev->ll_driver->request(hdev, report, reqtype); | ||
955 | } | ||
956 | |||
957 | /** | ||
958 | * hid_hw_idle - send idle request to device | ||
959 | * | ||
960 | * @hdev: hid device | ||
961 | * @report: report to control | ||
962 | * @idle: idle state | ||
963 | * @reqtype: hid request type | ||
964 | */ | ||
965 | static inline int hid_hw_idle(struct hid_device *hdev, int report, int idle, | ||
966 | int reqtype) | ||
967 | { | ||
968 | if (hdev->ll_driver->idle) | ||
969 | return hdev->ll_driver->idle(hdev, report, idle, reqtype); | ||
970 | |||
971 | return 0; | ||
972 | } | ||
973 | |||
974 | /** | ||
975 | * hid_hw_wait - wait for buffered io to complete | ||
976 | * | ||
977 | * @hdev: hid device | ||
978 | */ | ||
979 | static inline void hid_hw_wait(struct hid_device *hdev) | ||
980 | { | ||
981 | if (hdev->ll_driver->wait) | ||
982 | hdev->ll_driver->wait(hdev); | ||
983 | } | ||
984 | |||
886 | int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | 985 | int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, |
887 | int interrupt); | 986 | int interrupt); |
888 | 987 | ||
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index cc07d2777bbe..d19a5c2d2270 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -157,6 +157,7 @@ enum hrtimer_base_type { | |||
157 | HRTIMER_BASE_MONOTONIC, | 157 | HRTIMER_BASE_MONOTONIC, |
158 | HRTIMER_BASE_REALTIME, | 158 | HRTIMER_BASE_REALTIME, |
159 | HRTIMER_BASE_BOOTTIME, | 159 | HRTIMER_BASE_BOOTTIME, |
160 | HRTIMER_BASE_TAI, | ||
160 | HRTIMER_MAX_CLOCK_BASES, | 161 | HRTIMER_MAX_CLOCK_BASES, |
161 | }; | 162 | }; |
162 | 163 | ||
@@ -327,7 +328,9 @@ extern ktime_t ktime_get(void); | |||
327 | extern ktime_t ktime_get_real(void); | 328 | extern ktime_t ktime_get_real(void); |
328 | extern ktime_t ktime_get_boottime(void); | 329 | extern ktime_t ktime_get_boottime(void); |
329 | extern ktime_t ktime_get_monotonic_offset(void); | 330 | extern ktime_t ktime_get_monotonic_offset(void); |
330 | extern ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot); | 331 | extern ktime_t ktime_get_clocktai(void); |
332 | extern ktime_t ktime_get_update_offsets(ktime_t *offs_real, ktime_t *offs_boot, | ||
333 | ktime_t *offs_tai); | ||
331 | 334 | ||
332 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 335 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
333 | 336 | ||
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index ee1c244a62a1..528454c2caa9 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -99,7 +99,11 @@ extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
99 | extern int handle_pte_fault(struct mm_struct *mm, | 99 | extern int handle_pte_fault(struct mm_struct *mm, |
100 | struct vm_area_struct *vma, unsigned long address, | 100 | struct vm_area_struct *vma, unsigned long address, |
101 | pte_t *pte, pmd_t *pmd, unsigned int flags); | 101 | pte_t *pte, pmd_t *pmd, unsigned int flags); |
102 | extern int split_huge_page(struct page *page); | 102 | extern int split_huge_page_to_list(struct page *page, struct list_head *list); |
103 | static inline int split_huge_page(struct page *page) | ||
104 | { | ||
105 | return split_huge_page_to_list(page, NULL); | ||
106 | } | ||
103 | extern void __split_huge_page_pmd(struct vm_area_struct *vma, | 107 | extern void __split_huge_page_pmd(struct vm_area_struct *vma, |
104 | unsigned long address, pmd_t *pmd); | 108 | unsigned long address, pmd_t *pmd); |
105 | #define split_huge_page_pmd(__vma, __address, __pmd) \ | 109 | #define split_huge_page_pmd(__vma, __address, __pmd) \ |
@@ -186,6 +190,11 @@ extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vm | |||
186 | #define transparent_hugepage_enabled(__vma) 0 | 190 | #define transparent_hugepage_enabled(__vma) 0 |
187 | 191 | ||
188 | #define transparent_hugepage_flags 0UL | 192 | #define transparent_hugepage_flags 0UL |
193 | static inline int | ||
194 | split_huge_page_to_list(struct page *page, struct list_head *list) | ||
195 | { | ||
196 | return 0; | ||
197 | } | ||
189 | static inline int split_huge_page(struct page *page) | 198 | static inline int split_huge_page(struct page *page) |
190 | { | 199 | { |
191 | return 0; | 200 | return 0; |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 16e4e9a643fb..3a62df310f2e 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -58,6 +58,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, | |||
58 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); | 58 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); |
59 | void hugetlb_report_meminfo(struct seq_file *); | 59 | void hugetlb_report_meminfo(struct seq_file *); |
60 | int hugetlb_report_node_meminfo(int, char *); | 60 | int hugetlb_report_node_meminfo(int, char *); |
61 | void hugetlb_show_meminfo(void); | ||
61 | unsigned long hugetlb_total_pages(void); | 62 | unsigned long hugetlb_total_pages(void); |
62 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 63 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
63 | unsigned long address, unsigned int flags); | 64 | unsigned long address, unsigned int flags); |
@@ -114,6 +115,9 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
114 | { | 115 | { |
115 | } | 116 | } |
116 | #define hugetlb_report_node_meminfo(n, buf) 0 | 117 | #define hugetlb_report_node_meminfo(n, buf) 0 |
118 | static inline void hugetlb_show_meminfo(void) | ||
119 | { | ||
120 | } | ||
117 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 121 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
118 | #define follow_huge_pud(mm, addr, pud, write) NULL | 122 | #define follow_huge_pud(mm, addr, pud, write) NULL |
119 | #define prepare_hugepage_range(file, addr, len) (-EINVAL) | 123 | #define prepare_hugepage_range(file, addr, len) (-EINVAL) |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index df77ba9a8166..c2559847d7ee 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -27,6 +27,63 @@ | |||
27 | 27 | ||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | 29 | ||
30 | |||
31 | /* | ||
32 | * Implementation of host controlled snapshot of the guest. | ||
33 | */ | ||
34 | |||
35 | #define VSS_OP_REGISTER 128 | ||
36 | |||
37 | enum hv_vss_op { | ||
38 | VSS_OP_CREATE = 0, | ||
39 | VSS_OP_DELETE, | ||
40 | VSS_OP_HOT_BACKUP, | ||
41 | VSS_OP_GET_DM_INFO, | ||
42 | VSS_OP_BU_COMPLETE, | ||
43 | /* | ||
44 | * Following operations are only supported with IC version >= 5.0 | ||
45 | */ | ||
46 | VSS_OP_FREEZE, /* Freeze the file systems in the VM */ | ||
47 | VSS_OP_THAW, /* Unfreeze the file systems */ | ||
48 | VSS_OP_AUTO_RECOVER, | ||
49 | VSS_OP_COUNT /* Number of operations, must be last */ | ||
50 | }; | ||
51 | |||
52 | |||
53 | /* | ||
54 | * Header for all VSS messages. | ||
55 | */ | ||
56 | struct hv_vss_hdr { | ||
57 | __u8 operation; | ||
58 | __u8 reserved[7]; | ||
59 | } __attribute__((packed)); | ||
60 | |||
61 | |||
62 | /* | ||
63 | * Flag values for the hv_vss_check_feature. Linux supports only | ||
64 | * one value. | ||
65 | */ | ||
66 | #define VSS_HBU_NO_AUTO_RECOVERY 0x00000005 | ||
67 | |||
68 | struct hv_vss_check_feature { | ||
69 | __u32 flags; | ||
70 | } __attribute__((packed)); | ||
71 | |||
72 | struct hv_vss_check_dm_info { | ||
73 | __u32 flags; | ||
74 | } __attribute__((packed)); | ||
75 | |||
76 | struct hv_vss_msg { | ||
77 | union { | ||
78 | struct hv_vss_hdr vss_hdr; | ||
79 | int error; | ||
80 | }; | ||
81 | union { | ||
82 | struct hv_vss_check_feature vss_cf; | ||
83 | struct hv_vss_check_dm_info dm_info; | ||
84 | }; | ||
85 | } __attribute__((packed)); | ||
86 | |||
30 | /* | 87 | /* |
31 | * An implementation of HyperV key value pair (KVP) functionality for Linux. | 88 | * An implementation of HyperV key value pair (KVP) functionality for Linux. |
32 | * | 89 | * |
@@ -1253,6 +1310,25 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver); | |||
1253 | } | 1310 | } |
1254 | 1311 | ||
1255 | /* | 1312 | /* |
1313 | * VSS (Backup/Restore) GUID | ||
1314 | */ | ||
1315 | #define HV_VSS_GUID \ | ||
1316 | .guid = { \ | ||
1317 | 0x29, 0x2e, 0xfa, 0x35, 0x23, 0xea, 0x36, 0x42, \ | ||
1318 | 0x96, 0xae, 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40 \ | ||
1319 | } | ||
1320 | /* | ||
1321 | * Synthetic Video GUID | ||
1322 | * {DA0A7802-E377-4aac-8E77-0558EB1073F8} | ||
1323 | */ | ||
1324 | #define HV_SYNTHVID_GUID \ | ||
1325 | .guid = { \ | ||
1326 | 0x02, 0x78, 0x0a, 0xda, 0x77, 0xe3, 0xac, 0x4a, \ | ||
1327 | 0x8e, 0x77, 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8 \ | ||
1328 | } | ||
1329 | |||
1330 | |||
1331 | /* | ||
1256 | * Common header for Hyper-V ICs | 1332 | * Common header for Hyper-V ICs |
1257 | */ | 1333 | */ |
1258 | 1334 | ||
@@ -1356,6 +1432,10 @@ int hv_kvp_init(struct hv_util_service *); | |||
1356 | void hv_kvp_deinit(void); | 1432 | void hv_kvp_deinit(void); |
1357 | void hv_kvp_onchannelcallback(void *); | 1433 | void hv_kvp_onchannelcallback(void *); |
1358 | 1434 | ||
1435 | int hv_vss_init(struct hv_util_service *); | ||
1436 | void hv_vss_deinit(void); | ||
1437 | void hv_vss_onchannelcallback(void *); | ||
1438 | |||
1359 | /* | 1439 | /* |
1360 | * Negotiated version with the Host. | 1440 | * Negotiated version with the Host. |
1361 | */ | 1441 | */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 2640c7e99e51..a470ac3ef49d 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -42,6 +42,7 @@ struct idr { | |||
42 | struct idr_layer *id_free; | 42 | struct idr_layer *id_free; |
43 | int layers; /* only valid w/o concurrent changes */ | 43 | int layers; /* only valid w/o concurrent changes */ |
44 | int id_free_cnt; | 44 | int id_free_cnt; |
45 | int cur; /* current pos for cyclic allocation */ | ||
45 | spinlock_t lock; | 46 | spinlock_t lock; |
46 | }; | 47 | }; |
47 | 48 | ||
@@ -75,6 +76,7 @@ struct idr { | |||
75 | void *idr_find_slowpath(struct idr *idp, int id); | 76 | void *idr_find_slowpath(struct idr *idp, int id); |
76 | void idr_preload(gfp_t gfp_mask); | 77 | void idr_preload(gfp_t gfp_mask); |
77 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); | 78 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); |
79 | int idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask); | ||
78 | int idr_for_each(struct idr *idp, | 80 | int idr_for_each(struct idr *idp, |
79 | int (*fn)(int id, void *p, void *data), void *data); | 81 | int (*fn)(int id, void *p, void *data), void *data); |
80 | void *idr_get_next(struct idr *idp, int *nextid); | 82 | void *idr_get_next(struct idr *idp, int *nextid); |
diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h index 2e4eab9868a3..e7fdec4db9da 100644 --- a/include/linux/iio/adc/ad_sigma_delta.h +++ b/include/linux/iio/adc/ad_sigma_delta.h | |||
@@ -133,9 +133,9 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); | |||
133 | .channel2 = (_channel2), \ | 133 | .channel2 = (_channel2), \ |
134 | .address = (_address), \ | 134 | .address = (_address), \ |
135 | .extend_name = (_extend_name), \ | 135 | .extend_name = (_extend_name), \ |
136 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 136 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
137 | IIO_CHAN_INFO_SCALE_SHARED_BIT | \ | 137 | BIT(IIO_CHAN_INFO_OFFSET), \ |
138 | IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, \ | 138 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ |
139 | .scan_index = (_si), \ | 139 | .scan_index = (_si), \ |
140 | .scan_type = { \ | 140 | .scan_type = { \ |
141 | .sign = 'u', \ | 141 | .sign = 'u', \ |
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 8bd12be0b02f..172c5b23cb84 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/irqreturn.h> | 16 | #include <linux/irqreturn.h> |
17 | #include <linux/iio/trigger.h> | 17 | #include <linux/iio/trigger.h> |
18 | #include <linux/bitops.h> | ||
18 | 19 | ||
19 | #define ST_SENSORS_TX_MAX_LENGTH 2 | 20 | #define ST_SENSORS_TX_MAX_LENGTH 2 |
20 | #define ST_SENSORS_RX_MAX_LENGTH 6 | 21 | #define ST_SENSORS_RX_MAX_LENGTH 6 |
@@ -45,8 +46,8 @@ | |||
45 | { \ | 46 | { \ |
46 | .type = device_type, \ | 47 | .type = device_type, \ |
47 | .modified = 1, \ | 48 | .modified = 1, \ |
48 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 49 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
49 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ | 50 | BIT(IIO_CHAN_INFO_SCALE), \ |
50 | .scan_index = index, \ | 51 | .scan_index = index, \ |
51 | .channel2 = mod, \ | 52 | .channel2 = mod, \ |
52 | .address = addr, \ | 53 | .address = addr, \ |
diff --git a/include/linux/iio/gyro/itg3200.h b/include/linux/iio/gyro/itg3200.h index c53f16914b77..2a820850f284 100644 --- a/include/linux/iio/gyro/itg3200.h +++ b/include/linux/iio/gyro/itg3200.h | |||
@@ -149,6 +149,6 @@ static inline void itg3200_buffer_unconfigure(struct iio_dev *indio_dev) | |||
149 | { | 149 | { |
150 | } | 150 | } |
151 | 151 | ||
152 | #endif /* CONFIG_IIO_RING_BUFFER */ | 152 | #endif /* CONFIG_IIO_BUFFER */ |
153 | 153 | ||
154 | #endif /* ITG3200_H_ */ | 154 | #endif /* ITG3200_H_ */ |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index da8c776ba0bd..8d171f427632 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
@@ -38,76 +38,6 @@ enum iio_chan_info_enum { | |||
38 | IIO_CHAN_INFO_HYSTERESIS, | 38 | IIO_CHAN_INFO_HYSTERESIS, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | #define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2) | ||
42 | #define IIO_CHAN_INFO_SEPARATE_BIT(type) BIT(type*2 + 1) | ||
43 | #define IIO_CHAN_INFO_BITS(type) (IIO_CHAN_INFO_SHARED_BIT(type) | \ | ||
44 | IIO_CHAN_INFO_SEPARATE_BIT(type)) | ||
45 | |||
46 | #define IIO_CHAN_INFO_RAW_SEPARATE_BIT \ | ||
47 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_RAW) | ||
48 | #define IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT \ | ||
49 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PROCESSED) | ||
50 | #define IIO_CHAN_INFO_SCALE_SEPARATE_BIT \ | ||
51 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SCALE) | ||
52 | #define IIO_CHAN_INFO_SCALE_SHARED_BIT \ | ||
53 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SCALE) | ||
54 | #define IIO_CHAN_INFO_OFFSET_SEPARATE_BIT \ | ||
55 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_OFFSET) | ||
56 | #define IIO_CHAN_INFO_OFFSET_SHARED_BIT \ | ||
57 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_OFFSET) | ||
58 | #define IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT \ | ||
59 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBSCALE) | ||
60 | #define IIO_CHAN_INFO_CALIBSCALE_SHARED_BIT \ | ||
61 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBSCALE) | ||
62 | #define IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT \ | ||
63 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBBIAS) | ||
64 | #define IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT \ | ||
65 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBBIAS) | ||
66 | #define IIO_CHAN_INFO_PEAK_SEPARATE_BIT \ | ||
67 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAK) | ||
68 | #define IIO_CHAN_INFO_PEAK_SHARED_BIT \ | ||
69 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAK) | ||
70 | #define IIO_CHAN_INFO_PEAKSCALE_SEPARATE_BIT \ | ||
71 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAKSCALE) | ||
72 | #define IIO_CHAN_INFO_PEAKSCALE_SHARED_BIT \ | ||
73 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAKSCALE) | ||
74 | #define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SEPARATE_BIT \ | ||
75 | IIO_CHAN_INFO_SEPARATE_BIT( \ | ||
76 | IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW) | ||
77 | #define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SHARED_BIT \ | ||
78 | IIO_CHAN_INFO_SHARED_BIT( \ | ||
79 | IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW) | ||
80 | #define IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT \ | ||
81 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_AVERAGE_RAW) | ||
82 | #define IIO_CHAN_INFO_AVERAGE_RAW_SHARED_BIT \ | ||
83 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_AVERAGE_RAW) | ||
84 | #define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT \ | ||
85 | IIO_CHAN_INFO_SHARED_BIT( \ | ||
86 | IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY) | ||
87 | #define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT \ | ||
88 | IIO_CHAN_INFO_SEPARATE_BIT( \ | ||
89 | IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY) | ||
90 | #define IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT \ | ||
91 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SAMP_FREQ) | ||
92 | #define IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT \ | ||
93 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SAMP_FREQ) | ||
94 | #define IIO_CHAN_INFO_FREQUENCY_SEPARATE_BIT \ | ||
95 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_FREQUENCY) | ||
96 | #define IIO_CHAN_INFO_FREQUENCY_SHARED_BIT \ | ||
97 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_FREQUENCY) | ||
98 | #define IIO_CHAN_INFO_PHASE_SEPARATE_BIT \ | ||
99 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PHASE) | ||
100 | #define IIO_CHAN_INFO_PHASE_SHARED_BIT \ | ||
101 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PHASE) | ||
102 | #define IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT \ | ||
103 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HARDWAREGAIN) | ||
104 | #define IIO_CHAN_INFO_HARDWAREGAIN_SHARED_BIT \ | ||
105 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HARDWAREGAIN) | ||
106 | #define IIO_CHAN_INFO_HYSTERESIS_SEPARATE_BIT \ | ||
107 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HYSTERESIS) | ||
108 | #define IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT \ | ||
109 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HYSTERESIS) | ||
110 | |||
111 | enum iio_endian { | 41 | enum iio_endian { |
112 | IIO_CPU, | 42 | IIO_CPU, |
113 | IIO_BE, | 43 | IIO_BE, |
@@ -218,6 +148,10 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev, | |||
218 | * endianness: little or big endian | 148 | * endianness: little or big endian |
219 | * @info_mask: What information is to be exported about this channel. | 149 | * @info_mask: What information is to be exported about this channel. |
220 | * This includes calibbias, scale etc. | 150 | * This includes calibbias, scale etc. |
151 | * @info_mask_separate: What information is to be exported that is specific to | ||
152 | * this channel. | ||
153 | * @info_mask_shared_by_type: What information is to be exported that is shared | ||
154 | * by all channels of the same type. | ||
221 | * @event_mask: What events can this channel produce. | 155 | * @event_mask: What events can this channel produce. |
222 | * @ext_info: Array of extended info attributes for this channel. | 156 | * @ext_info: Array of extended info attributes for this channel. |
223 | * The array is NULL terminated, the last element should | 157 | * The array is NULL terminated, the last element should |
@@ -253,6 +187,8 @@ struct iio_chan_spec { | |||
253 | enum iio_endian endianness; | 187 | enum iio_endian endianness; |
254 | } scan_type; | 188 | } scan_type; |
255 | long info_mask; | 189 | long info_mask; |
190 | long info_mask_separate; | ||
191 | long info_mask_shared_by_type; | ||
256 | long event_mask; | 192 | long event_mask; |
257 | const struct iio_chan_spec_ext_info *ext_info; | 193 | const struct iio_chan_spec_ext_info *ext_info; |
258 | const char *extend_name; | 194 | const char *extend_name; |
@@ -275,7 +211,8 @@ struct iio_chan_spec { | |||
275 | static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, | 211 | static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, |
276 | enum iio_chan_info_enum type) | 212 | enum iio_chan_info_enum type) |
277 | { | 213 | { |
278 | return chan->info_mask & IIO_CHAN_INFO_BITS(type); | 214 | return (chan->info_mask_separate & type) | |
215 | (chan->info_mask_shared_by_type & type); | ||
279 | } | 216 | } |
280 | 217 | ||
281 | #define IIO_ST(si, rb, sb, sh) \ | 218 | #define IIO_ST(si, rb, sb, sh) \ |
diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h index ff781dca2e9a..b665dc7f017b 100644 --- a/include/linux/iio/imu/adis.h +++ b/include/linux/iio/imu/adis.h | |||
@@ -162,8 +162,8 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
162 | .indexed = 1, \ | 162 | .indexed = 1, \ |
163 | .channel = (chan), \ | 163 | .channel = (chan), \ |
164 | .extend_name = name, \ | 164 | .extend_name = name, \ |
165 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 165 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
166 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ | 166 | BIT(IIO_CHAN_INFO_SCALE), \ |
167 | .address = (addr), \ | 167 | .address = (addr), \ |
168 | .scan_index = (si), \ | 168 | .scan_index = (si), \ |
169 | .scan_type = { \ | 169 | .scan_type = { \ |
@@ -184,9 +184,9 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
184 | .type = IIO_TEMP, \ | 184 | .type = IIO_TEMP, \ |
185 | .indexed = 1, \ | 185 | .indexed = 1, \ |
186 | .channel = 0, \ | 186 | .channel = 0, \ |
187 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 187 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
188 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \ | 188 | BIT(IIO_CHAN_INFO_SCALE) | \ |
189 | IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, \ | 189 | BIT(IIO_CHAN_INFO_OFFSET), \ |
190 | .address = (addr), \ | 190 | .address = (addr), \ |
191 | .scan_index = (si), \ | 191 | .scan_index = (si), \ |
192 | .scan_type = { \ | 192 | .scan_type = { \ |
@@ -197,13 +197,13 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
197 | }, \ | 197 | }, \ |
198 | } | 198 | } |
199 | 199 | ||
200 | #define ADIS_MOD_CHAN(_type, mod, addr, si, info, bits) { \ | 200 | #define ADIS_MOD_CHAN(_type, mod, addr, si, info_sep, bits) { \ |
201 | .type = (_type), \ | 201 | .type = (_type), \ |
202 | .modified = 1, \ | 202 | .modified = 1, \ |
203 | .channel2 = IIO_MOD_ ## mod, \ | 203 | .channel2 = IIO_MOD_ ## mod, \ |
204 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 204 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
205 | IIO_CHAN_INFO_SCALE_SHARED_BIT | \ | 205 | info_sep, \ |
206 | info, \ | 206 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ |
207 | .address = (addr), \ | 207 | .address = (addr), \ |
208 | .scan_index = (si), \ | 208 | .scan_index = (si), \ |
209 | .scan_type = { \ | 209 | .scan_type = { \ |
@@ -214,17 +214,17 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
214 | }, \ | 214 | }, \ |
215 | } | 215 | } |
216 | 216 | ||
217 | #define ADIS_ACCEL_CHAN(mod, addr, si, info, bits) \ | 217 | #define ADIS_ACCEL_CHAN(mod, addr, si, info_sep, bits) \ |
218 | ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info, bits) | 218 | ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, bits) |
219 | 219 | ||
220 | #define ADIS_GYRO_CHAN(mod, addr, si, info, bits) \ | 220 | #define ADIS_GYRO_CHAN(mod, addr, si, info_sep, bits) \ |
221 | ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info, bits) | 221 | ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info_sep, bits) |
222 | 222 | ||
223 | #define ADIS_INCLI_CHAN(mod, addr, si, info, bits) \ | 223 | #define ADIS_INCLI_CHAN(mod, addr, si, info_sep, bits) \ |
224 | ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info, bits) | 224 | ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info_sep, bits) |
225 | 225 | ||
226 | #define ADIS_ROT_CHAN(mod, addr, si, info, bits) \ | 226 | #define ADIS_ROT_CHAN(mod, addr, si, info_sep, bits) \ |
227 | ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info, bits) | 227 | ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info_sep, bits) |
228 | 228 | ||
229 | #ifdef CONFIG_IIO_ADIS_LIB_BUFFER | 229 | #ifdef CONFIG_IIO_ADIS_LIB_BUFFER |
230 | 230 | ||
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h index c66e0a96f6e8..3869c525b052 100644 --- a/include/linux/iio/trigger.h +++ b/include/linux/iio/trigger.h | |||
@@ -44,7 +44,6 @@ struct iio_trigger_ops { | |||
44 | * @id: [INTERN] unique id number | 44 | * @id: [INTERN] unique id number |
45 | * @name: [DRIVER] unique name | 45 | * @name: [DRIVER] unique name |
46 | * @dev: [DRIVER] associated device (if relevant) | 46 | * @dev: [DRIVER] associated device (if relevant) |
47 | * @private_data: [DRIVER] device specific data | ||
48 | * @list: [INTERN] used in maintenance of global trigger list | 47 | * @list: [INTERN] used in maintenance of global trigger list |
49 | * @alloc_list: [DRIVER] used for driver specific trigger list | 48 | * @alloc_list: [DRIVER] used for driver specific trigger list |
50 | * @use_count: use count for the trigger | 49 | * @use_count: use count for the trigger |
@@ -60,7 +59,6 @@ struct iio_trigger { | |||
60 | const char *name; | 59 | const char *name; |
61 | struct device dev; | 60 | struct device dev; |
62 | 61 | ||
63 | void *private_data; | ||
64 | struct list_head list; | 62 | struct list_head list; |
65 | struct list_head alloc_list; | 63 | struct list_head alloc_list; |
66 | int use_count; | 64 | int use_count; |
@@ -92,6 +90,30 @@ static inline void iio_trigger_get(struct iio_trigger *trig) | |||
92 | } | 90 | } |
93 | 91 | ||
94 | /** | 92 | /** |
93 | * iio_device_set_drvdata() - Set trigger driver data | ||
94 | * @trig: IIO trigger structure | ||
95 | * @data: Driver specific data | ||
96 | * | ||
97 | * Allows to attach an arbitrary pointer to an IIO trigger, which can later be | ||
98 | * retrieved by iio_trigger_get_drvdata(). | ||
99 | */ | ||
100 | static inline void iio_trigger_set_drvdata(struct iio_trigger *trig, void *data) | ||
101 | { | ||
102 | dev_set_drvdata(&trig->dev, data); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * iio_trigger_get_drvdata() - Get trigger driver data | ||
107 | * @trig: IIO trigger structure | ||
108 | * | ||
109 | * Returns the data previously set with iio_trigger_set_drvdata() | ||
110 | */ | ||
111 | static inline void *iio_trigger_get_drvdata(struct iio_trigger *trig) | ||
112 | { | ||
113 | return dev_get_drvdata(&trig->dev); | ||
114 | } | ||
115 | |||
116 | /** | ||
95 | * iio_trigger_register() - register a trigger with the IIO core | 117 | * iio_trigger_register() - register a trigger with the IIO core |
96 | * @trig_info: trigger to be registered | 118 | * @trig_info: trigger to be registered |
97 | **/ | 119 | **/ |
diff --git a/include/linux/ima.h b/include/linux/ima.h index 86c361e947b9..1b7f268cddce 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
@@ -46,7 +46,7 @@ static inline int ima_module_check(struct file *file) | |||
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | #endif /* CONFIG_IMA_H */ | 49 | #endif /* CONFIG_IMA */ |
50 | 50 | ||
51 | #ifdef CONFIG_IMA_APPRAISE | 51 | #ifdef CONFIG_IMA_APPRAISE |
52 | extern void ima_inode_post_setattr(struct dentry *dentry); | 52 | extern void ima_inode_post_setattr(struct dentry *dentry); |
@@ -72,5 +72,5 @@ static inline int ima_inode_removexattr(struct dentry *dentry, | |||
72 | { | 72 | { |
73 | return 0; | 73 | return 0; |
74 | } | 74 | } |
75 | #endif /* CONFIG_IMA_APPRAISE_H */ | 75 | #endif /* CONFIG_IMA_APPRAISE */ |
76 | #endif /* _LINUX_IMA_H */ | 76 | #endif /* _LINUX_IMA_H */ |
diff --git a/include/linux/integrity.h b/include/linux/integrity.h index 66c5fe9550a5..83222cebd47b 100644 --- a/include/linux/integrity.h +++ b/include/linux/integrity.h | |||
@@ -36,5 +36,5 @@ static inline void integrity_inode_free(struct inode *inode) | |||
36 | { | 36 | { |
37 | return; | 37 | return; |
38 | } | 38 | } |
39 | #endif /* CONFIG_INTEGRITY_H */ | 39 | #endif /* CONFIG_INTEGRITY */ |
40 | #endif /* _LINUX_INTEGRITY_H */ | 40 | #endif /* _LINUX_INTEGRITY_H */ |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 85ac9b9b72a2..89b7c24a36e9 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -192,6 +192,10 @@ extern struct resource * __request_region(struct resource *, | |||
192 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); | 192 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); |
193 | extern void __release_region(struct resource *, resource_size_t, | 193 | extern void __release_region(struct resource *, resource_size_t, |
194 | resource_size_t); | 194 | resource_size_t); |
195 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
196 | extern int release_mem_region_adjustable(struct resource *, resource_size_t, | ||
197 | resource_size_t); | ||
198 | #endif | ||
195 | 199 | ||
196 | static inline int __deprecated check_region(resource_size_t s, | 200 | static inline int __deprecated check_region(resource_size_t s, |
197 | resource_size_t n) | 201 | resource_size_t n) |
diff --git a/include/linux/ipack.h b/include/linux/ipack.h index fea12cbb2aeb..1888e06ddf64 100644 --- a/include/linux/ipack.h +++ b/include/linux/ipack.h | |||
@@ -207,19 +207,41 @@ int ipack_driver_register(struct ipack_driver *edrv, struct module *owner, | |||
207 | void ipack_driver_unregister(struct ipack_driver *edrv); | 207 | void ipack_driver_unregister(struct ipack_driver *edrv); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | * ipack_device_register -- register an IPack device with the kernel | 210 | * ipack_device_init -- initialize an IPack device |
211 | * @dev: the new device to register. | 211 | * @dev: the new device to initialize. |
212 | * | 212 | * |
213 | * Register a new IPack device ("module" in IndustryPack jargon). The call | 213 | * Initialize a new IPack device ("module" in IndustryPack jargon). The call |
214 | * is done by the carrier driver. The carrier should populate the fields | 214 | * is done by the carrier driver. The carrier should populate the fields |
215 | * bus and slot as well as the region array of @dev prior to calling this | 215 | * bus and slot as well as the region array of @dev prior to calling this |
216 | * function. The rest of the fields will be allocated and populated | 216 | * function. The rest of the fields will be allocated and populated |
217 | * during registration. | 217 | * during initalization. |
218 | * | 218 | * |
219 | * Return zero on success or error code on failure. | 219 | * Return zero on success or error code on failure. |
220 | * | ||
221 | * NOTE: _Never_ directly free @dev after calling this function, even | ||
222 | * if it returned an error! Always use ipack_put_device() to give up the | ||
223 | * reference initialized in this function instead. | ||
224 | */ | ||
225 | int ipack_device_init(struct ipack_device *dev); | ||
226 | |||
227 | /** | ||
228 | * ipack_device_add -- Add an IPack device | ||
229 | * @dev: the new device to add. | ||
230 | * | ||
231 | * Add a new IPack device. The call is done by the carrier driver | ||
232 | * after calling ipack_device_init(). | ||
233 | * | ||
234 | * Return zero on success or error code on failure. | ||
235 | * | ||
236 | * NOTE: _Never_ directly free @dev after calling this function, even | ||
237 | * if it returned an error! Always use ipack_put_device() to give up the | ||
238 | * reference initialized in this function instead. | ||
220 | */ | 239 | */ |
221 | int ipack_device_register(struct ipack_device *dev); | 240 | int ipack_device_add(struct ipack_device *dev); |
222 | void ipack_device_unregister(struct ipack_device *dev); | 241 | void ipack_device_del(struct ipack_device *dev); |
242 | |||
243 | void ipack_get_device(struct ipack_device *dev); | ||
244 | void ipack_put_device(struct ipack_device *dev); | ||
223 | 245 | ||
224 | /** | 246 | /** |
225 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table | 247 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index ae221a7b5092..c4d870b0d5e6 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -43,8 +43,8 @@ struct ipc_namespace { | |||
43 | 43 | ||
44 | size_t shm_ctlmax; | 44 | size_t shm_ctlmax; |
45 | size_t shm_ctlall; | 45 | size_t shm_ctlall; |
46 | unsigned long shm_tot; | ||
46 | int shm_ctlmni; | 47 | int shm_ctlmni; |
47 | int shm_tot; | ||
48 | /* | 48 | /* |
49 | * Defines whether IPC_RMID is forced for _all_ shm segments regardless | 49 | * Defines whether IPC_RMID is forced for _all_ shm segments regardless |
50 | * of shmctl() | 50 | * of shmctl() |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 50e5a5e6a712..6e051f472edb 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -480,6 +480,7 @@ struct transaction_s | |||
480 | T_COMMIT, | 480 | T_COMMIT, |
481 | T_COMMIT_DFLUSH, | 481 | T_COMMIT_DFLUSH, |
482 | T_COMMIT_JFLUSH, | 482 | T_COMMIT_JFLUSH, |
483 | T_COMMIT_CALLBACK, | ||
483 | T_FINISHED | 484 | T_FINISHED |
484 | } t_state; | 485 | } t_state; |
485 | 486 | ||
@@ -1144,7 +1145,7 @@ extern struct kmem_cache *jbd2_handle_cache; | |||
1144 | 1145 | ||
1145 | static inline handle_t *jbd2_alloc_handle(gfp_t gfp_flags) | 1146 | static inline handle_t *jbd2_alloc_handle(gfp_t gfp_flags) |
1146 | { | 1147 | { |
1147 | return kmem_cache_alloc(jbd2_handle_cache, gfp_flags); | 1148 | return kmem_cache_zalloc(jbd2_handle_cache, gfp_flags); |
1148 | } | 1149 | } |
1149 | 1150 | ||
1150 | static inline void jbd2_free_handle(handle_t *handle) | 1151 | static inline void jbd2_free_handle(handle_t *handle) |
@@ -1200,6 +1201,7 @@ int __jbd2_log_start_commit(journal_t *journal, tid_t tid); | |||
1200 | int jbd2_journal_start_commit(journal_t *journal, tid_t *tid); | 1201 | int jbd2_journal_start_commit(journal_t *journal, tid_t *tid); |
1201 | int jbd2_journal_force_commit_nested(journal_t *journal); | 1202 | int jbd2_journal_force_commit_nested(journal_t *journal); |
1202 | int jbd2_log_wait_commit(journal_t *journal, tid_t tid); | 1203 | int jbd2_log_wait_commit(journal_t *journal, tid_t tid); |
1204 | int jbd2_complete_transaction(journal_t *journal, tid_t tid); | ||
1203 | int jbd2_log_do_checkpoint(journal_t *journal); | 1205 | int jbd2_log_do_checkpoint(journal_t *journal); |
1204 | int jbd2_trans_will_send_data_barrier(journal_t *journal, tid_t tid); | 1206 | int jbd2_trans_will_send_data_barrier(journal_t *journal, tid_t tid); |
1205 | 1207 | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 82ed068b1ebe..8fb8edf12417 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -75,7 +75,6 @@ extern int register_refined_jiffies(long clock_tick_rate); | |||
75 | */ | 75 | */ |
76 | extern u64 __jiffy_data jiffies_64; | 76 | extern u64 __jiffy_data jiffies_64; |
77 | extern unsigned long volatile __jiffy_data jiffies; | 77 | extern unsigned long volatile __jiffy_data jiffies; |
78 | extern seqlock_t jiffies_lock; | ||
79 | 78 | ||
80 | #if (BITS_PER_LONG < 64) | 79 | #if (BITS_PER_LONG < 64) |
81 | u64 get_jiffies_64(void); | 80 | u64 get_jiffies_64(void); |
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index c18b46f8aeeb..13a3da25ff07 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
@@ -31,21 +31,14 @@ struct journal_head { | |||
31 | /* | 31 | /* |
32 | * Journalling list for this buffer [jbd_lock_bh_state()] | 32 | * Journalling list for this buffer [jbd_lock_bh_state()] |
33 | */ | 33 | */ |
34 | unsigned b_jlist; | 34 | unsigned b_jlist:4; |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * This flag signals the buffer has been modified by | 37 | * This flag signals the buffer has been modified by |
38 | * the currently running transaction | 38 | * the currently running transaction |
39 | * [jbd_lock_bh_state()] | 39 | * [jbd_lock_bh_state()] |
40 | */ | 40 | */ |
41 | unsigned b_modified; | 41 | unsigned b_modified:1; |
42 | |||
43 | /* | ||
44 | * This feild tracks the last transaction id in which this buffer | ||
45 | * has been cowed | ||
46 | * [jbd_lock_bh_state()] | ||
47 | */ | ||
48 | tid_t b_cow_tid; | ||
49 | 42 | ||
50 | /* | 43 | /* |
51 | * Copy of the buffer data frozen for writing to the log. | 44 | * Copy of the buffer data frozen for writing to the log. |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 79fdd80a42d4..6d1844f393c0 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -486,6 +486,8 @@ enum ftrace_dump_mode { | |||
486 | void tracing_on(void); | 486 | void tracing_on(void); |
487 | void tracing_off(void); | 487 | void tracing_off(void); |
488 | int tracing_is_on(void); | 488 | int tracing_is_on(void); |
489 | void tracing_snapshot(void); | ||
490 | void tracing_snapshot_alloc(void); | ||
489 | 491 | ||
490 | extern void tracing_start(void); | 492 | extern void tracing_start(void); |
491 | extern void tracing_stop(void); | 493 | extern void tracing_stop(void); |
@@ -515,10 +517,32 @@ do { \ | |||
515 | * | 517 | * |
516 | * This is intended as a debugging tool for the developer only. | 518 | * This is intended as a debugging tool for the developer only. |
517 | * Please refrain from leaving trace_printks scattered around in | 519 | * Please refrain from leaving trace_printks scattered around in |
518 | * your code. | 520 | * your code. (Extra memory is used for special buffers that are |
521 | * allocated when trace_printk() is used) | ||
522 | * | ||
523 | * A little optization trick is done here. If there's only one | ||
524 | * argument, there's no need to scan the string for printf formats. | ||
525 | * The trace_puts() will suffice. But how can we take advantage of | ||
526 | * using trace_puts() when trace_printk() has only one argument? | ||
527 | * By stringifying the args and checking the size we can tell | ||
528 | * whether or not there are args. __stringify((__VA_ARGS__)) will | ||
529 | * turn into "()\0" with a size of 3 when there are no args, anything | ||
530 | * else will be bigger. All we need to do is define a string to this, | ||
531 | * and then take its size and compare to 3. If it's bigger, use | ||
532 | * do_trace_printk() otherwise, optimize it to trace_puts(). Then just | ||
533 | * let gcc optimize the rest. | ||
519 | */ | 534 | */ |
520 | 535 | ||
521 | #define trace_printk(fmt, args...) \ | 536 | #define trace_printk(fmt, ...) \ |
537 | do { \ | ||
538 | char _______STR[] = __stringify((__VA_ARGS__)); \ | ||
539 | if (sizeof(_______STR) > 3) \ | ||
540 | do_trace_printk(fmt, ##__VA_ARGS__); \ | ||
541 | else \ | ||
542 | trace_puts(fmt); \ | ||
543 | } while (0) | ||
544 | |||
545 | #define do_trace_printk(fmt, args...) \ | ||
522 | do { \ | 546 | do { \ |
523 | static const char *trace_printk_fmt \ | 547 | static const char *trace_printk_fmt \ |
524 | __attribute__((section("__trace_printk_fmt"))) = \ | 548 | __attribute__((section("__trace_printk_fmt"))) = \ |
@@ -538,7 +562,45 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...); | |||
538 | extern __printf(2, 3) | 562 | extern __printf(2, 3) |
539 | int __trace_printk(unsigned long ip, const char *fmt, ...); | 563 | int __trace_printk(unsigned long ip, const char *fmt, ...); |
540 | 564 | ||
541 | extern void trace_dump_stack(void); | 565 | /** |
566 | * trace_puts - write a string into the ftrace buffer | ||
567 | * @str: the string to record | ||
568 | * | ||
569 | * Note: __trace_bputs is an internal function for trace_puts and | ||
570 | * the @ip is passed in via the trace_puts macro. | ||
571 | * | ||
572 | * This is similar to trace_printk() but is made for those really fast | ||
573 | * paths that a developer wants the least amount of "Heisenbug" affects, | ||
574 | * where the processing of the print format is still too much. | ||
575 | * | ||
576 | * This function allows a kernel developer to debug fast path sections | ||
577 | * that printk is not appropriate for. By scattering in various | ||
578 | * printk like tracing in the code, a developer can quickly see | ||
579 | * where problems are occurring. | ||
580 | * | ||
581 | * This is intended as a debugging tool for the developer only. | ||
582 | * Please refrain from leaving trace_puts scattered around in | ||
583 | * your code. (Extra memory is used for special buffers that are | ||
584 | * allocated when trace_puts() is used) | ||
585 | * | ||
586 | * Returns: 0 if nothing was written, positive # if string was. | ||
587 | * (1 when __trace_bputs is used, strlen(str) when __trace_puts is used) | ||
588 | */ | ||
589 | |||
590 | extern int __trace_bputs(unsigned long ip, const char *str); | ||
591 | extern int __trace_puts(unsigned long ip, const char *str, int size); | ||
592 | #define trace_puts(str) ({ \ | ||
593 | static const char *trace_printk_fmt \ | ||
594 | __attribute__((section("__trace_printk_fmt"))) = \ | ||
595 | __builtin_constant_p(str) ? str : NULL; \ | ||
596 | \ | ||
597 | if (__builtin_constant_p(str)) \ | ||
598 | __trace_bputs(_THIS_IP_, trace_printk_fmt); \ | ||
599 | else \ | ||
600 | __trace_puts(_THIS_IP_, str, strlen(str)); \ | ||
601 | }) | ||
602 | |||
603 | extern void trace_dump_stack(int skip); | ||
542 | 604 | ||
543 | /* | 605 | /* |
544 | * The double __builtin_constant_p is because gcc will give us an error | 606 | * The double __builtin_constant_p is because gcc will give us an error |
@@ -573,6 +635,8 @@ static inline void trace_dump_stack(void) { } | |||
573 | static inline void tracing_on(void) { } | 635 | static inline void tracing_on(void) { } |
574 | static inline void tracing_off(void) { } | 636 | static inline void tracing_off(void) { } |
575 | static inline int tracing_is_on(void) { return 0; } | 637 | static inline int tracing_is_on(void) { return 0; } |
638 | static inline void tracing_snapshot(void) { } | ||
639 | static inline void tracing_snapshot_alloc(void) { } | ||
576 | 640 | ||
577 | static inline __printf(1, 2) | 641 | static inline __printf(1, 2) |
578 | int trace_printk(const char *fmt, ...) | 642 | int trace_printk(const char *fmt, ...) |
@@ -734,6 +798,4 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
734 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD | 798 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD |
735 | #endif | 799 | #endif |
736 | 800 | ||
737 | extern int do_sysinfo(struct sysinfo *info); | ||
738 | |||
739 | #endif | 801 | #endif |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index d2e6927bbaae..d78d28a733b1 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -200,6 +200,8 @@ extern size_t vmcoreinfo_max_size; | |||
200 | 200 | ||
201 | int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, | 201 | int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, |
202 | unsigned long long *crash_size, unsigned long long *crash_base); | 202 | unsigned long long *crash_size, unsigned long long *crash_base); |
203 | int parse_crashkernel_high(char *cmdline, unsigned long long system_ram, | ||
204 | unsigned long long *crash_size, unsigned long long *crash_base); | ||
203 | int parse_crashkernel_low(char *cmdline, unsigned long long system_ram, | 205 | int parse_crashkernel_low(char *cmdline, unsigned long long system_ram, |
204 | unsigned long long *crash_size, unsigned long long *crash_base); | 206 | unsigned long long *crash_size, unsigned long long *crash_base); |
205 | int crash_shrink_memory(unsigned long new_size); | 207 | int crash_shrink_memory(unsigned long new_size); |
diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 5398d5807075..0555cc66a15b 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h | |||
@@ -67,16 +67,15 @@ struct subprocess_info { | |||
67 | }; | 67 | }; |
68 | 68 | ||
69 | extern int | 69 | extern int |
70 | call_usermodehelper_fns(char *path, char **argv, char **envp, int wait, | 70 | call_usermodehelper(char *path, char **argv, char **envp, int wait); |
71 | int (*init)(struct subprocess_info *info, struct cred *new), | ||
72 | void (*cleanup)(struct subprocess_info *), void *data); | ||
73 | 71 | ||
74 | static inline int | 72 | extern struct subprocess_info * |
75 | call_usermodehelper(char *path, char **argv, char **envp, int wait) | 73 | call_usermodehelper_setup(char *path, char **argv, char **envp, gfp_t gfp_mask, |
76 | { | 74 | int (*init)(struct subprocess_info *info, struct cred *new), |
77 | return call_usermodehelper_fns(path, argv, envp, wait, | 75 | void (*cleanup)(struct subprocess_info *), void *data); |
78 | NULL, NULL, NULL); | 76 | |
79 | } | 77 | extern int |
78 | call_usermodehelper_exec(struct subprocess_info *info, int wait); | ||
80 | 79 | ||
81 | extern struct ctl_table usermodehelper_table[]; | 80 | extern struct ctl_table usermodehelper_table[]; |
82 | 81 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 4b6ef4d33cc2..ca1d27a0d6a6 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -29,6 +29,7 @@ | |||
29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi | 29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi |
30 | * <prasanna@in.ibm.com> added function-return probes. | 30 | * <prasanna@in.ibm.com> added function-return probes. |
31 | */ | 31 | */ |
32 | #include <linux/compiler.h> /* for __kprobes */ | ||
32 | #include <linux/linkage.h> | 33 | #include <linux/linkage.h> |
33 | #include <linux/list.h> | 34 | #include <linux/list.h> |
34 | #include <linux/notifier.h> | 35 | #include <linux/notifier.h> |
@@ -49,16 +50,11 @@ | |||
49 | #define KPROBE_REENTER 0x00000004 | 50 | #define KPROBE_REENTER 0x00000004 |
50 | #define KPROBE_HIT_SSDONE 0x00000008 | 51 | #define KPROBE_HIT_SSDONE 0x00000008 |
51 | 52 | ||
52 | /* Attach to insert probes on any functions which should be ignored*/ | ||
53 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
54 | |||
55 | #else /* CONFIG_KPROBES */ | 53 | #else /* CONFIG_KPROBES */ |
56 | typedef int kprobe_opcode_t; | 54 | typedef int kprobe_opcode_t; |
57 | struct arch_specific_insn { | 55 | struct arch_specific_insn { |
58 | int dummy; | 56 | int dummy; |
59 | }; | 57 | }; |
60 | #define __kprobes | ||
61 | |||
62 | #endif /* CONFIG_KPROBES */ | 58 | #endif /* CONFIG_KPROBES */ |
63 | 59 | ||
64 | struct kprobe; | 60 | struct kprobe; |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 8d816646f766..7dcef3317689 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
@@ -43,6 +43,7 @@ bool kthread_should_stop(void); | |||
43 | bool kthread_should_park(void); | 43 | bool kthread_should_park(void); |
44 | bool kthread_freezable_should_stop(bool *was_frozen); | 44 | bool kthread_freezable_should_stop(bool *was_frozen); |
45 | void *kthread_data(struct task_struct *k); | 45 | void *kthread_data(struct task_struct *k); |
46 | void *probe_kthread_data(struct task_struct *k); | ||
46 | int kthread_park(struct task_struct *k); | 47 | int kthread_park(struct task_struct *k); |
47 | void kthread_unpark(struct task_struct *k); | 48 | void kthread_unpark(struct task_struct *k); |
48 | void kthread_parkme(void); | 49 | void kthread_parkme(void); |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index cad77fe09d77..c13958251927 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -518,7 +518,7 @@ int kvm_write_guest(struct kvm *kvm, gpa_t gpa, const void *data, | |||
518 | int kvm_write_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, | 518 | int kvm_write_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, |
519 | void *data, unsigned long len); | 519 | void *data, unsigned long len); |
520 | int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, | 520 | int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, |
521 | gpa_t gpa); | 521 | gpa_t gpa, unsigned long len); |
522 | int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len); | 522 | int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len); |
523 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); | 523 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); |
524 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); | 524 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); |
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index fa7cc7244cbd..b0bcce0ddc95 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h | |||
@@ -71,6 +71,7 @@ struct gfn_to_hva_cache { | |||
71 | u64 generation; | 71 | u64 generation; |
72 | gpa_t gpa; | 72 | gpa_t gpa; |
73 | unsigned long hva; | 73 | unsigned long hva; |
74 | unsigned long len; | ||
74 | struct kvm_memory_slot *memslot; | 75 | struct kvm_memory_slot *memslot; |
75 | }; | 76 | }; |
76 | 77 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91c9d109e5f1..eae7a053dc51 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -398,6 +398,7 @@ enum { | |||
398 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | 398 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ |
399 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ | 399 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ |
400 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ | 400 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ |
401 | ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ | ||
401 | 402 | ||
402 | /* DMA mask for user DMA control: User visible values; DO NOT | 403 | /* DMA mask for user DMA control: User visible values; DO NOT |
403 | renumber */ | 404 | renumber */ |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 807f1e533226..829d66c67fc2 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_LINKAGE_H | 2 | #define _LINUX_LINKAGE_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/stringify.h> | ||
5 | #include <asm/linkage.h> | 6 | #include <asm/linkage.h> |
6 | 7 | ||
7 | #ifdef __cplusplus | 8 | #ifdef __cplusplus |
@@ -14,6 +15,26 @@ | |||
14 | #define asmlinkage CPP_ASMLINKAGE | 15 | #define asmlinkage CPP_ASMLINKAGE |
15 | #endif | 16 | #endif |
16 | 17 | ||
18 | #ifndef SYMBOL_NAME | ||
19 | #ifdef CONFIG_SYMBOL_PREFIX | ||
20 | #define SYMBOL_NAME(x) CONFIG_SYMBOL_PREFIX ## x | ||
21 | #else | ||
22 | #define SYMBOL_NAME(x) x | ||
23 | #endif | ||
24 | #endif | ||
25 | #define __SYMBOL_NAME(x) __stringify(SYMBOL_NAME(x)) | ||
26 | |||
27 | #ifndef cond_syscall | ||
28 | #define cond_syscall(x) asm(".weak\t" __SYMBOL_NAME(x) \ | ||
29 | "\n\t.set\t" __SYMBOL_NAME(x) "," __SYMBOL_NAME(sys_ni_syscall)); | ||
30 | #endif | ||
31 | |||
32 | #ifndef SYSCALL_ALIAS | ||
33 | #define SYSCALL_ALIAS(alias, name) \ | ||
34 | asm ("\t.globl " __SYMBOL_NAME(alias) \ | ||
35 | "\n\t.set\t" __SYMBOL_NAME(alias) "," __SYMBOL_NAME(name)) | ||
36 | #endif | ||
37 | |||
17 | #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) | 38 | #define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) |
18 | #define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE) | 39 | #define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE) |
19 | 40 | ||
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h index 31f9d75adc5b..2eb88556c5c5 100644 --- a/include/linux/list_bl.h +++ b/include/linux/list_bl.h | |||
@@ -125,6 +125,11 @@ static inline void hlist_bl_unlock(struct hlist_bl_head *b) | |||
125 | __bit_spin_unlock(0, (unsigned long *)b); | 125 | __bit_spin_unlock(0, (unsigned long *)b); |
126 | } | 126 | } |
127 | 127 | ||
128 | static inline bool hlist_bl_is_locked(struct hlist_bl_head *b) | ||
129 | { | ||
130 | return bit_spin_is_locked(0, (unsigned long *)b); | ||
131 | } | ||
132 | |||
128 | /** | 133 | /** |
129 | * hlist_bl_for_each_entry - iterate over list of given type | 134 | * hlist_bl_for_each_entry - iterate over list of given type |
130 | * @tpos: the type * to use as a loop cursor. | 135 | * @tpos: the type * to use as a loop cursor. |
diff --git a/include/linux/math64.h b/include/linux/math64.h index b8ba85544721..931a619407bf 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -30,6 +30,15 @@ static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | /** | 32 | /** |
33 | * div64_u64_rem - unsigned 64bit divide with 64bit divisor | ||
34 | */ | ||
35 | static inline u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) | ||
36 | { | ||
37 | *remainder = dividend % divisor; | ||
38 | return dividend / divisor; | ||
39 | } | ||
40 | |||
41 | /** | ||
33 | * div64_u64 - unsigned 64bit divide with 64bit divisor | 42 | * div64_u64 - unsigned 64bit divide with 64bit divisor |
34 | */ | 43 | */ |
35 | static inline u64 div64_u64(u64 dividend, u64 divisor) | 44 | static inline u64 div64_u64(u64 dividend, u64 divisor) |
@@ -61,8 +70,16 @@ static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) | |||
61 | extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); | 70 | extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); |
62 | #endif | 71 | #endif |
63 | 72 | ||
73 | #ifndef div64_u64_rem | ||
74 | extern u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder); | ||
75 | #endif | ||
76 | |||
64 | #ifndef div64_u64 | 77 | #ifndef div64_u64 |
65 | extern u64 div64_u64(u64 dividend, u64 divisor); | 78 | static inline u64 div64_u64(u64 dividend, u64 divisor) |
79 | { | ||
80 | u64 remainder; | ||
81 | return div64_u64_rem(dividend, divisor, &remainder); | ||
82 | } | ||
66 | #endif | 83 | #endif |
67 | 84 | ||
68 | #ifndef div64_s64 | 85 | #ifndef div64_s64 |
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h new file mode 100644 index 000000000000..d14af7b722ef --- /dev/null +++ b/include/linux/mei_cl_bus.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef _LINUX_MEI_CL_BUS_H | ||
2 | #define _LINUX_MEI_CL_BUS_H | ||
3 | |||
4 | #include <linux/device.h> | ||
5 | #include <linux/uuid.h> | ||
6 | |||
7 | struct mei_cl_device; | ||
8 | |||
9 | struct mei_cl_driver { | ||
10 | struct device_driver driver; | ||
11 | const char *name; | ||
12 | |||
13 | const struct mei_cl_device_id *id_table; | ||
14 | |||
15 | int (*probe)(struct mei_cl_device *dev, | ||
16 | const struct mei_cl_device_id *id); | ||
17 | int (*remove)(struct mei_cl_device *dev); | ||
18 | }; | ||
19 | |||
20 | int __mei_cl_driver_register(struct mei_cl_driver *driver, | ||
21 | struct module *owner); | ||
22 | #define mei_cl_driver_register(driver) \ | ||
23 | __mei_cl_driver_register(driver, THIS_MODULE) | ||
24 | |||
25 | void mei_cl_driver_unregister(struct mei_cl_driver *driver); | ||
26 | |||
27 | int mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length); | ||
28 | int mei_cl_recv(struct mei_cl_device *device, u8 *buf, size_t length); | ||
29 | |||
30 | typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device, | ||
31 | u32 events, void *context); | ||
32 | int mei_cl_register_event_cb(struct mei_cl_device *device, | ||
33 | mei_cl_event_cb_t read_cb, void *context); | ||
34 | |||
35 | #define MEI_CL_EVENT_RX 0 | ||
36 | #define MEI_CL_EVENT_TX 1 | ||
37 | |||
38 | void *mei_cl_get_drvdata(const struct mei_cl_device *device); | ||
39 | void mei_cl_set_drvdata(struct mei_cl_device *device, void *data); | ||
40 | |||
41 | int mei_cl_enable_device(struct mei_cl_device *device); | ||
42 | int mei_cl_disable_device(struct mei_cl_device *device); | ||
43 | |||
44 | #endif /* _LINUX_MEI_CL_BUS_H */ | ||
diff --git a/include/linux/memory.h b/include/linux/memory.h index 45e93b468878..85c31a8e2904 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/node.h> | 18 | #include <linux/node.h> |
19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/notifier.h> | ||
21 | 22 | ||
22 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) | 23 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) |
23 | 24 | ||
@@ -114,9 +115,10 @@ extern void unregister_memory_notifier(struct notifier_block *nb); | |||
114 | extern int register_memory_isolate_notifier(struct notifier_block *nb); | 115 | extern int register_memory_isolate_notifier(struct notifier_block *nb); |
115 | extern void unregister_memory_isolate_notifier(struct notifier_block *nb); | 116 | extern void unregister_memory_isolate_notifier(struct notifier_block *nb); |
116 | extern int register_new_memory(int, struct mem_section *); | 117 | extern int register_new_memory(int, struct mem_section *); |
118 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
117 | extern int unregister_memory_section(struct mem_section *); | 119 | extern int unregister_memory_section(struct mem_section *); |
120 | #endif | ||
118 | extern int memory_dev_init(void); | 121 | extern int memory_dev_init(void); |
119 | extern int remove_memory_block(unsigned long, struct mem_section *, int); | ||
120 | extern int memory_notify(unsigned long val, void *v); | 122 | extern int memory_notify(unsigned long val, void *v); |
121 | extern int memory_isolate_notify(unsigned long val, void *v); | 123 | extern int memory_isolate_notify(unsigned long val, void *v); |
122 | extern struct memory_block *find_memory_block_hinted(struct mem_section *, | 124 | extern struct memory_block *find_memory_block_hinted(struct mem_section *, |
@@ -127,13 +129,18 @@ enum mem_add_context { BOOT, HOTPLUG }; | |||
127 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ | 129 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
128 | 130 | ||
129 | #ifdef CONFIG_MEMORY_HOTPLUG | 131 | #ifdef CONFIG_MEMORY_HOTPLUG |
130 | #define hotplug_memory_notifier(fn, pri) { \ | 132 | #define hotplug_memory_notifier(fn, pri) ({ \ |
131 | static __meminitdata struct notifier_block fn##_mem_nb =\ | 133 | static __meminitdata struct notifier_block fn##_mem_nb =\ |
132 | { .notifier_call = fn, .priority = pri }; \ | 134 | { .notifier_call = fn, .priority = pri };\ |
133 | register_memory_notifier(&fn##_mem_nb); \ | 135 | register_memory_notifier(&fn##_mem_nb); \ |
134 | } | 136 | }) |
137 | #define register_hotmemory_notifier(nb) register_memory_notifier(nb) | ||
138 | #define unregister_hotmemory_notifier(nb) unregister_memory_notifier(nb) | ||
135 | #else | 139 | #else |
136 | #define hotplug_memory_notifier(fn, pri) do { } while (0) | 140 | #define hotplug_memory_notifier(fn, pri) ({ 0; }) |
141 | /* These aren't inline functions due to a GCC bug. */ | ||
142 | #define register_hotmemory_notifier(nb) ({ (void)(nb); 0; }) | ||
143 | #define unregister_hotmemory_notifier(nb) ({ (void)(nb); }) | ||
137 | #endif | 144 | #endif |
138 | 145 | ||
139 | /* | 146 | /* |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index b6a3be7d47bf..3e622c610925 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -97,13 +97,13 @@ extern void __online_page_free(struct page *page); | |||
97 | #ifdef CONFIG_MEMORY_HOTREMOVE | 97 | #ifdef CONFIG_MEMORY_HOTREMOVE |
98 | extern bool is_pageblock_removable_nolock(struct page *page); | 98 | extern bool is_pageblock_removable_nolock(struct page *page); |
99 | extern int arch_remove_memory(u64 start, u64 size); | 99 | extern int arch_remove_memory(u64 start, u64 size); |
100 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | ||
101 | unsigned long nr_pages); | ||
100 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 102 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
101 | 103 | ||
102 | /* reasonably generic interface to expand the physical pages in a zone */ | 104 | /* reasonably generic interface to expand the physical pages in a zone */ |
103 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, | 105 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, |
104 | unsigned long nr_pages); | 106 | unsigned long nr_pages); |
105 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | ||
106 | unsigned long nr_pages); | ||
107 | 107 | ||
108 | #ifdef CONFIG_NUMA | 108 | #ifdef CONFIG_NUMA |
109 | extern int memory_add_physaddr_to_nid(u64 start); | 109 | extern int memory_add_physaddr_to_nid(u64 start); |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 9ead60bc66b7..3301b2031c8d 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
@@ -89,6 +89,11 @@ struct abx500_fg; | |||
89 | * points. | 89 | * points. |
90 | * @maint_thres This is the threshold where we stop reporting | 90 | * @maint_thres This is the threshold where we stop reporting |
91 | * battery full while in maintenance, in per cent | 91 | * battery full while in maintenance, in per cent |
92 | * @pcut_enable: Enable power cut feature in ab8505 | ||
93 | * @pcut_max_time: Max time threshold | ||
94 | * @pcut_flag_time: Flagtime threshold | ||
95 | * @pcut_max_restart: Max number of restarts | ||
96 | * @pcut_debounce_time: Sets battery debounce time | ||
92 | */ | 97 | */ |
93 | struct abx500_fg_parameters { | 98 | struct abx500_fg_parameters { |
94 | int recovery_sleep_timer; | 99 | int recovery_sleep_timer; |
@@ -106,6 +111,11 @@ struct abx500_fg_parameters { | |||
106 | int battok_raising_th_sel1; | 111 | int battok_raising_th_sel1; |
107 | int user_cap_limit; | 112 | int user_cap_limit; |
108 | int maint_thres; | 113 | int maint_thres; |
114 | bool pcut_enable; | ||
115 | u8 pcut_max_time; | ||
116 | u8 pcut_flag_time; | ||
117 | u8 pcut_max_restart; | ||
118 | u8 pcut_debounce_time; | ||
109 | }; | 119 | }; |
110 | 120 | ||
111 | /** | 121 | /** |
@@ -173,11 +183,11 @@ struct abx500_battery_type { | |||
173 | int low_high_vol_lvl; | 183 | int low_high_vol_lvl; |
174 | int battery_resistance; | 184 | int battery_resistance; |
175 | int n_temp_tbl_elements; | 185 | int n_temp_tbl_elements; |
176 | struct abx500_res_to_temp *r_to_t_tbl; | 186 | const struct abx500_res_to_temp *r_to_t_tbl; |
177 | int n_v_cap_tbl_elements; | 187 | int n_v_cap_tbl_elements; |
178 | struct abx500_v_to_cap *v_to_cap_tbl; | 188 | const struct abx500_v_to_cap *v_to_cap_tbl; |
179 | int n_batres_tbl_elements; | 189 | int n_batres_tbl_elements; |
180 | struct batres_vs_temp *batres_tbl; | 190 | const struct batres_vs_temp *batres_tbl; |
181 | }; | 191 | }; |
182 | 192 | ||
183 | /** | 193 | /** |
@@ -236,7 +246,11 @@ struct abx500_bm_charger_parameters { | |||
236 | * @interval_not_charging charge alg cycle period time when not charging (sec) | 246 | * @interval_not_charging charge alg cycle period time when not charging (sec) |
237 | * @temp_hysteresis temperature hysteresis | 247 | * @temp_hysteresis temperature hysteresis |
238 | * @gnd_lift_resistance Battery ground to phone ground resistance (mOhm) | 248 | * @gnd_lift_resistance Battery ground to phone ground resistance (mOhm) |
239 | * @maxi: maximization parameters | 249 | * @n_chg_out_curr number of elements in array chg_output_curr |
250 | * @n_chg_in_curr number of elements in array chg_input_curr | ||
251 | * @chg_output_curr charger output current level map | ||
252 | * @chg_input_curr charger input current level map | ||
253 | * @maxi maximization parameters | ||
240 | * @cap_levels capacity in percent for the different capacity levels | 254 | * @cap_levels capacity in percent for the different capacity levels |
241 | * @bat_type table of supported battery types | 255 | * @bat_type table of supported battery types |
242 | * @chg_params charger parameters | 256 | * @chg_params charger parameters |
@@ -257,6 +271,7 @@ struct abx500_bm_data { | |||
257 | bool autopower_cfg; | 271 | bool autopower_cfg; |
258 | bool ac_enabled; | 272 | bool ac_enabled; |
259 | bool usb_enabled; | 273 | bool usb_enabled; |
274 | bool usb_power_path; | ||
260 | bool no_maintenance; | 275 | bool no_maintenance; |
261 | bool capacity_scaling; | 276 | bool capacity_scaling; |
262 | bool chg_unknown_bat; | 277 | bool chg_unknown_bat; |
@@ -270,6 +285,10 @@ struct abx500_bm_data { | |||
270 | int interval_not_charging; | 285 | int interval_not_charging; |
271 | int temp_hysteresis; | 286 | int temp_hysteresis; |
272 | int gnd_lift_resistance; | 287 | int gnd_lift_resistance; |
288 | int n_chg_out_curr; | ||
289 | int n_chg_in_curr; | ||
290 | int *chg_output_curr; | ||
291 | int *chg_input_curr; | ||
273 | const struct abx500_maxim_parameters *maxi; | 292 | const struct abx500_maxim_parameters *maxi; |
274 | const struct abx500_bm_capacity_levels *cap_levels; | 293 | const struct abx500_bm_capacity_levels *cap_levels; |
275 | struct abx500_battery_type *bat_type; | 294 | struct abx500_battery_type *bat_type; |
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h index 8d35bfe164c8..cc892a8d8d6e 100644 --- a/include/linux/mfd/abx500/ab8500-bm.h +++ b/include/linux/mfd/abx500/ab8500-bm.h | |||
@@ -23,6 +23,7 @@ | |||
23 | * Bank : 0x5 | 23 | * Bank : 0x5 |
24 | */ | 24 | */ |
25 | #define AB8500_USB_LINE_STAT_REG 0x80 | 25 | #define AB8500_USB_LINE_STAT_REG 0x80 |
26 | #define AB8500_USB_LINE_CTRL2_REG 0x82 | ||
26 | #define AB8500_USB_LINK1_STAT_REG 0x94 | 27 | #define AB8500_USB_LINK1_STAT_REG 0x94 |
27 | 28 | ||
28 | /* | 29 | /* |
@@ -33,7 +34,7 @@ | |||
33 | #define AB8500_CH_STATUS2_REG 0x01 | 34 | #define AB8500_CH_STATUS2_REG 0x01 |
34 | #define AB8500_CH_USBCH_STAT1_REG 0x02 | 35 | #define AB8500_CH_USBCH_STAT1_REG 0x02 |
35 | #define AB8500_CH_USBCH_STAT2_REG 0x03 | 36 | #define AB8500_CH_USBCH_STAT2_REG 0x03 |
36 | #define AB8500_CH_FSM_STAT_REG 0x04 | 37 | #define AB8540_CH_USBCH_STAT3_REG 0x04 |
37 | #define AB8500_CH_STAT_REG 0x05 | 38 | #define AB8500_CH_STAT_REG 0x05 |
38 | 39 | ||
39 | /* | 40 | /* |
@@ -69,6 +70,8 @@ | |||
69 | #define AB8500_USBCH_CTRL1_REG 0xC0 | 70 | #define AB8500_USBCH_CTRL1_REG 0xC0 |
70 | #define AB8500_USBCH_CTRL2_REG 0xC1 | 71 | #define AB8500_USBCH_CTRL2_REG 0xC1 |
71 | #define AB8500_USBCH_IPT_CRNTLVL_REG 0xC2 | 72 | #define AB8500_USBCH_IPT_CRNTLVL_REG 0xC2 |
73 | #define AB8540_USB_PP_MODE_REG 0xC5 | ||
74 | #define AB8540_USB_PP_CHR_REG 0xC6 | ||
72 | 75 | ||
73 | /* | 76 | /* |
74 | * Gas Gauge register offsets | 77 | * Gas Gauge register offsets |
@@ -105,6 +108,7 @@ | |||
105 | #define AB8500_RTC_BACKUP_CHG_REG 0x0C | 108 | #define AB8500_RTC_BACKUP_CHG_REG 0x0C |
106 | #define AB8500_RTC_CC_CONF_REG 0x01 | 109 | #define AB8500_RTC_CC_CONF_REG 0x01 |
107 | #define AB8500_RTC_CTRL_REG 0x0B | 110 | #define AB8500_RTC_CTRL_REG 0x0B |
111 | #define AB8500_RTC_CTRL1_REG 0x11 | ||
108 | 112 | ||
109 | /* | 113 | /* |
110 | * OTP register offsets | 114 | * OTP register offsets |
@@ -154,6 +158,7 @@ | |||
154 | #define CH_OP_CUR_LVL_1P4 0x0D | 158 | #define CH_OP_CUR_LVL_1P4 0x0D |
155 | #define CH_OP_CUR_LVL_1P5 0x0E | 159 | #define CH_OP_CUR_LVL_1P5 0x0E |
156 | #define CH_OP_CUR_LVL_1P6 0x0F | 160 | #define CH_OP_CUR_LVL_1P6 0x0F |
161 | #define CH_OP_CUR_LVL_2P 0x3F | ||
157 | 162 | ||
158 | /* BTEMP High thermal limits */ | 163 | /* BTEMP High thermal limits */ |
159 | #define BTEMP_HIGH_TH_57_0 0x00 | 164 | #define BTEMP_HIGH_TH_57_0 0x00 |
@@ -179,10 +184,25 @@ | |||
179 | #define BUP_ICH_SEL_300UA 0x08 | 184 | #define BUP_ICH_SEL_300UA 0x08 |
180 | #define BUP_ICH_SEL_700UA 0x0C | 185 | #define BUP_ICH_SEL_700UA 0x0C |
181 | 186 | ||
182 | #define BUP_VCH_SEL_2P5V 0x00 | 187 | enum bup_vch_sel { |
183 | #define BUP_VCH_SEL_2P6V 0x01 | 188 | BUP_VCH_SEL_2P5V, |
184 | #define BUP_VCH_SEL_2P8V 0x02 | 189 | BUP_VCH_SEL_2P6V, |
185 | #define BUP_VCH_SEL_3P1V 0x03 | 190 | BUP_VCH_SEL_2P8V, |
191 | BUP_VCH_SEL_3P1V, | ||
192 | /* | ||
193 | * Note that the following 5 values 2.7v, 2.9v, 3.0v, 3.2v, 3.3v | ||
194 | * are only available on ab8540. You can't choose these 5 | ||
195 | * voltage on ab8500/ab8505/ab9540. | ||
196 | */ | ||
197 | BUP_VCH_SEL_2P7V, | ||
198 | BUP_VCH_SEL_2P9V, | ||
199 | BUP_VCH_SEL_3P0V, | ||
200 | BUP_VCH_SEL_3P2V, | ||
201 | BUP_VCH_SEL_3P3V, | ||
202 | }; | ||
203 | |||
204 | #define BUP_VCH_RANGE 0x02 | ||
205 | #define VBUP33_VRTCN 0x01 | ||
186 | 206 | ||
187 | /* Battery OVV constants */ | 207 | /* Battery OVV constants */ |
188 | #define BATT_OVV_ENA 0x02 | 208 | #define BATT_OVV_ENA 0x02 |
@@ -228,6 +248,8 @@ | |||
228 | #define BAT_CTRL_20U_ENA 0x02 | 248 | #define BAT_CTRL_20U_ENA 0x02 |
229 | #define BAT_CTRL_18U_ENA 0x01 | 249 | #define BAT_CTRL_18U_ENA 0x01 |
230 | #define BAT_CTRL_16U_ENA 0x02 | 250 | #define BAT_CTRL_16U_ENA 0x02 |
251 | #define BAT_CTRL_60U_ENA 0x01 | ||
252 | #define BAT_CTRL_120U_ENA 0x02 | ||
231 | #define BAT_CTRL_CMP_ENA 0x04 | 253 | #define BAT_CTRL_CMP_ENA 0x04 |
232 | #define FORCE_BAT_CTRL_CMP_HIGH 0x08 | 254 | #define FORCE_BAT_CTRL_CMP_HIGH 0x08 |
233 | #define BAT_CTRL_PULL_UP_ENA 0x10 | 255 | #define BAT_CTRL_PULL_UP_ENA 0x10 |
@@ -235,6 +257,24 @@ | |||
235 | /* Battery type */ | 257 | /* Battery type */ |
236 | #define BATTERY_UNKNOWN 00 | 258 | #define BATTERY_UNKNOWN 00 |
237 | 259 | ||
260 | /* Registers for pcut feature in ab8505 and ab9540 */ | ||
261 | #define AB8505_RTC_PCUT_CTL_STATUS_REG 0x12 | ||
262 | #define AB8505_RTC_PCUT_TIME_REG 0x13 | ||
263 | #define AB8505_RTC_PCUT_MAX_TIME_REG 0x14 | ||
264 | #define AB8505_RTC_PCUT_FLAG_TIME_REG 0x15 | ||
265 | #define AB8505_RTC_PCUT_RESTART_REG 0x16 | ||
266 | #define AB8505_RTC_PCUT_DEBOUNCE_REG 0x17 | ||
267 | |||
268 | /* USB Power Path constants for ab8540 */ | ||
269 | #define BUS_VSYS_VOL_SELECT_MASK 0x06 | ||
270 | #define BUS_VSYS_VOL_SELECT_3P6V 0x00 | ||
271 | #define BUS_VSYS_VOL_SELECT_3P325V 0x02 | ||
272 | #define BUS_VSYS_VOL_SELECT_3P9V 0x04 | ||
273 | #define BUS_VSYS_VOL_SELECT_4P3V 0x06 | ||
274 | #define BUS_POWER_PATH_MODE_ENA 0x01 | ||
275 | #define BUS_PP_PRECHG_CURRENT_MASK 0x0E | ||
276 | #define BUS_POWER_PATH_PRECHG_ENA 0x01 | ||
277 | |||
238 | /** | 278 | /** |
239 | * struct res_to_temp - defines one point in a temp to res curve. To | 279 | * struct res_to_temp - defines one point in a temp to res curve. To |
240 | * be used in battery packs that combines the identification resistor with a | 280 | * be used in battery packs that combines the identification resistor with a |
@@ -283,6 +323,11 @@ struct ab8500_fg; | |||
283 | * points. | 323 | * points. |
284 | * @maint_thres This is the threshold where we stop reporting | 324 | * @maint_thres This is the threshold where we stop reporting |
285 | * battery full while in maintenance, in per cent | 325 | * battery full while in maintenance, in per cent |
326 | * @pcut_enable: Enable power cut feature in ab8505 | ||
327 | * @pcut_max_time: Max time threshold | ||
328 | * @pcut_flag_time: Flagtime threshold | ||
329 | * @pcut_max_restart: Max number of restarts | ||
330 | * @pcut_debunce_time: Sets battery debounce time | ||
286 | */ | 331 | */ |
287 | struct ab8500_fg_parameters { | 332 | struct ab8500_fg_parameters { |
288 | int recovery_sleep_timer; | 333 | int recovery_sleep_timer; |
@@ -299,6 +344,11 @@ struct ab8500_fg_parameters { | |||
299 | int battok_raising_th_sel1; | 344 | int battok_raising_th_sel1; |
300 | int user_cap_limit; | 345 | int user_cap_limit; |
301 | int maint_thres; | 346 | int maint_thres; |
347 | bool pcut_enable; | ||
348 | u8 pcut_max_time; | ||
349 | u8 pcut_flag_time; | ||
350 | u8 pcut_max_restart; | ||
351 | u8 pcut_debunce_time; | ||
302 | }; | 352 | }; |
303 | 353 | ||
304 | /** | 354 | /** |
@@ -415,6 +465,7 @@ void ab8500_fg_reinit(void); | |||
415 | void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); | 465 | void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); |
416 | struct ab8500_btemp *ab8500_btemp_get(void); | 466 | struct ab8500_btemp *ab8500_btemp_get(void); |
417 | int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp); | 467 | int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp); |
468 | int ab8500_btemp_get_temp(struct ab8500_btemp *btemp); | ||
418 | struct ab8500_fg *ab8500_fg_get(void); | 469 | struct ab8500_fg *ab8500_fg_get(void); |
419 | int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev); | 470 | int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev); |
420 | int ab8500_fg_inst_curr_start(struct ab8500_fg *di); | 471 | int ab8500_fg_inst_curr_start(struct ab8500_fg *di); |
diff --git a/include/linux/mfd/abx500/ab8500-gpadc.h b/include/linux/mfd/abx500/ab8500-gpadc.h index 252966769d93..49ded001049b 100644 --- a/include/linux/mfd/abx500/ab8500-gpadc.h +++ b/include/linux/mfd/abx500/ab8500-gpadc.h | |||
@@ -4,32 +4,72 @@ | |||
4 | * | 4 | * |
5 | * Author: Arun R Murthy <arun.murthy@stericsson.com> | 5 | * Author: Arun R Murthy <arun.murthy@stericsson.com> |
6 | * Author: Daniel Willerud <daniel.willerud@stericsson.com> | 6 | * Author: Daniel Willerud <daniel.willerud@stericsson.com> |
7 | * Author: M'boumba Cedric Madianga <cedric.madianga@stericsson.com> | ||
7 | */ | 8 | */ |
8 | 9 | ||
9 | #ifndef _AB8500_GPADC_H | 10 | #ifndef _AB8500_GPADC_H |
10 | #define _AB8500_GPADC_H | 11 | #define _AB8500_GPADC_H |
11 | 12 | ||
12 | /* GPADC source: From datasheet(ADCSwSel[4:0] in GPADCCtrl2) */ | 13 | /* GPADC source: From datasheet(ADCSwSel[4:0] in GPADCCtrl2 |
13 | #define BAT_CTRL 0x01 | 14 | * and ADCHwSel[4:0] in GPADCCtrl3 ) */ |
14 | #define BTEMP_BALL 0x02 | 15 | #define BAT_CTRL 0x01 |
15 | #define MAIN_CHARGER_V 0x03 | 16 | #define BTEMP_BALL 0x02 |
16 | #define ACC_DETECT1 0x04 | 17 | #define MAIN_CHARGER_V 0x03 |
17 | #define ACC_DETECT2 0x05 | 18 | #define ACC_DETECT1 0x04 |
18 | #define ADC_AUX1 0x06 | 19 | #define ACC_DETECT2 0x05 |
19 | #define ADC_AUX2 0x07 | 20 | #define ADC_AUX1 0x06 |
20 | #define MAIN_BAT_V 0x08 | 21 | #define ADC_AUX2 0x07 |
21 | #define VBUS_V 0x09 | 22 | #define MAIN_BAT_V 0x08 |
22 | #define MAIN_CHARGER_C 0x0A | 23 | #define VBUS_V 0x09 |
23 | #define USB_CHARGER_C 0x0B | 24 | #define MAIN_CHARGER_C 0x0A |
24 | #define BK_BAT_V 0x0C | 25 | #define USB_CHARGER_C 0x0B |
25 | #define DIE_TEMP 0x0D | 26 | #define BK_BAT_V 0x0C |
27 | #define DIE_TEMP 0x0D | ||
28 | #define USB_ID 0x0E | ||
29 | #define XTAL_TEMP 0x12 | ||
30 | #define VBAT_TRUE_MEAS 0x13 | ||
31 | #define BAT_CTRL_AND_IBAT 0x1C | ||
32 | #define VBAT_MEAS_AND_IBAT 0x1D | ||
33 | #define VBAT_TRUE_MEAS_AND_IBAT 0x1E | ||
34 | #define BAT_TEMP_AND_IBAT 0x1F | ||
35 | |||
36 | /* Virtual channel used only for ibat convertion to ampere | ||
37 | * Battery current conversion (ibat) cannot be requested as a single conversion | ||
38 | * but it is always in combination with other input requests | ||
39 | */ | ||
40 | #define IBAT_VIRTUAL_CHANNEL 0xFF | ||
41 | |||
42 | #define SAMPLE_1 1 | ||
43 | #define SAMPLE_4 4 | ||
44 | #define SAMPLE_8 8 | ||
45 | #define SAMPLE_16 16 | ||
46 | #define RISING_EDGE 0 | ||
47 | #define FALLING_EDGE 1 | ||
48 | |||
49 | /* Arbitrary ADC conversion type constants */ | ||
50 | #define ADC_SW 0 | ||
51 | #define ADC_HW 1 | ||
26 | 52 | ||
27 | struct ab8500_gpadc; | 53 | struct ab8500_gpadc; |
28 | 54 | ||
29 | struct ab8500_gpadc *ab8500_gpadc_get(char *name); | 55 | struct ab8500_gpadc *ab8500_gpadc_get(char *name); |
30 | int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel); | 56 | int ab8500_gpadc_sw_hw_convert(struct ab8500_gpadc *gpadc, u8 channel, |
31 | int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel); | 57 | u8 avg_sample, u8 trig_edge, u8 trig_timer, u8 conv_type); |
58 | static inline int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel) | ||
59 | { | ||
60 | return ab8500_gpadc_sw_hw_convert(gpadc, channel, | ||
61 | SAMPLE_16, 0, 0, ADC_SW); | ||
62 | } | ||
63 | |||
64 | int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel, | ||
65 | u8 avg_sample, u8 trig_edge, u8 trig_timer, u8 conv_type); | ||
66 | int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel, | ||
67 | u8 avg_sample, u8 trig_edge, u8 trig_timer, u8 conv_type, | ||
68 | int *ibat); | ||
32 | int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc, | 69 | int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc, |
33 | u8 channel, int ad_value); | 70 | u8 channel, int ad_value); |
71 | void ab8540_gpadc_get_otp(struct ab8500_gpadc *gpadc, | ||
72 | u16 *vmain_l, u16 *vmain_h, u16 *btemp_l, u16 *btemp_h, | ||
73 | u16 *vbat_l, u16 *vbat_h, u16 *ibat_l, u16 *ibat_h); | ||
34 | 74 | ||
35 | #endif /* _AB8500_GPADC_H */ | 75 | #endif /* _AB8500_GPADC_H */ |
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h index ebf12e793db9..990bc93f46e1 100644 --- a/include/linux/mfd/abx500/ab8500-sysctrl.h +++ b/include/linux/mfd/abx500/ab8500-sysctrl.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | int ab8500_sysctrl_read(u16 reg, u8 *value); | 13 | int ab8500_sysctrl_read(u16 reg, u8 *value); |
14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); | 14 | int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); |
15 | void ab8500_restart(char mode, const char *cmd); | ||
15 | 16 | ||
16 | #else | 17 | #else |
17 | 18 | ||
@@ -40,6 +41,7 @@ static inline int ab8500_sysctrl_clear(u16 reg, u8 bits) | |||
40 | /* Configuration data for SysClkReq1RfClkBuf - SysClkReq8RfClkBuf */ | 41 | /* Configuration data for SysClkReq1RfClkBuf - SysClkReq8RfClkBuf */ |
41 | struct ab8500_sysctrl_platform_data { | 42 | struct ab8500_sysctrl_platform_data { |
42 | u8 initial_req_buf_config[8]; | 43 | u8 initial_req_buf_config[8]; |
44 | u16 (*reboot_reason_code)(const char *cmd); | ||
43 | }; | 45 | }; |
44 | 46 | ||
45 | /* Registers */ | 47 | /* Registers */ |
@@ -299,4 +301,8 @@ struct ab8500_sysctrl_platform_data { | |||
299 | #define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_MASK 0xFF | 301 | #define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_MASK 0xFF |
300 | #define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_SHIFT 0 | 302 | #define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_SHIFT 0 |
301 | 303 | ||
304 | #define AB8500_ENABLE_WD 0x1 | ||
305 | #define AB8500_KICK_WD 0x2 | ||
306 | #define AB8500_WD_RESTART_ON_EXPIRE 0x10 | ||
307 | |||
302 | #endif /* __AB8500_SYSCTRL_H */ | 308 | #endif /* __AB8500_SYSCTRL_H */ |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 9db0bda446a0..fb1bf7d6a410 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
@@ -362,10 +362,10 @@ struct ab8500 { | |||
362 | u8 *oldmask; | 362 | u8 *oldmask; |
363 | int mask_size; | 363 | int mask_size; |
364 | const int *irq_reg_offset; | 364 | const int *irq_reg_offset; |
365 | int it_latchhier_num; | ||
365 | }; | 366 | }; |
366 | 367 | ||
367 | struct regulator_reg_init; | 368 | struct ab8500_regulator_platform_data; |
368 | struct regulator_init_data; | ||
369 | struct ab8500_gpio_platform_data; | 369 | struct ab8500_gpio_platform_data; |
370 | struct ab8500_codec_platform_data; | 370 | struct ab8500_codec_platform_data; |
371 | struct ab8500_sysctrl_platform_data; | 371 | struct ab8500_sysctrl_platform_data; |
@@ -375,19 +375,13 @@ struct ab8500_sysctrl_platform_data; | |||
375 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | 375 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used |
376 | * @pm_power_off: Should machine pm power off hook be registered or not | 376 | * @pm_power_off: Should machine pm power off hook be registered or not |
377 | * @init: board-specific initialization after detection of ab8500 | 377 | * @init: board-specific initialization after detection of ab8500 |
378 | * @num_regulator_reg_init: number of regulator init registers | ||
379 | * @regulator_reg_init: regulator init registers | ||
380 | * @num_regulator: number of regulators | ||
381 | * @regulator: machine-specific constraints for regulators | 378 | * @regulator: machine-specific constraints for regulators |
382 | */ | 379 | */ |
383 | struct ab8500_platform_data { | 380 | struct ab8500_platform_data { |
384 | int irq_base; | 381 | int irq_base; |
385 | bool pm_power_off; | 382 | bool pm_power_off; |
386 | void (*init) (struct ab8500 *); | 383 | void (*init) (struct ab8500 *); |
387 | int num_regulator_reg_init; | 384 | struct ab8500_regulator_platform_data *regulator; |
388 | struct ab8500_regulator_reg_init *regulator_reg_init; | ||
389 | int num_regulator; | ||
390 | struct regulator_init_data *regulator; | ||
391 | struct abx500_gpio_platform_data *gpio; | 385 | struct abx500_gpio_platform_data *gpio; |
392 | struct ab8500_codec_platform_data *codec; | 386 | struct ab8500_codec_platform_data *codec; |
393 | struct ab8500_sysctrl_platform_data *sysctrl; | 387 | struct ab8500_sysctrl_platform_data *sysctrl; |
@@ -512,6 +506,8 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab) | |||
512 | return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0)); | 506 | return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0)); |
513 | } | 507 | } |
514 | 508 | ||
509 | void ab8500_override_turn_on_stat(u8 mask, u8 set); | ||
510 | |||
515 | #ifdef CONFIG_AB8500_DEBUG | 511 | #ifdef CONFIG_AB8500_DEBUG |
516 | void ab8500_dump_all_banks(struct device *dev); | 512 | void ab8500_dump_all_banks(struct device *dev); |
517 | void ab8500_debug_register_interrupt(int line); | 513 | void ab8500_debug_register_interrupt(int line); |
diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/include/linux/mfd/abx500/ux500_chargalg.h index d43ac0f35526..234c99143bf7 100644 --- a/include/linux/mfd/abx500/ux500_chargalg.h +++ b/include/linux/mfd/abx500/ux500_chargalg.h | |||
@@ -17,8 +17,11 @@ struct ux500_charger; | |||
17 | 17 | ||
18 | struct ux500_charger_ops { | 18 | struct ux500_charger_ops { |
19 | int (*enable) (struct ux500_charger *, int, int, int); | 19 | int (*enable) (struct ux500_charger *, int, int, int); |
20 | int (*check_enable) (struct ux500_charger *, int, int); | ||
20 | int (*kick_wd) (struct ux500_charger *); | 21 | int (*kick_wd) (struct ux500_charger *); |
21 | int (*update_curr) (struct ux500_charger *, int); | 22 | int (*update_curr) (struct ux500_charger *, int); |
23 | int (*pp_enable) (struct ux500_charger *, bool); | ||
24 | int (*pre_chg_enable) (struct ux500_charger *, bool); | ||
22 | }; | 25 | }; |
23 | 26 | ||
24 | /** | 27 | /** |
@@ -29,6 +32,7 @@ struct ux500_charger_ops { | |||
29 | * @max_out_curr maximum output charger current in mA | 32 | * @max_out_curr maximum output charger current in mA |
30 | * @enabled indicates if this charger is used or not | 33 | * @enabled indicates if this charger is used or not |
31 | * @external external charger unit (pm2xxx) | 34 | * @external external charger unit (pm2xxx) |
35 | * @power_path USB power path support | ||
32 | */ | 36 | */ |
33 | struct ux500_charger { | 37 | struct ux500_charger { |
34 | struct power_supply psy; | 38 | struct power_supply psy; |
@@ -38,6 +42,9 @@ struct ux500_charger { | |||
38 | int wdt_refresh; | 42 | int wdt_refresh; |
39 | bool enabled; | 43 | bool enabled; |
40 | bool external; | 44 | bool external; |
45 | bool power_path; | ||
41 | }; | 46 | }; |
42 | 47 | ||
48 | extern struct blocking_notifier_head charger_notifier_list; | ||
49 | |||
43 | #endif | 50 | #endif |
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index a710255528d7..cc281368dc55 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
@@ -100,6 +100,9 @@ struct arizona { | |||
100 | struct regmap_irq_chip_data *aod_irq_chip; | 100 | struct regmap_irq_chip_data *aod_irq_chip; |
101 | struct regmap_irq_chip_data *irq_chip; | 101 | struct regmap_irq_chip_data *irq_chip; |
102 | 102 | ||
103 | bool hpdet_magic; | ||
104 | unsigned int hp_ena; | ||
105 | |||
103 | struct mutex clk_lock; | 106 | struct mutex clk_lock; |
104 | int clk32k_ref; | 107 | int clk32k_ref; |
105 | 108 | ||
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 455c51d22d6b..a0f940987a3e 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
@@ -86,6 +86,11 @@ struct arizona_micd_config { | |||
86 | bool gpio; | 86 | bool gpio; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | struct arizona_micd_range { | ||
90 | int max; /** Ohms */ | ||
91 | int key; /** Key to report to input layer */ | ||
92 | }; | ||
93 | |||
89 | struct arizona_pdata { | 94 | struct arizona_pdata { |
90 | int reset; /** GPIO controlling /RESET, if any */ | 95 | int reset; /** GPIO controlling /RESET, if any */ |
91 | int ldoena; /** GPIO controlling LODENA, if any */ | 96 | int ldoena; /** GPIO controlling LODENA, if any */ |
@@ -117,12 +122,21 @@ struct arizona_pdata { | |||
117 | /** GPIO5 is used for jack detection */ | 122 | /** GPIO5 is used for jack detection */ |
118 | bool jd_gpio5; | 123 | bool jd_gpio5; |
119 | 124 | ||
125 | /** Internal pull on GPIO5 is disabled when used for jack detection */ | ||
126 | bool jd_gpio5_nopull; | ||
127 | |||
120 | /** Use the headphone detect circuit to identify the accessory */ | 128 | /** Use the headphone detect circuit to identify the accessory */ |
121 | bool hpdet_acc_id; | 129 | bool hpdet_acc_id; |
122 | 130 | ||
131 | /** Check for line output with HPDET method */ | ||
132 | bool hpdet_acc_id_line; | ||
133 | |||
123 | /** GPIO used for mic isolation with HPDET */ | 134 | /** GPIO used for mic isolation with HPDET */ |
124 | int hpdet_id_gpio; | 135 | int hpdet_id_gpio; |
125 | 136 | ||
137 | /** Extra debounce timeout used during initial mic detection (ms) */ | ||
138 | int micd_detect_debounce; | ||
139 | |||
126 | /** GPIO for mic detection polarity */ | 140 | /** GPIO for mic detection polarity */ |
127 | int micd_pol_gpio; | 141 | int micd_pol_gpio; |
128 | 142 | ||
@@ -135,9 +149,16 @@ struct arizona_pdata { | |||
135 | /** Mic detect debounce level */ | 149 | /** Mic detect debounce level */ |
136 | int micd_dbtime; | 150 | int micd_dbtime; |
137 | 151 | ||
152 | /** Mic detect timeout (ms) */ | ||
153 | int micd_timeout; | ||
154 | |||
138 | /** Force MICBIAS on for mic detect */ | 155 | /** Force MICBIAS on for mic detect */ |
139 | bool micd_force_micbias; | 156 | bool micd_force_micbias; |
140 | 157 | ||
158 | /** Mic detect level parameters */ | ||
159 | const struct arizona_micd_range *micd_ranges; | ||
160 | int num_micd_ranges; | ||
161 | |||
141 | /** Headset polarity configurations */ | 162 | /** Headset polarity configurations */ |
142 | struct arizona_micd_config *micd_configs; | 163 | struct arizona_micd_config *micd_configs; |
143 | int num_micd_configs; | 164 | int num_micd_configs; |
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index 340355136069..f43aa7c8d040 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
@@ -124,6 +124,10 @@ | |||
124 | #define ARIZONA_MIC_DETECT_1 0x2A3 | 124 | #define ARIZONA_MIC_DETECT_1 0x2A3 |
125 | #define ARIZONA_MIC_DETECT_2 0x2A4 | 125 | #define ARIZONA_MIC_DETECT_2 0x2A4 |
126 | #define ARIZONA_MIC_DETECT_3 0x2A5 | 126 | #define ARIZONA_MIC_DETECT_3 0x2A5 |
127 | #define ARIZONA_MIC_DETECT_LEVEL_1 0x2A6 | ||
128 | #define ARIZONA_MIC_DETECT_LEVEL_2 0x2A7 | ||
129 | #define ARIZONA_MIC_DETECT_LEVEL_3 0x2A8 | ||
130 | #define ARIZONA_MIC_DETECT_LEVEL_4 0x2A9 | ||
127 | #define ARIZONA_MIC_NOISE_MIX_CONTROL_1 0x2C3 | 131 | #define ARIZONA_MIC_NOISE_MIX_CONTROL_1 0x2C3 |
128 | #define ARIZONA_ISOLATION_CONTROL 0x2CB | 132 | #define ARIZONA_ISOLATION_CONTROL 0x2CB |
129 | #define ARIZONA_JACK_DETECT_ANALOGUE 0x2D3 | 133 | #define ARIZONA_JACK_DETECT_ANALOGUE 0x2D3 |
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index 3bbda22721ea..ecddc5173c7c 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h | |||
@@ -109,19 +109,6 @@ struct palmas_reg_init { | |||
109 | */ | 109 | */ |
110 | int mode_sleep; | 110 | int mode_sleep; |
111 | 111 | ||
112 | /* tstep is the timestep loaded to the TSTEP register | ||
113 | * | ||
114 | * For SMPS | ||
115 | * | ||
116 | * 0: Jump (no slope control) | ||
117 | * 1: 10mV/us | ||
118 | * 2: 5mV/us | ||
119 | * 3: 2.5mV/us | ||
120 | * | ||
121 | * For LDO unused | ||
122 | */ | ||
123 | int tstep; | ||
124 | |||
125 | /* voltage_sel is the bitfield loaded onto the SMPSX_VOLTAGE | 112 | /* voltage_sel is the bitfield loaded onto the SMPSX_VOLTAGE |
126 | * register. Set this is the default voltage set in OTP needs | 113 | * register. Set this is the default voltage set in OTP needs |
127 | * to be overridden. | 114 | * to be overridden. |
@@ -154,6 +141,12 @@ enum palmas_regulators { | |||
154 | PALMAS_REG_LDO9, | 141 | PALMAS_REG_LDO9, |
155 | PALMAS_REG_LDOLN, | 142 | PALMAS_REG_LDOLN, |
156 | PALMAS_REG_LDOUSB, | 143 | PALMAS_REG_LDOUSB, |
144 | /* External regulators */ | ||
145 | PALMAS_REG_REGEN1, | ||
146 | PALMAS_REG_REGEN2, | ||
147 | PALMAS_REG_REGEN3, | ||
148 | PALMAS_REG_SYSEN1, | ||
149 | PALMAS_REG_SYSEN2, | ||
157 | /* Total number of regulators */ | 150 | /* Total number of regulators */ |
158 | PALMAS_NUM_REGS, | 151 | PALMAS_NUM_REGS, |
159 | }; | 152 | }; |
@@ -171,6 +164,9 @@ struct palmas_pmic_platform_data { | |||
171 | 164 | ||
172 | /* use LDO6 for vibrator control */ | 165 | /* use LDO6 for vibrator control */ |
173 | int ldo6_vibrator; | 166 | int ldo6_vibrator; |
167 | |||
168 | /* Enable tracking mode of LDO8 */ | ||
169 | bool enable_ldo8_tracking; | ||
174 | }; | 170 | }; |
175 | 171 | ||
176 | struct palmas_usb_platform_data { | 172 | struct palmas_usb_platform_data { |
@@ -331,6 +327,8 @@ struct palmas_pmic { | |||
331 | int smps457; | 327 | int smps457; |
332 | 328 | ||
333 | int range[PALMAS_REG_SMPS10]; | 329 | int range[PALMAS_REG_SMPS10]; |
330 | unsigned int ramp_delay[PALMAS_REG_SMPS10]; | ||
331 | unsigned int current_reg_mode[PALMAS_REG_SMPS10]; | ||
334 | }; | 332 | }; |
335 | 333 | ||
336 | struct palmas_resource { | 334 | struct palmas_resource { |
diff --git a/include/linux/mfd/si476x-core.h b/include/linux/mfd/si476x-core.h deleted file mode 100644 index 2136b2631dc3..000000000000 --- a/include/linux/mfd/si476x-core.h +++ /dev/null | |||
@@ -1,525 +0,0 @@ | |||
1 | /* | ||
2 | * include/media/si476x-core.h -- Common definitions for si476x core | ||
3 | * device | ||
4 | * | ||
5 | * Copyright (C) 2012 Innovative Converged Devices(ICD) | ||
6 | * | ||
7 | * Author: Andrey Smirnov <andrey.smirnov@convergeddevices.net> | ||
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; version 2 of the License. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef SI476X_CORE_H | ||
21 | #define SI476X_CORE_H | ||
22 | |||
23 | #include <linux/kfifo.h> | ||
24 | #include <linux/atomic.h> | ||
25 | #include <linux/i2c.h> | ||
26 | #include <linux/regmap.h> | ||
27 | #include <linux/mutex.h> | ||
28 | #include <linux/mfd/core.h> | ||
29 | #include <linux/videodev2.h> | ||
30 | #include <linux/regulator/consumer.h> | ||
31 | |||
32 | #include <media/si476x.h> | ||
33 | |||
34 | /* Command Timeouts */ | ||
35 | #define SI476X_DEFAULT_TIMEOUT 100000 | ||
36 | #define SI476X_TIMEOUT_TUNE 700000 | ||
37 | #define SI476X_TIMEOUT_POWER_UP 330000 | ||
38 | #define SI476X_STATUS_POLL_US 0 | ||
39 | |||
40 | /* -------------------- si476x-i2c.c ----------------------- */ | ||
41 | |||
42 | enum si476x_freq_supported_chips { | ||
43 | SI476X_CHIP_SI4761 = 1, | ||
44 | SI476X_CHIP_SI4764, | ||
45 | SI476X_CHIP_SI4768, | ||
46 | }; | ||
47 | |||
48 | enum si476x_mfd_cells { | ||
49 | SI476X_RADIO_CELL = 0, | ||
50 | SI476X_CODEC_CELL, | ||
51 | SI476X_MFD_CELLS, | ||
52 | }; | ||
53 | |||
54 | /** | ||
55 | * enum si476x_power_state - possible power state of the si476x | ||
56 | * device. | ||
57 | * | ||
58 | * @SI476X_POWER_DOWN: In this state all regulators are turned off | ||
59 | * and the reset line is pulled low. The device is completely | ||
60 | * inactive. | ||
61 | * @SI476X_POWER_UP_FULL: In this state all the power regualtors are | ||
62 | * turned on, reset line pulled high, IRQ line is enabled(polling is | ||
63 | * active for polling use scenario) and device is turned on with | ||
64 | * POWER_UP command. The device is ready to be used. | ||
65 | * @SI476X_POWER_INCONSISTENT: This state indicates that previous | ||
66 | * power down was inconsistent, meaning some of the regulators were | ||
67 | * not turned down and thus use of the device, without power-cycling | ||
68 | * is impossible. | ||
69 | */ | ||
70 | enum si476x_power_state { | ||
71 | SI476X_POWER_DOWN = 0, | ||
72 | SI476X_POWER_UP_FULL = 1, | ||
73 | SI476X_POWER_INCONSISTENT = 2, | ||
74 | }; | ||
75 | |||
76 | /** | ||
77 | * struct si476x_core - internal data structure representing the | ||
78 | * underlying "core" device which all the MFD cell-devices use. | ||
79 | * | ||
80 | * @client: Actual I2C client used to transfer commands to the chip. | ||
81 | * @chip_id: Last digit of the chip model(E.g. "1" for SI4761) | ||
82 | * @cells: MFD cell devices created by this driver. | ||
83 | * @cmd_lock: Mutex used to serialize all the requests to the core | ||
84 | * device. This filed should not be used directly. Instead | ||
85 | * si476x_core_lock()/si476x_core_unlock() should be used to get | ||
86 | * exclusive access to the "core" device. | ||
87 | * @users: Active users counter(Used by the radio cell) | ||
88 | * @rds_read_queue: Wait queue used to wait for RDS data. | ||
89 | * @rds_fifo: FIFO in which all the RDS data received from the chip is | ||
90 | * placed. | ||
91 | * @rds_fifo_drainer: Worker that drains on-chip RDS FIFO. | ||
92 | * @rds_drainer_is_working: Flag used for launching only one instance | ||
93 | * of the @rds_fifo_drainer. | ||
94 | * @rds_drainer_status_lock: Lock used to guard access to the | ||
95 | * @rds_drainer_is_working variable. | ||
96 | * @command: Wait queue for wainting on the command comapletion. | ||
97 | * @cts: Clear To Send flag set upon receiving first status with CTS | ||
98 | * set. | ||
99 | * @tuning: Wait queue used for wainting for tune/seek comand | ||
100 | * completion. | ||
101 | * @stc: Similar to @cts, but for the STC bit of the status value. | ||
102 | * @power_up_parameters: Parameters used as argument for POWER_UP | ||
103 | * command when the device is started. | ||
104 | * @state: Current power state of the device. | ||
105 | * @supplues: Structure containing handles to all power supplies used | ||
106 | * by the device (NULL ones are ignored). | ||
107 | * @gpio_reset: GPIO pin connectet to the RSTB pin of the chip. | ||
108 | * @pinmux: Chip's configurable pins configuration. | ||
109 | * @diversity_mode: Chips role when functioning in diversity mode. | ||
110 | * @status_monitor: Polling worker used in polling use case scenarion | ||
111 | * (when IRQ is not avalible). | ||
112 | * @revision: Chip's running firmware revision number(Used for correct | ||
113 | * command set support). | ||
114 | */ | ||
115 | |||
116 | struct si476x_core { | ||
117 | struct i2c_client *client; | ||
118 | struct regmap *regmap; | ||
119 | int chip_id; | ||
120 | struct mfd_cell cells[SI476X_MFD_CELLS]; | ||
121 | |||
122 | struct mutex cmd_lock; /* for serializing fm radio operations */ | ||
123 | atomic_t users; | ||
124 | |||
125 | wait_queue_head_t rds_read_queue; | ||
126 | struct kfifo rds_fifo; | ||
127 | struct work_struct rds_fifo_drainer; | ||
128 | bool rds_drainer_is_working; | ||
129 | struct mutex rds_drainer_status_lock; | ||
130 | |||
131 | wait_queue_head_t command; | ||
132 | atomic_t cts; | ||
133 | |||
134 | wait_queue_head_t tuning; | ||
135 | atomic_t stc; | ||
136 | |||
137 | struct si476x_power_up_args power_up_parameters; | ||
138 | |||
139 | enum si476x_power_state power_state; | ||
140 | |||
141 | struct regulator_bulk_data supplies[4]; | ||
142 | |||
143 | int gpio_reset; | ||
144 | |||
145 | struct si476x_pinmux pinmux; | ||
146 | enum si476x_phase_diversity_mode diversity_mode; | ||
147 | |||
148 | atomic_t is_alive; | ||
149 | |||
150 | struct delayed_work status_monitor; | ||
151 | #define SI476X_WORK_TO_CORE(w) container_of(to_delayed_work(w), \ | ||
152 | struct si476x_core, \ | ||
153 | status_monitor) | ||
154 | |||
155 | int revision; | ||
156 | |||
157 | int rds_fifo_depth; | ||
158 | }; | ||
159 | |||
160 | static inline struct si476x_core *i2c_mfd_cell_to_core(struct device *dev) | ||
161 | { | ||
162 | struct i2c_client *client = to_i2c_client(dev->parent); | ||
163 | return i2c_get_clientdata(client); | ||
164 | } | ||
165 | |||
166 | |||
167 | /** | ||
168 | * si476x_core_lock() - lock the core device to get an exclusive access | ||
169 | * to it. | ||
170 | */ | ||
171 | static inline void si476x_core_lock(struct si476x_core *core) | ||
172 | { | ||
173 | mutex_lock(&core->cmd_lock); | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * si476x_core_unlock() - unlock the core device to relinquish an | ||
178 | * exclusive access to it. | ||
179 | */ | ||
180 | static inline void si476x_core_unlock(struct si476x_core *core) | ||
181 | { | ||
182 | mutex_unlock(&core->cmd_lock); | ||
183 | } | ||
184 | |||
185 | /* *_TUNE_FREQ family of commands accept frequency in multiples of | ||
186 | 10kHz */ | ||
187 | static inline u16 hz_to_si476x(struct si476x_core *core, int freq) | ||
188 | { | ||
189 | u16 result; | ||
190 | |||
191 | switch (core->power_up_parameters.func) { | ||
192 | default: | ||
193 | case SI476X_FUNC_FM_RECEIVER: | ||
194 | result = freq / 10000; | ||
195 | break; | ||
196 | case SI476X_FUNC_AM_RECEIVER: | ||
197 | result = freq / 1000; | ||
198 | break; | ||
199 | } | ||
200 | |||
201 | return result; | ||
202 | } | ||
203 | |||
204 | static inline int si476x_to_hz(struct si476x_core *core, u16 freq) | ||
205 | { | ||
206 | int result; | ||
207 | |||
208 | switch (core->power_up_parameters.func) { | ||
209 | default: | ||
210 | case SI476X_FUNC_FM_RECEIVER: | ||
211 | result = freq * 10000; | ||
212 | break; | ||
213 | case SI476X_FUNC_AM_RECEIVER: | ||
214 | result = freq * 1000; | ||
215 | break; | ||
216 | } | ||
217 | |||
218 | return result; | ||
219 | } | ||
220 | |||
221 | /* Since the V4L2_TUNER_CAP_LOW flag is supplied, V4L2 subsystem | ||
222 | * mesures frequency in 62.5 Hz units */ | ||
223 | |||
224 | static inline int hz_to_v4l2(int freq) | ||
225 | { | ||
226 | return (freq * 10) / 625; | ||
227 | } | ||
228 | |||
229 | static inline int v4l2_to_hz(int freq) | ||
230 | { | ||
231 | return (freq * 625) / 10; | ||
232 | } | ||
233 | |||
234 | static inline u16 v4l2_to_si476x(struct si476x_core *core, int freq) | ||
235 | { | ||
236 | return hz_to_si476x(core, v4l2_to_hz(freq)); | ||
237 | } | ||
238 | |||
239 | static inline int si476x_to_v4l2(struct si476x_core *core, u16 freq) | ||
240 | { | ||
241 | return hz_to_v4l2(si476x_to_hz(core, freq)); | ||
242 | } | ||
243 | |||
244 | |||
245 | |||
246 | /** | ||
247 | * struct si476x_func_info - structure containing result of the | ||
248 | * FUNC_INFO command. | ||
249 | * | ||
250 | * @firmware.major: Firmware major number. | ||
251 | * @firmware.minor[...]: Firmware minor numbers. | ||
252 | * @patch_id: | ||
253 | * @func: Mode tuner is working in. | ||
254 | */ | ||
255 | struct si476x_func_info { | ||
256 | struct { | ||
257 | u8 major, minor[2]; | ||
258 | } firmware; | ||
259 | u16 patch_id; | ||
260 | enum si476x_func func; | ||
261 | }; | ||
262 | |||
263 | /** | ||
264 | * struct si476x_power_down_args - structure used to pass parameters | ||
265 | * to POWER_DOWN command | ||
266 | * | ||
267 | * @xosc: true - Power down, but leav oscillator running. | ||
268 | * false - Full power down. | ||
269 | */ | ||
270 | struct si476x_power_down_args { | ||
271 | bool xosc; | ||
272 | }; | ||
273 | |||
274 | /** | ||
275 | * enum si476x_tunemode - enum representing possible tune modes for | ||
276 | * the chip. | ||
277 | * @SI476X_TM_VALIDATED_NORMAL_TUNE: Unconditionally stay on the new | ||
278 | * channel after tune, tune status is valid. | ||
279 | * @SI476X_TM_INVALIDATED_FAST_TUNE: Unconditionally stay in the new | ||
280 | * channel after tune, tune status invalid. | ||
281 | * @SI476X_TM_VALIDATED_AF_TUNE: Jump back to previous channel if | ||
282 | * metric thresholds are not met. | ||
283 | * @SI476X_TM_VALIDATED_AF_CHECK: Unconditionally jump back to the | ||
284 | * previous channel. | ||
285 | */ | ||
286 | enum si476x_tunemode { | ||
287 | SI476X_TM_VALIDATED_NORMAL_TUNE = 0, | ||
288 | SI476X_TM_INVALIDATED_FAST_TUNE = 1, | ||
289 | SI476X_TM_VALIDATED_AF_TUNE = 2, | ||
290 | SI476X_TM_VALIDATED_AF_CHECK = 3, | ||
291 | }; | ||
292 | |||
293 | /** | ||
294 | * enum si476x_smoothmetrics - enum containing the possible setting fo | ||
295 | * audio transitioning of the chip | ||
296 | * @SI476X_SM_INITIALIZE_AUDIO: Initialize audio state to match this | ||
297 | * new channel | ||
298 | * @SI476X_SM_TRANSITION_AUDIO: Transition audio state from previous | ||
299 | * channel values to the new values | ||
300 | */ | ||
301 | enum si476x_smoothmetrics { | ||
302 | SI476X_SM_INITIALIZE_AUDIO = 0, | ||
303 | SI476X_SM_TRANSITION_AUDIO = 1, | ||
304 | }; | ||
305 | |||
306 | /** | ||
307 | * struct si476x_rds_status_report - the structure representing the | ||
308 | * response to 'FM_RD_STATUS' command | ||
309 | * @rdstpptyint: Traffic program flag(TP) and/or program type(PTY) | ||
310 | * code has changed. | ||
311 | * @rdspiint: Program indentifiaction(PI) code has changed. | ||
312 | * @rdssyncint: RDS synchronization has changed. | ||
313 | * @rdsfifoint: RDS was received and the RDS FIFO has at least | ||
314 | * 'FM_RDS_INTERRUPT_FIFO_COUNT' elements in it. | ||
315 | * @tpptyvalid: TP flag and PTY code are valid falg. | ||
316 | * @pivalid: PI code is valid flag. | ||
317 | * @rdssync: RDS is currently synchronized. | ||
318 | * @rdsfifolost: On or more RDS groups have been lost/discarded flag. | ||
319 | * @tp: Current channel's TP flag. | ||
320 | * @pty: Current channel's PTY code. | ||
321 | * @pi: Current channel's PI code. | ||
322 | * @rdsfifoused: Number of blocks remaining in the RDS FIFO (0 if | ||
323 | * empty). | ||
324 | */ | ||
325 | struct si476x_rds_status_report { | ||
326 | bool rdstpptyint, rdspiint, rdssyncint, rdsfifoint; | ||
327 | bool tpptyvalid, pivalid, rdssync, rdsfifolost; | ||
328 | bool tp; | ||
329 | |||
330 | u8 pty; | ||
331 | u16 pi; | ||
332 | |||
333 | u8 rdsfifoused; | ||
334 | u8 ble[4]; | ||
335 | |||
336 | struct v4l2_rds_data rds[4]; | ||
337 | }; | ||
338 | |||
339 | struct si476x_rsq_status_args { | ||
340 | bool primary; | ||
341 | bool rsqack; | ||
342 | bool attune; | ||
343 | bool cancel; | ||
344 | bool stcack; | ||
345 | }; | ||
346 | |||
347 | enum si476x_injside { | ||
348 | SI476X_INJSIDE_AUTO = 0, | ||
349 | SI476X_INJSIDE_LOW = 1, | ||
350 | SI476X_INJSIDE_HIGH = 2, | ||
351 | }; | ||
352 | |||
353 | struct si476x_tune_freq_args { | ||
354 | bool zifsr; | ||
355 | bool hd; | ||
356 | enum si476x_injside injside; | ||
357 | int freq; | ||
358 | enum si476x_tunemode tunemode; | ||
359 | enum si476x_smoothmetrics smoothmetrics; | ||
360 | int antcap; | ||
361 | }; | ||
362 | |||
363 | int si476x_core_stop(struct si476x_core *, bool); | ||
364 | int si476x_core_start(struct si476x_core *, bool); | ||
365 | int si476x_core_set_power_state(struct si476x_core *, enum si476x_power_state); | ||
366 | bool si476x_core_has_am(struct si476x_core *); | ||
367 | bool si476x_core_has_diversity(struct si476x_core *); | ||
368 | bool si476x_core_is_a_secondary_tuner(struct si476x_core *); | ||
369 | bool si476x_core_is_a_primary_tuner(struct si476x_core *); | ||
370 | bool si476x_core_is_in_am_receiver_mode(struct si476x_core *core); | ||
371 | bool si476x_core_is_powered_up(struct si476x_core *core); | ||
372 | |||
373 | enum si476x_i2c_type { | ||
374 | SI476X_I2C_SEND, | ||
375 | SI476X_I2C_RECV | ||
376 | }; | ||
377 | |||
378 | int si476x_core_i2c_xfer(struct si476x_core *, | ||
379 | enum si476x_i2c_type, | ||
380 | char *, int); | ||
381 | |||
382 | |||
383 | /* -------------------- si476x-cmd.c ----------------------- */ | ||
384 | |||
385 | int si476x_core_cmd_func_info(struct si476x_core *, struct si476x_func_info *); | ||
386 | int si476x_core_cmd_set_property(struct si476x_core *, u16, u16); | ||
387 | int si476x_core_cmd_get_property(struct si476x_core *, u16); | ||
388 | int si476x_core_cmd_dig_audio_pin_cfg(struct si476x_core *, | ||
389 | enum si476x_dclk_config, | ||
390 | enum si476x_dfs_config, | ||
391 | enum si476x_dout_config, | ||
392 | enum si476x_xout_config); | ||
393 | int si476x_core_cmd_zif_pin_cfg(struct si476x_core *, | ||
394 | enum si476x_iqclk_config, | ||
395 | enum si476x_iqfs_config, | ||
396 | enum si476x_iout_config, | ||
397 | enum si476x_qout_config); | ||
398 | int si476x_core_cmd_ic_link_gpo_ctl_pin_cfg(struct si476x_core *, | ||
399 | enum si476x_icin_config, | ||
400 | enum si476x_icip_config, | ||
401 | enum si476x_icon_config, | ||
402 | enum si476x_icop_config); | ||
403 | int si476x_core_cmd_ana_audio_pin_cfg(struct si476x_core *, | ||
404 | enum si476x_lrout_config); | ||
405 | int si476x_core_cmd_intb_pin_cfg(struct si476x_core *, enum si476x_intb_config, | ||
406 | enum si476x_a1_config); | ||
407 | int si476x_core_cmd_fm_seek_start(struct si476x_core *, bool, bool); | ||
408 | int si476x_core_cmd_am_seek_start(struct si476x_core *, bool, bool); | ||
409 | int si476x_core_cmd_fm_rds_status(struct si476x_core *, bool, bool, bool, | ||
410 | struct si476x_rds_status_report *); | ||
411 | int si476x_core_cmd_fm_rds_blockcount(struct si476x_core *, bool, | ||
412 | struct si476x_rds_blockcount_report *); | ||
413 | int si476x_core_cmd_fm_tune_freq(struct si476x_core *, | ||
414 | struct si476x_tune_freq_args *); | ||
415 | int si476x_core_cmd_am_tune_freq(struct si476x_core *, | ||
416 | struct si476x_tune_freq_args *); | ||
417 | int si476x_core_cmd_am_rsq_status(struct si476x_core *, | ||
418 | struct si476x_rsq_status_args *, | ||
419 | struct si476x_rsq_status_report *); | ||
420 | int si476x_core_cmd_fm_rsq_status(struct si476x_core *, | ||
421 | struct si476x_rsq_status_args *, | ||
422 | struct si476x_rsq_status_report *); | ||
423 | int si476x_core_cmd_power_up(struct si476x_core *, | ||
424 | struct si476x_power_up_args *); | ||
425 | int si476x_core_cmd_power_down(struct si476x_core *, | ||
426 | struct si476x_power_down_args *); | ||
427 | int si476x_core_cmd_fm_phase_div_status(struct si476x_core *); | ||
428 | int si476x_core_cmd_fm_phase_diversity(struct si476x_core *, | ||
429 | enum si476x_phase_diversity_mode); | ||
430 | |||
431 | int si476x_core_cmd_fm_acf_status(struct si476x_core *, | ||
432 | struct si476x_acf_status_report *); | ||
433 | int si476x_core_cmd_am_acf_status(struct si476x_core *, | ||
434 | struct si476x_acf_status_report *); | ||
435 | int si476x_core_cmd_agc_status(struct si476x_core *, | ||
436 | struct si476x_agc_status_report *); | ||
437 | |||
438 | enum si476x_power_grid_type { | ||
439 | SI476X_POWER_GRID_50HZ = 0, | ||
440 | SI476X_POWER_GRID_60HZ, | ||
441 | }; | ||
442 | |||
443 | /* Properties */ | ||
444 | |||
445 | enum si476x_interrupt_flags { | ||
446 | SI476X_STCIEN = (1 << 0), | ||
447 | SI476X_ACFIEN = (1 << 1), | ||
448 | SI476X_RDSIEN = (1 << 2), | ||
449 | SI476X_RSQIEN = (1 << 3), | ||
450 | |||
451 | SI476X_ERRIEN = (1 << 6), | ||
452 | SI476X_CTSIEN = (1 << 7), | ||
453 | |||
454 | SI476X_STCREP = (1 << 8), | ||
455 | SI476X_ACFREP = (1 << 9), | ||
456 | SI476X_RDSREP = (1 << 10), | ||
457 | SI476X_RSQREP = (1 << 11), | ||
458 | }; | ||
459 | |||
460 | enum si476x_rdsint_sources { | ||
461 | SI476X_RDSTPPTY = (1 << 4), | ||
462 | SI476X_RDSPI = (1 << 3), | ||
463 | SI476X_RDSSYNC = (1 << 1), | ||
464 | SI476X_RDSRECV = (1 << 0), | ||
465 | }; | ||
466 | |||
467 | enum si476x_status_response_bits { | ||
468 | SI476X_CTS = (1 << 7), | ||
469 | SI476X_ERR = (1 << 6), | ||
470 | /* Status response for WB receiver */ | ||
471 | SI476X_WB_ASQ_INT = (1 << 4), | ||
472 | SI476X_RSQ_INT = (1 << 3), | ||
473 | /* Status response for FM receiver */ | ||
474 | SI476X_FM_RDS_INT = (1 << 2), | ||
475 | SI476X_ACF_INT = (1 << 1), | ||
476 | SI476X_STC_INT = (1 << 0), | ||
477 | }; | ||
478 | |||
479 | /* -------------------- si476x-prop.c ----------------------- */ | ||
480 | |||
481 | enum si476x_common_receiver_properties { | ||
482 | SI476X_PROP_INT_CTL_ENABLE = 0x0000, | ||
483 | SI476X_PROP_DIGITAL_IO_INPUT_SAMPLE_RATE = 0x0200, | ||
484 | SI476X_PROP_DIGITAL_IO_INPUT_FORMAT = 0x0201, | ||
485 | SI476X_PROP_DIGITAL_IO_OUTPUT_SAMPLE_RATE = 0x0202, | ||
486 | SI476X_PROP_DIGITAL_IO_OUTPUT_FORMAT = 0x0203, | ||
487 | |||
488 | SI476X_PROP_SEEK_BAND_BOTTOM = 0x1100, | ||
489 | SI476X_PROP_SEEK_BAND_TOP = 0x1101, | ||
490 | SI476X_PROP_SEEK_FREQUENCY_SPACING = 0x1102, | ||
491 | |||
492 | SI476X_PROP_VALID_MAX_TUNE_ERROR = 0x2000, | ||
493 | SI476X_PROP_VALID_SNR_THRESHOLD = 0x2003, | ||
494 | SI476X_PROP_VALID_RSSI_THRESHOLD = 0x2004, | ||
495 | }; | ||
496 | |||
497 | enum si476x_am_receiver_properties { | ||
498 | SI476X_PROP_AUDIO_PWR_LINE_FILTER = 0x0303, | ||
499 | }; | ||
500 | |||
501 | enum si476x_fm_receiver_properties { | ||
502 | SI476X_PROP_AUDIO_DEEMPHASIS = 0x0302, | ||
503 | |||
504 | SI476X_PROP_FM_RDS_INTERRUPT_SOURCE = 0x4000, | ||
505 | SI476X_PROP_FM_RDS_INTERRUPT_FIFO_COUNT = 0x4001, | ||
506 | SI476X_PROP_FM_RDS_CONFIG = 0x4002, | ||
507 | }; | ||
508 | |||
509 | enum si476x_prop_audio_pwr_line_filter_bits { | ||
510 | SI476X_PROP_PWR_HARMONICS_MASK = 0b0000000000011111, | ||
511 | SI476X_PROP_PWR_GRID_MASK = 0b0000000100000000, | ||
512 | SI476X_PROP_PWR_ENABLE_MASK = 0b0000001000000000, | ||
513 | SI476X_PROP_PWR_GRID_50HZ = 0b0000000000000000, | ||
514 | SI476X_PROP_PWR_GRID_60HZ = 0b0000000100000000, | ||
515 | }; | ||
516 | |||
517 | enum si476x_prop_fm_rds_config_bits { | ||
518 | SI476X_PROP_RDSEN_MASK = 0x1, | ||
519 | SI476X_PROP_RDSEN = 0x1, | ||
520 | }; | ||
521 | |||
522 | |||
523 | struct regmap *devm_regmap_init_si476x(struct si476x_core *); | ||
524 | |||
525 | #endif /* SI476X_CORE_H */ | ||
diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index 6694cf43e8b8..998628a2b08b 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h | |||
@@ -86,6 +86,11 @@ struct tps65090_regulator_plat_data { | |||
86 | 86 | ||
87 | struct tps65090_platform_data { | 87 | struct tps65090_platform_data { |
88 | int irq_base; | 88 | int irq_base; |
89 | |||
90 | char **supplied_to; | ||
91 | size_t num_supplicants; | ||
92 | int enable_low_current_chrg; | ||
93 | |||
89 | struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX]; | 94 | struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX]; |
90 | }; | 95 | }; |
91 | 96 | ||
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 290762f93930..29eab2bd3dfa 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
@@ -228,6 +228,7 @@ enum tps65217_bl_fdim { | |||
228 | struct tps65217_bl_pdata { | 228 | struct tps65217_bl_pdata { |
229 | enum tps65217_bl_isel isel; | 229 | enum tps65217_bl_isel isel; |
230 | enum tps65217_bl_fdim fdim; | 230 | enum tps65217_bl_fdim fdim; |
231 | int dft_brightness; | ||
231 | }; | 232 | }; |
232 | 233 | ||
233 | /** | 234 | /** |
diff --git a/include/linux/mm.h b/include/linux/mm.h index e19ff30ad0a2..1a7f19e7f1a0 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -44,6 +44,9 @@ extern int sysctl_legacy_va_layout; | |||
44 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
45 | #include <asm/processor.h> | 45 | #include <asm/processor.h> |
46 | 46 | ||
47 | extern unsigned long sysctl_user_reserve_kbytes; | ||
48 | extern unsigned long sysctl_admin_reserve_kbytes; | ||
49 | |||
47 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) | 50 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) |
48 | 51 | ||
49 | /* to align the pointer to the (next) page boundary */ | 52 | /* to align the pointer to the (next) page boundary */ |
@@ -899,7 +902,8 @@ extern void pagefault_out_of_memory(void); | |||
899 | * Flags passed to show_mem() and show_free_areas() to suppress output in | 902 | * Flags passed to show_mem() and show_free_areas() to suppress output in |
900 | * various contexts. | 903 | * various contexts. |
901 | */ | 904 | */ |
902 | #define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ | 905 | #define SHOW_MEM_FILTER_NODES (0x0001u) /* disallowed nodes */ |
906 | #define SHOW_MEM_FILTER_PAGE_COUNT (0x0002u) /* page type count */ | ||
903 | 907 | ||
904 | extern void show_free_areas(unsigned int flags); | 908 | extern void show_free_areas(unsigned int flags); |
905 | extern bool skip_free_areas_node(unsigned int flags, int nid); | 909 | extern bool skip_free_areas_node(unsigned int flags, int nid); |
@@ -1078,9 +1082,6 @@ extern unsigned long move_page_tables(struct vm_area_struct *vma, | |||
1078 | unsigned long old_addr, struct vm_area_struct *new_vma, | 1082 | unsigned long old_addr, struct vm_area_struct *new_vma, |
1079 | unsigned long new_addr, unsigned long len, | 1083 | unsigned long new_addr, unsigned long len, |
1080 | bool need_rmap_locks); | 1084 | bool need_rmap_locks); |
1081 | extern unsigned long do_mremap(unsigned long addr, | ||
1082 | unsigned long old_len, unsigned long new_len, | ||
1083 | unsigned long flags, unsigned long new_addr); | ||
1084 | extern unsigned long change_protection(struct vm_area_struct *vma, unsigned long start, | 1085 | extern unsigned long change_protection(struct vm_area_struct *vma, unsigned long start, |
1085 | unsigned long end, pgprot_t newprot, | 1086 | unsigned long end, pgprot_t newprot, |
1086 | int dirty_accountable, int prot_numa); | 1087 | int dirty_accountable, int prot_numa); |
@@ -1294,6 +1295,61 @@ extern void free_area_init_node(int nid, unsigned long * zones_size, | |||
1294 | unsigned long zone_start_pfn, unsigned long *zholes_size); | 1295 | unsigned long zone_start_pfn, unsigned long *zholes_size); |
1295 | extern void free_initmem(void); | 1296 | extern void free_initmem(void); |
1296 | 1297 | ||
1298 | /* | ||
1299 | * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK) | ||
1300 | * into the buddy system. The freed pages will be poisoned with pattern | ||
1301 | * "poison" if it's non-zero. | ||
1302 | * Return pages freed into the buddy system. | ||
1303 | */ | ||
1304 | extern unsigned long free_reserved_area(unsigned long start, unsigned long end, | ||
1305 | int poison, char *s); | ||
1306 | #ifdef CONFIG_HIGHMEM | ||
1307 | /* | ||
1308 | * Free a highmem page into the buddy system, adjusting totalhigh_pages | ||
1309 | * and totalram_pages. | ||
1310 | */ | ||
1311 | extern void free_highmem_page(struct page *page); | ||
1312 | #endif | ||
1313 | |||
1314 | static inline void adjust_managed_page_count(struct page *page, long count) | ||
1315 | { | ||
1316 | totalram_pages += count; | ||
1317 | } | ||
1318 | |||
1319 | /* Free the reserved page into the buddy system, so it gets managed. */ | ||
1320 | static inline void __free_reserved_page(struct page *page) | ||
1321 | { | ||
1322 | ClearPageReserved(page); | ||
1323 | init_page_count(page); | ||
1324 | __free_page(page); | ||
1325 | } | ||
1326 | |||
1327 | static inline void free_reserved_page(struct page *page) | ||
1328 | { | ||
1329 | __free_reserved_page(page); | ||
1330 | adjust_managed_page_count(page, 1); | ||
1331 | } | ||
1332 | |||
1333 | static inline void mark_page_reserved(struct page *page) | ||
1334 | { | ||
1335 | SetPageReserved(page); | ||
1336 | adjust_managed_page_count(page, -1); | ||
1337 | } | ||
1338 | |||
1339 | /* | ||
1340 | * Default method to free all the __init memory into the buddy system. | ||
1341 | * The freed pages will be poisoned with pattern "poison" if it is | ||
1342 | * non-zero. Return pages freed into the buddy system. | ||
1343 | */ | ||
1344 | static inline unsigned long free_initmem_default(int poison) | ||
1345 | { | ||
1346 | extern char __init_begin[], __init_end[]; | ||
1347 | |||
1348 | return free_reserved_area(PAGE_ALIGN((unsigned long)&__init_begin) , | ||
1349 | ((unsigned long)&__init_end) & PAGE_MASK, | ||
1350 | poison, "unused kernel"); | ||
1351 | } | ||
1352 | |||
1297 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 1353 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
1298 | /* | 1354 | /* |
1299 | * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its | 1355 | * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its |
@@ -1611,6 +1667,8 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, | |||
1611 | unsigned long pfn); | 1667 | unsigned long pfn); |
1612 | int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, | 1668 | int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, |
1613 | unsigned long pfn); | 1669 | unsigned long pfn); |
1670 | int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len); | ||
1671 | |||
1614 | 1672 | ||
1615 | struct page *follow_page_mask(struct vm_area_struct *vma, | 1673 | struct page *follow_page_mask(struct vm_area_struct *vma, |
1616 | unsigned long address, unsigned int foll_flags, | 1674 | unsigned long address, unsigned int foll_flags, |
@@ -1673,8 +1731,12 @@ int in_gate_area_no_mm(unsigned long addr); | |||
1673 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) | 1731 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) |
1674 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1732 | #endif /* __HAVE_ARCH_GATE_AREA */ |
1675 | 1733 | ||
1734 | #ifdef CONFIG_SYSCTL | ||
1735 | extern int sysctl_drop_caches; | ||
1676 | int drop_caches_sysctl_handler(struct ctl_table *, int, | 1736 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
1677 | void __user *, size_t *, loff_t *); | 1737 | void __user *, size_t *, loff_t *); |
1738 | #endif | ||
1739 | |||
1678 | unsigned long shrink_slab(struct shrink_control *shrink, | 1740 | unsigned long shrink_slab(struct shrink_control *shrink, |
1679 | unsigned long nr_pages_scanned, | 1741 | unsigned long nr_pages_scanned, |
1680 | unsigned long lru_pages); | 1742 | unsigned long lru_pages); |
@@ -1702,12 +1764,12 @@ pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); | |||
1702 | void *vmemmap_alloc_block(unsigned long size, int node); | 1764 | void *vmemmap_alloc_block(unsigned long size, int node); |
1703 | void *vmemmap_alloc_block_buf(unsigned long size, int node); | 1765 | void *vmemmap_alloc_block_buf(unsigned long size, int node); |
1704 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); | 1766 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); |
1705 | int vmemmap_populate_basepages(struct page *start_page, | 1767 | int vmemmap_populate_basepages(unsigned long start, unsigned long end, |
1706 | unsigned long pages, int node); | 1768 | int node); |
1707 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); | 1769 | int vmemmap_populate(unsigned long start, unsigned long end, int node); |
1708 | void vmemmap_populate_print_last(void); | 1770 | void vmemmap_populate_print_last(void); |
1709 | #ifdef CONFIG_MEMORY_HOTPLUG | 1771 | #ifdef CONFIG_MEMORY_HOTPLUG |
1710 | void vmemmap_free(struct page *memmap, unsigned long nr_pages); | 1772 | void vmemmap_free(unsigned long start, unsigned long end); |
1711 | #endif | 1773 | #endif |
1712 | void register_page_bootmem_memmap(unsigned long section_nr, struct page *map, | 1774 | void register_page_bootmem_memmap(unsigned long section_nr, struct page *map, |
1713 | unsigned long size); | 1775 | unsigned long size); |
@@ -1754,5 +1816,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; } | |||
1754 | static inline bool page_is_guard(struct page *page) { return false; } | 1816 | static inline bool page_is_guard(struct page *page) { return false; } |
1755 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | 1817 | #endif /* CONFIG_DEBUG_PAGEALLOC */ |
1756 | 1818 | ||
1819 | #if MAX_NUMNODES > 1 | ||
1820 | void __init setup_nr_node_ids(void); | ||
1821 | #else | ||
1822 | static inline void setup_nr_node_ids(void) {} | ||
1823 | #endif | ||
1824 | |||
1757 | #endif /* __KERNEL__ */ | 1825 | #endif /* __KERNEL__ */ |
1758 | #endif /* _LINUX_MM_H */ | 1826 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c74092eebf5c..5c76737d836b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -450,7 +450,7 @@ struct zone { | |||
450 | * | 450 | * |
451 | * present_pages is physical pages existing within the zone, which | 451 | * present_pages is physical pages existing within the zone, which |
452 | * is calculated as: | 452 | * is calculated as: |
453 | * present_pages = spanned_pages - absent_pages(pags in holes); | 453 | * present_pages = spanned_pages - absent_pages(pages in holes); |
454 | * | 454 | * |
455 | * managed_pages is present pages managed by the buddy system, which | 455 | * managed_pages is present pages managed by the buddy system, which |
456 | * is calculated as (reserved_pages includes pages allocated by the | 456 | * is calculated as (reserved_pages includes pages allocated by the |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 779cf7c4a3d1..b508016fb76d 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/uuid.h> | ||
12 | typedef unsigned long kernel_ulong_t; | 13 | typedef unsigned long kernel_ulong_t; |
13 | #endif | 14 | #endif |
14 | 15 | ||
@@ -568,4 +569,12 @@ struct ipack_device_id { | |||
568 | __u32 device; /* Device ID or IPACK_ANY_ID */ | 569 | __u32 device; /* Device ID or IPACK_ANY_ID */ |
569 | }; | 570 | }; |
570 | 571 | ||
572 | #define MEI_CL_MODULE_PREFIX "mei:" | ||
573 | #define MEI_CL_NAME_SIZE 32 | ||
574 | |||
575 | struct mei_cl_device_id { | ||
576 | char name[MEI_CL_NAME_SIZE]; | ||
577 | kernel_ulong_t driver_info; | ||
578 | }; | ||
579 | |||
571 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 580 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/msi.h b/include/linux/msi.h index ce93a341337d..20c2d6dd5d25 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -13,14 +13,14 @@ struct msi_msg { | |||
13 | /* Helper functions */ | 13 | /* Helper functions */ |
14 | struct irq_data; | 14 | struct irq_data; |
15 | struct msi_desc; | 15 | struct msi_desc; |
16 | extern void mask_msi_irq(struct irq_data *data); | 16 | void mask_msi_irq(struct irq_data *data); |
17 | extern void unmask_msi_irq(struct irq_data *data); | 17 | void unmask_msi_irq(struct irq_data *data); |
18 | extern void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 18 | void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
19 | extern void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 19 | void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
20 | extern void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 20 | void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
21 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 21 | void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
22 | extern void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); | 22 | void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); |
23 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 23 | void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
24 | 24 | ||
25 | struct msi_desc { | 25 | struct msi_desc { |
26 | struct { | 26 | struct { |
@@ -54,9 +54,8 @@ struct msi_desc { | |||
54 | */ | 54 | */ |
55 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); | 55 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
56 | void arch_teardown_msi_irq(unsigned int irq); | 56 | void arch_teardown_msi_irq(unsigned int irq); |
57 | extern int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); | 57 | int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); |
58 | extern void arch_teardown_msi_irqs(struct pci_dev *dev); | 58 | void arch_teardown_msi_irqs(struct pci_dev *dev); |
59 | extern int arch_msi_check_device(struct pci_dev* dev, int nvec, int type); | 59 | int arch_msi_check_device(struct pci_dev* dev, int nvec, int type); |
60 | |||
61 | 60 | ||
62 | #endif /* LINUX_MSI_H */ | 61 | #endif /* LINUX_MSI_H */ |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 9121595a8ebf..433da8a1a426 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -53,6 +53,9 @@ struct mutex { | |||
53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) | 53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) |
54 | struct task_struct *owner; | 54 | struct task_struct *owner; |
55 | #endif | 55 | #endif |
56 | #ifdef CONFIG_MUTEX_SPIN_ON_OWNER | ||
57 | void *spin_mlock; /* Spinner MCS lock */ | ||
58 | #endif | ||
56 | #ifdef CONFIG_DEBUG_MUTEXES | 59 | #ifdef CONFIG_DEBUG_MUTEXES |
57 | const char *name; | 60 | const char *name; |
58 | void *magic; | 61 | void *magic; |
diff --git a/include/linux/net.h b/include/linux/net.h index aa1673160a45..99c9f0c103c2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -240,8 +240,8 @@ do { \ | |||
240 | #define net_dbg_ratelimited(fmt, ...) \ | 240 | #define net_dbg_ratelimited(fmt, ...) \ |
241 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 241 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
242 | 242 | ||
243 | #define net_random() random32() | 243 | #define net_random() prandom_u32() |
244 | #define net_srandom(seed) srandom32((__force u32)seed) | 244 | #define net_srandom(seed) prandom_seed((__force u32)(seed)) |
245 | 245 | ||
246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, | 246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, |
247 | struct kvec *vec, size_t num, size_t len); | 247 | struct kvec *vec, size_t num, size_t len); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b3d00fa4b314..6151e903eef0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -210,9 +210,9 @@ struct netdev_hw_addr { | |||
210 | #define NETDEV_HW_ADDR_T_SLAVE 3 | 210 | #define NETDEV_HW_ADDR_T_SLAVE 3 |
211 | #define NETDEV_HW_ADDR_T_UNICAST 4 | 211 | #define NETDEV_HW_ADDR_T_UNICAST 4 |
212 | #define NETDEV_HW_ADDR_T_MULTICAST 5 | 212 | #define NETDEV_HW_ADDR_T_MULTICAST 5 |
213 | bool synced; | ||
214 | bool global_use; | 213 | bool global_use; |
215 | int refcount; | 214 | int refcount; |
215 | int synced; | ||
216 | struct rcu_head rcu_head; | 216 | struct rcu_head rcu_head; |
217 | }; | 217 | }; |
218 | 218 | ||
@@ -895,7 +895,7 @@ struct netdev_fcoe_hbainfo { | |||
895 | * | 895 | * |
896 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh) | 896 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh) |
897 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, | 897 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, |
898 | * struct net_device *dev) | 898 | * struct net_device *dev, u32 filter_mask) |
899 | * | 899 | * |
900 | * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); | 900 | * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); |
901 | * Called to change device carrier. Soft-devices (like dummy, team, etc) | 901 | * Called to change device carrier. Soft-devices (like dummy, team, etc) |
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h index 01d25e6fc792..0214c4c146fa 100644 --- a/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/include/linux/netfilter/ipset/ip_set_ahash.h | |||
@@ -291,6 +291,7 @@ ip_set_hash_destroy(struct ip_set *set) | |||
291 | #define type_pf_data_tlist TOKEN(TYPE, PF, _data_tlist) | 291 | #define type_pf_data_tlist TOKEN(TYPE, PF, _data_tlist) |
292 | #define type_pf_data_next TOKEN(TYPE, PF, _data_next) | 292 | #define type_pf_data_next TOKEN(TYPE, PF, _data_next) |
293 | #define type_pf_data_flags TOKEN(TYPE, PF, _data_flags) | 293 | #define type_pf_data_flags TOKEN(TYPE, PF, _data_flags) |
294 | #define type_pf_data_reset_flags TOKEN(TYPE, PF, _data_reset_flags) | ||
294 | #ifdef IP_SET_HASH_WITH_NETS | 295 | #ifdef IP_SET_HASH_WITH_NETS |
295 | #define type_pf_data_match TOKEN(TYPE, PF, _data_match) | 296 | #define type_pf_data_match TOKEN(TYPE, PF, _data_match) |
296 | #else | 297 | #else |
@@ -385,9 +386,9 @@ type_pf_resize(struct ip_set *set, bool retried) | |||
385 | struct ip_set_hash *h = set->data; | 386 | struct ip_set_hash *h = set->data; |
386 | struct htable *t, *orig = h->table; | 387 | struct htable *t, *orig = h->table; |
387 | u8 htable_bits = orig->htable_bits; | 388 | u8 htable_bits = orig->htable_bits; |
388 | const struct type_pf_elem *data; | 389 | struct type_pf_elem *data; |
389 | struct hbucket *n, *m; | 390 | struct hbucket *n, *m; |
390 | u32 i, j; | 391 | u32 i, j, flags = 0; |
391 | int ret; | 392 | int ret; |
392 | 393 | ||
393 | retry: | 394 | retry: |
@@ -412,9 +413,16 @@ retry: | |||
412 | n = hbucket(orig, i); | 413 | n = hbucket(orig, i); |
413 | for (j = 0; j < n->pos; j++) { | 414 | for (j = 0; j < n->pos; j++) { |
414 | data = ahash_data(n, j); | 415 | data = ahash_data(n, j); |
416 | #ifdef IP_SET_HASH_WITH_NETS | ||
417 | flags = 0; | ||
418 | type_pf_data_reset_flags(data, &flags); | ||
419 | #endif | ||
415 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); | 420 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); |
416 | ret = type_pf_elem_add(m, data, AHASH_MAX(h), 0); | 421 | ret = type_pf_elem_add(m, data, AHASH_MAX(h), flags); |
417 | if (ret < 0) { | 422 | if (ret < 0) { |
423 | #ifdef IP_SET_HASH_WITH_NETS | ||
424 | type_pf_data_flags(data, flags); | ||
425 | #endif | ||
418 | read_unlock_bh(&set->lock); | 426 | read_unlock_bh(&set->lock); |
419 | ahash_destroy(t); | 427 | ahash_destroy(t); |
420 | if (ret == -EAGAIN) | 428 | if (ret == -EAGAIN) |
@@ -836,9 +844,9 @@ type_pf_tresize(struct ip_set *set, bool retried) | |||
836 | struct ip_set_hash *h = set->data; | 844 | struct ip_set_hash *h = set->data; |
837 | struct htable *t, *orig = h->table; | 845 | struct htable *t, *orig = h->table; |
838 | u8 htable_bits = orig->htable_bits; | 846 | u8 htable_bits = orig->htable_bits; |
839 | const struct type_pf_elem *data; | 847 | struct type_pf_elem *data; |
840 | struct hbucket *n, *m; | 848 | struct hbucket *n, *m; |
841 | u32 i, j; | 849 | u32 i, j, flags = 0; |
842 | int ret; | 850 | int ret; |
843 | 851 | ||
844 | /* Try to cleanup once */ | 852 | /* Try to cleanup once */ |
@@ -873,10 +881,17 @@ retry: | |||
873 | n = hbucket(orig, i); | 881 | n = hbucket(orig, i); |
874 | for (j = 0; j < n->pos; j++) { | 882 | for (j = 0; j < n->pos; j++) { |
875 | data = ahash_tdata(n, j); | 883 | data = ahash_tdata(n, j); |
884 | #ifdef IP_SET_HASH_WITH_NETS | ||
885 | flags = 0; | ||
886 | type_pf_data_reset_flags(data, &flags); | ||
887 | #endif | ||
876 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); | 888 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); |
877 | ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), 0, | 889 | ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), flags, |
878 | ip_set_timeout_get(type_pf_data_timeout(data))); | 890 | ip_set_timeout_get(type_pf_data_timeout(data))); |
879 | if (ret < 0) { | 891 | if (ret < 0) { |
892 | #ifdef IP_SET_HASH_WITH_NETS | ||
893 | type_pf_data_flags(data, flags); | ||
894 | #endif | ||
880 | read_unlock_bh(&set->lock); | 895 | read_unlock_bh(&set->lock); |
881 | ahash_destroy(t); | 896 | ahash_destroy(t); |
882 | if (ret == -EAGAIN) | 897 | if (ret == -EAGAIN) |
@@ -1187,6 +1202,7 @@ type_pf_gc_init(struct ip_set *set) | |||
1187 | #undef type_pf_data_tlist | 1202 | #undef type_pf_data_tlist |
1188 | #undef type_pf_data_next | 1203 | #undef type_pf_data_next |
1189 | #undef type_pf_data_flags | 1204 | #undef type_pf_data_flags |
1205 | #undef type_pf_data_reset_flags | ||
1190 | #undef type_pf_data_match | 1206 | #undef type_pf_data_match |
1191 | 1207 | ||
1192 | #undef type_pf_elem | 1208 | #undef type_pf_elem |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 1cc25682b20b..fc01d5cb4cf1 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -59,11 +59,18 @@ struct nfs_lockowner { | |||
59 | pid_t l_pid; | 59 | pid_t l_pid; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | #define NFS_IO_INPROGRESS 0 | ||
63 | struct nfs_io_counter { | ||
64 | unsigned long flags; | ||
65 | atomic_t io_count; | ||
66 | }; | ||
67 | |||
62 | struct nfs_lock_context { | 68 | struct nfs_lock_context { |
63 | atomic_t count; | 69 | atomic_t count; |
64 | struct list_head list; | 70 | struct list_head list; |
65 | struct nfs_open_context *open_context; | 71 | struct nfs_open_context *open_context; |
66 | struct nfs_lockowner lockowner; | 72 | struct nfs_lockowner lockowner; |
73 | struct nfs_io_counter io_count; | ||
67 | }; | 74 | }; |
68 | 75 | ||
69 | struct nfs4_state; | 76 | struct nfs4_state; |
@@ -77,6 +84,7 @@ struct nfs_open_context { | |||
77 | unsigned long flags; | 84 | unsigned long flags; |
78 | #define NFS_CONTEXT_ERROR_WRITE (0) | 85 | #define NFS_CONTEXT_ERROR_WRITE (0) |
79 | #define NFS_CONTEXT_RESEND_WRITES (1) | 86 | #define NFS_CONTEXT_RESEND_WRITES (1) |
87 | #define NFS_CONTEXT_BAD (2) | ||
80 | int error; | 88 | int error; |
81 | 89 | ||
82 | struct list_head list; | 90 | struct list_head list; |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 6c6ed153a9b4..3b7fa2abecca 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -40,6 +40,7 @@ struct nfs_client { | |||
40 | #define NFS_CS_NORESVPORT 0 /* - use ephemeral src port */ | 40 | #define NFS_CS_NORESVPORT 0 /* - use ephemeral src port */ |
41 | #define NFS_CS_DISCRTRY 1 /* - disconnect on RPC retry */ | 41 | #define NFS_CS_DISCRTRY 1 /* - disconnect on RPC retry */ |
42 | #define NFS_CS_MIGRATION 2 /* - transparent state migr */ | 42 | #define NFS_CS_MIGRATION 2 /* - transparent state migr */ |
43 | #define NFS_CS_INFINITE_SLOTS 3 /* - don't limit TCP slots */ | ||
43 | struct sockaddr_storage cl_addr; /* server identifier */ | 44 | struct sockaddr_storage cl_addr; /* server identifier */ |
44 | size_t cl_addrlen; | 45 | size_t cl_addrlen; |
45 | char * cl_hostname; /* hostname of server */ | 46 | char * cl_hostname; /* hostname of server */ |
@@ -197,5 +198,7 @@ struct nfs_server { | |||
197 | #define NFS_CAP_MTIME (1U << 13) | 198 | #define NFS_CAP_MTIME (1U << 13) |
198 | #define NFS_CAP_POSIX_LOCK (1U << 14) | 199 | #define NFS_CAP_POSIX_LOCK (1U << 14) |
199 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) | 200 | #define NFS_CAP_UIDGID_NOMAP (1U << 15) |
201 | #define NFS_CAP_STATEID_NFSV41 (1U << 16) | ||
202 | #define NFS_CAP_ATOMIC_OPEN_V1 (1U << 17) | ||
200 | 203 | ||
201 | #endif | 204 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 4b993d358dad..766c5bc9d441 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -14,9 +14,6 @@ | |||
14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | 14 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | 15 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
16 | 16 | ||
17 | /* Forward declaration for NFS v3 */ | ||
18 | struct nfs4_secinfo_flavors; | ||
19 | |||
20 | struct nfs4_string { | 17 | struct nfs4_string { |
21 | unsigned int len; | 18 | unsigned int len; |
22 | char *data; | 19 | char *data; |
@@ -349,6 +346,7 @@ struct nfs_openargs { | |||
349 | const u32 * bitmask; | 346 | const u32 * bitmask; |
350 | const u32 * open_bitmap; | 347 | const u32 * open_bitmap; |
351 | __u32 claim; | 348 | __u32 claim; |
349 | enum createmode4 createmode; | ||
352 | }; | 350 | }; |
353 | 351 | ||
354 | struct nfs_openres { | 352 | struct nfs_openres { |
@@ -486,6 +484,7 @@ struct nfs_readargs { | |||
486 | struct nfs_fh * fh; | 484 | struct nfs_fh * fh; |
487 | struct nfs_open_context *context; | 485 | struct nfs_open_context *context; |
488 | struct nfs_lock_context *lock_context; | 486 | struct nfs_lock_context *lock_context; |
487 | nfs4_stateid stateid; | ||
489 | __u64 offset; | 488 | __u64 offset; |
490 | __u32 count; | 489 | __u32 count; |
491 | unsigned int pgbase; | 490 | unsigned int pgbase; |
@@ -507,6 +506,7 @@ struct nfs_writeargs { | |||
507 | struct nfs_fh * fh; | 506 | struct nfs_fh * fh; |
508 | struct nfs_open_context *context; | 507 | struct nfs_open_context *context; |
509 | struct nfs_lock_context *lock_context; | 508 | struct nfs_lock_context *lock_context; |
509 | nfs4_stateid stateid; | ||
510 | __u64 offset; | 510 | __u64 offset; |
511 | __u32 count; | 511 | __u32 count; |
512 | enum nfs3_stable_how stable; | 512 | enum nfs3_stable_how stable; |
@@ -1050,25 +1050,14 @@ struct nfs4_fs_locations_res { | |||
1050 | struct nfs4_fs_locations *fs_locations; | 1050 | struct nfs4_fs_locations *fs_locations; |
1051 | }; | 1051 | }; |
1052 | 1052 | ||
1053 | struct nfs4_secinfo_oid { | 1053 | struct nfs4_secinfo4 { |
1054 | unsigned int len; | 1054 | u32 flavor; |
1055 | char data[GSS_OID_MAX_LEN]; | 1055 | struct rpcsec_gss_info flavor_info; |
1056 | }; | ||
1057 | |||
1058 | struct nfs4_secinfo_gss { | ||
1059 | struct nfs4_secinfo_oid sec_oid4; | ||
1060 | unsigned int qop4; | ||
1061 | unsigned int service; | ||
1062 | }; | ||
1063 | |||
1064 | struct nfs4_secinfo_flavor { | ||
1065 | unsigned int flavor; | ||
1066 | struct nfs4_secinfo_gss gss; | ||
1067 | }; | 1056 | }; |
1068 | 1057 | ||
1069 | struct nfs4_secinfo_flavors { | 1058 | struct nfs4_secinfo_flavors { |
1070 | unsigned int num_flavors; | 1059 | unsigned int num_flavors; |
1071 | struct nfs4_secinfo_flavor flavors[0]; | 1060 | struct nfs4_secinfo4 flavors[0]; |
1072 | }; | 1061 | }; |
1073 | 1062 | ||
1074 | struct nfs4_secinfo_arg { | 1063 | struct nfs4_secinfo_arg { |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index d65746efc954..d14a4c362465 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -47,8 +47,11 @@ | |||
47 | * runtime initialization. | 47 | * runtime initialization. |
48 | */ | 48 | */ |
49 | 49 | ||
50 | typedef int (*notifier_fn_t)(struct notifier_block *nb, | ||
51 | unsigned long action, void *data); | ||
52 | |||
50 | struct notifier_block { | 53 | struct notifier_block { |
51 | int (*notifier_call)(struct notifier_block *, unsigned long, void *); | 54 | notifier_fn_t notifier_call; |
52 | struct notifier_block __rcu *next; | 55 | struct notifier_block __rcu *next; |
53 | int priority; | 56 | int priority; |
54 | }; | 57 | }; |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 0e38e13eb249..e3dea75a078b 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -149,7 +149,7 @@ static inline int page_cache_get_speculative(struct page *page) | |||
149 | { | 149 | { |
150 | VM_BUG_ON(in_interrupt()); | 150 | VM_BUG_ON(in_interrupt()); |
151 | 151 | ||
152 | #if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU) | 152 | #ifdef CONFIG_TINY_RCU |
153 | # ifdef CONFIG_PREEMPT_COUNT | 153 | # ifdef CONFIG_PREEMPT_COUNT |
154 | VM_BUG_ON(!in_atomic()); | 154 | VM_BUG_ON(!in_atomic()); |
155 | # endif | 155 | # endif |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 9a22b5efb384..81b31613eb25 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -41,8 +41,37 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | |||
41 | 41 | ||
42 | return DEVICE_ACPI_HANDLE(dev); | 42 | return DEVICE_ACPI_HANDLE(dev); |
43 | } | 43 | } |
44 | |||
45 | void acpi_pci_add_bus(struct pci_bus *bus); | ||
46 | void acpi_pci_remove_bus(struct pci_bus *bus); | ||
47 | |||
48 | #ifdef CONFIG_ACPI_PCI_SLOT | ||
49 | void acpi_pci_slot_init(void); | ||
50 | void acpi_pci_slot_enumerate(struct pci_bus *bus, acpi_handle handle); | ||
51 | void acpi_pci_slot_remove(struct pci_bus *bus); | ||
52 | #else | ||
53 | static inline void acpi_pci_slot_init(void) { } | ||
54 | static inline void acpi_pci_slot_enumerate(struct pci_bus *bus, | ||
55 | acpi_handle handle) { } | ||
56 | static inline void acpi_pci_slot_remove(struct pci_bus *bus) { } | ||
44 | #endif | 57 | #endif |
45 | 58 | ||
59 | #ifdef CONFIG_HOTPLUG_PCI_ACPI | ||
60 | void acpiphp_init(void); | ||
61 | void acpiphp_enumerate_slots(struct pci_bus *bus, acpi_handle handle); | ||
62 | void acpiphp_remove_slots(struct pci_bus *bus); | ||
63 | #else | ||
64 | static inline void acpiphp_init(void) { } | ||
65 | static inline void acpiphp_enumerate_slots(struct pci_bus *bus, | ||
66 | acpi_handle handle) { } | ||
67 | static inline void acpiphp_remove_slots(struct pci_bus *bus) { } | ||
68 | #endif | ||
69 | |||
70 | #else /* CONFIG_ACPI */ | ||
71 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } | ||
72 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } | ||
73 | #endif /* CONFIG_ACPI */ | ||
74 | |||
46 | #ifdef CONFIG_ACPI_APEI | 75 | #ifdef CONFIG_ACPI_APEI |
47 | extern bool aer_acpi_firmware_first(void); | 76 | extern bool aer_acpi_firmware_first(void); |
48 | #else | 77 | #else |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index c8320144fe79..8af4610c2e41 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -23,14 +23,14 @@ | |||
23 | #define PCIE_LINK_STATE_CLKPM 4 | 23 | #define PCIE_LINK_STATE_CLKPM 4 |
24 | 24 | ||
25 | #ifdef CONFIG_PCIEASPM | 25 | #ifdef CONFIG_PCIEASPM |
26 | extern void pcie_aspm_init_link_state(struct pci_dev *pdev); | 26 | void pcie_aspm_init_link_state(struct pci_dev *pdev); |
27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | 27 | void pcie_aspm_exit_link_state(struct pci_dev *pdev); |
28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
29 | extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); | 29 | void pcie_aspm_powersave_config_link(struct pci_dev *pdev); |
30 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 30 | void pci_disable_link_state(struct pci_dev *pdev, int state); |
31 | extern void pci_disable_link_state_locked(struct pci_dev *pdev, int state); | 31 | void pci_disable_link_state_locked(struct pci_dev *pdev, int state); |
32 | extern void pcie_clear_aspm(struct pci_bus *bus); | 32 | void pcie_clear_aspm(struct pci_bus *bus); |
33 | extern void pcie_no_aspm(void); | 33 | void pcie_no_aspm(void); |
34 | #else | 34 | #else |
35 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) | 35 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) |
36 | { | 36 | { |
@@ -56,8 +56,8 @@ static inline void pcie_no_aspm(void) | |||
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */ | 58 | #ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */ |
59 | extern void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); | 59 | void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); |
60 | extern void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); | 60 | void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); |
61 | #else | 61 | #else |
62 | static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) | 62 | static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) |
63 | { | 63 | { |
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h index 7ef68724f0f0..68bcefd7fca0 100644 --- a/include/linux/pci-ats.h +++ b/include/linux/pci-ats.h | |||
@@ -14,9 +14,9 @@ struct pci_ats { | |||
14 | 14 | ||
15 | #ifdef CONFIG_PCI_ATS | 15 | #ifdef CONFIG_PCI_ATS |
16 | 16 | ||
17 | extern int pci_enable_ats(struct pci_dev *dev, int ps); | 17 | int pci_enable_ats(struct pci_dev *dev, int ps); |
18 | extern void pci_disable_ats(struct pci_dev *dev); | 18 | void pci_disable_ats(struct pci_dev *dev); |
19 | extern int pci_ats_queue_depth(struct pci_dev *dev); | 19 | int pci_ats_queue_depth(struct pci_dev *dev); |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * pci_ats_enabled - query the ATS status | 22 | * pci_ats_enabled - query the ATS status |
@@ -54,12 +54,12 @@ static inline int pci_ats_enabled(struct pci_dev *dev) | |||
54 | 54 | ||
55 | #ifdef CONFIG_PCI_PRI | 55 | #ifdef CONFIG_PCI_PRI |
56 | 56 | ||
57 | extern int pci_enable_pri(struct pci_dev *pdev, u32 reqs); | 57 | int pci_enable_pri(struct pci_dev *pdev, u32 reqs); |
58 | extern void pci_disable_pri(struct pci_dev *pdev); | 58 | void pci_disable_pri(struct pci_dev *pdev); |
59 | extern bool pci_pri_enabled(struct pci_dev *pdev); | 59 | bool pci_pri_enabled(struct pci_dev *pdev); |
60 | extern int pci_reset_pri(struct pci_dev *pdev); | 60 | int pci_reset_pri(struct pci_dev *pdev); |
61 | extern bool pci_pri_stopped(struct pci_dev *pdev); | 61 | bool pci_pri_stopped(struct pci_dev *pdev); |
62 | extern int pci_pri_status(struct pci_dev *pdev); | 62 | int pci_pri_status(struct pci_dev *pdev); |
63 | 63 | ||
64 | #else /* CONFIG_PCI_PRI */ | 64 | #else /* CONFIG_PCI_PRI */ |
65 | 65 | ||
@@ -95,10 +95,10 @@ static inline int pci_pri_status(struct pci_dev *pdev) | |||
95 | 95 | ||
96 | #ifdef CONFIG_PCI_PASID | 96 | #ifdef CONFIG_PCI_PASID |
97 | 97 | ||
98 | extern int pci_enable_pasid(struct pci_dev *pdev, int features); | 98 | int pci_enable_pasid(struct pci_dev *pdev, int features); |
99 | extern void pci_disable_pasid(struct pci_dev *pdev); | 99 | void pci_disable_pasid(struct pci_dev *pdev); |
100 | extern int pci_pasid_features(struct pci_dev *pdev); | 100 | int pci_pasid_features(struct pci_dev *pdev); |
101 | extern int pci_max_pasids(struct pci_dev *pdev); | 101 | int pci_max_pasids(struct pci_dev *pdev); |
102 | 102 | ||
103 | #else /* CONFIG_PCI_PASID */ | 103 | #else /* CONFIG_PCI_PASID */ |
104 | 104 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2461033a7987..e73dfa308b87 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -35,6 +35,21 @@ | |||
35 | /* Include the ID list */ | 35 | /* Include the ID list */ |
36 | #include <linux/pci_ids.h> | 36 | #include <linux/pci_ids.h> |
37 | 37 | ||
38 | /* | ||
39 | * The PCI interface treats multi-function devices as independent | ||
40 | * devices. The slot/function address of each device is encoded | ||
41 | * in a single byte as follows: | ||
42 | * | ||
43 | * 7:3 = slot | ||
44 | * 2:0 = function | ||
45 | * PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() are defined uapi/linux/pci.h | ||
46 | * In the interest of not exposing interfaces to user-space unnecessarily, | ||
47 | * the following kernel only defines are being added here. | ||
48 | */ | ||
49 | #define PCI_DEVID(bus, devfn) ((((u16)bus) << 8) | devfn) | ||
50 | /* return bus from PCI devid = ((u16)bus_number) << 8) | devfn */ | ||
51 | #define PCI_BUS_NUM(x) (((x) >> 8) & 0xff) | ||
52 | |||
38 | /* pci_slot represents a physical slot */ | 53 | /* pci_slot represents a physical slot */ |
39 | struct pci_slot { | 54 | struct pci_slot { |
40 | struct pci_bus *bus; /* The bus this slot is on */ | 55 | struct pci_bus *bus; /* The bus this slot is on */ |
@@ -232,6 +247,8 @@ struct pci_dev { | |||
232 | u8 revision; /* PCI revision, low byte of class word */ | 247 | u8 revision; /* PCI revision, low byte of class word */ |
233 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 248 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
234 | u8 pcie_cap; /* PCI-E capability offset */ | 249 | u8 pcie_cap; /* PCI-E capability offset */ |
250 | u8 msi_cap; /* MSI capability offset */ | ||
251 | u8 msix_cap; /* MSI-X capability offset */ | ||
235 | u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ | 252 | u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ |
236 | u8 rom_base_reg; /* which config register controls the ROM */ | 253 | u8 rom_base_reg; /* which config register controls the ROM */ |
237 | u8 pin; /* which interrupt pin this device uses */ | 254 | u8 pin; /* which interrupt pin this device uses */ |
@@ -249,8 +266,7 @@ struct pci_dev { | |||
249 | pci_power_t current_state; /* Current operating state. In ACPI-speak, | 266 | pci_power_t current_state; /* Current operating state. In ACPI-speak, |
250 | this is D0-D3, D0 being fully functional, | 267 | this is D0-D3, D0 being fully functional, |
251 | and D3 being off. */ | 268 | and D3 being off. */ |
252 | int pm_cap; /* PM capability offset in the | 269 | u8 pm_cap; /* PM capability offset */ |
253 | configuration space */ | ||
254 | unsigned int pme_support:5; /* Bitmask of states from which PME# | 270 | unsigned int pme_support:5; /* Bitmask of states from which PME# |
255 | can be generated */ | 271 | can be generated */ |
256 | unsigned int pme_interrupt:1; | 272 | unsigned int pme_interrupt:1; |
@@ -348,7 +364,7 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | |||
348 | return dev; | 364 | return dev; |
349 | } | 365 | } |
350 | 366 | ||
351 | extern struct pci_dev *alloc_pci_dev(void); | 367 | struct pci_dev *alloc_pci_dev(void); |
352 | 368 | ||
353 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 369 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
354 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 370 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
@@ -504,10 +520,10 @@ struct pci_ops { | |||
504 | * ACPI needs to be able to access PCI config space before we've done a | 520 | * ACPI needs to be able to access PCI config space before we've done a |
505 | * PCI bus scan and created pci_bus structures. | 521 | * PCI bus scan and created pci_bus structures. |
506 | */ | 522 | */ |
507 | extern int raw_pci_read(unsigned int domain, unsigned int bus, | 523 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, |
508 | unsigned int devfn, int reg, int len, u32 *val); | 524 | int reg, int len, u32 *val); |
509 | extern int raw_pci_write(unsigned int domain, unsigned int bus, | 525 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, |
510 | unsigned int devfn, int reg, int len, u32 val); | 526 | int reg, int len, u32 val); |
511 | 527 | ||
512 | struct pci_bus_region { | 528 | struct pci_bus_region { |
513 | resource_size_t start; | 529 | resource_size_t start; |
@@ -658,7 +674,7 @@ struct pci_driver { | |||
658 | /* these external functions are only available when PCI support is enabled */ | 674 | /* these external functions are only available when PCI support is enabled */ |
659 | #ifdef CONFIG_PCI | 675 | #ifdef CONFIG_PCI |
660 | 676 | ||
661 | extern void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); | 677 | void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); |
662 | 678 | ||
663 | enum pcie_bus_config_types { | 679 | enum pcie_bus_config_types { |
664 | PCIE_BUS_TUNE_OFF, | 680 | PCIE_BUS_TUNE_OFF, |
@@ -675,9 +691,11 @@ extern struct bus_type pci_bus_type; | |||
675 | * code, or pci core code. */ | 691 | * code, or pci core code. */ |
676 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 692 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
677 | /* Some device drivers need know if pci is initiated */ | 693 | /* Some device drivers need know if pci is initiated */ |
678 | extern int no_pci_devices(void); | 694 | int no_pci_devices(void); |
679 | 695 | ||
680 | void pcibios_resource_survey_bus(struct pci_bus *bus); | 696 | void pcibios_resource_survey_bus(struct pci_bus *bus); |
697 | void pcibios_add_bus(struct pci_bus *bus); | ||
698 | void pcibios_remove_bus(struct pci_bus *bus); | ||
681 | void pcibios_fixup_bus(struct pci_bus *); | 699 | void pcibios_fixup_bus(struct pci_bus *); |
682 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 700 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
683 | /* Architecture specific versions may override this (weak) */ | 701 | /* Architecture specific versions may override this (weak) */ |
@@ -699,7 +717,7 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | |||
699 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 717 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
700 | struct pci_bus_region *region); | 718 | struct pci_bus_region *region); |
701 | void pcibios_scan_specific_bus(int busn); | 719 | void pcibios_scan_specific_bus(int busn); |
702 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 720 | struct pci_bus *pci_find_bus(int domain, int busnr); |
703 | void pci_bus_add_devices(const struct pci_bus *bus); | 721 | void pci_bus_add_devices(const struct pci_bus *bus); |
704 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 722 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
705 | struct pci_ops *ops, void *sysdata); | 723 | struct pci_ops *ops, void *sysdata); |
@@ -732,14 +750,14 @@ struct resource *pci_find_parent_resource(const struct pci_dev *dev, | |||
732 | u8 pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin); | 750 | u8 pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin); |
733 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); | 751 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); |
734 | u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); | 752 | u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); |
735 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | 753 | struct pci_dev *pci_dev_get(struct pci_dev *dev); |
736 | extern void pci_dev_put(struct pci_dev *dev); | 754 | void pci_dev_put(struct pci_dev *dev); |
737 | extern void pci_remove_bus(struct pci_bus *b); | 755 | void pci_remove_bus(struct pci_bus *b); |
738 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); | 756 | void pci_stop_and_remove_bus_device(struct pci_dev *dev); |
739 | void pci_stop_root_bus(struct pci_bus *bus); | 757 | void pci_stop_root_bus(struct pci_bus *bus); |
740 | void pci_remove_root_bus(struct pci_bus *bus); | 758 | void pci_remove_root_bus(struct pci_bus *bus); |
741 | void pci_setup_cardbus(struct pci_bus *bus); | 759 | void pci_setup_cardbus(struct pci_bus *bus); |
742 | extern void pci_sort_breadthfirst(void); | 760 | void pci_sort_breadthfirst(void); |
743 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) | 761 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) |
744 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) | 762 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) |
745 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) | 763 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) |
@@ -916,6 +934,7 @@ void pci_disable_rom(struct pci_dev *pdev); | |||
916 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 934 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
917 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 935 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
918 | size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); | 936 | size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); |
937 | void __iomem __must_check *pci_platform_rom(struct pci_dev *pdev, size_t *size); | ||
919 | 938 | ||
920 | /* Power management related routines */ | 939 | /* Power management related routines */ |
921 | int pci_save_state(struct pci_dev *dev); | 940 | int pci_save_state(struct pci_dev *dev); |
@@ -1141,18 +1160,17 @@ static inline int pci_msi_enabled(void) | |||
1141 | return 0; | 1160 | return 0; |
1142 | } | 1161 | } |
1143 | #else | 1162 | #else |
1144 | extern int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); | 1163 | int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); |
1145 | extern int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); | 1164 | int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); |
1146 | extern void pci_msi_shutdown(struct pci_dev *dev); | 1165 | void pci_msi_shutdown(struct pci_dev *dev); |
1147 | extern void pci_disable_msi(struct pci_dev *dev); | 1166 | void pci_disable_msi(struct pci_dev *dev); |
1148 | extern int pci_msix_table_size(struct pci_dev *dev); | 1167 | int pci_msix_table_size(struct pci_dev *dev); |
1149 | extern int pci_enable_msix(struct pci_dev *dev, | 1168 | int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec); |
1150 | struct msix_entry *entries, int nvec); | 1169 | void pci_msix_shutdown(struct pci_dev *dev); |
1151 | extern void pci_msix_shutdown(struct pci_dev *dev); | 1170 | void pci_disable_msix(struct pci_dev *dev); |
1152 | extern void pci_disable_msix(struct pci_dev *dev); | 1171 | void msi_remove_pci_irq_vectors(struct pci_dev *dev); |
1153 | extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); | 1172 | void pci_restore_msi_state(struct pci_dev *dev); |
1154 | extern void pci_restore_msi_state(struct pci_dev *dev); | 1173 | int pci_msi_enabled(void); |
1155 | extern int pci_msi_enabled(void); | ||
1156 | #endif | 1174 | #endif |
1157 | 1175 | ||
1158 | #ifdef CONFIG_PCIEPORTBUS | 1176 | #ifdef CONFIG_PCIEPORTBUS |
@@ -1167,8 +1185,8 @@ extern bool pcie_ports_auto; | |||
1167 | static inline int pcie_aspm_enabled(void) { return 0; } | 1185 | static inline int pcie_aspm_enabled(void) { return 0; } |
1168 | static inline bool pcie_aspm_support_enabled(void) { return false; } | 1186 | static inline bool pcie_aspm_support_enabled(void) { return false; } |
1169 | #else | 1187 | #else |
1170 | extern int pcie_aspm_enabled(void); | 1188 | int pcie_aspm_enabled(void); |
1171 | extern bool pcie_aspm_support_enabled(void); | 1189 | bool pcie_aspm_support_enabled(void); |
1172 | #endif | 1190 | #endif |
1173 | 1191 | ||
1174 | #ifdef CONFIG_PCIEAER | 1192 | #ifdef CONFIG_PCIEAER |
@@ -1186,8 +1204,8 @@ static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | |||
1186 | } | 1204 | } |
1187 | static inline void pcie_ecrc_get_policy(char *str) {}; | 1205 | static inline void pcie_ecrc_get_policy(char *str) {}; |
1188 | #else | 1206 | #else |
1189 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | 1207 | void pcie_set_ecrc_checking(struct pci_dev *dev); |
1190 | extern void pcie_ecrc_get_policy(char *str); | 1208 | void pcie_ecrc_get_policy(char *str); |
1191 | #endif | 1209 | #endif |
1192 | 1210 | ||
1193 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 1211 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
@@ -1198,9 +1216,9 @@ int ht_create_irq(struct pci_dev *dev, int idx); | |||
1198 | void ht_destroy_irq(unsigned int irq); | 1216 | void ht_destroy_irq(unsigned int irq); |
1199 | #endif /* CONFIG_HT_IRQ */ | 1217 | #endif /* CONFIG_HT_IRQ */ |
1200 | 1218 | ||
1201 | extern void pci_cfg_access_lock(struct pci_dev *dev); | 1219 | void pci_cfg_access_lock(struct pci_dev *dev); |
1202 | extern bool pci_cfg_access_trylock(struct pci_dev *dev); | 1220 | bool pci_cfg_access_trylock(struct pci_dev *dev); |
1203 | extern void pci_cfg_access_unlock(struct pci_dev *dev); | 1221 | void pci_cfg_access_unlock(struct pci_dev *dev); |
1204 | 1222 | ||
1205 | /* | 1223 | /* |
1206 | * PCI domain support. Sometimes called PCI segment (eg by ACPI), | 1224 | * PCI domain support. Sometimes called PCI segment (eg by ACPI), |
@@ -1225,7 +1243,7 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
1225 | /* some architectures require additional setup to direct VGA traffic */ | 1243 | /* some architectures require additional setup to direct VGA traffic */ |
1226 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, | 1244 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, |
1227 | unsigned int command_bits, u32 flags); | 1245 | unsigned int command_bits, u32 flags); |
1228 | extern void pci_register_set_vga_state(arch_set_vga_state_t func); | 1246 | void pci_register_set_vga_state(arch_set_vga_state_t func); |
1229 | 1247 | ||
1230 | #else /* CONFIG_PCI is not enabled */ | 1248 | #else /* CONFIG_PCI is not enabled */ |
1231 | 1249 | ||
@@ -1627,8 +1645,8 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, | |||
1627 | int pcibios_add_device(struct pci_dev *dev); | 1645 | int pcibios_add_device(struct pci_dev *dev); |
1628 | 1646 | ||
1629 | #ifdef CONFIG_PCI_MMCONFIG | 1647 | #ifdef CONFIG_PCI_MMCONFIG |
1630 | extern void __init pci_mmcfg_early_init(void); | 1648 | void __init pci_mmcfg_early_init(void); |
1631 | extern void __init pci_mmcfg_late_init(void); | 1649 | void __init pci_mmcfg_late_init(void); |
1632 | #else | 1650 | #else |
1633 | static inline void pci_mmcfg_early_init(void) { } | 1651 | static inline void pci_mmcfg_early_init(void) { } |
1634 | static inline void pci_mmcfg_late_init(void) { } | 1652 | static inline void pci_mmcfg_late_init(void) { } |
@@ -1639,12 +1657,12 @@ int pci_ext_cfg_avail(void); | |||
1639 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1657 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1640 | 1658 | ||
1641 | #ifdef CONFIG_PCI_IOV | 1659 | #ifdef CONFIG_PCI_IOV |
1642 | extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | 1660 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); |
1643 | extern void pci_disable_sriov(struct pci_dev *dev); | 1661 | void pci_disable_sriov(struct pci_dev *dev); |
1644 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); | 1662 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); |
1645 | extern int pci_num_vf(struct pci_dev *dev); | 1663 | int pci_num_vf(struct pci_dev *dev); |
1646 | extern int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); | 1664 | int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); |
1647 | extern int pci_sriov_get_totalvfs(struct pci_dev *dev); | 1665 | int pci_sriov_get_totalvfs(struct pci_dev *dev); |
1648 | #else | 1666 | #else |
1649 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) | 1667 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) |
1650 | { | 1668 | { |
@@ -1672,8 +1690,8 @@ static inline int pci_sriov_get_totalvfs(struct pci_dev *dev) | |||
1672 | #endif | 1690 | #endif |
1673 | 1691 | ||
1674 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | 1692 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) |
1675 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | 1693 | void pci_hp_create_module_link(struct pci_slot *pci_slot); |
1676 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | 1694 | void pci_hp_remove_module_link(struct pci_slot *pci_slot); |
1677 | #endif | 1695 | #endif |
1678 | 1696 | ||
1679 | /** | 1697 | /** |
@@ -1817,13 +1835,13 @@ int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, | |||
1817 | /* PCI <-> OF binding helpers */ | 1835 | /* PCI <-> OF binding helpers */ |
1818 | #ifdef CONFIG_OF | 1836 | #ifdef CONFIG_OF |
1819 | struct device_node; | 1837 | struct device_node; |
1820 | extern void pci_set_of_node(struct pci_dev *dev); | 1838 | void pci_set_of_node(struct pci_dev *dev); |
1821 | extern void pci_release_of_node(struct pci_dev *dev); | 1839 | void pci_release_of_node(struct pci_dev *dev); |
1822 | extern void pci_set_bus_of_node(struct pci_bus *bus); | 1840 | void pci_set_bus_of_node(struct pci_bus *bus); |
1823 | extern void pci_release_bus_of_node(struct pci_bus *bus); | 1841 | void pci_release_bus_of_node(struct pci_bus *bus); |
1824 | 1842 | ||
1825 | /* Arch may override this (weak) */ | 1843 | /* Arch may override this (weak) */ |
1826 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); | 1844 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); |
1827 | 1845 | ||
1828 | static inline struct device_node * | 1846 | static inline struct device_node * |
1829 | pci_device_to_OF_node(const struct pci_dev *pdev) | 1847 | pci_device_to_OF_node(const struct pci_dev *pdev) |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 45fc162cbdc0..8db71dcd6337 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -125,12 +125,12 @@ static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) | |||
125 | return pci_slot_name(slot->pci_slot); | 125 | return pci_slot_name(slot->pci_slot); |
126 | } | 126 | } |
127 | 127 | ||
128 | extern int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, | 128 | int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, int nr, |
129 | int nr, const char *name, | 129 | const char *name, struct module *owner, |
130 | struct module *owner, const char *mod_name); | 130 | const char *mod_name); |
131 | extern int pci_hp_deregister(struct hotplug_slot *slot); | 131 | int pci_hp_deregister(struct hotplug_slot *slot); |
132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 132 | int __must_check pci_hp_change_slot_info(struct hotplug_slot *slot, |
133 | struct hotplug_slot_info *info); | 133 | struct hotplug_slot_info *info); |
134 | 134 | ||
135 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ | 135 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
136 | #define pci_hp_register(slot, pbus, devnr, name) \ | 136 | #define pci_hp_register(slot, pbus, devnr, name) \ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f11c1c2609d5..2b85c521f737 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -524,6 +524,8 @@ | |||
524 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 | 524 | #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 |
525 | #define PCI_DEVICE_ID_AMD_15H_NB_F4 0x1604 | 525 | #define PCI_DEVICE_ID_AMD_15H_NB_F4 0x1604 |
526 | #define PCI_DEVICE_ID_AMD_15H_NB_F5 0x1605 | 526 | #define PCI_DEVICE_ID_AMD_15H_NB_F5 0x1605 |
527 | #define PCI_DEVICE_ID_AMD_16H_NB_F3 0x1533 | ||
528 | #define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534 | ||
527 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 | 529 | #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 |
528 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 | 530 | #define PCI_DEVICE_ID_AMD_LANCE 0x2000 |
529 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 | 531 | #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 |
@@ -1604,6 +1606,7 @@ | |||
1604 | #define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 | 1606 | #define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 |
1605 | 1607 | ||
1606 | #define PCI_VENDOR_ID_MARVELL 0x11ab | 1608 | #define PCI_VENDOR_ID_MARVELL 0x11ab |
1609 | #define PCI_VENDOR_ID_MARVELL_EXT 0x1b4b | ||
1607 | #define PCI_DEVICE_ID_MARVELL_GT64111 0x4146 | 1610 | #define PCI_DEVICE_ID_MARVELL_GT64111 0x4146 |
1608 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 | 1611 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 |
1609 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 | 1612 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index e6f91b1406d8..9572669eea97 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
@@ -62,7 +62,7 @@ struct pcie_port_service_driver { | |||
62 | #define to_service_driver(d) \ | 62 | #define to_service_driver(d) \ |
63 | container_of(d, struct pcie_port_service_driver, driver) | 63 | container_of(d, struct pcie_port_service_driver, driver) |
64 | 64 | ||
65 | extern int pcie_port_service_register(struct pcie_port_service_driver *new); | 65 | int pcie_port_service_register(struct pcie_port_service_driver *new); |
66 | extern void pcie_port_service_unregister(struct pcie_port_service_driver *new); | 66 | void pcie_port_service_unregister(struct pcie_port_service_driver *new); |
67 | 67 | ||
68 | #endif /* _PCIEPORT_IF_H_ */ | 68 | #endif /* _PCIEPORT_IF_H_ */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 1d795df6f4cf..e0373d26c244 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -21,7 +21,6 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifdef CONFIG_PERF_EVENTS | 23 | #ifdef CONFIG_PERF_EVENTS |
24 | # include <linux/cgroup.h> | ||
25 | # include <asm/perf_event.h> | 24 | # include <asm/perf_event.h> |
26 | # include <asm/local64.h> | 25 | # include <asm/local64.h> |
27 | #endif | 26 | #endif |
@@ -128,6 +127,7 @@ struct hw_perf_event { | |||
128 | int event_base_rdpmc; | 127 | int event_base_rdpmc; |
129 | int idx; | 128 | int idx; |
130 | int last_cpu; | 129 | int last_cpu; |
130 | int flags; | ||
131 | 131 | ||
132 | struct hw_perf_event_extra extra_reg; | 132 | struct hw_perf_event_extra extra_reg; |
133 | struct hw_perf_event_extra branch_reg; | 133 | struct hw_perf_event_extra branch_reg; |
@@ -299,22 +299,7 @@ struct swevent_hlist { | |||
299 | #define PERF_ATTACH_GROUP 0x02 | 299 | #define PERF_ATTACH_GROUP 0x02 |
300 | #define PERF_ATTACH_TASK 0x04 | 300 | #define PERF_ATTACH_TASK 0x04 |
301 | 301 | ||
302 | #ifdef CONFIG_CGROUP_PERF | 302 | struct perf_cgroup; |
303 | /* | ||
304 | * perf_cgroup_info keeps track of time_enabled for a cgroup. | ||
305 | * This is a per-cpu dynamically allocated data structure. | ||
306 | */ | ||
307 | struct perf_cgroup_info { | ||
308 | u64 time; | ||
309 | u64 timestamp; | ||
310 | }; | ||
311 | |||
312 | struct perf_cgroup { | ||
313 | struct cgroup_subsys_state css; | ||
314 | struct perf_cgroup_info *info; /* timing info, one per cpu */ | ||
315 | }; | ||
316 | #endif | ||
317 | |||
318 | struct ring_buffer; | 303 | struct ring_buffer; |
319 | 304 | ||
320 | /** | 305 | /** |
@@ -583,11 +568,13 @@ struct perf_sample_data { | |||
583 | u32 reserved; | 568 | u32 reserved; |
584 | } cpu_entry; | 569 | } cpu_entry; |
585 | u64 period; | 570 | u64 period; |
571 | union perf_mem_data_src data_src; | ||
586 | struct perf_callchain_entry *callchain; | 572 | struct perf_callchain_entry *callchain; |
587 | struct perf_raw_record *raw; | 573 | struct perf_raw_record *raw; |
588 | struct perf_branch_stack *br_stack; | 574 | struct perf_branch_stack *br_stack; |
589 | struct perf_regs_user regs_user; | 575 | struct perf_regs_user regs_user; |
590 | u64 stack_user_size; | 576 | u64 stack_user_size; |
577 | u64 weight; | ||
591 | }; | 578 | }; |
592 | 579 | ||
593 | static inline void perf_sample_data_init(struct perf_sample_data *data, | 580 | static inline void perf_sample_data_init(struct perf_sample_data *data, |
@@ -601,6 +588,8 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, | |||
601 | data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; | 588 | data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; |
602 | data->regs_user.regs = NULL; | 589 | data->regs_user.regs = NULL; |
603 | data->stack_user_size = 0; | 590 | data->stack_user_size = 0; |
591 | data->weight = 0; | ||
592 | data->data_src.val = 0; | ||
604 | } | 593 | } |
605 | 594 | ||
606 | extern void perf_output_sample(struct perf_output_handle *handle, | 595 | extern void perf_output_sample(struct perf_output_handle *handle, |
@@ -831,6 +820,7 @@ do { \ | |||
831 | struct perf_pmu_events_attr { | 820 | struct perf_pmu_events_attr { |
832 | struct device_attribute attr; | 821 | struct device_attribute attr; |
833 | u64 id; | 822 | u64 id; |
823 | const char *event_str; | ||
834 | }; | 824 | }; |
835 | 825 | ||
836 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ | 826 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 215e5e3dda10..8ac32836690e 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -13,7 +13,9 @@ struct pidmap { | |||
13 | void *page; | 13 | void *page; |
14 | }; | 14 | }; |
15 | 15 | ||
16 | #define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8) | 16 | #define BITS_PER_PAGE (PAGE_SIZE * 8) |
17 | #define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) | ||
18 | #define PIDMAP_ENTRIES ((PID_MAX_LIMIT+BITS_PER_PAGE-1)/BITS_PER_PAGE) | ||
17 | 19 | ||
18 | struct bsd_acct_struct; | 20 | struct bsd_acct_struct; |
19 | 21 | ||
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index e7a720104a47..1ad4f31ef6b8 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | #ifdef CONFIG_PINCONF | 15 | #ifdef CONFIG_PINCONF |
16 | 16 | ||
17 | #include <linux/pinctrl/machine.h> | ||
18 | |||
17 | struct pinctrl_dev; | 19 | struct pinctrl_dev; |
18 | struct seq_file; | 20 | struct seq_file; |
19 | 21 | ||
@@ -28,6 +30,7 @@ struct seq_file; | |||
28 | * @pin_config_set: configure an individual pin | 30 | * @pin_config_set: configure an individual pin |
29 | * @pin_config_group_get: get configurations for an entire pin group | 31 | * @pin_config_group_get: get configurations for an entire pin group |
30 | * @pin_config_group_set: configure all pins in a group | 32 | * @pin_config_group_set: configure all pins in a group |
33 | * @pin_config_group_dbg_set: optional debugfs to modify a pin configuration | ||
31 | * @pin_config_dbg_show: optional debugfs display hook that will provide | 34 | * @pin_config_dbg_show: optional debugfs display hook that will provide |
32 | * per-device info for a certain pin in debugfs | 35 | * per-device info for a certain pin in debugfs |
33 | * @pin_config_group_dbg_show: optional debugfs display hook that will provide | 36 | * @pin_config_group_dbg_show: optional debugfs display hook that will provide |
@@ -51,6 +54,9 @@ struct pinconf_ops { | |||
51 | int (*pin_config_group_set) (struct pinctrl_dev *pctldev, | 54 | int (*pin_config_group_set) (struct pinctrl_dev *pctldev, |
52 | unsigned selector, | 55 | unsigned selector, |
53 | unsigned long config); | 56 | unsigned long config); |
57 | int (*pin_config_dbg_parse_modify) (struct pinctrl_dev *pctldev, | ||
58 | const char *arg, | ||
59 | unsigned long *config); | ||
54 | void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, | 60 | void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, |
55 | struct seq_file *s, | 61 | struct seq_file *s, |
56 | unsigned offset); | 62 | unsigned offset); |
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 778804df293f..2c2a9e8d8578 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
@@ -118,9 +118,9 @@ struct pinctrl_desc { | |||
118 | const char *name; | 118 | const char *name; |
119 | struct pinctrl_pin_desc const *pins; | 119 | struct pinctrl_pin_desc const *pins; |
120 | unsigned int npins; | 120 | unsigned int npins; |
121 | struct pinctrl_ops *pctlops; | 121 | const struct pinctrl_ops *pctlops; |
122 | struct pinmux_ops *pmxops; | 122 | const struct pinmux_ops *pmxops; |
123 | struct pinconf_ops *confops; | 123 | const struct pinconf_ops *confops; |
124 | struct module *owner; | 124 | struct module *owner; |
125 | }; | 125 | }; |
126 | 126 | ||
diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h new file mode 100644 index 000000000000..528e73ce46d2 --- /dev/null +++ b/include/linux/platform_data/clk-lpss.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Intel Low Power Subsystem clocks. | ||
3 | * | ||
4 | * Copyright (C) 2013, Intel Corporation | ||
5 | * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.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 version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __CLK_LPSS_H | ||
14 | #define __CLK_LPSS_H | ||
15 | |||
16 | extern int lpt_clk_init(void); | ||
17 | |||
18 | #endif /* __CLK_LPSS_H */ | ||
diff --git a/include/linux/platform_data/coda.h b/include/linux/platform_data/coda.h new file mode 100644 index 000000000000..6ad4410d9e20 --- /dev/null +++ b/include/linux/platform_data/coda.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Philipp Zabel, Pengutronix | ||
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 as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef PLATFORM_CODA_H | ||
10 | #define PLATFORM_CODA_H | ||
11 | |||
12 | struct device; | ||
13 | |||
14 | struct coda_platform_data { | ||
15 | struct device *iram_dev; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/platform_data/dwc3-omap.h b/include/linux/platform_data/dwc3-omap.h index ada401244e0b..1d36ca874cc8 100644 --- a/include/linux/platform_data/dwc3-omap.h +++ b/include/linux/platform_data/dwc3-omap.h | |||
@@ -41,7 +41,3 @@ enum dwc3_omap_utmi_mode { | |||
41 | DWC3_OMAP_UTMI_MODE_HW, | 41 | DWC3_OMAP_UTMI_MODE_HW, |
42 | DWC3_OMAP_UTMI_MODE_SW, | 42 | DWC3_OMAP_UTMI_MODE_SW, |
43 | }; | 43 | }; |
44 | |||
45 | struct dwc3_omap_data { | ||
46 | enum dwc3_omap_utmi_mode utmi_mode; | ||
47 | }; | ||
diff --git a/include/linux/platform_data/emif_plat.h b/include/linux/platform_data/emif_plat.h index 03378ca84061..5c19a2a647c4 100644 --- a/include/linux/platform_data/emif_plat.h +++ b/include/linux/platform_data/emif_plat.h | |||
@@ -40,6 +40,7 @@ | |||
40 | /* Custom config requests */ | 40 | /* Custom config requests */ |
41 | #define EMIF_CUSTOM_CONFIG_LPMODE 0x00000001 | 41 | #define EMIF_CUSTOM_CONFIG_LPMODE 0x00000001 |
42 | #define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002 | 42 | #define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002 |
43 | #define EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART 0x00000004 | ||
43 | 44 | ||
44 | #ifndef __ASSEMBLY__ | 45 | #ifndef __ASSEMBLY__ |
45 | /** | 46 | /** |
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h index 20ee8b221dbd..ea3200527dd3 100644 --- a/include/linux/platform_data/lp855x.h +++ b/include/linux/platform_data/lp855x.h | |||
@@ -69,11 +69,6 @@ enum lp855x_chip_id { | |||
69 | LP8557, | 69 | LP8557, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | enum lp855x_brightness_ctrl_mode { | ||
73 | PWM_BASED = 1, | ||
74 | REGISTER_BASED, | ||
75 | }; | ||
76 | |||
77 | enum lp8550_brighntess_source { | 72 | enum lp8550_brighntess_source { |
78 | LP8550_PWM_ONLY, | 73 | LP8550_PWM_ONLY, |
79 | LP8550_I2C_ONLY = 2, | 74 | LP8550_I2C_ONLY = 2, |
@@ -116,24 +111,18 @@ struct lp855x_rom_data { | |||
116 | /** | 111 | /** |
117 | * struct lp855x_platform_data | 112 | * struct lp855x_platform_data |
118 | * @name : Backlight driver name. If it is not defined, default name is set. | 113 | * @name : Backlight driver name. If it is not defined, default name is set. |
119 | * @mode : brightness control by pwm or lp855x register | ||
120 | * @device_control : value of DEVICE CONTROL register | 114 | * @device_control : value of DEVICE CONTROL register |
121 | * @initial_brightness : initial value of backlight brightness | 115 | * @initial_brightness : initial value of backlight brightness |
122 | * @period_ns : platform specific pwm period value. unit is nano. | 116 | * @period_ns : platform specific pwm period value. unit is nano. |
123 | Only valid when mode is PWM_BASED. | 117 | Only valid when mode is PWM_BASED. |
124 | * @load_new_rom_data : | ||
125 | 0 : use default configuration data | ||
126 | 1 : update values of eeprom or eprom registers on loading driver | ||
127 | * @size_program : total size of lp855x_rom_data | 118 | * @size_program : total size of lp855x_rom_data |
128 | * @rom_data : list of new eeprom/eprom registers | 119 | * @rom_data : list of new eeprom/eprom registers |
129 | */ | 120 | */ |
130 | struct lp855x_platform_data { | 121 | struct lp855x_platform_data { |
131 | char *name; | 122 | const char *name; |
132 | enum lp855x_brightness_ctrl_mode mode; | ||
133 | u8 device_control; | 123 | u8 device_control; |
134 | int initial_brightness; | 124 | u8 initial_brightness; |
135 | unsigned int period_ns; | 125 | unsigned int period_ns; |
136 | u8 load_new_rom_data; | ||
137 | int size_program; | 126 | int size_program; |
138 | struct lp855x_rom_data *rom_data; | 127 | struct lp855x_rom_data *rom_data; |
139 | }; | 128 | }; |
diff --git a/include/linux/platform_data/mv_usb.h b/include/linux/platform_data/mv_usb.h index 944b01dd103e..98b7925f1a2d 100644 --- a/include/linux/platform_data/mv_usb.h +++ b/include/linux/platform_data/mv_usb.h | |||
@@ -34,8 +34,6 @@ struct mv_usb_addon_irq { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct mv_usb_platform_data { | 36 | struct mv_usb_platform_data { |
37 | unsigned int clknum; | ||
38 | char **clkname; | ||
39 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ | 37 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ |
40 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ | 38 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ |
41 | 39 | ||
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h index 88734e871e3a..c7285b575462 100644 --- a/include/linux/platform_data/ntc_thermistor.h +++ b/include/linux/platform_data/ntc_thermistor.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef _LINUX_NTC_H | 21 | #ifndef _LINUX_NTC_H |
22 | #define _LINUX_NTC_H | 22 | #define _LINUX_NTC_H |
23 | 23 | ||
24 | struct iio_channel; | ||
25 | |||
24 | enum ntc_thermistor_type { | 26 | enum ntc_thermistor_type { |
25 | TYPE_NCPXXWB473, | 27 | TYPE_NCPXXWB473, |
26 | TYPE_NCPXXWL333, | 28 | TYPE_NCPXXWL333, |
@@ -39,13 +41,17 @@ struct ntc_thermistor_platform_data { | |||
39 | * described at Documentation/hwmon/ntc_thermistor | 41 | * described at Documentation/hwmon/ntc_thermistor |
40 | * | 42 | * |
41 | * pullup/down_ohm: 0 for infinite / not-connected | 43 | * pullup/down_ohm: 0 for infinite / not-connected |
44 | * | ||
45 | * chan: iio_channel pointer to communicate with the ADC which the | ||
46 | * thermistor is using for conversion of the analog values. | ||
42 | */ | 47 | */ |
43 | int (*read_uV)(void); | 48 | int (*read_uv)(struct ntc_thermistor_platform_data *); |
44 | unsigned int pullup_uV; | 49 | unsigned int pullup_uv; |
45 | 50 | ||
46 | unsigned int pullup_ohm; | 51 | unsigned int pullup_ohm; |
47 | unsigned int pulldown_ohm; | 52 | unsigned int pulldown_ohm; |
48 | enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect; | 53 | enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect; |
54 | struct iio_channel *chan; | ||
49 | 55 | ||
50 | int (*read_ohm)(void); | 56 | int (*read_ohm)(void); |
51 | }; | 57 | }; |
diff --git a/include/linux/platform_data/serial-sccnxp.h b/include/linux/platform_data/serial-sccnxp.h index 215574d1e81d..bdc510d03245 100644 --- a/include/linux/platform_data/serial-sccnxp.h +++ b/include/linux/platform_data/serial-sccnxp.h | |||
@@ -86,10 +86,6 @@ struct sccnxp_pdata { | |||
86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; | 86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; |
87 | /* Timer value for polling mode (usecs) */ | 87 | /* Timer value for polling mode (usecs) */ |
88 | const unsigned int poll_time_us; | 88 | const unsigned int poll_time_us; |
89 | /* Called during startup */ | ||
90 | void (*init)(void); | ||
91 | /* Called before finish */ | ||
92 | void (*exit)(void); | ||
93 | }; | 89 | }; |
94 | 90 | ||
95 | #endif | 91 | #endif |
diff --git a/include/linux/platform_data/si5351.h b/include/linux/platform_data/si5351.h new file mode 100644 index 000000000000..92dabcaf6499 --- /dev/null +++ b/include/linux/platform_data/si5351.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * Si5351A/B/C programmable clock generator platform_data. | ||
3 | */ | ||
4 | |||
5 | #ifndef __LINUX_PLATFORM_DATA_SI5351_H__ | ||
6 | #define __LINUX_PLATFORM_DATA_SI5351_H__ | ||
7 | |||
8 | struct clk; | ||
9 | |||
10 | /** | ||
11 | * enum si5351_variant - SiLabs Si5351 chip variant | ||
12 | * @SI5351_VARIANT_A: Si5351A (8 output clocks, XTAL input) | ||
13 | * @SI5351_VARIANT_A3: Si5351A MSOP10 (3 output clocks, XTAL input) | ||
14 | * @SI5351_VARIANT_B: Si5351B (8 output clocks, XTAL/VXCO input) | ||
15 | * @SI5351_VARIANT_C: Si5351C (8 output clocks, XTAL/CLKIN input) | ||
16 | */ | ||
17 | enum si5351_variant { | ||
18 | SI5351_VARIANT_A = 1, | ||
19 | SI5351_VARIANT_A3 = 2, | ||
20 | SI5351_VARIANT_B = 3, | ||
21 | SI5351_VARIANT_C = 4, | ||
22 | }; | ||
23 | |||
24 | /** | ||
25 | * enum si5351_pll_src - Si5351 pll clock source | ||
26 | * @SI5351_PLL_SRC_DEFAULT: default, do not change eeprom config | ||
27 | * @SI5351_PLL_SRC_XTAL: pll source clock is XTAL input | ||
28 | * @SI5351_PLL_SRC_CLKIN: pll source clock is CLKIN input (Si5351C only) | ||
29 | */ | ||
30 | enum si5351_pll_src { | ||
31 | SI5351_PLL_SRC_DEFAULT = 0, | ||
32 | SI5351_PLL_SRC_XTAL = 1, | ||
33 | SI5351_PLL_SRC_CLKIN = 2, | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * enum si5351_multisynth_src - Si5351 multisynth clock source | ||
38 | * @SI5351_MULTISYNTH_SRC_DEFAULT: default, do not change eeprom config | ||
39 | * @SI5351_MULTISYNTH_SRC_VCO0: multisynth source clock is VCO0 | ||
40 | * @SI5351_MULTISYNTH_SRC_VCO1: multisynth source clock is VCO1/VXCO | ||
41 | */ | ||
42 | enum si5351_multisynth_src { | ||
43 | SI5351_MULTISYNTH_SRC_DEFAULT = 0, | ||
44 | SI5351_MULTISYNTH_SRC_VCO0 = 1, | ||
45 | SI5351_MULTISYNTH_SRC_VCO1 = 2, | ||
46 | }; | ||
47 | |||
48 | /** | ||
49 | * enum si5351_clkout_src - Si5351 clock output clock source | ||
50 | * @SI5351_CLKOUT_SRC_DEFAULT: default, do not change eeprom config | ||
51 | * @SI5351_CLKOUT_SRC_MSYNTH_N: clkout N source clock is multisynth N | ||
52 | * @SI5351_CLKOUT_SRC_MSYNTH_0_4: clkout N source clock is multisynth 0 (N<4) | ||
53 | * or 4 (N>=4) | ||
54 | * @SI5351_CLKOUT_SRC_XTAL: clkout N source clock is XTAL | ||
55 | * @SI5351_CLKOUT_SRC_CLKIN: clkout N source clock is CLKIN (Si5351C only) | ||
56 | */ | ||
57 | enum si5351_clkout_src { | ||
58 | SI5351_CLKOUT_SRC_DEFAULT = 0, | ||
59 | SI5351_CLKOUT_SRC_MSYNTH_N = 1, | ||
60 | SI5351_CLKOUT_SRC_MSYNTH_0_4 = 2, | ||
61 | SI5351_CLKOUT_SRC_XTAL = 3, | ||
62 | SI5351_CLKOUT_SRC_CLKIN = 4, | ||
63 | }; | ||
64 | |||
65 | /** | ||
66 | * enum si5351_drive_strength - Si5351 clock output drive strength | ||
67 | * @SI5351_DRIVE_DEFAULT: default, do not change eeprom config | ||
68 | * @SI5351_DRIVE_2MA: 2mA clock output drive strength | ||
69 | * @SI5351_DRIVE_4MA: 4mA clock output drive strength | ||
70 | * @SI5351_DRIVE_6MA: 6mA clock output drive strength | ||
71 | * @SI5351_DRIVE_8MA: 8mA clock output drive strength | ||
72 | */ | ||
73 | enum si5351_drive_strength { | ||
74 | SI5351_DRIVE_DEFAULT = 0, | ||
75 | SI5351_DRIVE_2MA = 2, | ||
76 | SI5351_DRIVE_4MA = 4, | ||
77 | SI5351_DRIVE_6MA = 6, | ||
78 | SI5351_DRIVE_8MA = 8, | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * struct si5351_clkout_config - Si5351 clock output configuration | ||
83 | * @clkout: clkout number | ||
84 | * @multisynth_src: multisynth source clock | ||
85 | * @clkout_src: clkout source clock | ||
86 | * @pll_master: if true, clkout can also change pll rate | ||
87 | * @drive: output drive strength | ||
88 | * @rate: initial clkout rate, or default if 0 | ||
89 | */ | ||
90 | struct si5351_clkout_config { | ||
91 | enum si5351_multisynth_src multisynth_src; | ||
92 | enum si5351_clkout_src clkout_src; | ||
93 | enum si5351_drive_strength drive; | ||
94 | bool pll_master; | ||
95 | unsigned long rate; | ||
96 | }; | ||
97 | |||
98 | /** | ||
99 | * struct si5351_platform_data - Platform data for the Si5351 clock driver | ||
100 | * @variant: Si5351 chip variant | ||
101 | * @clk_xtal: xtal input clock | ||
102 | * @clk_clkin: clkin input clock | ||
103 | * @pll_src: array of pll source clock setting | ||
104 | * @clkout: array of clkout configuration | ||
105 | */ | ||
106 | struct si5351_platform_data { | ||
107 | enum si5351_variant variant; | ||
108 | struct clk *clk_xtal; | ||
109 | struct clk *clk_clkin; | ||
110 | enum si5351_pll_src pll_src[2]; | ||
111 | struct si5351_clkout_config clkout[8]; | ||
112 | }; | ||
113 | |||
114 | #endif | ||
diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h index ceba18d23a5a..8447f634c7f5 100644 --- a/include/linux/platform_data/spi-s3c64xx.h +++ b/include/linux/platform_data/spi-s3c64xx.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __S3C64XX_PLAT_SPI_H | 11 | #ifndef __S3C64XX_PLAT_SPI_H |
12 | #define __S3C64XX_PLAT_SPI_H | 12 | #define __S3C64XX_PLAT_SPI_H |
13 | 13 | ||
14 | #include <linux/dmaengine.h> | ||
15 | |||
14 | struct platform_device; | 16 | struct platform_device; |
15 | 17 | ||
16 | /** | 18 | /** |
@@ -38,6 +40,7 @@ struct s3c64xx_spi_info { | |||
38 | int src_clk_nr; | 40 | int src_clk_nr; |
39 | int num_cs; | 41 | int num_cs; |
40 | int (*cfg_gpio)(void); | 42 | int (*cfg_gpio)(void); |
43 | dma_filter_fn filter; | ||
41 | }; | 44 | }; |
42 | 45 | ||
43 | /** | 46 | /** |
diff --git a/include/linux/platform_data/video-vt8500lcdfb.h b/include/linux/platform_data/video-vt8500lcdfb.h deleted file mode 100644 index 7f399c370fe0..000000000000 --- a/include/linux/platform_data/video-vt8500lcdfb.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * VT8500/WM8505 Frame Buffer platform data definitions | ||
3 | * | ||
4 | * Copyright (C) 2010 Ed Spiridonov <edo.rus@gmail.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _VT8500FB_H | ||
17 | #define _VT8500FB_H | ||
18 | |||
19 | #include <linux/fb.h> | ||
20 | |||
21 | struct vt8500fb_platform_data { | ||
22 | struct fb_videomode mode; | ||
23 | u32 xres_virtual; | ||
24 | u32 yres_virtual; | ||
25 | u32 bpp; | ||
26 | unsigned long video_mem_phys; | ||
27 | void *video_mem_virt; | ||
28 | unsigned long video_mem_len; | ||
29 | }; | ||
30 | |||
31 | #endif /* _VT8500FB_H */ | ||
diff --git a/include/linux/platform_data/video_s3c.h b/include/linux/platform_data/video_s3c.h new file mode 100644 index 000000000000..48883995f47f --- /dev/null +++ b/include/linux/platform_data/video_s3c.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef __PLATFORM_DATA_VIDEO_S3C | ||
2 | #define __PLATFORM_DATA_VIDEO_S3C | ||
3 | |||
4 | /* S3C_FB_MAX_WIN | ||
5 | * Set to the maximum number of windows that any of the supported hardware | ||
6 | * can use. Since the platform data uses this for an array size, having it | ||
7 | * set to the maximum of any version of the hardware can do is safe. | ||
8 | */ | ||
9 | #define S3C_FB_MAX_WIN (5) | ||
10 | |||
11 | /** | ||
12 | * struct s3c_fb_pd_win - per window setup data | ||
13 | * @xres : The window X size. | ||
14 | * @yres : The window Y size. | ||
15 | * @virtual_x: The virtual X size. | ||
16 | * @virtual_y: The virtual Y size. | ||
17 | */ | ||
18 | struct s3c_fb_pd_win { | ||
19 | unsigned short default_bpp; | ||
20 | unsigned short max_bpp; | ||
21 | unsigned short xres; | ||
22 | unsigned short yres; | ||
23 | unsigned short virtual_x; | ||
24 | unsigned short virtual_y; | ||
25 | }; | ||
26 | |||
27 | /** | ||
28 | * struct s3c_fb_platdata - S3C driver platform specific information | ||
29 | * @setup_gpio: Setup the external GPIO pins to the right state to transfer | ||
30 | * the data from the display system to the connected display | ||
31 | * device. | ||
32 | * @vidcon0: The base vidcon0 values to control the panel data format. | ||
33 | * @vidcon1: The base vidcon1 values to control the panel data output. | ||
34 | * @vtiming: Video timing when connected to a RGB type panel. | ||
35 | * @win: The setup data for each hardware window, or NULL for unused. | ||
36 | * @display_mode: The LCD output display mode. | ||
37 | * | ||
38 | * The platform data supplies the video driver with all the information | ||
39 | * it requires to work with the display(s) attached to the machine. It | ||
40 | * controls the initial mode, the number of display windows (0 is always | ||
41 | * the base framebuffer) that are initialised etc. | ||
42 | * | ||
43 | */ | ||
44 | struct s3c_fb_platdata { | ||
45 | void (*setup_gpio)(void); | ||
46 | |||
47 | struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; | ||
48 | struct fb_videomode *vtiming; | ||
49 | |||
50 | u32 vidcon0; | ||
51 | u32 vidcon1; | ||
52 | }; | ||
53 | |||
54 | #endif | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index c082c71f7225..9abf1db6aea6 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -20,12 +20,12 @@ | |||
20 | struct mfd_cell; | 20 | struct mfd_cell; |
21 | 21 | ||
22 | struct platform_device { | 22 | struct platform_device { |
23 | const char * name; | 23 | const char *name; |
24 | int id; | 24 | int id; |
25 | bool id_auto; | 25 | bool id_auto; |
26 | struct device dev; | 26 | struct device dev; |
27 | u32 num_resources; | 27 | u32 num_resources; |
28 | struct resource * resource; | 28 | struct resource *resource; |
29 | 29 | ||
30 | const struct platform_device_id *id_entry; | 30 | const struct platform_device_id *id_entry; |
31 | 31 | ||
@@ -47,9 +47,12 @@ extern struct bus_type platform_bus_type; | |||
47 | extern struct device platform_bus; | 47 | extern struct device platform_bus; |
48 | 48 | ||
49 | extern void arch_setup_pdev_archdata(struct platform_device *); | 49 | extern void arch_setup_pdev_archdata(struct platform_device *); |
50 | extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); | 50 | extern struct resource *platform_get_resource(struct platform_device *, |
51 | unsigned int, unsigned int); | ||
51 | extern int platform_get_irq(struct platform_device *, unsigned int); | 52 | extern int platform_get_irq(struct platform_device *, unsigned int); |
52 | extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *); | 53 | extern struct resource *platform_get_resource_byname(struct platform_device *, |
54 | unsigned int, | ||
55 | const char *); | ||
53 | extern int platform_get_irq_byname(struct platform_device *, const char *); | 56 | extern int platform_get_irq_byname(struct platform_device *, const char *); |
54 | extern int platform_add_devices(struct platform_device **, int); | 57 | extern int platform_add_devices(struct platform_device **, int); |
55 | 58 | ||
@@ -161,7 +164,8 @@ extern struct platform_device *platform_device_alloc(const char *name, int id); | |||
161 | extern int platform_device_add_resources(struct platform_device *pdev, | 164 | extern int platform_device_add_resources(struct platform_device *pdev, |
162 | const struct resource *res, | 165 | const struct resource *res, |
163 | unsigned int num); | 166 | unsigned int num); |
164 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); | 167 | extern int platform_device_add_data(struct platform_device *pdev, |
168 | const void *data, size_t size); | ||
165 | extern int platform_device_add(struct platform_device *pdev); | 169 | extern int platform_device_add(struct platform_device *pdev); |
166 | extern void platform_device_del(struct platform_device *pdev); | 170 | extern void platform_device_del(struct platform_device *pdev); |
167 | extern void platform_device_put(struct platform_device *pdev); | 171 | extern void platform_device_put(struct platform_device *pdev); |
@@ -190,7 +194,8 @@ static inline void *platform_get_drvdata(const struct platform_device *pdev) | |||
190 | return dev_get_drvdata(&pdev->dev); | 194 | return dev_get_drvdata(&pdev->dev); |
191 | } | 195 | } |
192 | 196 | ||
193 | static inline void platform_set_drvdata(struct platform_device *pdev, void *data) | 197 | static inline void platform_set_drvdata(struct platform_device *pdev, |
198 | void *data) | ||
194 | { | 199 | { |
195 | dev_set_drvdata(&pdev->dev, data); | 200 | dev_set_drvdata(&pdev->dev, data); |
196 | } | 201 | } |
@@ -222,10 +227,10 @@ static void __exit __platform_driver##_exit(void) \ | |||
222 | } \ | 227 | } \ |
223 | module_exit(__platform_driver##_exit); | 228 | module_exit(__platform_driver##_exit); |
224 | 229 | ||
225 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, | 230 | extern struct platform_device *platform_create_bundle( |
226 | int (*probe)(struct platform_device *), | 231 | struct platform_driver *driver, int (*probe)(struct platform_device *), |
227 | struct resource *res, unsigned int n_res, | 232 | struct resource *res, unsigned int n_res, |
228 | const void *data, size_t size); | 233 | const void *data, size_t size); |
229 | 234 | ||
230 | /* early platform driver interface */ | 235 | /* early platform driver interface */ |
231 | struct early_platform_driver { | 236 | struct early_platform_driver { |
diff --git a/include/linux/pm2301_charger.h b/include/linux/pm2301_charger.h index fc3f026922ae..85c16defe11a 100644 --- a/include/linux/pm2301_charger.h +++ b/include/linux/pm2301_charger.h | |||
@@ -48,7 +48,7 @@ struct pm2xxx_charger_platform_data { | |||
48 | size_t num_supplicants; | 48 | size_t num_supplicants; |
49 | int i2c_bus; | 49 | int i2c_bus; |
50 | const char *label; | 50 | const char *label; |
51 | int irq_number; | 51 | int gpio_irq_number; |
52 | unsigned int lpn_gpio; | 52 | unsigned int lpn_gpio; |
53 | int irq_type; | 53 | int irq_type; |
54 | }; | 54 | }; |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 042058fdb0af..60bac697a91b 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -55,6 +55,7 @@ struct cpu_timer_list { | |||
55 | /* POSIX.1b interval timer structure. */ | 55 | /* POSIX.1b interval timer structure. */ |
56 | struct k_itimer { | 56 | struct k_itimer { |
57 | struct list_head list; /* free/ allocate list */ | 57 | struct list_head list; /* free/ allocate list */ |
58 | struct hlist_node t_hash; | ||
58 | spinlock_t it_lock; | 59 | spinlock_t it_lock; |
59 | clockid_t it_clock; /* which timer type */ | 60 | clockid_t it_clock; /* which timer type */ |
60 | timer_t it_id; /* timer id */ | 61 | timer_t it_id; /* timer id */ |
diff --git a/include/linux/power/ab8500.h b/include/linux/power/ab8500.h new file mode 100644 index 000000000000..cdbb6c2a8c51 --- /dev/null +++ b/include/linux/power/ab8500.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson 2013 | ||
3 | * Author: Hongbo Zhang <hongbo.zhang@linaro.com> | ||
4 | * License terms: GNU General Public License v2 | ||
5 | */ | ||
6 | |||
7 | #ifndef PWR_AB8500_H | ||
8 | #define PWR_AB8500_H | ||
9 | |||
10 | extern const struct abx500_res_to_temp ab8500_temp_tbl_a_thermistor[]; | ||
11 | extern const int ab8500_temp_tbl_a_size; | ||
12 | |||
13 | extern const struct abx500_res_to_temp ab8500_temp_tbl_b_thermistor[]; | ||
14 | extern const int ab8500_temp_tbl_b_size; | ||
15 | |||
16 | #endif /* PWR_AB8500_H */ | ||
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 002a99f96331..3828cefb4f65 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -171,6 +171,12 @@ struct power_supply { | |||
171 | char **supplied_to; | 171 | char **supplied_to; |
172 | size_t num_supplicants; | 172 | size_t num_supplicants; |
173 | 173 | ||
174 | char **supplied_from; | ||
175 | size_t num_supplies; | ||
176 | #ifdef CONFIG_OF | ||
177 | struct device_node *of_node; | ||
178 | #endif | ||
179 | |||
174 | int (*get_property)(struct power_supply *psy, | 180 | int (*get_property)(struct power_supply *psy, |
175 | enum power_supply_property psp, | 181 | enum power_supply_property psp, |
176 | union power_supply_propval *val); | 182 | union power_supply_propval *val); |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 5a710b9c578e..87a03c746f17 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -93,14 +93,20 @@ do { \ | |||
93 | 93 | ||
94 | #else /* !CONFIG_PREEMPT_COUNT */ | 94 | #else /* !CONFIG_PREEMPT_COUNT */ |
95 | 95 | ||
96 | #define preempt_disable() do { } while (0) | 96 | /* |
97 | #define sched_preempt_enable_no_resched() do { } while (0) | 97 | * Even if we don't have any preemption, we need preempt disable/enable |
98 | #define preempt_enable_no_resched() do { } while (0) | 98 | * to be barriers, so that we don't have things like get_user/put_user |
99 | #define preempt_enable() do { } while (0) | 99 | * that can cause faults and scheduling migrate into our preempt-protected |
100 | 100 | * region. | |
101 | #define preempt_disable_notrace() do { } while (0) | 101 | */ |
102 | #define preempt_enable_no_resched_notrace() do { } while (0) | 102 | #define preempt_disable() barrier() |
103 | #define preempt_enable_notrace() do { } while (0) | 103 | #define sched_preempt_enable_no_resched() barrier() |
104 | #define preempt_enable_no_resched() barrier() | ||
105 | #define preempt_enable() barrier() | ||
106 | |||
107 | #define preempt_disable_notrace() barrier() | ||
108 | #define preempt_enable_no_resched_notrace() barrier() | ||
109 | #define preempt_enable_notrace() barrier() | ||
104 | 110 | ||
105 | #endif /* CONFIG_PREEMPT_COUNT */ | 111 | #endif /* CONFIG_PREEMPT_COUNT */ |
106 | 112 | ||
diff --git a/include/linux/printk.h b/include/linux/printk.h index 822171fcb1c8..6af944ab38f0 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __KERNEL_PRINTK__ | 1 | #ifndef __KERNEL_PRINTK__ |
2 | #define __KERNEL_PRINTK__ | 2 | #define __KERNEL_PRINTK__ |
3 | 3 | ||
4 | #include <stdarg.h> | ||
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/kern_levels.h> | 6 | #include <linux/kern_levels.h> |
6 | 7 | ||
@@ -95,8 +96,14 @@ int no_printk(const char *fmt, ...) | |||
95 | return 0; | 96 | return 0; |
96 | } | 97 | } |
97 | 98 | ||
99 | #ifdef CONFIG_EARLY_PRINTK | ||
98 | extern asmlinkage __printf(1, 2) | 100 | extern asmlinkage __printf(1, 2) |
99 | void early_printk(const char *fmt, ...); | 101 | void early_printk(const char *fmt, ...); |
102 | void early_vprintk(const char *fmt, va_list ap); | ||
103 | #else | ||
104 | static inline __printf(1, 2) __cold | ||
105 | void early_printk(const char *s, ...) { } | ||
106 | #endif | ||
100 | 107 | ||
101 | #ifdef CONFIG_PRINTK | 108 | #ifdef CONFIG_PRINTK |
102 | asmlinkage __printf(5, 0) | 109 | asmlinkage __printf(5, 0) |
@@ -138,6 +145,9 @@ extern void wake_up_klogd(void); | |||
138 | 145 | ||
139 | void log_buf_kexec_setup(void); | 146 | void log_buf_kexec_setup(void); |
140 | void __init setup_log_buf(int early); | 147 | void __init setup_log_buf(int early); |
148 | void dump_stack_set_arch_desc(const char *fmt, ...); | ||
149 | void dump_stack_print_info(const char *log_lvl); | ||
150 | void show_regs_print_info(const char *log_lvl); | ||
141 | #else | 151 | #else |
142 | static inline __printf(1, 0) | 152 | static inline __printf(1, 0) |
143 | int vprintk(const char *s, va_list args) | 153 | int vprintk(const char *s, va_list args) |
@@ -175,6 +185,18 @@ static inline void log_buf_kexec_setup(void) | |||
175 | static inline void setup_log_buf(int early) | 185 | static inline void setup_log_buf(int early) |
176 | { | 186 | { |
177 | } | 187 | } |
188 | |||
189 | static inline void dump_stack_set_arch_desc(const char *fmt, ...) | ||
190 | { | ||
191 | } | ||
192 | |||
193 | static inline void dump_stack_print_info(const char *log_lvl) | ||
194 | { | ||
195 | } | ||
196 | |||
197 | static inline void show_regs_print_info(const char *log_lvl) | ||
198 | { | ||
199 | } | ||
178 | #endif | 200 | #endif |
179 | 201 | ||
180 | extern void dump_stack(void) __cold; | 202 | extern void dump_stack(void) __cold; |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 8307f2f94d86..94dfb2aa5533 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -117,6 +117,7 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, | |||
117 | const struct file_operations *proc_fops, | 117 | const struct file_operations *proc_fops, |
118 | void *data); | 118 | void *data); |
119 | extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); | 119 | extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); |
120 | extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent); | ||
120 | 121 | ||
121 | struct pid_namespace; | 122 | struct pid_namespace; |
122 | 123 | ||
@@ -202,6 +203,7 @@ static inline struct proc_dir_entry *proc_create_data(const char *name, | |||
202 | return NULL; | 203 | return NULL; |
203 | } | 204 | } |
204 | #define remove_proc_entry(name, parent) do {} while (0) | 205 | #define remove_proc_entry(name, parent) do {} while (0) |
206 | #define remove_proc_subtree(name, parent) do {} while (0) | ||
205 | 207 | ||
206 | static inline struct proc_dir_entry *proc_symlink(const char *name, | 208 | static inline struct proc_dir_entry *proc_symlink(const char *name, |
207 | struct proc_dir_entry *parent,const char *dest) {return NULL;} | 209 | struct proc_dir_entry *parent,const char *dest) {return NULL;} |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 5bf5500db83d..69e37c2d1ea5 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
@@ -6,7 +6,13 @@ struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, | |||
6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, | 6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, |
7 | int flags, const char *dev_name, void *data); | 7 | int flags, const char *dev_name, void *data); |
8 | 8 | ||
9 | #ifndef CONFIG_MMU | 9 | #ifdef CONFIG_MMU |
10 | static inline int | ||
11 | ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) | ||
12 | { | ||
13 | return 0; | ||
14 | } | ||
15 | #else | ||
10 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); | 16 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); |
11 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, | 17 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, |
12 | unsigned long addr, | 18 | unsigned long addr, |
diff --git a/include/linux/rculist_bl.h b/include/linux/rculist_bl.h index cf1244fbf3b6..4f216c59e7db 100644 --- a/include/linux/rculist_bl.h +++ b/include/linux/rculist_bl.h | |||
@@ -20,7 +20,7 @@ static inline void hlist_bl_set_first_rcu(struct hlist_bl_head *h, | |||
20 | static inline struct hlist_bl_node *hlist_bl_first_rcu(struct hlist_bl_head *h) | 20 | static inline struct hlist_bl_node *hlist_bl_first_rcu(struct hlist_bl_head *h) |
21 | { | 21 | { |
22 | return (struct hlist_bl_node *) | 22 | return (struct hlist_bl_node *) |
23 | ((unsigned long)rcu_dereference(h->first) & ~LIST_BL_LOCKMASK); | 23 | ((unsigned long)rcu_dereference_check(h->first, hlist_bl_is_locked(h)) & ~LIST_BL_LOCKMASK); |
24 | } | 24 | } |
25 | 25 | ||
26 | /** | 26 | /** |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index b758ce17b309..9ed2c9a4de45 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -80,6 +80,7 @@ extern void do_trace_rcu_torture_read(char *rcutorturename, | |||
80 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | 80 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) |
81 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 81 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
82 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | 82 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) |
83 | #define ulong2long(a) (*(long *)(&(a))) | ||
83 | 84 | ||
84 | /* Exported common interfaces */ | 85 | /* Exported common interfaces */ |
85 | 86 | ||
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index bf77dfdabef9..02d84e24b7c2 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -389,6 +389,7 @@ int regmap_update_bits_check(struct regmap *map, unsigned int reg, | |||
389 | bool *change); | 389 | bool *change); |
390 | int regmap_get_val_bytes(struct regmap *map); | 390 | int regmap_get_val_bytes(struct regmap *map); |
391 | int regmap_async_complete(struct regmap *map); | 391 | int regmap_async_complete(struct regmap *map); |
392 | bool regmap_can_raw_write(struct regmap *map); | ||
392 | 393 | ||
393 | int regcache_sync(struct regmap *map); | 394 | int regcache_sync(struct regmap *map); |
394 | int regcache_sync_region(struct regmap *map, unsigned int min, | 395 | int regcache_sync_region(struct regmap *map, unsigned int min, |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 7bd73bbdfd1b..7c5ff0c55773 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
@@ -5,11 +5,14 @@ | |||
5 | * | 5 | * |
6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson | 6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson |
7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson | 7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson |
8 | * Daniel Willerud <daniel.willerud@stericsson.com> for ST-Ericsson | ||
8 | */ | 9 | */ |
9 | 10 | ||
10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H | 11 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H |
11 | #define __LINUX_MFD_AB8500_REGULATOR_H | 12 | #define __LINUX_MFD_AB8500_REGULATOR_H |
12 | 13 | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
13 | /* AB8500 regulators */ | 16 | /* AB8500 regulators */ |
14 | enum ab8500_regulator_id { | 17 | enum ab8500_regulator_id { |
15 | AB8500_LDO_AUX1, | 18 | AB8500_LDO_AUX1, |
@@ -17,7 +20,6 @@ enum ab8500_regulator_id { | |||
17 | AB8500_LDO_AUX3, | 20 | AB8500_LDO_AUX3, |
18 | AB8500_LDO_INTCORE, | 21 | AB8500_LDO_INTCORE, |
19 | AB8500_LDO_TVOUT, | 22 | AB8500_LDO_TVOUT, |
20 | AB8500_LDO_USB, | ||
21 | AB8500_LDO_AUDIO, | 23 | AB8500_LDO_AUDIO, |
22 | AB8500_LDO_ANAMIC1, | 24 | AB8500_LDO_ANAMIC1, |
23 | AB8500_LDO_ANAMIC2, | 25 | AB8500_LDO_ANAMIC2, |
@@ -26,7 +28,28 @@ enum ab8500_regulator_id { | |||
26 | AB8500_NUM_REGULATORS, | 28 | AB8500_NUM_REGULATORS, |
27 | }; | 29 | }; |
28 | 30 | ||
29 | /* AB9450 regulators */ | 31 | /* AB8505 regulators */ |
32 | enum ab8505_regulator_id { | ||
33 | AB8505_LDO_AUX1, | ||
34 | AB8505_LDO_AUX2, | ||
35 | AB8505_LDO_AUX3, | ||
36 | AB8505_LDO_AUX4, | ||
37 | AB8505_LDO_AUX5, | ||
38 | AB8505_LDO_AUX6, | ||
39 | AB8505_LDO_INTCORE, | ||
40 | AB8505_LDO_ADC, | ||
41 | AB8505_LDO_USB, | ||
42 | AB8505_LDO_AUDIO, | ||
43 | AB8505_LDO_ANAMIC1, | ||
44 | AB8505_LDO_ANAMIC2, | ||
45 | AB8505_LDO_AUX8, | ||
46 | AB8505_LDO_ANA, | ||
47 | AB8505_SYSCLKREQ_2, | ||
48 | AB8505_SYSCLKREQ_4, | ||
49 | AB8505_NUM_REGULATORS, | ||
50 | }; | ||
51 | |||
52 | /* AB9540 regulators */ | ||
30 | enum ab9540_regulator_id { | 53 | enum ab9540_regulator_id { |
31 | AB9540_LDO_AUX1, | 54 | AB9540_LDO_AUX1, |
32 | AB9540_LDO_AUX2, | 55 | AB9540_LDO_AUX2, |
@@ -45,16 +68,39 @@ enum ab9540_regulator_id { | |||
45 | AB9540_NUM_REGULATORS, | 68 | AB9540_NUM_REGULATORS, |
46 | }; | 69 | }; |
47 | 70 | ||
48 | /* AB8500 and AB9540 register initialization */ | 71 | /* AB8540 regulators */ |
72 | enum ab8540_regulator_id { | ||
73 | AB8540_LDO_AUX1, | ||
74 | AB8540_LDO_AUX2, | ||
75 | AB8540_LDO_AUX3, | ||
76 | AB8540_LDO_AUX4, | ||
77 | AB8540_LDO_AUX5, | ||
78 | AB8540_LDO_AUX6, | ||
79 | AB8540_LDO_INTCORE, | ||
80 | AB8540_LDO_TVOUT, | ||
81 | AB8540_LDO_AUDIO, | ||
82 | AB8540_LDO_ANAMIC1, | ||
83 | AB8540_LDO_ANAMIC2, | ||
84 | AB8540_LDO_DMIC, | ||
85 | AB8540_LDO_ANA, | ||
86 | AB8540_LDO_SDIO, | ||
87 | AB8540_SYSCLKREQ_2, | ||
88 | AB8540_SYSCLKREQ_4, | ||
89 | AB8540_NUM_REGULATORS, | ||
90 | }; | ||
91 | |||
92 | /* AB8500, AB8505, and AB9540 register initialization */ | ||
49 | struct ab8500_regulator_reg_init { | 93 | struct ab8500_regulator_reg_init { |
50 | int id; | 94 | int id; |
95 | u8 mask; | ||
51 | u8 value; | 96 | u8 value; |
52 | }; | 97 | }; |
53 | 98 | ||
54 | #define INIT_REGULATOR_REGISTER(_id, _value) \ | 99 | #define INIT_REGULATOR_REGISTER(_id, _mask, _value) \ |
55 | { \ | 100 | { \ |
56 | .id = _id, \ | 101 | .id = _id, \ |
57 | .value = _value, \ | 102 | .mask = _mask, \ |
103 | .value = _value, \ | ||
58 | } | 104 | } |
59 | 105 | ||
60 | /* AB8500 registers */ | 106 | /* AB8500 registers */ |
@@ -86,10 +132,58 @@ enum ab8500_regulator_reg { | |||
86 | AB8500_REGUCTRL2SPARE, | 132 | AB8500_REGUCTRL2SPARE, |
87 | AB8500_REGUCTRLDISCH, | 133 | AB8500_REGUCTRLDISCH, |
88 | AB8500_REGUCTRLDISCH2, | 134 | AB8500_REGUCTRLDISCH2, |
89 | AB8500_VSMPS1SEL1, | ||
90 | AB8500_NUM_REGULATOR_REGISTERS, | 135 | AB8500_NUM_REGULATOR_REGISTERS, |
91 | }; | 136 | }; |
92 | 137 | ||
138 | /* AB8505 registers */ | ||
139 | enum ab8505_regulator_reg { | ||
140 | AB8505_REGUREQUESTCTRL1, | ||
141 | AB8505_REGUREQUESTCTRL2, | ||
142 | AB8505_REGUREQUESTCTRL3, | ||
143 | AB8505_REGUREQUESTCTRL4, | ||
144 | AB8505_REGUSYSCLKREQ1HPVALID1, | ||
145 | AB8505_REGUSYSCLKREQ1HPVALID2, | ||
146 | AB8505_REGUHWHPREQ1VALID1, | ||
147 | AB8505_REGUHWHPREQ1VALID2, | ||
148 | AB8505_REGUHWHPREQ2VALID1, | ||
149 | AB8505_REGUHWHPREQ2VALID2, | ||
150 | AB8505_REGUSWHPREQVALID1, | ||
151 | AB8505_REGUSWHPREQVALID2, | ||
152 | AB8505_REGUSYSCLKREQVALID1, | ||
153 | AB8505_REGUSYSCLKREQVALID2, | ||
154 | AB8505_REGUVAUX4REQVALID, | ||
155 | AB8505_REGUMISC1, | ||
156 | AB8505_VAUDIOSUPPLY, | ||
157 | AB8505_REGUCTRL1VAMIC, | ||
158 | AB8505_VSMPSAREGU, | ||
159 | AB8505_VSMPSBREGU, | ||
160 | AB8505_VSAFEREGU, /* NOTE! PRCMU register */ | ||
161 | AB8505_VPLLVANAREGU, | ||
162 | AB8505_EXTSUPPLYREGU, | ||
163 | AB8505_VAUX12REGU, | ||
164 | AB8505_VRF1VAUX3REGU, | ||
165 | AB8505_VSMPSASEL1, | ||
166 | AB8505_VSMPSASEL2, | ||
167 | AB8505_VSMPSASEL3, | ||
168 | AB8505_VSMPSBSEL1, | ||
169 | AB8505_VSMPSBSEL2, | ||
170 | AB8505_VSMPSBSEL3, | ||
171 | AB8505_VSAFESEL1, /* NOTE! PRCMU register */ | ||
172 | AB8505_VSAFESEL2, /* NOTE! PRCMU register */ | ||
173 | AB8505_VSAFESEL3, /* NOTE! PRCMU register */ | ||
174 | AB8505_VAUX1SEL, | ||
175 | AB8505_VAUX2SEL, | ||
176 | AB8505_VRF1VAUX3SEL, | ||
177 | AB8505_VAUX4REQCTRL, | ||
178 | AB8505_VAUX4REGU, | ||
179 | AB8505_VAUX4SEL, | ||
180 | AB8505_REGUCTRLDISCH, | ||
181 | AB8505_REGUCTRLDISCH2, | ||
182 | AB8505_REGUCTRLDISCH3, | ||
183 | AB8505_CTRLVAUX5, | ||
184 | AB8505_CTRLVAUX6, | ||
185 | AB8505_NUM_REGULATOR_REGISTERS, | ||
186 | }; | ||
93 | 187 | ||
94 | /* AB9540 registers */ | 188 | /* AB9540 registers */ |
95 | enum ab9540_regulator_reg { | 189 | enum ab9540_regulator_reg { |
@@ -139,4 +233,111 @@ enum ab9540_regulator_reg { | |||
139 | AB9540_NUM_REGULATOR_REGISTERS, | 233 | AB9540_NUM_REGULATOR_REGISTERS, |
140 | }; | 234 | }; |
141 | 235 | ||
236 | /* AB8540 registers */ | ||
237 | enum ab8540_regulator_reg { | ||
238 | AB8540_REGUREQUESTCTRL1, | ||
239 | AB8540_REGUREQUESTCTRL2, | ||
240 | AB8540_REGUREQUESTCTRL3, | ||
241 | AB8540_REGUREQUESTCTRL4, | ||
242 | AB8540_REGUSYSCLKREQ1HPVALID1, | ||
243 | AB8540_REGUSYSCLKREQ1HPVALID2, | ||
244 | AB8540_REGUHWHPREQ1VALID1, | ||
245 | AB8540_REGUHWHPREQ1VALID2, | ||
246 | AB8540_REGUHWHPREQ2VALID1, | ||
247 | AB8540_REGUHWHPREQ2VALID2, | ||
248 | AB8540_REGUSWHPREQVALID1, | ||
249 | AB8540_REGUSWHPREQVALID2, | ||
250 | AB8540_REGUSYSCLKREQVALID1, | ||
251 | AB8540_REGUSYSCLKREQVALID2, | ||
252 | AB8540_REGUVAUX4REQVALID, | ||
253 | AB8540_REGUVAUX5REQVALID, | ||
254 | AB8540_REGUVAUX6REQVALID, | ||
255 | AB8540_REGUVCLKBREQVALID, | ||
256 | AB8540_REGUVRF1REQVALID, | ||
257 | AB8540_REGUMISC1, | ||
258 | AB8540_VAUDIOSUPPLY, | ||
259 | AB8540_REGUCTRL1VAMIC, | ||
260 | AB8540_VHSIC, | ||
261 | AB8540_VSDIO, | ||
262 | AB8540_VSMPS1REGU, | ||
263 | AB8540_VSMPS2REGU, | ||
264 | AB8540_VSMPS3REGU, | ||
265 | AB8540_VPLLVANAREGU, | ||
266 | AB8540_EXTSUPPLYREGU, | ||
267 | AB8540_VAUX12REGU, | ||
268 | AB8540_VRF1VAUX3REGU, | ||
269 | AB8540_VSMPS1SEL1, | ||
270 | AB8540_VSMPS1SEL2, | ||
271 | AB8540_VSMPS1SEL3, | ||
272 | AB8540_VSMPS2SEL1, | ||
273 | AB8540_VSMPS2SEL2, | ||
274 | AB8540_VSMPS2SEL3, | ||
275 | AB8540_VSMPS3SEL1, | ||
276 | AB8540_VSMPS3SEL2, | ||
277 | AB8540_VAUX1SEL, | ||
278 | AB8540_VAUX2SEL, | ||
279 | AB8540_VRF1VAUX3SEL, | ||
280 | AB8540_REGUCTRL2SPARE, | ||
281 | AB8540_VAUX4REQCTRL, | ||
282 | AB8540_VAUX4REGU, | ||
283 | AB8540_VAUX4SEL, | ||
284 | AB8540_VAUX5REQCTRL, | ||
285 | AB8540_VAUX5REGU, | ||
286 | AB8540_VAUX5SEL, | ||
287 | AB8540_VAUX6REQCTRL, | ||
288 | AB8540_VAUX6REGU, | ||
289 | AB8540_VAUX6SEL, | ||
290 | AB8540_VCLKBREQCTRL, | ||
291 | AB8540_VCLKBREGU, | ||
292 | AB8540_VCLKBSEL, | ||
293 | AB8540_VRF1REQCTRL, | ||
294 | AB8540_REGUCTRLDISCH, | ||
295 | AB8540_REGUCTRLDISCH2, | ||
296 | AB8540_REGUCTRLDISCH3, | ||
297 | AB8540_REGUCTRLDISCH4, | ||
298 | AB8540_VSIMSYSCLKCTRL, | ||
299 | AB8540_VANAVPLLSEL, | ||
300 | AB8540_NUM_REGULATOR_REGISTERS, | ||
301 | }; | ||
302 | |||
303 | /* AB8500 external regulators */ | ||
304 | struct ab8500_ext_regulator_cfg { | ||
305 | bool hwreq; /* requires hw mode or high power mode */ | ||
306 | }; | ||
307 | |||
308 | enum ab8500_ext_regulator_id { | ||
309 | AB8500_EXT_SUPPLY1, | ||
310 | AB8500_EXT_SUPPLY2, | ||
311 | AB8500_EXT_SUPPLY3, | ||
312 | AB8500_NUM_EXT_REGULATORS, | ||
313 | }; | ||
314 | |||
315 | /* AB8500 regulator platform data */ | ||
316 | struct ab8500_regulator_platform_data { | ||
317 | int num_reg_init; | ||
318 | struct ab8500_regulator_reg_init *reg_init; | ||
319 | int num_regulator; | ||
320 | struct regulator_init_data *regulator; | ||
321 | int num_ext_regulator; | ||
322 | struct regulator_init_data *ext_regulator; | ||
323 | }; | ||
324 | |||
325 | #ifdef CONFIG_REGULATOR_AB8500_DEBUG | ||
326 | int ab8500_regulator_debug_init(struct platform_device *pdev); | ||
327 | int ab8500_regulator_debug_exit(struct platform_device *pdev); | ||
328 | #else | ||
329 | static inline int ab8500_regulator_debug_init(struct platform_device *pdev) | ||
330 | { | ||
331 | return 0; | ||
332 | } | ||
333 | static inline int ab8500_regulator_debug_exit(struct platform_device *pdev) | ||
334 | { | ||
335 | return 0; | ||
336 | } | ||
337 | #endif | ||
338 | |||
339 | /* AB8500 external regulator functions. */ | ||
340 | int ab8500_ext_regulator_init(struct platform_device *pdev); | ||
341 | void ab8500_ext_regulator_exit(struct platform_device *pdev); | ||
342 | |||
142 | #endif | 343 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 7bc732ce6e50..145022a83085 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -141,18 +141,18 @@ void regulator_put(struct regulator *regulator); | |||
141 | void devm_regulator_put(struct regulator *regulator); | 141 | void devm_regulator_put(struct regulator *regulator); |
142 | 142 | ||
143 | /* regulator output control and status */ | 143 | /* regulator output control and status */ |
144 | int regulator_enable(struct regulator *regulator); | 144 | int __must_check regulator_enable(struct regulator *regulator); |
145 | int regulator_disable(struct regulator *regulator); | 145 | int regulator_disable(struct regulator *regulator); |
146 | int regulator_force_disable(struct regulator *regulator); | 146 | int regulator_force_disable(struct regulator *regulator); |
147 | int regulator_is_enabled(struct regulator *regulator); | 147 | int regulator_is_enabled(struct regulator *regulator); |
148 | int regulator_disable_deferred(struct regulator *regulator, int ms); | 148 | int regulator_disable_deferred(struct regulator *regulator, int ms); |
149 | 149 | ||
150 | int regulator_bulk_get(struct device *dev, int num_consumers, | 150 | int __must_check regulator_bulk_get(struct device *dev, int num_consumers, |
151 | struct regulator_bulk_data *consumers); | 151 | struct regulator_bulk_data *consumers); |
152 | int devm_regulator_bulk_get(struct device *dev, int num_consumers, | 152 | int __must_check devm_regulator_bulk_get(struct device *dev, int num_consumers, |
153 | struct regulator_bulk_data *consumers); | 153 | struct regulator_bulk_data *consumers); |
154 | int regulator_bulk_enable(int num_consumers, | 154 | int __must_check regulator_bulk_enable(int num_consumers, |
155 | struct regulator_bulk_data *consumers); | 155 | struct regulator_bulk_data *consumers); |
156 | int regulator_bulk_disable(int num_consumers, | 156 | int regulator_bulk_disable(int num_consumers, |
157 | struct regulator_bulk_data *consumers); | 157 | struct regulator_bulk_data *consumers); |
158 | int regulator_bulk_force_disable(int num_consumers, | 158 | int regulator_bulk_force_disable(int num_consumers, |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 7df93f52db08..6700cc94bdd1 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -22,6 +22,7 @@ | |||
22 | struct regmap; | 22 | struct regmap; |
23 | struct regulator_dev; | 23 | struct regulator_dev; |
24 | struct regulator_init_data; | 24 | struct regulator_init_data; |
25 | struct regulator_enable_gpio; | ||
25 | 26 | ||
26 | enum regulator_status { | 27 | enum regulator_status { |
27 | REGULATOR_STATUS_OFF, | 28 | REGULATOR_STATUS_OFF, |
@@ -199,6 +200,8 @@ enum regulator_type { | |||
199 | * output when using regulator_set_voltage_sel_regmap | 200 | * output when using regulator_set_voltage_sel_regmap |
200 | * @enable_reg: Register for control when using regmap enable/disable ops | 201 | * @enable_reg: Register for control when using regmap enable/disable ops |
201 | * @enable_mask: Mask for control when using regmap enable/disable ops | 202 | * @enable_mask: Mask for control when using regmap enable/disable ops |
203 | * @enable_is_inverted: A flag to indicate set enable_mask bits to disable | ||
204 | * when using regulator_enable_regmap and friends APIs. | ||
202 | * @bypass_reg: Register for control when using regmap set_bypass | 205 | * @bypass_reg: Register for control when using regmap set_bypass |
203 | * @bypass_mask: Mask for control when using regmap set_bypass | 206 | * @bypass_mask: Mask for control when using regmap set_bypass |
204 | * | 207 | * |
@@ -228,6 +231,7 @@ struct regulator_desc { | |||
228 | unsigned int apply_bit; | 231 | unsigned int apply_bit; |
229 | unsigned int enable_reg; | 232 | unsigned int enable_reg; |
230 | unsigned int enable_mask; | 233 | unsigned int enable_mask; |
234 | bool enable_is_inverted; | ||
231 | unsigned int bypass_reg; | 235 | unsigned int bypass_reg; |
232 | unsigned int bypass_mask; | 236 | unsigned int bypass_mask; |
233 | 237 | ||
@@ -302,8 +306,7 @@ struct regulator_dev { | |||
302 | 306 | ||
303 | struct dentry *debugfs; | 307 | struct dentry *debugfs; |
304 | 308 | ||
305 | int ena_gpio; | 309 | struct regulator_enable_gpio *ena_pin; |
306 | unsigned int ena_gpio_invert:1; | ||
307 | unsigned int ena_gpio_state:1; | 310 | unsigned int ena_gpio_state:1; |
308 | }; | 311 | }; |
309 | 312 | ||
@@ -329,6 +332,8 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev, | |||
329 | int min_uV, int max_uV); | 332 | int min_uV, int max_uV); |
330 | int regulator_map_voltage_iterate(struct regulator_dev *rdev, | 333 | int regulator_map_voltage_iterate(struct regulator_dev *rdev, |
331 | int min_uV, int max_uV); | 334 | int min_uV, int max_uV); |
335 | int regulator_map_voltage_ascend(struct regulator_dev *rdev, | ||
336 | int min_uV, int max_uV); | ||
332 | int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev); | 337 | int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev); |
333 | int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); | 338 | int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); |
334 | int regulator_is_enabled_regmap(struct regulator_dev *rdev); | 339 | int regulator_is_enabled_regmap(struct regulator_dev *rdev); |
diff --git a/include/linux/regulator/max8952.h b/include/linux/regulator/max8952.h index 45e42855ad05..4dbb63a1d4ab 100644 --- a/include/linux/regulator/max8952.h +++ b/include/linux/regulator/max8952.h | |||
@@ -122,13 +122,13 @@ struct max8952_platform_data { | |||
122 | int gpio_vid1; | 122 | int gpio_vid1; |
123 | int gpio_en; | 123 | int gpio_en; |
124 | 124 | ||
125 | u8 default_mode; | 125 | u32 default_mode; |
126 | u8 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ | 126 | u32 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ |
127 | 127 | ||
128 | u8 sync_freq; | 128 | u32 sync_freq; |
129 | u8 ramp_speed; | 129 | u32 ramp_speed; |
130 | 130 | ||
131 | struct regulator_init_data reg_data; | 131 | struct regulator_init_data *reg_data; |
132 | }; | 132 | }; |
133 | 133 | ||
134 | 134 | ||
diff --git a/include/linux/relay.h b/include/linux/relay.h index 91cacc34c159..d7c8359693c6 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -20,9 +20,6 @@ | |||
20 | #include <linux/poll.h> | 20 | #include <linux/poll.h> |
21 | #include <linux/kref.h> | 21 | #include <linux/kref.h> |
22 | 22 | ||
23 | /* Needs a _much_ better name... */ | ||
24 | #define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) | ||
25 | |||
26 | /* | 23 | /* |
27 | * Tracks changes to rchan/rchan_buf structs | 24 | * Tracks changes to rchan/rchan_buf structs |
28 | */ | 25 | */ |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index c23099413ad6..96a509b6be04 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -13,7 +13,7 @@ | |||
13 | * info about what this counter is. | 13 | * info about what this counter is. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/cgroup.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | 18 | ||
19 | /* | 19 | /* |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 1342e69542f3..d69cf637a15a 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/kmemcheck.h> | 4 | #include <linux/kmemcheck.h> |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/seq_file.h> | 6 | #include <linux/seq_file.h> |
7 | #include <linux/poll.h> | ||
7 | 8 | ||
8 | struct ring_buffer; | 9 | struct ring_buffer; |
9 | struct ring_buffer_iter; | 10 | struct ring_buffer_iter; |
@@ -96,6 +97,11 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k | |||
96 | __ring_buffer_alloc((size), (flags), &__key); \ | 97 | __ring_buffer_alloc((size), (flags), &__key); \ |
97 | }) | 98 | }) |
98 | 99 | ||
100 | void ring_buffer_wait(struct ring_buffer *buffer, int cpu); | ||
101 | int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, | ||
102 | struct file *filp, poll_table *poll_table); | ||
103 | |||
104 | |||
99 | #define RING_BUFFER_ALL_CPUS -1 | 105 | #define RING_BUFFER_ALL_CPUS -1 |
100 | 106 | ||
101 | void ring_buffer_free(struct ring_buffer *buffer); | 107 | void ring_buffer_free(struct ring_buffer *buffer); |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 580b24c8b8ca..c2c28975293c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -133,7 +133,13 @@ extern struct rtc_device *rtc_device_register(const char *name, | |||
133 | struct device *dev, | 133 | struct device *dev, |
134 | const struct rtc_class_ops *ops, | 134 | const struct rtc_class_ops *ops, |
135 | struct module *owner); | 135 | struct module *owner); |
136 | extern struct rtc_device *devm_rtc_device_register(struct device *dev, | ||
137 | const char *name, | ||
138 | const struct rtc_class_ops *ops, | ||
139 | struct module *owner); | ||
136 | extern void rtc_device_unregister(struct rtc_device *rtc); | 140 | extern void rtc_device_unregister(struct rtc_device *rtc); |
141 | extern void devm_rtc_device_unregister(struct device *dev, | ||
142 | struct rtc_device *rtc); | ||
137 | 143 | ||
138 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 144 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
139 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 145 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index d35d2b6ddbfb..6f950048b6e9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -127,18 +127,6 @@ extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); | |||
127 | extern void proc_sched_set_task(struct task_struct *p); | 127 | extern void proc_sched_set_task(struct task_struct *p); |
128 | extern void | 128 | extern void |
129 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); | 129 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); |
130 | #else | ||
131 | static inline void | ||
132 | proc_sched_show_task(struct task_struct *p, struct seq_file *m) | ||
133 | { | ||
134 | } | ||
135 | static inline void proc_sched_set_task(struct task_struct *p) | ||
136 | { | ||
137 | } | ||
138 | static inline void | ||
139 | print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | ||
140 | { | ||
141 | } | ||
142 | #endif | 130 | #endif |
143 | 131 | ||
144 | /* | 132 | /* |
@@ -163,9 +151,10 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq) | |||
163 | #define TASK_DEAD 64 | 151 | #define TASK_DEAD 64 |
164 | #define TASK_WAKEKILL 128 | 152 | #define TASK_WAKEKILL 128 |
165 | #define TASK_WAKING 256 | 153 | #define TASK_WAKING 256 |
166 | #define TASK_STATE_MAX 512 | 154 | #define TASK_PARKED 512 |
155 | #define TASK_STATE_MAX 1024 | ||
167 | 156 | ||
168 | #define TASK_STATE_TO_CHAR_STR "RSDTtZXxKW" | 157 | #define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP" |
169 | 158 | ||
170 | extern char ___assert_task_state[1 - 2*!!( | 159 | extern char ___assert_task_state[1 - 2*!!( |
171 | sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; | 160 | sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; |
@@ -320,7 +309,6 @@ extern signed long schedule_timeout_killable(signed long timeout); | |||
320 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 309 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
321 | asmlinkage void schedule(void); | 310 | asmlinkage void schedule(void); |
322 | extern void schedule_preempt_disabled(void); | 311 | extern void schedule_preempt_disabled(void); |
323 | extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); | ||
324 | 312 | ||
325 | struct nsproxy; | 313 | struct nsproxy; |
326 | struct user_namespace; | 314 | struct user_namespace; |
@@ -526,7 +514,8 @@ struct signal_struct { | |||
526 | unsigned int has_child_subreaper:1; | 514 | unsigned int has_child_subreaper:1; |
527 | 515 | ||
528 | /* POSIX.1b Interval Timers */ | 516 | /* POSIX.1b Interval Timers */ |
529 | struct list_head posix_timers; | 517 | int posix_timer_id; |
518 | struct list_head posix_timers; | ||
530 | 519 | ||
531 | /* ITIMER_REAL timer for the process */ | 520 | /* ITIMER_REAL timer for the process */ |
532 | struct hrtimer real_timer; | 521 | struct hrtimer real_timer; |
@@ -570,7 +559,7 @@ struct signal_struct { | |||
570 | cputime_t utime, stime, cutime, cstime; | 559 | cputime_t utime, stime, cutime, cstime; |
571 | cputime_t gtime; | 560 | cputime_t gtime; |
572 | cputime_t cgtime; | 561 | cputime_t cgtime; |
573 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | 562 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
574 | struct cputime prev_cputime; | 563 | struct cputime prev_cputime; |
575 | #endif | 564 | #endif |
576 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; | 565 | unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; |
@@ -637,6 +626,7 @@ struct signal_struct { | |||
637 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ | 626 | #define SIGNAL_STOP_STOPPED 0x00000001 /* job control stop in effect */ |
638 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ | 627 | #define SIGNAL_STOP_CONTINUED 0x00000002 /* SIGCONT since WCONTINUED reap */ |
639 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ | 628 | #define SIGNAL_GROUP_EXIT 0x00000004 /* group exit in progress */ |
629 | #define SIGNAL_GROUP_COREDUMP 0x00000008 /* coredump in progress */ | ||
640 | /* | 630 | /* |
641 | * Pending notifications to parent. | 631 | * Pending notifications to parent. |
642 | */ | 632 | */ |
@@ -768,31 +758,6 @@ enum cpu_idle_type { | |||
768 | }; | 758 | }; |
769 | 759 | ||
770 | /* | 760 | /* |
771 | * Increase resolution of nice-level calculations for 64-bit architectures. | ||
772 | * The extra resolution improves shares distribution and load balancing of | ||
773 | * low-weight task groups (eg. nice +19 on an autogroup), deeper taskgroup | ||
774 | * hierarchies, especially on larger systems. This is not a user-visible change | ||
775 | * and does not change the user-interface for setting shares/weights. | ||
776 | * | ||
777 | * We increase resolution only if we have enough bits to allow this increased | ||
778 | * resolution (i.e. BITS_PER_LONG > 32). The costs for increasing resolution | ||
779 | * when BITS_PER_LONG <= 32 are pretty high and the returns do not justify the | ||
780 | * increased costs. | ||
781 | */ | ||
782 | #if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power usage under light load */ | ||
783 | # define SCHED_LOAD_RESOLUTION 10 | ||
784 | # define scale_load(w) ((w) << SCHED_LOAD_RESOLUTION) | ||
785 | # define scale_load_down(w) ((w) >> SCHED_LOAD_RESOLUTION) | ||
786 | #else | ||
787 | # define SCHED_LOAD_RESOLUTION 0 | ||
788 | # define scale_load(w) (w) | ||
789 | # define scale_load_down(w) (w) | ||
790 | #endif | ||
791 | |||
792 | #define SCHED_LOAD_SHIFT (10 + SCHED_LOAD_RESOLUTION) | ||
793 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | ||
794 | |||
795 | /* | ||
796 | * Increase resolution of cpu_power calculations | 761 | * Increase resolution of cpu_power calculations |
797 | */ | 762 | */ |
798 | #define SCHED_POWER_SHIFT 10 | 763 | #define SCHED_POWER_SHIFT 10 |
@@ -817,62 +782,6 @@ enum cpu_idle_type { | |||
817 | 782 | ||
818 | extern int __weak arch_sd_sibiling_asym_packing(void); | 783 | extern int __weak arch_sd_sibiling_asym_packing(void); |
819 | 784 | ||
820 | struct sched_group_power { | ||
821 | atomic_t ref; | ||
822 | /* | ||
823 | * CPU power of this group, SCHED_LOAD_SCALE being max power for a | ||
824 | * single CPU. | ||
825 | */ | ||
826 | unsigned int power, power_orig; | ||
827 | unsigned long next_update; | ||
828 | /* | ||
829 | * Number of busy cpus in this group. | ||
830 | */ | ||
831 | atomic_t nr_busy_cpus; | ||
832 | |||
833 | unsigned long cpumask[0]; /* iteration mask */ | ||
834 | }; | ||
835 | |||
836 | struct sched_group { | ||
837 | struct sched_group *next; /* Must be a circular list */ | ||
838 | atomic_t ref; | ||
839 | |||
840 | unsigned int group_weight; | ||
841 | struct sched_group_power *sgp; | ||
842 | |||
843 | /* | ||
844 | * The CPUs this group covers. | ||
845 | * | ||
846 | * NOTE: this field is variable length. (Allocated dynamically | ||
847 | * by attaching extra space to the end of the structure, | ||
848 | * depending on how many CPUs the kernel has booted up with) | ||
849 | */ | ||
850 | unsigned long cpumask[0]; | ||
851 | }; | ||
852 | |||
853 | static inline struct cpumask *sched_group_cpus(struct sched_group *sg) | ||
854 | { | ||
855 | return to_cpumask(sg->cpumask); | ||
856 | } | ||
857 | |||
858 | /* | ||
859 | * cpumask masking which cpus in the group are allowed to iterate up the domain | ||
860 | * tree. | ||
861 | */ | ||
862 | static inline struct cpumask *sched_group_mask(struct sched_group *sg) | ||
863 | { | ||
864 | return to_cpumask(sg->sgp->cpumask); | ||
865 | } | ||
866 | |||
867 | /** | ||
868 | * group_first_cpu - Returns the first cpu in the cpumask of a sched_group. | ||
869 | * @group: The group whose first cpu is to be returned. | ||
870 | */ | ||
871 | static inline unsigned int group_first_cpu(struct sched_group *group) | ||
872 | { | ||
873 | return cpumask_first(sched_group_cpus(group)); | ||
874 | } | ||
875 | |||
876 | struct sched_domain_attr { | 785 | struct sched_domain_attr { |
877 | int relax_domain_level; | 786 | int relax_domain_level; |
878 | }; | 787 | }; |
@@ -883,6 +792,8 @@ struct sched_domain_attr { | |||
883 | 792 | ||
884 | extern int sched_domain_level_max; | 793 | extern int sched_domain_level_max; |
885 | 794 | ||
795 | struct sched_group; | ||
796 | |||
886 | struct sched_domain { | 797 | struct sched_domain { |
887 | /* These fields must be setup */ | 798 | /* These fields must be setup */ |
888 | struct sched_domain *parent; /* top domain must be null terminated */ | 799 | struct sched_domain *parent; /* top domain must be null terminated */ |
@@ -899,6 +810,8 @@ struct sched_domain { | |||
899 | unsigned int wake_idx; | 810 | unsigned int wake_idx; |
900 | unsigned int forkexec_idx; | 811 | unsigned int forkexec_idx; |
901 | unsigned int smt_gain; | 812 | unsigned int smt_gain; |
813 | |||
814 | int nohz_idle; /* NOHZ IDLE status */ | ||
902 | int flags; /* See SD_* */ | 815 | int flags; /* See SD_* */ |
903 | int level; | 816 | int level; |
904 | 817 | ||
@@ -971,18 +884,6 @@ extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], | |||
971 | cpumask_var_t *alloc_sched_domains(unsigned int ndoms); | 884 | cpumask_var_t *alloc_sched_domains(unsigned int ndoms); |
972 | void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); | 885 | void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); |
973 | 886 | ||
974 | /* Test a flag in parent sched domain */ | ||
975 | static inline int test_sd_parent(struct sched_domain *sd, int flag) | ||
976 | { | ||
977 | if (sd->parent && (sd->parent->flags & flag)) | ||
978 | return 1; | ||
979 | |||
980 | return 0; | ||
981 | } | ||
982 | |||
983 | unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu); | ||
984 | unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu); | ||
985 | |||
986 | bool cpus_share_cache(int this_cpu, int that_cpu); | 887 | bool cpus_share_cache(int this_cpu, int that_cpu); |
987 | 888 | ||
988 | #else /* CONFIG_SMP */ | 889 | #else /* CONFIG_SMP */ |
@@ -1017,72 +918,6 @@ struct mempolicy; | |||
1017 | struct pipe_inode_info; | 918 | struct pipe_inode_info; |
1018 | struct uts_namespace; | 919 | struct uts_namespace; |
1019 | 920 | ||
1020 | struct rq; | ||
1021 | struct sched_domain; | ||
1022 | |||
1023 | /* | ||
1024 | * wake flags | ||
1025 | */ | ||
1026 | #define WF_SYNC 0x01 /* waker goes to sleep after wakup */ | ||
1027 | #define WF_FORK 0x02 /* child wakeup after fork */ | ||
1028 | #define WF_MIGRATED 0x04 /* internal use, task got migrated */ | ||
1029 | |||
1030 | #define ENQUEUE_WAKEUP 1 | ||
1031 | #define ENQUEUE_HEAD 2 | ||
1032 | #ifdef CONFIG_SMP | ||
1033 | #define ENQUEUE_WAKING 4 /* sched_class::task_waking was called */ | ||
1034 | #else | ||
1035 | #define ENQUEUE_WAKING 0 | ||
1036 | #endif | ||
1037 | |||
1038 | #define DEQUEUE_SLEEP 1 | ||
1039 | |||
1040 | struct sched_class { | ||
1041 | const struct sched_class *next; | ||
1042 | |||
1043 | void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); | ||
1044 | void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); | ||
1045 | void (*yield_task) (struct rq *rq); | ||
1046 | bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt); | ||
1047 | |||
1048 | void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); | ||
1049 | |||
1050 | struct task_struct * (*pick_next_task) (struct rq *rq); | ||
1051 | void (*put_prev_task) (struct rq *rq, struct task_struct *p); | ||
1052 | |||
1053 | #ifdef CONFIG_SMP | ||
1054 | int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); | ||
1055 | void (*migrate_task_rq)(struct task_struct *p, int next_cpu); | ||
1056 | |||
1057 | void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); | ||
1058 | void (*post_schedule) (struct rq *this_rq); | ||
1059 | void (*task_waking) (struct task_struct *task); | ||
1060 | void (*task_woken) (struct rq *this_rq, struct task_struct *task); | ||
1061 | |||
1062 | void (*set_cpus_allowed)(struct task_struct *p, | ||
1063 | const struct cpumask *newmask); | ||
1064 | |||
1065 | void (*rq_online)(struct rq *rq); | ||
1066 | void (*rq_offline)(struct rq *rq); | ||
1067 | #endif | ||
1068 | |||
1069 | void (*set_curr_task) (struct rq *rq); | ||
1070 | void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); | ||
1071 | void (*task_fork) (struct task_struct *p); | ||
1072 | |||
1073 | void (*switched_from) (struct rq *this_rq, struct task_struct *task); | ||
1074 | void (*switched_to) (struct rq *this_rq, struct task_struct *task); | ||
1075 | void (*prio_changed) (struct rq *this_rq, struct task_struct *task, | ||
1076 | int oldprio); | ||
1077 | |||
1078 | unsigned int (*get_rr_interval) (struct rq *rq, | ||
1079 | struct task_struct *task); | ||
1080 | |||
1081 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
1082 | void (*task_move_group) (struct task_struct *p, int on_rq); | ||
1083 | #endif | ||
1084 | }; | ||
1085 | |||
1086 | struct load_weight { | 921 | struct load_weight { |
1087 | unsigned long weight, inv_weight; | 922 | unsigned long weight, inv_weight; |
1088 | }; | 923 | }; |
@@ -1274,8 +1109,10 @@ struct task_struct { | |||
1274 | int exit_code, exit_signal; | 1109 | int exit_code, exit_signal; |
1275 | int pdeath_signal; /* The signal sent when the parent dies */ | 1110 | int pdeath_signal; /* The signal sent when the parent dies */ |
1276 | unsigned int jobctl; /* JOBCTL_*, siglock protected */ | 1111 | unsigned int jobctl; /* JOBCTL_*, siglock protected */ |
1277 | /* ??? */ | 1112 | |
1113 | /* Used for emulating ABI behavior of previous Linux versions */ | ||
1278 | unsigned int personality; | 1114 | unsigned int personality; |
1115 | |||
1279 | unsigned did_exec:1; | 1116 | unsigned did_exec:1; |
1280 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | 1117 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an |
1281 | * execve */ | 1118 | * execve */ |
@@ -1327,7 +1164,7 @@ struct task_struct { | |||
1327 | 1164 | ||
1328 | cputime_t utime, stime, utimescaled, stimescaled; | 1165 | cputime_t utime, stime, utimescaled, stimescaled; |
1329 | cputime_t gtime; | 1166 | cputime_t gtime; |
1330 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | 1167 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
1331 | struct cputime prev_cputime; | 1168 | struct cputime prev_cputime; |
1332 | #endif | 1169 | #endif |
1333 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN | 1170 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
@@ -1793,7 +1630,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, | |||
1793 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1630 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
1794 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1631 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
1795 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 1632 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
1796 | #define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */ | 1633 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ |
1797 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | 1634 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ |
1798 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1635 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
1799 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1636 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
@@ -2412,27 +2249,18 @@ static inline void threadgroup_change_end(struct task_struct *tsk) | |||
2412 | * | 2249 | * |
2413 | * Lock the threadgroup @tsk belongs to. No new task is allowed to enter | 2250 | * Lock the threadgroup @tsk belongs to. No new task is allowed to enter |
2414 | * and member tasks aren't allowed to exit (as indicated by PF_EXITING) or | 2251 | * and member tasks aren't allowed to exit (as indicated by PF_EXITING) or |
2415 | * perform exec. This is useful for cases where the threadgroup needs to | 2252 | * change ->group_leader/pid. This is useful for cases where the threadgroup |
2416 | * stay stable across blockable operations. | 2253 | * needs to stay stable across blockable operations. |
2417 | * | 2254 | * |
2418 | * fork and exit paths explicitly call threadgroup_change_{begin|end}() for | 2255 | * fork and exit paths explicitly call threadgroup_change_{begin|end}() for |
2419 | * synchronization. While held, no new task will be added to threadgroup | 2256 | * synchronization. While held, no new task will be added to threadgroup |
2420 | * and no existing live task will have its PF_EXITING set. | 2257 | * and no existing live task will have its PF_EXITING set. |
2421 | * | 2258 | * |
2422 | * During exec, a task goes and puts its thread group through unusual | 2259 | * de_thread() does threadgroup_change_{begin|end}() when a non-leader |
2423 | * changes. After de-threading, exclusive access is assumed to resources | 2260 | * sub-thread becomes a new leader. |
2424 | * which are usually shared by tasks in the same group - e.g. sighand may | ||
2425 | * be replaced with a new one. Also, the exec'ing task takes over group | ||
2426 | * leader role including its pid. Exclude these changes while locked by | ||
2427 | * grabbing cred_guard_mutex which is used to synchronize exec path. | ||
2428 | */ | 2261 | */ |
2429 | static inline void threadgroup_lock(struct task_struct *tsk) | 2262 | static inline void threadgroup_lock(struct task_struct *tsk) |
2430 | { | 2263 | { |
2431 | /* | ||
2432 | * exec uses exit for de-threading nesting group_rwsem inside | ||
2433 | * cred_guard_mutex. Grab cred_guard_mutex first. | ||
2434 | */ | ||
2435 | mutex_lock(&tsk->signal->cred_guard_mutex); | ||
2436 | down_write(&tsk->signal->group_rwsem); | 2264 | down_write(&tsk->signal->group_rwsem); |
2437 | } | 2265 | } |
2438 | 2266 | ||
@@ -2445,7 +2273,6 @@ static inline void threadgroup_lock(struct task_struct *tsk) | |||
2445 | static inline void threadgroup_unlock(struct task_struct *tsk) | 2273 | static inline void threadgroup_unlock(struct task_struct *tsk) |
2446 | { | 2274 | { |
2447 | up_write(&tsk->signal->group_rwsem); | 2275 | up_write(&tsk->signal->group_rwsem); |
2448 | mutex_unlock(&tsk->signal->cred_guard_mutex); | ||
2449 | } | 2276 | } |
2450 | #else | 2277 | #else |
2451 | static inline void threadgroup_change_begin(struct task_struct *tsk) {} | 2278 | static inline void threadgroup_change_begin(struct task_struct *tsk) {} |
@@ -2622,6 +2449,47 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2622 | } | 2449 | } |
2623 | 2450 | ||
2624 | /* | 2451 | /* |
2452 | * Idle thread specific functions to determine the need_resched | ||
2453 | * polling state. We have two versions, one based on TS_POLLING in | ||
2454 | * thread_info.status and one based on TIF_POLLING_NRFLAG in | ||
2455 | * thread_info.flags | ||
2456 | */ | ||
2457 | #ifdef TS_POLLING | ||
2458 | static inline int tsk_is_polling(struct task_struct *p) | ||
2459 | { | ||
2460 | return task_thread_info(p)->status & TS_POLLING; | ||
2461 | } | ||
2462 | static inline void current_set_polling(void) | ||
2463 | { | ||
2464 | current_thread_info()->status |= TS_POLLING; | ||
2465 | } | ||
2466 | |||
2467 | static inline void current_clr_polling(void) | ||
2468 | { | ||
2469 | current_thread_info()->status &= ~TS_POLLING; | ||
2470 | smp_mb__after_clear_bit(); | ||
2471 | } | ||
2472 | #elif defined(TIF_POLLING_NRFLAG) | ||
2473 | static inline int tsk_is_polling(struct task_struct *p) | ||
2474 | { | ||
2475 | return test_tsk_thread_flag(p, TIF_POLLING_NRFLAG); | ||
2476 | } | ||
2477 | static inline void current_set_polling(void) | ||
2478 | { | ||
2479 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
2480 | } | ||
2481 | |||
2482 | static inline void current_clr_polling(void) | ||
2483 | { | ||
2484 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
2485 | } | ||
2486 | #else | ||
2487 | static inline int tsk_is_polling(struct task_struct *p) { return 0; } | ||
2488 | static inline void current_set_polling(void) { } | ||
2489 | static inline void current_clr_polling(void) { } | ||
2490 | #endif | ||
2491 | |||
2492 | /* | ||
2625 | * Thread group CPU time accounting. | 2493 | * Thread group CPU time accounting. |
2626 | */ | 2494 | */ |
2627 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | 2495 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); |
@@ -2681,28 +2549,7 @@ extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); | |||
2681 | extern long sched_getaffinity(pid_t pid, struct cpumask *mask); | 2549 | extern long sched_getaffinity(pid_t pid, struct cpumask *mask); |
2682 | 2550 | ||
2683 | #ifdef CONFIG_CGROUP_SCHED | 2551 | #ifdef CONFIG_CGROUP_SCHED |
2684 | |||
2685 | extern struct task_group root_task_group; | 2552 | extern struct task_group root_task_group; |
2686 | |||
2687 | extern struct task_group *sched_create_group(struct task_group *parent); | ||
2688 | extern void sched_online_group(struct task_group *tg, | ||
2689 | struct task_group *parent); | ||
2690 | extern void sched_destroy_group(struct task_group *tg); | ||
2691 | extern void sched_offline_group(struct task_group *tg); | ||
2692 | extern void sched_move_task(struct task_struct *tsk); | ||
2693 | #ifdef CONFIG_FAIR_GROUP_SCHED | ||
2694 | extern int sched_group_set_shares(struct task_group *tg, unsigned long shares); | ||
2695 | extern unsigned long sched_group_shares(struct task_group *tg); | ||
2696 | #endif | ||
2697 | #ifdef CONFIG_RT_GROUP_SCHED | ||
2698 | extern int sched_group_set_rt_runtime(struct task_group *tg, | ||
2699 | long rt_runtime_us); | ||
2700 | extern long sched_group_rt_runtime(struct task_group *tg); | ||
2701 | extern int sched_group_set_rt_period(struct task_group *tg, | ||
2702 | long rt_period_us); | ||
2703 | extern long sched_group_rt_period(struct task_group *tg); | ||
2704 | extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); | ||
2705 | #endif | ||
2706 | #endif /* CONFIG_CGROUP_SCHED */ | 2553 | #endif /* CONFIG_CGROUP_SCHED */ |
2707 | 2554 | ||
2708 | extern int task_can_switch_user(struct user_struct *up, | 2555 | extern int task_can_switch_user(struct user_struct *up, |
diff --git a/include/linux/security.h b/include/linux/security.h index eee7478cda70..4686491852a7 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1012,6 +1012,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1012 | * This hook can be used by the module to update any security state | 1012 | * This hook can be used by the module to update any security state |
1013 | * associated with the TUN device's security structure. | 1013 | * associated with the TUN device's security structure. |
1014 | * @security pointer to the TUN devices's security structure. | 1014 | * @security pointer to the TUN devices's security structure. |
1015 | * @skb_owned_by: | ||
1016 | * This hook sets the packet's owning sock. | ||
1017 | * @skb is the packet. | ||
1018 | * @sk the sock which owns the packet. | ||
1015 | * | 1019 | * |
1016 | * Security hooks for XFRM operations. | 1020 | * Security hooks for XFRM operations. |
1017 | * | 1021 | * |
@@ -1436,7 +1440,7 @@ struct security_operations { | |||
1436 | struct path *new_path); | 1440 | struct path *new_path); |
1437 | int (*sb_set_mnt_opts) (struct super_block *sb, | 1441 | int (*sb_set_mnt_opts) (struct super_block *sb, |
1438 | struct security_mnt_opts *opts); | 1442 | struct security_mnt_opts *opts); |
1439 | void (*sb_clone_mnt_opts) (const struct super_block *oldsb, | 1443 | int (*sb_clone_mnt_opts) (const struct super_block *oldsb, |
1440 | struct super_block *newsb); | 1444 | struct super_block *newsb); |
1441 | int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts); | 1445 | int (*sb_parse_opts_str) (char *options, struct security_mnt_opts *opts); |
1442 | 1446 | ||
@@ -1638,6 +1642,7 @@ struct security_operations { | |||
1638 | int (*tun_dev_attach_queue) (void *security); | 1642 | int (*tun_dev_attach_queue) (void *security); |
1639 | int (*tun_dev_attach) (struct sock *sk, void *security); | 1643 | int (*tun_dev_attach) (struct sock *sk, void *security); |
1640 | int (*tun_dev_open) (void *security); | 1644 | int (*tun_dev_open) (void *security); |
1645 | void (*skb_owned_by) (struct sk_buff *skb, struct sock *sk); | ||
1641 | #endif /* CONFIG_SECURITY_NETWORK */ | 1646 | #endif /* CONFIG_SECURITY_NETWORK */ |
1642 | 1647 | ||
1643 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1648 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
@@ -1721,7 +1726,7 @@ int security_sb_mount(const char *dev_name, struct path *path, | |||
1721 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1726 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1722 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1727 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1723 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1728 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
1724 | void security_sb_clone_mnt_opts(const struct super_block *oldsb, | 1729 | int security_sb_clone_mnt_opts(const struct super_block *oldsb, |
1725 | struct super_block *newsb); | 1730 | struct super_block *newsb); |
1726 | int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); | 1731 | int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); |
1727 | 1732 | ||
@@ -2011,9 +2016,11 @@ static inline int security_sb_set_mnt_opts(struct super_block *sb, | |||
2011 | return 0; | 2016 | return 0; |
2012 | } | 2017 | } |
2013 | 2018 | ||
2014 | static inline void security_sb_clone_mnt_opts(const struct super_block *oldsb, | 2019 | static inline int security_sb_clone_mnt_opts(const struct super_block *oldsb, |
2015 | struct super_block *newsb) | 2020 | struct super_block *newsb) |
2016 | { } | 2021 | { |
2022 | return 0; | ||
2023 | } | ||
2017 | 2024 | ||
2018 | static inline int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) | 2025 | static inline int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts) |
2019 | { | 2026 | { |
@@ -2588,6 +2595,8 @@ int security_tun_dev_attach_queue(void *security); | |||
2588 | int security_tun_dev_attach(struct sock *sk, void *security); | 2595 | int security_tun_dev_attach(struct sock *sk, void *security); |
2589 | int security_tun_dev_open(void *security); | 2596 | int security_tun_dev_open(void *security); |
2590 | 2597 | ||
2598 | void security_skb_owned_by(struct sk_buff *skb, struct sock *sk); | ||
2599 | |||
2591 | #else /* CONFIG_SECURITY_NETWORK */ | 2600 | #else /* CONFIG_SECURITY_NETWORK */ |
2592 | static inline int security_unix_stream_connect(struct sock *sock, | 2601 | static inline int security_unix_stream_connect(struct sock *sock, |
2593 | struct sock *other, | 2602 | struct sock *other, |
@@ -2779,6 +2788,11 @@ static inline int security_tun_dev_open(void *security) | |||
2779 | { | 2788 | { |
2780 | return 0; | 2789 | return 0; |
2781 | } | 2790 | } |
2791 | |||
2792 | static inline void security_skb_owned_by(struct sk_buff *skb, struct sock *sk) | ||
2793 | { | ||
2794 | } | ||
2795 | |||
2782 | #endif /* CONFIG_SECURITY_NETWORK */ | 2796 | #endif /* CONFIG_SECURITY_NETWORK */ |
2783 | 2797 | ||
2784 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 2798 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
diff --git a/include/linux/serial_s3c.h b/include/linux/serial_s3c.h new file mode 100644 index 000000000000..907d9d1d56cf --- /dev/null +++ b/include/linux/serial_s3c.h | |||
@@ -0,0 +1,260 @@ | |||
1 | /* | ||
2 | * Internal header file for Samsung S3C2410 serial ports (UART0-2) | ||
3 | * | ||
4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
5 | * | ||
6 | * Additional defines, Copyright 2003 Simtec Electronics (linux@simtec.co.uk) | ||
7 | * | ||
8 | * Adapted from: | ||
9 | * | ||
10 | * Internal header file for MX1ADS serial ports (UART1 & 2) | ||
11 | * | ||
12 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | */ | ||
28 | |||
29 | #ifndef __ASM_ARM_REGS_SERIAL_H | ||
30 | #define __ASM_ARM_REGS_SERIAL_H | ||
31 | |||
32 | #define S3C2410_URXH (0x24) | ||
33 | #define S3C2410_UTXH (0x20) | ||
34 | #define S3C2410_ULCON (0x00) | ||
35 | #define S3C2410_UCON (0x04) | ||
36 | #define S3C2410_UFCON (0x08) | ||
37 | #define S3C2410_UMCON (0x0C) | ||
38 | #define S3C2410_UBRDIV (0x28) | ||
39 | #define S3C2410_UTRSTAT (0x10) | ||
40 | #define S3C2410_UERSTAT (0x14) | ||
41 | #define S3C2410_UFSTAT (0x18) | ||
42 | #define S3C2410_UMSTAT (0x1C) | ||
43 | |||
44 | #define S3C2410_LCON_CFGMASK ((0xF<<3)|(0x3)) | ||
45 | |||
46 | #define S3C2410_LCON_CS5 (0x0) | ||
47 | #define S3C2410_LCON_CS6 (0x1) | ||
48 | #define S3C2410_LCON_CS7 (0x2) | ||
49 | #define S3C2410_LCON_CS8 (0x3) | ||
50 | #define S3C2410_LCON_CSMASK (0x3) | ||
51 | |||
52 | #define S3C2410_LCON_PNONE (0x0) | ||
53 | #define S3C2410_LCON_PEVEN (0x5 << 3) | ||
54 | #define S3C2410_LCON_PODD (0x4 << 3) | ||
55 | #define S3C2410_LCON_PMASK (0x7 << 3) | ||
56 | |||
57 | #define S3C2410_LCON_STOPB (1<<2) | ||
58 | #define S3C2410_LCON_IRM (1<<6) | ||
59 | |||
60 | #define S3C2440_UCON_CLKMASK (3<<10) | ||
61 | #define S3C2440_UCON_CLKSHIFT (10) | ||
62 | #define S3C2440_UCON_PCLK (0<<10) | ||
63 | #define S3C2440_UCON_UCLK (1<<10) | ||
64 | #define S3C2440_UCON_PCLK2 (2<<10) | ||
65 | #define S3C2440_UCON_FCLK (3<<10) | ||
66 | #define S3C2443_UCON_EPLL (3<<10) | ||
67 | |||
68 | #define S3C6400_UCON_CLKMASK (3<<10) | ||
69 | #define S3C6400_UCON_CLKSHIFT (10) | ||
70 | #define S3C6400_UCON_PCLK (0<<10) | ||
71 | #define S3C6400_UCON_PCLK2 (2<<10) | ||
72 | #define S3C6400_UCON_UCLK0 (1<<10) | ||
73 | #define S3C6400_UCON_UCLK1 (3<<10) | ||
74 | |||
75 | #define S3C2440_UCON2_FCLK_EN (1<<15) | ||
76 | #define S3C2440_UCON0_DIVMASK (15 << 12) | ||
77 | #define S3C2440_UCON1_DIVMASK (15 << 12) | ||
78 | #define S3C2440_UCON2_DIVMASK (7 << 12) | ||
79 | #define S3C2440_UCON_DIVSHIFT (12) | ||
80 | |||
81 | #define S3C2412_UCON_CLKMASK (3<<10) | ||
82 | #define S3C2412_UCON_CLKSHIFT (10) | ||
83 | #define S3C2412_UCON_UCLK (1<<10) | ||
84 | #define S3C2412_UCON_USYSCLK (3<<10) | ||
85 | #define S3C2412_UCON_PCLK (0<<10) | ||
86 | #define S3C2412_UCON_PCLK2 (2<<10) | ||
87 | |||
88 | #define S3C2410_UCON_CLKMASK (1 << 10) | ||
89 | #define S3C2410_UCON_CLKSHIFT (10) | ||
90 | #define S3C2410_UCON_UCLK (1<<10) | ||
91 | #define S3C2410_UCON_SBREAK (1<<4) | ||
92 | |||
93 | #define S3C2410_UCON_TXILEVEL (1<<9) | ||
94 | #define S3C2410_UCON_RXILEVEL (1<<8) | ||
95 | #define S3C2410_UCON_TXIRQMODE (1<<2) | ||
96 | #define S3C2410_UCON_RXIRQMODE (1<<0) | ||
97 | #define S3C2410_UCON_RXFIFO_TOI (1<<7) | ||
98 | #define S3C2443_UCON_RXERR_IRQEN (1<<6) | ||
99 | #define S3C2443_UCON_LOOPBACK (1<<5) | ||
100 | |||
101 | #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
102 | S3C2410_UCON_RXILEVEL | \ | ||
103 | S3C2410_UCON_TXIRQMODE | \ | ||
104 | S3C2410_UCON_RXIRQMODE | \ | ||
105 | S3C2410_UCON_RXFIFO_TOI) | ||
106 | |||
107 | #define S3C2410_UFCON_FIFOMODE (1<<0) | ||
108 | #define S3C2410_UFCON_TXTRIG0 (0<<6) | ||
109 | #define S3C2410_UFCON_RXTRIG8 (1<<4) | ||
110 | #define S3C2410_UFCON_RXTRIG12 (2<<4) | ||
111 | |||
112 | /* S3C2440 FIFO trigger levels */ | ||
113 | #define S3C2440_UFCON_RXTRIG1 (0<<4) | ||
114 | #define S3C2440_UFCON_RXTRIG8 (1<<4) | ||
115 | #define S3C2440_UFCON_RXTRIG16 (2<<4) | ||
116 | #define S3C2440_UFCON_RXTRIG32 (3<<4) | ||
117 | |||
118 | #define S3C2440_UFCON_TXTRIG0 (0<<6) | ||
119 | #define S3C2440_UFCON_TXTRIG16 (1<<6) | ||
120 | #define S3C2440_UFCON_TXTRIG32 (2<<6) | ||
121 | #define S3C2440_UFCON_TXTRIG48 (3<<6) | ||
122 | |||
123 | #define S3C2410_UFCON_RESETBOTH (3<<1) | ||
124 | #define S3C2410_UFCON_RESETTX (1<<2) | ||
125 | #define S3C2410_UFCON_RESETRX (1<<1) | ||
126 | |||
127 | #define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
128 | S3C2410_UFCON_TXTRIG0 | \ | ||
129 | S3C2410_UFCON_RXTRIG8 ) | ||
130 | |||
131 | #define S3C2410_UMCOM_AFC (1<<4) | ||
132 | #define S3C2410_UMCOM_RTS_LOW (1<<0) | ||
133 | |||
134 | #define S3C2412_UMCON_AFC_63 (0<<5) /* same as s3c2443 */ | ||
135 | #define S3C2412_UMCON_AFC_56 (1<<5) | ||
136 | #define S3C2412_UMCON_AFC_48 (2<<5) | ||
137 | #define S3C2412_UMCON_AFC_40 (3<<5) | ||
138 | #define S3C2412_UMCON_AFC_32 (4<<5) | ||
139 | #define S3C2412_UMCON_AFC_24 (5<<5) | ||
140 | #define S3C2412_UMCON_AFC_16 (6<<5) | ||
141 | #define S3C2412_UMCON_AFC_8 (7<<5) | ||
142 | |||
143 | #define S3C2410_UFSTAT_TXFULL (1<<9) | ||
144 | #define S3C2410_UFSTAT_RXFULL (1<<8) | ||
145 | #define S3C2410_UFSTAT_TXMASK (15<<4) | ||
146 | #define S3C2410_UFSTAT_TXSHIFT (4) | ||
147 | #define S3C2410_UFSTAT_RXMASK (15<<0) | ||
148 | #define S3C2410_UFSTAT_RXSHIFT (0) | ||
149 | |||
150 | /* UFSTAT S3C2443 same as S3C2440 */ | ||
151 | #define S3C2440_UFSTAT_TXFULL (1<<14) | ||
152 | #define S3C2440_UFSTAT_RXFULL (1<<6) | ||
153 | #define S3C2440_UFSTAT_TXSHIFT (8) | ||
154 | #define S3C2440_UFSTAT_RXSHIFT (0) | ||
155 | #define S3C2440_UFSTAT_TXMASK (63<<8) | ||
156 | #define S3C2440_UFSTAT_RXMASK (63) | ||
157 | |||
158 | #define S3C2410_UTRSTAT_TXE (1<<2) | ||
159 | #define S3C2410_UTRSTAT_TXFE (1<<1) | ||
160 | #define S3C2410_UTRSTAT_RXDR (1<<0) | ||
161 | |||
162 | #define S3C2410_UERSTAT_OVERRUN (1<<0) | ||
163 | #define S3C2410_UERSTAT_FRAME (1<<2) | ||
164 | #define S3C2410_UERSTAT_BREAK (1<<3) | ||
165 | #define S3C2443_UERSTAT_PARITY (1<<1) | ||
166 | |||
167 | #define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ | ||
168 | S3C2410_UERSTAT_FRAME | \ | ||
169 | S3C2410_UERSTAT_BREAK) | ||
170 | |||
171 | #define S3C2410_UMSTAT_CTS (1<<0) | ||
172 | #define S3C2410_UMSTAT_DeltaCTS (1<<2) | ||
173 | |||
174 | #define S3C2443_DIVSLOT (0x2C) | ||
175 | |||
176 | /* S3C64XX interrupt registers. */ | ||
177 | #define S3C64XX_UINTP 0x30 | ||
178 | #define S3C64XX_UINTSP 0x34 | ||
179 | #define S3C64XX_UINTM 0x38 | ||
180 | |||
181 | #define S3C64XX_UINTM_RXD (0) | ||
182 | #define S3C64XX_UINTM_TXD (2) | ||
183 | #define S3C64XX_UINTM_RXD_MSK (1 << S3C64XX_UINTM_RXD) | ||
184 | #define S3C64XX_UINTM_TXD_MSK (1 << S3C64XX_UINTM_TXD) | ||
185 | |||
186 | /* Following are specific to S5PV210 */ | ||
187 | #define S5PV210_UCON_CLKMASK (1<<10) | ||
188 | #define S5PV210_UCON_CLKSHIFT (10) | ||
189 | #define S5PV210_UCON_PCLK (0<<10) | ||
190 | #define S5PV210_UCON_UCLK (1<<10) | ||
191 | |||
192 | #define S5PV210_UFCON_TXTRIG0 (0<<8) | ||
193 | #define S5PV210_UFCON_TXTRIG4 (1<<8) | ||
194 | #define S5PV210_UFCON_TXTRIG8 (2<<8) | ||
195 | #define S5PV210_UFCON_TXTRIG16 (3<<8) | ||
196 | #define S5PV210_UFCON_TXTRIG32 (4<<8) | ||
197 | #define S5PV210_UFCON_TXTRIG64 (5<<8) | ||
198 | #define S5PV210_UFCON_TXTRIG128 (6<<8) | ||
199 | #define S5PV210_UFCON_TXTRIG256 (7<<8) | ||
200 | |||
201 | #define S5PV210_UFCON_RXTRIG1 (0<<4) | ||
202 | #define S5PV210_UFCON_RXTRIG4 (1<<4) | ||
203 | #define S5PV210_UFCON_RXTRIG8 (2<<4) | ||
204 | #define S5PV210_UFCON_RXTRIG16 (3<<4) | ||
205 | #define S5PV210_UFCON_RXTRIG32 (4<<4) | ||
206 | #define S5PV210_UFCON_RXTRIG64 (5<<4) | ||
207 | #define S5PV210_UFCON_RXTRIG128 (6<<4) | ||
208 | #define S5PV210_UFCON_RXTRIG256 (7<<4) | ||
209 | |||
210 | #define S5PV210_UFSTAT_TXFULL (1<<24) | ||
211 | #define S5PV210_UFSTAT_RXFULL (1<<8) | ||
212 | #define S5PV210_UFSTAT_TXMASK (255<<16) | ||
213 | #define S5PV210_UFSTAT_TXSHIFT (16) | ||
214 | #define S5PV210_UFSTAT_RXMASK (255<<0) | ||
215 | #define S5PV210_UFSTAT_RXSHIFT (0) | ||
216 | |||
217 | #define S3C2410_UCON_CLKSEL0 (1 << 0) | ||
218 | #define S3C2410_UCON_CLKSEL1 (1 << 1) | ||
219 | #define S3C2410_UCON_CLKSEL2 (1 << 2) | ||
220 | #define S3C2410_UCON_CLKSEL3 (1 << 3) | ||
221 | |||
222 | /* Default values for s5pv210 UCON and UFCON uart registers */ | ||
223 | #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
224 | S3C2410_UCON_RXILEVEL | \ | ||
225 | S3C2410_UCON_TXIRQMODE | \ | ||
226 | S3C2410_UCON_RXIRQMODE | \ | ||
227 | S3C2410_UCON_RXFIFO_TOI | \ | ||
228 | S3C2443_UCON_RXERR_IRQEN) | ||
229 | |||
230 | #define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
231 | S5PV210_UFCON_TXTRIG4 | \ | ||
232 | S5PV210_UFCON_RXTRIG4) | ||
233 | |||
234 | #ifndef __ASSEMBLY__ | ||
235 | |||
236 | /* configuration structure for per-machine configurations for the | ||
237 | * serial port | ||
238 | * | ||
239 | * the pointer is setup by the machine specific initialisation from the | ||
240 | * arch/arm/mach-s3c2410/ directory. | ||
241 | */ | ||
242 | |||
243 | struct s3c2410_uartcfg { | ||
244 | unsigned char hwport; /* hardware port number */ | ||
245 | unsigned char unused; | ||
246 | unsigned short flags; | ||
247 | upf_t uart_flags; /* default uart flags */ | ||
248 | unsigned int clk_sel; | ||
249 | |||
250 | unsigned int has_fracval; | ||
251 | |||
252 | unsigned long ucon; /* value of ucon for port */ | ||
253 | unsigned long ulcon; /* value of ulcon for port */ | ||
254 | unsigned long ufcon; /* value of ufcon for port */ | ||
255 | }; | ||
256 | |||
257 | #endif /* __ASSEMBLY__ */ | ||
258 | |||
259 | #endif /* __ASM_ARM_REGS_SERIAL_H */ | ||
260 | |||
diff --git a/include/linux/signal.h b/include/linux/signal.h index a2dcb94ea49d..9475c5cb28bc 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -250,11 +250,11 @@ extern int show_unhandled_signals; | |||
250 | extern int sigsuspend(sigset_t *); | 250 | extern int sigsuspend(sigset_t *); |
251 | 251 | ||
252 | struct sigaction { | 252 | struct sigaction { |
253 | #ifndef __ARCH_HAS_ODD_SIGACTION | 253 | #ifndef __ARCH_HAS_IRIX_SIGACTION |
254 | __sighandler_t sa_handler; | 254 | __sighandler_t sa_handler; |
255 | unsigned long sa_flags; | 255 | unsigned long sa_flags; |
256 | #else | 256 | #else |
257 | unsigned long sa_flags; | 257 | unsigned int sa_flags; |
258 | __sighandler_t sa_handler; | 258 | __sighandler_t sa_handler; |
259 | #endif | 259 | #endif |
260 | #ifdef __ARCH_HAS_SA_RESTORER | 260 | #ifdef __ARCH_HAS_SA_RESTORER |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 441f5bfdab8e..b8292d8cc9fa 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -2643,6 +2643,13 @@ static inline void nf_reset(struct sk_buff *skb) | |||
2643 | #endif | 2643 | #endif |
2644 | } | 2644 | } |
2645 | 2645 | ||
2646 | static inline void nf_reset_trace(struct sk_buff *skb) | ||
2647 | { | ||
2648 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) | ||
2649 | skb->nf_trace = 0; | ||
2650 | #endif | ||
2651 | } | ||
2652 | |||
2646 | /* Note: This doesn't put any conntrack and bridge info in dst. */ | 2653 | /* Note: This doesn't put any conntrack and bridge info in dst. */ |
2647 | static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | 2654 | static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) |
2648 | { | 2655 | { |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 3e07a7df6478..e6564c1dc552 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -20,7 +20,6 @@ struct call_single_data { | |||
20 | smp_call_func_t func; | 20 | smp_call_func_t func; |
21 | void *info; | 21 | void *info; |
22 | u16 flags; | 22 | u16 flags; |
23 | u16 priv; | ||
24 | }; | 23 | }; |
25 | 24 | ||
26 | /* total number of cpus in this system (may exceed NR_CPUS) */ | 25 | /* total number of cpus in this system (may exceed NR_CPUS) */ |
diff --git a/include/linux/spi/spi-tegra.h b/include/linux/spi/spi-tegra.h deleted file mode 100644 index 786932c62edb..000000000000 --- a/include/linux/spi/spi-tegra.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * spi-tegra.h: SPI interface for Nvidia Tegra20 SLINK controller. | ||
3 | * | ||
4 | * Copyright (C) 2011 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_SPI_TEGRA_H | ||
22 | #define _LINUX_SPI_TEGRA_H | ||
23 | |||
24 | struct tegra_spi_platform_data { | ||
25 | int dma_req_sel; | ||
26 | unsigned int spi_max_frequency; | ||
27 | }; | ||
28 | |||
29 | /* | ||
30 | * Controller data from device to pass some info like | ||
31 | * hw based chip select can be used or not and if yes | ||
32 | * then CS hold and setup time. | ||
33 | */ | ||
34 | struct tegra_spi_device_controller_data { | ||
35 | bool is_hw_based_cs; | ||
36 | int cs_setup_clk_count; | ||
37 | int cs_hold_clk_count; | ||
38 | }; | ||
39 | |||
40 | #endif /* _LINUX_SPI_TEGRA_H */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 38c2b925923d..733eb5ee31c5 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -228,6 +228,11 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
228 | * every chipselect is connected to a slave. | 228 | * every chipselect is connected to a slave. |
229 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. | 229 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. |
230 | * @mode_bits: flags understood by this controller driver | 230 | * @mode_bits: flags understood by this controller driver |
231 | * @bits_per_word_mask: A mask indicating which values of bits_per_word are | ||
232 | * supported by the driver. Bit n indicates that a bits_per_word n+1 is | ||
233 | * suported. If set, the SPI core will reject any transfer with an | ||
234 | * unsupported bits_per_word. If not set, this value is simply ignored, | ||
235 | * and it's up to the individual driver to perform any validation. | ||
231 | * @flags: other constraints relevant to this driver | 236 | * @flags: other constraints relevant to this driver |
232 | * @bus_lock_spinlock: spinlock for SPI bus locking | 237 | * @bus_lock_spinlock: spinlock for SPI bus locking |
233 | * @bus_lock_mutex: mutex for SPI bus locking | 238 | * @bus_lock_mutex: mutex for SPI bus locking |
@@ -301,6 +306,9 @@ struct spi_master { | |||
301 | /* spi_device.mode flags understood by this controller driver */ | 306 | /* spi_device.mode flags understood by this controller driver */ |
302 | u16 mode_bits; | 307 | u16 mode_bits; |
303 | 308 | ||
309 | /* bitmask of supported bits_per_word for transfers */ | ||
310 | u32 bits_per_word_mask; | ||
311 | |||
304 | /* other constraints relevant to this driver */ | 312 | /* other constraints relevant to this driver */ |
305 | u16 flags; | 313 | u16 flags; |
306 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ | 314 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ |
diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index a26e2fb604e6..e2369c167dbd 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h | |||
@@ -16,7 +16,10 @@ | |||
16 | * In the debug case, 1 means unlocked, 0 means locked. (the values | 16 | * In the debug case, 1 means unlocked, 0 means locked. (the values |
17 | * are inverted, to catch initialization bugs) | 17 | * are inverted, to catch initialization bugs) |
18 | * | 18 | * |
19 | * No atomicity anywhere, we are on UP. | 19 | * No atomicity anywhere, we are on UP. However, we still need |
20 | * the compiler barriers, because we do not want the compiler to | ||
21 | * move potentially faulting instructions (notably user accesses) | ||
22 | * into the locked sequence, resulting in non-atomic execution. | ||
20 | */ | 23 | */ |
21 | 24 | ||
22 | #ifdef CONFIG_DEBUG_SPINLOCK | 25 | #ifdef CONFIG_DEBUG_SPINLOCK |
@@ -25,6 +28,7 @@ | |||
25 | static inline void arch_spin_lock(arch_spinlock_t *lock) | 28 | static inline void arch_spin_lock(arch_spinlock_t *lock) |
26 | { | 29 | { |
27 | lock->slock = 0; | 30 | lock->slock = 0; |
31 | barrier(); | ||
28 | } | 32 | } |
29 | 33 | ||
30 | static inline void | 34 | static inline void |
@@ -32,6 +36,7 @@ arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) | |||
32 | { | 36 | { |
33 | local_irq_save(flags); | 37 | local_irq_save(flags); |
34 | lock->slock = 0; | 38 | lock->slock = 0; |
39 | barrier(); | ||
35 | } | 40 | } |
36 | 41 | ||
37 | static inline int arch_spin_trylock(arch_spinlock_t *lock) | 42 | static inline int arch_spin_trylock(arch_spinlock_t *lock) |
@@ -39,32 +44,34 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) | |||
39 | char oldval = lock->slock; | 44 | char oldval = lock->slock; |
40 | 45 | ||
41 | lock->slock = 0; | 46 | lock->slock = 0; |
47 | barrier(); | ||
42 | 48 | ||
43 | return oldval > 0; | 49 | return oldval > 0; |
44 | } | 50 | } |
45 | 51 | ||
46 | static inline void arch_spin_unlock(arch_spinlock_t *lock) | 52 | static inline void arch_spin_unlock(arch_spinlock_t *lock) |
47 | { | 53 | { |
54 | barrier(); | ||
48 | lock->slock = 1; | 55 | lock->slock = 1; |
49 | } | 56 | } |
50 | 57 | ||
51 | /* | 58 | /* |
52 | * Read-write spinlocks. No debug version. | 59 | * Read-write spinlocks. No debug version. |
53 | */ | 60 | */ |
54 | #define arch_read_lock(lock) do { (void)(lock); } while (0) | 61 | #define arch_read_lock(lock) do { barrier(); (void)(lock); } while (0) |
55 | #define arch_write_lock(lock) do { (void)(lock); } while (0) | 62 | #define arch_write_lock(lock) do { barrier(); (void)(lock); } while (0) |
56 | #define arch_read_trylock(lock) ({ (void)(lock); 1; }) | 63 | #define arch_read_trylock(lock) ({ barrier(); (void)(lock); 1; }) |
57 | #define arch_write_trylock(lock) ({ (void)(lock); 1; }) | 64 | #define arch_write_trylock(lock) ({ barrier(); (void)(lock); 1; }) |
58 | #define arch_read_unlock(lock) do { (void)(lock); } while (0) | 65 | #define arch_read_unlock(lock) do { barrier(); (void)(lock); } while (0) |
59 | #define arch_write_unlock(lock) do { (void)(lock); } while (0) | 66 | #define arch_write_unlock(lock) do { barrier(); (void)(lock); } while (0) |
60 | 67 | ||
61 | #else /* DEBUG_SPINLOCK */ | 68 | #else /* DEBUG_SPINLOCK */ |
62 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | 69 | #define arch_spin_is_locked(lock) ((void)(lock), 0) |
63 | /* for sched.c and kernel_lock.c: */ | 70 | /* for sched.c and kernel_lock.c: */ |
64 | # define arch_spin_lock(lock) do { (void)(lock); } while (0) | 71 | # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) |
65 | # define arch_spin_lock_flags(lock, flags) do { (void)(lock); } while (0) | 72 | # define arch_spin_lock_flags(lock, flags) do { barrier(); (void)(lock); } while (0) |
66 | # define arch_spin_unlock(lock) do { (void)(lock); } while (0) | 73 | # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0) |
67 | # define arch_spin_trylock(lock) ({ (void)(lock); 1; }) | 74 | # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) |
68 | #endif /* DEBUG_SPINLOCK */ | 75 | #endif /* DEBUG_SPINLOCK */ |
69 | 76 | ||
70 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | 77 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 9e492be5244b..6fcfe99bd999 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
@@ -219,6 +219,7 @@ | |||
219 | #define SSB_CHIPCO_PMU_CTL 0x0600 /* PMU control */ | 219 | #define SSB_CHIPCO_PMU_CTL 0x0600 /* PMU control */ |
220 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | 220 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ |
221 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV_SHIFT 16 | 221 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV_SHIFT 16 |
222 | #define SSB_CHIPCO_PMU_CTL_PLL_UPD 0x00000400 | ||
222 | #define SSB_CHIPCO_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | 223 | #define SSB_CHIPCO_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ |
223 | #define SSB_CHIPCO_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | 224 | #define SSB_CHIPCO_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ |
224 | #define SSB_CHIPCO_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | 225 | #define SSB_CHIPCO_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ |
@@ -667,5 +668,6 @@ enum ssb_pmu_ldo_volt_id { | |||
667 | void ssb_pmu_set_ldo_voltage(struct ssb_chipcommon *cc, | 668 | void ssb_pmu_set_ldo_voltage(struct ssb_chipcommon *cc, |
668 | enum ssb_pmu_ldo_volt_id id, u32 voltage); | 669 | enum ssb_pmu_ldo_volt_id id, u32 voltage); |
669 | void ssb_pmu_set_ldo_paref(struct ssb_chipcommon *cc, bool on); | 670 | void ssb_pmu_set_ldo_paref(struct ssb_chipcommon *cc, bool on); |
671 | void ssb_pmu_spuravoid_pllupdate(struct ssb_chipcommon *cc, int spuravoid); | ||
670 | 672 | ||
671 | #endif /* LINUX_SSB_CHIPCO_H_ */ | 673 | #endif /* LINUX_SSB_CHIPCO_H_ */ |
diff --git a/include/linux/ssbi.h b/include/linux/ssbi.h new file mode 100644 index 000000000000..44ef5da21470 --- /dev/null +++ b/include/linux/ssbi.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* Copyright (C) 2010 Google, Inc. | ||
2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
3 | * Author: Dima Zavin <dima@android.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 and | ||
7 | * only version 2 as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _LINUX_SSBI_H | ||
16 | #define _LINUX_SSBI_H | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
20 | struct ssbi_slave_info { | ||
21 | const char *name; | ||
22 | void *platform_data; | ||
23 | }; | ||
24 | |||
25 | enum ssbi_controller_type { | ||
26 | MSM_SBI_CTRL_SSBI = 0, | ||
27 | MSM_SBI_CTRL_SSBI2, | ||
28 | MSM_SBI_CTRL_PMIC_ARBITER, | ||
29 | }; | ||
30 | |||
31 | struct ssbi_platform_data { | ||
32 | struct ssbi_slave_info slave; | ||
33 | enum ssbi_controller_type controller_type; | ||
34 | }; | ||
35 | |||
36 | int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len); | ||
37 | int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len); | ||
38 | #endif | ||
diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h index a3eb2f65b656..3eeee9672a4a 100644 --- a/include/linux/string_helpers.h +++ b/include/linux/string_helpers.h | |||
@@ -13,4 +13,62 @@ enum string_size_units { | |||
13 | int string_get_size(u64 size, enum string_size_units units, | 13 | int string_get_size(u64 size, enum string_size_units units, |
14 | char *buf, int len); | 14 | char *buf, int len); |
15 | 15 | ||
16 | #define UNESCAPE_SPACE 0x01 | ||
17 | #define UNESCAPE_OCTAL 0x02 | ||
18 | #define UNESCAPE_HEX 0x04 | ||
19 | #define UNESCAPE_SPECIAL 0x08 | ||
20 | #define UNESCAPE_ANY \ | ||
21 | (UNESCAPE_SPACE | UNESCAPE_OCTAL | UNESCAPE_HEX | UNESCAPE_SPECIAL) | ||
22 | |||
23 | /** | ||
24 | * string_unescape - unquote characters in the given string | ||
25 | * @src: source buffer (escaped) | ||
26 | * @dst: destination buffer (unescaped) | ||
27 | * @size: size of the destination buffer (0 to unlimit) | ||
28 | * @flags: combination of the flags (bitwise OR): | ||
29 | * %UNESCAPE_SPACE: | ||
30 | * '\f' - form feed | ||
31 | * '\n' - new line | ||
32 | * '\r' - carriage return | ||
33 | * '\t' - horizontal tab | ||
34 | * '\v' - vertical tab | ||
35 | * %UNESCAPE_OCTAL: | ||
36 | * '\NNN' - byte with octal value NNN (1 to 3 digits) | ||
37 | * %UNESCAPE_HEX: | ||
38 | * '\xHH' - byte with hexadecimal value HH (1 to 2 digits) | ||
39 | * %UNESCAPE_SPECIAL: | ||
40 | * '\"' - double quote | ||
41 | * '\\' - backslash | ||
42 | * '\a' - alert (BEL) | ||
43 | * '\e' - escape | ||
44 | * %UNESCAPE_ANY: | ||
45 | * all previous together | ||
46 | * | ||
47 | * Returns amount of characters processed to the destination buffer excluding | ||
48 | * trailing '\0'. | ||
49 | * | ||
50 | * Because the size of the output will be the same as or less than the size of | ||
51 | * the input, the transformation may be performed in place. | ||
52 | * | ||
53 | * Caller must provide valid source and destination pointers. Be aware that | ||
54 | * destination buffer will always be NULL-terminated. Source string must be | ||
55 | * NULL-terminated as well. | ||
56 | */ | ||
57 | int string_unescape(char *src, char *dst, size_t size, unsigned int flags); | ||
58 | |||
59 | static inline int string_unescape_inplace(char *buf, unsigned int flags) | ||
60 | { | ||
61 | return string_unescape(buf, buf, 0, flags); | ||
62 | } | ||
63 | |||
64 | static inline int string_unescape_any(char *src, char *dst, size_t size) | ||
65 | { | ||
66 | return string_unescape(src, dst, size, UNESCAPE_ANY); | ||
67 | } | ||
68 | |||
69 | static inline int string_unescape_any_inplace(char *buf) | ||
70 | { | ||
71 | return string_unescape_any(buf, buf, 0); | ||
72 | } | ||
73 | |||
16 | #endif | 74 | #endif |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 58fda1c3c783..0dd00f4f6810 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -22,6 +22,8 @@ | |||
22 | /* size of the nodename buffer */ | 22 | /* size of the nodename buffer */ |
23 | #define UNX_MAXNODENAME 32 | 23 | #define UNX_MAXNODENAME 32 |
24 | 24 | ||
25 | struct rpcsec_gss_info; | ||
26 | |||
25 | /* Work around the lack of a VFS credential */ | 27 | /* Work around the lack of a VFS credential */ |
26 | struct auth_cred { | 28 | struct auth_cred { |
27 | kuid_t uid; | 29 | kuid_t uid; |
@@ -103,6 +105,9 @@ struct rpc_authops { | |||
103 | int (*pipes_create)(struct rpc_auth *); | 105 | int (*pipes_create)(struct rpc_auth *); |
104 | void (*pipes_destroy)(struct rpc_auth *); | 106 | void (*pipes_destroy)(struct rpc_auth *); |
105 | int (*list_pseudoflavors)(rpc_authflavor_t *, int); | 107 | int (*list_pseudoflavors)(rpc_authflavor_t *, int); |
108 | rpc_authflavor_t (*info2flavor)(struct rpcsec_gss_info *); | ||
109 | int (*flavor2info)(rpc_authflavor_t, | ||
110 | struct rpcsec_gss_info *); | ||
106 | }; | 111 | }; |
107 | 112 | ||
108 | struct rpc_credops { | 113 | struct rpc_credops { |
@@ -137,6 +142,10 @@ int rpcauth_register(const struct rpc_authops *); | |||
137 | int rpcauth_unregister(const struct rpc_authops *); | 142 | int rpcauth_unregister(const struct rpc_authops *); |
138 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); | 143 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); |
139 | void rpcauth_release(struct rpc_auth *); | 144 | void rpcauth_release(struct rpc_auth *); |
145 | rpc_authflavor_t rpcauth_get_pseudoflavor(rpc_authflavor_t, | ||
146 | struct rpcsec_gss_info *); | ||
147 | int rpcauth_get_gssinfo(rpc_authflavor_t, | ||
148 | struct rpcsec_gss_info *); | ||
140 | int rpcauth_list_flavors(rpc_authflavor_t *, int); | 149 | int rpcauth_list_flavors(rpc_authflavor_t *, int); |
141 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); | 150 | struct rpc_cred * rpcauth_lookup_credcache(struct rpc_auth *, struct auth_cred *, int); |
142 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); | 151 | void rpcauth_init_cred(struct rpc_cred *, const struct auth_cred *, struct rpc_auth *, const struct rpc_credops *); |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 2cf4ffaa3cd4..e7d492ce7c18 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -124,6 +124,7 @@ struct rpc_create_args { | |||
124 | #define RPC_CLNT_CREATE_NOPING (1UL << 4) | 124 | #define RPC_CLNT_CREATE_NOPING (1UL << 4) |
125 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5) | 125 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5) |
126 | #define RPC_CLNT_CREATE_QUIET (1UL << 6) | 126 | #define RPC_CLNT_CREATE_QUIET (1UL << 6) |
127 | #define RPC_CLNT_CREATE_INFINITE_SLOTS (1UL << 7) | ||
127 | 128 | ||
128 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 129 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
129 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 130 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index a19e2547ae6a..f32b7a47e13f 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -25,10 +25,21 @@ struct gss_ctx { | |||
25 | 25 | ||
26 | #define GSS_C_NO_BUFFER ((struct xdr_netobj) 0) | 26 | #define GSS_C_NO_BUFFER ((struct xdr_netobj) 0) |
27 | #define GSS_C_NO_CONTEXT ((struct gss_ctx *) 0) | 27 | #define GSS_C_NO_CONTEXT ((struct gss_ctx *) 0) |
28 | #define GSS_C_NULL_OID ((struct xdr_netobj) 0) | 28 | #define GSS_C_QOP_DEFAULT (0) |
29 | 29 | ||
30 | /*XXX arbitrary length - is this set somewhere? */ | 30 | /*XXX arbitrary length - is this set somewhere? */ |
31 | #define GSS_OID_MAX_LEN 32 | 31 | #define GSS_OID_MAX_LEN 32 |
32 | struct rpcsec_gss_oid { | ||
33 | unsigned int len; | ||
34 | u8 data[GSS_OID_MAX_LEN]; | ||
35 | }; | ||
36 | |||
37 | /* From RFC 3530 */ | ||
38 | struct rpcsec_gss_info { | ||
39 | struct rpcsec_gss_oid oid; | ||
40 | u32 qop; | ||
41 | u32 service; | ||
42 | }; | ||
32 | 43 | ||
33 | /* gss-api prototypes; note that these are somewhat simplified versions of | 44 | /* gss-api prototypes; note that these are somewhat simplified versions of |
34 | * the prototypes specified in RFC 2744. */ | 45 | * the prototypes specified in RFC 2744. */ |
@@ -58,12 +69,14 @@ u32 gss_unwrap( | |||
58 | u32 gss_delete_sec_context( | 69 | u32 gss_delete_sec_context( |
59 | struct gss_ctx **ctx_id); | 70 | struct gss_ctx **ctx_id); |
60 | 71 | ||
61 | u32 gss_svc_to_pseudoflavor(struct gss_api_mech *, u32 service); | 72 | rpc_authflavor_t gss_svc_to_pseudoflavor(struct gss_api_mech *, u32 qop, |
73 | u32 service); | ||
62 | u32 gss_pseudoflavor_to_service(struct gss_api_mech *, u32 pseudoflavor); | 74 | u32 gss_pseudoflavor_to_service(struct gss_api_mech *, u32 pseudoflavor); |
63 | char *gss_service_to_auth_domain_name(struct gss_api_mech *, u32 service); | 75 | char *gss_service_to_auth_domain_name(struct gss_api_mech *, u32 service); |
64 | 76 | ||
65 | struct pf_desc { | 77 | struct pf_desc { |
66 | u32 pseudoflavor; | 78 | u32 pseudoflavor; |
79 | u32 qop; | ||
67 | u32 service; | 80 | u32 service; |
68 | char *name; | 81 | char *name; |
69 | char *auth_domain_name; | 82 | char *auth_domain_name; |
@@ -76,7 +89,7 @@ struct pf_desc { | |||
76 | struct gss_api_mech { | 89 | struct gss_api_mech { |
77 | struct list_head gm_list; | 90 | struct list_head gm_list; |
78 | struct module *gm_owner; | 91 | struct module *gm_owner; |
79 | struct xdr_netobj gm_oid; | 92 | struct rpcsec_gss_oid gm_oid; |
80 | char *gm_name; | 93 | char *gm_name; |
81 | const struct gss_api_ops *gm_ops; | 94 | const struct gss_api_ops *gm_ops; |
82 | /* pseudoflavors supported by this mechanism: */ | 95 | /* pseudoflavors supported by this mechanism: */ |
@@ -117,9 +130,11 @@ struct gss_api_ops { | |||
117 | int gss_mech_register(struct gss_api_mech *); | 130 | int gss_mech_register(struct gss_api_mech *); |
118 | void gss_mech_unregister(struct gss_api_mech *); | 131 | void gss_mech_unregister(struct gss_api_mech *); |
119 | 132 | ||
120 | /* returns a mechanism descriptor given an OID, and increments the mechanism's | 133 | /* Given a GSS security tuple, look up a pseudoflavor */ |
121 | * reference count. */ | 134 | rpc_authflavor_t gss_mech_info2flavor(struct rpcsec_gss_info *); |
122 | struct gss_api_mech * gss_mech_get_by_OID(struct xdr_netobj *); | 135 | |
136 | /* Given a pseudoflavor, look up a GSS security tuple */ | ||
137 | int gss_mech_flavor2info(rpc_authflavor_t, struct rpcsec_gss_info *); | ||
123 | 138 | ||
124 | /* Returns a reference to a mechanism, given a name like "krb5" etc. */ | 139 | /* Returns a reference to a mechanism, given a name like "krb5" etc. */ |
125 | struct gss_api_mech *gss_mech_get_by_name(const char *); | 140 | struct gss_api_mech *gss_mech_get_by_name(const char *); |
@@ -130,9 +145,6 @@ struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); | |||
130 | /* Fill in an array with a list of supported pseudoflavors */ | 145 | /* Fill in an array with a list of supported pseudoflavors */ |
131 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *, int); | 146 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *, int); |
132 | 147 | ||
133 | /* Just increments the mechanism's reference count and returns its input: */ | ||
134 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); | ||
135 | |||
136 | /* For every successful gss_mech_get or gss_mech_get_by_* call there must be a | 148 | /* For every successful gss_mech_get or gss_mech_get_by_* call there must be a |
137 | * corresponding call to gss_mech_put. */ | 149 | * corresponding call to gss_mech_put. */ |
138 | void gss_mech_put(struct gss_api_mech *); | 150 | void gss_mech_put(struct gss_api_mech *); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 30834be03011..ff5392421cb2 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -255,6 +255,8 @@ static inline int bc_prealloc(struct rpc_rqst *req) | |||
255 | } | 255 | } |
256 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ | 256 | #endif /* CONFIG_SUNRPC_BACKCHANNEL */ |
257 | 257 | ||
258 | #define XPRT_CREATE_INFINITE_SLOTS (1U) | ||
259 | |||
258 | struct xprt_create { | 260 | struct xprt_create { |
259 | int ident; /* XPRT_TRANSPORT identifier */ | 261 | int ident; /* XPRT_TRANSPORT identifier */ |
260 | struct net * net; | 262 | struct net * net; |
@@ -263,6 +265,7 @@ struct xprt_create { | |||
263 | size_t addrlen; | 265 | size_t addrlen; |
264 | const char *servername; | 266 | const char *servername; |
265 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ | 267 | struct svc_xprt *bc_xprt; /* NFSv4.1 backchannel */ |
268 | unsigned int flags; | ||
266 | }; | 269 | }; |
267 | 270 | ||
268 | struct xprt_class { | 271 | struct xprt_class { |
@@ -279,6 +282,7 @@ struct xprt_class { | |||
279 | struct rpc_xprt *xprt_create_transport(struct xprt_create *args); | 282 | struct rpc_xprt *xprt_create_transport(struct xprt_create *args); |
280 | void xprt_connect(struct rpc_task *task); | 283 | void xprt_connect(struct rpc_task *task); |
281 | void xprt_reserve(struct rpc_task *task); | 284 | void xprt_reserve(struct rpc_task *task); |
285 | void xprt_retry_reserve(struct rpc_task *task); | ||
282 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 286 | int xprt_reserve_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
283 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 287 | int xprt_reserve_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
284 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); | 288 | void xprt_alloc_slot(struct rpc_xprt *xprt, struct rpc_task *task); |
@@ -334,6 +338,7 @@ int xs_swapper(struct rpc_xprt *xprt, int enable); | |||
334 | #define XPRT_CLOSING (6) | 338 | #define XPRT_CLOSING (6) |
335 | #define XPRT_CONNECTION_ABORT (7) | 339 | #define XPRT_CONNECTION_ABORT (7) |
336 | #define XPRT_CONNECTION_CLOSE (8) | 340 | #define XPRT_CONNECTION_CLOSE (8) |
341 | #define XPRT_CONGESTED (9) | ||
337 | 342 | ||
338 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 343 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
339 | { | 344 | { |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 2818a123f3ea..1701ce4be746 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -236,7 +236,7 @@ extern unsigned long nr_free_pagecache_pages(void); | |||
236 | extern void __lru_cache_add(struct page *, enum lru_list lru); | 236 | extern void __lru_cache_add(struct page *, enum lru_list lru); |
237 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); | 237 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); |
238 | extern void lru_add_page_tail(struct page *page, struct page *page_tail, | 238 | extern void lru_add_page_tail(struct page *page, struct page *page_tail, |
239 | struct lruvec *lruvec); | 239 | struct lruvec *lruvec, struct list_head *head); |
240 | extern void activate_page(struct page *); | 240 | extern void activate_page(struct page *); |
241 | extern void mark_page_accessed(struct page *); | 241 | extern void mark_page_accessed(struct page *); |
242 | extern void lru_add_drain(void); | 242 | extern void lru_add_drain(void); |
@@ -330,6 +330,9 @@ static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | |||
330 | /* linux/mm/page_io.c */ | 330 | /* linux/mm/page_io.c */ |
331 | extern int swap_readpage(struct page *); | 331 | extern int swap_readpage(struct page *); |
332 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 332 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
333 | extern void end_swap_bio_write(struct bio *bio, int err); | ||
334 | extern int __swap_writepage(struct page *page, struct writeback_control *wbc, | ||
335 | void (*end_write_func)(struct bio *, int)); | ||
333 | extern int swap_set_page_dirty(struct page *page); | 336 | extern int swap_set_page_dirty(struct page *page); |
334 | extern void end_swap_bio_read(struct bio *bio, int err); | 337 | extern void end_swap_bio_read(struct bio *bio, int err); |
335 | 338 | ||
@@ -343,8 +346,9 @@ extern struct address_space swapper_spaces[]; | |||
343 | #define swap_address_space(entry) (&swapper_spaces[swp_type(entry)]) | 346 | #define swap_address_space(entry) (&swapper_spaces[swp_type(entry)]) |
344 | extern unsigned long total_swapcache_pages(void); | 347 | extern unsigned long total_swapcache_pages(void); |
345 | extern void show_swap_cache_info(void); | 348 | extern void show_swap_cache_info(void); |
346 | extern int add_to_swap(struct page *); | 349 | extern int add_to_swap(struct page *, struct list_head *list); |
347 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); | 350 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); |
351 | extern int __add_to_swap_cache(struct page *page, swp_entry_t entry); | ||
348 | extern void __delete_from_swap_cache(struct page *); | 352 | extern void __delete_from_swap_cache(struct page *); |
349 | extern void delete_from_swap_cache(struct page *); | 353 | extern void delete_from_swap_cache(struct page *); |
350 | extern void free_page_and_swap_cache(struct page *); | 354 | extern void free_page_and_swap_cache(struct page *); |
@@ -461,7 +465,7 @@ static inline struct page *lookup_swap_cache(swp_entry_t swp) | |||
461 | return NULL; | 465 | return NULL; |
462 | } | 466 | } |
463 | 467 | ||
464 | static inline int add_to_swap(struct page *page) | 468 | static inline int add_to_swap(struct page *page, struct list_head *list) |
465 | { | 469 | { |
466 | return 0; | 470 | return 0; |
467 | } | 471 | } |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 2de42f9401d2..a5ffd32642fd 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -25,6 +25,7 @@ extern int swiotlb_force; | |||
25 | extern void swiotlb_init(int verbose); | 25 | extern void swiotlb_init(int verbose); |
26 | int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); | 26 | int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); |
27 | extern unsigned long swiotlb_nr_tbl(void); | 27 | extern unsigned long swiotlb_nr_tbl(void); |
28 | unsigned long swiotlb_size_or_default(void); | ||
28 | extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); | 29 | extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); |
29 | 30 | ||
30 | /* | 31 | /* |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 313a8e0a6553..4147d700a293 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -78,49 +78,34 @@ struct sigaltstack; | |||
78 | #include <linux/key.h> | 78 | #include <linux/key.h> |
79 | #include <trace/syscall.h> | 79 | #include <trace/syscall.h> |
80 | 80 | ||
81 | #define __SC_DECL1(t1, a1) t1 a1 | 81 | /* |
82 | #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) | 82 | * __MAP - apply a macro to syscall arguments |
83 | #define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__) | 83 | * __MAP(n, m, t1, a1, t2, a2, ..., tn, an) will expand to |
84 | #define __SC_DECL4(t4, a4, ...) t4 a4, __SC_DECL3(__VA_ARGS__) | 84 | * m(t1, a1), m(t2, a2), ..., m(tn, an) |
85 | #define __SC_DECL5(t5, a5, ...) t5 a5, __SC_DECL4(__VA_ARGS__) | 85 | * The first argument must be equal to the amount of type/name |
86 | #define __SC_DECL6(t6, a6, ...) t6 a6, __SC_DECL5(__VA_ARGS__) | 86 | * pairs given. Note that this list of pairs (i.e. the arguments |
87 | 87 | * of __MAP starting at the third one) is in the same format as | |
88 | #define __SC_LONG1(t1, a1) long a1 | 88 | * for SYSCALL_DEFINE<n>/COMPAT_SYSCALL_DEFINE<n> |
89 | #define __SC_LONG2(t2, a2, ...) long a2, __SC_LONG1(__VA_ARGS__) | 89 | */ |
90 | #define __SC_LONG3(t3, a3, ...) long a3, __SC_LONG2(__VA_ARGS__) | 90 | #define __MAP0(m,...) |
91 | #define __SC_LONG4(t4, a4, ...) long a4, __SC_LONG3(__VA_ARGS__) | 91 | #define __MAP1(m,t,a) m(t,a) |
92 | #define __SC_LONG5(t5, a5, ...) long a5, __SC_LONG4(__VA_ARGS__) | 92 | #define __MAP2(m,t,a,...) m(t,a), __MAP1(m,__VA_ARGS__) |
93 | #define __SC_LONG6(t6, a6, ...) long a6, __SC_LONG5(__VA_ARGS__) | 93 | #define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__) |
94 | 94 | #define __MAP4(m,t,a,...) m(t,a), __MAP3(m,__VA_ARGS__) | |
95 | #define __SC_CAST1(t1, a1) (t1) a1 | 95 | #define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__) |
96 | #define __SC_CAST2(t2, a2, ...) (t2) a2, __SC_CAST1(__VA_ARGS__) | 96 | #define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__) |
97 | #define __SC_CAST3(t3, a3, ...) (t3) a3, __SC_CAST2(__VA_ARGS__) | 97 | #define __MAP(n,...) __MAP##n(__VA_ARGS__) |
98 | #define __SC_CAST4(t4, a4, ...) (t4) a4, __SC_CAST3(__VA_ARGS__) | 98 | |
99 | #define __SC_CAST5(t5, a5, ...) (t5) a5, __SC_CAST4(__VA_ARGS__) | 99 | #define __SC_DECL(t, a) t a |
100 | #define __SC_CAST6(t6, a6, ...) (t6) a6, __SC_CAST5(__VA_ARGS__) | 100 | #define __TYPE_IS_LL(t) (__same_type((t)0, 0LL) || __same_type((t)0, 0ULL)) |
101 | 101 | #define __SC_LONG(t, a) __typeof(__builtin_choose_expr(__TYPE_IS_LL(t), 0LL, 0L)) a | |
102 | #define __SC_TEST(type) BUILD_BUG_ON(sizeof(type) > sizeof(long)) | 102 | #define __SC_CAST(t, a) (t) a |
103 | #define __SC_TEST1(t1, a1) __SC_TEST(t1) | 103 | #define __SC_ARGS(t, a) a |
104 | #define __SC_TEST2(t2, a2, ...) __SC_TEST(t2); __SC_TEST1(__VA_ARGS__) | 104 | #define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long)) |
105 | #define __SC_TEST3(t3, a3, ...) __SC_TEST(t3); __SC_TEST2(__VA_ARGS__) | ||
106 | #define __SC_TEST4(t4, a4, ...) __SC_TEST(t4); __SC_TEST3(__VA_ARGS__) | ||
107 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | ||
108 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | ||
109 | 105 | ||
110 | #ifdef CONFIG_FTRACE_SYSCALLS | 106 | #ifdef CONFIG_FTRACE_SYSCALLS |
111 | #define __SC_STR_ADECL1(t, a) #a | 107 | #define __SC_STR_ADECL(t, a) #a |
112 | #define __SC_STR_ADECL2(t, a, ...) #a, __SC_STR_ADECL1(__VA_ARGS__) | 108 | #define __SC_STR_TDECL(t, a) #t |
113 | #define __SC_STR_ADECL3(t, a, ...) #a, __SC_STR_ADECL2(__VA_ARGS__) | ||
114 | #define __SC_STR_ADECL4(t, a, ...) #a, __SC_STR_ADECL3(__VA_ARGS__) | ||
115 | #define __SC_STR_ADECL5(t, a, ...) #a, __SC_STR_ADECL4(__VA_ARGS__) | ||
116 | #define __SC_STR_ADECL6(t, a, ...) #a, __SC_STR_ADECL5(__VA_ARGS__) | ||
117 | |||
118 | #define __SC_STR_TDECL1(t, a) #t | ||
119 | #define __SC_STR_TDECL2(t, a, ...) #t, __SC_STR_TDECL1(__VA_ARGS__) | ||
120 | #define __SC_STR_TDECL3(t, a, ...) #t, __SC_STR_TDECL2(__VA_ARGS__) | ||
121 | #define __SC_STR_TDECL4(t, a, ...) #t, __SC_STR_TDECL3(__VA_ARGS__) | ||
122 | #define __SC_STR_TDECL5(t, a, ...) #t, __SC_STR_TDECL4(__VA_ARGS__) | ||
123 | #define __SC_STR_TDECL6(t, a, ...) #t, __SC_STR_TDECL5(__VA_ARGS__) | ||
124 | 109 | ||
125 | extern struct ftrace_event_class event_class_syscall_enter; | 110 | extern struct ftrace_event_class event_class_syscall_enter; |
126 | extern struct ftrace_event_class event_class_syscall_exit; | 111 | extern struct ftrace_event_class event_class_syscall_exit; |
@@ -155,7 +140,13 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
155 | __attribute__((section("_ftrace_events"))) \ | 140 | __attribute__((section("_ftrace_events"))) \ |
156 | *__event_exit_##sname = &event_exit_##sname; | 141 | *__event_exit_##sname = &event_exit_##sname; |
157 | 142 | ||
158 | #define SYSCALL_METADATA(sname, nb) \ | 143 | #define SYSCALL_METADATA(sname, nb, ...) \ |
144 | static const char *types_##sname[] = { \ | ||
145 | __MAP(nb,__SC_STR_TDECL,__VA_ARGS__) \ | ||
146 | }; \ | ||
147 | static const char *args_##sname[] = { \ | ||
148 | __MAP(nb,__SC_STR_ADECL,__VA_ARGS__) \ | ||
149 | }; \ | ||
159 | SYSCALL_TRACE_ENTER_EVENT(sname); \ | 150 | SYSCALL_TRACE_ENTER_EVENT(sname); \ |
160 | SYSCALL_TRACE_EXIT_EVENT(sname); \ | 151 | SYSCALL_TRACE_EXIT_EVENT(sname); \ |
161 | static struct syscall_metadata __used \ | 152 | static struct syscall_metadata __used \ |
@@ -163,8 +154,8 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
163 | .name = "sys"#sname, \ | 154 | .name = "sys"#sname, \ |
164 | .syscall_nr = -1, /* Filled in at boot */ \ | 155 | .syscall_nr = -1, /* Filled in at boot */ \ |
165 | .nb_args = nb, \ | 156 | .nb_args = nb, \ |
166 | .types = types_##sname, \ | 157 | .types = nb ? types_##sname : NULL, \ |
167 | .args = args_##sname, \ | 158 | .args = nb ? args_##sname : NULL, \ |
168 | .enter_event = &event_enter_##sname, \ | 159 | .enter_event = &event_enter_##sname, \ |
169 | .exit_event = &event_exit_##sname, \ | 160 | .exit_event = &event_exit_##sname, \ |
170 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ | 161 | .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ |
@@ -172,26 +163,13 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
172 | static struct syscall_metadata __used \ | 163 | static struct syscall_metadata __used \ |
173 | __attribute__((section("__syscalls_metadata"))) \ | 164 | __attribute__((section("__syscalls_metadata"))) \ |
174 | *__p_syscall_meta_##sname = &__syscall_meta_##sname; | 165 | *__p_syscall_meta_##sname = &__syscall_meta_##sname; |
166 | #else | ||
167 | #define SYSCALL_METADATA(sname, nb, ...) | ||
168 | #endif | ||
175 | 169 | ||
176 | #define SYSCALL_DEFINE0(sname) \ | 170 | #define SYSCALL_DEFINE0(sname) \ |
177 | SYSCALL_TRACE_ENTER_EVENT(_##sname); \ | 171 | SYSCALL_METADATA(_##sname, 0); \ |
178 | SYSCALL_TRACE_EXIT_EVENT(_##sname); \ | ||
179 | static struct syscall_metadata __used \ | ||
180 | __syscall_meta__##sname = { \ | ||
181 | .name = "sys_"#sname, \ | ||
182 | .syscall_nr = -1, /* Filled in at boot */ \ | ||
183 | .nb_args = 0, \ | ||
184 | .enter_event = &event_enter__##sname, \ | ||
185 | .exit_event = &event_exit__##sname, \ | ||
186 | .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ | ||
187 | }; \ | ||
188 | static struct syscall_metadata __used \ | ||
189 | __attribute__((section("__syscalls_metadata"))) \ | ||
190 | *__p_syscall_meta_##sname = &__syscall_meta__##sname; \ | ||
191 | asmlinkage long sys_##sname(void) | 172 | asmlinkage long sys_##sname(void) |
192 | #else | ||
193 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | ||
194 | #endif | ||
195 | 173 | ||
196 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) | 174 | #define SYSCALL_DEFINE1(name, ...) SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
197 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) | 175 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) |
@@ -200,57 +178,23 @@ extern struct trace_event_functions exit_syscall_print_funcs; | |||
200 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) | 178 | #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) |
201 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) | 179 | #define SYSCALL_DEFINE6(name, ...) SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) |
202 | 180 | ||
203 | #ifdef CONFIG_PPC64 | ||
204 | #define SYSCALL_ALIAS(alias, name) \ | ||
205 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | ||
206 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | ||
207 | #else | ||
208 | #if defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) | ||
209 | #define SYSCALL_ALIAS(alias, name) \ | ||
210 | asm ( #alias " = " #name "\n\t.globl " #alias) | ||
211 | #else | ||
212 | #define SYSCALL_ALIAS(alias, name) \ | ||
213 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) | ||
214 | #endif | ||
215 | #endif | ||
216 | |||
217 | #ifdef CONFIG_FTRACE_SYSCALLS | ||
218 | #define SYSCALL_DEFINEx(x, sname, ...) \ | 181 | #define SYSCALL_DEFINEx(x, sname, ...) \ |
219 | static const char *types_##sname[] = { \ | 182 | SYSCALL_METADATA(sname, x, __VA_ARGS__) \ |
220 | __SC_STR_TDECL##x(__VA_ARGS__) \ | ||
221 | }; \ | ||
222 | static const char *args_##sname[] = { \ | ||
223 | __SC_STR_ADECL##x(__VA_ARGS__) \ | ||
224 | }; \ | ||
225 | SYSCALL_METADATA(sname, x); \ | ||
226 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) | 183 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) |
227 | #else | ||
228 | #define SYSCALL_DEFINEx(x, sname, ...) \ | ||
229 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) | ||
230 | #endif | ||
231 | |||
232 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
233 | |||
234 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | ||
235 | 184 | ||
185 | #define __PROTECT(...) asmlinkage_protect(__VA_ARGS__) | ||
236 | #define __SYSCALL_DEFINEx(x, name, ...) \ | 186 | #define __SYSCALL_DEFINEx(x, name, ...) \ |
237 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \ | 187 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
238 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ | 188 | static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
239 | asmlinkage long SyS##name(__SC_LONG##x(__VA_ARGS__)) \ | 189 | asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ |
240 | { \ | 190 | { \ |
241 | __SC_TEST##x(__VA_ARGS__); \ | 191 | long ret = SYSC##name(__MAP(x,__SC_CAST,__VA_ARGS__)); \ |
242 | return (long) SYSC##name(__SC_CAST##x(__VA_ARGS__)); \ | 192 | __MAP(x,__SC_TEST,__VA_ARGS__); \ |
193 | __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \ | ||
194 | return ret; \ | ||
243 | } \ | 195 | } \ |
244 | SYSCALL_ALIAS(sys##name, SyS##name); \ | 196 | SYSCALL_ALIAS(sys##name, SyS##name); \ |
245 | static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__)) | 197 | static inline long SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
246 | |||
247 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
248 | |||
249 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | ||
250 | #define __SYSCALL_DEFINEx(x, name, ...) \ | ||
251 | asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)) | ||
252 | |||
253 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
254 | 198 | ||
255 | asmlinkage long sys_time(time_t __user *tloc); | 199 | asmlinkage long sys_time(time_t __user *tloc); |
256 | asmlinkage long sys_stime(time_t __user *tptr); | 200 | asmlinkage long sys_stime(time_t __user *tptr); |
@@ -694,7 +638,7 @@ asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf); | |||
694 | asmlinkage long sys_semget(key_t key, int nsems, int semflg); | 638 | asmlinkage long sys_semget(key_t key, int nsems, int semflg); |
695 | asmlinkage long sys_semop(int semid, struct sembuf __user *sops, | 639 | asmlinkage long sys_semop(int semid, struct sembuf __user *sops, |
696 | unsigned nsops); | 640 | unsigned nsops); |
697 | asmlinkage long sys_semctl(int semid, int semnum, int cmd, union semun arg); | 641 | asmlinkage long sys_semctl(int semid, int semnum, int cmd, unsigned long arg); |
698 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, | 642 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, |
699 | unsigned nsops, | 643 | unsigned nsops, |
700 | const struct timespec __user *timeout); | 644 | const struct timespec __user *timeout); |
diff --git a/include/linux/time.h b/include/linux/time.h index d4835dfdf25e..22d81b3c955b 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -181,6 +181,9 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | |||
181 | extern int timekeeping_valid_for_hres(void); | 181 | extern int timekeeping_valid_for_hres(void); |
182 | extern u64 timekeeping_max_deferment(void); | 182 | extern u64 timekeeping_max_deferment(void); |
183 | extern int timekeeping_inject_offset(struct timespec *ts); | 183 | extern int timekeeping_inject_offset(struct timespec *ts); |
184 | extern s32 timekeeping_get_tai_offset(void); | ||
185 | extern void timekeeping_set_tai_offset(s32 tai_offset); | ||
186 | extern void timekeeping_clocktai(struct timespec *ts); | ||
184 | 187 | ||
185 | struct tms; | 188 | struct tms; |
186 | extern void do_sys_times(struct tms *); | 189 | extern void do_sys_times(struct tms *); |
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index e1d558e237ec..c1825eb436ed 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h | |||
@@ -20,6 +20,8 @@ struct timekeeper { | |||
20 | u32 shift; | 20 | u32 shift; |
21 | /* Number of clock cycles in one NTP interval. */ | 21 | /* Number of clock cycles in one NTP interval. */ |
22 | cycle_t cycle_interval; | 22 | cycle_t cycle_interval; |
23 | /* Last cycle value (also stored in clock->cycle_last) */ | ||
24 | cycle_t cycle_last; | ||
23 | /* Number of clock shifted nano seconds in one NTP interval. */ | 25 | /* Number of clock shifted nano seconds in one NTP interval. */ |
24 | u64 xtime_interval; | 26 | u64 xtime_interval; |
25 | /* shifted nano seconds left over when rounding cycle_interval */ | 27 | /* shifted nano seconds left over when rounding cycle_interval */ |
@@ -62,8 +64,11 @@ struct timekeeper { | |||
62 | ktime_t offs_boot; | 64 | ktime_t offs_boot; |
63 | /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */ | 65 | /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */ |
64 | struct timespec raw_time; | 66 | struct timespec raw_time; |
65 | /* Seqlock for all timekeeper values */ | 67 | /* The current UTC to TAI offset in seconds */ |
66 | seqlock_t lock; | 68 | s32 tai_offset; |
69 | /* Offset clock monotonic -> clock tai */ | ||
70 | ktime_t offs_tai; | ||
71 | |||
67 | }; | 72 | }; |
68 | 73 | ||
69 | static inline struct timespec tk_xtime(struct timekeeper *tk) | 74 | static inline struct timespec tk_xtime(struct timekeeper *tk) |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 5ec87c60b97c..b3726e61368e 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -125,9 +125,6 @@ | |||
125 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ | 125 | extern unsigned long tick_usec; /* USER_HZ period (usec) */ |
126 | extern unsigned long tick_nsec; /* SHIFTED_HZ period (nsec) */ | 126 | extern unsigned long tick_nsec; /* SHIFTED_HZ period (nsec) */ |
127 | 127 | ||
128 | extern void ntp_init(void); | ||
129 | extern void ntp_clear(void); | ||
130 | |||
131 | /* Required to safely shift negative values */ | 128 | /* Required to safely shift negative values */ |
132 | #define shift_right(x, s) ({ \ | 129 | #define shift_right(x, s) ({ \ |
133 | __typeof__(x) __x = (x); \ | 130 | __typeof__(x) __x = (x); \ |
@@ -140,10 +137,6 @@ extern void ntp_clear(void); | |||
140 | #define NTP_INTERVAL_FREQ (HZ) | 137 | #define NTP_INTERVAL_FREQ (HZ) |
141 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) | 138 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) |
142 | 139 | ||
143 | /* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */ | ||
144 | extern u64 ntp_tick_length(void); | ||
145 | |||
146 | extern int second_overflow(unsigned long secs); | ||
147 | extern int do_adjtimex(struct timex *); | 140 | extern int do_adjtimex(struct timex *); |
148 | extern void hardpps(const struct timespec *, const struct timespec *); | 141 | extern void hardpps(const struct timespec *, const struct timespec *); |
149 | 142 | ||
diff --git a/include/linux/trace_clock.h b/include/linux/trace_clock.h index d563f37e1a1d..1d7ca2739272 100644 --- a/include/linux/trace_clock.h +++ b/include/linux/trace_clock.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | extern u64 notrace trace_clock_local(void); | 17 | extern u64 notrace trace_clock_local(void); |
18 | extern u64 notrace trace_clock(void); | 18 | extern u64 notrace trace_clock(void); |
19 | extern u64 notrace trace_clock_jiffies(void); | ||
19 | extern u64 notrace trace_clock_global(void); | 20 | extern u64 notrace trace_clock_global(void); |
20 | extern u64 notrace trace_clock_counter(void); | 21 | extern u64 notrace trace_clock_counter(void); |
21 | 22 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index c75d886b0307..367a9dfc4ea2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -255,9 +255,9 @@ struct tty_struct { | |||
255 | int count; | 255 | int count; |
256 | struct winsize winsize; /* termios mutex */ | 256 | struct winsize winsize; /* termios mutex */ |
257 | unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; | 257 | unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; |
258 | unsigned char warned:1; | ||
259 | unsigned char ctrl_status; /* ctrl_lock */ | 258 | unsigned char ctrl_status; /* ctrl_lock */ |
260 | unsigned int receive_room; /* Bytes free for queue */ | 259 | unsigned int receive_room; /* Bytes free for queue */ |
260 | int flow_change; | ||
261 | 261 | ||
262 | struct tty_struct *link; | 262 | struct tty_struct *link; |
263 | struct fasync_struct *fasync; | 263 | struct fasync_struct *fasync; |
@@ -315,9 +315,25 @@ struct tty_file_private { | |||
315 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ | 315 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ |
316 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 316 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
317 | #define TTY_HUPPING 21 /* ->hangup() in progress */ | 317 | #define TTY_HUPPING 21 /* ->hangup() in progress */ |
318 | #define TTY_LDISC_HALTED 22 /* Line discipline is halted */ | ||
318 | 319 | ||
319 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 320 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
320 | 321 | ||
322 | /* Values for tty->flow_change */ | ||
323 | #define TTY_THROTTLE_SAFE 1 | ||
324 | #define TTY_UNTHROTTLE_SAFE 2 | ||
325 | |||
326 | static inline void __tty_set_flow_change(struct tty_struct *tty, int val) | ||
327 | { | ||
328 | tty->flow_change = val; | ||
329 | } | ||
330 | |||
331 | static inline void tty_set_flow_change(struct tty_struct *tty, int val) | ||
332 | { | ||
333 | tty->flow_change = val; | ||
334 | smp_mb(); | ||
335 | } | ||
336 | |||
321 | #ifdef CONFIG_TTY | 337 | #ifdef CONFIG_TTY |
322 | extern void console_init(void); | 338 | extern void console_init(void); |
323 | extern void tty_kref_put(struct tty_struct *tty); | 339 | extern void tty_kref_put(struct tty_struct *tty); |
@@ -400,6 +416,8 @@ extern int tty_write_room(struct tty_struct *tty); | |||
400 | extern void tty_driver_flush_buffer(struct tty_struct *tty); | 416 | extern void tty_driver_flush_buffer(struct tty_struct *tty); |
401 | extern void tty_throttle(struct tty_struct *tty); | 417 | extern void tty_throttle(struct tty_struct *tty); |
402 | extern void tty_unthrottle(struct tty_struct *tty); | 418 | extern void tty_unthrottle(struct tty_struct *tty); |
419 | extern int tty_throttle_safe(struct tty_struct *tty); | ||
420 | extern int tty_unthrottle_safe(struct tty_struct *tty); | ||
403 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); | 421 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); |
404 | extern void tty_driver_remove_tty(struct tty_driver *driver, | 422 | extern void tty_driver_remove_tty(struct tty_driver *driver, |
405 | struct tty_struct *tty); | 423 | struct tty_struct *tty); |
@@ -419,13 +437,28 @@ extern void tty_flush_to_ldisc(struct tty_struct *tty); | |||
419 | extern void tty_buffer_free_all(struct tty_port *port); | 437 | extern void tty_buffer_free_all(struct tty_port *port); |
420 | extern void tty_buffer_flush(struct tty_struct *tty); | 438 | extern void tty_buffer_flush(struct tty_struct *tty); |
421 | extern void tty_buffer_init(struct tty_port *port); | 439 | extern void tty_buffer_init(struct tty_port *port); |
422 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | ||
423 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 440 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
424 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 441 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
425 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, | 442 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, |
426 | speed_t ibaud, speed_t obaud); | 443 | speed_t ibaud, speed_t obaud); |
427 | extern void tty_encode_baud_rate(struct tty_struct *tty, | 444 | extern void tty_encode_baud_rate(struct tty_struct *tty, |
428 | speed_t ibaud, speed_t obaud); | 445 | speed_t ibaud, speed_t obaud); |
446 | |||
447 | /** | ||
448 | * tty_get_baud_rate - get tty bit rates | ||
449 | * @tty: tty to query | ||
450 | * | ||
451 | * Returns the baud rate as an integer for this terminal. The | ||
452 | * termios lock must be held by the caller and the terminal bit | ||
453 | * flags may be updated. | ||
454 | * | ||
455 | * Locking: none | ||
456 | */ | ||
457 | static inline speed_t tty_get_baud_rate(struct tty_struct *tty) | ||
458 | { | ||
459 | return tty_termios_baud_rate(&tty->termios); | ||
460 | } | ||
461 | |||
429 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 462 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
430 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | 463 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); |
431 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); | 464 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); |
@@ -502,6 +535,8 @@ extern int tty_port_carrier_raised(struct tty_port *port); | |||
502 | extern void tty_port_raise_dtr_rts(struct tty_port *port); | 535 | extern void tty_port_raise_dtr_rts(struct tty_port *port); |
503 | extern void tty_port_lower_dtr_rts(struct tty_port *port); | 536 | extern void tty_port_lower_dtr_rts(struct tty_port *port); |
504 | extern void tty_port_hangup(struct tty_port *port); | 537 | extern void tty_port_hangup(struct tty_port *port); |
538 | extern void tty_port_tty_hangup(struct tty_port *port, bool check_clocal); | ||
539 | extern void tty_port_tty_wakeup(struct tty_port *port); | ||
505 | extern int tty_port_block_til_ready(struct tty_port *port, | 540 | extern int tty_port_block_til_ready(struct tty_port *port, |
506 | struct tty_struct *tty, struct file *filp); | 541 | struct tty_struct *tty, struct file *filp); |
507 | extern int tty_port_close_start(struct tty_port *port, | 542 | extern int tty_port_close_start(struct tty_port *port, |
@@ -526,8 +561,6 @@ extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); | |||
526 | extern void tty_ldisc_init(struct tty_struct *tty); | 561 | extern void tty_ldisc_init(struct tty_struct *tty); |
527 | extern void tty_ldisc_deinit(struct tty_struct *tty); | 562 | extern void tty_ldisc_deinit(struct tty_struct *tty); |
528 | extern void tty_ldisc_begin(void); | 563 | extern void tty_ldisc_begin(void); |
529 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ | ||
530 | extern void tty_ldisc_enable(struct tty_struct *tty); | ||
531 | 564 | ||
532 | 565 | ||
533 | /* n_tty.c */ | 566 | /* n_tty.c */ |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 455a0d7bf220..58390c73df8b 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -9,89 +9,89 @@ | |||
9 | * | 9 | * |
10 | * int (*open)(struct tty_struct *); | 10 | * int (*open)(struct tty_struct *); |
11 | * | 11 | * |
12 | * This function is called when the line discipline is associated | 12 | * This function is called when the line discipline is associated |
13 | * with the tty. The line discipline can use this as an | 13 | * with the tty. The line discipline can use this as an |
14 | * opportunity to initialize any state needed by the ldisc routines. | 14 | * opportunity to initialize any state needed by the ldisc routines. |
15 | * | 15 | * |
16 | * void (*close)(struct tty_struct *); | 16 | * void (*close)(struct tty_struct *); |
17 | * | 17 | * |
18 | * This function is called when the line discipline is being | 18 | * This function is called when the line discipline is being |
19 | * shutdown, either because the tty is being closed or because | 19 | * shutdown, either because the tty is being closed or because |
20 | * the tty is being changed to use a new line discipline | 20 | * the tty is being changed to use a new line discipline |
21 | * | 21 | * |
22 | * void (*flush_buffer)(struct tty_struct *tty); | 22 | * void (*flush_buffer)(struct tty_struct *tty); |
23 | * | 23 | * |
24 | * This function instructs the line discipline to clear its | 24 | * This function instructs the line discipline to clear its |
25 | * buffers of any input characters it may have queued to be | 25 | * buffers of any input characters it may have queued to be |
26 | * delivered to the user mode process. | 26 | * delivered to the user mode process. |
27 | * | 27 | * |
28 | * ssize_t (*chars_in_buffer)(struct tty_struct *tty); | 28 | * ssize_t (*chars_in_buffer)(struct tty_struct *tty); |
29 | * | 29 | * |
30 | * This function returns the number of input characters the line | 30 | * This function returns the number of input characters the line |
31 | * discipline may have queued up to be delivered to the user mode | 31 | * discipline may have queued up to be delivered to the user mode |
32 | * process. | 32 | * process. |
33 | * | 33 | * |
34 | * ssize_t (*read)(struct tty_struct * tty, struct file * file, | 34 | * ssize_t (*read)(struct tty_struct * tty, struct file * file, |
35 | * unsigned char * buf, size_t nr); | 35 | * unsigned char * buf, size_t nr); |
36 | * | 36 | * |
37 | * This function is called when the user requests to read from | 37 | * This function is called when the user requests to read from |
38 | * the tty. The line discipline will return whatever characters | 38 | * the tty. The line discipline will return whatever characters |
39 | * it has buffered up for the user. If this function is not | 39 | * it has buffered up for the user. If this function is not |
40 | * defined, the user will receive an EIO error. | 40 | * defined, the user will receive an EIO error. |
41 | * | 41 | * |
42 | * ssize_t (*write)(struct tty_struct * tty, struct file * file, | 42 | * ssize_t (*write)(struct tty_struct * tty, struct file * file, |
43 | * const unsigned char * buf, size_t nr); | 43 | * const unsigned char * buf, size_t nr); |
44 | * | 44 | * |
45 | * This function is called when the user requests to write to the | 45 | * This function is called when the user requests to write to the |
46 | * tty. The line discipline will deliver the characters to the | 46 | * tty. The line discipline will deliver the characters to the |
47 | * low-level tty device for transmission, optionally performing | 47 | * low-level tty device for transmission, optionally performing |
48 | * some processing on the characters first. If this function is | 48 | * some processing on the characters first. If this function is |
49 | * not defined, the user will receive an EIO error. | 49 | * not defined, the user will receive an EIO error. |
50 | * | 50 | * |
51 | * int (*ioctl)(struct tty_struct * tty, struct file * file, | 51 | * int (*ioctl)(struct tty_struct * tty, struct file * file, |
52 | * unsigned int cmd, unsigned long arg); | 52 | * unsigned int cmd, unsigned long arg); |
53 | * | 53 | * |
54 | * This function is called when the user requests an ioctl which | 54 | * This function is called when the user requests an ioctl which |
55 | * is not handled by the tty layer or the low-level tty driver. | 55 | * is not handled by the tty layer or the low-level tty driver. |
56 | * It is intended for ioctls which affect line discpline | 56 | * It is intended for ioctls which affect line discpline |
57 | * operation. Note that the search order for ioctls is (1) tty | 57 | * operation. Note that the search order for ioctls is (1) tty |
58 | * layer, (2) tty low-level driver, (3) line discpline. So a | 58 | * layer, (2) tty low-level driver, (3) line discpline. So a |
59 | * low-level driver can "grab" an ioctl request before the line | 59 | * low-level driver can "grab" an ioctl request before the line |
60 | * discpline has a chance to see it. | 60 | * discpline has a chance to see it. |
61 | * | 61 | * |
62 | * long (*compat_ioctl)(struct tty_struct * tty, struct file * file, | 62 | * long (*compat_ioctl)(struct tty_struct * tty, struct file * file, |
63 | * unsigned int cmd, unsigned long arg); | 63 | * unsigned int cmd, unsigned long arg); |
64 | * | 64 | * |
65 | * Process ioctl calls from 32-bit process on 64-bit system | 65 | * Process ioctl calls from 32-bit process on 64-bit system |
66 | * | 66 | * |
67 | * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); | 67 | * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
68 | * | 68 | * |
69 | * This function notifies the line discpline that a change has | 69 | * This function notifies the line discpline that a change has |
70 | * been made to the termios structure. | 70 | * been made to the termios structure. |
71 | * | 71 | * |
72 | * int (*poll)(struct tty_struct * tty, struct file * file, | 72 | * int (*poll)(struct tty_struct * tty, struct file * file, |
73 | * poll_table *wait); | 73 | * poll_table *wait); |
74 | * | 74 | * |
75 | * This function is called when a user attempts to select/poll on a | 75 | * This function is called when a user attempts to select/poll on a |
76 | * tty device. It is solely the responsibility of the line | 76 | * tty device. It is solely the responsibility of the line |
77 | * discipline to handle poll requests. | 77 | * discipline to handle poll requests. |
78 | * | 78 | * |
79 | * void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 79 | * void (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
80 | * char *fp, int count); | 80 | * char *fp, int count); |
81 | * | 81 | * |
82 | * This function is called by the low-level tty driver to send | 82 | * This function is called by the low-level tty driver to send |
83 | * characters received by the hardware to the line discpline for | 83 | * characters received by the hardware to the line discpline for |
84 | * processing. <cp> is a pointer to the buffer of input | 84 | * processing. <cp> is a pointer to the buffer of input |
85 | * character received by the device. <fp> is a pointer to a | 85 | * character received by the device. <fp> is a pointer to a |
86 | * pointer of flag bytes which indicate whether a character was | 86 | * pointer of flag bytes which indicate whether a character was |
87 | * received with a parity error, etc. | 87 | * received with a parity error, etc. |
88 | * | 88 | * |
89 | * void (*write_wakeup)(struct tty_struct *); | 89 | * void (*write_wakeup)(struct tty_struct *); |
90 | * | 90 | * |
91 | * This function is called by the low-level tty driver to signal | 91 | * This function is called by the low-level tty driver to signal |
92 | * that line discpline should try to send more characters to the | 92 | * that line discpline should try to send more characters to the |
93 | * low-level driver for transmission. If the line discpline does | 93 | * low-level driver for transmission. If the line discpline does |
94 | * not have any more data to send, it can just return. | 94 | * not have any more data to send, it can just return. |
95 | * | 95 | * |
96 | * int (*hangup)(struct tty_struct *) | 96 | * int (*hangup)(struct tty_struct *) |
97 | * | 97 | * |
@@ -115,7 +115,7 @@ struct tty_ldisc_ops { | |||
115 | char *name; | 115 | char *name; |
116 | int num; | 116 | int num; |
117 | int flags; | 117 | int flags; |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * The following routines are called from above. | 120 | * The following routines are called from above. |
121 | */ | 121 | */ |
@@ -123,19 +123,19 @@ struct tty_ldisc_ops { | |||
123 | void (*close)(struct tty_struct *); | 123 | void (*close)(struct tty_struct *); |
124 | void (*flush_buffer)(struct tty_struct *tty); | 124 | void (*flush_buffer)(struct tty_struct *tty); |
125 | ssize_t (*chars_in_buffer)(struct tty_struct *tty); | 125 | ssize_t (*chars_in_buffer)(struct tty_struct *tty); |
126 | ssize_t (*read)(struct tty_struct * tty, struct file * file, | 126 | ssize_t (*read)(struct tty_struct *tty, struct file *file, |
127 | unsigned char __user * buf, size_t nr); | 127 | unsigned char __user *buf, size_t nr); |
128 | ssize_t (*write)(struct tty_struct * tty, struct file * file, | 128 | ssize_t (*write)(struct tty_struct *tty, struct file *file, |
129 | const unsigned char * buf, size_t nr); | 129 | const unsigned char *buf, size_t nr); |
130 | int (*ioctl)(struct tty_struct * tty, struct file * file, | 130 | int (*ioctl)(struct tty_struct *tty, struct file *file, |
131 | unsigned int cmd, unsigned long arg); | 131 | unsigned int cmd, unsigned long arg); |
132 | long (*compat_ioctl)(struct tty_struct * tty, struct file * file, | 132 | long (*compat_ioctl)(struct tty_struct *tty, struct file *file, |
133 | unsigned int cmd, unsigned long arg); | 133 | unsigned int cmd, unsigned long arg); |
134 | void (*set_termios)(struct tty_struct *tty, struct ktermios * old); | 134 | void (*set_termios)(struct tty_struct *tty, struct ktermios *old); |
135 | unsigned int (*poll)(struct tty_struct *, struct file *, | 135 | unsigned int (*poll)(struct tty_struct *, struct file *, |
136 | struct poll_table_struct *); | 136 | struct poll_table_struct *); |
137 | int (*hangup)(struct tty_struct *tty); | 137 | int (*hangup)(struct tty_struct *tty); |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * The following routines are called from below. | 140 | * The following routines are called from below. |
141 | */ | 141 | */ |
@@ -145,7 +145,7 @@ struct tty_ldisc_ops { | |||
145 | void (*dcd_change)(struct tty_struct *, unsigned int); | 145 | void (*dcd_change)(struct tty_struct *, unsigned int); |
146 | 146 | ||
147 | struct module *owner; | 147 | struct module *owner; |
148 | 148 | ||
149 | int refcount; | 149 | int refcount; |
150 | }; | 150 | }; |
151 | 151 | ||
diff --git a/include/linux/ucs2_string.h b/include/linux/ucs2_string.h new file mode 100644 index 000000000000..cbb20afdbc01 --- /dev/null +++ b/include/linux/ucs2_string.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _LINUX_UCS2_STRING_H_ | ||
2 | #define _LINUX_UCS2_STRING_H_ | ||
3 | |||
4 | #include <linux/types.h> /* for size_t */ | ||
5 | #include <linux/stddef.h> /* for NULL */ | ||
6 | |||
7 | typedef u16 ucs2_char_t; | ||
8 | |||
9 | unsigned long ucs2_strnlen(const ucs2_char_t *s, size_t maxlength); | ||
10 | unsigned long ucs2_strlen(const ucs2_char_t *s); | ||
11 | unsigned long ucs2_strsize(const ucs2_char_t *data, unsigned long maxlength); | ||
12 | int ucs2_strncmp(const ucs2_char_t *a, const ucs2_char_t *b, size_t len); | ||
13 | |||
14 | #endif /* _LINUX_UCS2_STRING_H_ */ | ||
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 02b83db8e2c5..06f28beed7c2 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
@@ -38,6 +38,8 @@ struct inode; | |||
38 | #define UPROBE_HANDLER_REMOVE 1 | 38 | #define UPROBE_HANDLER_REMOVE 1 |
39 | #define UPROBE_HANDLER_MASK 1 | 39 | #define UPROBE_HANDLER_MASK 1 |
40 | 40 | ||
41 | #define MAX_URETPROBE_DEPTH 64 | ||
42 | |||
41 | enum uprobe_filter_ctx { | 43 | enum uprobe_filter_ctx { |
42 | UPROBE_FILTER_REGISTER, | 44 | UPROBE_FILTER_REGISTER, |
43 | UPROBE_FILTER_UNREGISTER, | 45 | UPROBE_FILTER_UNREGISTER, |
@@ -46,6 +48,9 @@ enum uprobe_filter_ctx { | |||
46 | 48 | ||
47 | struct uprobe_consumer { | 49 | struct uprobe_consumer { |
48 | int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); | 50 | int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); |
51 | int (*ret_handler)(struct uprobe_consumer *self, | ||
52 | unsigned long func, | ||
53 | struct pt_regs *regs); | ||
49 | bool (*filter)(struct uprobe_consumer *self, | 54 | bool (*filter)(struct uprobe_consumer *self, |
50 | enum uprobe_filter_ctx ctx, | 55 | enum uprobe_filter_ctx ctx, |
51 | struct mm_struct *mm); | 56 | struct mm_struct *mm); |
@@ -68,6 +73,8 @@ struct uprobe_task { | |||
68 | enum uprobe_task_state state; | 73 | enum uprobe_task_state state; |
69 | struct arch_uprobe_task autask; | 74 | struct arch_uprobe_task autask; |
70 | 75 | ||
76 | struct return_instance *return_instances; | ||
77 | unsigned int depth; | ||
71 | struct uprobe *active_uprobe; | 78 | struct uprobe *active_uprobe; |
72 | 79 | ||
73 | unsigned long xol_vaddr; | 80 | unsigned long xol_vaddr; |
@@ -100,6 +107,7 @@ struct uprobes_state { | |||
100 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 107 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
101 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 108 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
102 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); | 109 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); |
110 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); | ||
103 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 111 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
104 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); | 112 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); |
105 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 113 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 4d22d0f6167a..a0bee5a28d1a 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -469,14 +469,12 @@ struct usb3_lpm_parameters { | |||
469 | * @lpm_capable: device supports LPM | 469 | * @lpm_capable: device supports LPM |
470 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM | 470 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM |
471 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled | 471 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled |
472 | * @usb3_lpm_enabled: USB3 hardware LPM enabled | ||
472 | * @string_langid: language ID for strings | 473 | * @string_langid: language ID for strings |
473 | * @product: iProduct string, if present (static) | 474 | * @product: iProduct string, if present (static) |
474 | * @manufacturer: iManufacturer string, if present (static) | 475 | * @manufacturer: iManufacturer string, if present (static) |
475 | * @serial: iSerialNumber string, if present (static) | 476 | * @serial: iSerialNumber string, if present (static) |
476 | * @filelist: usbfs files that are open to this device | 477 | * @filelist: usbfs files that are open to this device |
477 | * @usb_classdev: USB class device that was created for usbfs device | ||
478 | * access from userspace | ||
479 | * @usbfs_dentry: usbfs dentry entry for the device | ||
480 | * @maxchild: number of ports if hub | 478 | * @maxchild: number of ports if hub |
481 | * @quirks: quirks of the whole device | 479 | * @quirks: quirks of the whole device |
482 | * @urbnum: number of URBs submitted for the whole device | 480 | * @urbnum: number of URBs submitted for the whole device |
@@ -619,7 +617,7 @@ static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index) | |||
619 | #endif | 617 | #endif |
620 | 618 | ||
621 | /* USB autosuspend and autoresume */ | 619 | /* USB autosuspend and autoresume */ |
622 | #ifdef CONFIG_USB_SUSPEND | 620 | #ifdef CONFIG_PM_RUNTIME |
623 | extern void usb_enable_autosuspend(struct usb_device *udev); | 621 | extern void usb_enable_autosuspend(struct usb_device *udev); |
624 | extern void usb_disable_autosuspend(struct usb_device *udev); | 622 | extern void usb_disable_autosuspend(struct usb_device *udev); |
625 | 623 | ||
@@ -978,7 +976,12 @@ struct usbdrv_wrap { | |||
978 | * the "usbfs" filesystem. This lets devices provide ways to | 976 | * the "usbfs" filesystem. This lets devices provide ways to |
979 | * expose information to user space regardless of where they | 977 | * expose information to user space regardless of where they |
980 | * do (or don't) show up otherwise in the filesystem. | 978 | * do (or don't) show up otherwise in the filesystem. |
981 | * @suspend: Called when the device is going to be suspended by the system. | 979 | * @suspend: Called when the device is going to be suspended by the |
980 | * system either from system sleep or runtime suspend context. The | ||
981 | * return value will be ignored in system sleep context, so do NOT | ||
982 | * try to continue using the device if suspend fails in this case. | ||
983 | * Instead, let the resume or reset-resume routine recover from | ||
984 | * the failure. | ||
982 | * @resume: Called when the device is being resumed by the system. | 985 | * @resume: Called when the device is being resumed by the system. |
983 | * @reset_resume: Called when the suspended device has been reset instead | 986 | * @reset_resume: Called when the suspended device has been reset instead |
984 | * of being resumed. | 987 | * of being resumed. |
diff --git a/include/linux/usb/cdc-wdm.h b/include/linux/usb/cdc-wdm.h index 719c332620fa..0b3f4295c025 100644 --- a/include/linux/usb/cdc-wdm.h +++ b/include/linux/usb/cdc-wdm.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __LINUX_USB_CDC_WDM_H | 11 | #ifndef __LINUX_USB_CDC_WDM_H |
12 | #define __LINUX_USB_CDC_WDM_H | 12 | #define __LINUX_USB_CDC_WDM_H |
13 | 13 | ||
14 | #include <uapi/linux/usb/cdc-wdm.h> | ||
15 | |||
14 | extern struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, | 16 | extern struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, |
15 | struct usb_endpoint_descriptor *ep, | 17 | struct usb_endpoint_descriptor *ep, |
16 | int bufsize, | 18 | int bufsize, |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 9c210f2283df..27603bcbb9b9 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -43,4 +43,13 @@ | |||
43 | */ | 43 | */ |
44 | extern const char *usb_speed_string(enum usb_device_speed speed); | 44 | extern const char *usb_speed_string(enum usb_device_speed speed); |
45 | 45 | ||
46 | |||
47 | /** | ||
48 | * usb_state_string - Returns human readable name for the state. | ||
49 | * @state: The state to return a human-readable name for. If it's not | ||
50 | * any of the states devices in usb_device_state_string enum, | ||
51 | * the string UNKNOWN will be returned. | ||
52 | */ | ||
53 | extern const char *usb_state_string(enum usb_device_state state); | ||
54 | |||
46 | #endif /* __LINUX_USB_CH9_H */ | 55 | #endif /* __LINUX_USB_CH9_H */ |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 8860594d6364..5e61589fc166 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/usb/ch9.h> | 39 | #include <linux/usb/ch9.h> |
40 | #include <linux/usb/gadget.h> | 40 | #include <linux/usb/gadget.h> |
41 | #include <linux/log2.h> | 41 | #include <linux/log2.h> |
42 | #include <linux/configfs.h> | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they | 45 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they |
@@ -464,6 +465,8 @@ struct usb_function_driver { | |||
464 | }; | 465 | }; |
465 | 466 | ||
466 | struct usb_function_instance { | 467 | struct usb_function_instance { |
468 | struct config_group group; | ||
469 | struct list_head cfs_list; | ||
467 | struct usb_function_driver *fd; | 470 | struct usb_function_driver *fd; |
468 | void (*free_func_inst)(struct usb_function_instance *inst); | 471 | void (*free_func_inst)(struct usb_function_instance *inst); |
469 | }; | 472 | }; |
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h index 51eae14477f7..5615f4d82724 100644 --- a/include/linux/usb/dwc3-omap.h +++ b/include/linux/usb/dwc3-omap.h | |||
@@ -19,11 +19,11 @@ enum omap_dwc3_vbus_id_status { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) | 21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) |
22 | extern void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); | 22 | extern int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); |
23 | #else | 23 | #else |
24 | static inline void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) | 24 | static inline int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) |
25 | { | 25 | { |
26 | return; | 26 | return -ENODEV; |
27 | } | 27 | } |
28 | #endif | 28 | #endif |
29 | 29 | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 2e297e80d59a..c454a88abf2e 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -482,6 +482,7 @@ struct usb_gadget_ops { | |||
482 | * @speed: Speed of current connection to USB host. | 482 | * @speed: Speed of current connection to USB host. |
483 | * @max_speed: Maximal speed the UDC can handle. UDC must support this | 483 | * @max_speed: Maximal speed the UDC can handle. UDC must support this |
484 | * and all slower speeds. | 484 | * and all slower speeds. |
485 | * @state: the state we are now (attached, suspended, configured, etc) | ||
485 | * @sg_supported: true if we can handle scatter-gather | 486 | * @sg_supported: true if we can handle scatter-gather |
486 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the | 487 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the |
487 | * gadget driver must provide a USB OTG descriptor. | 488 | * gadget driver must provide a USB OTG descriptor. |
@@ -525,6 +526,7 @@ struct usb_gadget { | |||
525 | struct list_head ep_list; /* of usb_ep */ | 526 | struct list_head ep_list; /* of usb_ep */ |
526 | enum usb_device_speed speed; | 527 | enum usb_device_speed speed; |
527 | enum usb_device_speed max_speed; | 528 | enum usb_device_speed max_speed; |
529 | enum usb_device_state state; | ||
528 | unsigned sg_supported:1; | 530 | unsigned sg_supported:1; |
529 | unsigned is_otg:1; | 531 | unsigned is_otg:1; |
530 | unsigned is_a_peripheral:1; | 532 | unsigned is_a_peripheral:1; |
@@ -872,6 +874,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver); | |||
872 | */ | 874 | */ |
873 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 875 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
874 | 876 | ||
877 | extern int usb_add_gadget_udc_release(struct device *parent, | ||
878 | struct usb_gadget *gadget, void (*release)(struct device *dev)); | ||
875 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); | 879 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); |
876 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); | 880 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); |
877 | extern int udc_attach_driver(const char *name, | 881 | extern int udc_attach_driver(const char *name, |
@@ -959,6 +963,13 @@ extern void usb_gadget_unmap_request(struct usb_gadget *gadget, | |||
959 | 963 | ||
960 | /*-------------------------------------------------------------------------*/ | 964 | /*-------------------------------------------------------------------------*/ |
961 | 965 | ||
966 | /* utility to set gadget state properly */ | ||
967 | |||
968 | extern void usb_gadget_set_state(struct usb_gadget *gadget, | ||
969 | enum usb_device_state state); | ||
970 | |||
971 | /*-------------------------------------------------------------------------*/ | ||
972 | |||
962 | /* utility wrapping a simple endpoint selection policy */ | 973 | /* utility wrapping a simple endpoint selection policy */ |
963 | 974 | ||
964 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 975 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
diff --git a/include/linux/usb/gadget_configfs.h b/include/linux/usb/gadget_configfs.h new file mode 100644 index 000000000000..d74c0ae989d5 --- /dev/null +++ b/include/linux/usb/gadget_configfs.h | |||
@@ -0,0 +1,110 @@ | |||
1 | #ifndef __GADGET_CONFIGFS__ | ||
2 | #define __GADGET_CONFIGFS__ | ||
3 | |||
4 | #include <linux/configfs.h> | ||
5 | |||
6 | int check_user_usb_string(const char *name, | ||
7 | struct usb_gadget_strings *stringtab_dev); | ||
8 | |||
9 | #define GS_STRINGS_W(__struct, __name) \ | ||
10 | static ssize_t __struct##_##__name##_store(struct __struct *gs, \ | ||
11 | const char *page, size_t len) \ | ||
12 | { \ | ||
13 | int ret; \ | ||
14 | \ | ||
15 | ret = usb_string_copy(page, &gs->__name); \ | ||
16 | if (ret) \ | ||
17 | return ret; \ | ||
18 | return len; \ | ||
19 | } | ||
20 | |||
21 | #define GS_STRINGS_R(__struct, __name) \ | ||
22 | static ssize_t __struct##_##__name##_show(struct __struct *gs, \ | ||
23 | char *page) \ | ||
24 | { \ | ||
25 | return sprintf(page, "%s\n", gs->__name ?: ""); \ | ||
26 | } | ||
27 | |||
28 | #define GS_STRING_ITEM_ATTR(struct_name, name) \ | ||
29 | static struct struct_name##_attribute struct_name##_##name = \ | ||
30 | __CONFIGFS_ATTR(name, S_IRUGO | S_IWUSR, \ | ||
31 | struct_name##_##name##_show, \ | ||
32 | struct_name##_##name##_store) | ||
33 | |||
34 | #define GS_STRINGS_RW(struct_name, _name) \ | ||
35 | GS_STRINGS_R(struct_name, _name) \ | ||
36 | GS_STRINGS_W(struct_name, _name) \ | ||
37 | GS_STRING_ITEM_ATTR(struct_name, _name) | ||
38 | |||
39 | #define USB_CONFIG_STRING_RW_OPS(struct_in) \ | ||
40 | CONFIGFS_ATTR_OPS(struct_in); \ | ||
41 | \ | ||
42 | static struct configfs_item_operations struct_in##_langid_item_ops = { \ | ||
43 | .release = struct_in##_attr_release, \ | ||
44 | .show_attribute = struct_in##_attr_show, \ | ||
45 | .store_attribute = struct_in##_attr_store, \ | ||
46 | }; \ | ||
47 | \ | ||
48 | static struct config_item_type struct_in##_langid_type = { \ | ||
49 | .ct_item_ops = &struct_in##_langid_item_ops, \ | ||
50 | .ct_attrs = struct_in##_langid_attrs, \ | ||
51 | .ct_owner = THIS_MODULE, \ | ||
52 | } | ||
53 | |||
54 | #define USB_CONFIG_STRINGS_LANG(struct_in, struct_member) \ | ||
55 | static struct config_group *struct_in##_strings_make( \ | ||
56 | struct config_group *group, \ | ||
57 | const char *name) \ | ||
58 | { \ | ||
59 | struct struct_member *gi; \ | ||
60 | struct struct_in *gs; \ | ||
61 | struct struct_in *new; \ | ||
62 | int langs = 0; \ | ||
63 | int ret; \ | ||
64 | \ | ||
65 | new = kzalloc(sizeof(*new), GFP_KERNEL); \ | ||
66 | if (!new) \ | ||
67 | return ERR_PTR(-ENOMEM); \ | ||
68 | \ | ||
69 | ret = check_user_usb_string(name, &new->stringtab_dev); \ | ||
70 | if (ret) \ | ||
71 | goto err; \ | ||
72 | config_group_init_type_name(&new->group, name, \ | ||
73 | &struct_in##_langid_type); \ | ||
74 | \ | ||
75 | gi = container_of(group, struct struct_member, strings_group); \ | ||
76 | ret = -EEXIST; \ | ||
77 | list_for_each_entry(gs, &gi->string_list, list) { \ | ||
78 | if (gs->stringtab_dev.language == new->stringtab_dev.language) \ | ||
79 | goto err; \ | ||
80 | langs++; \ | ||
81 | } \ | ||
82 | ret = -EOVERFLOW; \ | ||
83 | if (langs >= MAX_USB_STRING_LANGS) \ | ||
84 | goto err; \ | ||
85 | \ | ||
86 | list_add_tail(&new->list, &gi->string_list); \ | ||
87 | return &new->group; \ | ||
88 | err: \ | ||
89 | kfree(new); \ | ||
90 | return ERR_PTR(ret); \ | ||
91 | } \ | ||
92 | \ | ||
93 | static void struct_in##_strings_drop( \ | ||
94 | struct config_group *group, \ | ||
95 | struct config_item *item) \ | ||
96 | { \ | ||
97 | config_item_put(item); \ | ||
98 | } \ | ||
99 | \ | ||
100 | static struct configfs_group_operations struct_in##_strings_ops = { \ | ||
101 | .make_group = &struct_in##_strings_make, \ | ||
102 | .drop_item = &struct_in##_strings_drop, \ | ||
103 | }; \ | ||
104 | \ | ||
105 | static struct config_item_type struct_in##_strings_type = { \ | ||
106 | .ct_group_ops = &struct_in##_strings_ops, \ | ||
107 | .ct_owner = THIS_MODULE, \ | ||
108 | } | ||
109 | |||
110 | #endif | ||
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 59694b5e5e90..f5f5c7dfda90 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -84,7 +84,7 @@ struct usb_hcd { | |||
84 | 84 | ||
85 | struct timer_list rh_timer; /* drives root-hub polling */ | 85 | struct timer_list rh_timer; /* drives root-hub polling */ |
86 | struct urb *status_urb; /* the current status urb */ | 86 | struct urb *status_urb; /* the current status urb */ |
87 | #ifdef CONFIG_USB_SUSPEND | 87 | #ifdef CONFIG_PM_RUNTIME |
88 | struct work_struct wakeup_work; /* for remote wakeup */ | 88 | struct work_struct wakeup_work; /* for remote wakeup */ |
89 | #endif | 89 | #endif |
90 | 90 | ||
@@ -593,14 +593,14 @@ extern int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg); | |||
593 | extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg); | 593 | extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg); |
594 | #endif /* CONFIG_PM */ | 594 | #endif /* CONFIG_PM */ |
595 | 595 | ||
596 | #ifdef CONFIG_USB_SUSPEND | 596 | #ifdef CONFIG_PM_RUNTIME |
597 | extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd); | 597 | extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd); |
598 | #else | 598 | #else |
599 | static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) | 599 | static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) |
600 | { | 600 | { |
601 | return; | 601 | return; |
602 | } | 602 | } |
603 | #endif /* CONFIG_USB_SUSPEND */ | 603 | #endif /* CONFIG_PM_RUNTIME */ |
604 | 604 | ||
605 | /*-------------------------------------------------------------------------*/ | 605 | /*-------------------------------------------------------------------------*/ |
606 | 606 | ||
diff --git a/include/linux/usb/musb-ux500.h b/include/linux/usb/musb-ux500.h new file mode 100644 index 000000000000..1e2c7130f6e1 --- /dev/null +++ b/include/linux/usb/musb-ux500.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 ST-Ericsson AB | ||
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 as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef __MUSB_UX500_H__ | ||
16 | #define __MUSB_UX500_H__ | ||
17 | |||
18 | enum ux500_musb_vbus_id_status { | ||
19 | UX500_MUSB_NONE = 0, | ||
20 | UX500_MUSB_VBUS, | ||
21 | UX500_MUSB_ID, | ||
22 | UX500_MUSB_CHARGER, | ||
23 | UX500_MUSB_ENUMERATED, | ||
24 | UX500_MUSB_RIDA, | ||
25 | UX500_MUSB_RIDB, | ||
26 | UX500_MUSB_RIDC, | ||
27 | UX500_MUSB_PREPARE, | ||
28 | UX500_MUSB_CLEAN, | ||
29 | }; | ||
30 | |||
31 | #endif /* __MUSB_UX500_H__ */ | ||
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h index 28884c717411..148d35171aac 100644 --- a/include/linux/usb/nop-usb-xceiv.h +++ b/include/linux/usb/nop-usb-xceiv.h | |||
@@ -5,6 +5,11 @@ | |||
5 | 5 | ||
6 | struct nop_usb_xceiv_platform_data { | 6 | struct nop_usb_xceiv_platform_data { |
7 | enum usb_phy_type type; | 7 | enum usb_phy_type type; |
8 | unsigned long clk_rate; | ||
9 | |||
10 | /* if set fails with -EPROBE_DEFER if can't get regulator */ | ||
11 | unsigned int needs_vcc:1; | ||
12 | unsigned int needs_reset:1; | ||
8 | }; | 13 | }; |
9 | 14 | ||
10 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) | 15 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index e8a5fe87c6bd..291e01ba32e5 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -36,14 +36,7 @@ struct usb_otg { | |||
36 | 36 | ||
37 | }; | 37 | }; |
38 | 38 | ||
39 | #ifdef CONFIG_USB_OTG_UTILS | 39 | extern const char *usb_otg_state_string(enum usb_otg_state state); |
40 | extern const char *otg_state_string(enum usb_otg_state state); | ||
41 | #else | ||
42 | static inline const char *otg_state_string(enum usb_otg_state state) | ||
43 | { | ||
44 | return NULL; | ||
45 | } | ||
46 | #endif | ||
47 | 40 | ||
48 | /* Context: can sleep */ | 41 | /* Context: can sleep */ |
49 | static inline int | 42 | static inline int |
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 15847cbdb512..6b5978f57633 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h | |||
@@ -91,6 +91,9 @@ struct usb_phy { | |||
91 | int (*init)(struct usb_phy *x); | 91 | int (*init)(struct usb_phy *x); |
92 | void (*shutdown)(struct usb_phy *x); | 92 | void (*shutdown)(struct usb_phy *x); |
93 | 93 | ||
94 | /* enable/disable VBUS */ | ||
95 | int (*set_vbus)(struct usb_phy *x, int on); | ||
96 | |||
94 | /* effective for B devices, ignored for A-peripheral */ | 97 | /* effective for B devices, ignored for A-peripheral */ |
95 | int (*set_power)(struct usb_phy *x, | 98 | int (*set_power)(struct usb_phy *x, |
96 | unsigned mA); | 99 | unsigned mA); |
@@ -160,8 +163,26 @@ usb_phy_shutdown(struct usb_phy *x) | |||
160 | x->shutdown(x); | 163 | x->shutdown(x); |
161 | } | 164 | } |
162 | 165 | ||
166 | static inline int | ||
167 | usb_phy_vbus_on(struct usb_phy *x) | ||
168 | { | ||
169 | if (!x->set_vbus) | ||
170 | return 0; | ||
171 | |||
172 | return x->set_vbus(x, true); | ||
173 | } | ||
174 | |||
175 | static inline int | ||
176 | usb_phy_vbus_off(struct usb_phy *x) | ||
177 | { | ||
178 | if (!x->set_vbus) | ||
179 | return 0; | ||
180 | |||
181 | return x->set_vbus(x, false); | ||
182 | } | ||
183 | |||
163 | /* for usb host and peripheral controller drivers */ | 184 | /* for usb host and peripheral controller drivers */ |
164 | #ifdef CONFIG_USB_OTG_UTILS | 185 | #if IS_ENABLED(CONFIG_USB_PHY) |
165 | extern struct usb_phy *usb_get_phy(enum usb_phy_type type); | 186 | extern struct usb_phy *usb_get_phy(enum usb_phy_type type); |
166 | extern struct usb_phy *devm_usb_get_phy(struct device *dev, | 187 | extern struct usb_phy *devm_usb_get_phy(struct device *dev, |
167 | enum usb_phy_type type); | 188 | enum usb_phy_type type); |
@@ -176,29 +197,29 @@ extern int usb_bind_phy(const char *dev_name, u8 index, | |||
176 | #else | 197 | #else |
177 | static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) | 198 | static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) |
178 | { | 199 | { |
179 | return NULL; | 200 | return ERR_PTR(-ENXIO); |
180 | } | 201 | } |
181 | 202 | ||
182 | static inline struct usb_phy *devm_usb_get_phy(struct device *dev, | 203 | static inline struct usb_phy *devm_usb_get_phy(struct device *dev, |
183 | enum usb_phy_type type) | 204 | enum usb_phy_type type) |
184 | { | 205 | { |
185 | return NULL; | 206 | return ERR_PTR(-ENXIO); |
186 | } | 207 | } |
187 | 208 | ||
188 | static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) | 209 | static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) |
189 | { | 210 | { |
190 | return NULL; | 211 | return ERR_PTR(-ENXIO); |
191 | } | 212 | } |
192 | 213 | ||
193 | static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index) | 214 | static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index) |
194 | { | 215 | { |
195 | return NULL; | 216 | return ERR_PTR(-ENXIO); |
196 | } | 217 | } |
197 | 218 | ||
198 | static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, | 219 | static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, |
199 | const char *phandle, u8 index) | 220 | const char *phandle, u8 index) |
200 | { | 221 | { |
201 | return NULL; | 222 | return ERR_PTR(-ENXIO); |
202 | } | 223 | } |
203 | 224 | ||
204 | static inline void usb_put_phy(struct usb_phy *x) | 225 | static inline void usb_put_phy(struct usb_phy *x) |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index c5d36c65c33b..e452ba6ec6bd 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
@@ -62,14 +62,14 @@ struct renesas_usbhs_platform_callback { | |||
62 | * Hardware exit function for platform. | 62 | * Hardware exit function for platform. |
63 | * it is called when driver was removed | 63 | * it is called when driver was removed |
64 | */ | 64 | */ |
65 | void (*hardware_exit)(struct platform_device *pdev); | 65 | int (*hardware_exit)(struct platform_device *pdev); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * option: | 68 | * option: |
69 | * | 69 | * |
70 | * for board specific clock control | 70 | * for board specific clock control |
71 | */ | 71 | */ |
72 | void (*power_ctrl)(struct platform_device *pdev, | 72 | int (*power_ctrl)(struct platform_device *pdev, |
73 | void __iomem *base, int enable); | 73 | void __iomem *base, int enable); |
74 | 74 | ||
75 | /* | 75 | /* |
@@ -77,7 +77,7 @@ struct renesas_usbhs_platform_callback { | |||
77 | * | 77 | * |
78 | * Phy reset for platform | 78 | * Phy reset for platform |
79 | */ | 79 | */ |
80 | void (*phy_reset)(struct platform_device *pdev); | 80 | int (*phy_reset)(struct platform_device *pdev); |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * get USB ID function | 83 | * get USB ID function |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 1819b59aab2a..b9b0f7b4e43b 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/serial.h> | ||
18 | #include <linux/sysrq.h> | 19 | #include <linux/sysrq.h> |
19 | #include <linux/kfifo.h> | 20 | #include <linux/kfifo.h> |
20 | 21 | ||
@@ -61,12 +62,12 @@ | |||
61 | * @bulk_out_buffers: pointers to the bulk out buffers for this port | 62 | * @bulk_out_buffers: pointers to the bulk out buffers for this port |
62 | * @write_urbs: pointers to the bulk out urbs for this port | 63 | * @write_urbs: pointers to the bulk out urbs for this port |
63 | * @write_urbs_free: status bitmap the for bulk out urbs | 64 | * @write_urbs_free: status bitmap the for bulk out urbs |
65 | * @icount: interrupt counters | ||
64 | * @tx_bytes: number of bytes currently in host stack queues | 66 | * @tx_bytes: number of bytes currently in host stack queues |
65 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this | 67 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this |
66 | * port. | 68 | * port. |
67 | * @flags: usb serial port flags | 69 | * @flags: usb serial port flags |
68 | * @write_wait: a wait_queue_head_t used by the port. | 70 | * @write_wait: a wait_queue_head_t used by the port. |
69 | * @delta_msr_wait: modem-status-change wait queue | ||
70 | * @work: work queue entry for the line discipline waking up. | 71 | * @work: work queue entry for the line discipline waking up. |
71 | * @throttled: nonzero if the read urb is inactive to throttle the device | 72 | * @throttled: nonzero if the read urb is inactive to throttle the device |
72 | * @throttle_req: nonzero if the tty wants to throttle us | 73 | * @throttle_req: nonzero if the tty wants to throttle us |
@@ -109,11 +110,11 @@ struct usb_serial_port { | |||
109 | unsigned long write_urbs_free; | 110 | unsigned long write_urbs_free; |
110 | __u8 bulk_out_endpointAddress; | 111 | __u8 bulk_out_endpointAddress; |
111 | 112 | ||
113 | struct async_icount icount; | ||
112 | int tx_bytes; | 114 | int tx_bytes; |
113 | 115 | ||
114 | unsigned long flags; | 116 | unsigned long flags; |
115 | wait_queue_head_t write_wait; | 117 | wait_queue_head_t write_wait; |
116 | wait_queue_head_t delta_msr_wait; | ||
117 | struct work_struct work; | 118 | struct work_struct work; |
118 | char throttled; | 119 | char throttled; |
119 | char throttle_req; | 120 | char throttle_req; |
@@ -272,6 +273,7 @@ struct usb_serial_driver { | |||
272 | int (*tiocmget)(struct tty_struct *tty); | 273 | int (*tiocmget)(struct tty_struct *tty); |
273 | int (*tiocmset)(struct tty_struct *tty, | 274 | int (*tiocmset)(struct tty_struct *tty, |
274 | unsigned int set, unsigned int clear); | 275 | unsigned int set, unsigned int clear); |
276 | int (*tiocmiwait)(struct tty_struct *tty, unsigned long arg); | ||
275 | int (*get_icount)(struct tty_struct *tty, | 277 | int (*get_icount)(struct tty_struct *tty, |
276 | struct serial_icounter_struct *icount); | 278 | struct serial_icounter_struct *icount); |
277 | /* Called by the tty layer for port level work. There may or may not | 279 | /* Called by the tty layer for port level work. There may or may not |
@@ -329,8 +331,10 @@ extern void usb_serial_generic_read_bulk_callback(struct urb *urb); | |||
329 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); | 331 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); |
330 | extern void usb_serial_generic_throttle(struct tty_struct *tty); | 332 | extern void usb_serial_generic_throttle(struct tty_struct *tty); |
331 | extern void usb_serial_generic_unthrottle(struct tty_struct *tty); | 333 | extern void usb_serial_generic_unthrottle(struct tty_struct *tty); |
332 | extern void usb_serial_generic_disconnect(struct usb_serial *serial); | 334 | extern int usb_serial_generic_tiocmiwait(struct tty_struct *tty, |
333 | extern void usb_serial_generic_release(struct usb_serial *serial); | 335 | unsigned long arg); |
336 | extern int usb_serial_generic_get_icount(struct tty_struct *tty, | ||
337 | struct serial_icounter_struct *icount); | ||
334 | extern int usb_serial_generic_register(void); | 338 | extern int usb_serial_generic_register(void); |
335 | extern void usb_serial_generic_deregister(void); | 339 | extern void usb_serial_generic_deregister(void); |
336 | extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, | 340 | extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, |
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index 9ebebe906925..1b7519a8c0bf 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h | |||
@@ -61,10 +61,14 @@ struct tegra_usb_phy { | |||
61 | struct device *dev; | 61 | struct device *dev; |
62 | bool is_legacy_phy; | 62 | bool is_legacy_phy; |
63 | bool is_ulpi_phy; | 63 | bool is_ulpi_phy; |
64 | void (*set_pts)(struct usb_phy *x, u8 pts_val); | ||
65 | void (*set_phcd)(struct usb_phy *x, bool enable); | ||
64 | }; | 66 | }; |
65 | 67 | ||
66 | struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, | 68 | struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, |
67 | void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode); | 69 | void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode, |
70 | void (*set_pts)(struct usb_phy *x, u8 pts_val), | ||
71 | void (*set_phcd)(struct usb_phy *x, bool enable)); | ||
68 | 72 | ||
69 | void tegra_usb_phy_preresume(struct usb_phy *phy); | 73 | void tegra_usb_phy_preresume(struct usb_phy *phy); |
70 | 74 | ||
@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy, | |||
75 | 79 | ||
76 | void tegra_ehci_phy_restore_end(struct usb_phy *phy); | 80 | void tegra_ehci_phy_restore_end(struct usb_phy *phy); |
77 | 81 | ||
78 | void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val); | ||
79 | |||
80 | void tegra_ehci_set_phcd(struct usb_phy *x, bool enable); | ||
81 | |||
82 | #endif /* __TEGRA_USB_PHY_H */ | 82 | #endif /* __TEGRA_USB_PHY_H */ |
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h index 75818744ab59..ea7168a68081 100644 --- a/include/linux/vexpress.h +++ b/include/linux/vexpress.h | |||
@@ -115,9 +115,6 @@ unsigned __vexpress_get_site(struct device *dev, struct device_node *node); | |||
115 | void vexpress_sysreg_early_init(void __iomem *base); | 115 | void vexpress_sysreg_early_init(void __iomem *base); |
116 | void vexpress_sysreg_of_early_init(void); | 116 | void vexpress_sysreg_of_early_init(void); |
117 | 117 | ||
118 | void vexpress_power_off(void); | ||
119 | void vexpress_restart(char str, const char *cmd); | ||
120 | |||
121 | /* Clocks */ | 118 | /* Clocks */ |
122 | 119 | ||
123 | struct clk *vexpress_osc_setup(struct device *dev); | 120 | struct clk *vexpress_osc_setup(struct device *dev); |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6071e911c7f4..7d5773a99f20 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -3,7 +3,9 @@ | |||
3 | 3 | ||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/list.h> | ||
6 | #include <asm/page.h> /* pgprot_t */ | 7 | #include <asm/page.h> /* pgprot_t */ |
8 | #include <linux/rbtree.h> | ||
7 | 9 | ||
8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 10 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
9 | 11 | ||
@@ -35,6 +37,17 @@ struct vm_struct { | |||
35 | const void *caller; | 37 | const void *caller; |
36 | }; | 38 | }; |
37 | 39 | ||
40 | struct vmap_area { | ||
41 | unsigned long va_start; | ||
42 | unsigned long va_end; | ||
43 | unsigned long flags; | ||
44 | struct rb_node rb_node; /* address sorted rbtree */ | ||
45 | struct list_head list; /* address sorted list */ | ||
46 | struct list_head purge_list; /* "lazy purge" list */ | ||
47 | struct vm_struct *vm; | ||
48 | struct rcu_head rcu_head; | ||
49 | }; | ||
50 | |||
38 | /* | 51 | /* |
39 | * Highlevel APIs for driver use | 52 | * Highlevel APIs for driver use |
40 | */ | 53 | */ |
@@ -130,8 +143,7 @@ extern long vwrite(char *buf, char *addr, unsigned long count); | |||
130 | /* | 143 | /* |
131 | * Internals. Dont't use.. | 144 | * Internals. Dont't use.. |
132 | */ | 145 | */ |
133 | extern rwlock_t vmlist_lock; | 146 | extern struct list_head vmap_area_list; |
134 | extern struct vm_struct *vmlist; | ||
135 | extern __init void vm_area_add_early(struct vm_struct *vm); | 147 | extern __init void vm_area_add_early(struct vm_struct *vm); |
136 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | 148 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
137 | 149 | ||
@@ -158,4 +170,22 @@ pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms) | |||
158 | # endif | 170 | # endif |
159 | #endif | 171 | #endif |
160 | 172 | ||
173 | struct vmalloc_info { | ||
174 | unsigned long used; | ||
175 | unsigned long largest_chunk; | ||
176 | }; | ||
177 | |||
178 | #ifdef CONFIG_MMU | ||
179 | #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) | ||
180 | extern void get_vmalloc_info(struct vmalloc_info *vmi); | ||
181 | #else | ||
182 | |||
183 | #define VMALLOC_TOTAL 0UL | ||
184 | #define get_vmalloc_info(vmi) \ | ||
185 | do { \ | ||
186 | (vmi)->used = 0; \ | ||
187 | (vmi)->largest_chunk = 0; \ | ||
188 | } while (0) | ||
189 | #endif | ||
190 | |||
161 | #endif /* _LINUX_VMALLOC_H */ | 191 | #endif /* _LINUX_VMALLOC_H */ |
diff --git a/include/linux/vmpressure.h b/include/linux/vmpressure.h new file mode 100644 index 000000000000..76be077340ea --- /dev/null +++ b/include/linux/vmpressure.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef __LINUX_VMPRESSURE_H | ||
2 | #define __LINUX_VMPRESSURE_H | ||
3 | |||
4 | #include <linux/mutex.h> | ||
5 | #include <linux/list.h> | ||
6 | #include <linux/workqueue.h> | ||
7 | #include <linux/gfp.h> | ||
8 | #include <linux/types.h> | ||
9 | #include <linux/cgroup.h> | ||
10 | |||
11 | struct vmpressure { | ||
12 | unsigned long scanned; | ||
13 | unsigned long reclaimed; | ||
14 | /* The lock is used to keep the scanned/reclaimed above in sync. */ | ||
15 | struct mutex sr_lock; | ||
16 | |||
17 | /* The list of vmpressure_event structs. */ | ||
18 | struct list_head events; | ||
19 | /* Have to grab the lock on events traversal or modifications. */ | ||
20 | struct mutex events_lock; | ||
21 | |||
22 | struct work_struct work; | ||
23 | }; | ||
24 | |||
25 | struct mem_cgroup; | ||
26 | |||
27 | #ifdef CONFIG_MEMCG | ||
28 | extern void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, | ||
29 | unsigned long scanned, unsigned long reclaimed); | ||
30 | extern void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio); | ||
31 | |||
32 | extern void vmpressure_init(struct vmpressure *vmpr); | ||
33 | extern struct vmpressure *memcg_to_vmpressure(struct mem_cgroup *memcg); | ||
34 | extern struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr); | ||
35 | extern struct vmpressure *css_to_vmpressure(struct cgroup_subsys_state *css); | ||
36 | extern int vmpressure_register_event(struct cgroup *cg, struct cftype *cft, | ||
37 | struct eventfd_ctx *eventfd, | ||
38 | const char *args); | ||
39 | extern void vmpressure_unregister_event(struct cgroup *cg, struct cftype *cft, | ||
40 | struct eventfd_ctx *eventfd); | ||
41 | #else | ||
42 | static inline void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, | ||
43 | unsigned long scanned, unsigned long reclaimed) {} | ||
44 | static inline void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, | ||
45 | int prio) {} | ||
46 | #endif /* CONFIG_MEMCG */ | ||
47 | #endif /* __LINUX_VMPRESSURE_H */ | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5fd71a7d0dfd..c586679b6fef 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -48,13 +48,8 @@ static inline void count_vm_events(enum vm_event_item item, long delta) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | extern void all_vm_events(unsigned long *); | 50 | extern void all_vm_events(unsigned long *); |
51 | #ifdef CONFIG_HOTPLUG | 51 | |
52 | extern void vm_events_fold_cpu(int cpu); | 52 | extern void vm_events_fold_cpu(int cpu); |
53 | #else | ||
54 | static inline void vm_events_fold_cpu(int cpu) | ||
55 | { | ||
56 | } | ||
57 | #endif | ||
58 | 53 | ||
59 | #else | 54 | #else |
60 | 55 | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 8afab27cdbc2..623488fdc1f5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/lockdep.h> | 11 | #include <linux/lockdep.h> |
12 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
13 | #include <linux/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <linux/cpumask.h> | ||
14 | 15 | ||
15 | struct workqueue_struct; | 16 | struct workqueue_struct; |
16 | 17 | ||
@@ -68,7 +69,7 @@ enum { | |||
68 | WORK_STRUCT_COLOR_BITS, | 69 | WORK_STRUCT_COLOR_BITS, |
69 | 70 | ||
70 | /* data contains off-queue information when !WORK_STRUCT_PWQ */ | 71 | /* data contains off-queue information when !WORK_STRUCT_PWQ */ |
71 | WORK_OFFQ_FLAG_BASE = WORK_STRUCT_FLAG_BITS, | 72 | WORK_OFFQ_FLAG_BASE = WORK_STRUCT_COLOR_SHIFT, |
72 | 73 | ||
73 | WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), | 74 | WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), |
74 | 75 | ||
@@ -91,6 +92,9 @@ enum { | |||
91 | /* bit mask for work_busy() return values */ | 92 | /* bit mask for work_busy() return values */ |
92 | WORK_BUSY_PENDING = 1 << 0, | 93 | WORK_BUSY_PENDING = 1 << 0, |
93 | WORK_BUSY_RUNNING = 1 << 1, | 94 | WORK_BUSY_RUNNING = 1 << 1, |
95 | |||
96 | /* maximum string length for set_worker_desc() */ | ||
97 | WORKER_DESC_LEN = 24, | ||
94 | }; | 98 | }; |
95 | 99 | ||
96 | struct work_struct { | 100 | struct work_struct { |
@@ -115,6 +119,20 @@ struct delayed_work { | |||
115 | int cpu; | 119 | int cpu; |
116 | }; | 120 | }; |
117 | 121 | ||
122 | /* | ||
123 | * A struct for workqueue attributes. This can be used to change | ||
124 | * attributes of an unbound workqueue. | ||
125 | * | ||
126 | * Unlike other fields, ->no_numa isn't a property of a worker_pool. It | ||
127 | * only modifies how apply_workqueue_attrs() select pools and thus doesn't | ||
128 | * participate in pool hash calculations or equality comparisons. | ||
129 | */ | ||
130 | struct workqueue_attrs { | ||
131 | int nice; /* nice level */ | ||
132 | cpumask_var_t cpumask; /* allowed CPUs */ | ||
133 | bool no_numa; /* disable NUMA affinity */ | ||
134 | }; | ||
135 | |||
118 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) | 136 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) |
119 | { | 137 | { |
120 | return container_of(work, struct delayed_work, work); | 138 | return container_of(work, struct delayed_work, work); |
@@ -283,9 +301,10 @@ enum { | |||
283 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 301 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
284 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 302 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
285 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 303 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
304 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ | ||
286 | 305 | ||
287 | WQ_DRAINING = 1 << 6, /* internal: workqueue is draining */ | 306 | __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ |
288 | WQ_RESCUER = 1 << 7, /* internal: workqueue has rescuer */ | 307 | __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ |
289 | 308 | ||
290 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ | 309 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ |
291 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ | 310 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ |
@@ -388,7 +407,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
388 | * Pointer to the allocated workqueue on success, %NULL on failure. | 407 | * Pointer to the allocated workqueue on success, %NULL on failure. |
389 | */ | 408 | */ |
390 | #define alloc_ordered_workqueue(fmt, flags, args...) \ | 409 | #define alloc_ordered_workqueue(fmt, flags, args...) \ |
391 | alloc_workqueue(fmt, WQ_UNBOUND | (flags), 1, ##args) | 410 | alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) |
392 | 411 | ||
393 | #define create_workqueue(name) \ | 412 | #define create_workqueue(name) \ |
394 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 413 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) |
@@ -399,30 +418,23 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
399 | 418 | ||
400 | extern void destroy_workqueue(struct workqueue_struct *wq); | 419 | extern void destroy_workqueue(struct workqueue_struct *wq); |
401 | 420 | ||
421 | struct workqueue_attrs *alloc_workqueue_attrs(gfp_t gfp_mask); | ||
422 | void free_workqueue_attrs(struct workqueue_attrs *attrs); | ||
423 | int apply_workqueue_attrs(struct workqueue_struct *wq, | ||
424 | const struct workqueue_attrs *attrs); | ||
425 | |||
402 | extern bool queue_work_on(int cpu, struct workqueue_struct *wq, | 426 | extern bool queue_work_on(int cpu, struct workqueue_struct *wq, |
403 | struct work_struct *work); | 427 | struct work_struct *work); |
404 | extern bool queue_work(struct workqueue_struct *wq, struct work_struct *work); | ||
405 | extern bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 428 | extern bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
406 | struct delayed_work *work, unsigned long delay); | 429 | struct delayed_work *work, unsigned long delay); |
407 | extern bool queue_delayed_work(struct workqueue_struct *wq, | ||
408 | struct delayed_work *work, unsigned long delay); | ||
409 | extern bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq, | 430 | extern bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq, |
410 | struct delayed_work *dwork, unsigned long delay); | 431 | struct delayed_work *dwork, unsigned long delay); |
411 | extern bool mod_delayed_work(struct workqueue_struct *wq, | ||
412 | struct delayed_work *dwork, unsigned long delay); | ||
413 | 432 | ||
414 | extern void flush_workqueue(struct workqueue_struct *wq); | 433 | extern void flush_workqueue(struct workqueue_struct *wq); |
415 | extern void drain_workqueue(struct workqueue_struct *wq); | 434 | extern void drain_workqueue(struct workqueue_struct *wq); |
416 | extern void flush_scheduled_work(void); | 435 | extern void flush_scheduled_work(void); |
417 | 436 | ||
418 | extern bool schedule_work_on(int cpu, struct work_struct *work); | ||
419 | extern bool schedule_work(struct work_struct *work); | ||
420 | extern bool schedule_delayed_work_on(int cpu, struct delayed_work *work, | ||
421 | unsigned long delay); | ||
422 | extern bool schedule_delayed_work(struct delayed_work *work, | ||
423 | unsigned long delay); | ||
424 | extern int schedule_on_each_cpu(work_func_t func); | 437 | extern int schedule_on_each_cpu(work_func_t func); |
425 | extern int keventd_up(void); | ||
426 | 438 | ||
427 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 439 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
428 | 440 | ||
@@ -435,8 +447,122 @@ extern bool cancel_delayed_work_sync(struct delayed_work *dwork); | |||
435 | 447 | ||
436 | extern void workqueue_set_max_active(struct workqueue_struct *wq, | 448 | extern void workqueue_set_max_active(struct workqueue_struct *wq, |
437 | int max_active); | 449 | int max_active); |
438 | extern bool workqueue_congested(unsigned int cpu, struct workqueue_struct *wq); | 450 | extern bool current_is_workqueue_rescuer(void); |
451 | extern bool workqueue_congested(int cpu, struct workqueue_struct *wq); | ||
439 | extern unsigned int work_busy(struct work_struct *work); | 452 | extern unsigned int work_busy(struct work_struct *work); |
453 | extern __printf(1, 2) void set_worker_desc(const char *fmt, ...); | ||
454 | extern void print_worker_info(const char *log_lvl, struct task_struct *task); | ||
455 | |||
456 | /** | ||
457 | * queue_work - queue work on a workqueue | ||
458 | * @wq: workqueue to use | ||
459 | * @work: work to queue | ||
460 | * | ||
461 | * Returns %false if @work was already on a queue, %true otherwise. | ||
462 | * | ||
463 | * We queue the work to the CPU on which it was submitted, but if the CPU dies | ||
464 | * it can be processed by another CPU. | ||
465 | */ | ||
466 | static inline bool queue_work(struct workqueue_struct *wq, | ||
467 | struct work_struct *work) | ||
468 | { | ||
469 | return queue_work_on(WORK_CPU_UNBOUND, wq, work); | ||
470 | } | ||
471 | |||
472 | /** | ||
473 | * queue_delayed_work - queue work on a workqueue after delay | ||
474 | * @wq: workqueue to use | ||
475 | * @dwork: delayable work to queue | ||
476 | * @delay: number of jiffies to wait before queueing | ||
477 | * | ||
478 | * Equivalent to queue_delayed_work_on() but tries to use the local CPU. | ||
479 | */ | ||
480 | static inline bool queue_delayed_work(struct workqueue_struct *wq, | ||
481 | struct delayed_work *dwork, | ||
482 | unsigned long delay) | ||
483 | { | ||
484 | return queue_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); | ||
485 | } | ||
486 | |||
487 | /** | ||
488 | * mod_delayed_work - modify delay of or queue a delayed work | ||
489 | * @wq: workqueue to use | ||
490 | * @dwork: work to queue | ||
491 | * @delay: number of jiffies to wait before queueing | ||
492 | * | ||
493 | * mod_delayed_work_on() on local CPU. | ||
494 | */ | ||
495 | static inline bool mod_delayed_work(struct workqueue_struct *wq, | ||
496 | struct delayed_work *dwork, | ||
497 | unsigned long delay) | ||
498 | { | ||
499 | return mod_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); | ||
500 | } | ||
501 | |||
502 | /** | ||
503 | * schedule_work_on - put work task on a specific cpu | ||
504 | * @cpu: cpu to put the work task on | ||
505 | * @work: job to be done | ||
506 | * | ||
507 | * This puts a job on a specific cpu | ||
508 | */ | ||
509 | static inline bool schedule_work_on(int cpu, struct work_struct *work) | ||
510 | { | ||
511 | return queue_work_on(cpu, system_wq, work); | ||
512 | } | ||
513 | |||
514 | /** | ||
515 | * schedule_work - put work task in global workqueue | ||
516 | * @work: job to be done | ||
517 | * | ||
518 | * Returns %false if @work was already on the kernel-global workqueue and | ||
519 | * %true otherwise. | ||
520 | * | ||
521 | * This puts a job in the kernel-global workqueue if it was not already | ||
522 | * queued and leaves it in the same position on the kernel-global | ||
523 | * workqueue otherwise. | ||
524 | */ | ||
525 | static inline bool schedule_work(struct work_struct *work) | ||
526 | { | ||
527 | return queue_work(system_wq, work); | ||
528 | } | ||
529 | |||
530 | /** | ||
531 | * schedule_delayed_work_on - queue work in global workqueue on CPU after delay | ||
532 | * @cpu: cpu to use | ||
533 | * @dwork: job to be done | ||
534 | * @delay: number of jiffies to wait | ||
535 | * | ||
536 | * After waiting for a given time this puts a job in the kernel-global | ||
537 | * workqueue on the specified CPU. | ||
538 | */ | ||
539 | static inline bool schedule_delayed_work_on(int cpu, struct delayed_work *dwork, | ||
540 | unsigned long delay) | ||
541 | { | ||
542 | return queue_delayed_work_on(cpu, system_wq, dwork, delay); | ||
543 | } | ||
544 | |||
545 | /** | ||
546 | * schedule_delayed_work - put work task in global workqueue after delay | ||
547 | * @dwork: job to be done | ||
548 | * @delay: number of jiffies to wait or 0 for immediate execution | ||
549 | * | ||
550 | * After waiting for a given time this puts a job in the kernel-global | ||
551 | * workqueue. | ||
552 | */ | ||
553 | static inline bool schedule_delayed_work(struct delayed_work *dwork, | ||
554 | unsigned long delay) | ||
555 | { | ||
556 | return queue_delayed_work(system_wq, dwork, delay); | ||
557 | } | ||
558 | |||
559 | /** | ||
560 | * keventd_up - is workqueue initialized yet? | ||
561 | */ | ||
562 | static inline bool keventd_up(void) | ||
563 | { | ||
564 | return system_wq != NULL; | ||
565 | } | ||
440 | 566 | ||
441 | /* | 567 | /* |
442 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | 568 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, |
@@ -466,12 +592,12 @@ static inline bool __deprecated flush_delayed_work_sync(struct delayed_work *dwo | |||
466 | } | 592 | } |
467 | 593 | ||
468 | #ifndef CONFIG_SMP | 594 | #ifndef CONFIG_SMP |
469 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) | 595 | static inline long work_on_cpu(int cpu, long (*fn)(void *), void *arg) |
470 | { | 596 | { |
471 | return fn(arg); | 597 | return fn(arg); |
472 | } | 598 | } |
473 | #else | 599 | #else |
474 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); | 600 | long work_on_cpu(int cpu, long (*fn)(void *), void *arg); |
475 | #endif /* CONFIG_SMP */ | 601 | #endif /* CONFIG_SMP */ |
476 | 602 | ||
477 | #ifdef CONFIG_FREEZER | 603 | #ifdef CONFIG_FREEZER |
@@ -480,4 +606,11 @@ extern bool freeze_workqueues_busy(void); | |||
480 | extern void thaw_workqueues(void); | 606 | extern void thaw_workqueues(void); |
481 | #endif /* CONFIG_FREEZER */ | 607 | #endif /* CONFIG_FREEZER */ |
482 | 608 | ||
609 | #ifdef CONFIG_SYSFS | ||
610 | int workqueue_sysfs_register(struct workqueue_struct *wq); | ||
611 | #else /* CONFIG_SYSFS */ | ||
612 | static inline int workqueue_sysfs_register(struct workqueue_struct *wq) | ||
613 | { return 0; } | ||
614 | #endif /* CONFIG_SYSFS */ | ||
615 | |||
483 | #endif | 616 | #endif |
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index f74ee6f89711..5d5d3a30f04a 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -172,6 +172,7 @@ void rc_map_init(void); | |||
172 | #define RC_MAP_RC5_TV "rc-rc5-tv" | 172 | #define RC_MAP_RC5_TV "rc-rc5-tv" |
173 | #define RC_MAP_RC6_MCE "rc-rc6-mce" | 173 | #define RC_MAP_RC6_MCE "rc-rc6-mce" |
174 | #define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" | 174 | #define RC_MAP_REAL_AUDIO_220_32_KEYS "rc-real-audio-220-32-keys" |
175 | #define RC_MAP_REDDO "rc-reddo" | ||
175 | #define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly" | 176 | #define RC_MAP_SNAPSTREAM_FIREFLY "rc-snapstream-firefly" |
176 | #define RC_MAP_STREAMZAP "rc-streamzap" | 177 | #define RC_MAP_STREAMZAP "rc-streamzap" |
177 | #define RC_MAP_TBS_NEC "rc-tbs-nec" | 178 | #define RC_MAP_TBS_NEC "rc-tbs-nec" |
diff --git a/include/media/si476x.h b/include/media/si476x.h index beb6433d6958..e02e241e2d22 100644 --- a/include/media/si476x.h +++ b/include/media/si476x.h | |||
@@ -23,244 +23,7 @@ | |||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/videodev2.h> | 24 | #include <linux/videodev2.h> |
25 | 25 | ||
26 | struct si476x_device; | 26 | #include <linux/mfd/si476x-reports.h> |
27 | |||
28 | /* It is possible to select one of the four adresses using pins A0 | ||
29 | * and A1 on SI476x */ | ||
30 | #define SI476X_I2C_ADDR_1 0x60 | ||
31 | #define SI476X_I2C_ADDR_2 0x61 | ||
32 | #define SI476X_I2C_ADDR_3 0x62 | ||
33 | #define SI476X_I2C_ADDR_4 0x63 | ||
34 | |||
35 | enum si476x_iqclk_config { | ||
36 | SI476X_IQCLK_NOOP = 0, | ||
37 | SI476X_IQCLK_TRISTATE = 1, | ||
38 | SI476X_IQCLK_IQ = 21, | ||
39 | }; | ||
40 | enum si476x_iqfs_config { | ||
41 | SI476X_IQFS_NOOP = 0, | ||
42 | SI476X_IQFS_TRISTATE = 1, | ||
43 | SI476X_IQFS_IQ = 21, | ||
44 | }; | ||
45 | enum si476x_iout_config { | ||
46 | SI476X_IOUT_NOOP = 0, | ||
47 | SI476X_IOUT_TRISTATE = 1, | ||
48 | SI476X_IOUT_OUTPUT = 22, | ||
49 | }; | ||
50 | enum si476x_qout_config { | ||
51 | SI476X_QOUT_NOOP = 0, | ||
52 | SI476X_QOUT_TRISTATE = 1, | ||
53 | SI476X_QOUT_OUTPUT = 22, | ||
54 | }; | ||
55 | |||
56 | enum si476x_dclk_config { | ||
57 | SI476X_DCLK_NOOP = 0, | ||
58 | SI476X_DCLK_TRISTATE = 1, | ||
59 | SI476X_DCLK_DAUDIO = 10, | ||
60 | }; | ||
61 | |||
62 | enum si476x_dfs_config { | ||
63 | SI476X_DFS_NOOP = 0, | ||
64 | SI476X_DFS_TRISTATE = 1, | ||
65 | SI476X_DFS_DAUDIO = 10, | ||
66 | }; | ||
67 | |||
68 | enum si476x_dout_config { | ||
69 | SI476X_DOUT_NOOP = 0, | ||
70 | SI476X_DOUT_TRISTATE = 1, | ||
71 | SI476X_DOUT_I2S_OUTPUT = 12, | ||
72 | SI476X_DOUT_I2S_INPUT = 13, | ||
73 | }; | ||
74 | |||
75 | enum si476x_xout_config { | ||
76 | SI476X_XOUT_NOOP = 0, | ||
77 | SI476X_XOUT_TRISTATE = 1, | ||
78 | SI476X_XOUT_I2S_INPUT = 13, | ||
79 | SI476X_XOUT_MODE_SELECT = 23, | ||
80 | }; | ||
81 | |||
82 | |||
83 | enum si476x_icin_config { | ||
84 | SI476X_ICIN_NOOP = 0, | ||
85 | SI476X_ICIN_TRISTATE = 1, | ||
86 | SI476X_ICIN_GPO1_HIGH = 2, | ||
87 | SI476X_ICIN_GPO1_LOW = 3, | ||
88 | SI476X_ICIN_IC_LINK = 30, | ||
89 | }; | ||
90 | |||
91 | enum si476x_icip_config { | ||
92 | SI476X_ICIP_NOOP = 0, | ||
93 | SI476X_ICIP_TRISTATE = 1, | ||
94 | SI476X_ICIP_GPO2_HIGH = 2, | ||
95 | SI476X_ICIP_GPO2_LOW = 3, | ||
96 | SI476X_ICIP_IC_LINK = 30, | ||
97 | }; | ||
98 | |||
99 | enum si476x_icon_config { | ||
100 | SI476X_ICON_NOOP = 0, | ||
101 | SI476X_ICON_TRISTATE = 1, | ||
102 | SI476X_ICON_I2S = 10, | ||
103 | SI476X_ICON_IC_LINK = 30, | ||
104 | }; | ||
105 | |||
106 | enum si476x_icop_config { | ||
107 | SI476X_ICOP_NOOP = 0, | ||
108 | SI476X_ICOP_TRISTATE = 1, | ||
109 | SI476X_ICOP_I2S = 10, | ||
110 | SI476X_ICOP_IC_LINK = 30, | ||
111 | }; | ||
112 | |||
113 | |||
114 | enum si476x_lrout_config { | ||
115 | SI476X_LROUT_NOOP = 0, | ||
116 | SI476X_LROUT_TRISTATE = 1, | ||
117 | SI476X_LROUT_AUDIO = 2, | ||
118 | SI476X_LROUT_MPX = 3, | ||
119 | }; | ||
120 | |||
121 | |||
122 | enum si476x_intb_config { | ||
123 | SI476X_INTB_NOOP = 0, | ||
124 | SI476X_INTB_TRISTATE = 1, | ||
125 | SI476X_INTB_DAUDIO = 10, | ||
126 | SI476X_INTB_IRQ = 40, | ||
127 | }; | ||
128 | |||
129 | enum si476x_a1_config { | ||
130 | SI476X_A1_NOOP = 0, | ||
131 | SI476X_A1_TRISTATE = 1, | ||
132 | SI476X_A1_IRQ = 40, | ||
133 | }; | ||
134 | |||
135 | enum si476x_part_revisions { | ||
136 | SI476X_REVISION_A10 = 0, | ||
137 | SI476X_REVISION_A20 = 1, | ||
138 | SI476X_REVISION_A30 = 2, | ||
139 | }; | ||
140 | |||
141 | struct si476x_pinmux { | ||
142 | enum si476x_dclk_config dclk; | ||
143 | enum si476x_dfs_config dfs; | ||
144 | enum si476x_dout_config dout; | ||
145 | enum si476x_xout_config xout; | ||
146 | |||
147 | enum si476x_iqclk_config iqclk; | ||
148 | enum si476x_iqfs_config iqfs; | ||
149 | enum si476x_iout_config iout; | ||
150 | enum si476x_qout_config qout; | ||
151 | |||
152 | enum si476x_icin_config icin; | ||
153 | enum si476x_icip_config icip; | ||
154 | enum si476x_icon_config icon; | ||
155 | enum si476x_icop_config icop; | ||
156 | |||
157 | enum si476x_lrout_config lrout; | ||
158 | |||
159 | enum si476x_intb_config intb; | ||
160 | enum si476x_a1_config a1; | ||
161 | }; | ||
162 | |||
163 | /** | ||
164 | * enum si476x_phase_diversity_mode - possbile phase diversity modes | ||
165 | * for SI4764/5/6/7 chips. | ||
166 | * | ||
167 | * @SI476X_PHDIV_DISABLED: Phase diversity feature is | ||
168 | * disabled. | ||
169 | * @SI476X_PHDIV_PRIMARY_COMBINING: Tuner works as a primary tuner | ||
170 | * in combination with a | ||
171 | * secondary one. | ||
172 | * @SI476X_PHDIV_PRIMARY_ANTENNA: Tuner works as a primary tuner | ||
173 | * using only its own antenna. | ||
174 | * @SI476X_PHDIV_SECONDARY_ANTENNA: Tuner works as a primary tuner | ||
175 | * usning seconary tuner's antenna. | ||
176 | * @SI476X_PHDIV_SECONDARY_COMBINING: Tuner works as a secondary | ||
177 | * tuner in combination with the | ||
178 | * primary one. | ||
179 | */ | ||
180 | enum si476x_phase_diversity_mode { | ||
181 | SI476X_PHDIV_DISABLED = 0, | ||
182 | SI476X_PHDIV_PRIMARY_COMBINING = 1, | ||
183 | SI476X_PHDIV_PRIMARY_ANTENNA = 2, | ||
184 | SI476X_PHDIV_SECONDARY_ANTENNA = 3, | ||
185 | SI476X_PHDIV_SECONDARY_COMBINING = 5, | ||
186 | }; | ||
187 | |||
188 | enum si476x_ibias6x { | ||
189 | SI476X_IBIAS6X_OTHER = 0, | ||
190 | SI476X_IBIAS6X_RCVR1_NON_4MHZ_CLK = 1, | ||
191 | }; | ||
192 | |||
193 | enum si476x_xstart { | ||
194 | SI476X_XSTART_MULTIPLE_TUNER = 0x11, | ||
195 | SI476X_XSTART_NORMAL = 0x77, | ||
196 | }; | ||
197 | |||
198 | enum si476x_freq { | ||
199 | SI476X_FREQ_4_MHZ = 0, | ||
200 | SI476X_FREQ_37P209375_MHZ = 1, | ||
201 | SI476X_FREQ_36P4_MHZ = 2, | ||
202 | SI476X_FREQ_37P8_MHZ = 3, | ||
203 | }; | ||
204 | |||
205 | enum si476x_xmode { | ||
206 | SI476X_XMODE_CRYSTAL_RCVR1 = 1, | ||
207 | SI476X_XMODE_EXT_CLOCK = 2, | ||
208 | SI476X_XMODE_CRYSTAL_RCVR2_3 = 3, | ||
209 | }; | ||
210 | |||
211 | enum si476x_xbiashc { | ||
212 | SI476X_XBIASHC_SINGLE_RECEIVER = 0, | ||
213 | SI476X_XBIASHC_MULTIPLE_RECEIVER = 1, | ||
214 | }; | ||
215 | |||
216 | enum si476x_xbias { | ||
217 | SI476X_XBIAS_RCVR2_3 = 0, | ||
218 | SI476X_XBIAS_4MHZ_RCVR1 = 3, | ||
219 | SI476X_XBIAS_RCVR1 = 7, | ||
220 | }; | ||
221 | |||
222 | enum si476x_func { | ||
223 | SI476X_FUNC_BOOTLOADER = 0, | ||
224 | SI476X_FUNC_FM_RECEIVER = 1, | ||
225 | SI476X_FUNC_AM_RECEIVER = 2, | ||
226 | SI476X_FUNC_WB_RECEIVER = 3, | ||
227 | }; | ||
228 | |||
229 | |||
230 | /** | ||
231 | * @xcload: Selects the amount of additional on-chip capacitance to | ||
232 | * be connected between XTAL1 and gnd and between XTAL2 and | ||
233 | * GND. One half of the capacitance value shown here is the | ||
234 | * additional load capacitance presented to the xtal. The | ||
235 | * minimum step size is 0.277 pF. Recommended value is 0x28 | ||
236 | * but it will be layout dependent. Range is 0–0x3F i.e. | ||
237 | * (0–16.33 pF) | ||
238 | * @ctsien: enable CTSINT(interrupt request when CTS condition | ||
239 | * arises) when set | ||
240 | * @intsel: when set A1 pin becomes the interrupt pin; otherwise, | ||
241 | * INTB is the interrupt pin | ||
242 | * @func: selects the boot function of the device. I.e. | ||
243 | * SI476X_BOOTLOADER - Boot loader | ||
244 | * SI476X_FM_RECEIVER - FM receiver | ||
245 | * SI476X_AM_RECEIVER - AM receiver | ||
246 | * SI476X_WB_RECEIVER - Weatherband receiver | ||
247 | * @freq: oscillator's crystal frequency: | ||
248 | * SI476X_XTAL_37P209375_MHZ - 37.209375 Mhz | ||
249 | * SI476X_XTAL_36P4_MHZ - 36.4 Mhz | ||
250 | * SI476X_XTAL_37P8_MHZ - 37.8 Mhz | ||
251 | */ | ||
252 | struct si476x_power_up_args { | ||
253 | enum si476x_ibias6x ibias6x; | ||
254 | enum si476x_xstart xstart; | ||
255 | u8 xcload; | ||
256 | bool fastboot; | ||
257 | enum si476x_xbiashc xbiashc; | ||
258 | enum si476x_xbias xbias; | ||
259 | enum si476x_func func; | ||
260 | enum si476x_freq freq; | ||
261 | enum si476x_xmode xmode; | ||
262 | }; | ||
263 | |||
264 | 27 | ||
265 | enum si476x_ctrl_id { | 28 | enum si476x_ctrl_id { |
266 | V4L2_CID_SI476X_RSSI_THRESHOLD = (V4L2_CID_USER_SI476X_BASE + 1), | 29 | V4L2_CID_SI476X_RSSI_THRESHOLD = (V4L2_CID_USER_SI476X_BASE + 1), |
@@ -271,156 +34,4 @@ enum si476x_ctrl_id { | |||
271 | V4L2_CID_SI476X_INTERCHIP_LINK = (V4L2_CID_USER_SI476X_BASE + 6), | 34 | V4L2_CID_SI476X_INTERCHIP_LINK = (V4L2_CID_USER_SI476X_BASE + 6), |
272 | }; | 35 | }; |
273 | 36 | ||
274 | /* | ||
275 | * Platform dependent definition | ||
276 | */ | ||
277 | struct si476x_platform_data { | ||
278 | int gpio_reset; /* < 0 if not used */ | ||
279 | |||
280 | struct si476x_power_up_args power_up_parameters; | ||
281 | enum si476x_phase_diversity_mode diversity_mode; | ||
282 | |||
283 | struct si476x_pinmux pinmux; | ||
284 | }; | ||
285 | |||
286 | /** | ||
287 | * struct si476x_rsq_status - structure containing received signal | ||
288 | * quality | ||
289 | * @multhint: Multipath Detect High. | ||
290 | * true - Indicatedes that the value is below | ||
291 | * FM_RSQ_MULTIPATH_HIGH_THRESHOLD | ||
292 | * false - Indicatedes that the value is above | ||
293 | * FM_RSQ_MULTIPATH_HIGH_THRESHOLD | ||
294 | * @multlint: Multipath Detect Low. | ||
295 | * true - Indicatedes that the value is below | ||
296 | * FM_RSQ_MULTIPATH_LOW_THRESHOLD | ||
297 | * false - Indicatedes that the value is above | ||
298 | * FM_RSQ_MULTIPATH_LOW_THRESHOLD | ||
299 | * @snrhint: SNR Detect High. | ||
300 | * true - Indicatedes that the value is below | ||
301 | * FM_RSQ_SNR_HIGH_THRESHOLD | ||
302 | * false - Indicatedes that the value is above | ||
303 | * FM_RSQ_SNR_HIGH_THRESHOLD | ||
304 | * @snrlint: SNR Detect Low. | ||
305 | * true - Indicatedes that the value is below | ||
306 | * FM_RSQ_SNR_LOW_THRESHOLD | ||
307 | * false - Indicatedes that the value is above | ||
308 | * FM_RSQ_SNR_LOW_THRESHOLD | ||
309 | * @rssihint: RSSI Detect High. | ||
310 | * true - Indicatedes that the value is below | ||
311 | * FM_RSQ_RSSI_HIGH_THRESHOLD | ||
312 | * false - Indicatedes that the value is above | ||
313 | * FM_RSQ_RSSI_HIGH_THRESHOLD | ||
314 | * @rssilint: RSSI Detect Low. | ||
315 | * true - Indicatedes that the value is below | ||
316 | * FM_RSQ_RSSI_LOW_THRESHOLD | ||
317 | * false - Indicatedes that the value is above | ||
318 | * FM_RSQ_RSSI_LOW_THRESHOLD | ||
319 | * @bltf: Band Limit. | ||
320 | * Set if seek command hits the band limit or wrapped to | ||
321 | * the original frequency. | ||
322 | * @snr_ready: SNR measurement in progress. | ||
323 | * @rssiready: RSSI measurement in progress. | ||
324 | * @afcrl: Set if FREQOFF >= MAX_TUNE_ERROR | ||
325 | * @valid: Set if the channel is valid | ||
326 | * rssi < FM_VALID_RSSI_THRESHOLD | ||
327 | * snr < FM_VALID_SNR_THRESHOLD | ||
328 | * tune_error < FM_VALID_MAX_TUNE_ERROR | ||
329 | * @readfreq: Current tuned frequency. | ||
330 | * @freqoff: Signed frequency offset. | ||
331 | * @rssi: Received Signal Strength Indicator(dBuV). | ||
332 | * @snr: RF SNR Indicator(dB). | ||
333 | * @lassi: | ||
334 | * @hassi: Low/High side Adjacent(100 kHz) Channel Strength Indicator | ||
335 | * @mult: Multipath indicator | ||
336 | * @dev: Who knows? But values may vary. | ||
337 | * @readantcap: Antenna tuning capacity value. | ||
338 | * @assi: Adjacent Channel(+/- 200kHz) Strength Indicator | ||
339 | * @usn: Ultrasonic Noise Inticator in -DBFS | ||
340 | */ | ||
341 | struct si476x_rsq_status_report { | ||
342 | __u8 multhint, multlint; | ||
343 | __u8 snrhint, snrlint; | ||
344 | __u8 rssihint, rssilint; | ||
345 | __u8 bltf; | ||
346 | __u8 snr_ready; | ||
347 | __u8 rssiready; | ||
348 | __u8 injside; | ||
349 | __u8 afcrl; | ||
350 | __u8 valid; | ||
351 | |||
352 | __u16 readfreq; | ||
353 | __s8 freqoff; | ||
354 | __s8 rssi; | ||
355 | __s8 snr; | ||
356 | __s8 issi; | ||
357 | __s8 lassi, hassi; | ||
358 | __s8 mult; | ||
359 | __u8 dev; | ||
360 | __u16 readantcap; | ||
361 | __s8 assi; | ||
362 | __s8 usn; | ||
363 | |||
364 | __u8 pilotdev; | ||
365 | __u8 rdsdev; | ||
366 | __u8 assidev; | ||
367 | __u8 strongdev; | ||
368 | __u16 rdspi; | ||
369 | } __packed; | ||
370 | |||
371 | /** | ||
372 | * si476x_acf_status_report - ACF report results | ||
373 | * | ||
374 | * @blend_int: If set, indicates that stereo separation has crossed | ||
375 | * below the blend threshold as set by FM_ACF_BLEND_THRESHOLD | ||
376 | * @hblend_int: If set, indicates that HiBlend cutoff frequency is | ||
377 | * lower than threshold as set by FM_ACF_HBLEND_THRESHOLD | ||
378 | * @hicut_int: If set, indicates that HiCut cutoff frequency is lower | ||
379 | * than the threshold set by ACF_ | ||
380 | |||
381 | */ | ||
382 | struct si476x_acf_status_report { | ||
383 | __u8 blend_int; | ||
384 | __u8 hblend_int; | ||
385 | __u8 hicut_int; | ||
386 | __u8 chbw_int; | ||
387 | __u8 softmute_int; | ||
388 | __u8 smute; | ||
389 | __u8 smattn; | ||
390 | __u8 chbw; | ||
391 | __u8 hicut; | ||
392 | __u8 hiblend; | ||
393 | __u8 pilot; | ||
394 | __u8 stblend; | ||
395 | } __packed; | ||
396 | |||
397 | enum si476x_fmagc { | ||
398 | SI476X_FMAGC_10K_OHM = 0, | ||
399 | SI476X_FMAGC_800_OHM = 1, | ||
400 | SI476X_FMAGC_400_OHM = 2, | ||
401 | SI476X_FMAGC_200_OHM = 4, | ||
402 | SI476X_FMAGC_100_OHM = 8, | ||
403 | SI476X_FMAGC_50_OHM = 16, | ||
404 | SI476X_FMAGC_25_OHM = 32, | ||
405 | SI476X_FMAGC_12P5_OHM = 64, | ||
406 | SI476X_FMAGC_6P25_OHM = 128, | ||
407 | }; | ||
408 | |||
409 | struct si476x_agc_status_report { | ||
410 | __u8 mxhi; | ||
411 | __u8 mxlo; | ||
412 | __u8 lnahi; | ||
413 | __u8 lnalo; | ||
414 | __u8 fmagc1; | ||
415 | __u8 fmagc2; | ||
416 | __u8 pgagain; | ||
417 | __u8 fmwblang; | ||
418 | } __packed; | ||
419 | |||
420 | struct si476x_rds_blockcount_report { | ||
421 | __u16 expected; | ||
422 | __u16 received; | ||
423 | __u16 uncorrectable; | ||
424 | } __packed; | ||
425 | |||
426 | #endif /* SI476X_H*/ | 37 | #endif /* SI476X_H*/ |
diff --git a/include/media/videobuf-dma-contig.h b/include/media/videobuf-dma-contig.h index f473aeb86d3f..f0ed82543d9f 100644 --- a/include/media/videobuf-dma-contig.h +++ b/include/media/videobuf-dma-contig.h | |||
@@ -26,16 +26,6 @@ void videobuf_queue_dma_contig_init(struct videobuf_queue *q, | |||
26 | void *priv, | 26 | void *priv, |
27 | struct mutex *ext_lock); | 27 | struct mutex *ext_lock); |
28 | 28 | ||
29 | void videobuf_queue_dma_contig_init_cached(struct videobuf_queue *q, | ||
30 | const struct videobuf_queue_ops *ops, | ||
31 | struct device *dev, | ||
32 | spinlock_t *irqlock, | ||
33 | enum v4l2_buf_type type, | ||
34 | enum v4l2_field field, | ||
35 | unsigned int msize, | ||
36 | void *priv, | ||
37 | struct mutex *ext_lock); | ||
38 | |||
39 | dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf); | 29 | dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf); |
40 | void videobuf_dma_contig_free(struct videobuf_queue *q, | 30 | void videobuf_dma_contig_free(struct videobuf_queue *q, |
41 | struct videobuf_buffer *buf); | 31 | struct videobuf_buffer *buf); |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 40be2a0d8ae1..84a6440f1f19 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -199,6 +199,7 @@ extern bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev, | |||
199 | /* Device notifier */ | 199 | /* Device notifier */ |
200 | extern int register_inet6addr_notifier(struct notifier_block *nb); | 200 | extern int register_inet6addr_notifier(struct notifier_block *nb); |
201 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); | 201 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); |
202 | extern int inet6addr_notifier_call_chain(unsigned long val, void *v); | ||
202 | 203 | ||
203 | extern void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, | 204 | extern void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, |
204 | struct ipv6_devconf *devconf); | 205 | struct ipv6_devconf *devconf); |
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h index f74109144d3f..f132924cc9da 100644 --- a/include/net/irda/irlmp.h +++ b/include/net/irda/irlmp.h | |||
@@ -256,7 +256,8 @@ static inline __u32 irlmp_get_daddr(const struct lsap_cb *self) | |||
256 | return (self && self->lap) ? self->lap->daddr : 0; | 256 | return (self && self->lap) ? self->lap->daddr : 0; |
257 | } | 257 | } |
258 | 258 | ||
259 | extern const char *irlmp_reasons[]; | 259 | const char *irlmp_reason_str(LM_REASON reason); |
260 | |||
260 | extern int sysctl_discovery_timeout; | 261 | extern int sysctl_discovery_timeout; |
261 | extern int sysctl_discovery_slots; | 262 | extern int sysctl_discovery_slots; |
262 | extern int sysctl_discovery; | 263 | extern int sysctl_discovery; |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index cc7c19732389..714cc9a54a4c 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
@@ -130,6 +130,14 @@ struct iucv_sock { | |||
130 | enum iucv_tx_notify n); | 130 | enum iucv_tx_notify n); |
131 | }; | 131 | }; |
132 | 132 | ||
133 | struct iucv_skb_cb { | ||
134 | u32 class; /* target class of message */ | ||
135 | u32 tag; /* tag associated with message */ | ||
136 | u32 offset; /* offset for skb receival */ | ||
137 | }; | ||
138 | |||
139 | #define IUCV_SKB_CB(__skb) ((struct iucv_skb_cb *)&((__skb)->cb[0])) | ||
140 | |||
133 | /* iucv socket options (SOL_IUCV) */ | 141 | /* iucv socket options (SOL_IUCV) */ |
134 | #define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */ | 142 | #define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */ |
135 | #define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */ | 143 | #define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */ |
diff --git a/include/net/scm.h b/include/net/scm.h index 975cca01048b..b11708105681 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -56,8 +56,8 @@ static __inline__ void scm_set_cred(struct scm_cookie *scm, | |||
56 | scm->pid = get_pid(pid); | 56 | scm->pid = get_pid(pid); |
57 | scm->cred = cred ? get_cred(cred) : NULL; | 57 | scm->cred = cred ? get_cred(cred) : NULL; |
58 | scm->creds.pid = pid_vnr(pid); | 58 | scm->creds.pid = pid_vnr(pid); |
59 | scm->creds.uid = cred ? cred->euid : INVALID_UID; | 59 | scm->creds.uid = cred ? cred->uid : INVALID_UID; |
60 | scm->creds.gid = cred ? cred->egid : INVALID_GID; | 60 | scm->creds.gid = cred ? cred->gid : INVALID_GID; |
61 | } | 61 | } |
62 | 62 | ||
63 | static __inline__ void scm_destroy_cred(struct scm_cookie *scm) | 63 | static __inline__ void scm_destroy_cred(struct scm_cookie *scm) |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index df85a0c0f2d5..cd89510eab2a 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -576,7 +576,7 @@ for (pos = chunk->subh.fwdtsn_hdr->skip;\ | |||
576 | #define WORD_ROUND(s) (((s)+3)&~3) | 576 | #define WORD_ROUND(s) (((s)+3)&~3) |
577 | 577 | ||
578 | /* Make a new instance of type. */ | 578 | /* Make a new instance of type. */ |
579 | #define t_new(type, flags) (type *)kzalloc(sizeof(type), flags) | 579 | #define t_new(type, flags) kzalloc(sizeof(type), flags) |
580 | 580 | ||
581 | /* Compare two timevals. */ | 581 | /* Compare two timevals. */ |
582 | #define tv_lt(s, t) \ | 582 | #define tv_lt(s, t) \ |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 3bbbd78e1439..2d56e428506c 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -65,6 +65,18 @@ struct pcmcia_driver { | |||
65 | int pcmcia_register_driver(struct pcmcia_driver *driver); | 65 | int pcmcia_register_driver(struct pcmcia_driver *driver); |
66 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); | 66 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); |
67 | 67 | ||
68 | /** | ||
69 | * module_pcmcia_driver() - Helper macro for registering a pcmcia driver | ||
70 | * @__pcmcia_driver: pcmcia_driver struct | ||
71 | * | ||
72 | * Helper macro for pcmcia drivers which do not do anything special in module | ||
73 | * init/exit. This eliminates a lot of boilerplate. Each module may only use | ||
74 | * this macro once, and calling it replaces module_init() and module_exit(). | ||
75 | */ | ||
76 | #define module_pcmcia_driver(__pcmcia_driver) \ | ||
77 | module_driver(__pcmcia_driver, pcmcia_register_driver, \ | ||
78 | pcmcia_unregister_driver) | ||
79 | |||
68 | /* for struct resource * array embedded in struct pcmcia_device */ | 80 | /* for struct resource * array embedded in struct pcmcia_device */ |
69 | enum { | 81 | enum { |
70 | PCMCIA_IOPORT_0, | 82 | PCMCIA_IOPORT_0, |
diff --git a/include/scsi/Kbuild b/include/scsi/Kbuild deleted file mode 100644 index 562ff9d591b8..000000000000 --- a/include/scsi/Kbuild +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | header-y += fc/ | ||
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 917741bb8e11..fe7f06c86f68 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -63,6 +63,12 @@ enum iscsi_uevent_e { | |||
63 | ISCSI_UEVENT_PING = UEVENT_BASE + 22, | 63 | ISCSI_UEVENT_PING = UEVENT_BASE + 22, |
64 | ISCSI_UEVENT_GET_CHAP = UEVENT_BASE + 23, | 64 | ISCSI_UEVENT_GET_CHAP = UEVENT_BASE + 23, |
65 | ISCSI_UEVENT_DELETE_CHAP = UEVENT_BASE + 24, | 65 | ISCSI_UEVENT_DELETE_CHAP = UEVENT_BASE + 24, |
66 | ISCSI_UEVENT_SET_FLASHNODE_PARAMS = UEVENT_BASE + 25, | ||
67 | ISCSI_UEVENT_NEW_FLASHNODE = UEVENT_BASE + 26, | ||
68 | ISCSI_UEVENT_DEL_FLASHNODE = UEVENT_BASE + 27, | ||
69 | ISCSI_UEVENT_LOGIN_FLASHNODE = UEVENT_BASE + 28, | ||
70 | ISCSI_UEVENT_LOGOUT_FLASHNODE = UEVENT_BASE + 29, | ||
71 | ISCSI_UEVENT_LOGOUT_FLASHNODE_SID = UEVENT_BASE + 30, | ||
66 | 72 | ||
67 | /* up events */ | 73 | /* up events */ |
68 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, | 74 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, |
@@ -210,6 +216,31 @@ struct iscsi_uevent { | |||
210 | uint32_t host_no; | 216 | uint32_t host_no; |
211 | uint16_t chap_tbl_idx; | 217 | uint16_t chap_tbl_idx; |
212 | } delete_chap; | 218 | } delete_chap; |
219 | struct msg_set_flashnode_param { | ||
220 | uint32_t host_no; | ||
221 | uint32_t flashnode_idx; | ||
222 | uint32_t count; | ||
223 | } set_flashnode; | ||
224 | struct msg_new_flashnode { | ||
225 | uint32_t host_no; | ||
226 | uint32_t len; | ||
227 | } new_flashnode; | ||
228 | struct msg_del_flashnode { | ||
229 | uint32_t host_no; | ||
230 | uint32_t flashnode_idx; | ||
231 | } del_flashnode; | ||
232 | struct msg_login_flashnode { | ||
233 | uint32_t host_no; | ||
234 | uint32_t flashnode_idx; | ||
235 | } login_flashnode; | ||
236 | struct msg_logout_flashnode { | ||
237 | uint32_t host_no; | ||
238 | uint32_t flashnode_idx; | ||
239 | } logout_flashnode; | ||
240 | struct msg_logout_flashnode_sid { | ||
241 | uint32_t host_no; | ||
242 | uint32_t sid; | ||
243 | } logout_flashnode_sid; | ||
213 | } u; | 244 | } u; |
214 | union { | 245 | union { |
215 | /* messages k -> u */ | 246 | /* messages k -> u */ |
@@ -267,6 +298,9 @@ struct iscsi_uevent { | |||
267 | with each ping request */ | 298 | with each ping request */ |
268 | uint32_t data_size; | 299 | uint32_t data_size; |
269 | } ping_comp; | 300 | } ping_comp; |
301 | struct msg_new_flashnode_ret { | ||
302 | uint32_t flashnode_idx; | ||
303 | } new_flashnode_ret; | ||
270 | } r; | 304 | } r; |
271 | } __attribute__ ((aligned (sizeof(uint64_t)))); | 305 | } __attribute__ ((aligned (sizeof(uint64_t)))); |
272 | 306 | ||
@@ -274,6 +308,7 @@ enum iscsi_param_type { | |||
274 | ISCSI_PARAM, /* iscsi_param (session, conn, target, LU) */ | 308 | ISCSI_PARAM, /* iscsi_param (session, conn, target, LU) */ |
275 | ISCSI_HOST_PARAM, /* iscsi_host_param */ | 309 | ISCSI_HOST_PARAM, /* iscsi_host_param */ |
276 | ISCSI_NET_PARAM, /* iscsi_net_param */ | 310 | ISCSI_NET_PARAM, /* iscsi_net_param */ |
311 | ISCSI_FLASHNODE_PARAM, /* iscsi_flashnode_param */ | ||
277 | }; | 312 | }; |
278 | 313 | ||
279 | struct iscsi_iface_param_info { | 314 | struct iscsi_iface_param_info { |
@@ -469,6 +504,88 @@ enum iscsi_host_param { | |||
469 | ISCSI_HOST_PARAM_MAX, | 504 | ISCSI_HOST_PARAM_MAX, |
470 | }; | 505 | }; |
471 | 506 | ||
507 | /* portal type */ | ||
508 | #define PORTAL_TYPE_IPV4 "ipv4" | ||
509 | #define PORTAL_TYPE_IPV6 "ipv6" | ||
510 | |||
511 | /* iSCSI Flash Target params */ | ||
512 | enum iscsi_flashnode_param { | ||
513 | ISCSI_FLASHNODE_IS_FW_ASSIGNED_IPV6, | ||
514 | ISCSI_FLASHNODE_PORTAL_TYPE, | ||
515 | ISCSI_FLASHNODE_AUTO_SND_TGT_DISABLE, | ||
516 | ISCSI_FLASHNODE_DISCOVERY_SESS, | ||
517 | ISCSI_FLASHNODE_ENTRY_EN, | ||
518 | ISCSI_FLASHNODE_HDR_DGST_EN, | ||
519 | ISCSI_FLASHNODE_DATA_DGST_EN, | ||
520 | ISCSI_FLASHNODE_IMM_DATA_EN, | ||
521 | ISCSI_FLASHNODE_INITIAL_R2T_EN, | ||
522 | ISCSI_FLASHNODE_DATASEQ_INORDER, | ||
523 | ISCSI_FLASHNODE_PDU_INORDER, | ||
524 | ISCSI_FLASHNODE_CHAP_AUTH_EN, | ||
525 | ISCSI_FLASHNODE_SNACK_REQ_EN, | ||
526 | ISCSI_FLASHNODE_DISCOVERY_LOGOUT_EN, | ||
527 | ISCSI_FLASHNODE_BIDI_CHAP_EN, | ||
528 | /* make authentication for discovery sessions optional */ | ||
529 | ISCSI_FLASHNODE_DISCOVERY_AUTH_OPTIONAL, | ||
530 | ISCSI_FLASHNODE_ERL, | ||
531 | ISCSI_FLASHNODE_TCP_TIMESTAMP_STAT, | ||
532 | ISCSI_FLASHNODE_TCP_NAGLE_DISABLE, | ||
533 | ISCSI_FLASHNODE_TCP_WSF_DISABLE, | ||
534 | ISCSI_FLASHNODE_TCP_TIMER_SCALE, | ||
535 | ISCSI_FLASHNODE_TCP_TIMESTAMP_EN, | ||
536 | ISCSI_FLASHNODE_IP_FRAG_DISABLE, | ||
537 | ISCSI_FLASHNODE_MAX_RECV_DLENGTH, | ||
538 | ISCSI_FLASHNODE_MAX_XMIT_DLENGTH, | ||
539 | ISCSI_FLASHNODE_FIRST_BURST, | ||
540 | ISCSI_FLASHNODE_DEF_TIME2WAIT, | ||
541 | ISCSI_FLASHNODE_DEF_TIME2RETAIN, | ||
542 | ISCSI_FLASHNODE_MAX_R2T, | ||
543 | ISCSI_FLASHNODE_KEEPALIVE_TMO, | ||
544 | ISCSI_FLASHNODE_ISID, | ||
545 | ISCSI_FLASHNODE_TSID, | ||
546 | ISCSI_FLASHNODE_PORT, | ||
547 | ISCSI_FLASHNODE_MAX_BURST, | ||
548 | ISCSI_FLASHNODE_DEF_TASKMGMT_TMO, | ||
549 | ISCSI_FLASHNODE_IPADDR, | ||
550 | ISCSI_FLASHNODE_ALIAS, | ||
551 | ISCSI_FLASHNODE_REDIRECT_IPADDR, | ||
552 | ISCSI_FLASHNODE_MAX_SEGMENT_SIZE, | ||
553 | ISCSI_FLASHNODE_LOCAL_PORT, | ||
554 | ISCSI_FLASHNODE_IPV4_TOS, | ||
555 | ISCSI_FLASHNODE_IPV6_TC, | ||
556 | ISCSI_FLASHNODE_IPV6_FLOW_LABEL, | ||
557 | ISCSI_FLASHNODE_NAME, | ||
558 | ISCSI_FLASHNODE_TPGT, | ||
559 | ISCSI_FLASHNODE_LINK_LOCAL_IPV6, | ||
560 | ISCSI_FLASHNODE_DISCOVERY_PARENT_IDX, | ||
561 | ISCSI_FLASHNODE_DISCOVERY_PARENT_TYPE, | ||
562 | ISCSI_FLASHNODE_TCP_XMIT_WSF, | ||
563 | ISCSI_FLASHNODE_TCP_RECV_WSF, | ||
564 | ISCSI_FLASHNODE_CHAP_IN_IDX, | ||
565 | ISCSI_FLASHNODE_CHAP_OUT_IDX, | ||
566 | ISCSI_FLASHNODE_USERNAME, | ||
567 | ISCSI_FLASHNODE_USERNAME_IN, | ||
568 | ISCSI_FLASHNODE_PASSWORD, | ||
569 | ISCSI_FLASHNODE_PASSWORD_IN, | ||
570 | ISCSI_FLASHNODE_STATSN, | ||
571 | ISCSI_FLASHNODE_EXP_STATSN, | ||
572 | ISCSI_FLASHNODE_IS_BOOT_TGT, | ||
573 | |||
574 | ISCSI_FLASHNODE_MAX, | ||
575 | }; | ||
576 | |||
577 | struct iscsi_flashnode_param_info { | ||
578 | uint32_t len; /* Actual length of the param */ | ||
579 | uint16_t param; /* iscsi param value */ | ||
580 | uint8_t value[0]; /* length sized value follows */ | ||
581 | } __packed; | ||
582 | |||
583 | enum iscsi_discovery_parent_type { | ||
584 | ISCSI_DISC_PARENT_UNKNOWN = 0x1, | ||
585 | ISCSI_DISC_PARENT_SENDTGT = 0x2, | ||
586 | ISCSI_DISC_PARENT_ISNS = 0x3, | ||
587 | }; | ||
588 | |||
472 | /* iSCSI port Speed */ | 589 | /* iSCSI port Speed */ |
473 | enum iscsi_port_speed { | 590 | enum iscsi_port_speed { |
474 | ISCSI_PORT_SPEED_UNKNOWN = 0x1, | 591 | ISCSI_PORT_SPEED_UNKNOWN = 0x1, |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 399162b50a8d..e1379b4e8faf 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -1074,7 +1074,8 @@ void fc_rport_terminate_io(struct fc_rport *); | |||
1074 | /* | 1074 | /* |
1075 | * DISCOVERY LAYER | 1075 | * DISCOVERY LAYER |
1076 | *****************************/ | 1076 | *****************************/ |
1077 | int fc_disc_init(struct fc_lport *); | 1077 | void fc_disc_init(struct fc_lport *); |
1078 | void fc_disc_config(struct fc_lport *, void *); | ||
1078 | 1079 | ||
1079 | static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) | 1080 | static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) |
1080 | { | 1081 | { |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 6e33386a3898..09c041e6c35f 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -427,6 +427,7 @@ extern void iscsi_complete_scsi_task(struct iscsi_task *task, | |||
427 | */ | 427 | */ |
428 | extern void iscsi_pool_free(struct iscsi_pool *); | 428 | extern void iscsi_pool_free(struct iscsi_pool *); |
429 | extern int iscsi_pool_init(struct iscsi_pool *, int, void ***, int); | 429 | extern int iscsi_pool_init(struct iscsi_pool *, int, void ***, int); |
430 | extern int iscsi_switch_str_param(char **, char *); | ||
430 | 431 | ||
431 | /* | 432 | /* |
432 | * inline functions to deal with padding. | 433 | * inline functions to deal with padding. |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 53f0b361d668..4a58cca2ecc1 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -39,6 +39,8 @@ struct iscsi_task; | |||
39 | struct sockaddr; | 39 | struct sockaddr; |
40 | struct iscsi_iface; | 40 | struct iscsi_iface; |
41 | struct bsg_job; | 41 | struct bsg_job; |
42 | struct iscsi_bus_flash_session; | ||
43 | struct iscsi_bus_flash_conn; | ||
42 | 44 | ||
43 | /** | 45 | /** |
44 | * struct iscsi_transport - iSCSI Transport template | 46 | * struct iscsi_transport - iSCSI Transport template |
@@ -150,6 +152,19 @@ struct iscsi_transport { | |||
150 | int (*get_chap) (struct Scsi_Host *shost, uint16_t chap_tbl_idx, | 152 | int (*get_chap) (struct Scsi_Host *shost, uint16_t chap_tbl_idx, |
151 | uint32_t *num_entries, char *buf); | 153 | uint32_t *num_entries, char *buf); |
152 | int (*delete_chap) (struct Scsi_Host *shost, uint16_t chap_tbl_idx); | 154 | int (*delete_chap) (struct Scsi_Host *shost, uint16_t chap_tbl_idx); |
155 | int (*get_flashnode_param) (struct iscsi_bus_flash_session *fnode_sess, | ||
156 | int param, char *buf); | ||
157 | int (*set_flashnode_param) (struct iscsi_bus_flash_session *fnode_sess, | ||
158 | struct iscsi_bus_flash_conn *fnode_conn, | ||
159 | void *data, int len); | ||
160 | int (*new_flashnode) (struct Scsi_Host *shost, const char *buf, | ||
161 | int len); | ||
162 | int (*del_flashnode) (struct iscsi_bus_flash_session *fnode_sess); | ||
163 | int (*login_flashnode) (struct iscsi_bus_flash_session *fnode_sess, | ||
164 | struct iscsi_bus_flash_conn *fnode_conn); | ||
165 | int (*logout_flashnode) (struct iscsi_bus_flash_session *fnode_sess, | ||
166 | struct iscsi_bus_flash_conn *fnode_conn); | ||
167 | int (*logout_flashnode_sid) (struct iscsi_cls_session *cls_sess); | ||
153 | }; | 168 | }; |
154 | 169 | ||
155 | /* | 170 | /* |
@@ -286,6 +301,112 @@ struct iscsi_iface { | |||
286 | #define iscsi_iface_to_shost(_iface) \ | 301 | #define iscsi_iface_to_shost(_iface) \ |
287 | dev_to_shost(_iface->dev.parent) | 302 | dev_to_shost(_iface->dev.parent) |
288 | 303 | ||
304 | |||
305 | struct iscsi_bus_flash_conn { | ||
306 | struct list_head conn_list; /* item in connlist */ | ||
307 | void *dd_data; /* LLD private data */ | ||
308 | struct iscsi_transport *transport; | ||
309 | struct device dev; /* sysfs transport/container device */ | ||
310 | /* iscsi connection parameters */ | ||
311 | uint32_t exp_statsn; | ||
312 | uint32_t statsn; | ||
313 | unsigned max_recv_dlength; /* initiator_max_recv_dsl*/ | ||
314 | unsigned max_xmit_dlength; /* target_max_recv_dsl */ | ||
315 | unsigned max_segment_size; | ||
316 | unsigned tcp_xmit_wsf; | ||
317 | unsigned tcp_recv_wsf; | ||
318 | int hdrdgst_en; | ||
319 | int datadgst_en; | ||
320 | int port; | ||
321 | char *ipaddress; | ||
322 | char *link_local_ipv6_addr; | ||
323 | char *redirect_ipaddr; | ||
324 | uint16_t keepalive_timeout; | ||
325 | uint16_t local_port; | ||
326 | uint8_t snack_req_en; | ||
327 | /* tcp timestamp negotiation status */ | ||
328 | uint8_t tcp_timestamp_stat; | ||
329 | uint8_t tcp_nagle_disable; | ||
330 | /* tcp window scale factor */ | ||
331 | uint8_t tcp_wsf_disable; | ||
332 | uint8_t tcp_timer_scale; | ||
333 | uint8_t tcp_timestamp_en; | ||
334 | uint8_t ipv4_tos; | ||
335 | uint8_t ipv6_traffic_class; | ||
336 | uint8_t ipv6_flow_label; | ||
337 | uint8_t fragment_disable; | ||
338 | /* Link local IPv6 address is assigned by firmware or driver */ | ||
339 | uint8_t is_fw_assigned_ipv6; | ||
340 | }; | ||
341 | |||
342 | #define iscsi_dev_to_flash_conn(_dev) \ | ||
343 | container_of(_dev, struct iscsi_bus_flash_conn, dev) | ||
344 | |||
345 | #define iscsi_flash_conn_to_flash_session(_conn) \ | ||
346 | iscsi_dev_to_flash_session(_conn->dev.parent) | ||
347 | |||
348 | #define ISID_SIZE 6 | ||
349 | |||
350 | struct iscsi_bus_flash_session { | ||
351 | struct list_head sess_list; /* item in session_list */ | ||
352 | struct iscsi_transport *transport; | ||
353 | unsigned int target_id; | ||
354 | int flash_state; /* persistent or non-persistent */ | ||
355 | void *dd_data; /* LLD private data */ | ||
356 | struct device dev; /* sysfs transport/container device */ | ||
357 | /* iscsi session parameters */ | ||
358 | unsigned first_burst; | ||
359 | unsigned max_burst; | ||
360 | unsigned short max_r2t; | ||
361 | int default_taskmgmt_timeout; | ||
362 | int initial_r2t_en; | ||
363 | int imm_data_en; | ||
364 | int time2wait; | ||
365 | int time2retain; | ||
366 | int pdu_inorder_en; | ||
367 | int dataseq_inorder_en; | ||
368 | int erl; | ||
369 | int tpgt; | ||
370 | char *username; | ||
371 | char *username_in; | ||
372 | char *password; | ||
373 | char *password_in; | ||
374 | char *targetname; | ||
375 | char *targetalias; | ||
376 | char *portal_type; | ||
377 | uint16_t tsid; | ||
378 | uint16_t chap_in_idx; | ||
379 | uint16_t chap_out_idx; | ||
380 | /* index of iSCSI discovery session if the entry is | ||
381 | * discovered by iSCSI discovery session | ||
382 | */ | ||
383 | uint16_t discovery_parent_idx; | ||
384 | /* indicates if discovery was done through iSNS discovery service | ||
385 | * or through sendTarget */ | ||
386 | uint16_t discovery_parent_type; | ||
387 | /* Firmware auto sendtarget discovery disable */ | ||
388 | uint8_t auto_snd_tgt_disable; | ||
389 | uint8_t discovery_sess; | ||
390 | /* indicates if this flashnode entry is enabled or disabled */ | ||
391 | uint8_t entry_state; | ||
392 | uint8_t chap_auth_en; | ||
393 | /* enables firmware to auto logout the discovery session on discovery | ||
394 | * completion | ||
395 | */ | ||
396 | uint8_t discovery_logout_en; | ||
397 | uint8_t bidi_chap_en; | ||
398 | /* makes authentication for discovery session optional */ | ||
399 | uint8_t discovery_auth_optional; | ||
400 | uint8_t isid[ISID_SIZE]; | ||
401 | uint8_t is_boot_target; | ||
402 | }; | ||
403 | |||
404 | #define iscsi_dev_to_flash_session(_dev) \ | ||
405 | container_of(_dev, struct iscsi_bus_flash_session, dev) | ||
406 | |||
407 | #define iscsi_flash_session_to_shost(_session) \ | ||
408 | dev_to_shost(_session->dev.parent) | ||
409 | |||
289 | /* | 410 | /* |
290 | * session and connection functions that can be used by HW iSCSI LLDs | 411 | * session and connection functions that can be used by HW iSCSI LLDs |
291 | */ | 412 | */ |
@@ -330,4 +451,34 @@ extern char *iscsi_get_port_speed_name(struct Scsi_Host *shost); | |||
330 | extern char *iscsi_get_port_state_name(struct Scsi_Host *shost); | 451 | extern char *iscsi_get_port_state_name(struct Scsi_Host *shost); |
331 | extern int iscsi_is_session_dev(const struct device *dev); | 452 | extern int iscsi_is_session_dev(const struct device *dev); |
332 | 453 | ||
454 | extern char *iscsi_get_discovery_parent_name(int parent_type); | ||
455 | extern struct device * | ||
456 | iscsi_find_flashnode(struct Scsi_Host *shost, void *data, | ||
457 | int (*fn)(struct device *dev, void *data)); | ||
458 | |||
459 | extern struct iscsi_bus_flash_session * | ||
460 | iscsi_create_flashnode_sess(struct Scsi_Host *shost, int index, | ||
461 | struct iscsi_transport *transport, int dd_size); | ||
462 | |||
463 | extern struct iscsi_bus_flash_conn * | ||
464 | iscsi_create_flashnode_conn(struct Scsi_Host *shost, | ||
465 | struct iscsi_bus_flash_session *fnode_sess, | ||
466 | struct iscsi_transport *transport, int dd_size); | ||
467 | |||
468 | extern void | ||
469 | iscsi_destroy_flashnode_sess(struct iscsi_bus_flash_session *fnode_sess); | ||
470 | |||
471 | extern void iscsi_destroy_all_flashnode(struct Scsi_Host *shost); | ||
472 | extern int iscsi_flashnode_bus_match(struct device *dev, | ||
473 | struct device_driver *drv); | ||
474 | extern int iscsi_is_flashnode_conn_dev(struct device *dev, void *data); | ||
475 | |||
476 | extern struct device * | ||
477 | iscsi_find_flashnode_sess(struct Scsi_Host *shost, void *data, | ||
478 | int (*fn)(struct device *dev, void *data)); | ||
479 | |||
480 | extern struct device * | ||
481 | iscsi_find_flashnode_conn(struct iscsi_bus_flash_session *fnode_sess, | ||
482 | void *data, | ||
483 | int (*fn)(struct device *dev, void *data)); | ||
333 | #endif | 484 | #endif |
diff --git a/include/sound/max98090.h b/include/sound/max98090.h index 95efb13f8478..95efb13f8478 100755..100644 --- a/include/sound/max98090.h +++ b/include/sound/max98090.h | |||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 45c1981c9ca2..5ec42dbd2308 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -867,7 +867,7 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ | |||
867 | ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); | 867 | ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); |
868 | const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); | 868 | const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format); |
869 | int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); | 869 | int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames); |
870 | snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian); | 870 | snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsigned, int big_endian); |
871 | 871 | ||
872 | void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops); | 872 | void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops); |
873 | void snd_pcm_set_sync(struct snd_pcm_substream *substream); | 873 | void snd_pcm_set_sync(struct snd_pcm_substream *substream); |
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e1ef63d4a5c4..44a30b108683 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -488,6 +488,7 @@ struct snd_soc_dapm_path { | |||
488 | /* status */ | 488 | /* status */ |
489 | u32 connect:1; /* source and sink widgets are connected */ | 489 | u32 connect:1; /* source and sink widgets are connected */ |
490 | u32 walked:1; /* path has been walked */ | 490 | u32 walked:1; /* path has been walked */ |
491 | u32 walking:1; /* path is in the process of being walked */ | ||
491 | u32 weak:1; /* path ignored for power management */ | 492 | u32 weak:1; /* path ignored for power management */ |
492 | 493 | ||
493 | int (*connected)(struct snd_soc_dapm_widget *source, | 494 | int (*connected)(struct snd_soc_dapm_widget *source, |
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h new file mode 100644 index 000000000000..23a87d0cd72c --- /dev/null +++ b/include/target/iscsi/iscsi_transport.h | |||
@@ -0,0 +1,83 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include <linux/list.h> | ||
3 | #include "../../../drivers/target/iscsi/iscsi_target_core.h" | ||
4 | |||
5 | struct iscsit_transport { | ||
6 | #define ISCSIT_TRANSPORT_NAME 16 | ||
7 | char name[ISCSIT_TRANSPORT_NAME]; | ||
8 | int transport_type; | ||
9 | struct module *owner; | ||
10 | struct list_head t_node; | ||
11 | int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *); | ||
12 | int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *); | ||
13 | void (*iscsit_free_np)(struct iscsi_np *); | ||
14 | void (*iscsit_free_conn)(struct iscsi_conn *); | ||
15 | struct iscsi_cmd *(*iscsit_alloc_cmd)(struct iscsi_conn *, gfp_t); | ||
16 | int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *); | ||
17 | int (*iscsit_put_login_tx)(struct iscsi_conn *, struct iscsi_login *, u32); | ||
18 | int (*iscsit_immediate_queue)(struct iscsi_conn *, struct iscsi_cmd *, int); | ||
19 | int (*iscsit_response_queue)(struct iscsi_conn *, struct iscsi_cmd *, int); | ||
20 | int (*iscsit_get_dataout)(struct iscsi_conn *, struct iscsi_cmd *, bool); | ||
21 | int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); | ||
22 | int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); | ||
23 | }; | ||
24 | |||
25 | /* | ||
26 | * From iscsi_target_transport.c | ||
27 | */ | ||
28 | |||
29 | extern int iscsit_register_transport(struct iscsit_transport *); | ||
30 | extern void iscsit_unregister_transport(struct iscsit_transport *); | ||
31 | extern struct iscsit_transport *iscsit_get_transport(int); | ||
32 | extern void iscsit_put_transport(struct iscsit_transport *); | ||
33 | |||
34 | /* | ||
35 | * From iscsi_target.c | ||
36 | */ | ||
37 | extern int iscsit_add_reject_from_cmd(u8, int, int, unsigned char *, | ||
38 | struct iscsi_cmd *); | ||
39 | extern int iscsit_setup_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *, | ||
40 | unsigned char *); | ||
41 | extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *); | ||
42 | extern int iscsit_process_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *, | ||
43 | struct iscsi_scsi_req *); | ||
44 | extern int iscsit_check_dataout_hdr(struct iscsi_conn *, unsigned char *, | ||
45 | struct iscsi_cmd **); | ||
46 | extern int iscsit_check_dataout_payload(struct iscsi_cmd *, struct iscsi_data *, | ||
47 | bool); | ||
48 | extern int iscsit_handle_nop_out(struct iscsi_conn *, struct iscsi_cmd *, | ||
49 | unsigned char *); | ||
50 | extern int iscsit_handle_logout_cmd(struct iscsi_conn *, struct iscsi_cmd *, | ||
51 | unsigned char *); | ||
52 | extern int iscsit_handle_task_mgt_cmd(struct iscsi_conn *, struct iscsi_cmd *, | ||
53 | unsigned char *); | ||
54 | extern void iscsit_build_rsp_pdu(struct iscsi_cmd *, struct iscsi_conn *, | ||
55 | bool, struct iscsi_scsi_rsp *); | ||
56 | extern void iscsit_build_nopin_rsp(struct iscsi_cmd *, struct iscsi_conn *, | ||
57 | struct iscsi_nopin *, bool); | ||
58 | extern void iscsit_build_task_mgt_rsp(struct iscsi_cmd *, struct iscsi_conn *, | ||
59 | struct iscsi_tm_rsp *); | ||
60 | extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *, | ||
61 | struct iscsi_reject *); | ||
62 | extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *, | ||
63 | struct iscsi_logout_rsp *); | ||
64 | extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *); | ||
65 | /* | ||
66 | * From iscsi_target_device.c | ||
67 | */ | ||
68 | extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *); | ||
69 | /* | ||
70 | * From iscsi_target_erl1.c | ||
71 | */ | ||
72 | extern void iscsit_stop_dataout_timer(struct iscsi_cmd *); | ||
73 | |||
74 | /* | ||
75 | * From iscsi_target_tmr.c | ||
76 | */ | ||
77 | extern int iscsit_tmr_post_handler(struct iscsi_cmd *, struct iscsi_conn *); | ||
78 | |||
79 | /* | ||
80 | * From iscsi_target_util.c | ||
81 | */ | ||
82 | extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, gfp_t); | ||
83 | extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, __be32); | ||
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index b128c20770bc..ffa2696d64dc 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -60,6 +60,10 @@ sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops); | |||
60 | u32 sbc_get_device_rev(struct se_device *dev); | 60 | u32 sbc_get_device_rev(struct se_device *dev); |
61 | u32 sbc_get_device_type(struct se_device *dev); | 61 | u32 sbc_get_device_type(struct se_device *dev); |
62 | sector_t sbc_get_write_same_sectors(struct se_cmd *cmd); | 62 | sector_t sbc_get_write_same_sectors(struct se_cmd *cmd); |
63 | sense_reason_t sbc_execute_unmap(struct se_cmd *cmd, | ||
64 | sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, | ||
65 | sector_t lba, sector_t nolb), | ||
66 | void *priv); | ||
63 | 67 | ||
64 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); | 68 | void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); |
65 | int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); | 69 | int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); |
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index aaa1ee6ab391..ba3471b73c07 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
@@ -120,7 +120,7 @@ bool transport_wait_for_tasks(struct se_cmd *); | |||
120 | int transport_check_aborted_status(struct se_cmd *, int); | 120 | int transport_check_aborted_status(struct se_cmd *, int); |
121 | int transport_send_check_condition_and_sense(struct se_cmd *, | 121 | int transport_send_check_condition_and_sense(struct se_cmd *, |
122 | sense_reason_t, int); | 122 | sense_reason_t, int); |
123 | 123 | int target_get_sess_cmd(struct se_session *, struct se_cmd *, bool); | |
124 | int target_put_sess_cmd(struct se_session *, struct se_cmd *); | 124 | int target_put_sess_cmd(struct se_session *, struct se_cmd *); |
125 | void target_sess_cmd_list_set_waiting(struct se_session *); | 125 | void target_sess_cmd_list_set_waiting(struct se_session *); |
126 | void target_wait_for_sess_cmds(struct se_session *, int); | 126 | void target_wait_for_sess_cmds(struct se_session *, int); |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 9961726523d0..9c1467357b03 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -257,6 +257,7 @@ TRACE_EVENT(block_bio_bounce, | |||
257 | 257 | ||
258 | /** | 258 | /** |
259 | * block_bio_complete - completed all work on the block operation | 259 | * block_bio_complete - completed all work on the block operation |
260 | * @q: queue holding the block operation | ||
260 | * @bio: block operation completed | 261 | * @bio: block operation completed |
261 | * @error: io error value | 262 | * @error: io error value |
262 | * | 263 | * |
@@ -265,9 +266,9 @@ TRACE_EVENT(block_bio_bounce, | |||
265 | */ | 266 | */ |
266 | TRACE_EVENT(block_bio_complete, | 267 | TRACE_EVENT(block_bio_complete, |
267 | 268 | ||
268 | TP_PROTO(struct bio *bio, int error), | 269 | TP_PROTO(struct request_queue *q, struct bio *bio, int error), |
269 | 270 | ||
270 | TP_ARGS(bio, error), | 271 | TP_ARGS(q, bio, error), |
271 | 272 | ||
272 | TP_STRUCT__entry( | 273 | TP_STRUCT__entry( |
273 | __field( dev_t, dev ) | 274 | __field( dev_t, dev ) |
@@ -278,8 +279,7 @@ TRACE_EVENT(block_bio_complete, | |||
278 | ), | 279 | ), |
279 | 280 | ||
280 | TP_fast_assign( | 281 | TP_fast_assign( |
281 | __entry->dev = bio->bi_bdev ? | 282 | __entry->dev = bio->bi_bdev->bd_dev; |
282 | bio->bi_bdev->bd_dev : 0; | ||
283 | __entry->sector = bio->bi_sector; | 283 | __entry->sector = bio->bi_sector; |
284 | __entry->nr_sector = bio->bi_size >> 9; | 284 | __entry->nr_sector = bio->bi_size >> 9; |
285 | __entry->error = error; | 285 | __entry->error = error; |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 4ee471003859..d0e686402df8 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -257,15 +257,7 @@ DECLARE_EVENT_CLASS(ext4__write_end, | |||
257 | __entry->pos, __entry->len, __entry->copied) | 257 | __entry->pos, __entry->len, __entry->copied) |
258 | ); | 258 | ); |
259 | 259 | ||
260 | DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, | 260 | DEFINE_EVENT(ext4__write_end, ext4_write_end, |
261 | |||
262 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
263 | unsigned int copied), | ||
264 | |||
265 | TP_ARGS(inode, pos, len, copied) | ||
266 | ); | ||
267 | |||
268 | DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end, | ||
269 | 261 | ||
270 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | 262 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
271 | unsigned int copied), | 263 | unsigned int copied), |
@@ -1956,7 +1948,7 @@ TRACE_EVENT(ext4_remove_blocks, | |||
1956 | __entry->to = to; | 1948 | __entry->to = to; |
1957 | __entry->partial = partial_cluster; | 1949 | __entry->partial = partial_cluster; |
1958 | __entry->ee_pblk = ext4_ext_pblock(ex); | 1950 | __entry->ee_pblk = ext4_ext_pblock(ex); |
1959 | __entry->ee_lblk = cpu_to_le32(ex->ee_block); | 1951 | __entry->ee_lblk = le32_to_cpu(ex->ee_block); |
1960 | __entry->ee_len = ext4_ext_get_actual_len(ex); | 1952 | __entry->ee_len = ext4_ext_get_actual_len(ex); |
1961 | ), | 1953 | ), |
1962 | 1954 | ||
@@ -2060,7 +2052,7 @@ TRACE_EVENT(ext4_ext_remove_space, | |||
2060 | 2052 | ||
2061 | TRACE_EVENT(ext4_ext_remove_space_done, | 2053 | TRACE_EVENT(ext4_ext_remove_space_done, |
2062 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, | 2054 | TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, |
2063 | ext4_lblk_t partial, unsigned short eh_entries), | 2055 | ext4_lblk_t partial, __le16 eh_entries), |
2064 | 2056 | ||
2065 | TP_ARGS(inode, start, depth, partial, eh_entries), | 2057 | TP_ARGS(inode, start, depth, partial, eh_entries), |
2066 | 2058 | ||
@@ -2079,7 +2071,7 @@ TRACE_EVENT(ext4_ext_remove_space_done, | |||
2079 | __entry->start = start; | 2071 | __entry->start = start; |
2080 | __entry->depth = depth; | 2072 | __entry->depth = depth; |
2081 | __entry->partial = partial; | 2073 | __entry->partial = partial; |
2082 | __entry->eh_entries = eh_entries; | 2074 | __entry->eh_entries = le16_to_cpu(eh_entries); |
2083 | ), | 2075 | ), |
2084 | 2076 | ||
2085 | TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " | 2077 | TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " |
diff --git a/include/trace/events/filemap.h b/include/trace/events/filemap.h new file mode 100644 index 000000000000..0421f49a20f7 --- /dev/null +++ b/include/trace/events/filemap.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM filemap | ||
3 | |||
4 | #if !defined(_TRACE_FILEMAP_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_FILEMAP_H | ||
6 | |||
7 | #include <linux/types.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/memcontrol.h> | ||
11 | #include <linux/device.h> | ||
12 | #include <linux/kdev_t.h> | ||
13 | |||
14 | DECLARE_EVENT_CLASS(mm_filemap_op_page_cache, | ||
15 | |||
16 | TP_PROTO(struct page *page), | ||
17 | |||
18 | TP_ARGS(page), | ||
19 | |||
20 | TP_STRUCT__entry( | ||
21 | __field(struct page *, page) | ||
22 | __field(unsigned long, i_ino) | ||
23 | __field(unsigned long, index) | ||
24 | __field(dev_t, s_dev) | ||
25 | ), | ||
26 | |||
27 | TP_fast_assign( | ||
28 | __entry->page = page; | ||
29 | __entry->i_ino = page->mapping->host->i_ino; | ||
30 | __entry->index = page->index; | ||
31 | if (page->mapping->host->i_sb) | ||
32 | __entry->s_dev = page->mapping->host->i_sb->s_dev; | ||
33 | else | ||
34 | __entry->s_dev = page->mapping->host->i_rdev; | ||
35 | ), | ||
36 | |||
37 | TP_printk("dev %d:%d ino %lx page=%p pfn=%lu ofs=%lu", | ||
38 | MAJOR(__entry->s_dev), MINOR(__entry->s_dev), | ||
39 | __entry->i_ino, | ||
40 | __entry->page, | ||
41 | page_to_pfn(__entry->page), | ||
42 | __entry->index << PAGE_SHIFT) | ||
43 | ); | ||
44 | |||
45 | DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_delete_from_page_cache, | ||
46 | TP_PROTO(struct page *page), | ||
47 | TP_ARGS(page) | ||
48 | ); | ||
49 | |||
50 | DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_add_to_page_cache, | ||
51 | TP_PROTO(struct page *page), | ||
52 | TP_ARGS(page) | ||
53 | ); | ||
54 | |||
55 | #endif /* _TRACE_FILEMAP_H */ | ||
56 | |||
57 | /* This part must be outside protection */ | ||
58 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 070df49e4a1d..c1d1f3eb242d 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -358,6 +358,27 @@ TRACE_EVENT(jbd2_write_superblock, | |||
358 | MINOR(__entry->dev), __entry->write_op) | 358 | MINOR(__entry->dev), __entry->write_op) |
359 | ); | 359 | ); |
360 | 360 | ||
361 | TRACE_EVENT(jbd2_lock_buffer_stall, | ||
362 | |||
363 | TP_PROTO(dev_t dev, unsigned long stall_ms), | ||
364 | |||
365 | TP_ARGS(dev, stall_ms), | ||
366 | |||
367 | TP_STRUCT__entry( | ||
368 | __field( dev_t, dev ) | ||
369 | __field(unsigned long, stall_ms ) | ||
370 | ), | ||
371 | |||
372 | TP_fast_assign( | ||
373 | __entry->dev = dev; | ||
374 | __entry->stall_ms = stall_ms; | ||
375 | ), | ||
376 | |||
377 | TP_printk("dev %d,%d stall_ms %lu", | ||
378 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
379 | __entry->stall_ms) | ||
380 | ); | ||
381 | |||
361 | #endif /* _TRACE_JBD2_H */ | 382 | #endif /* _TRACE_JBD2_H */ |
362 | 383 | ||
363 | /* This part must be outside protection */ | 384 | /* This part must be outside protection */ |
diff --git a/include/trace/events/printk.h b/include/trace/events/printk.h index 94ec79cc011a..c008bc99f9fa 100644 --- a/include/trace/events/printk.h +++ b/include/trace/events/printk.h | |||
@@ -6,31 +6,18 @@ | |||
6 | 6 | ||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | 8 | ||
9 | TRACE_EVENT_CONDITION(console, | 9 | TRACE_EVENT(console, |
10 | TP_PROTO(const char *log_buf, unsigned start, unsigned end, | 10 | TP_PROTO(const char *text, size_t len), |
11 | unsigned log_buf_len), | ||
12 | 11 | ||
13 | TP_ARGS(log_buf, start, end, log_buf_len), | 12 | TP_ARGS(text, len), |
14 | |||
15 | TP_CONDITION(start != end), | ||
16 | 13 | ||
17 | TP_STRUCT__entry( | 14 | TP_STRUCT__entry( |
18 | __dynamic_array(char, msg, end - start + 1) | 15 | __dynamic_array(char, msg, len + 1) |
19 | ), | 16 | ), |
20 | 17 | ||
21 | TP_fast_assign( | 18 | TP_fast_assign( |
22 | if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) { | 19 | memcpy(__get_dynamic_array(msg), text, len); |
23 | memcpy(__get_dynamic_array(msg), | 20 | ((char *)__get_dynamic_array(msg))[len] = 0; |
24 | log_buf + (start & (log_buf_len - 1)), | ||
25 | log_buf_len - (start & (log_buf_len - 1))); | ||
26 | memcpy((char *)__get_dynamic_array(msg) + | ||
27 | log_buf_len - (start & (log_buf_len - 1)), | ||
28 | log_buf, end & (log_buf_len - 1)); | ||
29 | } else | ||
30 | memcpy(__get_dynamic_array(msg), | ||
31 | log_buf + (start & (log_buf_len - 1)), | ||
32 | end - start); | ||
33 | ((char *)__get_dynamic_array(msg))[end - start] = 0; | ||
34 | ), | 21 | ), |
35 | 22 | ||
36 | TP_printk("%s", __get_str(msg)) | 23 | TP_printk("%s", __get_str(msg)) |
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 1918e832da4f..59ebcc89f148 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
@@ -72,6 +72,58 @@ TRACE_EVENT(rcu_grace_period, | |||
72 | ); | 72 | ); |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * Tracepoint for future grace-period events, including those for no-callbacks | ||
76 | * CPUs. The caller should pull the data from the rcu_node structure, | ||
77 | * other than rcuname, which comes from the rcu_state structure, and event, | ||
78 | * which is one of the following: | ||
79 | * | ||
80 | * "Startleaf": Request a nocb grace period based on leaf-node data. | ||
81 | * "Startedleaf": Leaf-node start proved sufficient. | ||
82 | * "Startedleafroot": Leaf-node start proved sufficient after checking root. | ||
83 | * "Startedroot": Requested a nocb grace period based on root-node data. | ||
84 | * "StartWait": Start waiting for the requested grace period. | ||
85 | * "ResumeWait": Resume waiting after signal. | ||
86 | * "EndWait": Complete wait. | ||
87 | * "Cleanup": Clean up rcu_node structure after previous GP. | ||
88 | * "CleanupMore": Clean up, and another no-CB GP is needed. | ||
89 | */ | ||
90 | TRACE_EVENT(rcu_future_grace_period, | ||
91 | |||
92 | TP_PROTO(char *rcuname, unsigned long gpnum, unsigned long completed, | ||
93 | unsigned long c, u8 level, int grplo, int grphi, | ||
94 | char *gpevent), | ||
95 | |||
96 | TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent), | ||
97 | |||
98 | TP_STRUCT__entry( | ||
99 | __field(char *, rcuname) | ||
100 | __field(unsigned long, gpnum) | ||
101 | __field(unsigned long, completed) | ||
102 | __field(unsigned long, c) | ||
103 | __field(u8, level) | ||
104 | __field(int, grplo) | ||
105 | __field(int, grphi) | ||
106 | __field(char *, gpevent) | ||
107 | ), | ||
108 | |||
109 | TP_fast_assign( | ||
110 | __entry->rcuname = rcuname; | ||
111 | __entry->gpnum = gpnum; | ||
112 | __entry->completed = completed; | ||
113 | __entry->c = c; | ||
114 | __entry->level = level; | ||
115 | __entry->grplo = grplo; | ||
116 | __entry->grphi = grphi; | ||
117 | __entry->gpevent = gpevent; | ||
118 | ), | ||
119 | |||
120 | TP_printk("%s %lu %lu %lu %u %d %d %s", | ||
121 | __entry->rcuname, __entry->gpnum, __entry->completed, | ||
122 | __entry->c, __entry->level, __entry->grplo, __entry->grphi, | ||
123 | __entry->gpevent) | ||
124 | ); | ||
125 | |||
126 | /* | ||
75 | * Tracepoint for grace-period-initialization events. These are | 127 | * Tracepoint for grace-period-initialization events. These are |
76 | * distinguished by the type of RCU, the new grace-period number, the | 128 | * distinguished by the type of RCU, the new grace-period number, the |
77 | * rcu_node structure level, the starting and ending CPU covered by the | 129 | * rcu_node structure level, the starting and ending CPU covered by the |
@@ -601,6 +653,9 @@ TRACE_EVENT(rcu_barrier, | |||
601 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) | 653 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) |
602 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ | 654 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ |
603 | qsmask) do { } while (0) | 655 | qsmask) do { } while (0) |
656 | #define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \ | ||
657 | level, grplo, grphi, event) \ | ||
658 | do { } while (0) | ||
604 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) | 659 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) |
605 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) | 660 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) |
606 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ | 661 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ |
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h index 41a7dbd570e2..a43a2f67bd8e 100644 --- a/include/trace/events/regmap.h +++ b/include/trace/events/regmap.h | |||
@@ -175,6 +175,54 @@ DEFINE_EVENT(regmap_bool, regmap_cache_bypass, | |||
175 | 175 | ||
176 | ); | 176 | ); |
177 | 177 | ||
178 | DECLARE_EVENT_CLASS(regmap_async, | ||
179 | |||
180 | TP_PROTO(struct device *dev), | ||
181 | |||
182 | TP_ARGS(dev), | ||
183 | |||
184 | TP_STRUCT__entry( | ||
185 | __string( name, dev_name(dev) ) | ||
186 | ), | ||
187 | |||
188 | TP_fast_assign( | ||
189 | __assign_str(name, dev_name(dev)); | ||
190 | ), | ||
191 | |||
192 | TP_printk("%s", __get_str(name)) | ||
193 | ); | ||
194 | |||
195 | DEFINE_EVENT(regmap_block, regmap_async_write_start, | ||
196 | |||
197 | TP_PROTO(struct device *dev, unsigned int reg, int count), | ||
198 | |||
199 | TP_ARGS(dev, reg, count) | ||
200 | ); | ||
201 | |||
202 | DEFINE_EVENT(regmap_async, regmap_async_io_complete, | ||
203 | |||
204 | TP_PROTO(struct device *dev), | ||
205 | |||
206 | TP_ARGS(dev) | ||
207 | |||
208 | ); | ||
209 | |||
210 | DEFINE_EVENT(regmap_async, regmap_async_complete_start, | ||
211 | |||
212 | TP_PROTO(struct device *dev), | ||
213 | |||
214 | TP_ARGS(dev) | ||
215 | |||
216 | ); | ||
217 | |||
218 | DEFINE_EVENT(regmap_async, regmap_async_complete_done, | ||
219 | |||
220 | TP_PROTO(struct device *dev), | ||
221 | |||
222 | TP_ARGS(dev) | ||
223 | |||
224 | ); | ||
225 | |||
178 | #endif /* _TRACE_REGMAP_H */ | 226 | #endif /* _TRACE_REGMAP_H */ |
179 | 227 | ||
180 | /* This part must be outside protection */ | 228 | /* This part must be outside protection */ |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 5a8671e8a67f..e5586caff67a 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -147,7 +147,7 @@ TRACE_EVENT(sched_switch, | |||
147 | __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|", | 147 | __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|", |
148 | { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, | 148 | { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, |
149 | { 16, "Z" }, { 32, "X" }, { 64, "x" }, | 149 | { 16, "Z" }, { 32, "X" }, { 64, "x" }, |
150 | { 128, "W" }) : "R", | 150 | { 128, "K" }, { 256, "W" }, { 512, "P" }) : "R", |
151 | __entry->prev_state & TASK_STATE_MAX ? "+" : "", | 151 | __entry->prev_state & TASK_STATE_MAX ? "+" : "", |
152 | __entry->next_comm, __entry->next_pid, __entry->next_prio) | 152 | __entry->next_comm, __entry->next_pid, __entry->next_prio) |
153 | ); | 153 | ); |
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 425bcfe56c62..8d219470624f 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h | |||
@@ -123,7 +123,7 @@ DEFINE_EVENT(timer_class, timer_cancel, | |||
123 | 123 | ||
124 | /** | 124 | /** |
125 | * hrtimer_init - called when the hrtimer is initialized | 125 | * hrtimer_init - called when the hrtimer is initialized |
126 | * @timer: pointer to struct hrtimer | 126 | * @hrtimer: pointer to struct hrtimer |
127 | * @clockid: the hrtimers clock | 127 | * @clockid: the hrtimers clock |
128 | * @mode: the hrtimers mode | 128 | * @mode: the hrtimers mode |
129 | */ | 129 | */ |
@@ -155,7 +155,7 @@ TRACE_EVENT(hrtimer_init, | |||
155 | 155 | ||
156 | /** | 156 | /** |
157 | * hrtimer_start - called when the hrtimer is started | 157 | * hrtimer_start - called when the hrtimer is started |
158 | * @timer: pointer to struct hrtimer | 158 | * @hrtimer: pointer to struct hrtimer |
159 | */ | 159 | */ |
160 | TRACE_EVENT(hrtimer_start, | 160 | TRACE_EVENT(hrtimer_start, |
161 | 161 | ||
@@ -186,8 +186,8 @@ TRACE_EVENT(hrtimer_start, | |||
186 | ); | 186 | ); |
187 | 187 | ||
188 | /** | 188 | /** |
189 | * htimmer_expire_entry - called immediately before the hrtimer callback | 189 | * hrtimer_expire_entry - called immediately before the hrtimer callback |
190 | * @timer: pointer to struct hrtimer | 190 | * @hrtimer: pointer to struct hrtimer |
191 | * @now: pointer to variable which contains current time of the | 191 | * @now: pointer to variable which contains current time of the |
192 | * timers base. | 192 | * timers base. |
193 | * | 193 | * |
@@ -234,7 +234,7 @@ DECLARE_EVENT_CLASS(hrtimer_class, | |||
234 | 234 | ||
235 | /** | 235 | /** |
236 | * hrtimer_expire_exit - called immediately after the hrtimer callback returns | 236 | * hrtimer_expire_exit - called immediately after the hrtimer callback returns |
237 | * @timer: pointer to struct hrtimer | 237 | * @hrtimer: pointer to struct hrtimer |
238 | * | 238 | * |
239 | * When used in combination with the hrtimer_expire_entry tracepoint we can | 239 | * When used in combination with the hrtimer_expire_entry tracepoint we can |
240 | * determine the runtime of the callback function. | 240 | * determine the runtime of the callback function. |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 40dc5e8fe340..19edd7facaa1 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -227,29 +227,18 @@ static notrace enum print_line_t \ | |||
227 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ | 227 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ |
228 | struct trace_event *trace_event) \ | 228 | struct trace_event *trace_event) \ |
229 | { \ | 229 | { \ |
230 | struct ftrace_event_call *event; \ | ||
231 | struct trace_seq *s = &iter->seq; \ | 230 | struct trace_seq *s = &iter->seq; \ |
231 | struct trace_seq __maybe_unused *p = &iter->tmp_seq; \ | ||
232 | struct ftrace_raw_##call *field; \ | 232 | struct ftrace_raw_##call *field; \ |
233 | struct trace_entry *entry; \ | ||
234 | struct trace_seq *p = &iter->tmp_seq; \ | ||
235 | int ret; \ | 233 | int ret; \ |
236 | \ | 234 | \ |
237 | event = container_of(trace_event, struct ftrace_event_call, \ | 235 | field = (typeof(field))iter->ent; \ |
238 | event); \ | ||
239 | \ | ||
240 | entry = iter->ent; \ | ||
241 | \ | ||
242 | if (entry->type != event->event.type) { \ | ||
243 | WARN_ON_ONCE(1); \ | ||
244 | return TRACE_TYPE_UNHANDLED; \ | ||
245 | } \ | ||
246 | \ | ||
247 | field = (typeof(field))entry; \ | ||
248 | \ | 236 | \ |
249 | trace_seq_init(p); \ | 237 | ret = ftrace_raw_output_prep(iter, trace_event); \ |
250 | ret = trace_seq_printf(s, "%s: ", event->name); \ | ||
251 | if (ret) \ | 238 | if (ret) \ |
252 | ret = trace_seq_printf(s, print); \ | 239 | return ret; \ |
240 | \ | ||
241 | ret = trace_seq_printf(s, print); \ | ||
253 | if (!ret) \ | 242 | if (!ret) \ |
254 | return TRACE_TYPE_PARTIAL_LINE; \ | 243 | return TRACE_TYPE_PARTIAL_LINE; \ |
255 | \ | 244 | \ |
@@ -335,7 +324,7 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ | |||
335 | 324 | ||
336 | #undef DECLARE_EVENT_CLASS | 325 | #undef DECLARE_EVENT_CLASS |
337 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ | 326 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ |
338 | static int notrace \ | 327 | static int notrace __init \ |
339 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | 328 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ |
340 | { \ | 329 | { \ |
341 | struct ftrace_raw_##call field; \ | 330 | struct ftrace_raw_##call field; \ |
@@ -414,7 +403,8 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
414 | * | 403 | * |
415 | * static void ftrace_raw_event_<call>(void *__data, proto) | 404 | * static void ftrace_raw_event_<call>(void *__data, proto) |
416 | * { | 405 | * { |
417 | * struct ftrace_event_call *event_call = __data; | 406 | * struct ftrace_event_file *ftrace_file = __data; |
407 | * struct ftrace_event_call *event_call = ftrace_file->event_call; | ||
418 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | 408 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; |
419 | * struct ring_buffer_event *event; | 409 | * struct ring_buffer_event *event; |
420 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 | 410 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 |
@@ -423,12 +413,16 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
423 | * int __data_size; | 413 | * int __data_size; |
424 | * int pc; | 414 | * int pc; |
425 | * | 415 | * |
416 | * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, | ||
417 | * &ftrace_file->flags)) | ||
418 | * return; | ||
419 | * | ||
426 | * local_save_flags(irq_flags); | 420 | * local_save_flags(irq_flags); |
427 | * pc = preempt_count(); | 421 | * pc = preempt_count(); |
428 | * | 422 | * |
429 | * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); | 423 | * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); |
430 | * | 424 | * |
431 | * event = trace_current_buffer_lock_reserve(&buffer, | 425 | * event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, |
432 | * event_<call>->event.type, | 426 | * event_<call>->event.type, |
433 | * sizeof(*entry) + __data_size, | 427 | * sizeof(*entry) + __data_size, |
434 | * irq_flags, pc); | 428 | * irq_flags, pc); |
@@ -440,7 +434,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
440 | * __array macros. | 434 | * __array macros. |
441 | * | 435 | * |
442 | * if (!filter_current_check_discard(buffer, event_call, entry, event)) | 436 | * if (!filter_current_check_discard(buffer, event_call, entry, event)) |
443 | * trace_current_buffer_unlock_commit(buffer, | 437 | * trace_nowake_buffer_unlock_commit(buffer, |
444 | * event, irq_flags, pc); | 438 | * event, irq_flags, pc); |
445 | * } | 439 | * } |
446 | * | 440 | * |
@@ -518,7 +512,8 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
518 | static notrace void \ | 512 | static notrace void \ |
519 | ftrace_raw_event_##call(void *__data, proto) \ | 513 | ftrace_raw_event_##call(void *__data, proto) \ |
520 | { \ | 514 | { \ |
521 | struct ftrace_event_call *event_call = __data; \ | 515 | struct ftrace_event_file *ftrace_file = __data; \ |
516 | struct ftrace_event_call *event_call = ftrace_file->event_call; \ | ||
522 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 517 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
523 | struct ring_buffer_event *event; \ | 518 | struct ring_buffer_event *event; \ |
524 | struct ftrace_raw_##call *entry; \ | 519 | struct ftrace_raw_##call *entry; \ |
@@ -527,12 +522,16 @@ ftrace_raw_event_##call(void *__data, proto) \ | |||
527 | int __data_size; \ | 522 | int __data_size; \ |
528 | int pc; \ | 523 | int pc; \ |
529 | \ | 524 | \ |
525 | if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, \ | ||
526 | &ftrace_file->flags)) \ | ||
527 | return; \ | ||
528 | \ | ||
530 | local_save_flags(irq_flags); \ | 529 | local_save_flags(irq_flags); \ |
531 | pc = preempt_count(); \ | 530 | pc = preempt_count(); \ |
532 | \ | 531 | \ |
533 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ | 532 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ |
534 | \ | 533 | \ |
535 | event = trace_current_buffer_lock_reserve(&buffer, \ | 534 | event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, \ |
536 | event_call->event.type, \ | 535 | event_call->event.type, \ |
537 | sizeof(*entry) + __data_size, \ | 536 | sizeof(*entry) + __data_size, \ |
538 | irq_flags, pc); \ | 537 | irq_flags, pc); \ |
@@ -581,7 +580,7 @@ static inline void ftrace_test_probe_##call(void) \ | |||
581 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 580 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
582 | _TRACE_PERF_PROTO(call, PARAMS(proto)); \ | 581 | _TRACE_PERF_PROTO(call, PARAMS(proto)); \ |
583 | static const char print_fmt_##call[] = print; \ | 582 | static const char print_fmt_##call[] = print; \ |
584 | static struct ftrace_event_class __used event_class_##call = { \ | 583 | static struct ftrace_event_class __used __refdata event_class_##call = { \ |
585 | .system = __stringify(TRACE_SYSTEM), \ | 584 | .system = __stringify(TRACE_SYSTEM), \ |
586 | .define_fields = ftrace_define_fields_##call, \ | 585 | .define_fields = ftrace_define_fields_##call, \ |
587 | .fields = LIST_HEAD_INIT(event_class_##call.fields),\ | 586 | .fields = LIST_HEAD_INIT(event_class_##call.fields),\ |
@@ -705,5 +704,3 @@ static inline void perf_test_probe_##call(void) \ | |||
705 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 704 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
706 | #endif /* CONFIG_PERF_EVENTS */ | 705 | #endif /* CONFIG_PERF_EVENTS */ |
707 | 706 | ||
708 | #undef _TRACE_PROFILE_INIT | ||
709 | |||
diff --git a/include/uapi/linux/connector.h b/include/uapi/linux/connector.h index 8761a0349c74..4cb283505e45 100644 --- a/include/uapi/linux/connector.h +++ b/include/uapi/linux/connector.h | |||
@@ -44,8 +44,11 @@ | |||
44 | #define CN_VAL_DRBD 0x1 | 44 | #define CN_VAL_DRBD 0x1 |
45 | #define CN_KVP_IDX 0x9 /* HyperV KVP */ | 45 | #define CN_KVP_IDX 0x9 /* HyperV KVP */ |
46 | #define CN_KVP_VAL 0x1 /* queries from the kernel */ | 46 | #define CN_KVP_VAL 0x1 /* queries from the kernel */ |
47 | #define CN_VSS_IDX 0xA /* HyperV VSS */ | ||
48 | #define CN_VSS_VAL 0x1 /* queries from the kernel */ | ||
47 | 49 | ||
48 | #define CN_NETLINK_USERS 10 /* Highest index + 1 */ | 50 | |
51 | #define CN_NETLINK_USERS 11 /* Highest index + 1 */ | ||
49 | 52 | ||
50 | /* | 53 | /* |
51 | * Maximum connector's message size. | 54 | * Maximum connector's message size. |
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index 8072d352b98f..ef6103bf1f9b 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h | |||
@@ -397,6 +397,7 @@ typedef struct elf64_shdr { | |||
397 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ | 397 | #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ |
398 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ | 398 | #define NT_METAG_CBUF 0x500 /* Metag catch buffer registers */ |
399 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ | 399 | #define NT_METAG_RPIPE 0x501 /* Metag read pipeline state */ |
400 | #define NT_METAG_TLS 0x502 /* Metag TLS pointer */ | ||
400 | 401 | ||
401 | 402 | ||
402 | /* Note header in a PT_NOTE section */ | 403 | /* Note header in a PT_NOTE section */ |
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index c7fc1e6517c3..a4ed56cf0eac 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
@@ -88,7 +88,6 @@ struct inodes_stat_t { | |||
88 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | 88 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ |
89 | 89 | ||
90 | /* These sb flags are internal to the kernel */ | 90 | /* These sb flags are internal to the kernel */ |
91 | #define MS_SNAP_STABLE (1<<27) /* Snapshot pages during writeback, if needed */ | ||
92 | #define MS_NOSEC (1<<28) | 91 | #define MS_NOSEC (1<<28) |
93 | #define MS_BORN (1<<29) | 92 | #define MS_BORN (1<<29) |
94 | #define MS_ACTIVE (1<<30) | 93 | #define MS_ACTIVE (1<<30) |
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 4c43b4448792..706d035fa748 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h | |||
@@ -95,15 +95,10 @@ | |||
95 | #ifndef _LINUX_FUSE_H | 95 | #ifndef _LINUX_FUSE_H |
96 | #define _LINUX_FUSE_H | 96 | #define _LINUX_FUSE_H |
97 | 97 | ||
98 | #ifdef __linux__ | 98 | #ifdef __KERNEL__ |
99 | #include <linux/types.h> | 99 | #include <linux/types.h> |
100 | #else | 100 | #else |
101 | #include <stdint.h> | 101 | #include <stdint.h> |
102 | #define __u64 uint64_t | ||
103 | #define __s64 int64_t | ||
104 | #define __u32 uint32_t | ||
105 | #define __s32 int32_t | ||
106 | #define __u16 uint16_t | ||
107 | #endif | 102 | #endif |
108 | 103 | ||
109 | /* | 104 | /* |
@@ -139,42 +134,42 @@ | |||
139 | userspace works under 64bit kernels */ | 134 | userspace works under 64bit kernels */ |
140 | 135 | ||
141 | struct fuse_attr { | 136 | struct fuse_attr { |
142 | __u64 ino; | 137 | uint64_t ino; |
143 | __u64 size; | 138 | uint64_t size; |
144 | __u64 blocks; | 139 | uint64_t blocks; |
145 | __u64 atime; | 140 | uint64_t atime; |
146 | __u64 mtime; | 141 | uint64_t mtime; |
147 | __u64 ctime; | 142 | uint64_t ctime; |
148 | __u32 atimensec; | 143 | uint32_t atimensec; |
149 | __u32 mtimensec; | 144 | uint32_t mtimensec; |
150 | __u32 ctimensec; | 145 | uint32_t ctimensec; |
151 | __u32 mode; | 146 | uint32_t mode; |
152 | __u32 nlink; | 147 | uint32_t nlink; |
153 | __u32 uid; | 148 | uint32_t uid; |
154 | __u32 gid; | 149 | uint32_t gid; |
155 | __u32 rdev; | 150 | uint32_t rdev; |
156 | __u32 blksize; | 151 | uint32_t blksize; |
157 | __u32 padding; | 152 | uint32_t padding; |
158 | }; | 153 | }; |
159 | 154 | ||
160 | struct fuse_kstatfs { | 155 | struct fuse_kstatfs { |
161 | __u64 blocks; | 156 | uint64_t blocks; |
162 | __u64 bfree; | 157 | uint64_t bfree; |
163 | __u64 bavail; | 158 | uint64_t bavail; |
164 | __u64 files; | 159 | uint64_t files; |
165 | __u64 ffree; | 160 | uint64_t ffree; |
166 | __u32 bsize; | 161 | uint32_t bsize; |
167 | __u32 namelen; | 162 | uint32_t namelen; |
168 | __u32 frsize; | 163 | uint32_t frsize; |
169 | __u32 padding; | 164 | uint32_t padding; |
170 | __u32 spare[6]; | 165 | uint32_t spare[6]; |
171 | }; | 166 | }; |
172 | 167 | ||
173 | struct fuse_file_lock { | 168 | struct fuse_file_lock { |
174 | __u64 start; | 169 | uint64_t start; |
175 | __u64 end; | 170 | uint64_t end; |
176 | __u32 type; | 171 | uint32_t type; |
177 | __u32 pid; /* tgid */ | 172 | uint32_t pid; /* tgid */ |
178 | }; | 173 | }; |
179 | 174 | ||
180 | /** | 175 | /** |
@@ -364,143 +359,143 @@ enum fuse_notify_code { | |||
364 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 | 359 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 |
365 | 360 | ||
366 | struct fuse_entry_out { | 361 | struct fuse_entry_out { |
367 | __u64 nodeid; /* Inode ID */ | 362 | uint64_t nodeid; /* Inode ID */ |
368 | __u64 generation; /* Inode generation: nodeid:gen must | 363 | uint64_t generation; /* Inode generation: nodeid:gen must |
369 | be unique for the fs's lifetime */ | 364 | be unique for the fs's lifetime */ |
370 | __u64 entry_valid; /* Cache timeout for the name */ | 365 | uint64_t entry_valid; /* Cache timeout for the name */ |
371 | __u64 attr_valid; /* Cache timeout for the attributes */ | 366 | uint64_t attr_valid; /* Cache timeout for the attributes */ |
372 | __u32 entry_valid_nsec; | 367 | uint32_t entry_valid_nsec; |
373 | __u32 attr_valid_nsec; | 368 | uint32_t attr_valid_nsec; |
374 | struct fuse_attr attr; | 369 | struct fuse_attr attr; |
375 | }; | 370 | }; |
376 | 371 | ||
377 | struct fuse_forget_in { | 372 | struct fuse_forget_in { |
378 | __u64 nlookup; | 373 | uint64_t nlookup; |
379 | }; | 374 | }; |
380 | 375 | ||
381 | struct fuse_forget_one { | 376 | struct fuse_forget_one { |
382 | __u64 nodeid; | 377 | uint64_t nodeid; |
383 | __u64 nlookup; | 378 | uint64_t nlookup; |
384 | }; | 379 | }; |
385 | 380 | ||
386 | struct fuse_batch_forget_in { | 381 | struct fuse_batch_forget_in { |
387 | __u32 count; | 382 | uint32_t count; |
388 | __u32 dummy; | 383 | uint32_t dummy; |
389 | }; | 384 | }; |
390 | 385 | ||
391 | struct fuse_getattr_in { | 386 | struct fuse_getattr_in { |
392 | __u32 getattr_flags; | 387 | uint32_t getattr_flags; |
393 | __u32 dummy; | 388 | uint32_t dummy; |
394 | __u64 fh; | 389 | uint64_t fh; |
395 | }; | 390 | }; |
396 | 391 | ||
397 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 | 392 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 |
398 | 393 | ||
399 | struct fuse_attr_out { | 394 | struct fuse_attr_out { |
400 | __u64 attr_valid; /* Cache timeout for the attributes */ | 395 | uint64_t attr_valid; /* Cache timeout for the attributes */ |
401 | __u32 attr_valid_nsec; | 396 | uint32_t attr_valid_nsec; |
402 | __u32 dummy; | 397 | uint32_t dummy; |
403 | struct fuse_attr attr; | 398 | struct fuse_attr attr; |
404 | }; | 399 | }; |
405 | 400 | ||
406 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | 401 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 |
407 | 402 | ||
408 | struct fuse_mknod_in { | 403 | struct fuse_mknod_in { |
409 | __u32 mode; | 404 | uint32_t mode; |
410 | __u32 rdev; | 405 | uint32_t rdev; |
411 | __u32 umask; | 406 | uint32_t umask; |
412 | __u32 padding; | 407 | uint32_t padding; |
413 | }; | 408 | }; |
414 | 409 | ||
415 | struct fuse_mkdir_in { | 410 | struct fuse_mkdir_in { |
416 | __u32 mode; | 411 | uint32_t mode; |
417 | __u32 umask; | 412 | uint32_t umask; |
418 | }; | 413 | }; |
419 | 414 | ||
420 | struct fuse_rename_in { | 415 | struct fuse_rename_in { |
421 | __u64 newdir; | 416 | uint64_t newdir; |
422 | }; | 417 | }; |
423 | 418 | ||
424 | struct fuse_link_in { | 419 | struct fuse_link_in { |
425 | __u64 oldnodeid; | 420 | uint64_t oldnodeid; |
426 | }; | 421 | }; |
427 | 422 | ||
428 | struct fuse_setattr_in { | 423 | struct fuse_setattr_in { |
429 | __u32 valid; | 424 | uint32_t valid; |
430 | __u32 padding; | 425 | uint32_t padding; |
431 | __u64 fh; | 426 | uint64_t fh; |
432 | __u64 size; | 427 | uint64_t size; |
433 | __u64 lock_owner; | 428 | uint64_t lock_owner; |
434 | __u64 atime; | 429 | uint64_t atime; |
435 | __u64 mtime; | 430 | uint64_t mtime; |
436 | __u64 unused2; | 431 | uint64_t unused2; |
437 | __u32 atimensec; | 432 | uint32_t atimensec; |
438 | __u32 mtimensec; | 433 | uint32_t mtimensec; |
439 | __u32 unused3; | 434 | uint32_t unused3; |
440 | __u32 mode; | 435 | uint32_t mode; |
441 | __u32 unused4; | 436 | uint32_t unused4; |
442 | __u32 uid; | 437 | uint32_t uid; |
443 | __u32 gid; | 438 | uint32_t gid; |
444 | __u32 unused5; | 439 | uint32_t unused5; |
445 | }; | 440 | }; |
446 | 441 | ||
447 | struct fuse_open_in { | 442 | struct fuse_open_in { |
448 | __u32 flags; | 443 | uint32_t flags; |
449 | __u32 unused; | 444 | uint32_t unused; |
450 | }; | 445 | }; |
451 | 446 | ||
452 | struct fuse_create_in { | 447 | struct fuse_create_in { |
453 | __u32 flags; | 448 | uint32_t flags; |
454 | __u32 mode; | 449 | uint32_t mode; |
455 | __u32 umask; | 450 | uint32_t umask; |
456 | __u32 padding; | 451 | uint32_t padding; |
457 | }; | 452 | }; |
458 | 453 | ||
459 | struct fuse_open_out { | 454 | struct fuse_open_out { |
460 | __u64 fh; | 455 | uint64_t fh; |
461 | __u32 open_flags; | 456 | uint32_t open_flags; |
462 | __u32 padding; | 457 | uint32_t padding; |
463 | }; | 458 | }; |
464 | 459 | ||
465 | struct fuse_release_in { | 460 | struct fuse_release_in { |
466 | __u64 fh; | 461 | uint64_t fh; |
467 | __u32 flags; | 462 | uint32_t flags; |
468 | __u32 release_flags; | 463 | uint32_t release_flags; |
469 | __u64 lock_owner; | 464 | uint64_t lock_owner; |
470 | }; | 465 | }; |
471 | 466 | ||
472 | struct fuse_flush_in { | 467 | struct fuse_flush_in { |
473 | __u64 fh; | 468 | uint64_t fh; |
474 | __u32 unused; | 469 | uint32_t unused; |
475 | __u32 padding; | 470 | uint32_t padding; |
476 | __u64 lock_owner; | 471 | uint64_t lock_owner; |
477 | }; | 472 | }; |
478 | 473 | ||
479 | struct fuse_read_in { | 474 | struct fuse_read_in { |
480 | __u64 fh; | 475 | uint64_t fh; |
481 | __u64 offset; | 476 | uint64_t offset; |
482 | __u32 size; | 477 | uint32_t size; |
483 | __u32 read_flags; | 478 | uint32_t read_flags; |
484 | __u64 lock_owner; | 479 | uint64_t lock_owner; |
485 | __u32 flags; | 480 | uint32_t flags; |
486 | __u32 padding; | 481 | uint32_t padding; |
487 | }; | 482 | }; |
488 | 483 | ||
489 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 | 484 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 |
490 | 485 | ||
491 | struct fuse_write_in { | 486 | struct fuse_write_in { |
492 | __u64 fh; | 487 | uint64_t fh; |
493 | __u64 offset; | 488 | uint64_t offset; |
494 | __u32 size; | 489 | uint32_t size; |
495 | __u32 write_flags; | 490 | uint32_t write_flags; |
496 | __u64 lock_owner; | 491 | uint64_t lock_owner; |
497 | __u32 flags; | 492 | uint32_t flags; |
498 | __u32 padding; | 493 | uint32_t padding; |
499 | }; | 494 | }; |
500 | 495 | ||
501 | struct fuse_write_out { | 496 | struct fuse_write_out { |
502 | __u32 size; | 497 | uint32_t size; |
503 | __u32 padding; | 498 | uint32_t padding; |
504 | }; | 499 | }; |
505 | 500 | ||
506 | #define FUSE_COMPAT_STATFS_SIZE 48 | 501 | #define FUSE_COMPAT_STATFS_SIZE 48 |
@@ -510,32 +505,32 @@ struct fuse_statfs_out { | |||
510 | }; | 505 | }; |
511 | 506 | ||
512 | struct fuse_fsync_in { | 507 | struct fuse_fsync_in { |
513 | __u64 fh; | 508 | uint64_t fh; |
514 | __u32 fsync_flags; | 509 | uint32_t fsync_flags; |
515 | __u32 padding; | 510 | uint32_t padding; |
516 | }; | 511 | }; |
517 | 512 | ||
518 | struct fuse_setxattr_in { | 513 | struct fuse_setxattr_in { |
519 | __u32 size; | 514 | uint32_t size; |
520 | __u32 flags; | 515 | uint32_t flags; |
521 | }; | 516 | }; |
522 | 517 | ||
523 | struct fuse_getxattr_in { | 518 | struct fuse_getxattr_in { |
524 | __u32 size; | 519 | uint32_t size; |
525 | __u32 padding; | 520 | uint32_t padding; |
526 | }; | 521 | }; |
527 | 522 | ||
528 | struct fuse_getxattr_out { | 523 | struct fuse_getxattr_out { |
529 | __u32 size; | 524 | uint32_t size; |
530 | __u32 padding; | 525 | uint32_t padding; |
531 | }; | 526 | }; |
532 | 527 | ||
533 | struct fuse_lk_in { | 528 | struct fuse_lk_in { |
534 | __u64 fh; | 529 | uint64_t fh; |
535 | __u64 owner; | 530 | uint64_t owner; |
536 | struct fuse_file_lock lk; | 531 | struct fuse_file_lock lk; |
537 | __u32 lk_flags; | 532 | uint32_t lk_flags; |
538 | __u32 padding; | 533 | uint32_t padding; |
539 | }; | 534 | }; |
540 | 535 | ||
541 | struct fuse_lk_out { | 536 | struct fuse_lk_out { |
@@ -543,134 +538,135 @@ struct fuse_lk_out { | |||
543 | }; | 538 | }; |
544 | 539 | ||
545 | struct fuse_access_in { | 540 | struct fuse_access_in { |
546 | __u32 mask; | 541 | uint32_t mask; |
547 | __u32 padding; | 542 | uint32_t padding; |
548 | }; | 543 | }; |
549 | 544 | ||
550 | struct fuse_init_in { | 545 | struct fuse_init_in { |
551 | __u32 major; | 546 | uint32_t major; |
552 | __u32 minor; | 547 | uint32_t minor; |
553 | __u32 max_readahead; | 548 | uint32_t max_readahead; |
554 | __u32 flags; | 549 | uint32_t flags; |
555 | }; | 550 | }; |
556 | 551 | ||
557 | struct fuse_init_out { | 552 | struct fuse_init_out { |
558 | __u32 major; | 553 | uint32_t major; |
559 | __u32 minor; | 554 | uint32_t minor; |
560 | __u32 max_readahead; | 555 | uint32_t max_readahead; |
561 | __u32 flags; | 556 | uint32_t flags; |
562 | __u16 max_background; | 557 | uint16_t max_background; |
563 | __u16 congestion_threshold; | 558 | uint16_t congestion_threshold; |
564 | __u32 max_write; | 559 | uint32_t max_write; |
565 | }; | 560 | }; |
566 | 561 | ||
567 | #define CUSE_INIT_INFO_MAX 4096 | 562 | #define CUSE_INIT_INFO_MAX 4096 |
568 | 563 | ||
569 | struct cuse_init_in { | 564 | struct cuse_init_in { |
570 | __u32 major; | 565 | uint32_t major; |
571 | __u32 minor; | 566 | uint32_t minor; |
572 | __u32 unused; | 567 | uint32_t unused; |
573 | __u32 flags; | 568 | uint32_t flags; |
574 | }; | 569 | }; |
575 | 570 | ||
576 | struct cuse_init_out { | 571 | struct cuse_init_out { |
577 | __u32 major; | 572 | uint32_t major; |
578 | __u32 minor; | 573 | uint32_t minor; |
579 | __u32 unused; | 574 | uint32_t unused; |
580 | __u32 flags; | 575 | uint32_t flags; |
581 | __u32 max_read; | 576 | uint32_t max_read; |
582 | __u32 max_write; | 577 | uint32_t max_write; |
583 | __u32 dev_major; /* chardev major */ | 578 | uint32_t dev_major; /* chardev major */ |
584 | __u32 dev_minor; /* chardev minor */ | 579 | uint32_t dev_minor; /* chardev minor */ |
585 | __u32 spare[10]; | 580 | uint32_t spare[10]; |
586 | }; | 581 | }; |
587 | 582 | ||
588 | struct fuse_interrupt_in { | 583 | struct fuse_interrupt_in { |
589 | __u64 unique; | 584 | uint64_t unique; |
590 | }; | 585 | }; |
591 | 586 | ||
592 | struct fuse_bmap_in { | 587 | struct fuse_bmap_in { |
593 | __u64 block; | 588 | uint64_t block; |
594 | __u32 blocksize; | 589 | uint32_t blocksize; |
595 | __u32 padding; | 590 | uint32_t padding; |
596 | }; | 591 | }; |
597 | 592 | ||
598 | struct fuse_bmap_out { | 593 | struct fuse_bmap_out { |
599 | __u64 block; | 594 | uint64_t block; |
600 | }; | 595 | }; |
601 | 596 | ||
602 | struct fuse_ioctl_in { | 597 | struct fuse_ioctl_in { |
603 | __u64 fh; | 598 | uint64_t fh; |
604 | __u32 flags; | 599 | uint32_t flags; |
605 | __u32 cmd; | 600 | uint32_t cmd; |
606 | __u64 arg; | 601 | uint64_t arg; |
607 | __u32 in_size; | 602 | uint32_t in_size; |
608 | __u32 out_size; | 603 | uint32_t out_size; |
609 | }; | 604 | }; |
610 | 605 | ||
611 | struct fuse_ioctl_iovec { | 606 | struct fuse_ioctl_iovec { |
612 | __u64 base; | 607 | uint64_t base; |
613 | __u64 len; | 608 | uint64_t len; |
614 | }; | 609 | }; |
615 | 610 | ||
616 | struct fuse_ioctl_out { | 611 | struct fuse_ioctl_out { |
617 | __s32 result; | 612 | int32_t result; |
618 | __u32 flags; | 613 | uint32_t flags; |
619 | __u32 in_iovs; | 614 | uint32_t in_iovs; |
620 | __u32 out_iovs; | 615 | uint32_t out_iovs; |
621 | }; | 616 | }; |
622 | 617 | ||
623 | struct fuse_poll_in { | 618 | struct fuse_poll_in { |
624 | __u64 fh; | 619 | uint64_t fh; |
625 | __u64 kh; | 620 | uint64_t kh; |
626 | __u32 flags; | 621 | uint32_t flags; |
627 | __u32 events; | 622 | uint32_t events; |
628 | }; | 623 | }; |
629 | 624 | ||
630 | struct fuse_poll_out { | 625 | struct fuse_poll_out { |
631 | __u32 revents; | 626 | uint32_t revents; |
632 | __u32 padding; | 627 | uint32_t padding; |
633 | }; | 628 | }; |
634 | 629 | ||
635 | struct fuse_notify_poll_wakeup_out { | 630 | struct fuse_notify_poll_wakeup_out { |
636 | __u64 kh; | 631 | uint64_t kh; |
637 | }; | 632 | }; |
638 | 633 | ||
639 | struct fuse_fallocate_in { | 634 | struct fuse_fallocate_in { |
640 | __u64 fh; | 635 | uint64_t fh; |
641 | __u64 offset; | 636 | uint64_t offset; |
642 | __u64 length; | 637 | uint64_t length; |
643 | __u32 mode; | 638 | uint32_t mode; |
644 | __u32 padding; | 639 | uint32_t padding; |
645 | }; | 640 | }; |
646 | 641 | ||
647 | struct fuse_in_header { | 642 | struct fuse_in_header { |
648 | __u32 len; | 643 | uint32_t len; |
649 | __u32 opcode; | 644 | uint32_t opcode; |
650 | __u64 unique; | 645 | uint64_t unique; |
651 | __u64 nodeid; | 646 | uint64_t nodeid; |
652 | __u32 uid; | 647 | uint32_t uid; |
653 | __u32 gid; | 648 | uint32_t gid; |
654 | __u32 pid; | 649 | uint32_t pid; |
655 | __u32 padding; | 650 | uint32_t padding; |
656 | }; | 651 | }; |
657 | 652 | ||
658 | struct fuse_out_header { | 653 | struct fuse_out_header { |
659 | __u32 len; | 654 | uint32_t len; |
660 | __s32 error; | 655 | int32_t error; |
661 | __u64 unique; | 656 | uint64_t unique; |
662 | }; | 657 | }; |
663 | 658 | ||
664 | struct fuse_dirent { | 659 | struct fuse_dirent { |
665 | __u64 ino; | 660 | uint64_t ino; |
666 | __u64 off; | 661 | uint64_t off; |
667 | __u32 namelen; | 662 | uint32_t namelen; |
668 | __u32 type; | 663 | uint32_t type; |
669 | char name[]; | 664 | char name[]; |
670 | }; | 665 | }; |
671 | 666 | ||
672 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) | 667 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
673 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) | 668 | #define FUSE_DIRENT_ALIGN(x) \ |
669 | (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) | ||
674 | #define FUSE_DIRENT_SIZE(d) \ | 670 | #define FUSE_DIRENT_SIZE(d) \ |
675 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 671 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
676 | 672 | ||
@@ -685,47 +681,47 @@ struct fuse_direntplus { | |||
685 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) | 681 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) |
686 | 682 | ||
687 | struct fuse_notify_inval_inode_out { | 683 | struct fuse_notify_inval_inode_out { |
688 | __u64 ino; | 684 | uint64_t ino; |
689 | __s64 off; | 685 | int64_t off; |
690 | __s64 len; | 686 | int64_t len; |
691 | }; | 687 | }; |
692 | 688 | ||
693 | struct fuse_notify_inval_entry_out { | 689 | struct fuse_notify_inval_entry_out { |
694 | __u64 parent; | 690 | uint64_t parent; |
695 | __u32 namelen; | 691 | uint32_t namelen; |
696 | __u32 padding; | 692 | uint32_t padding; |
697 | }; | 693 | }; |
698 | 694 | ||
699 | struct fuse_notify_delete_out { | 695 | struct fuse_notify_delete_out { |
700 | __u64 parent; | 696 | uint64_t parent; |
701 | __u64 child; | 697 | uint64_t child; |
702 | __u32 namelen; | 698 | uint32_t namelen; |
703 | __u32 padding; | 699 | uint32_t padding; |
704 | }; | 700 | }; |
705 | 701 | ||
706 | struct fuse_notify_store_out { | 702 | struct fuse_notify_store_out { |
707 | __u64 nodeid; | 703 | uint64_t nodeid; |
708 | __u64 offset; | 704 | uint64_t offset; |
709 | __u32 size; | 705 | uint32_t size; |
710 | __u32 padding; | 706 | uint32_t padding; |
711 | }; | 707 | }; |
712 | 708 | ||
713 | struct fuse_notify_retrieve_out { | 709 | struct fuse_notify_retrieve_out { |
714 | __u64 notify_unique; | 710 | uint64_t notify_unique; |
715 | __u64 nodeid; | 711 | uint64_t nodeid; |
716 | __u64 offset; | 712 | uint64_t offset; |
717 | __u32 size; | 713 | uint32_t size; |
718 | __u32 padding; | 714 | uint32_t padding; |
719 | }; | 715 | }; |
720 | 716 | ||
721 | /* Matches the size of fuse_write_in */ | 717 | /* Matches the size of fuse_write_in */ |
722 | struct fuse_notify_retrieve_in { | 718 | struct fuse_notify_retrieve_in { |
723 | __u64 dummy1; | 719 | uint64_t dummy1; |
724 | __u64 offset; | 720 | uint64_t offset; |
725 | __u32 size; | 721 | uint32_t size; |
726 | __u32 dummy2; | 722 | uint32_t dummy2; |
727 | __u64 dummy3; | 723 | uint64_t dummy3; |
728 | __u64 dummy4; | 724 | uint64_t dummy4; |
729 | }; | 725 | }; |
730 | 726 | ||
731 | #endif /* _LINUX_FUSE_H */ | 727 | #endif /* _LINUX_FUSE_H */ |
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 873e086ce3a1..249df3720be2 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define DEBUGFS_MAGIC 0x64626720 | 11 | #define DEBUGFS_MAGIC 0x64626720 |
12 | #define SECURITYFS_MAGIC 0x73636673 | 12 | #define SECURITYFS_MAGIC 0x73636673 |
13 | #define SELINUX_MAGIC 0xf97cff8c | 13 | #define SELINUX_MAGIC 0xf97cff8c |
14 | #define SMACK_MAGIC 0x43415d53 /* "SMAC" */ | ||
14 | #define RAMFS_MAGIC 0x858458f6 /* some random number */ | 15 | #define RAMFS_MAGIC 0x858458f6 /* some random number */ |
15 | #define TMPFS_MAGIC 0x01021994 | 16 | #define TMPFS_MAGIC 0x01021994 |
16 | #define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ | 17 | #define HUGETLBFS_MAGIC 0x958458f6 /* some random number */ |
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index ebfadc56d1b4..864e324da80d 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
@@ -292,12 +292,12 @@ | |||
292 | 292 | ||
293 | /* Message Signalled Interrupts registers */ | 293 | /* Message Signalled Interrupts registers */ |
294 | 294 | ||
295 | #define PCI_MSI_FLAGS 2 /* Various flags */ | 295 | #define PCI_MSI_FLAGS 2 /* Message Control */ |
296 | #define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ | 296 | #define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */ |
297 | #define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ | 297 | #define PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */ |
298 | #define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ | 298 | #define PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */ |
299 | #define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ | 299 | #define PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */ |
300 | #define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */ | 300 | #define PCI_MSI_FLAGS_MASKBIT 0x0100 /* Per-vector masking capable */ |
301 | #define PCI_MSI_RFU 3 /* Rest of capability flags */ | 301 | #define PCI_MSI_RFU 3 /* Rest of capability flags */ |
302 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ | 302 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ |
303 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ | 303 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ |
@@ -309,13 +309,17 @@ | |||
309 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ | 309 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ |
310 | 310 | ||
311 | /* MSI-X registers */ | 311 | /* MSI-X registers */ |
312 | #define PCI_MSIX_FLAGS 2 | 312 | #define PCI_MSIX_FLAGS 2 /* Message Control */ |
313 | #define PCI_MSIX_FLAGS_QSIZE 0x7FF | 313 | #define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */ |
314 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | 314 | #define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */ |
315 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) | 315 | #define PCI_MSIX_FLAGS_ENABLE 0x8000 /* MSI-X enable */ |
316 | #define PCI_MSIX_TABLE 4 | 316 | #define PCI_MSIX_TABLE 4 /* Table offset */ |
317 | #define PCI_MSIX_PBA 8 | 317 | #define PCI_MSIX_TABLE_BIR 0x00000007 /* BAR index */ |
318 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 318 | #define PCI_MSIX_TABLE_OFFSET 0xfffffff8 /* Offset into specified BAR */ |
319 | #define PCI_MSIX_PBA 8 /* Pending Bit Array offset */ | ||
320 | #define PCI_MSIX_PBA_BIR 0x00000007 /* BAR index */ | ||
321 | #define PCI_MSIX_PBA_OFFSET 0xfffffff8 /* Offset into specified BAR */ | ||
322 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) /* deprecated */ | ||
319 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ | 323 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ |
320 | 324 | ||
321 | /* MSI-X entry's format */ | 325 | /* MSI-X entry's format */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9fa9c622a7f4..fb104e51496e 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
@@ -132,8 +132,10 @@ enum perf_event_sample_format { | |||
132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, | 132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, |
133 | PERF_SAMPLE_REGS_USER = 1U << 12, | 133 | PERF_SAMPLE_REGS_USER = 1U << 12, |
134 | PERF_SAMPLE_STACK_USER = 1U << 13, | 134 | PERF_SAMPLE_STACK_USER = 1U << 13, |
135 | PERF_SAMPLE_WEIGHT = 1U << 14, | ||
136 | PERF_SAMPLE_DATA_SRC = 1U << 15, | ||
135 | 137 | ||
136 | PERF_SAMPLE_MAX = 1U << 14, /* non-ABI */ | 138 | PERF_SAMPLE_MAX = 1U << 16, /* non-ABI */ |
137 | }; | 139 | }; |
138 | 140 | ||
139 | /* | 141 | /* |
@@ -443,6 +445,7 @@ struct perf_event_mmap_page { | |||
443 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) | 445 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) |
444 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) | 446 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) |
445 | 447 | ||
448 | #define PERF_RECORD_MISC_MMAP_DATA (1 << 13) | ||
446 | /* | 449 | /* |
447 | * Indicates that the content of PERF_SAMPLE_IP points to | 450 | * Indicates that the content of PERF_SAMPLE_IP points to |
448 | * the actual instruction that triggered the event. See also | 451 | * the actual instruction that triggered the event. See also |
@@ -588,6 +591,9 @@ enum perf_event_type { | |||
588 | * { u64 size; | 591 | * { u64 size; |
589 | * char data[size]; | 592 | * char data[size]; |
590 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER | 593 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER |
594 | * | ||
595 | * { u64 weight; } && PERF_SAMPLE_WEIGHT | ||
596 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | ||
591 | * }; | 597 | * }; |
592 | */ | 598 | */ |
593 | PERF_RECORD_SAMPLE = 9, | 599 | PERF_RECORD_SAMPLE = 9, |
@@ -613,4 +619,67 @@ enum perf_callchain_context { | |||
613 | #define PERF_FLAG_FD_OUTPUT (1U << 1) | 619 | #define PERF_FLAG_FD_OUTPUT (1U << 1) |
614 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ | 620 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ |
615 | 621 | ||
622 | union perf_mem_data_src { | ||
623 | __u64 val; | ||
624 | struct { | ||
625 | __u64 mem_op:5, /* type of opcode */ | ||
626 | mem_lvl:14, /* memory hierarchy level */ | ||
627 | mem_snoop:5, /* snoop mode */ | ||
628 | mem_lock:2, /* lock instr */ | ||
629 | mem_dtlb:7, /* tlb access */ | ||
630 | mem_rsvd:31; | ||
631 | }; | ||
632 | }; | ||
633 | |||
634 | /* type of opcode (load/store/prefetch,code) */ | ||
635 | #define PERF_MEM_OP_NA 0x01 /* not available */ | ||
636 | #define PERF_MEM_OP_LOAD 0x02 /* load instruction */ | ||
637 | #define PERF_MEM_OP_STORE 0x04 /* store instruction */ | ||
638 | #define PERF_MEM_OP_PFETCH 0x08 /* prefetch */ | ||
639 | #define PERF_MEM_OP_EXEC 0x10 /* code (execution) */ | ||
640 | #define PERF_MEM_OP_SHIFT 0 | ||
641 | |||
642 | /* memory hierarchy (memory level, hit or miss) */ | ||
643 | #define PERF_MEM_LVL_NA 0x01 /* not available */ | ||
644 | #define PERF_MEM_LVL_HIT 0x02 /* hit level */ | ||
645 | #define PERF_MEM_LVL_MISS 0x04 /* miss level */ | ||
646 | #define PERF_MEM_LVL_L1 0x08 /* L1 */ | ||
647 | #define PERF_MEM_LVL_LFB 0x10 /* Line Fill Buffer */ | ||
648 | #define PERF_MEM_LVL_L2 0x20 /* L2 */ | ||
649 | #define PERF_MEM_LVL_L3 0x40 /* L3 */ | ||
650 | #define PERF_MEM_LVL_LOC_RAM 0x80 /* Local DRAM */ | ||
651 | #define PERF_MEM_LVL_REM_RAM1 0x100 /* Remote DRAM (1 hop) */ | ||
652 | #define PERF_MEM_LVL_REM_RAM2 0x200 /* Remote DRAM (2 hops) */ | ||
653 | #define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop) */ | ||
654 | #define PERF_MEM_LVL_REM_CCE2 0x800 /* Remote Cache (2 hops) */ | ||
655 | #define PERF_MEM_LVL_IO 0x1000 /* I/O memory */ | ||
656 | #define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ | ||
657 | #define PERF_MEM_LVL_SHIFT 5 | ||
658 | |||
659 | /* snoop mode */ | ||
660 | #define PERF_MEM_SNOOP_NA 0x01 /* not available */ | ||
661 | #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ | ||
662 | #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ | ||
663 | #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ | ||
664 | #define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ | ||
665 | #define PERF_MEM_SNOOP_SHIFT 19 | ||
666 | |||
667 | /* locked instruction */ | ||
668 | #define PERF_MEM_LOCK_NA 0x01 /* not available */ | ||
669 | #define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ | ||
670 | #define PERF_MEM_LOCK_SHIFT 24 | ||
671 | |||
672 | /* TLB access */ | ||
673 | #define PERF_MEM_TLB_NA 0x01 /* not available */ | ||
674 | #define PERF_MEM_TLB_HIT 0x02 /* hit level */ | ||
675 | #define PERF_MEM_TLB_MISS 0x04 /* miss level */ | ||
676 | #define PERF_MEM_TLB_L1 0x08 /* L1 */ | ||
677 | #define PERF_MEM_TLB_L2 0x10 /* L2 */ | ||
678 | #define PERF_MEM_TLB_WK 0x20 /* Hardware Walker*/ | ||
679 | #define PERF_MEM_TLB_OS 0x40 /* OS fault handler */ | ||
680 | #define PERF_MEM_TLB_SHIFT 26 | ||
681 | |||
682 | #define PERF_MEM_S(a, s) \ | ||
683 | (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) | ||
684 | |||
616 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ | 685 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ |
diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h index 022ab186a812..52ebcc89f306 100644 --- a/include/uapi/linux/ptrace.h +++ b/include/uapi/linux/ptrace.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | /* has the defines to get at the registers. */ | 6 | /* has the defines to get at the registers. */ |
7 | 7 | ||
8 | #include <linux/types.h> | ||
8 | 9 | ||
9 | #define PTRACE_TRACEME 0 | 10 | #define PTRACE_TRACEME 0 |
10 | #define PTRACE_PEEKTEXT 1 | 11 | #define PTRACE_PEEKTEXT 1 |
@@ -52,6 +53,17 @@ | |||
52 | #define PTRACE_INTERRUPT 0x4207 | 53 | #define PTRACE_INTERRUPT 0x4207 |
53 | #define PTRACE_LISTEN 0x4208 | 54 | #define PTRACE_LISTEN 0x4208 |
54 | 55 | ||
56 | #define PTRACE_PEEKSIGINFO 0x4209 | ||
57 | |||
58 | struct ptrace_peeksiginfo_args { | ||
59 | __u64 off; /* from which siginfo to start */ | ||
60 | __u32 flags; | ||
61 | __s32 nr; /* how may siginfos to take */ | ||
62 | }; | ||
63 | |||
64 | /* Read signals from a shared (process wide) queue */ | ||
65 | #define PTRACE_PEEKSIGINFO_SHARED (1 << 0) | ||
66 | |||
55 | /* Wait extended result codes for the above trace options. */ | 67 | /* Wait extended result codes for the above trace options. */ |
56 | #define PTRACE_EVENT_FORK 1 | 68 | #define PTRACE_EVENT_FORK 1 |
57 | #define PTRACE_EVENT_VFORK 2 | 69 | #define PTRACE_EVENT_VFORK 2 |
diff --git a/include/uapi/linux/time.h b/include/uapi/linux/time.h index 0d3c0edc3eda..e75e1b6ff27f 100644 --- a/include/uapi/linux/time.h +++ b/include/uapi/linux/time.h | |||
@@ -54,11 +54,9 @@ struct itimerval { | |||
54 | #define CLOCK_BOOTTIME 7 | 54 | #define CLOCK_BOOTTIME 7 |
55 | #define CLOCK_REALTIME_ALARM 8 | 55 | #define CLOCK_REALTIME_ALARM 8 |
56 | #define CLOCK_BOOTTIME_ALARM 9 | 56 | #define CLOCK_BOOTTIME_ALARM 9 |
57 | #define CLOCK_SGI_CYCLE 10 /* Hardware specific */ | ||
58 | #define CLOCK_TAI 11 | ||
57 | 59 | ||
58 | /* | ||
59 | * The IDs of various hardware clocks: | ||
60 | */ | ||
61 | #define CLOCK_SGI_CYCLE 10 | ||
62 | #define MAX_CLOCKS 16 | 60 | #define MAX_CLOCKS 16 |
63 | #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) | 61 | #define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) |
64 | #define CLOCKS_MONO CLOCK_MONOTONIC | 62 | #define CLOCKS_MONO CLOCK_MONOTONIC |
diff --git a/include/uapi/linux/usb/cdc-wdm.h b/include/uapi/linux/usb/cdc-wdm.h new file mode 100644 index 000000000000..f03134feebd6 --- /dev/null +++ b/include/uapi/linux/usb/cdc-wdm.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * USB CDC Device Management userspace API definitions | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * version 2 as published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef _UAPI__LINUX_USB_CDC_WDM_H | ||
10 | #define _UAPI__LINUX_USB_CDC_WDM_H | ||
11 | |||
12 | /* | ||
13 | * This IOCTL is used to retrieve the wMaxCommand for the device, | ||
14 | * defining the message limit for both reading and writing. | ||
15 | * | ||
16 | * For CDC WDM functions this will be the wMaxCommand field of the | ||
17 | * Device Management Functional Descriptor. | ||
18 | */ | ||
19 | #define IOCTL_WDM_MAX_COMMAND _IOR('H', 0xA0, __u16) | ||
20 | |||
21 | #endif /* _UAPI__LINUX_USB_CDC_WDM_H */ | ||
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index f738e25377ff..aa33fd1b2d4f 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h | |||
@@ -138,7 +138,7 @@ | |||
138 | 138 | ||
139 | /* | 139 | /* |
140 | * New Feature Selectors as added by USB 3.0 | 140 | * New Feature Selectors as added by USB 3.0 |
141 | * See USB 3.0 spec Table 9-6 | 141 | * See USB 3.0 spec Table 9-7 |
142 | */ | 142 | */ |
143 | #define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */ | 143 | #define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */ |
144 | #define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */ | 144 | #define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */ |
@@ -147,7 +147,7 @@ | |||
147 | 147 | ||
148 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 | 148 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 |
149 | /* | 149 | /* |
150 | * Suspend Options, Table 9-7 USB 3.0 spec | 150 | * Suspend Options, Table 9-8 USB 3.0 spec |
151 | */ | 151 | */ |
152 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) | 152 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) |
153 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) | 153 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 97fb392bb2d9..f40b41c7e108 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
@@ -72,27 +72,6 @@ | |||
72 | #define VIDEO_MAX_FRAME 32 | 72 | #define VIDEO_MAX_FRAME 32 |
73 | #define VIDEO_MAX_PLANES 8 | 73 | #define VIDEO_MAX_PLANES 8 |
74 | 74 | ||
75 | #ifndef __KERNEL__ | ||
76 | |||
77 | /* These defines are V4L1 specific and should not be used with the V4L2 API! | ||
78 | They will be removed from this header in the future. */ | ||
79 | |||
80 | #define VID_TYPE_CAPTURE 1 /* Can capture */ | ||
81 | #define VID_TYPE_TUNER 2 /* Can tune */ | ||
82 | #define VID_TYPE_TELETEXT 4 /* Does teletext */ | ||
83 | #define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ | ||
84 | #define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ | ||
85 | #define VID_TYPE_CLIPPING 32 /* Can clip */ | ||
86 | #define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ | ||
87 | #define VID_TYPE_SCALES 128 /* Scalable */ | ||
88 | #define VID_TYPE_MONOCHROME 256 /* Monochrome only */ | ||
89 | #define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ | ||
90 | #define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ | ||
91 | #define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | ||
92 | #define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | ||
93 | #define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | ||
94 | #endif | ||
95 | |||
96 | /* | 75 | /* |
97 | * M I S C E L L A N E O U S | 76 | * M I S C E L L A N E O U S |
98 | */ | 77 | */ |
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h index 609efe8c686e..ac329ee1d753 100644 --- a/include/video/auo_k190xfb.h +++ b/include/video/auo_k190xfb.h | |||
@@ -22,6 +22,8 @@ | |||
22 | */ | 22 | */ |
23 | #define AUOK190X_RESOLUTION_800_600 0 | 23 | #define AUOK190X_RESOLUTION_800_600 0 |
24 | #define AUOK190X_RESOLUTION_1024_768 1 | 24 | #define AUOK190X_RESOLUTION_1024_768 1 |
25 | #define AUOK190X_RESOLUTION_600_800 4 | ||
26 | #define AUOK190X_RESOLUTION_768_1024 5 | ||
25 | 27 | ||
26 | /* | 28 | /* |
27 | * struct used by auok190x. board specific stuff comes from *board | 29 | * struct used by auok190x. board specific stuff comes from *board |
@@ -98,7 +100,6 @@ struct auok190x_board { | |||
98 | int gpio_nbusy; | 100 | int gpio_nbusy; |
99 | 101 | ||
100 | int resolution; | 102 | int resolution; |
101 | int rotation; | ||
102 | int quirks; | 103 | int quirks; |
103 | int fps; | 104 | int fps; |
104 | }; | 105 | }; |
diff --git a/include/video/display_timing.h b/include/video/display_timing.h index 71e9a383a981..5d0259b08e01 100644 --- a/include/video/display_timing.h +++ b/include/video/display_timing.h | |||
@@ -12,19 +12,22 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | /* VESA display monitor timing parameters */ | 15 | enum display_flags { |
16 | #define VESA_DMT_HSYNC_LOW BIT(0) | 16 | DISPLAY_FLAGS_HSYNC_LOW = BIT(0), |
17 | #define VESA_DMT_HSYNC_HIGH BIT(1) | 17 | DISPLAY_FLAGS_HSYNC_HIGH = BIT(1), |
18 | #define VESA_DMT_VSYNC_LOW BIT(2) | 18 | DISPLAY_FLAGS_VSYNC_LOW = BIT(2), |
19 | #define VESA_DMT_VSYNC_HIGH BIT(3) | 19 | DISPLAY_FLAGS_VSYNC_HIGH = BIT(3), |
20 | 20 | ||
21 | /* display specific flags */ | 21 | /* data enable flag */ |
22 | #define DISPLAY_FLAGS_DE_LOW BIT(0) /* data enable flag */ | 22 | DISPLAY_FLAGS_DE_LOW = BIT(4), |
23 | #define DISPLAY_FLAGS_DE_HIGH BIT(1) | 23 | DISPLAY_FLAGS_DE_HIGH = BIT(5), |
24 | #define DISPLAY_FLAGS_PIXDATA_POSEDGE BIT(2) /* drive data on pos. edge */ | 24 | /* drive data on pos. edge */ |
25 | #define DISPLAY_FLAGS_PIXDATA_NEGEDGE BIT(3) /* drive data on neg. edge */ | 25 | DISPLAY_FLAGS_PIXDATA_POSEDGE = BIT(6), |
26 | #define DISPLAY_FLAGS_INTERLACED BIT(4) | 26 | /* drive data on neg. edge */ |
27 | #define DISPLAY_FLAGS_DOUBLESCAN BIT(5) | 27 | DISPLAY_FLAGS_PIXDATA_NEGEDGE = BIT(7), |
28 | DISPLAY_FLAGS_INTERLACED = BIT(8), | ||
29 | DISPLAY_FLAGS_DOUBLESCAN = BIT(9), | ||
30 | }; | ||
28 | 31 | ||
29 | /* | 32 | /* |
30 | * A single signal can be specified via a range of minimal and maximal values | 33 | * A single signal can be specified via a range of minimal and maximal values |
@@ -36,12 +39,6 @@ struct timing_entry { | |||
36 | u32 max; | 39 | u32 max; |
37 | }; | 40 | }; |
38 | 41 | ||
39 | enum timing_entry_index { | ||
40 | TE_MIN = 0, | ||
41 | TE_TYP = 1, | ||
42 | TE_MAX = 2, | ||
43 | }; | ||
44 | |||
45 | /* | 42 | /* |
46 | * Single "mode" entry. This describes one set of signal timings a display can | 43 | * Single "mode" entry. This describes one set of signal timings a display can |
47 | * have in one setting. This struct can later be converted to struct videomode | 44 | * have in one setting. This struct can later be converted to struct videomode |
@@ -72,8 +69,7 @@ struct display_timing { | |||
72 | struct timing_entry vback_porch; /* ver. back porch */ | 69 | struct timing_entry vback_porch; /* ver. back porch */ |
73 | struct timing_entry vsync_len; /* ver. sync len */ | 70 | struct timing_entry vsync_len; /* ver. sync len */ |
74 | 71 | ||
75 | unsigned int dmt_flags; /* VESA DMT flags */ | 72 | enum display_flags flags; /* display flags */ |
76 | unsigned int data_flags; /* video data flags */ | ||
77 | }; | 73 | }; |
78 | 74 | ||
79 | /* | 75 | /* |
@@ -89,25 +85,6 @@ struct display_timings { | |||
89 | struct display_timing **timings; | 85 | struct display_timing **timings; |
90 | }; | 86 | }; |
91 | 87 | ||
92 | /* get value specified by index from struct timing_entry */ | ||
93 | static inline u32 display_timing_get_value(const struct timing_entry *te, | ||
94 | enum timing_entry_index index) | ||
95 | { | ||
96 | switch (index) { | ||
97 | case TE_MIN: | ||
98 | return te->min; | ||
99 | break; | ||
100 | case TE_TYP: | ||
101 | return te->typ; | ||
102 | break; | ||
103 | case TE_MAX: | ||
104 | return te->max; | ||
105 | break; | ||
106 | default: | ||
107 | return te->typ; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | /* get one entry from struct display_timings */ | 88 | /* get one entry from struct display_timings */ |
112 | static inline struct display_timing *display_timings_get(const struct | 89 | static inline struct display_timing *display_timings_get(const struct |
113 | display_timings *disp, | 90 | display_timings *disp, |
diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h index ad3bdfe743b2..23864b284147 100644 --- a/include/video/platform_lcd.h +++ b/include/video/platform_lcd.h | |||
@@ -15,6 +15,7 @@ struct plat_lcd_data; | |||
15 | struct fb_info; | 15 | struct fb_info; |
16 | 16 | ||
17 | struct plat_lcd_data { | 17 | struct plat_lcd_data { |
18 | int (*probe)(struct plat_lcd_data *); | ||
18 | void (*set_power)(struct plat_lcd_data *, unsigned int power); | 19 | void (*set_power)(struct plat_lcd_data *, unsigned int power); |
19 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); | 20 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); |
20 | }; | 21 | }; |
diff --git a/include/video/videomode.h b/include/video/videomode.h index a42156234dd4..3f1049d870d5 100644 --- a/include/video/videomode.h +++ b/include/video/videomode.h | |||
@@ -29,20 +29,30 @@ struct videomode { | |||
29 | u32 vback_porch; | 29 | u32 vback_porch; |
30 | u32 vsync_len; | 30 | u32 vsync_len; |
31 | 31 | ||
32 | unsigned int dmt_flags; /* VESA DMT flags */ | 32 | enum display_flags flags; /* display flags */ |
33 | unsigned int data_flags; /* video data flags */ | ||
34 | }; | 33 | }; |
35 | 34 | ||
36 | /** | 35 | /** |
37 | * videomode_from_timing - convert display timing to videomode | 36 | * videomode_from_timing - convert display timing to videomode |
37 | * @dt: display_timing structure | ||
38 | * @vm: return value | ||
39 | * | ||
40 | * DESCRIPTION: | ||
41 | * This function converts a struct display_timing to a struct videomode. | ||
42 | */ | ||
43 | void videomode_from_timing(const struct display_timing *dt, | ||
44 | struct videomode *vm); | ||
45 | |||
46 | /** | ||
47 | * videomode_from_timings - convert one display timings entry to videomode | ||
38 | * @disp: structure with all possible timing entries | 48 | * @disp: structure with all possible timing entries |
39 | * @vm: return value | 49 | * @vm: return value |
40 | * @index: index into the list of display timings in devicetree | 50 | * @index: index into the list of display timings in devicetree |
41 | * | 51 | * |
42 | * DESCRIPTION: | 52 | * DESCRIPTION: |
43 | * This function converts a struct display_timing to a struct videomode. | 53 | * This function converts one struct display_timing entry to a struct videomode. |
44 | */ | 54 | */ |
45 | int videomode_from_timing(const struct display_timings *disp, | 55 | int videomode_from_timings(const struct display_timings *disp, |
46 | struct videomode *vm, unsigned int index); | 56 | struct videomode *vm, unsigned int index); |
47 | 57 | ||
48 | #endif | 58 | #endif |
diff --git a/include/xen/events.h b/include/xen/events.h index c6bfe01acf6b..b2b27c6a0f7b 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -90,8 +90,7 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi, | |||
90 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); | 90 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); |
91 | /* Bind an PSI pirq to an irq. */ | 91 | /* Bind an PSI pirq to an irq. */ |
92 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, | 92 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, |
93 | int pirq, int vector, const char *name, | 93 | int pirq, const char *name, domid_t domid); |
94 | domid_t domid); | ||
95 | #endif | 94 | #endif |
96 | 95 | ||
97 | /* De-allocates the above mentioned physical interrupt. */ | 96 | /* De-allocates the above mentioned physical interrupt. */ |
diff --git a/include/xen/tmem.h b/include/xen/tmem.h index 591550a22ac7..3930a90045ff 100644 --- a/include/xen/tmem.h +++ b/include/xen/tmem.h | |||
@@ -3,7 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #ifdef CONFIG_XEN_TMEM_MODULE | ||
7 | #define tmem_enabled true | ||
8 | #else | ||
6 | /* defined in drivers/xen/tmem.c */ | 9 | /* defined in drivers/xen/tmem.c */ |
7 | extern bool tmem_enabled; | 10 | extern bool tmem_enabled; |
11 | #endif | ||
12 | |||
13 | #ifdef CONFIG_XEN_SELFBALLOONING | ||
14 | extern int xen_selfballoon_init(bool, bool); | ||
15 | #endif | ||
8 | 16 | ||
9 | #endif /* _XEN_TMEM_H */ | 17 | #endif /* _XEN_TMEM_H */ |