diff options
Diffstat (limited to 'include')
74 files changed, 1278 insertions, 346 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 4de84ce3a927..359ef11725a6 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -184,7 +184,7 @@ struct acpi_device_pnp { | |||
184 | 184 | ||
185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) | 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) |
186 | #define acpi_device_adr(d) ((d)->pnp.bus_address) | 186 | #define acpi_device_adr(d) ((d)->pnp.bus_address) |
187 | char *acpi_device_hid(struct acpi_device *device); | 187 | const char *acpi_device_hid(struct acpi_device *device); |
188 | #define acpi_device_name(d) ((d)->pnp.device_name) | 188 | #define acpi_device_name(d) ((d)->pnp.device_name) |
189 | #define acpi_device_class(d) ((d)->pnp.device_class) | 189 | #define acpi_device_class(d) ((d)->pnp.device_class) |
190 | 190 | ||
@@ -389,21 +389,25 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | |||
389 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | 389 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); |
390 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 390 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
391 | 391 | ||
392 | #ifdef CONFIG_PM_SLEEP | 392 | #ifdef CONFIG_PM_OPS |
393 | int acpi_pm_device_sleep_state(struct device *, int *); | 393 | int acpi_pm_device_sleep_state(struct device *, int *); |
394 | int acpi_pm_device_sleep_wake(struct device *, bool); | 394 | #else |
395 | #else /* !CONFIG_PM_SLEEP */ | ||
396 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p) | 395 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p) |
397 | { | 396 | { |
398 | if (p) | 397 | if (p) |
399 | *p = ACPI_STATE_D0; | 398 | *p = ACPI_STATE_D0; |
400 | return ACPI_STATE_D3; | 399 | return ACPI_STATE_D3; |
401 | } | 400 | } |
401 | #endif | ||
402 | |||
403 | #ifdef CONFIG_PM_SLEEP | ||
404 | int acpi_pm_device_sleep_wake(struct device *, bool); | ||
405 | #else | ||
402 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 406 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
403 | { | 407 | { |
404 | return -ENODEV; | 408 | return -ENODEV; |
405 | } | 409 | } |
406 | #endif /* !CONFIG_PM_SLEEP */ | 410 | #endif |
407 | 411 | ||
408 | #endif /* CONFIG_ACPI */ | 412 | #endif /* CONFIG_ACPI */ |
409 | 413 | ||
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 23d78b4d088b..3090471b2a5e 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -115,8 +115,6 @@ void pci_acpi_crs_quirks(void); | |||
115 | #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 | 115 | #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 |
116 | #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 | 116 | #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 |
117 | 117 | ||
118 | int acpi_processor_set_thermal_limit(acpi_handle handle, int type); | ||
119 | |||
120 | /*-------------------------------------------------------------------------- | 118 | /*-------------------------------------------------------------------------- |
121 | Dock Station | 119 | Dock Station |
122 | -------------------------------------------------------------------------- */ | 120 | -------------------------------------------------------------------------- */ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 29bf945143e8..65b3f5888f42 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -98,8 +98,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table, | |||
98 | /* | 98 | /* |
99 | * Spinlock primitives | 99 | * Spinlock primitives |
100 | */ | 100 | */ |
101 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); | ||
102 | |||
103 | void acpi_os_delete_lock(acpi_spinlock handle); | 101 | void acpi_os_delete_lock(acpi_spinlock handle); |
104 | 102 | ||
105 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); | 103 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); |
@@ -223,25 +221,15 @@ acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); | |||
223 | */ | 221 | */ |
224 | acpi_status | 222 | acpi_status |
225 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, | 223 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, |
226 | u32 reg, u32 *value, u32 width); | 224 | u32 reg, u64 *value, u32 width); |
227 | 225 | ||
228 | acpi_status | 226 | acpi_status |
229 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, | 227 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, |
230 | u32 reg, u64 value, u32 width); | 228 | u32 reg, u64 value, u32 width); |
231 | 229 | ||
232 | /* | 230 | /* |
233 | * Interim function needed for PCI IRQ routing | ||
234 | */ | ||
235 | void | ||
236 | acpi_os_derive_pci_id(acpi_handle device, | ||
237 | acpi_handle region, struct acpi_pci_id **pci_id); | ||
238 | |||
239 | /* | ||
240 | * Miscellaneous | 231 | * Miscellaneous |
241 | */ | 232 | */ |
242 | acpi_status acpi_os_validate_interface(char *interface); | ||
243 | acpi_status acpi_osi_invalidate(char* interface); | ||
244 | |||
245 | acpi_status | 233 | acpi_status |
246 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | 234 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, |
247 | acpi_size length, char *name); | 235 | acpi_size length, char *name); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 984cdc62e30b..53b7cfd924a3 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
49 | 49 | ||
50 | #define ACPI_CA_VERSION 0x20100702 | 50 | #define ACPI_CA_VERSION 0x20101013 |
51 | 51 | ||
52 | #include "actypes.h" | 52 | #include "actypes.h" |
53 | #include "actbl.h" | 53 | #include "actbl.h" |
@@ -72,6 +72,7 @@ extern u8 acpi_gbl_truncate_io_addresses; | |||
72 | 72 | ||
73 | extern u32 acpi_current_gpe_count; | 73 | extern u32 acpi_current_gpe_count; |
74 | extern struct acpi_table_fadt acpi_gbl_FADT; | 74 | extern struct acpi_table_fadt acpi_gbl_FADT; |
75 | extern u8 acpi_gbl_system_awake_and_running; | ||
75 | 76 | ||
76 | extern u32 acpi_rsdt_forced; | 77 | extern u32 acpi_rsdt_forced; |
77 | /* | 78 | /* |
@@ -105,6 +106,10 @@ const char *acpi_format_exception(acpi_status exception); | |||
105 | 106 | ||
106 | acpi_status acpi_purge_cached_objects(void); | 107 | acpi_status acpi_purge_cached_objects(void); |
107 | 108 | ||
109 | acpi_status acpi_install_interface(acpi_string interface_name); | ||
110 | |||
111 | acpi_status acpi_remove_interface(acpi_string interface_name); | ||
112 | |||
108 | /* | 113 | /* |
109 | * ACPI Memory management | 114 | * ACPI Memory management |
110 | */ | 115 | */ |
@@ -263,6 +268,8 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
263 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 268 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
264 | #endif | 269 | #endif |
265 | 270 | ||
271 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); | ||
272 | |||
266 | /* | 273 | /* |
267 | * Event interfaces | 274 | * Event interfaces |
268 | */ | 275 | */ |
@@ -308,6 +315,8 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
308 | 315 | ||
309 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); | 316 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); |
310 | 317 | ||
318 | acpi_status acpi_update_gpes(void); | ||
319 | |||
311 | /* | 320 | /* |
312 | * Resource interfaces | 321 | * Resource interfaces |
313 | */ | 322 | */ |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 5db8f472fec9..2b134b691e34 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -115,7 +115,6 @@ | |||
115 | * | 115 | * |
116 | * ACPI_SIZE 16/32/64-bit unsigned value | 116 | * ACPI_SIZE 16/32/64-bit unsigned value |
117 | * ACPI_NATIVE_INT 16/32/64-bit signed value | 117 | * ACPI_NATIVE_INT 16/32/64-bit signed value |
118 | * | ||
119 | */ | 118 | */ |
120 | 119 | ||
121 | /******************************************************************************* | 120 | /******************************************************************************* |
@@ -132,6 +131,16 @@ typedef COMPILER_DEPENDENT_INT64 INT64; | |||
132 | 131 | ||
133 | /*! [End] no source code translation !*/ | 132 | /*! [End] no source code translation !*/ |
134 | 133 | ||
134 | /* | ||
135 | * Value returned by acpi_os_get_thread_id. There is no standard "thread_id" | ||
136 | * across operating systems or even the various UNIX systems. Since ACPICA | ||
137 | * only needs the thread ID as a unique thread identifier, we use a u64 | ||
138 | * as the only common data type - it will accommodate any type of pointer or | ||
139 | * any type of integer. It is up to the host-dependent OSL to cast the | ||
140 | * native thread ID type to a u64 (in acpi_os_get_thread_id). | ||
141 | */ | ||
142 | #define acpi_thread_id u64 | ||
143 | |||
135 | /******************************************************************************* | 144 | /******************************************************************************* |
136 | * | 145 | * |
137 | * Types specific to 64-bit targets | 146 | * Types specific to 64-bit targets |
@@ -211,12 +220,6 @@ typedef u32 acpi_physical_address; | |||
211 | * | 220 | * |
212 | ******************************************************************************/ | 221 | ******************************************************************************/ |
213 | 222 | ||
214 | /* Value returned by acpi_os_get_thread_id */ | ||
215 | |||
216 | #ifndef acpi_thread_id | ||
217 | #define acpi_thread_id acpi_size | ||
218 | #endif | ||
219 | |||
220 | /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ | 223 | /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ |
221 | 224 | ||
222 | #ifndef acpi_cpu_flags | 225 | #ifndef acpi_cpu_flags |
@@ -375,16 +378,6 @@ typedef void *acpi_handle; /* Actually a ptr to a NS Node */ | |||
375 | typedef u8 acpi_owner_id; | 378 | typedef u8 acpi_owner_id; |
376 | #define ACPI_OWNER_ID_MAX 0xFF | 379 | #define ACPI_OWNER_ID_MAX 0xFF |
377 | 380 | ||
378 | struct uint64_struct { | ||
379 | u32 lo; | ||
380 | u32 hi; | ||
381 | }; | ||
382 | |||
383 | union uint64_overlay { | ||
384 | u64 full; | ||
385 | struct uint64_struct part; | ||
386 | }; | ||
387 | |||
388 | #define ACPI_INTEGER_BIT_SIZE 64 | 381 | #define ACPI_INTEGER_BIT_SIZE 64 |
389 | #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ | 382 | #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ |
390 | 383 | ||
@@ -950,6 +943,9 @@ acpi_status(*acpi_walk_callback) (acpi_handle object, | |||
950 | u32 nesting_level, | 943 | u32 nesting_level, |
951 | void *context, void **return_value); | 944 | void *context, void **return_value); |
952 | 945 | ||
946 | typedef | ||
947 | u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); | ||
948 | |||
953 | /* Interrupt handler return values */ | 949 | /* Interrupt handler return values */ |
954 | 950 | ||
955 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 | 951 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index c05aeba9e8f0..a3e334ab1119 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -193,6 +193,12 @@ | |||
193 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE | 193 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | /* "inline" keywords - configurable since inline is not standardized */ | ||
197 | |||
198 | #ifndef ACPI_INLINE | ||
199 | #define ACPI_INLINE | ||
200 | #endif | ||
201 | |||
196 | /* | 202 | /* |
197 | * Debugger threading model | 203 | * Debugger threading model |
198 | * Use single threaded if the entire subsystem is contained in an application | 204 | * Use single threaded if the entire subsystem is contained in an application |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 0cd53e3cd1a3..5dcb9537343c 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -44,6 +44,8 @@ | |||
44 | #ifndef __ACGCC_H__ | 44 | #ifndef __ACGCC_H__ |
45 | #define __ACGCC_H__ | 45 | #define __ACGCC_H__ |
46 | 46 | ||
47 | #define ACPI_INLINE __inline__ | ||
48 | |||
47 | /* Function name is used for debug output. Non-ANSI, compiler-dependent */ | 49 | /* Function name is used for debug output. Non-ANSI, compiler-dependent */ |
48 | 50 | ||
49 | #define ACPI_GET_FUNCTION_NAME __func__ | 51 | #define ACPI_GET_FUNCTION_NAME __func__ |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 103f08aca764..572189e37133 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -75,7 +75,6 @@ | |||
75 | #define acpi_cache_t struct kmem_cache | 75 | #define acpi_cache_t struct kmem_cache |
76 | #define acpi_spinlock spinlock_t * | 76 | #define acpi_spinlock spinlock_t * |
77 | #define acpi_cpu_flags unsigned long | 77 | #define acpi_cpu_flags unsigned long |
78 | #define acpi_thread_id struct task_struct * | ||
79 | 78 | ||
80 | #else /* !__KERNEL__ */ | 79 | #else /* !__KERNEL__ */ |
81 | 80 | ||
@@ -88,7 +87,7 @@ | |||
88 | /* Host-dependent types and defines for user-space ACPICA */ | 87 | /* Host-dependent types and defines for user-space ACPICA */ |
89 | 88 | ||
90 | #define ACPI_FLUSH_CPU_CACHE() | 89 | #define ACPI_FLUSH_CPU_CACHE() |
91 | #define acpi_thread_id pthread_t | 90 | #define ACPI_CAST_PTHREAD_T(pthread) ((acpi_thread_id) (pthread)) |
92 | 91 | ||
93 | #if defined(__ia64__) || defined(__x86_64__) | 92 | #if defined(__ia64__) || defined(__x86_64__) |
94 | #define ACPI_MACHINE_WIDTH 64 | 93 | #define ACPI_MACHINE_WIDTH 64 |
@@ -113,12 +112,13 @@ | |||
113 | 112 | ||
114 | 113 | ||
115 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
115 | #include <acpi/actypes.h> | ||
116 | /* | 116 | /* |
117 | * Overrides for in-kernel ACPICA | 117 | * Overrides for in-kernel ACPICA |
118 | */ | 118 | */ |
119 | static inline acpi_thread_id acpi_os_get_thread_id(void) | 119 | static inline acpi_thread_id acpi_os_get_thread_id(void) |
120 | { | 120 | { |
121 | return current; | 121 | return (acpi_thread_id)(unsigned long)current; |
122 | } | 122 | } |
123 | 123 | ||
124 | /* | 124 | /* |
@@ -127,7 +127,6 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) | |||
127 | * However, boot has (system_state != SYSTEM_RUNNING) | 127 | * However, boot has (system_state != SYSTEM_RUNNING) |
128 | * to quiet __might_sleep() in kmalloc() and resume does not. | 128 | * to quiet __might_sleep() in kmalloc() and resume does not. |
129 | */ | 129 | */ |
130 | #include <acpi/actypes.h> | ||
131 | static inline void *acpi_os_allocate(acpi_size size) | 130 | static inline void *acpi_os_allocate(acpi_size size) |
132 | { | 131 | { |
133 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | 132 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index f4229fb315e1..2c0fc10956ba 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -150,6 +150,7 @@ | |||
150 | #define DATA_DATA \ | 150 | #define DATA_DATA \ |
151 | *(.data) \ | 151 | *(.data) \ |
152 | *(.ref.data) \ | 152 | *(.ref.data) \ |
153 | *(.data..shared_aligned) /* percpu related */ \ | ||
153 | DEV_KEEP(init.data) \ | 154 | DEV_KEEP(init.data) \ |
154 | DEV_KEEP(exit.data) \ | 155 | DEV_KEEP(exit.data) \ |
155 | CPU_KEEP(init.data) \ | 156 | CPU_KEEP(init.data) \ |
@@ -636,7 +637,7 @@ | |||
636 | 637 | ||
637 | #ifdef CONFIG_BLK_DEV_INITRD | 638 | #ifdef CONFIG_BLK_DEV_INITRD |
638 | #define INIT_RAM_FS \ | 639 | #define INIT_RAM_FS \ |
639 | . = ALIGN(PAGE_SIZE); \ | 640 | . = ALIGN(4); \ |
640 | VMLINUX_SYMBOL(__initramfs_start) = .; \ | 641 | VMLINUX_SYMBOL(__initramfs_start) = .; \ |
641 | *(.init.ramfs) \ | 642 | *(.init.ramfs) \ |
642 | VMLINUX_SYMBOL(__initramfs_end) = .; | 643 | VMLINUX_SYMBOL(__initramfs_end) = .; |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index c227757feb06..050a7bccb836 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -245,8 +245,6 @@ int acpi_check_resource_conflict(const struct resource *res); | |||
245 | 245 | ||
246 | int acpi_check_region(resource_size_t start, resource_size_t n, | 246 | int acpi_check_region(resource_size_t start, resource_size_t n, |
247 | const char *name); | 247 | const char *name); |
248 | int acpi_check_mem_region(resource_size_t start, resource_size_t n, | ||
249 | const char *name); | ||
250 | 248 | ||
251 | int acpi_resources_are_enforced(void); | 249 | int acpi_resources_are_enforced(void); |
252 | 250 | ||
@@ -308,6 +306,9 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | |||
308 | u32 *mask, u32 req); | 306 | u32 *mask, u32 req); |
309 | extern void acpi_early_init(void); | 307 | extern void acpi_early_init(void); |
310 | 308 | ||
309 | int acpi_os_map_generic_address(struct acpi_generic_address *addr); | ||
310 | void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); | ||
311 | |||
311 | #else /* !CONFIG_ACPI */ | 312 | #else /* !CONFIG_ACPI */ |
312 | 313 | ||
313 | #define acpi_disabled 1 | 314 | #define acpi_disabled 1 |
@@ -344,12 +345,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n, | |||
344 | return 0; | 345 | return 0; |
345 | } | 346 | } |
346 | 347 | ||
347 | static inline int acpi_check_mem_region(resource_size_t start, | ||
348 | resource_size_t n, const char *name) | ||
349 | { | ||
350 | return 0; | ||
351 | } | ||
352 | |||
353 | struct acpi_table_header; | 348 | struct acpi_table_header; |
354 | static inline int acpi_table_parse(char *id, | 349 | static inline int acpi_table_parse(char *id, |
355 | int (*handler)(struct acpi_table_header *)) | 350 | int (*handler)(struct acpi_table_header *)) |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 35b00746c712..4ce34fa937d4 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -111,6 +111,7 @@ void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | |||
111 | 111 | ||
112 | extern spinlock_t bdi_lock; | 112 | extern spinlock_t bdi_lock; |
113 | extern struct list_head bdi_list; | 113 | extern struct list_head bdi_list; |
114 | extern struct list_head bdi_pending_list; | ||
114 | 115 | ||
115 | static inline int wb_has_dirty_io(struct bdi_writeback *wb) | 116 | static inline int wb_has_dirty_io(struct bdi_writeback *wb) |
116 | { | 117 | { |
@@ -285,7 +286,7 @@ enum { | |||
285 | void clear_bdi_congested(struct backing_dev_info *bdi, int sync); | 286 | void clear_bdi_congested(struct backing_dev_info *bdi, int sync); |
286 | void set_bdi_congested(struct backing_dev_info *bdi, int sync); | 287 | void set_bdi_congested(struct backing_dev_info *bdi, int sync); |
287 | long congestion_wait(int sync, long timeout); | 288 | long congestion_wait(int sync, long timeout); |
288 | 289 | long wait_iff_congested(struct zone *zone, int sync, long timeout); | |
289 | 290 | ||
290 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) | 291 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) |
291 | { | 292 | { |
diff --git a/include/linux/bfin_mac.h b/include/linux/bfin_mac.h new file mode 100644 index 000000000000..904dec7d03a1 --- /dev/null +++ b/include/linux/bfin_mac.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Blackfin On-Chip MAC Driver | ||
3 | * | ||
4 | * Copyright 2004-2010 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | */ | ||
10 | |||
11 | #ifndef _LINUX_BFIN_MAC_H_ | ||
12 | #define _LINUX_BFIN_MAC_H_ | ||
13 | |||
14 | #include <linux/phy.h> | ||
15 | |||
16 | struct bfin_phydev_platform_data { | ||
17 | unsigned short addr; | ||
18 | int irq; | ||
19 | }; | ||
20 | |||
21 | struct bfin_mii_bus_platform_data { | ||
22 | int phydev_number; | ||
23 | struct bfin_phydev_platform_data *phydev_data; | ||
24 | const unsigned short *mac_peripherals; | ||
25 | int phy_mode; | ||
26 | unsigned int phy_mask; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/linux/completion.h b/include/linux/completion.h index 51e3145196f6..36d57f74cd01 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h | |||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | #include <linux/wait.h> | 11 | #include <linux/wait.h> |
12 | 12 | ||
13 | /** | 13 | /* |
14 | * struct completion - structure used to maintain state for a "completion" | 14 | * struct completion - structure used to maintain state for a "completion" |
15 | * | 15 | * |
16 | * This is the opaque structure used to maintain the state for a "completion". | 16 | * This is the opaque structure used to maintain the state for a "completion". |
@@ -34,7 +34,7 @@ struct completion { | |||
34 | ({ init_completion(&work); work; }) | 34 | ({ init_completion(&work); work; }) |
35 | 35 | ||
36 | /** | 36 | /** |
37 | * DECLARE_COMPLETION: - declare and initialize a completion structure | 37 | * DECLARE_COMPLETION - declare and initialize a completion structure |
38 | * @work: identifier for the completion structure | 38 | * @work: identifier for the completion structure |
39 | * | 39 | * |
40 | * This macro declares and initializes a completion structure. Generally used | 40 | * This macro declares and initializes a completion structure. Generally used |
@@ -50,7 +50,7 @@ struct completion { | |||
50 | * are on the kernel stack: | 50 | * are on the kernel stack: |
51 | */ | 51 | */ |
52 | /** | 52 | /** |
53 | * DECLARE_COMPLETION_ONSTACK: - declare and initialize a completion structure | 53 | * DECLARE_COMPLETION_ONSTACK - declare and initialize a completion structure |
54 | * @work: identifier for the completion structure | 54 | * @work: identifier for the completion structure |
55 | * | 55 | * |
56 | * This macro declares and initializes a completion structure on the kernel | 56 | * This macro declares and initializes a completion structure on the kernel |
@@ -64,7 +64,7 @@ struct completion { | |||
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * init_completion: - Initialize a dynamically allocated completion | 67 | * init_completion - Initialize a dynamically allocated completion |
68 | * @x: completion structure that is to be initialized | 68 | * @x: completion structure that is to be initialized |
69 | * | 69 | * |
70 | * This inline function will initialize a dynamically created completion | 70 | * This inline function will initialize a dynamically created completion |
@@ -92,7 +92,7 @@ extern void complete(struct completion *); | |||
92 | extern void complete_all(struct completion *); | 92 | extern void complete_all(struct completion *); |
93 | 93 | ||
94 | /** | 94 | /** |
95 | * INIT_COMPLETION: - reinitialize a completion structure | 95 | * INIT_COMPLETION - reinitialize a completion structure |
96 | * @x: completion structure to be reinitialized | 96 | * @x: completion structure to be reinitialized |
97 | * | 97 | * |
98 | * This macro should be used to reinitialize a completion structure so it can | 98 | * This macro should be used to reinitialize a completion structure so it can |
diff --git a/include/linux/fs.h b/include/linux/fs.h index f300a6508818..240eb1d4f876 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -234,6 +234,7 @@ struct inodes_stat_t { | |||
234 | #define S_NOCMTIME 128 /* Do not update file c/mtime */ | 234 | #define S_NOCMTIME 128 /* Do not update file c/mtime */ |
235 | #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ | 235 | #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ |
236 | #define S_PRIVATE 512 /* Inode is fs-internal */ | 236 | #define S_PRIVATE 512 /* Inode is fs-internal */ |
237 | #define S_IMA 1024 /* Inode has an associated IMA struct */ | ||
237 | 238 | ||
238 | /* | 239 | /* |
239 | * Note that nosuid etc flags are inode-specific: setting some file-system | 240 | * Note that nosuid etc flags are inode-specific: setting some file-system |
@@ -268,6 +269,7 @@ struct inodes_stat_t { | |||
268 | #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) | 269 | #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) |
269 | #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) | 270 | #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) |
270 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) | 271 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) |
272 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) | ||
271 | 273 | ||
272 | /* the read-only stuff doesn't really belong here, but any other place is | 274 | /* the read-only stuff doesn't really belong here, but any other place is |
273 | probably as bad and I don't want to create yet another include file. */ | 275 | probably as bad and I don't want to create yet another include file. */ |
@@ -776,6 +778,10 @@ struct inode { | |||
776 | 778 | ||
777 | unsigned int i_flags; | 779 | unsigned int i_flags; |
778 | 780 | ||
781 | #ifdef CONFIG_IMA | ||
782 | /* protected by i_lock */ | ||
783 | unsigned int i_readcount; /* struct files open RO */ | ||
784 | #endif | ||
779 | atomic_t i_writecount; | 785 | atomic_t i_writecount; |
780 | #ifdef CONFIG_SECURITY | 786 | #ifdef CONFIG_SECURITY |
781 | void *i_security; | 787 | void *i_security; |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 975609cb8548..e8713d55360a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -9,6 +9,32 @@ | |||
9 | 9 | ||
10 | struct vm_area_struct; | 10 | struct vm_area_struct; |
11 | 11 | ||
12 | /* Plain integer GFP bitmasks. Do not use this directly. */ | ||
13 | #define ___GFP_DMA 0x01u | ||
14 | #define ___GFP_HIGHMEM 0x02u | ||
15 | #define ___GFP_DMA32 0x04u | ||
16 | #define ___GFP_MOVABLE 0x08u | ||
17 | #define ___GFP_WAIT 0x10u | ||
18 | #define ___GFP_HIGH 0x20u | ||
19 | #define ___GFP_IO 0x40u | ||
20 | #define ___GFP_FS 0x80u | ||
21 | #define ___GFP_COLD 0x100u | ||
22 | #define ___GFP_NOWARN 0x200u | ||
23 | #define ___GFP_REPEAT 0x400u | ||
24 | #define ___GFP_NOFAIL 0x800u | ||
25 | #define ___GFP_NORETRY 0x1000u | ||
26 | #define ___GFP_COMP 0x4000u | ||
27 | #define ___GFP_ZERO 0x8000u | ||
28 | #define ___GFP_NOMEMALLOC 0x10000u | ||
29 | #define ___GFP_HARDWALL 0x20000u | ||
30 | #define ___GFP_THISNODE 0x40000u | ||
31 | #define ___GFP_RECLAIMABLE 0x80000u | ||
32 | #ifdef CONFIG_KMEMCHECK | ||
33 | #define ___GFP_NOTRACK 0x200000u | ||
34 | #else | ||
35 | #define ___GFP_NOTRACK 0 | ||
36 | #endif | ||
37 | |||
12 | /* | 38 | /* |
13 | * GFP bitmasks.. | 39 | * GFP bitmasks.. |
14 | * | 40 | * |
@@ -18,10 +44,10 @@ struct vm_area_struct; | |||
18 | * without the underscores and use them consistently. The definitions here may | 44 | * without the underscores and use them consistently. The definitions here may |
19 | * be used in bit comparisons. | 45 | * be used in bit comparisons. |
20 | */ | 46 | */ |
21 | #define __GFP_DMA ((__force gfp_t)0x01u) | 47 | #define __GFP_DMA ((__force gfp_t)___GFP_DMA) |
22 | #define __GFP_HIGHMEM ((__force gfp_t)0x02u) | 48 | #define __GFP_HIGHMEM ((__force gfp_t)___GFP_HIGHMEM) |
23 | #define __GFP_DMA32 ((__force gfp_t)0x04u) | 49 | #define __GFP_DMA32 ((__force gfp_t)___GFP_DMA32) |
24 | #define __GFP_MOVABLE ((__force gfp_t)0x08u) /* Page is movable */ | 50 | #define __GFP_MOVABLE ((__force gfp_t)___GFP_MOVABLE) /* Page is movable */ |
25 | #define GFP_ZONEMASK (__GFP_DMA|__GFP_HIGHMEM|__GFP_DMA32|__GFP_MOVABLE) | 51 | #define GFP_ZONEMASK (__GFP_DMA|__GFP_HIGHMEM|__GFP_DMA32|__GFP_MOVABLE) |
26 | /* | 52 | /* |
27 | * Action modifiers - doesn't change the zoning | 53 | * Action modifiers - doesn't change the zoning |
@@ -38,27 +64,22 @@ struct vm_area_struct; | |||
38 | * __GFP_MOVABLE: Flag that this page will be movable by the page migration | 64 | * __GFP_MOVABLE: Flag that this page will be movable by the page migration |
39 | * mechanism or reclaimed | 65 | * mechanism or reclaimed |
40 | */ | 66 | */ |
41 | #define __GFP_WAIT ((__force gfp_t)0x10u) /* Can wait and reschedule? */ | 67 | #define __GFP_WAIT ((__force gfp_t)___GFP_WAIT) /* Can wait and reschedule? */ |
42 | #define __GFP_HIGH ((__force gfp_t)0x20u) /* Should access emergency pools? */ | 68 | #define __GFP_HIGH ((__force gfp_t)___GFP_HIGH) /* Should access emergency pools? */ |
43 | #define __GFP_IO ((__force gfp_t)0x40u) /* Can start physical IO? */ | 69 | #define __GFP_IO ((__force gfp_t)___GFP_IO) /* Can start physical IO? */ |
44 | #define __GFP_FS ((__force gfp_t)0x80u) /* Can call down to low-level FS? */ | 70 | #define __GFP_FS ((__force gfp_t)___GFP_FS) /* Can call down to low-level FS? */ |
45 | #define __GFP_COLD ((__force gfp_t)0x100u) /* Cache-cold page required */ | 71 | #define __GFP_COLD ((__force gfp_t)___GFP_COLD) /* Cache-cold page required */ |
46 | #define __GFP_NOWARN ((__force gfp_t)0x200u) /* Suppress page allocation failure warning */ | 72 | #define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN) /* Suppress page allocation failure warning */ |
47 | #define __GFP_REPEAT ((__force gfp_t)0x400u) /* See above */ | 73 | #define __GFP_REPEAT ((__force gfp_t)___GFP_REPEAT) /* See above */ |
48 | #define __GFP_NOFAIL ((__force gfp_t)0x800u) /* See above */ | 74 | #define __GFP_NOFAIL ((__force gfp_t)___GFP_NOFAIL) /* See above */ |
49 | #define __GFP_NORETRY ((__force gfp_t)0x1000u)/* See above */ | 75 | #define __GFP_NORETRY ((__force gfp_t)___GFP_NORETRY) /* See above */ |
50 | #define __GFP_COMP ((__force gfp_t)0x4000u)/* Add compound page metadata */ | 76 | #define __GFP_COMP ((__force gfp_t)___GFP_COMP) /* Add compound page metadata */ |
51 | #define __GFP_ZERO ((__force gfp_t)0x8000u)/* Return zeroed page on success */ | 77 | #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) /* Return zeroed page on success */ |
52 | #define __GFP_NOMEMALLOC ((__force gfp_t)0x10000u) /* Don't use emergency reserves */ | 78 | #define __GFP_NOMEMALLOC ((__force gfp_t)___GFP_NOMEMALLOC) /* Don't use emergency reserves */ |
53 | #define __GFP_HARDWALL ((__force gfp_t)0x20000u) /* Enforce hardwall cpuset memory allocs */ | 79 | #define __GFP_HARDWALL ((__force gfp_t)___GFP_HARDWALL) /* Enforce hardwall cpuset memory allocs */ |
54 | #define __GFP_THISNODE ((__force gfp_t)0x40000u)/* No fallback, no policies */ | 80 | #define __GFP_THISNODE ((__force gfp_t)___GFP_THISNODE)/* No fallback, no policies */ |
55 | #define __GFP_RECLAIMABLE ((__force gfp_t)0x80000u) /* Page is reclaimable */ | 81 | #define __GFP_RECLAIMABLE ((__force gfp_t)___GFP_RECLAIMABLE) /* Page is reclaimable */ |
56 | 82 | #define __GFP_NOTRACK ((__force gfp_t)___GFP_NOTRACK) /* Don't track with kmemcheck */ | |
57 | #ifdef CONFIG_KMEMCHECK | ||
58 | #define __GFP_NOTRACK ((__force gfp_t)0x200000u) /* Don't track with kmemcheck */ | ||
59 | #else | ||
60 | #define __GFP_NOTRACK ((__force gfp_t)0) | ||
61 | #endif | ||
62 | 83 | ||
63 | /* | 84 | /* |
64 | * This may seem redundant, but it's a way of annotating false positives vs. | 85 | * This may seem redundant, but it's a way of annotating false positives vs. |
@@ -186,14 +207,14 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
186 | #endif | 207 | #endif |
187 | 208 | ||
188 | #define GFP_ZONE_TABLE ( \ | 209 | #define GFP_ZONE_TABLE ( \ |
189 | (ZONE_NORMAL << 0 * ZONES_SHIFT) \ | 210 | (ZONE_NORMAL << 0 * ZONES_SHIFT) \ |
190 | | (OPT_ZONE_DMA << __GFP_DMA * ZONES_SHIFT) \ | 211 | | (OPT_ZONE_DMA << ___GFP_DMA * ZONES_SHIFT) \ |
191 | | (OPT_ZONE_HIGHMEM << __GFP_HIGHMEM * ZONES_SHIFT) \ | 212 | | (OPT_ZONE_HIGHMEM << ___GFP_HIGHMEM * ZONES_SHIFT) \ |
192 | | (OPT_ZONE_DMA32 << __GFP_DMA32 * ZONES_SHIFT) \ | 213 | | (OPT_ZONE_DMA32 << ___GFP_DMA32 * ZONES_SHIFT) \ |
193 | | (ZONE_NORMAL << __GFP_MOVABLE * ZONES_SHIFT) \ | 214 | | (ZONE_NORMAL << ___GFP_MOVABLE * ZONES_SHIFT) \ |
194 | | (OPT_ZONE_DMA << (__GFP_MOVABLE | __GFP_DMA) * ZONES_SHIFT) \ | 215 | | (OPT_ZONE_DMA << (___GFP_MOVABLE | ___GFP_DMA) * ZONES_SHIFT) \ |
195 | | (ZONE_MOVABLE << (__GFP_MOVABLE | __GFP_HIGHMEM) * ZONES_SHIFT)\ | 216 | | (ZONE_MOVABLE << (___GFP_MOVABLE | ___GFP_HIGHMEM) * ZONES_SHIFT) \ |
196 | | (OPT_ZONE_DMA32 << (__GFP_MOVABLE | __GFP_DMA32) * ZONES_SHIFT)\ | 217 | | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * ZONES_SHIFT) \ |
197 | ) | 218 | ) |
198 | 219 | ||
199 | /* | 220 | /* |
@@ -203,20 +224,20 @@ static inline int allocflags_to_migratetype(gfp_t gfp_flags) | |||
203 | * allowed. | 224 | * allowed. |
204 | */ | 225 | */ |
205 | #define GFP_ZONE_BAD ( \ | 226 | #define GFP_ZONE_BAD ( \ |
206 | 1 << (__GFP_DMA | __GFP_HIGHMEM) \ | 227 | 1 << (___GFP_DMA | ___GFP_HIGHMEM) \ |
207 | | 1 << (__GFP_DMA | __GFP_DMA32) \ | 228 | | 1 << (___GFP_DMA | ___GFP_DMA32) \ |
208 | | 1 << (__GFP_DMA32 | __GFP_HIGHMEM) \ | 229 | | 1 << (___GFP_DMA32 | ___GFP_HIGHMEM) \ |
209 | | 1 << (__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM) \ | 230 | | 1 << (___GFP_DMA | ___GFP_DMA32 | ___GFP_HIGHMEM) \ |
210 | | 1 << (__GFP_MOVABLE | __GFP_HIGHMEM | __GFP_DMA) \ | 231 | | 1 << (___GFP_MOVABLE | ___GFP_HIGHMEM | ___GFP_DMA) \ |
211 | | 1 << (__GFP_MOVABLE | __GFP_DMA32 | __GFP_DMA) \ | 232 | | 1 << (___GFP_MOVABLE | ___GFP_DMA32 | ___GFP_DMA) \ |
212 | | 1 << (__GFP_MOVABLE | __GFP_DMA32 | __GFP_HIGHMEM) \ | 233 | | 1 << (___GFP_MOVABLE | ___GFP_DMA32 | ___GFP_HIGHMEM) \ |
213 | | 1 << (__GFP_MOVABLE | __GFP_DMA32 | __GFP_DMA | __GFP_HIGHMEM)\ | 234 | | 1 << (___GFP_MOVABLE | ___GFP_DMA32 | ___GFP_DMA | ___GFP_HIGHMEM) \ |
214 | ) | 235 | ) |
215 | 236 | ||
216 | static inline enum zone_type gfp_zone(gfp_t flags) | 237 | static inline enum zone_type gfp_zone(gfp_t flags) |
217 | { | 238 | { |
218 | enum zone_type z; | 239 | enum zone_type z; |
219 | int bit = flags & GFP_ZONEMASK; | 240 | int bit = (__force int) (flags & GFP_ZONEMASK); |
220 | 241 | ||
221 | z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) & | 242 | z = (GFP_ZONE_TABLE >> (bit * ZONES_SHIFT)) & |
222 | ((1 << ZONES_SHIFT) - 1); | 243 | ((1 << ZONES_SHIFT) - 1); |
diff --git a/include/linux/gpio-fan.h b/include/linux/gpio-fan.h new file mode 100644 index 000000000000..096659169215 --- /dev/null +++ b/include/linux/gpio-fan.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * include/linux/gpio-fan.h | ||
3 | * | ||
4 | * Platform data structure for GPIO fan driver | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __LINUX_GPIO_FAN_H | ||
12 | #define __LINUX_GPIO_FAN_H | ||
13 | |||
14 | struct gpio_fan_alarm { | ||
15 | unsigned gpio; | ||
16 | unsigned active_low; | ||
17 | }; | ||
18 | |||
19 | struct gpio_fan_speed { | ||
20 | int rpm; | ||
21 | int ctrl_val; | ||
22 | }; | ||
23 | |||
24 | struct gpio_fan_platform_data { | ||
25 | int num_ctrl; | ||
26 | unsigned *ctrl; /* fan control GPIOs. */ | ||
27 | struct gpio_fan_alarm *alarm; /* fan alarm GPIO. */ | ||
28 | /* | ||
29 | * Speed conversion array: rpm from/to GPIO bit field. | ||
30 | * This array _must_ be sorted in ascending rpm order. | ||
31 | */ | ||
32 | int num_speed; | ||
33 | struct gpio_fan_speed *speed; | ||
34 | }; | ||
35 | |||
36 | #endif /* __LINUX_GPIO_FAN_H */ | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index e3060ef85b6d..8a85ec109a3a 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -28,18 +28,6 @@ static inline void invalidate_kernel_vmap_range(void *vaddr, int size) | |||
28 | 28 | ||
29 | #include <asm/kmap_types.h> | 29 | #include <asm/kmap_types.h> |
30 | 30 | ||
31 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
32 | |||
33 | void debug_kmap_atomic(enum km_type type); | ||
34 | |||
35 | #else | ||
36 | |||
37 | static inline void debug_kmap_atomic(enum km_type type) | ||
38 | { | ||
39 | } | ||
40 | |||
41 | #endif | ||
42 | |||
43 | #ifdef CONFIG_HIGHMEM | 31 | #ifdef CONFIG_HIGHMEM |
44 | #include <asm/highmem.h> | 32 | #include <asm/highmem.h> |
45 | 33 | ||
@@ -49,6 +37,27 @@ extern unsigned long totalhigh_pages; | |||
49 | 37 | ||
50 | void kmap_flush_unused(void); | 38 | void kmap_flush_unused(void); |
51 | 39 | ||
40 | DECLARE_PER_CPU(int, __kmap_atomic_idx); | ||
41 | |||
42 | static inline int kmap_atomic_idx_push(void) | ||
43 | { | ||
44 | int idx = __get_cpu_var(__kmap_atomic_idx)++; | ||
45 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
46 | WARN_ON_ONCE(in_irq() && !irqs_disabled()); | ||
47 | BUG_ON(idx > KM_TYPE_NR); | ||
48 | #endif | ||
49 | return idx; | ||
50 | } | ||
51 | |||
52 | static inline int kmap_atomic_idx_pop(void) | ||
53 | { | ||
54 | int idx = --__get_cpu_var(__kmap_atomic_idx); | ||
55 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
56 | BUG_ON(idx < 0); | ||
57 | #endif | ||
58 | return idx; | ||
59 | } | ||
60 | |||
52 | #else /* CONFIG_HIGHMEM */ | 61 | #else /* CONFIG_HIGHMEM */ |
53 | 62 | ||
54 | static inline unsigned int nr_free_highpages(void) { return 0; } | 63 | static inline unsigned int nr_free_highpages(void) { return 0; } |
@@ -66,19 +75,19 @@ static inline void kunmap(struct page *page) | |||
66 | { | 75 | { |
67 | } | 76 | } |
68 | 77 | ||
69 | static inline void *kmap_atomic(struct page *page, enum km_type idx) | 78 | static inline void *__kmap_atomic(struct page *page) |
70 | { | 79 | { |
71 | pagefault_disable(); | 80 | pagefault_disable(); |
72 | return page_address(page); | 81 | return page_address(page); |
73 | } | 82 | } |
74 | #define kmap_atomic_prot(page, idx, prot) kmap_atomic(page, idx) | 83 | #define kmap_atomic_prot(page, prot) __kmap_atomic(page) |
75 | 84 | ||
76 | static inline void kunmap_atomic_notypecheck(void *addr, enum km_type idx) | 85 | static inline void __kunmap_atomic(void *addr) |
77 | { | 86 | { |
78 | pagefault_enable(); | 87 | pagefault_enable(); |
79 | } | 88 | } |
80 | 89 | ||
81 | #define kmap_atomic_pfn(pfn, idx) kmap_atomic(pfn_to_page(pfn), (idx)) | 90 | #define kmap_atomic_pfn(pfn) kmap_atomic(pfn_to_page(pfn)) |
82 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) | 91 | #define kmap_atomic_to_page(ptr) virt_to_page(ptr) |
83 | 92 | ||
84 | #define kmap_flush_unused() do {} while(0) | 93 | #define kmap_flush_unused() do {} while(0) |
@@ -86,12 +95,20 @@ static inline void kunmap_atomic_notypecheck(void *addr, enum km_type idx) | |||
86 | 95 | ||
87 | #endif /* CONFIG_HIGHMEM */ | 96 | #endif /* CONFIG_HIGHMEM */ |
88 | 97 | ||
89 | /* Prevent people trying to call kunmap_atomic() as if it were kunmap() */ | 98 | /* |
90 | /* kunmap_atomic() should get the return value of kmap_atomic, not the page. */ | 99 | * Make both: kmap_atomic(page, idx) and kmap_atomic(page) work. |
91 | #define kunmap_atomic(addr, idx) do { \ | 100 | */ |
92 | BUILD_BUG_ON(__same_type((addr), struct page *)); \ | 101 | #define kmap_atomic(page, args...) __kmap_atomic(page) |
93 | kunmap_atomic_notypecheck((addr), (idx)); \ | 102 | |
94 | } while (0) | 103 | /* |
104 | * Prevent people trying to call kunmap_atomic() as if it were kunmap() | ||
105 | * kunmap_atomic() should get the return value of kmap_atomic, not the page. | ||
106 | */ | ||
107 | #define kunmap_atomic(addr, args...) \ | ||
108 | do { \ | ||
109 | BUILD_BUG_ON(__same_type((addr), struct page *)); \ | ||
110 | __kunmap_atomic(addr); \ | ||
111 | } while (0) | ||
95 | 112 | ||
96 | /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ | 113 | /* when CONFIG_HIGHMEM is not set these will be plain clear/copy_page */ |
97 | #ifndef clear_user_highpage | 114 | #ifndef clear_user_highpage |
@@ -201,8 +218,8 @@ static inline void copy_user_highpage(struct page *to, struct page *from, | |||
201 | vfrom = kmap_atomic(from, KM_USER0); | 218 | vfrom = kmap_atomic(from, KM_USER0); |
202 | vto = kmap_atomic(to, KM_USER1); | 219 | vto = kmap_atomic(to, KM_USER1); |
203 | copy_user_page(vto, vfrom, vaddr, to); | 220 | copy_user_page(vto, vfrom, vaddr, to); |
204 | kunmap_atomic(vfrom, KM_USER0); | ||
205 | kunmap_atomic(vto, KM_USER1); | 221 | kunmap_atomic(vto, KM_USER1); |
222 | kunmap_atomic(vfrom, KM_USER0); | ||
206 | } | 223 | } |
207 | 224 | ||
208 | #endif | 225 | #endif |
@@ -214,8 +231,8 @@ static inline void copy_highpage(struct page *to, struct page *from) | |||
214 | vfrom = kmap_atomic(from, KM_USER0); | 231 | vfrom = kmap_atomic(from, KM_USER0); |
215 | vto = kmap_atomic(to, KM_USER1); | 232 | vto = kmap_atomic(to, KM_USER1); |
216 | copy_page(vto, vfrom); | 233 | copy_page(vto, vfrom); |
217 | kunmap_atomic(vfrom, KM_USER0); | ||
218 | kunmap_atomic(vto, KM_USER1); | 234 | kunmap_atomic(vto, KM_USER1); |
235 | kunmap_atomic(vfrom, KM_USER0); | ||
219 | } | 236 | } |
220 | 237 | ||
221 | #endif /* _LINUX_HIGHMEM_H */ | 238 | #endif /* _LINUX_HIGHMEM_H */ |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f479700df61b..943c76b3d4bb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -43,7 +43,8 @@ int hugetlb_reserve_pages(struct inode *inode, long from, long to, | |||
43 | struct vm_area_struct *vma, | 43 | struct vm_area_struct *vma, |
44 | int acctflags); | 44 | int acctflags); |
45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | 45 | void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
46 | void __isolate_hwpoisoned_huge_page(struct page *page); | 46 | int dequeue_hwpoisoned_huge_page(struct page *page); |
47 | void copy_huge_page(struct page *dst, struct page *src); | ||
47 | 48 | ||
48 | extern unsigned long hugepages_treat_as_movable; | 49 | extern unsigned long hugepages_treat_as_movable; |
49 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 50 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
@@ -101,7 +102,10 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
101 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 102 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
102 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) | 103 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
103 | #define huge_pte_offset(mm, address) 0 | 104 | #define huge_pte_offset(mm, address) 0 |
104 | #define __isolate_hwpoisoned_huge_page(page) 0 | 105 | #define dequeue_hwpoisoned_huge_page(page) 0 |
106 | static inline void copy_huge_page(struct page *dst, struct page *src) | ||
107 | { | ||
108 | } | ||
105 | 109 | ||
106 | #define hugetlb_change_protection(vma, address, end, newprot) | 110 | #define hugetlb_change_protection(vma, address, end, newprot) |
107 | 111 | ||
@@ -228,6 +232,8 @@ struct huge_bootmem_page { | |||
228 | struct hstate *hstate; | 232 | struct hstate *hstate; |
229 | }; | 233 | }; |
230 | 234 | ||
235 | struct page *alloc_huge_page_node(struct hstate *h, int nid); | ||
236 | |||
231 | /* arch callback */ | 237 | /* arch callback */ |
232 | int __init alloc_bootmem_huge_page(struct hstate *h); | 238 | int __init alloc_bootmem_huge_page(struct hstate *h); |
233 | 239 | ||
@@ -301,8 +307,14 @@ static inline struct hstate *page_hstate(struct page *page) | |||
301 | return size_to_hstate(PAGE_SIZE << compound_order(page)); | 307 | return size_to_hstate(PAGE_SIZE << compound_order(page)); |
302 | } | 308 | } |
303 | 309 | ||
310 | static inline unsigned hstate_index_to_shift(unsigned index) | ||
311 | { | ||
312 | return hstates[index].order + PAGE_SHIFT; | ||
313 | } | ||
314 | |||
304 | #else | 315 | #else |
305 | struct hstate {}; | 316 | struct hstate {}; |
317 | #define alloc_huge_page_node(h, nid) NULL | ||
306 | #define alloc_bootmem_huge_page(h) NULL | 318 | #define alloc_bootmem_huge_page(h) NULL |
307 | #define hstate_file(f) NULL | 319 | #define hstate_file(f) NULL |
308 | #define hstate_vma(v) NULL | 320 | #define hstate_vma(v) NULL |
@@ -317,6 +329,7 @@ static inline unsigned int pages_per_huge_page(struct hstate *h) | |||
317 | { | 329 | { |
318 | return 1; | 330 | return 1; |
319 | } | 331 | } |
332 | #define hstate_index_to_shift(index) 0 | ||
320 | #endif | 333 | #endif |
321 | 334 | ||
322 | #endif /* _LINUX_HUGETLB_H */ | 335 | #endif /* _LINUX_HUGETLB_H */ |
diff --git a/include/linux/i2c/apds990x.h b/include/linux/i2c/apds990x.h new file mode 100644 index 000000000000..d186fcc5d257 --- /dev/null +++ b/include/linux/i2c/apds990x.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * This file is part of the APDS990x sensor driver. | ||
3 | * Chip is combined proximity and ambient light sensor. | ||
4 | * | ||
5 | * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | ||
6 | * | ||
7 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
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 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __APDS990X_H__ | ||
26 | #define __APDS990X_H__ | ||
27 | |||
28 | |||
29 | #define APDS_IRLED_CURR_12mA 0x3 | ||
30 | #define APDS_IRLED_CURR_25mA 0x2 | ||
31 | #define APDS_IRLED_CURR_50mA 0x1 | ||
32 | #define APDS_IRLED_CURR_100mA 0x0 | ||
33 | |||
34 | /** | ||
35 | * struct apds990x_chip_factors - defines effect of the cover window | ||
36 | * @ga: Total glass attenuation | ||
37 | * @cf1: clear channel factor 1 for raw to lux conversion | ||
38 | * @irf1: IR channel factor 1 for raw to lux conversion | ||
39 | * @cf2: clear channel factor 2 for raw to lux conversion | ||
40 | * @irf2: IR channel factor 2 for raw to lux conversion | ||
41 | * @df: device factor for conversion formulas | ||
42 | * | ||
43 | * Structure for tuning ALS calculation to match with environment. | ||
44 | * Values depend on the material above the sensor and the sensor | ||
45 | * itself. If the GA is zero, driver will use uncovered sensor default values | ||
46 | * format: decimal value * APDS_PARAM_SCALE except df which is plain integer. | ||
47 | */ | ||
48 | #define APDS_PARAM_SCALE 4096 | ||
49 | struct apds990x_chip_factors { | ||
50 | int ga; | ||
51 | int cf1; | ||
52 | int irf1; | ||
53 | int cf2; | ||
54 | int irf2; | ||
55 | int df; | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * struct apds990x_platform_data - platform data for apsd990x.c driver | ||
60 | * @cf: chip factor data | ||
61 | * @pddrive: IR-led driving current | ||
62 | * @ppcount: number of IR pulses used for proximity estimation | ||
63 | * @setup_resources: interrupt line setup call back function | ||
64 | * @release_resources: interrupt line release call back function | ||
65 | * | ||
66 | * Proximity detection result depends heavily on correct ppcount, pdrive | ||
67 | * and cover window. | ||
68 | * | ||
69 | */ | ||
70 | |||
71 | struct apds990x_platform_data { | ||
72 | struct apds990x_chip_factors cf; | ||
73 | u8 pdrive; | ||
74 | u8 ppcount; | ||
75 | int (*setup_resources)(void); | ||
76 | int (*release_resources)(void); | ||
77 | }; | ||
78 | |||
79 | #endif | ||
diff --git a/include/linux/i2c/bh1770glc.h b/include/linux/i2c/bh1770glc.h new file mode 100644 index 000000000000..8b5e2df36c72 --- /dev/null +++ b/include/linux/i2c/bh1770glc.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * This file is part of the ROHM BH1770GLC / OSRAM SFH7770 sensor driver. | ||
3 | * Chip is combined proximity and ambient light sensor. | ||
4 | * | ||
5 | * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | ||
6 | * | ||
7 | * Contact: Samu Onkalo <samu.p.onkalo@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
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 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __BH1770_H__ | ||
26 | #define __BH1770_H__ | ||
27 | |||
28 | /** | ||
29 | * struct bh1770_platform_data - platform data for bh1770glc driver | ||
30 | * @led_def_curr: IR led driving current. | ||
31 | * @glass_attenuation: Attenuation factor for covering window. | ||
32 | * @setup_resources: Call back for interrupt line setup function | ||
33 | * @release_resources: Call back for interrupte line release function | ||
34 | * | ||
35 | * Example of glass attenuation: 16384 * 385 / 100 means attenuation factor | ||
36 | * of 3.85. i.e. light_above_sensor = light_above_cover_window / 3.85 | ||
37 | */ | ||
38 | |||
39 | struct bh1770_platform_data { | ||
40 | #define BH1770_LED_5mA 0 | ||
41 | #define BH1770_LED_10mA 1 | ||
42 | #define BH1770_LED_20mA 2 | ||
43 | #define BH1770_LED_50mA 3 | ||
44 | #define BH1770_LED_100mA 4 | ||
45 | #define BH1770_LED_150mA 5 | ||
46 | #define BH1770_LED_200mA 6 | ||
47 | __u8 led_def_curr; | ||
48 | #define BH1770_NEUTRAL_GA 16384 /* 16384 / 16384 = 1 */ | ||
49 | __u32 glass_attenuation; | ||
50 | int (*setup_resources)(void); | ||
51 | int (*release_resources)(void); | ||
52 | }; | ||
53 | #endif | ||
diff --git a/include/linux/idr.h b/include/linux/idr.h index 928ae712709f..13a801f3d028 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -81,6 +81,7 @@ struct idr { | |||
81 | #define _idr_rc_to_errno(rc) ((rc) == -1 ? -EAGAIN : -ENOSPC) | 81 | #define _idr_rc_to_errno(rc) ((rc) == -1 ? -EAGAIN : -ENOSPC) |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * DOC: idr sync | ||
84 | * idr synchronization (stolen from radix-tree.h) | 85 | * idr synchronization (stolen from radix-tree.h) |
85 | * | 86 | * |
86 | * idr_find() is able to be called locklessly, using RCU. The caller must | 87 | * idr_find() is able to be called locklessly, using RCU. The caller must |
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 7fb592793738..8cdcc2a199ad 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -81,8 +81,7 @@ io_mapping_free(struct io_mapping *mapping) | |||
81 | /* Atomic map/unmap */ | 81 | /* Atomic map/unmap */ |
82 | static inline void __iomem * | 82 | static inline void __iomem * |
83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
84 | unsigned long offset, | 84 | unsigned long offset) |
85 | int slot) | ||
86 | { | 85 | { |
87 | resource_size_t phys_addr; | 86 | resource_size_t phys_addr; |
88 | unsigned long pfn; | 87 | unsigned long pfn; |
@@ -90,13 +89,13 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, | |||
90 | BUG_ON(offset >= mapping->size); | 89 | BUG_ON(offset >= mapping->size); |
91 | phys_addr = mapping->base + offset; | 90 | phys_addr = mapping->base + offset; |
92 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); | 91 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); |
93 | return iomap_atomic_prot_pfn(pfn, slot, mapping->prot); | 92 | return iomap_atomic_prot_pfn(pfn, mapping->prot); |
94 | } | 93 | } |
95 | 94 | ||
96 | static inline void | 95 | static inline void |
97 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) | 96 | io_mapping_unmap_atomic(void __iomem *vaddr) |
98 | { | 97 | { |
99 | iounmap_atomic(vaddr, slot); | 98 | iounmap_atomic(vaddr); |
100 | } | 99 | } |
101 | 100 | ||
102 | static inline void __iomem * | 101 | static inline void __iomem * |
@@ -137,14 +136,13 @@ io_mapping_free(struct io_mapping *mapping) | |||
137 | /* Atomic map/unmap */ | 136 | /* Atomic map/unmap */ |
138 | static inline void __iomem * | 137 | static inline void __iomem * |
139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 138 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
140 | unsigned long offset, | 139 | unsigned long offset) |
141 | int slot) | ||
142 | { | 140 | { |
143 | return ((char __force __iomem *) mapping) + offset; | 141 | return ((char __force __iomem *) mapping) + offset; |
144 | } | 142 | } |
145 | 143 | ||
146 | static inline void | 144 | static inline void |
147 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) | 145 | io_mapping_unmap_atomic(void __iomem *vaddr) |
148 | { | 146 | { |
149 | } | 147 | } |
150 | 148 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index edef168a0406..450092c1e35f 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -173,6 +173,11 @@ extern int _cond_resched(void); | |||
173 | (__x < 0) ? -__x : __x; \ | 173 | (__x < 0) ? -__x : __x; \ |
174 | }) | 174 | }) |
175 | 175 | ||
176 | #define abs64(x) ({ \ | ||
177 | s64 __x = (x); \ | ||
178 | (__x < 0) ? -__x : __x; \ | ||
179 | }) | ||
180 | |||
176 | #ifdef CONFIG_PROVE_LOCKING | 181 | #ifdef CONFIG_PROVE_LOCKING |
177 | void might_fault(void); | 182 | void might_fault(void); |
178 | #else | 183 | #else |
@@ -203,10 +208,10 @@ extern unsigned long simple_strtoul(const char *,char **,unsigned int); | |||
203 | extern long simple_strtol(const char *,char **,unsigned int); | 208 | extern long simple_strtol(const char *,char **,unsigned int); |
204 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); | 209 | extern unsigned long long simple_strtoull(const char *,char **,unsigned int); |
205 | extern long long simple_strtoll(const char *,char **,unsigned int); | 210 | extern long long simple_strtoll(const char *,char **,unsigned int); |
206 | extern int strict_strtoul(const char *, unsigned int, unsigned long *); | 211 | extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *); |
207 | extern int strict_strtol(const char *, unsigned int, long *); | 212 | extern int __must_check strict_strtol(const char *, unsigned int, long *); |
208 | extern int strict_strtoull(const char *, unsigned int, unsigned long long *); | 213 | extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *); |
209 | extern int strict_strtoll(const char *, unsigned int, long long *); | 214 | extern int __must_check strict_strtoll(const char *, unsigned int, long long *); |
210 | extern int sprintf(char * buf, const char * fmt, ...) | 215 | extern int sprintf(char * buf, const char * fmt, ...) |
211 | __attribute__ ((format (printf, 2, 3))); | 216 | __attribute__ ((format (printf, 2, 3))); |
212 | extern int vsprintf(char *buf, const char *, va_list) | 217 | extern int vsprintf(char *buf, const char *, va_list) |
@@ -277,6 +282,11 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
277 | asmlinkage int printk(const char * fmt, ...) | 282 | asmlinkage int printk(const char * fmt, ...) |
278 | __attribute__ ((format (printf, 1, 2))) __cold; | 283 | __attribute__ ((format (printf, 1, 2))) __cold; |
279 | 284 | ||
285 | /* | ||
286 | * Please don't use printk_ratelimit(), because it shares ratelimiting state | ||
287 | * with all other unrelated printk_ratelimit() callsites. Instead use | ||
288 | * printk_ratelimited() or plain old __ratelimit(). | ||
289 | */ | ||
280 | extern int __printk_ratelimit(const char *func); | 290 | extern int __printk_ratelimit(const char *func); |
281 | #define printk_ratelimit() __printk_ratelimit(__func__) | 291 | #define printk_ratelimit() __printk_ratelimit(__func__) |
282 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, | 292 | extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, |
@@ -651,6 +661,24 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
651 | (void) (&_max1 == &_max2); \ | 661 | (void) (&_max1 == &_max2); \ |
652 | _max1 > _max2 ? _max1 : _max2; }) | 662 | _max1 > _max2 ? _max1 : _max2; }) |
653 | 663 | ||
664 | #define min3(x, y, z) ({ \ | ||
665 | typeof(x) _min1 = (x); \ | ||
666 | typeof(y) _min2 = (y); \ | ||
667 | typeof(z) _min3 = (z); \ | ||
668 | (void) (&_min1 == &_min2); \ | ||
669 | (void) (&_min1 == &_min3); \ | ||
670 | _min1 < _min2 ? (_min1 < _min3 ? _min1 : _min3) : \ | ||
671 | (_min2 < _min3 ? _min2 : _min3); }) | ||
672 | |||
673 | #define max3(x, y, z) ({ \ | ||
674 | typeof(x) _max1 = (x); \ | ||
675 | typeof(y) _max2 = (y); \ | ||
676 | typeof(z) _max3 = (z); \ | ||
677 | (void) (&_max1 == &_max2); \ | ||
678 | (void) (&_max1 == &_max3); \ | ||
679 | _max1 > _max2 ? (_max1 > _max3 ? _max1 : _max3) : \ | ||
680 | (_max2 > _max3 ? _max2 : _max3); }) | ||
681 | |||
654 | /** | 682 | /** |
655 | * min_not_zero - return the minimum that is _not_ zero, unless both are zero | 683 | * min_not_zero - return the minimum that is _not_ zero, unless both are zero |
656 | * @x: value1 | 684 | * @x: value1 |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 62dbee554f60..c238ad2f82ea 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -171,11 +171,8 @@ struct kfifo_rec_ptr_2 __STRUCT_KFIFO_PTR(unsigned char, 2, void); | |||
171 | } | 171 | } |
172 | 172 | ||
173 | 173 | ||
174 | static inline unsigned int __must_check | 174 | /* __kfifo_must_check_helper() is temporarily disabled because it was faulty */ |
175 | __kfifo_must_check_helper(unsigned int val) | 175 | #define __kfifo_must_check_helper(x) (x) |
176 | { | ||
177 | return val; | ||
178 | } | ||
179 | 176 | ||
180 | /** | 177 | /** |
181 | * kfifo_initialized - Check if the fifo is initialized | 178 | * kfifo_initialized - Check if the fifo is initialized |
diff --git a/include/linux/lis3lv02d.h b/include/linux/lis3lv02d.h index 0e8a346424bb..d4292c8431e0 100644 --- a/include/linux/lis3lv02d.h +++ b/include/linux/lis3lv02d.h | |||
@@ -1,6 +1,52 @@ | |||
1 | #ifndef __LIS3LV02D_H_ | 1 | #ifndef __LIS3LV02D_H_ |
2 | #define __LIS3LV02D_H_ | 2 | #define __LIS3LV02D_H_ |
3 | 3 | ||
4 | /** | ||
5 | * struct lis3lv02d_platform_data - lis3 chip family platform data | ||
6 | * @click_flags: Click detection unit configuration | ||
7 | * @click_thresh_x: Click detection unit x axis threshold | ||
8 | * @click_thresh_y: Click detection unit y axis threshold | ||
9 | * @click_thresh_z: Click detection unit z axis threshold | ||
10 | * @click_time_limit: Click detection unit time parameter | ||
11 | * @click_latency: Click detection unit latency parameter | ||
12 | * @click_window: Click detection unit window parameter | ||
13 | * @irq_cfg: On chip irq source and type configuration (click / | ||
14 | * data available / wake up, open drain, polarity) | ||
15 | * @irq_flags1: Additional irq triggering flags for irq channel 0 | ||
16 | * @irq_flags2: Additional irq triggering flags for irq channel 1 | ||
17 | * @duration1: Wake up unit 1 duration parameter | ||
18 | * @duration2: Wake up unit 2 duration parameter | ||
19 | * @wakeup_flags: Wake up unit 1 flags | ||
20 | * @wakeup_thresh: Wake up unit 1 threshold value | ||
21 | * @wakeup_flags2: Wake up unit 2 flags | ||
22 | * @wakeup_thresh2: Wake up unit 2 threshold value | ||
23 | * @hipass_ctrl: High pass filter control (enable / disable, cut off | ||
24 | * frequency) | ||
25 | * @axis_x: Sensor orientation remapping for x-axis | ||
26 | * @axis_y: Sensor orientation remapping for y-axis | ||
27 | * @axis_z: Sensor orientation remapping for z-axis | ||
28 | * @driver_features: Enable bits for different features. Disabled by default | ||
29 | * @default_rate: Default sampling rate. 0 means reset default | ||
30 | * @setup_resources: Interrupt line setup call back function | ||
31 | * @release_resources: Interrupt line release call back function | ||
32 | * @st_min_limits[3]: Selftest acceptance minimum values | ||
33 | * @st_max_limits[3]: Selftest acceptance maximum values | ||
34 | * @irq2: Irq line 2 number | ||
35 | * | ||
36 | * Platform data is used to setup the sensor chip. Meaning of the different | ||
37 | * chip features can be found from the data sheet. It is publicly available | ||
38 | * at www.st.com web pages. Currently the platform data is used | ||
39 | * only for the 8 bit device. The 8 bit device has two wake up / free fall | ||
40 | * detection units and click detection unit. There are plenty of ways to | ||
41 | * configure the chip which makes is quite hard to explain deeper meaning of | ||
42 | * the fields here. Behaviour of the detection blocks varies heavily depending | ||
43 | * on the configuration. For example, interrupt detection block can use high | ||
44 | * pass filtered data which makes it react to the changes in the acceleration. | ||
45 | * Irq_flags can be used to enable interrupt detection on the both edges. | ||
46 | * With proper chip configuration this produces interrupt when some trigger | ||
47 | * starts and when it goes away. | ||
48 | */ | ||
49 | |||
4 | struct lis3lv02d_platform_data { | 50 | struct lis3lv02d_platform_data { |
5 | /* please note: the 'click' feature is only supported for | 51 | /* please note: the 'click' feature is only supported for |
6 | * LIS[32]02DL variants of the chip and will be ignored for | 52 | * LIS[32]02DL variants of the chip and will be ignored for |
@@ -36,7 +82,10 @@ struct lis3lv02d_platform_data { | |||
36 | #define LIS3_IRQ_OPEN_DRAIN (1 << 6) | 82 | #define LIS3_IRQ_OPEN_DRAIN (1 << 6) |
37 | #define LIS3_IRQ_ACTIVE_LOW (1 << 7) | 83 | #define LIS3_IRQ_ACTIVE_LOW (1 << 7) |
38 | unsigned char irq_cfg; | 84 | unsigned char irq_cfg; |
39 | 85 | unsigned char irq_flags1; /* Additional irq edge / level flags */ | |
86 | unsigned char irq_flags2; /* Additional irq edge / level flags */ | ||
87 | unsigned char duration1; | ||
88 | unsigned char duration2; | ||
40 | #define LIS3_WAKEUP_X_LO (1 << 0) | 89 | #define LIS3_WAKEUP_X_LO (1 << 0) |
41 | #define LIS3_WAKEUP_X_HI (1 << 1) | 90 | #define LIS3_WAKEUP_X_HI (1 << 1) |
42 | #define LIS3_WAKEUP_Y_LO (1 << 2) | 91 | #define LIS3_WAKEUP_Y_LO (1 << 2) |
@@ -64,6 +113,10 @@ struct lis3lv02d_platform_data { | |||
64 | s8 axis_x; | 113 | s8 axis_x; |
65 | s8 axis_y; | 114 | s8 axis_y; |
66 | s8 axis_z; | 115 | s8 axis_z; |
116 | #define LIS3_USE_REGULATOR_CTRL 0x01 | ||
117 | #define LIS3_USE_BLOCK_READ 0x02 | ||
118 | u16 driver_features; | ||
119 | int default_rate; | ||
67 | int (*setup_resources)(void); | 120 | int (*setup_resources)(void); |
68 | int (*release_resources)(void); | 121 | int (*release_resources)(void); |
69 | /* Limits for selftest are specified in chip data sheet */ | 122 | /* Limits for selftest are specified in chip data sheet */ |
diff --git a/include/linux/math64.h b/include/linux/math64.h index c87f1528703a..23fcdfcba81b 100644 --- a/include/linux/math64.h +++ b/include/linux/math64.h | |||
@@ -35,6 +35,14 @@ static inline u64 div64_u64(u64 dividend, u64 divisor) | |||
35 | return dividend / divisor; | 35 | return dividend / divisor; |
36 | } | 36 | } |
37 | 37 | ||
38 | /** | ||
39 | * div64_s64 - signed 64bit divide with 64bit divisor | ||
40 | */ | ||
41 | static inline s64 div64_s64(s64 dividend, s64 divisor) | ||
42 | { | ||
43 | return dividend / divisor; | ||
44 | } | ||
45 | |||
38 | #elif BITS_PER_LONG == 32 | 46 | #elif BITS_PER_LONG == 32 |
39 | 47 | ||
40 | #ifndef div_u64_rem | 48 | #ifndef div_u64_rem |
@@ -53,6 +61,10 @@ extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); | |||
53 | extern u64 div64_u64(u64 dividend, u64 divisor); | 61 | extern u64 div64_u64(u64 dividend, u64 divisor); |
54 | #endif | 62 | #endif |
55 | 63 | ||
64 | #ifndef div64_s64 | ||
65 | extern s64 div64_s64(s64 dividend, s64 divisor); | ||
66 | #endif | ||
67 | |||
56 | #endif /* BITS_PER_LONG */ | 68 | #endif /* BITS_PER_LONG */ |
57 | 69 | ||
58 | /** | 70 | /** |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 864035fb8f8a..4307231bd22f 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -70,6 +70,10 @@ extern void online_page(struct page *page); | |||
70 | extern int online_pages(unsigned long, unsigned long); | 70 | extern int online_pages(unsigned long, unsigned long); |
71 | extern void __offline_isolated_pages(unsigned long, unsigned long); | 71 | extern void __offline_isolated_pages(unsigned long, unsigned long); |
72 | 72 | ||
73 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
74 | extern bool is_pageblock_removable_nolock(struct page *page); | ||
75 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | ||
76 | |||
73 | /* reasonably generic interface to expand the physical pages in a zone */ | 77 | /* reasonably generic interface to expand the physical pages in a zone */ |
74 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, | 78 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, |
75 | unsigned long nr_pages); | 79 | unsigned long nr_pages); |
diff --git a/include/linux/migrate.h b/include/linux/migrate.h index 7238231b8dd4..085527fb8261 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h | |||
@@ -14,6 +14,8 @@ extern int migrate_page(struct address_space *, | |||
14 | struct page *, struct page *); | 14 | struct page *, struct page *); |
15 | extern int migrate_pages(struct list_head *l, new_page_t x, | 15 | extern int migrate_pages(struct list_head *l, new_page_t x, |
16 | unsigned long private, int offlining); | 16 | unsigned long private, int offlining); |
17 | extern int migrate_huge_pages(struct list_head *l, new_page_t x, | ||
18 | unsigned long private, int offlining); | ||
17 | 19 | ||
18 | extern int fail_migrate_page(struct address_space *, | 20 | extern int fail_migrate_page(struct address_space *, |
19 | struct page *, struct page *); | 21 | struct page *, struct page *); |
@@ -23,12 +25,17 @@ extern int migrate_prep_local(void); | |||
23 | extern int migrate_vmas(struct mm_struct *mm, | 25 | extern int migrate_vmas(struct mm_struct *mm, |
24 | const nodemask_t *from, const nodemask_t *to, | 26 | const nodemask_t *from, const nodemask_t *to, |
25 | unsigned long flags); | 27 | unsigned long flags); |
28 | extern void migrate_page_copy(struct page *newpage, struct page *page); | ||
29 | extern int migrate_huge_page_move_mapping(struct address_space *mapping, | ||
30 | struct page *newpage, struct page *page); | ||
26 | #else | 31 | #else |
27 | #define PAGE_MIGRATION 0 | 32 | #define PAGE_MIGRATION 0 |
28 | 33 | ||
29 | static inline void putback_lru_pages(struct list_head *l) {} | 34 | static inline void putback_lru_pages(struct list_head *l) {} |
30 | static inline int migrate_pages(struct list_head *l, new_page_t x, | 35 | static inline int migrate_pages(struct list_head *l, new_page_t x, |
31 | unsigned long private, int offlining) { return -ENOSYS; } | 36 | unsigned long private, int offlining) { return -ENOSYS; } |
37 | static inline int migrate_huge_pages(struct list_head *l, new_page_t x, | ||
38 | unsigned long private, int offlining) { return -ENOSYS; } | ||
32 | 39 | ||
33 | static inline int migrate_prep(void) { return -ENOSYS; } | 40 | static inline int migrate_prep(void) { return -ENOSYS; } |
34 | static inline int migrate_prep_local(void) { return -ENOSYS; } | 41 | static inline int migrate_prep_local(void) { return -ENOSYS; } |
@@ -40,6 +47,15 @@ static inline int migrate_vmas(struct mm_struct *mm, | |||
40 | return -ENOSYS; | 47 | return -ENOSYS; |
41 | } | 48 | } |
42 | 49 | ||
50 | static inline void migrate_page_copy(struct page *newpage, | ||
51 | struct page *page) {} | ||
52 | |||
53 | static inline int migrate_huge_page_move_mapping(struct address_space *mapping, | ||
54 | struct page *newpage, struct page *page) | ||
55 | { | ||
56 | return -ENOSYS; | ||
57 | } | ||
58 | |||
43 | /* Possible settings for the migrate_page() method in address_operations */ | 59 | /* Possible settings for the migrate_page() method in address_operations */ |
44 | #define migrate_page NULL | 60 | #define migrate_page NULL |
45 | #define fail_migrate_page NULL | 61 | #define fail_migrate_page NULL |
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index 78a1b9671752..9a18667c13cc 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
@@ -58,6 +58,7 @@ enum { | |||
58 | MLX4_CMD_SENSE_PORT = 0x4d, | 58 | MLX4_CMD_SENSE_PORT = 0x4d, |
59 | MLX4_CMD_HW_HEALTH_CHECK = 0x50, | 59 | MLX4_CMD_HW_HEALTH_CHECK = 0x50, |
60 | MLX4_CMD_SET_PORT = 0xc, | 60 | MLX4_CMD_SET_PORT = 0xc, |
61 | MLX4_CMD_SET_NODE = 0x5a, | ||
61 | MLX4_CMD_ACCESS_DDR = 0x2e, | 62 | MLX4_CMD_ACCESS_DDR = 0x2e, |
62 | MLX4_CMD_MAP_ICM = 0xffa, | 63 | MLX4_CMD_MAP_ICM = 0xffa, |
63 | MLX4_CMD_UNMAP_ICM = 0xff9, | 64 | MLX4_CMD_UNMAP_ICM = 0xff9, |
@@ -141,6 +142,7 @@ enum { | |||
141 | MLX4_SET_PORT_MAC_TABLE = 0x2, | 142 | MLX4_SET_PORT_MAC_TABLE = 0x2, |
142 | MLX4_SET_PORT_VLAN_TABLE = 0x3, | 143 | MLX4_SET_PORT_VLAN_TABLE = 0x3, |
143 | MLX4_SET_PORT_PRIO_MAP = 0x4, | 144 | MLX4_SET_PORT_PRIO_MAP = 0x4, |
145 | MLX4_SET_PORT_GID_TABLE = 0x5, | ||
144 | }; | 146 | }; |
145 | 147 | ||
146 | struct mlx4_dev; | 148 | struct mlx4_dev; |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 7338654c02b4..a7b15bc7648e 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -67,7 +67,8 @@ enum { | |||
67 | MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, | 67 | MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18, |
68 | MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19, | 68 | MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19, |
69 | MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20, | 69 | MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20, |
70 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21 | 70 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21, |
71 | MLX4_DEV_CAP_FLAG_IBOE = 1 << 30 | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | enum { | 74 | enum { |
@@ -171,6 +172,10 @@ enum { | |||
171 | MLX4_NUM_FEXCH = 64 * 1024, | 172 | MLX4_NUM_FEXCH = 64 * 1024, |
172 | }; | 173 | }; |
173 | 174 | ||
175 | enum { | ||
176 | MLX4_MAX_FAST_REG_PAGES = 511, | ||
177 | }; | ||
178 | |||
174 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | 179 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) |
175 | { | 180 | { |
176 | return (major << 32) | (minor << 16) | subminor; | 181 | return (major << 32) | (minor << 16) | subminor; |
@@ -379,6 +384,27 @@ struct mlx4_av { | |||
379 | u8 dgid[16]; | 384 | u8 dgid[16]; |
380 | }; | 385 | }; |
381 | 386 | ||
387 | struct mlx4_eth_av { | ||
388 | __be32 port_pd; | ||
389 | u8 reserved1; | ||
390 | u8 smac_idx; | ||
391 | u16 reserved2; | ||
392 | u8 reserved3; | ||
393 | u8 gid_index; | ||
394 | u8 stat_rate; | ||
395 | u8 hop_limit; | ||
396 | __be32 sl_tclass_flowlabel; | ||
397 | u8 dgid[16]; | ||
398 | u32 reserved4[2]; | ||
399 | __be16 vlan; | ||
400 | u8 mac[6]; | ||
401 | }; | ||
402 | |||
403 | union mlx4_ext_av { | ||
404 | struct mlx4_av ib; | ||
405 | struct mlx4_eth_av eth; | ||
406 | }; | ||
407 | |||
382 | struct mlx4_dev { | 408 | struct mlx4_dev { |
383 | struct pci_dev *pdev; | 409 | struct pci_dev *pdev; |
384 | unsigned long flags; | 410 | unsigned long flags; |
@@ -407,6 +433,12 @@ struct mlx4_init_port_param { | |||
407 | if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ | 433 | if (((type) == MLX4_PORT_TYPE_IB ? (dev)->caps.port_mask : \ |
408 | ~(dev)->caps.port_mask) & 1 << ((port) - 1)) | 434 | ~(dev)->caps.port_mask) & 1 << ((port) - 1)) |
409 | 435 | ||
436 | #define mlx4_foreach_ib_transport_port(port, dev) \ | ||
437 | for ((port) = 1; (port) <= (dev)->caps.num_ports; (port)++) \ | ||
438 | if (((dev)->caps.port_mask & 1 << ((port) - 1)) || \ | ||
439 | ((dev)->caps.flags & MLX4_DEV_CAP_FLAG_IBOE)) | ||
440 | |||
441 | |||
410 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | 442 | int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, |
411 | struct mlx4_buf *buf); | 443 | struct mlx4_buf *buf); |
412 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); | 444 | void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf); |
@@ -474,6 +506,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]); | |||
474 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); | 506 | int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index); |
475 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); | 507 | void mlx4_unregister_mac(struct mlx4_dev *dev, u8 port, int index); |
476 | 508 | ||
509 | int mlx4_find_cached_vlan(struct mlx4_dev *dev, u8 port, u16 vid, int *idx); | ||
477 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); | 510 | int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index); |
478 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index); | 511 | void mlx4_unregister_vlan(struct mlx4_dev *dev, u8 port, int index); |
479 | 512 | ||
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index 53c5fdb6eac4..f407cd4bfb34 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
@@ -44,15 +44,24 @@ enum mlx4_dev_event { | |||
44 | MLX4_DEV_EVENT_PORT_REINIT, | 44 | MLX4_DEV_EVENT_PORT_REINIT, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | enum mlx4_protocol { | ||
48 | MLX4_PROTOCOL_IB, | ||
49 | MLX4_PROTOCOL_EN, | ||
50 | }; | ||
51 | |||
47 | struct mlx4_interface { | 52 | struct mlx4_interface { |
48 | void * (*add) (struct mlx4_dev *dev); | 53 | void * (*add) (struct mlx4_dev *dev); |
49 | void (*remove)(struct mlx4_dev *dev, void *context); | 54 | void (*remove)(struct mlx4_dev *dev, void *context); |
50 | void (*event) (struct mlx4_dev *dev, void *context, | 55 | void (*event) (struct mlx4_dev *dev, void *context, |
51 | enum mlx4_dev_event event, int port); | 56 | enum mlx4_dev_event event, int port); |
57 | void * (*get_dev)(struct mlx4_dev *dev, void *context, u8 port); | ||
52 | struct list_head list; | 58 | struct list_head list; |
59 | enum mlx4_protocol protocol; | ||
53 | }; | 60 | }; |
54 | 61 | ||
55 | int mlx4_register_interface(struct mlx4_interface *intf); | 62 | int mlx4_register_interface(struct mlx4_interface *intf); |
56 | void mlx4_unregister_interface(struct mlx4_interface *intf); | 63 | void mlx4_unregister_interface(struct mlx4_interface *intf); |
57 | 64 | ||
65 | void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port); | ||
66 | |||
58 | #endif /* MLX4_DRIVER_H */ | 67 | #endif /* MLX4_DRIVER_H */ |
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 7abe64326f72..0eeb2a1a867c 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h | |||
@@ -109,10 +109,11 @@ struct mlx4_qp_path { | |||
109 | __be32 tclass_flowlabel; | 109 | __be32 tclass_flowlabel; |
110 | u8 rgid[16]; | 110 | u8 rgid[16]; |
111 | u8 sched_queue; | 111 | u8 sched_queue; |
112 | u8 snooper_flags; | 112 | u8 vlan_index; |
113 | u8 reserved3[2]; | 113 | u8 reserved3[2]; |
114 | u8 counter_index; | 114 | u8 counter_index; |
115 | u8 reserved4[7]; | 115 | u8 reserved4; |
116 | u8 dmac[6]; | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | struct mlx4_qp_context { | 119 | struct mlx4_qp_context { |
@@ -166,6 +167,7 @@ enum { | |||
166 | MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5, | 167 | MLX4_WQE_CTRL_TCP_UDP_CSUM = 1 << 5, |
167 | MLX4_WQE_CTRL_INS_VLAN = 1 << 6, | 168 | MLX4_WQE_CTRL_INS_VLAN = 1 << 6, |
168 | MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7, | 169 | MLX4_WQE_CTRL_STRONG_ORDER = 1 << 7, |
170 | MLX4_WQE_CTRL_FORCE_LOOPBACK = 1 << 0, | ||
169 | }; | 171 | }; |
170 | 172 | ||
171 | struct mlx4_wqe_ctrl_seg { | 173 | struct mlx4_wqe_ctrl_seg { |
@@ -219,7 +221,8 @@ struct mlx4_wqe_datagram_seg { | |||
219 | __be32 av[8]; | 221 | __be32 av[8]; |
220 | __be32 dqpn; | 222 | __be32 dqpn; |
221 | __be32 qkey; | 223 | __be32 qkey; |
222 | __be32 reservd[2]; | 224 | __be16 vlan; |
225 | u8 mac[6]; | ||
223 | }; | 226 | }; |
224 | 227 | ||
225 | struct mlx4_wqe_lso_seg { | 228 | struct mlx4_wqe_lso_seg { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7687228dd3b7..721f451c3029 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -144,6 +144,7 @@ extern pgprot_t protection_map[16]; | |||
144 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ | 144 | #define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */ |
145 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ | 145 | #define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */ |
146 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ | 146 | #define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */ |
147 | #define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */ | ||
147 | 148 | ||
148 | /* | 149 | /* |
149 | * This interface is used by x86 PAT code to identify a pfn mapping that is | 150 | * This interface is used by x86 PAT code to identify a pfn mapping that is |
@@ -497,8 +498,8 @@ static inline void set_compound_order(struct page *page, unsigned long order) | |||
497 | #define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0)) | 498 | #define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0)) |
498 | #define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0)) | 499 | #define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0)) |
499 | 500 | ||
500 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ | 501 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allocator */ |
501 | #ifdef NODE_NOT_IN_PAGEFLAGS | 502 | #ifdef NODE_NOT_IN_PAGE_FLAGS |
502 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) | 503 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) |
503 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ | 504 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ |
504 | SECTIONS_PGOFF : ZONES_PGOFF) | 505 | SECTIONS_PGOFF : ZONES_PGOFF) |
@@ -718,12 +719,21 @@ static inline int page_mapped(struct page *page) | |||
718 | #define VM_FAULT_SIGBUS 0x0002 | 719 | #define VM_FAULT_SIGBUS 0x0002 |
719 | #define VM_FAULT_MAJOR 0x0004 | 720 | #define VM_FAULT_MAJOR 0x0004 |
720 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ | 721 | #define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ |
721 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned page */ | 722 | #define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ |
723 | #define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ | ||
722 | 724 | ||
723 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 725 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
724 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 726 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
727 | #define VM_FAULT_RETRY 0x0400 /* ->fault blocked, must retry */ | ||
728 | |||
729 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ | ||
730 | |||
731 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ | ||
732 | VM_FAULT_HWPOISON_LARGE) | ||
725 | 733 | ||
726 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON) | 734 | /* Encode hstate index for a hwpoisoned large page */ |
735 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | ||
736 | #define VM_FAULT_GET_HINDEX(x) (((x) >> 12) & 0xf) | ||
727 | 737 | ||
728 | /* | 738 | /* |
729 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. | 739 | * Can be called by the pagefault handler when it gets a VM_FAULT_OOM. |
@@ -860,6 +870,7 @@ int __set_page_dirty_no_writeback(struct page *page); | |||
860 | int redirty_page_for_writepage(struct writeback_control *wbc, | 870 | int redirty_page_for_writepage(struct writeback_control *wbc, |
861 | struct page *page); | 871 | struct page *page); |
862 | void account_page_dirtied(struct page *page, struct address_space *mapping); | 872 | void account_page_dirtied(struct page *page, struct address_space *mapping); |
873 | void account_page_writeback(struct page *page); | ||
863 | int set_page_dirty(struct page *page); | 874 | int set_page_dirty(struct page *page); |
864 | int set_page_dirty_lock(struct page *page); | 875 | int set_page_dirty_lock(struct page *page); |
865 | int clear_page_dirty_for_io(struct page *page); | 876 | int clear_page_dirty_for_io(struct page *page); |
@@ -1023,7 +1034,15 @@ extern void unregister_shrinker(struct shrinker *); | |||
1023 | 1034 | ||
1024 | int vma_wants_writenotify(struct vm_area_struct *vma); | 1035 | int vma_wants_writenotify(struct vm_area_struct *vma); |
1025 | 1036 | ||
1026 | extern pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl); | 1037 | extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr, |
1038 | spinlock_t **ptl); | ||
1039 | static inline pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, | ||
1040 | spinlock_t **ptl) | ||
1041 | { | ||
1042 | pte_t *ptep; | ||
1043 | __cond_lock(*ptl, ptep = __get_locked_pte(mm, addr, ptl)); | ||
1044 | return ptep; | ||
1045 | } | ||
1027 | 1046 | ||
1028 | #ifdef __PAGETABLE_PUD_FOLDED | 1047 | #ifdef __PAGETABLE_PUD_FOLDED |
1029 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, | 1048 | static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index cb57d657ce4d..bb7288a782fd 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -310,6 +310,8 @@ struct mm_struct { | |||
310 | #ifdef CONFIG_MMU_NOTIFIER | 310 | #ifdef CONFIG_MMU_NOTIFIER |
311 | struct mmu_notifier_mm *mmu_notifier_mm; | 311 | struct mmu_notifier_mm *mmu_notifier_mm; |
312 | #endif | 312 | #endif |
313 | /* How many tasks sharing this mm are OOM_DISABLE */ | ||
314 | atomic_t oom_disable_count; | ||
313 | }; | 315 | }; |
314 | 316 | ||
315 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ | 317 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 3984c4eb41fd..39c24ebe9cfd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -104,6 +104,8 @@ enum zone_stat_item { | |||
104 | NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */ | 104 | NR_ISOLATED_ANON, /* Temporary isolated pages from anon lru */ |
105 | NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */ | 105 | NR_ISOLATED_FILE, /* Temporary isolated pages from file lru */ |
106 | NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ | 106 | NR_SHMEM, /* shmem pages (included tmpfs/GEM pages) */ |
107 | NR_DIRTIED, /* page dirtyings since bootup */ | ||
108 | NR_WRITTEN, /* page writings since bootup */ | ||
107 | #ifdef CONFIG_NUMA | 109 | #ifdef CONFIG_NUMA |
108 | NUMA_HIT, /* allocated in intended node */ | 110 | NUMA_HIT, /* allocated in intended node */ |
109 | NUMA_MISS, /* allocated in non intended node */ | 111 | NUMA_MISS, /* allocated in non intended node */ |
@@ -421,6 +423,9 @@ struct zone { | |||
421 | typedef enum { | 423 | typedef enum { |
422 | ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */ | 424 | ZONE_RECLAIM_LOCKED, /* prevents concurrent reclaim */ |
423 | ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */ | 425 | ZONE_OOM_LOCKED, /* zone is in OOM killer zonelist */ |
426 | ZONE_CONGESTED, /* zone has many dirty pages backed by | ||
427 | * a congested BDI | ||
428 | */ | ||
424 | } zone_flags_t; | 429 | } zone_flags_t; |
425 | 430 | ||
426 | static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) | 431 | static inline void zone_set_flag(struct zone *zone, zone_flags_t flag) |
@@ -438,6 +443,11 @@ static inline void zone_clear_flag(struct zone *zone, zone_flags_t flag) | |||
438 | clear_bit(flag, &zone->flags); | 443 | clear_bit(flag, &zone->flags); |
439 | } | 444 | } |
440 | 445 | ||
446 | static inline int zone_is_reclaim_congested(const struct zone *zone) | ||
447 | { | ||
448 | return test_bit(ZONE_CONGESTED, &zone->flags); | ||
449 | } | ||
450 | |||
441 | static inline int zone_is_reclaim_locked(const struct zone *zone) | 451 | static inline int zone_is_reclaim_locked(const struct zone *zone) |
442 | { | 452 | { |
443 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); | 453 | return test_bit(ZONE_RECLAIM_LOCKED, &zone->flags); |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 9d2f1837b3d8..112adf8bd47d 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -21,8 +21,8 @@ | |||
21 | #define __module_cat(a,b) ___module_cat(a,b) | 21 | #define __module_cat(a,b) ___module_cat(a,b) |
22 | #define __MODULE_INFO(tag, name, info) \ | 22 | #define __MODULE_INFO(tag, name, info) \ |
23 | static const char __module_cat(name,__LINE__)[] \ | 23 | static const char __module_cat(name,__LINE__)[] \ |
24 | __used \ | 24 | __used __attribute__((section(".modinfo"), unused, aligned(1))) \ |
25 | __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info | 25 | = __stringify(tag) "=" info |
26 | #else /* !MODULE */ | 26 | #else /* !MODULE */ |
27 | #define __MODULE_INFO(tag, name, info) | 27 | #define __MODULE_INFO(tag, name, info) |
28 | #endif | 28 | #endif |
diff --git a/include/linux/net.h b/include/linux/net.h index dee0b11a8759..16faa130088c 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -229,6 +229,8 @@ enum { | |||
229 | extern int sock_wake_async(struct socket *sk, int how, int band); | 229 | extern int sock_wake_async(struct socket *sk, int how, int band); |
230 | extern int sock_register(const struct net_proto_family *fam); | 230 | extern int sock_register(const struct net_proto_family *fam); |
231 | extern void sock_unregister(int family); | 231 | extern void sock_unregister(int family); |
232 | extern int __sock_create(struct net *net, int family, int type, int proto, | ||
233 | struct socket **res, int kern); | ||
232 | extern int sock_create(int family, int type, int proto, | 234 | extern int sock_create(int family, int type, int proto, |
233 | struct socket **res); | 235 | struct socket **res); |
234 | extern int sock_create_kern(int family, int type, int proto, | 236 | extern int sock_create_kern(int family, int type, int proto, |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 07e40c625972..4925b22219d2 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -17,7 +17,9 @@ | |||
17 | 17 | ||
18 | #define NFS4_BITMAP_SIZE 2 | 18 | #define NFS4_BITMAP_SIZE 2 |
19 | #define NFS4_VERIFIER_SIZE 8 | 19 | #define NFS4_VERIFIER_SIZE 8 |
20 | #define NFS4_STATEID_SIZE 16 | 20 | #define NFS4_STATEID_SEQID_SIZE 4 |
21 | #define NFS4_STATEID_OTHER_SIZE 12 | ||
22 | #define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE) | ||
21 | #define NFS4_FHSIZE 128 | 23 | #define NFS4_FHSIZE 128 |
22 | #define NFS4_MAXPATHLEN PATH_MAX | 24 | #define NFS4_MAXPATHLEN PATH_MAX |
23 | #define NFS4_MAXNAMLEN NAME_MAX | 25 | #define NFS4_MAXNAMLEN NAME_MAX |
@@ -61,6 +63,9 @@ | |||
61 | #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000 | 63 | #define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000 |
62 | #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED 0x20000 | 64 | #define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED 0x20000 |
63 | 65 | ||
66 | #define NFS4_CDFC4_FORE 0x1 | ||
67 | #define NFS4_CDFC4_BACK 0x2 | ||
68 | |||
64 | #define NFS4_SET_TO_SERVER_TIME 0 | 69 | #define NFS4_SET_TO_SERVER_TIME 0 |
65 | #define NFS4_SET_TO_CLIENT_TIME 1 | 70 | #define NFS4_SET_TO_CLIENT_TIME 1 |
66 | 71 | ||
@@ -167,7 +172,16 @@ struct nfs4_acl { | |||
167 | }; | 172 | }; |
168 | 173 | ||
169 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 174 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
170 | typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid; | 175 | |
176 | struct nfs41_stateid { | ||
177 | __be32 seqid; | ||
178 | char other[NFS4_STATEID_OTHER_SIZE]; | ||
179 | } __attribute__ ((packed)); | ||
180 | |||
181 | typedef union { | ||
182 | char data[NFS4_STATEID_SIZE]; | ||
183 | struct nfs41_stateid stateid; | ||
184 | } nfs4_stateid; | ||
171 | 185 | ||
172 | enum nfs_opnum4 { | 186 | enum nfs_opnum4 { |
173 | OP_ACCESS = 3, | 187 | OP_ACCESS = 3, |
@@ -471,6 +485,8 @@ enum lock_type4 { | |||
471 | #define FATTR4_WORD1_TIME_MODIFY (1UL << 21) | 485 | #define FATTR4_WORD1_TIME_MODIFY (1UL << 21) |
472 | #define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22) | 486 | #define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22) |
473 | #define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23) | 487 | #define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23) |
488 | #define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30) | ||
489 | #define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1) | ||
474 | 490 | ||
475 | #define NFSPROC4_NULL 0 | 491 | #define NFSPROC4_NULL 0 |
476 | #define NFSPROC4_COMPOUND 1 | 492 | #define NFSPROC4_COMPOUND 1 |
@@ -532,6 +548,8 @@ enum { | |||
532 | NFSPROC4_CLNT_SEQUENCE, | 548 | NFSPROC4_CLNT_SEQUENCE, |
533 | NFSPROC4_CLNT_GET_LEASE_TIME, | 549 | NFSPROC4_CLNT_GET_LEASE_TIME, |
534 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 550 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
551 | NFSPROC4_CLNT_LAYOUTGET, | ||
552 | NFSPROC4_CLNT_GETDEVICEINFO, | ||
535 | }; | 553 | }; |
536 | 554 | ||
537 | /* nfs41 types */ | 555 | /* nfs41 types */ |
@@ -550,6 +568,49 @@ enum state_protect_how4 { | |||
550 | SP4_SSV = 2 | 568 | SP4_SSV = 2 |
551 | }; | 569 | }; |
552 | 570 | ||
571 | enum pnfs_layouttype { | ||
572 | LAYOUT_NFSV4_1_FILES = 1, | ||
573 | LAYOUT_OSD2_OBJECTS = 2, | ||
574 | LAYOUT_BLOCK_VOLUME = 3, | ||
575 | }; | ||
576 | |||
577 | /* used for both layout return and recall */ | ||
578 | enum pnfs_layoutreturn_type { | ||
579 | RETURN_FILE = 1, | ||
580 | RETURN_FSID = 2, | ||
581 | RETURN_ALL = 3 | ||
582 | }; | ||
583 | |||
584 | enum pnfs_iomode { | ||
585 | IOMODE_READ = 1, | ||
586 | IOMODE_RW = 2, | ||
587 | IOMODE_ANY = 3, | ||
588 | }; | ||
589 | |||
590 | enum pnfs_notify_deviceid_type4 { | ||
591 | NOTIFY_DEVICEID4_CHANGE = 1 << 1, | ||
592 | NOTIFY_DEVICEID4_DELETE = 1 << 2, | ||
593 | }; | ||
594 | |||
595 | #define NFL4_UFLG_MASK 0x0000003F | ||
596 | #define NFL4_UFLG_DENSE 0x00000001 | ||
597 | #define NFL4_UFLG_COMMIT_THRU_MDS 0x00000002 | ||
598 | #define NFL4_UFLG_STRIPE_UNIT_SIZE_MASK 0xFFFFFFC0 | ||
599 | |||
600 | /* Encoded in the loh_body field of type layouthint4 */ | ||
601 | enum filelayout_hint_care4 { | ||
602 | NFLH4_CARE_DENSE = NFL4_UFLG_DENSE, | ||
603 | NFLH4_CARE_COMMIT_THRU_MDS = NFL4_UFLG_COMMIT_THRU_MDS, | ||
604 | NFLH4_CARE_STRIPE_UNIT_SIZE = 0x00000040, | ||
605 | NFLH4_CARE_STRIPE_COUNT = 0x00000080 | ||
606 | }; | ||
607 | |||
608 | #define NFS4_DEVICEID4_SIZE 16 | ||
609 | |||
610 | struct nfs4_deviceid { | ||
611 | char data[NFS4_DEVICEID4_SIZE]; | ||
612 | }; | ||
613 | |||
553 | #endif | 614 | #endif |
554 | #endif | 615 | #endif |
555 | 616 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index d0edf7d823ae..bba26684acdc 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -188,6 +188,9 @@ struct nfs_inode { | |||
188 | struct nfs_delegation __rcu *delegation; | 188 | struct nfs_delegation __rcu *delegation; |
189 | fmode_t delegation_state; | 189 | fmode_t delegation_state; |
190 | struct rw_semaphore rwsem; | 190 | struct rw_semaphore rwsem; |
191 | |||
192 | /* pNFS layout information */ | ||
193 | struct pnfs_layout_hdr *layout; | ||
191 | #endif /* CONFIG_NFS_V4*/ | 194 | #endif /* CONFIG_NFS_V4*/ |
192 | #ifdef CONFIG_NFS_FSCACHE | 195 | #ifdef CONFIG_NFS_FSCACHE |
193 | struct fscache_cookie *fscache; | 196 | struct fscache_cookie *fscache; |
@@ -360,10 +363,13 @@ extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); | |||
360 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 363 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
361 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 364 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
362 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); | 365 | extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); |
366 | extern struct nfs_open_context *alloc_nfs_open_context(struct path *path, struct rpc_cred *cred, fmode_t f_mode); | ||
367 | extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx); | ||
363 | extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); | 368 | extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); |
364 | extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); | 369 | extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); |
365 | extern u64 nfs_compat_user_ino64(u64 fileid); | 370 | extern u64 nfs_compat_user_ino64(u64 fileid); |
366 | extern void nfs_fattr_init(struct nfs_fattr *fattr); | 371 | extern void nfs_fattr_init(struct nfs_fattr *fattr); |
372 | extern unsigned long nfs_inc_attr_generation_counter(void); | ||
367 | 373 | ||
368 | extern struct nfs_fattr *nfs_alloc_fattr(void); | 374 | extern struct nfs_fattr *nfs_alloc_fattr(void); |
369 | 375 | ||
@@ -379,9 +385,12 @@ static inline void nfs_free_fhandle(const struct nfs_fh *fh) | |||
379 | kfree(fh); | 385 | kfree(fh); |
380 | } | 386 | } |
381 | 387 | ||
388 | /* | ||
389 | * linux/fs/nfs/nfsroot.c | ||
390 | */ | ||
391 | extern int nfs_root_data(char **root_device, char **root_data); /*__init*/ | ||
382 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ | 392 | /* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ |
383 | extern __be32 root_nfs_parse_addr(char *name); /*__init*/ | 393 | extern __be32 root_nfs_parse_addr(char *name); /*__init*/ |
384 | extern unsigned long nfs_inc_attr_generation_counter(void); | ||
385 | 394 | ||
386 | /* | 395 | /* |
387 | * linux/fs/nfs/file.c | 396 | * linux/fs/nfs/file.c |
@@ -479,10 +488,10 @@ extern void nfs_release_automount_timer(void); | |||
479 | /* | 488 | /* |
480 | * linux/fs/nfs/unlink.c | 489 | * linux/fs/nfs/unlink.c |
481 | */ | 490 | */ |
482 | extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry); | ||
483 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); | 491 | extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); |
484 | extern void nfs_block_sillyrename(struct dentry *dentry); | 492 | extern void nfs_block_sillyrename(struct dentry *dentry); |
485 | extern void nfs_unblock_sillyrename(struct dentry *dentry); | 493 | extern void nfs_unblock_sillyrename(struct dentry *dentry); |
494 | extern int nfs_sillyrename(struct inode *dir, struct dentry *dentry); | ||
486 | 495 | ||
487 | /* | 496 | /* |
488 | * linux/fs/nfs/write.c | 497 | * linux/fs/nfs/write.c |
@@ -584,10 +593,6 @@ nfs_fileid_to_ino_t(u64 fileid) | |||
584 | return ino; | 593 | return ino; |
585 | } | 594 | } |
586 | 595 | ||
587 | /* NFS root */ | ||
588 | |||
589 | extern void * nfs_root_data(void); | ||
590 | |||
591 | #define nfs_wait_event(clnt, wq, condition) \ | 596 | #define nfs_wait_event(clnt, wq, condition) \ |
592 | ({ \ | 597 | ({ \ |
593 | int __retval = wait_event_killable(wq, condition); \ | 598 | int __retval = wait_event_killable(wq, condition); \ |
@@ -613,6 +618,8 @@ extern void * nfs_root_data(void); | |||
613 | #define NFSDBG_CLIENT 0x0200 | 618 | #define NFSDBG_CLIENT 0x0200 |
614 | #define NFSDBG_MOUNT 0x0400 | 619 | #define NFSDBG_MOUNT 0x0400 |
615 | #define NFSDBG_FSCACHE 0x0800 | 620 | #define NFSDBG_FSCACHE 0x0800 |
621 | #define NFSDBG_PNFS 0x1000 | ||
622 | #define NFSDBG_PNFS_LD 0x2000 | ||
616 | #define NFSDBG_ALL 0xFFFF | 623 | #define NFSDBG_ALL 0xFFFF |
617 | 624 | ||
618 | #ifdef __KERNEL__ | 625 | #ifdef __KERNEL__ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index c82ee7cd6288..452d96436d26 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -82,6 +82,8 @@ struct nfs_client { | |||
82 | /* The flags used for obtaining the clientid during EXCHANGE_ID */ | 82 | /* The flags used for obtaining the clientid during EXCHANGE_ID */ |
83 | u32 cl_exchange_flags; | 83 | u32 cl_exchange_flags; |
84 | struct nfs4_session *cl_session; /* sharred session */ | 84 | struct nfs4_session *cl_session; /* sharred session */ |
85 | struct list_head cl_layouts; | ||
86 | struct pnfs_deviceid_cache *cl_devid_cache; /* pNFS deviceid cache */ | ||
85 | #endif /* CONFIG_NFS_V4_1 */ | 87 | #endif /* CONFIG_NFS_V4_1 */ |
86 | 88 | ||
87 | #ifdef CONFIG_NFS_FSCACHE | 89 | #ifdef CONFIG_NFS_FSCACHE |
@@ -124,6 +126,7 @@ struct nfs_server { | |||
124 | 126 | ||
125 | struct nfs_fsid fsid; | 127 | struct nfs_fsid fsid; |
126 | __u64 maxfilesize; /* maximum file size */ | 128 | __u64 maxfilesize; /* maximum file size */ |
129 | struct timespec time_delta; /* smallest time granularity */ | ||
127 | unsigned long mount_time; /* when this fs was mounted */ | 130 | unsigned long mount_time; /* when this fs was mounted */ |
128 | dev_t s_dev; /* superblock dev numbers */ | 131 | dev_t s_dev; /* superblock dev numbers */ |
129 | 132 | ||
@@ -144,6 +147,7 @@ struct nfs_server { | |||
144 | u32 acl_bitmask; /* V4 bitmask representing the ACEs | 147 | u32 acl_bitmask; /* V4 bitmask representing the ACEs |
145 | that are supported on this | 148 | that are supported on this |
146 | filesystem */ | 149 | filesystem */ |
150 | struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */ | ||
147 | #endif | 151 | #endif |
148 | void (*destroy)(struct nfs_server *); | 152 | void (*destroy)(struct nfs_server *); |
149 | 153 | ||
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 91a1c24e0cbf..e8352dc5afb5 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
@@ -66,13 +66,40 @@ struct idmap_msg { | |||
66 | /* Forward declaration to make this header independent of others */ | 66 | /* Forward declaration to make this header independent of others */ |
67 | struct nfs_client; | 67 | struct nfs_client; |
68 | 68 | ||
69 | #ifdef CONFIG_NFS_USE_NEW_IDMAPPER | ||
70 | |||
71 | int nfs_idmap_init(void); | ||
72 | void nfs_idmap_quit(void); | ||
73 | |||
74 | static inline int nfs_idmap_new(struct nfs_client *clp) | ||
75 | { | ||
76 | return 0; | ||
77 | } | ||
78 | |||
79 | static inline void nfs_idmap_delete(struct nfs_client *clp) | ||
80 | { | ||
81 | } | ||
82 | |||
83 | #else /* CONFIG_NFS_USE_NEW_IDMAPPER not set */ | ||
84 | |||
85 | static inline int nfs_idmap_init(void) | ||
86 | { | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | static inline void nfs_idmap_quit(void) | ||
91 | { | ||
92 | } | ||
93 | |||
69 | int nfs_idmap_new(struct nfs_client *); | 94 | int nfs_idmap_new(struct nfs_client *); |
70 | void nfs_idmap_delete(struct nfs_client *); | 95 | void nfs_idmap_delete(struct nfs_client *); |
71 | 96 | ||
97 | #endif /* CONFIG_NFS_USE_NEW_IDMAPPER */ | ||
98 | |||
72 | int nfs_map_name_to_uid(struct nfs_client *, const char *, size_t, __u32 *); | 99 | int nfs_map_name_to_uid(struct nfs_client *, const char *, size_t, __u32 *); |
73 | int nfs_map_group_to_gid(struct nfs_client *, const char *, size_t, __u32 *); | 100 | int nfs_map_group_to_gid(struct nfs_client *, const char *, size_t, __u32 *); |
74 | int nfs_map_uid_to_name(struct nfs_client *, __u32, char *); | 101 | int nfs_map_uid_to_name(struct nfs_client *, __u32, char *, size_t); |
75 | int nfs_map_gid_to_group(struct nfs_client *, __u32, char *); | 102 | int nfs_map_gid_to_group(struct nfs_client *, __u32, char *, size_t); |
76 | 103 | ||
77 | extern unsigned int nfs_idmap_cache_timeout; | 104 | extern unsigned int nfs_idmap_cache_timeout; |
78 | #endif /* __KERNEL__ */ | 105 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/nfs_mount.h b/include/linux/nfs_mount.h index 5d59ae861aa6..576bddd72e04 100644 --- a/include/linux/nfs_mount.h +++ b/include/linux/nfs_mount.h | |||
@@ -71,4 +71,7 @@ struct nfs_mount_data { | |||
71 | #define NFS_MOUNT_NORESVPORT 0x40000 | 71 | #define NFS_MOUNT_NORESVPORT 0x40000 |
72 | #define NFS_MOUNT_LEGACY_INTERFACE 0x80000 | 72 | #define NFS_MOUNT_LEGACY_INTERFACE 0x80000 |
73 | 73 | ||
74 | #define NFS_MOUNT_LOCAL_FLOCK 0x100000 | ||
75 | #define NFS_MOUNT_LOCAL_FCNTL 0x200000 | ||
76 | |||
74 | #endif | 77 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index fc461926c412..ba6cc8f223c9 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -112,7 +112,9 @@ struct nfs_fsinfo { | |||
112 | __u32 wtmult; /* writes should be multiple of this */ | 112 | __u32 wtmult; /* writes should be multiple of this */ |
113 | __u32 dtpref; /* pref. readdir transfer size */ | 113 | __u32 dtpref; /* pref. readdir transfer size */ |
114 | __u64 maxfilesize; | 114 | __u64 maxfilesize; |
115 | struct timespec time_delta; /* server time granularity */ | ||
115 | __u32 lease_time; /* in seconds */ | 116 | __u32 lease_time; /* in seconds */ |
117 | __u32 layouttype; /* supported pnfs layout driver */ | ||
116 | }; | 118 | }; |
117 | 119 | ||
118 | struct nfs_fsstat { | 120 | struct nfs_fsstat { |
@@ -170,7 +172,7 @@ struct nfs4_sequence_args { | |||
170 | 172 | ||
171 | struct nfs4_sequence_res { | 173 | struct nfs4_sequence_res { |
172 | struct nfs4_session *sr_session; | 174 | struct nfs4_session *sr_session; |
173 | u8 sr_slotid; /* slot used to send request */ | 175 | struct nfs4_slot *sr_slot; /* slot used to send request */ |
174 | int sr_status; /* sequence operation status */ | 176 | int sr_status; /* sequence operation status */ |
175 | unsigned long sr_renewal_time; | 177 | unsigned long sr_renewal_time; |
176 | u32 sr_status_flags; | 178 | u32 sr_status_flags; |
@@ -185,6 +187,55 @@ struct nfs4_get_lease_time_res { | |||
185 | struct nfs4_sequence_res lr_seq_res; | 187 | struct nfs4_sequence_res lr_seq_res; |
186 | }; | 188 | }; |
187 | 189 | ||
190 | #define PNFS_LAYOUT_MAXSIZE 4096 | ||
191 | |||
192 | struct nfs4_layoutdriver_data { | ||
193 | __u32 len; | ||
194 | void *buf; | ||
195 | }; | ||
196 | |||
197 | struct pnfs_layout_range { | ||
198 | u32 iomode; | ||
199 | u64 offset; | ||
200 | u64 length; | ||
201 | }; | ||
202 | |||
203 | struct nfs4_layoutget_args { | ||
204 | __u32 type; | ||
205 | struct pnfs_layout_range range; | ||
206 | __u64 minlength; | ||
207 | __u32 maxcount; | ||
208 | struct inode *inode; | ||
209 | struct nfs_open_context *ctx; | ||
210 | struct nfs4_sequence_args seq_args; | ||
211 | }; | ||
212 | |||
213 | struct nfs4_layoutget_res { | ||
214 | __u32 return_on_close; | ||
215 | struct pnfs_layout_range range; | ||
216 | __u32 type; | ||
217 | nfs4_stateid stateid; | ||
218 | struct nfs4_layoutdriver_data layout; | ||
219 | struct nfs4_sequence_res seq_res; | ||
220 | }; | ||
221 | |||
222 | struct nfs4_layoutget { | ||
223 | struct nfs4_layoutget_args args; | ||
224 | struct nfs4_layoutget_res res; | ||
225 | struct pnfs_layout_segment **lsegpp; | ||
226 | int status; | ||
227 | }; | ||
228 | |||
229 | struct nfs4_getdeviceinfo_args { | ||
230 | struct pnfs_device *pdev; | ||
231 | struct nfs4_sequence_args seq_args; | ||
232 | }; | ||
233 | |||
234 | struct nfs4_getdeviceinfo_res { | ||
235 | struct pnfs_device *pdev; | ||
236 | struct nfs4_sequence_res seq_res; | ||
237 | }; | ||
238 | |||
188 | /* | 239 | /* |
189 | * Arguments to the open call. | 240 | * Arguments to the open call. |
190 | */ | 241 | */ |
@@ -400,6 +451,27 @@ struct nfs_removeres { | |||
400 | }; | 451 | }; |
401 | 452 | ||
402 | /* | 453 | /* |
454 | * Common arguments to the rename call | ||
455 | */ | ||
456 | struct nfs_renameargs { | ||
457 | const struct nfs_fh *old_dir; | ||
458 | const struct nfs_fh *new_dir; | ||
459 | const struct qstr *old_name; | ||
460 | const struct qstr *new_name; | ||
461 | const u32 *bitmask; | ||
462 | struct nfs4_sequence_args seq_args; | ||
463 | }; | ||
464 | |||
465 | struct nfs_renameres { | ||
466 | const struct nfs_server *server; | ||
467 | struct nfs4_change_info old_cinfo; | ||
468 | struct nfs_fattr *old_fattr; | ||
469 | struct nfs4_change_info new_cinfo; | ||
470 | struct nfs_fattr *new_fattr; | ||
471 | struct nfs4_sequence_res seq_res; | ||
472 | }; | ||
473 | |||
474 | /* | ||
403 | * Argument struct for decode_entry function | 475 | * Argument struct for decode_entry function |
404 | */ | 476 | */ |
405 | struct nfs_entry { | 477 | struct nfs_entry { |
@@ -434,15 +506,6 @@ struct nfs_createargs { | |||
434 | struct iattr * sattr; | 506 | struct iattr * sattr; |
435 | }; | 507 | }; |
436 | 508 | ||
437 | struct nfs_renameargs { | ||
438 | struct nfs_fh * fromfh; | ||
439 | const char * fromname; | ||
440 | unsigned int fromlen; | ||
441 | struct nfs_fh * tofh; | ||
442 | const char * toname; | ||
443 | unsigned int tolen; | ||
444 | }; | ||
445 | |||
446 | struct nfs_setattrargs { | 509 | struct nfs_setattrargs { |
447 | struct nfs_fh * fh; | 510 | struct nfs_fh * fh; |
448 | nfs4_stateid stateid; | 511 | nfs4_stateid stateid; |
@@ -586,15 +649,6 @@ struct nfs3_mknodargs { | |||
586 | dev_t rdev; | 649 | dev_t rdev; |
587 | }; | 650 | }; |
588 | 651 | ||
589 | struct nfs3_renameargs { | ||
590 | struct nfs_fh * fromfh; | ||
591 | const char * fromname; | ||
592 | unsigned int fromlen; | ||
593 | struct nfs_fh * tofh; | ||
594 | const char * toname; | ||
595 | unsigned int tolen; | ||
596 | }; | ||
597 | |||
598 | struct nfs3_linkargs { | 652 | struct nfs3_linkargs { |
599 | struct nfs_fh * fromfh; | 653 | struct nfs_fh * fromfh; |
600 | struct nfs_fh * tofh; | 654 | struct nfs_fh * tofh; |
@@ -629,11 +683,6 @@ struct nfs3_readlinkargs { | |||
629 | struct page ** pages; | 683 | struct page ** pages; |
630 | }; | 684 | }; |
631 | 685 | ||
632 | struct nfs3_renameres { | ||
633 | struct nfs_fattr * fromattr; | ||
634 | struct nfs_fattr * toattr; | ||
635 | }; | ||
636 | |||
637 | struct nfs3_linkres { | 686 | struct nfs3_linkres { |
638 | struct nfs_fattr * dir_attr; | 687 | struct nfs_fattr * dir_attr; |
639 | struct nfs_fattr * fattr; | 688 | struct nfs_fattr * fattr; |
@@ -780,6 +829,7 @@ struct nfs4_readdir_arg { | |||
780 | struct page ** pages; /* zero-copy data */ | 829 | struct page ** pages; /* zero-copy data */ |
781 | unsigned int pgbase; /* zero-copy data */ | 830 | unsigned int pgbase; /* zero-copy data */ |
782 | const u32 * bitmask; | 831 | const u32 * bitmask; |
832 | int plus; | ||
783 | struct nfs4_sequence_args seq_args; | 833 | struct nfs4_sequence_args seq_args; |
784 | }; | 834 | }; |
785 | 835 | ||
@@ -801,24 +851,6 @@ struct nfs4_readlink_res { | |||
801 | struct nfs4_sequence_res seq_res; | 851 | struct nfs4_sequence_res seq_res; |
802 | }; | 852 | }; |
803 | 853 | ||
804 | struct nfs4_rename_arg { | ||
805 | const struct nfs_fh * old_dir; | ||
806 | const struct nfs_fh * new_dir; | ||
807 | const struct qstr * old_name; | ||
808 | const struct qstr * new_name; | ||
809 | const u32 * bitmask; | ||
810 | struct nfs4_sequence_args seq_args; | ||
811 | }; | ||
812 | |||
813 | struct nfs4_rename_res { | ||
814 | const struct nfs_server * server; | ||
815 | struct nfs4_change_info old_cinfo; | ||
816 | struct nfs_fattr * old_fattr; | ||
817 | struct nfs4_change_info new_cinfo; | ||
818 | struct nfs_fattr * new_fattr; | ||
819 | struct nfs4_sequence_res seq_res; | ||
820 | }; | ||
821 | |||
822 | #define NFS4_SETCLIENTID_NAMELEN (127) | 854 | #define NFS4_SETCLIENTID_NAMELEN (127) |
823 | struct nfs4_setclientid { | 855 | struct nfs4_setclientid { |
824 | const nfs4_verifier * sc_verifier; | 856 | const nfs4_verifier * sc_verifier; |
@@ -1032,19 +1064,21 @@ struct nfs_rpc_ops { | |||
1032 | int (*readlink)(struct inode *, struct page *, unsigned int, | 1064 | int (*readlink)(struct inode *, struct page *, unsigned int, |
1033 | unsigned int); | 1065 | unsigned int); |
1034 | int (*create) (struct inode *, struct dentry *, | 1066 | int (*create) (struct inode *, struct dentry *, |
1035 | struct iattr *, int, struct nameidata *); | 1067 | struct iattr *, int, struct nfs_open_context *); |
1036 | int (*remove) (struct inode *, struct qstr *); | 1068 | int (*remove) (struct inode *, struct qstr *); |
1037 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); | 1069 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
1038 | int (*unlink_done) (struct rpc_task *, struct inode *); | 1070 | int (*unlink_done) (struct rpc_task *, struct inode *); |
1039 | int (*rename) (struct inode *, struct qstr *, | 1071 | int (*rename) (struct inode *, struct qstr *, |
1040 | struct inode *, struct qstr *); | 1072 | struct inode *, struct qstr *); |
1073 | void (*rename_setup) (struct rpc_message *msg, struct inode *dir); | ||
1074 | int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir); | ||
1041 | int (*link) (struct inode *, struct inode *, struct qstr *); | 1075 | int (*link) (struct inode *, struct inode *, struct qstr *); |
1042 | int (*symlink) (struct inode *, struct dentry *, struct page *, | 1076 | int (*symlink) (struct inode *, struct dentry *, struct page *, |
1043 | unsigned int, struct iattr *); | 1077 | unsigned int, struct iattr *); |
1044 | int (*mkdir) (struct inode *, struct dentry *, struct iattr *); | 1078 | int (*mkdir) (struct inode *, struct dentry *, struct iattr *); |
1045 | int (*rmdir) (struct inode *, struct qstr *); | 1079 | int (*rmdir) (struct inode *, struct qstr *); |
1046 | int (*readdir) (struct dentry *, struct rpc_cred *, | 1080 | int (*readdir) (struct dentry *, struct rpc_cred *, |
1047 | u64, struct page *, unsigned int, int); | 1081 | u64, struct page **, unsigned int, int); |
1048 | int (*mknod) (struct inode *, struct dentry *, struct iattr *, | 1082 | int (*mknod) (struct inode *, struct dentry *, struct iattr *, |
1049 | dev_t); | 1083 | dev_t); |
1050 | int (*statfs) (struct nfs_server *, struct nfs_fh *, | 1084 | int (*statfs) (struct nfs_server *, struct nfs_fh *, |
@@ -1054,7 +1088,7 @@ struct nfs_rpc_ops { | |||
1054 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, | 1088 | int (*pathconf) (struct nfs_server *, struct nfs_fh *, |
1055 | struct nfs_pathconf *); | 1089 | struct nfs_pathconf *); |
1056 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); | 1090 | int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); |
1057 | __be32 *(*decode_dirent)(__be32 *, struct nfs_entry *, int plus); | 1091 | __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus); |
1058 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); | 1092 | void (*read_setup) (struct nfs_read_data *, struct rpc_message *); |
1059 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); | 1093 | int (*read_done) (struct rpc_task *, struct nfs_read_data *); |
1060 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); | 1094 | void (*write_setup) (struct nfs_write_data *, struct rpc_message *); |
@@ -1065,6 +1099,10 @@ struct nfs_rpc_ops { | |||
1065 | int (*lock_check_bounds)(const struct file_lock *); | 1099 | int (*lock_check_bounds)(const struct file_lock *); |
1066 | void (*clear_acl_cache)(struct inode *); | 1100 | void (*clear_acl_cache)(struct inode *); |
1067 | void (*close_context)(struct nfs_open_context *ctx, int); | 1101 | void (*close_context)(struct nfs_open_context *ctx, int); |
1102 | struct inode * (*open_context) (struct inode *dir, | ||
1103 | struct nfs_open_context *ctx, | ||
1104 | int open_flags, | ||
1105 | struct iattr *iattr); | ||
1068 | }; | 1106 | }; |
1069 | 1107 | ||
1070 | /* | 1108 | /* |
diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h index e8c06122be36..19ef95d293ae 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h | |||
@@ -67,7 +67,8 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags, | |||
67 | 67 | ||
68 | #define get_pageblock_flags(page) \ | 68 | #define get_pageblock_flags(page) \ |
69 | get_pageblock_flags_group(page, 0, NR_PAGEBLOCK_BITS-1) | 69 | get_pageblock_flags_group(page, 0, NR_PAGEBLOCK_BITS-1) |
70 | #define set_pageblock_flags(page) \ | 70 | #define set_pageblock_flags(page, flags) \ |
71 | set_pageblock_flags_group(page, 0, NR_PAGEBLOCK_BITS-1) | 71 | set_pageblock_flags_group(page, flags, \ |
72 | 0, NR_PAGEBLOCK_BITS-1) | ||
72 | 73 | ||
73 | #endif /* PAGEBLOCK_FLAGS_H */ | 74 | #endif /* PAGEBLOCK_FLAGS_H */ |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index e12cdc6d79ee..2d1ffe3cf1ee 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -299,6 +299,8 @@ static inline pgoff_t linear_page_index(struct vm_area_struct *vma, | |||
299 | extern void __lock_page(struct page *page); | 299 | extern void __lock_page(struct page *page); |
300 | extern int __lock_page_killable(struct page *page); | 300 | extern int __lock_page_killable(struct page *page); |
301 | extern void __lock_page_nosync(struct page *page); | 301 | extern void __lock_page_nosync(struct page *page); |
302 | extern int __lock_page_or_retry(struct page *page, struct mm_struct *mm, | ||
303 | unsigned int flags); | ||
302 | extern void unlock_page(struct page *page); | 304 | extern void unlock_page(struct page *page); |
303 | 305 | ||
304 | static inline void __set_page_locked(struct page *page) | 306 | static inline void __set_page_locked(struct page *page) |
@@ -351,6 +353,17 @@ static inline void lock_page_nosync(struct page *page) | |||
351 | } | 353 | } |
352 | 354 | ||
353 | /* | 355 | /* |
356 | * lock_page_or_retry - Lock the page, unless this would block and the | ||
357 | * caller indicated that it can handle a retry. | ||
358 | */ | ||
359 | static inline int lock_page_or_retry(struct page *page, struct mm_struct *mm, | ||
360 | unsigned int flags) | ||
361 | { | ||
362 | might_sleep(); | ||
363 | return trylock_page(page) || __lock_page_or_retry(page, mm, flags); | ||
364 | } | ||
365 | |||
366 | /* | ||
354 | * This is exported only for wait_on_page_locked/wait_on_page_writeback. | 367 | * This is exported only for wait_on_page_locked/wait_on_page_writeback. |
355 | * Never use this directly! | 368 | * Never use this directly! |
356 | */ | 369 | */ |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 30083a896f36..7d7325685c42 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -89,6 +89,7 @@ enum power_supply_property { | |||
89 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, | 89 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, |
90 | POWER_SUPPLY_PROP_VOLTAGE_NOW, | 90 | POWER_SUPPLY_PROP_VOLTAGE_NOW, |
91 | POWER_SUPPLY_PROP_VOLTAGE_AVG, | 91 | POWER_SUPPLY_PROP_VOLTAGE_AVG, |
92 | POWER_SUPPLY_PROP_CURRENT_MAX, | ||
92 | POWER_SUPPLY_PROP_CURRENT_NOW, | 93 | POWER_SUPPLY_PROP_CURRENT_NOW, |
93 | POWER_SUPPLY_PROP_CURRENT_AVG, | 94 | POWER_SUPPLY_PROP_CURRENT_AVG, |
94 | POWER_SUPPLY_PROP_POWER_NOW, | 95 | POWER_SUPPLY_PROP_POWER_NOW, |
@@ -125,7 +126,10 @@ enum power_supply_type { | |||
125 | POWER_SUPPLY_TYPE_BATTERY = 0, | 126 | POWER_SUPPLY_TYPE_BATTERY = 0, |
126 | POWER_SUPPLY_TYPE_UPS, | 127 | POWER_SUPPLY_TYPE_UPS, |
127 | POWER_SUPPLY_TYPE_MAINS, | 128 | POWER_SUPPLY_TYPE_MAINS, |
128 | POWER_SUPPLY_TYPE_USB, | 129 | POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */ |
130 | POWER_SUPPLY_TYPE_USB_DCP, /* Dedicated Charging Port */ | ||
131 | POWER_SUPPLY_TYPE_USB_CDP, /* Charging Downstream Port */ | ||
132 | POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */ | ||
129 | }; | 133 | }; |
130 | 134 | ||
131 | union power_supply_propval { | 135 | union power_supply_propval { |
diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h index 8f69d09a41a5..03ff67b0cdf5 100644 --- a/include/linux/ratelimit.h +++ b/include/linux/ratelimit.h | |||
@@ -36,6 +36,8 @@ static inline void ratelimit_state_init(struct ratelimit_state *rs, | |||
36 | rs->begin = 0; | 36 | rs->begin = 0; |
37 | } | 37 | } |
38 | 38 | ||
39 | extern struct ratelimit_state printk_ratelimit_state; | ||
40 | |||
39 | extern int ___ratelimit(struct ratelimit_state *rs, const char *func); | 41 | extern int ___ratelimit(struct ratelimit_state *rs, const char *func); |
40 | #define __ratelimit(state) ___ratelimit(state, __func__) | 42 | #define __ratelimit(state) ___ratelimit(state, __func__) |
41 | 43 | ||
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 31b2fd75dcba..bb83c0da2071 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -25,8 +25,8 @@ | |||
25 | * pointing to this anon_vma once its vma list is empty. | 25 | * pointing to this anon_vma once its vma list is empty. |
26 | */ | 26 | */ |
27 | struct anon_vma { | 27 | struct anon_vma { |
28 | spinlock_t lock; /* Serialize access to vma list */ | ||
29 | struct anon_vma *root; /* Root of this anon_vma tree */ | 28 | struct anon_vma *root; /* Root of this anon_vma tree */ |
29 | spinlock_t lock; /* Serialize access to vma list */ | ||
30 | #if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION) | 30 | #if defined(CONFIG_KSM) || defined(CONFIG_MIGRATION) |
31 | 31 | ||
32 | /* | 32 | /* |
@@ -205,9 +205,20 @@ int try_to_unmap_one(struct page *, struct vm_area_struct *, | |||
205 | /* | 205 | /* |
206 | * Called from mm/filemap_xip.c to unmap empty zero page | 206 | * Called from mm/filemap_xip.c to unmap empty zero page |
207 | */ | 207 | */ |
208 | pte_t *page_check_address(struct page *, struct mm_struct *, | 208 | pte_t *__page_check_address(struct page *, struct mm_struct *, |
209 | unsigned long, spinlock_t **, int); | 209 | unsigned long, spinlock_t **, int); |
210 | 210 | ||
211 | static inline pte_t *page_check_address(struct page *page, struct mm_struct *mm, | ||
212 | unsigned long address, | ||
213 | spinlock_t **ptlp, int sync) | ||
214 | { | ||
215 | pte_t *ptep; | ||
216 | |||
217 | __cond_lock(*ptlp, ptep = __page_check_address(page, mm, address, | ||
218 | ptlp, sync)); | ||
219 | return ptep; | ||
220 | } | ||
221 | |||
211 | /* | 222 | /* |
212 | * Used by swapoff to help locate where page is expected in vma. | 223 | * Used by swapoff to help locate where page is expected in vma. |
213 | */ | 224 | */ |
@@ -230,7 +241,20 @@ int try_to_munlock(struct page *); | |||
230 | /* | 241 | /* |
231 | * Called by memory-failure.c to kill processes. | 242 | * Called by memory-failure.c to kill processes. |
232 | */ | 243 | */ |
233 | struct anon_vma *page_lock_anon_vma(struct page *page); | 244 | struct anon_vma *__page_lock_anon_vma(struct page *page); |
245 | |||
246 | static inline struct anon_vma *page_lock_anon_vma(struct page *page) | ||
247 | { | ||
248 | struct anon_vma *anon_vma; | ||
249 | |||
250 | __cond_lock(RCU, anon_vma = __page_lock_anon_vma(page)); | ||
251 | |||
252 | /* (void) is needed to make gcc happy */ | ||
253 | (void) __cond_lock(&anon_vma->root->lock, anon_vma); | ||
254 | |||
255 | return anon_vma; | ||
256 | } | ||
257 | |||
234 | void page_unlock_anon_vma(struct anon_vma *anon_vma); | 258 | void page_unlock_anon_vma(struct anon_vma *anon_vma); |
235 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); | 259 | int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma); |
236 | 260 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 56154bbb8da9..393ce94e54b7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1706,7 +1706,6 @@ extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t * | |||
1706 | #define PF_DUMPCORE 0x00000200 /* dumped core */ | 1706 | #define PF_DUMPCORE 0x00000200 /* dumped core */ |
1707 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ | 1707 | #define PF_SIGNALED 0x00000400 /* killed by a signal */ |
1708 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1708 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
1709 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ | ||
1710 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1709 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
1711 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ | 1710 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ |
1712 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1711 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 99e5994e6f84..212eb4c67797 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -196,6 +196,9 @@ | |||
196 | /* High Speed UART for Medfield */ | 196 | /* High Speed UART for Medfield */ |
197 | #define PORT_MFD 95 | 197 | #define PORT_MFD 95 |
198 | 198 | ||
199 | /* TI OMAP-UART */ | ||
200 | #define PORT_OMAP 96 | ||
201 | |||
199 | #ifdef __KERNEL__ | 202 | #ifdef __KERNEL__ |
200 | 203 | ||
201 | #include <linux/compiler.h> | 204 | #include <linux/compiler.h> |
diff --git a/include/linux/sfi.h b/include/linux/sfi.h index 0299b4ce63db..7f770c638e99 100644 --- a/include/linux/sfi.h +++ b/include/linux/sfi.h | |||
@@ -70,9 +70,6 @@ | |||
70 | #define SFI_SIG_APIC "APIC" | 70 | #define SFI_SIG_APIC "APIC" |
71 | #define SFI_SIG_XSDT "XSDT" | 71 | #define SFI_SIG_XSDT "XSDT" |
72 | #define SFI_SIG_WAKE "WAKE" | 72 | #define SFI_SIG_WAKE "WAKE" |
73 | #define SFI_SIG_SPIB "SPIB" | ||
74 | #define SFI_SIG_I2CB "I2CB" | ||
75 | #define SFI_SIG_GPEM "GPEM" | ||
76 | #define SFI_SIG_DEVS "DEVS" | 73 | #define SFI_SIG_DEVS "DEVS" |
77 | #define SFI_SIG_GPIO "GPIO" | 74 | #define SFI_SIG_GPIO "GPIO" |
78 | 75 | ||
@@ -168,27 +165,6 @@ struct sfi_gpio_table_entry { | |||
168 | char pin_name[16]; | 165 | char pin_name[16]; |
169 | } __packed; | 166 | } __packed; |
170 | 167 | ||
171 | struct sfi_spi_table_entry { | ||
172 | u16 host_num; /* attached to host 0, 1...*/ | ||
173 | u16 cs; /* chip select */ | ||
174 | u16 irq_info; | ||
175 | char name[16]; | ||
176 | u8 dev_info[10]; | ||
177 | } __packed; | ||
178 | |||
179 | struct sfi_i2c_table_entry { | ||
180 | u16 host_num; | ||
181 | u16 addr; /* slave addr */ | ||
182 | u16 irq_info; | ||
183 | char name[16]; | ||
184 | u8 dev_info[10]; | ||
185 | } __packed; | ||
186 | |||
187 | struct sfi_gpe_table_entry { | ||
188 | u16 logical_id; /* logical id */ | ||
189 | u16 phys_id; /* physical GPE id */ | ||
190 | } __packed; | ||
191 | |||
192 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); | 168 | typedef int (*sfi_table_handler) (struct sfi_table_header *table); |
193 | 169 | ||
194 | #ifdef CONFIG_SFI | 170 | #ifdef CONFIG_SFI |
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index b363b916c909..3ff4961da9b5 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
@@ -33,6 +33,7 @@ struct signalfd_siginfo { | |||
33 | __u64 ssi_utime; | 33 | __u64 ssi_utime; |
34 | __u64 ssi_stime; | 34 | __u64 ssi_stime; |
35 | __u64 ssi_addr; | 35 | __u64 ssi_addr; |
36 | __u16 ssi_addr_lsb; | ||
36 | 37 | ||
37 | /* | 38 | /* |
38 | * Pad strcture to 128 bytes. Remember to update the | 39 | * Pad strcture to 128 bytes. Remember to update the |
@@ -43,7 +44,7 @@ struct signalfd_siginfo { | |||
43 | * comes out of a read(2) and we really don't want to have | 44 | * comes out of a read(2) and we really don't want to have |
44 | * a compat on read(2). | 45 | * a compat on read(2). |
45 | */ | 46 | */ |
46 | __u8 __pad[48]; | 47 | __u8 __pad[46]; |
47 | }; | 48 | }; |
48 | 49 | ||
49 | 50 | ||
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 5bbc447175dc..b2024757edd5 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -122,8 +122,8 @@ extern const struct rpc_authops authnull_ops; | |||
122 | int __init rpc_init_authunix(void); | 122 | int __init rpc_init_authunix(void); |
123 | int __init rpc_init_generic_auth(void); | 123 | int __init rpc_init_generic_auth(void); |
124 | int __init rpcauth_init_module(void); | 124 | int __init rpcauth_init_module(void); |
125 | void __exit rpcauth_remove_module(void); | 125 | void rpcauth_remove_module(void); |
126 | void __exit rpc_destroy_generic_auth(void); | 126 | void rpc_destroy_generic_auth(void); |
127 | void rpc_destroy_authunix(void); | 127 | void rpc_destroy_authunix(void); |
128 | 128 | ||
129 | struct rpc_cred * rpc_lookup_cred(void); | 129 | struct rpc_cred * rpc_lookup_cred(void); |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 7bf3e84b92f4..6950c981882d 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -125,12 +125,15 @@ struct cache_detail { | |||
125 | */ | 125 | */ |
126 | struct cache_req { | 126 | struct cache_req { |
127 | struct cache_deferred_req *(*defer)(struct cache_req *req); | 127 | struct cache_deferred_req *(*defer)(struct cache_req *req); |
128 | int thread_wait; /* How long (jiffies) we can block the | ||
129 | * current thread to wait for updates. | ||
130 | */ | ||
128 | }; | 131 | }; |
129 | /* this must be embedded in a deferred_request that is being | 132 | /* this must be embedded in a deferred_request that is being |
130 | * delayed awaiting cache-fill | 133 | * delayed awaiting cache-fill |
131 | */ | 134 | */ |
132 | struct cache_deferred_req { | 135 | struct cache_deferred_req { |
133 | struct list_head hash; /* on hash chain */ | 136 | struct hlist_node hash; /* on hash chain */ |
134 | struct list_head recent; /* on fifo */ | 137 | struct list_head recent; /* on fifo */ |
135 | struct cache_head *item; /* cache item we wait on */ | 138 | struct cache_head *item; /* cache item we wait on */ |
136 | void *owner; /* we might need to discard all defered requests | 139 | void *owner; /* we might need to discard all defered requests |
@@ -194,7 +197,9 @@ extern void cache_purge(struct cache_detail *detail); | |||
194 | #define NEVER (0x7FFFFFFF) | 197 | #define NEVER (0x7FFFFFFF) |
195 | extern void __init cache_initialize(void); | 198 | extern void __init cache_initialize(void); |
196 | extern int cache_register(struct cache_detail *cd); | 199 | extern int cache_register(struct cache_detail *cd); |
200 | extern int cache_register_net(struct cache_detail *cd, struct net *net); | ||
197 | extern void cache_unregister(struct cache_detail *cd); | 201 | extern void cache_unregister(struct cache_detail *cd); |
202 | extern void cache_unregister_net(struct cache_detail *cd, struct net *net); | ||
198 | 203 | ||
199 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, | 204 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, |
200 | mode_t, struct cache_detail *); | 205 | mode_t, struct cache_detail *); |
@@ -218,14 +223,42 @@ static inline int get_int(char **bpp, int *anint) | |||
218 | return 0; | 223 | return 0; |
219 | } | 224 | } |
220 | 225 | ||
226 | /* | ||
227 | * timestamps kept in the cache are expressed in seconds | ||
228 | * since boot. This is the best for measuring differences in | ||
229 | * real time. | ||
230 | */ | ||
231 | static inline time_t seconds_since_boot(void) | ||
232 | { | ||
233 | struct timespec boot; | ||
234 | getboottime(&boot); | ||
235 | return get_seconds() - boot.tv_sec; | ||
236 | } | ||
237 | |||
238 | static inline time_t convert_to_wallclock(time_t sinceboot) | ||
239 | { | ||
240 | struct timespec boot; | ||
241 | getboottime(&boot); | ||
242 | return boot.tv_sec + sinceboot; | ||
243 | } | ||
244 | |||
221 | static inline time_t get_expiry(char **bpp) | 245 | static inline time_t get_expiry(char **bpp) |
222 | { | 246 | { |
223 | int rv; | 247 | int rv; |
248 | struct timespec boot; | ||
249 | |||
224 | if (get_int(bpp, &rv)) | 250 | if (get_int(bpp, &rv)) |
225 | return 0; | 251 | return 0; |
226 | if (rv < 0) | 252 | if (rv < 0) |
227 | return 0; | 253 | return 0; |
228 | return rv; | 254 | getboottime(&boot); |
255 | return rv - boot.tv_sec; | ||
229 | } | 256 | } |
230 | 257 | ||
258 | static inline void sunrpc_invalidate(struct cache_head *h, | ||
259 | struct cache_detail *detail) | ||
260 | { | ||
261 | h->expiry_time = seconds_since_boot() - 1; | ||
262 | detail->nextcheck = seconds_since_boot(); | ||
263 | } | ||
231 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ | 264 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 85f38a63f098..a5a55f284b7d 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -102,6 +102,7 @@ struct rpc_procinfo { | |||
102 | #ifdef __KERNEL__ | 102 | #ifdef __KERNEL__ |
103 | 103 | ||
104 | struct rpc_create_args { | 104 | struct rpc_create_args { |
105 | struct net *net; | ||
105 | int protocol; | 106 | int protocol; |
106 | struct sockaddr *address; | 107 | struct sockaddr *address; |
107 | size_t addrsize; | 108 | size_t addrsize; |
@@ -137,7 +138,6 @@ int rpcb_register(u32, u32, int, unsigned short); | |||
137 | int rpcb_v4_register(const u32 program, const u32 version, | 138 | int rpcb_v4_register(const u32 program, const u32 version, |
138 | const struct sockaddr *address, | 139 | const struct sockaddr *address, |
139 | const char *netid); | 140 | const char *netid); |
140 | int rpcb_getport_sync(struct sockaddr_in *, u32, u32, int); | ||
141 | void rpcb_getport_async(struct rpc_task *); | 141 | void rpcb_getport_async(struct rpc_task *); |
142 | 142 | ||
143 | void rpc_call_start(struct rpc_task *); | 143 | void rpc_call_start(struct rpc_task *); |
diff --git a/include/linux/sunrpc/gss_spkm3.h b/include/linux/sunrpc/gss_spkm3.h deleted file mode 100644 index e3e6a3437f8b..000000000000 --- a/include/linux/sunrpc/gss_spkm3.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/linux/sunrpc/gss_spkm3.h | ||
3 | * | ||
4 | * Copyright (c) 2000 The Regents of the University of Michigan. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Andy Adamson <andros@umich.edu> | ||
8 | */ | ||
9 | |||
10 | #include <linux/sunrpc/auth_gss.h> | ||
11 | #include <linux/sunrpc/gss_err.h> | ||
12 | #include <linux/sunrpc/gss_asn1.h> | ||
13 | |||
14 | struct spkm3_ctx { | ||
15 | struct xdr_netobj ctx_id; /* per message context id */ | ||
16 | int endtime; /* endtime of the context */ | ||
17 | struct xdr_netobj mech_used; | ||
18 | unsigned int ret_flags ; | ||
19 | struct xdr_netobj conf_alg; | ||
20 | struct xdr_netobj derived_conf_key; | ||
21 | struct xdr_netobj intg_alg; | ||
22 | struct xdr_netobj derived_integ_key; | ||
23 | }; | ||
24 | |||
25 | /* OIDs declarations for K-ALG, I-ALG, C-ALG, and OWF-ALG */ | ||
26 | extern const struct xdr_netobj hmac_md5_oid; | ||
27 | extern const struct xdr_netobj cast5_cbc_oid; | ||
28 | |||
29 | /* SPKM InnerContext Token types */ | ||
30 | |||
31 | #define SPKM_ERROR_TOK 3 | ||
32 | #define SPKM_MIC_TOK 4 | ||
33 | #define SPKM_WRAP_TOK 5 | ||
34 | #define SPKM_DEL_TOK 6 | ||
35 | |||
36 | u32 spkm3_make_token(struct spkm3_ctx *ctx, struct xdr_buf * text, struct xdr_netobj * token, int toktype); | ||
37 | |||
38 | u32 spkm3_read_token(struct spkm3_ctx *ctx, struct xdr_netobj *read_token, struct xdr_buf *message_buffer, int toktype); | ||
39 | |||
40 | #define CKSUMTYPE_RSA_MD5 0x0007 | ||
41 | #define CKSUMTYPE_HMAC_MD5 0x0008 | ||
42 | |||
43 | s32 make_spkm3_checksum(s32 cksumtype, struct xdr_netobj *key, char *header, | ||
44 | unsigned int hdrlen, struct xdr_buf *body, | ||
45 | unsigned int body_offset, struct xdr_netobj *cksum); | ||
46 | void asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits); | ||
47 | int decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, | ||
48 | int explen); | ||
49 | void spkm3_mic_header(unsigned char **hdrbuf, unsigned int *hdrlen, | ||
50 | unsigned char *ctxhdr, int elen, int zbit); | ||
51 | void spkm3_make_mic_token(unsigned char **tokp, int toklen, | ||
52 | struct xdr_netobj *mic_hdr, | ||
53 | struct xdr_netobj *md5cksum, int md5elen, int md5zbit); | ||
54 | u32 spkm3_verify_mic_token(unsigned char **tokp, int *mic_hdrlen, | ||
55 | unsigned char **cksum); | ||
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h index 5fa0f2084307..680471d1f28a 100644 --- a/include/linux/sunrpc/stats.h +++ b/include/linux/sunrpc/stats.h | |||
@@ -38,8 +38,21 @@ struct svc_stat { | |||
38 | rpcbadclnt; | 38 | rpcbadclnt; |
39 | }; | 39 | }; |
40 | 40 | ||
41 | void rpc_proc_init(void); | 41 | struct net; |
42 | void rpc_proc_exit(void); | 42 | #ifdef CONFIG_PROC_FS |
43 | int rpc_proc_init(struct net *); | ||
44 | void rpc_proc_exit(struct net *); | ||
45 | #else | ||
46 | static inline int rpc_proc_init(struct net *net) | ||
47 | { | ||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | static inline void rpc_proc_exit(struct net *net) | ||
52 | { | ||
53 | } | ||
54 | #endif | ||
55 | |||
43 | #ifdef MODULE | 56 | #ifdef MODULE |
44 | void rpc_modcount(struct inode *, int); | 57 | void rpc_modcount(struct inode *, int); |
45 | #endif | 58 | #endif |
@@ -54,9 +67,6 @@ void svc_proc_unregister(const char *); | |||
54 | 67 | ||
55 | void svc_seq_show(struct seq_file *, | 68 | void svc_seq_show(struct seq_file *, |
56 | const struct svc_stat *); | 69 | const struct svc_stat *); |
57 | |||
58 | extern struct proc_dir_entry *proc_net_rpc; | ||
59 | |||
60 | #else | 70 | #else |
61 | 71 | ||
62 | static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; } | 72 | static inline struct proc_dir_entry *rpc_proc_register(struct rpc_stat *s) { return NULL; } |
@@ -69,9 +79,6 @@ static inline void svc_proc_unregister(const char *p) {} | |||
69 | 79 | ||
70 | static inline void svc_seq_show(struct seq_file *seq, | 80 | static inline void svc_seq_show(struct seq_file *seq, |
71 | const struct svc_stat *st) {} | 81 | const struct svc_stat *st) {} |
72 | |||
73 | #define proc_net_rpc NULL | ||
74 | |||
75 | #endif | 82 | #endif |
76 | 83 | ||
77 | #endif /* _LINUX_SUNRPC_STATS_H */ | 84 | #endif /* _LINUX_SUNRPC_STATS_H */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 5f4e18b3ce73..bbdb680ffbe9 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | struct svc_xprt_ops { | 13 | struct svc_xprt_ops { |
14 | struct svc_xprt *(*xpo_create)(struct svc_serv *, | 14 | struct svc_xprt *(*xpo_create)(struct svc_serv *, |
15 | struct net *net, | ||
15 | struct sockaddr *, int, | 16 | struct sockaddr *, int, |
16 | int); | 17 | int); |
17 | struct svc_xprt *(*xpo_accept)(struct svc_xprt *); | 18 | struct svc_xprt *(*xpo_accept)(struct svc_xprt *); |
@@ -32,6 +33,16 @@ struct svc_xprt_class { | |||
32 | u32 xcl_max_payload; | 33 | u32 xcl_max_payload; |
33 | }; | 34 | }; |
34 | 35 | ||
36 | /* | ||
37 | * This is embedded in an object that wants a callback before deleting | ||
38 | * an xprt; intended for use by NFSv4.1, which needs to know when a | ||
39 | * client's tcp connection (and hence possibly a backchannel) goes away. | ||
40 | */ | ||
41 | struct svc_xpt_user { | ||
42 | struct list_head list; | ||
43 | void (*callback)(struct svc_xpt_user *); | ||
44 | }; | ||
45 | |||
35 | struct svc_xprt { | 46 | struct svc_xprt { |
36 | struct svc_xprt_class *xpt_class; | 47 | struct svc_xprt_class *xpt_class; |
37 | struct svc_xprt_ops *xpt_ops; | 48 | struct svc_xprt_ops *xpt_ops; |
@@ -66,14 +77,31 @@ struct svc_xprt { | |||
66 | struct sockaddr_storage xpt_remote; /* remote peer's address */ | 77 | struct sockaddr_storage xpt_remote; /* remote peer's address */ |
67 | size_t xpt_remotelen; /* length of address */ | 78 | size_t xpt_remotelen; /* length of address */ |
68 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ | 79 | struct rpc_wait_queue xpt_bc_pending; /* backchannel wait queue */ |
80 | struct list_head xpt_users; /* callbacks on free */ | ||
81 | |||
82 | struct net *xpt_net; | ||
69 | }; | 83 | }; |
70 | 84 | ||
85 | static inline void register_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | ||
86 | { | ||
87 | spin_lock(&xpt->xpt_lock); | ||
88 | list_add(&u->list, &xpt->xpt_users); | ||
89 | spin_unlock(&xpt->xpt_lock); | ||
90 | } | ||
91 | |||
92 | static inline void unregister_xpt_user(struct svc_xprt *xpt, struct svc_xpt_user *u) | ||
93 | { | ||
94 | spin_lock(&xpt->xpt_lock); | ||
95 | list_del_init(&u->list); | ||
96 | spin_unlock(&xpt->xpt_lock); | ||
97 | } | ||
98 | |||
71 | int svc_reg_xprt_class(struct svc_xprt_class *); | 99 | int svc_reg_xprt_class(struct svc_xprt_class *); |
72 | void svc_unreg_xprt_class(struct svc_xprt_class *); | 100 | void svc_unreg_xprt_class(struct svc_xprt_class *); |
73 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, | 101 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *, |
74 | struct svc_serv *); | 102 | struct svc_serv *); |
75 | int svc_create_xprt(struct svc_serv *, const char *, const int, | 103 | int svc_create_xprt(struct svc_serv *, const char *, struct net *, |
76 | const unsigned short, int); | 104 | const int, const unsigned short, int); |
77 | void svc_xprt_enqueue(struct svc_xprt *xprt); | 105 | void svc_xprt_enqueue(struct svc_xprt *xprt); |
78 | void svc_xprt_received(struct svc_xprt *); | 106 | void svc_xprt_received(struct svc_xprt *); |
79 | void svc_xprt_put(struct svc_xprt *xprt); | 107 | void svc_xprt_put(struct svc_xprt *xprt); |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index d39dbdc7b10f..25d333c1b571 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -108,10 +108,15 @@ struct auth_ops { | |||
108 | #define SVC_NEGATIVE 4 | 108 | #define SVC_NEGATIVE 4 |
109 | #define SVC_OK 5 | 109 | #define SVC_OK 5 |
110 | #define SVC_DROP 6 | 110 | #define SVC_DROP 6 |
111 | #define SVC_DENIED 7 | 111 | #define SVC_CLOSE 7 /* Like SVC_DROP, but request is definitely |
112 | #define SVC_PENDING 8 | 112 | * lost so if there is a tcp connection, it |
113 | #define SVC_COMPLETE 9 | 113 | * should be closed |
114 | */ | ||
115 | #define SVC_DENIED 8 | ||
116 | #define SVC_PENDING 9 | ||
117 | #define SVC_COMPLETE 10 | ||
114 | 118 | ||
119 | struct svc_xprt; | ||
115 | 120 | ||
116 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); | 121 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); |
117 | extern int svc_authorise(struct svc_rqst *rqstp); | 122 | extern int svc_authorise(struct svc_rqst *rqstp); |
@@ -121,13 +126,13 @@ extern void svc_auth_unregister(rpc_authflavor_t flavor); | |||
121 | 126 | ||
122 | extern struct auth_domain *unix_domain_find(char *name); | 127 | extern struct auth_domain *unix_domain_find(char *name); |
123 | extern void auth_domain_put(struct auth_domain *item); | 128 | extern void auth_domain_put(struct auth_domain *item); |
124 | extern int auth_unix_add_addr(struct in6_addr *addr, struct auth_domain *dom); | 129 | extern int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom); |
125 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); | 130 | extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *new); |
126 | extern struct auth_domain *auth_domain_find(char *name); | 131 | extern struct auth_domain *auth_domain_find(char *name); |
127 | extern struct auth_domain *auth_unix_lookup(struct in6_addr *addr); | 132 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); |
128 | extern int auth_unix_forget_old(struct auth_domain *dom); | 133 | extern int auth_unix_forget_old(struct auth_domain *dom); |
129 | extern void svcauth_unix_purge(void); | 134 | extern void svcauth_unix_purge(void); |
130 | extern void svcauth_unix_info_release(void *); | 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
131 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
132 | 137 | ||
133 | static inline unsigned long hash_str(char *name, int bits) | 138 | static inline unsigned long hash_str(char *name, int bits) |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 35cf2e8cd7c6..498ab93a81e4 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -108,6 +108,7 @@ void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int, | |||
108 | unsigned int); | 108 | unsigned int); |
109 | void xdr_inline_pages(struct xdr_buf *, unsigned int, | 109 | void xdr_inline_pages(struct xdr_buf *, unsigned int, |
110 | struct page **, unsigned int, unsigned int); | 110 | struct page **, unsigned int, unsigned int); |
111 | void xdr_terminate_string(struct xdr_buf *, const u32); | ||
111 | 112 | ||
112 | static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) | 113 | static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) |
113 | { | 114 | { |
@@ -131,6 +132,13 @@ xdr_decode_hyper(__be32 *p, __u64 *valp) | |||
131 | return p + 2; | 132 | return p + 2; |
132 | } | 133 | } |
133 | 134 | ||
135 | static inline __be32 * | ||
136 | xdr_decode_opaque_fixed(__be32 *p, void *ptr, unsigned int len) | ||
137 | { | ||
138 | memcpy(ptr, p, len); | ||
139 | return p + XDR_QUADLEN(len); | ||
140 | } | ||
141 | |||
134 | /* | 142 | /* |
135 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) | 143 | * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) |
136 | */ | 144 | */ |
@@ -200,6 +208,7 @@ extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | |||
200 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 208 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
201 | unsigned int base, unsigned int len); | 209 | unsigned int base, unsigned int len); |
202 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 210 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
211 | extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); | ||
203 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 212 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
204 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 213 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
205 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 214 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index ff5a77b28c50..89d10d279a20 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -224,6 +224,7 @@ struct rpc_xprt { | |||
224 | bklog_u; /* backlog queue utilization */ | 224 | bklog_u; /* backlog queue utilization */ |
225 | } stat; | 225 | } stat; |
226 | 226 | ||
227 | struct net *xprt_net; | ||
227 | const char *address_strings[RPC_DISPLAY_MAX]; | 228 | const char *address_strings[RPC_DISPLAY_MAX]; |
228 | }; | 229 | }; |
229 | 230 | ||
@@ -249,6 +250,7 @@ static inline int bc_prealloc(struct rpc_rqst *req) | |||
249 | 250 | ||
250 | struct xprt_create { | 251 | struct xprt_create { |
251 | int ident; /* XPRT_TRANSPORT identifier */ | 252 | int ident; /* XPRT_TRANSPORT identifier */ |
253 | struct net * net; | ||
252 | struct sockaddr * srcaddr; /* optional local address */ | 254 | struct sockaddr * srcaddr; /* optional local address */ |
253 | struct sockaddr * dstaddr; /* remote peer address */ | 255 | struct sockaddr * dstaddr; /* remote peer address */ |
254 | size_t addrlen; | 256 | size_t addrlen; |
@@ -280,6 +282,8 @@ void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | |||
280 | void xprt_release(struct rpc_task *task); | 282 | void xprt_release(struct rpc_task *task); |
281 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); | 283 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); |
282 | void xprt_put(struct rpc_xprt *xprt); | 284 | void xprt_put(struct rpc_xprt *xprt); |
285 | struct rpc_xprt * xprt_alloc(struct net *net, int size, int max_req); | ||
286 | void xprt_free(struct rpc_xprt *); | ||
283 | 287 | ||
284 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) | 288 | static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 *p) |
285 | { | 289 | { |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 7cdd63366f88..eba53e71d2cc 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -271,8 +271,18 @@ extern void scan_mapping_unevictable_pages(struct address_space *); | |||
271 | extern unsigned long scan_unevictable_pages; | 271 | extern unsigned long scan_unevictable_pages; |
272 | extern int scan_unevictable_handler(struct ctl_table *, int, | 272 | extern int scan_unevictable_handler(struct ctl_table *, int, |
273 | void __user *, size_t *, loff_t *); | 273 | void __user *, size_t *, loff_t *); |
274 | #ifdef CONFIG_NUMA | ||
274 | extern int scan_unevictable_register_node(struct node *node); | 275 | extern int scan_unevictable_register_node(struct node *node); |
275 | extern void scan_unevictable_unregister_node(struct node *node); | 276 | extern void scan_unevictable_unregister_node(struct node *node); |
277 | #else | ||
278 | static inline int scan_unevictable_register_node(struct node *node) | ||
279 | { | ||
280 | return 0; | ||
281 | } | ||
282 | static inline void scan_unevictable_unregister_node(struct node *node) | ||
283 | { | ||
284 | } | ||
285 | #endif | ||
276 | 286 | ||
277 | extern int kswapd_run(int nid); | 287 | extern int kswapd_run(int nid); |
278 | extern void kswapd_stop(int nid); | 288 | extern void kswapd_stop(int nid); |
diff --git a/include/linux/types.h b/include/linux/types.h index 357dbc19606f..c2a9eb44f2fa 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -121,15 +121,7 @@ typedef __u64 u_int64_t; | |||
121 | typedef __s64 int64_t; | 121 | typedef __s64 int64_t; |
122 | #endif | 122 | #endif |
123 | 123 | ||
124 | /* | 124 | /* this is a special 64bit data type that is 8-byte aligned */ |
125 | * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid | ||
126 | * common 32/64-bit compat problems. | ||
127 | * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other | ||
128 | * architectures) and to 8-byte boundaries on 64-bit architetures. The new | ||
129 | * aligned_64 type enforces 8-byte alignment so that structs containing | ||
130 | * aligned_64 values have the same alignment on 32-bit and 64-bit architectures. | ||
131 | * No conversions are necessary between 32-bit user-space and a 64-bit kernel. | ||
132 | */ | ||
133 | #define aligned_u64 __u64 __attribute__((aligned(8))) | 125 | #define aligned_u64 __u64 __attribute__((aligned(8))) |
134 | #define aligned_be64 __be64 __attribute__((aligned(8))) | 126 | #define aligned_be64 __be64 __attribute__((aligned(8))) |
135 | #define aligned_le64 __le64 __attribute__((aligned(8))) | 127 | #define aligned_le64 __le64 __attribute__((aligned(8))) |
@@ -186,7 +178,15 @@ typedef __u64 __bitwise __be64; | |||
186 | typedef __u16 __bitwise __sum16; | 178 | typedef __u16 __bitwise __sum16; |
187 | typedef __u32 __bitwise __wsum; | 179 | typedef __u32 __bitwise __wsum; |
188 | 180 | ||
189 | /* this is a special 64bit data type that is 8-byte aligned */ | 181 | /* |
182 | * aligned_u64 should be used in defining kernel<->userspace ABIs to avoid | ||
183 | * common 32/64-bit compat problems. | ||
184 | * 64-bit values align to 4-byte boundaries on x86_32 (and possibly other | ||
185 | * architectures) and to 8-byte boundaries on 64-bit architetures. The new | ||
186 | * aligned_64 type enforces 8-byte alignment so that structs containing | ||
187 | * aligned_64 values have the same alignment on 32-bit and 64-bit architectures. | ||
188 | * No conversions are necessary between 32-bit user-space and a 64-bit kernel. | ||
189 | */ | ||
190 | #define __aligned_u64 __u64 __attribute__((aligned(8))) | 190 | #define __aligned_u64 __u64 __attribute__((aligned(8))) |
191 | #define __aligned_be64 __be64 __attribute__((aligned(8))) | 191 | #define __aligned_be64 __be64 __attribute__((aligned(8))) |
192 | #define __aligned_le64 __le64 __attribute__((aligned(8))) | 192 | #define __aligned_le64 __le64 __attribute__((aligned(8))) |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 63a4fe6d51bd..a03dcf62ca9d 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -53,8 +53,10 @@ static inline void vmalloc_init(void) | |||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | extern void *vmalloc(unsigned long size); | 55 | extern void *vmalloc(unsigned long size); |
56 | extern void *vzalloc(unsigned long size); | ||
56 | extern void *vmalloc_user(unsigned long size); | 57 | extern void *vmalloc_user(unsigned long size); |
57 | extern void *vmalloc_node(unsigned long size, int node); | 58 | extern void *vmalloc_node(unsigned long size, int node); |
59 | extern void *vzalloc_node(unsigned long size, int node); | ||
58 | extern void *vmalloc_exec(unsigned long size); | 60 | extern void *vmalloc_exec(unsigned long size); |
59 | extern void *vmalloc_32(unsigned long size); | 61 | extern void *vmalloc_32(unsigned long size); |
60 | extern void *vmalloc_32_user(unsigned long size); | 62 | extern void *vmalloc_32_user(unsigned long size); |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 070bb7a88936..0c0771f06bfa 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -190,7 +190,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
190 | __INIT_WORK((_work), (_func), 0); \ | 190 | __INIT_WORK((_work), (_func), 0); \ |
191 | } while (0) | 191 | } while (0) |
192 | 192 | ||
193 | #define INIT_WORK_ON_STACK(_work, _func) \ | 193 | #define INIT_WORK_ONSTACK(_work, _func) \ |
194 | do { \ | 194 | do { \ |
195 | __INIT_WORK((_work), (_func), 1); \ | 195 | __INIT_WORK((_work), (_func), 1); \ |
196 | } while (0) | 196 | } while (0) |
@@ -201,9 +201,9 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
201 | init_timer(&(_work)->timer); \ | 201 | init_timer(&(_work)->timer); \ |
202 | } while (0) | 202 | } while (0) |
203 | 203 | ||
204 | #define INIT_DELAYED_WORK_ON_STACK(_work, _func) \ | 204 | #define INIT_DELAYED_WORK_ONSTACK(_work, _func) \ |
205 | do { \ | 205 | do { \ |
206 | INIT_WORK_ON_STACK(&(_work)->work, (_func)); \ | 206 | INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ |
207 | init_timer_on_stack(&(_work)->timer); \ | 207 | init_timer_on_stack(&(_work)->timer); \ |
208 | } while (0) | 208 | } while (0) |
209 | 209 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 242b6f812ba6..d5c7aaadda59 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -147,6 +147,8 @@ int write_cache_pages(struct address_space *mapping, | |||
147 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); | 147 | int do_writepages(struct address_space *mapping, struct writeback_control *wbc); |
148 | void set_page_dirty_balance(struct page *page, int page_mkwrite); | 148 | void set_page_dirty_balance(struct page *page, int page_mkwrite); |
149 | void writeback_set_ratelimit(void); | 149 | void writeback_set_ratelimit(void); |
150 | void tag_pages_for_writeback(struct address_space *mapping, | ||
151 | pgoff_t start, pgoff_t end); | ||
150 | 152 | ||
151 | /* pdflush.c */ | 153 | /* pdflush.c */ |
152 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | 154 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl |
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index fa0d52b8e622..b5fc9f39122b 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -39,7 +39,9 @@ | |||
39 | #include <linux/if_arp.h> | 39 | #include <linux/if_arp.h> |
40 | #include <linux/netdevice.h> | 40 | #include <linux/netdevice.h> |
41 | #include <linux/socket.h> | 41 | #include <linux/socket.h> |
42 | #include <linux/if_vlan.h> | ||
42 | #include <rdma/ib_verbs.h> | 43 | #include <rdma/ib_verbs.h> |
44 | #include <rdma/ib_pack.h> | ||
43 | 45 | ||
44 | struct rdma_addr_client { | 46 | struct rdma_addr_client { |
45 | atomic_t refcount; | 47 | atomic_t refcount; |
@@ -63,6 +65,7 @@ struct rdma_dev_addr { | |||
63 | unsigned char broadcast[MAX_ADDR_LEN]; | 65 | unsigned char broadcast[MAX_ADDR_LEN]; |
64 | unsigned short dev_type; | 66 | unsigned short dev_type; |
65 | int bound_dev_if; | 67 | int bound_dev_if; |
68 | enum rdma_transport_type transport; | ||
66 | }; | 69 | }; |
67 | 70 | ||
68 | /** | 71 | /** |
@@ -127,9 +130,51 @@ static inline int rdma_addr_gid_offset(struct rdma_dev_addr *dev_addr) | |||
127 | return dev_addr->dev_type == ARPHRD_INFINIBAND ? 4 : 0; | 130 | return dev_addr->dev_type == ARPHRD_INFINIBAND ? 4 : 0; |
128 | } | 131 | } |
129 | 132 | ||
133 | static inline void iboe_mac_vlan_to_ll(union ib_gid *gid, u8 *mac, u16 vid) | ||
134 | { | ||
135 | memset(gid->raw, 0, 16); | ||
136 | *((__be32 *) gid->raw) = cpu_to_be32(0xfe800000); | ||
137 | if (vid < 0x1000) { | ||
138 | gid->raw[12] = vid & 0xff; | ||
139 | gid->raw[11] = vid >> 8; | ||
140 | } else { | ||
141 | gid->raw[12] = 0xfe; | ||
142 | gid->raw[11] = 0xff; | ||
143 | } | ||
144 | memcpy(gid->raw + 13, mac + 3, 3); | ||
145 | memcpy(gid->raw + 8, mac, 3); | ||
146 | gid->raw[8] ^= 2; | ||
147 | } | ||
148 | |||
149 | static inline u16 rdma_vlan_dev_vlan_id(const struct net_device *dev) | ||
150 | { | ||
151 | return dev->priv_flags & IFF_802_1Q_VLAN ? | ||
152 | vlan_dev_vlan_id(dev) : 0xffff; | ||
153 | } | ||
154 | |||
155 | static inline void iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr, | ||
156 | union ib_gid *gid) | ||
157 | { | ||
158 | struct net_device *dev; | ||
159 | u16 vid = 0xffff; | ||
160 | |||
161 | dev = dev_get_by_index(&init_net, dev_addr->bound_dev_if); | ||
162 | if (dev) { | ||
163 | vid = rdma_vlan_dev_vlan_id(dev); | ||
164 | dev_put(dev); | ||
165 | } | ||
166 | |||
167 | iboe_mac_vlan_to_ll(gid, dev_addr->src_dev_addr, vid); | ||
168 | } | ||
169 | |||
130 | static inline void rdma_addr_get_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) | 170 | static inline void rdma_addr_get_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) |
131 | { | 171 | { |
132 | memcpy(gid, dev_addr->src_dev_addr + rdma_addr_gid_offset(dev_addr), sizeof *gid); | 172 | if (dev_addr->transport == RDMA_TRANSPORT_IB && |
173 | dev_addr->dev_type != ARPHRD_INFINIBAND) | ||
174 | iboe_addr_get_sgid(dev_addr, gid); | ||
175 | else | ||
176 | memcpy(gid, dev_addr->src_dev_addr + | ||
177 | rdma_addr_gid_offset(dev_addr), sizeof *gid); | ||
133 | } | 178 | } |
134 | 179 | ||
135 | static inline void rdma_addr_set_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) | 180 | static inline void rdma_addr_set_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) |
@@ -147,4 +192,91 @@ static inline void rdma_addr_set_dgid(struct rdma_dev_addr *dev_addr, union ib_g | |||
147 | memcpy(dev_addr->dst_dev_addr + rdma_addr_gid_offset(dev_addr), gid, sizeof *gid); | 192 | memcpy(dev_addr->dst_dev_addr + rdma_addr_gid_offset(dev_addr), gid, sizeof *gid); |
148 | } | 193 | } |
149 | 194 | ||
195 | static inline enum ib_mtu iboe_get_mtu(int mtu) | ||
196 | { | ||
197 | /* | ||
198 | * reduce IB headers from effective IBoE MTU. 28 stands for | ||
199 | * atomic header which is the biggest possible header after BTH | ||
200 | */ | ||
201 | mtu = mtu - IB_GRH_BYTES - IB_BTH_BYTES - 28; | ||
202 | |||
203 | if (mtu >= ib_mtu_enum_to_int(IB_MTU_4096)) | ||
204 | return IB_MTU_4096; | ||
205 | else if (mtu >= ib_mtu_enum_to_int(IB_MTU_2048)) | ||
206 | return IB_MTU_2048; | ||
207 | else if (mtu >= ib_mtu_enum_to_int(IB_MTU_1024)) | ||
208 | return IB_MTU_1024; | ||
209 | else if (mtu >= ib_mtu_enum_to_int(IB_MTU_512)) | ||
210 | return IB_MTU_512; | ||
211 | else if (mtu >= ib_mtu_enum_to_int(IB_MTU_256)) | ||
212 | return IB_MTU_256; | ||
213 | else | ||
214 | return 0; | ||
215 | } | ||
216 | |||
217 | static inline int iboe_get_rate(struct net_device *dev) | ||
218 | { | ||
219 | struct ethtool_cmd cmd; | ||
220 | |||
221 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings || | ||
222 | dev->ethtool_ops->get_settings(dev, &cmd)) | ||
223 | return IB_RATE_PORT_CURRENT; | ||
224 | |||
225 | if (cmd.speed >= 40000) | ||
226 | return IB_RATE_40_GBPS; | ||
227 | else if (cmd.speed >= 30000) | ||
228 | return IB_RATE_30_GBPS; | ||
229 | else if (cmd.speed >= 20000) | ||
230 | return IB_RATE_20_GBPS; | ||
231 | else if (cmd.speed >= 10000) | ||
232 | return IB_RATE_10_GBPS; | ||
233 | else | ||
234 | return IB_RATE_PORT_CURRENT; | ||
235 | } | ||
236 | |||
237 | static inline int rdma_link_local_addr(struct in6_addr *addr) | ||
238 | { | ||
239 | if (addr->s6_addr32[0] == htonl(0xfe800000) && | ||
240 | addr->s6_addr32[1] == 0) | ||
241 | return 1; | ||
242 | |||
243 | return 0; | ||
244 | } | ||
245 | |||
246 | static inline void rdma_get_ll_mac(struct in6_addr *addr, u8 *mac) | ||
247 | { | ||
248 | memcpy(mac, &addr->s6_addr[8], 3); | ||
249 | memcpy(mac + 3, &addr->s6_addr[13], 3); | ||
250 | mac[0] ^= 2; | ||
251 | } | ||
252 | |||
253 | static inline int rdma_is_multicast_addr(struct in6_addr *addr) | ||
254 | { | ||
255 | return addr->s6_addr[0] == 0xff; | ||
256 | } | ||
257 | |||
258 | static inline void rdma_get_mcast_mac(struct in6_addr *addr, u8 *mac) | ||
259 | { | ||
260 | int i; | ||
261 | |||
262 | mac[0] = 0x33; | ||
263 | mac[1] = 0x33; | ||
264 | for (i = 2; i < 6; ++i) | ||
265 | mac[i] = addr->s6_addr[i + 10]; | ||
266 | } | ||
267 | |||
268 | static inline u16 rdma_get_vlan_id(union ib_gid *dgid) | ||
269 | { | ||
270 | u16 vid; | ||
271 | |||
272 | vid = dgid->raw[11] << 8 | dgid->raw[12]; | ||
273 | return vid < 0x1000 ? vid : 0xffff; | ||
274 | } | ||
275 | |||
276 | static inline struct net_device *rdma_vlan_dev_real_dev(const struct net_device *dev) | ||
277 | { | ||
278 | return dev->priv_flags & IFF_802_1Q_VLAN ? | ||
279 | vlan_dev_real_dev(dev) : 0; | ||
280 | } | ||
281 | |||
150 | #endif /* IB_ADDR_H */ | 282 | #endif /* IB_ADDR_H */ |
diff --git a/include/rdma/ib_pack.h b/include/rdma/ib_pack.h index cbb50f4da3dd..b37fe3b10a9d 100644 --- a/include/rdma/ib_pack.h +++ b/include/rdma/ib_pack.h | |||
@@ -37,6 +37,8 @@ | |||
37 | 37 | ||
38 | enum { | 38 | enum { |
39 | IB_LRH_BYTES = 8, | 39 | IB_LRH_BYTES = 8, |
40 | IB_ETH_BYTES = 14, | ||
41 | IB_VLAN_BYTES = 4, | ||
40 | IB_GRH_BYTES = 40, | 42 | IB_GRH_BYTES = 40, |
41 | IB_BTH_BYTES = 12, | 43 | IB_BTH_BYTES = 12, |
42 | IB_DETH_BYTES = 8 | 44 | IB_DETH_BYTES = 8 |
@@ -210,14 +212,32 @@ struct ib_unpacked_deth { | |||
210 | __be32 source_qpn; | 212 | __be32 source_qpn; |
211 | }; | 213 | }; |
212 | 214 | ||
215 | struct ib_unpacked_eth { | ||
216 | u8 dmac_h[4]; | ||
217 | u8 dmac_l[2]; | ||
218 | u8 smac_h[2]; | ||
219 | u8 smac_l[4]; | ||
220 | __be16 type; | ||
221 | }; | ||
222 | |||
223 | struct ib_unpacked_vlan { | ||
224 | __be16 tag; | ||
225 | __be16 type; | ||
226 | }; | ||
227 | |||
213 | struct ib_ud_header { | 228 | struct ib_ud_header { |
229 | int lrh_present; | ||
214 | struct ib_unpacked_lrh lrh; | 230 | struct ib_unpacked_lrh lrh; |
215 | int grh_present; | 231 | int eth_present; |
216 | struct ib_unpacked_grh grh; | 232 | struct ib_unpacked_eth eth; |
217 | struct ib_unpacked_bth bth; | 233 | int vlan_present; |
234 | struct ib_unpacked_vlan vlan; | ||
235 | int grh_present; | ||
236 | struct ib_unpacked_grh grh; | ||
237 | struct ib_unpacked_bth bth; | ||
218 | struct ib_unpacked_deth deth; | 238 | struct ib_unpacked_deth deth; |
219 | int immediate_present; | 239 | int immediate_present; |
220 | __be32 immediate_data; | 240 | __be32 immediate_data; |
221 | }; | 241 | }; |
222 | 242 | ||
223 | void ib_pack(const struct ib_field *desc, | 243 | void ib_pack(const struct ib_field *desc, |
@@ -230,9 +250,12 @@ void ib_unpack(const struct ib_field *desc, | |||
230 | void *buf, | 250 | void *buf, |
231 | void *structure); | 251 | void *structure); |
232 | 252 | ||
233 | void ib_ud_header_init(int payload_bytes, | 253 | void ib_ud_header_init(int payload_bytes, |
234 | int grh_present, | 254 | int lrh_present, |
235 | int immediate_present, | 255 | int eth_present, |
256 | int vlan_present, | ||
257 | int grh_present, | ||
258 | int immediate_present, | ||
236 | struct ib_ud_header *header); | 259 | struct ib_ud_header *header); |
237 | 260 | ||
238 | int ib_ud_header_pack(struct ib_ud_header *header, | 261 | int ib_ud_header_pack(struct ib_ud_header *header, |
diff --git a/include/rdma/ib_user_verbs.h b/include/rdma/ib_user_verbs.h index a17f77106149..fe5b05177a2c 100644 --- a/include/rdma/ib_user_verbs.h +++ b/include/rdma/ib_user_verbs.h | |||
@@ -205,7 +205,8 @@ struct ib_uverbs_query_port_resp { | |||
205 | __u8 active_width; | 205 | __u8 active_width; |
206 | __u8 active_speed; | 206 | __u8 active_speed; |
207 | __u8 phys_state; | 207 | __u8 phys_state; |
208 | __u8 reserved[3]; | 208 | __u8 link_layer; |
209 | __u8 reserved[2]; | ||
209 | }; | 210 | }; |
210 | 211 | ||
211 | struct ib_uverbs_alloc_pd { | 212 | struct ib_uverbs_alloc_pd { |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 857b3b9cf120..e04c4888d1fd 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -75,6 +75,12 @@ enum rdma_transport_type { | |||
75 | enum rdma_transport_type | 75 | enum rdma_transport_type |
76 | rdma_node_get_transport(enum rdma_node_type node_type) __attribute_const__; | 76 | rdma_node_get_transport(enum rdma_node_type node_type) __attribute_const__; |
77 | 77 | ||
78 | enum rdma_link_layer { | ||
79 | IB_LINK_LAYER_UNSPECIFIED, | ||
80 | IB_LINK_LAYER_INFINIBAND, | ||
81 | IB_LINK_LAYER_ETHERNET, | ||
82 | }; | ||
83 | |||
78 | enum ib_device_cap_flags { | 84 | enum ib_device_cap_flags { |
79 | IB_DEVICE_RESIZE_MAX_WR = 1, | 85 | IB_DEVICE_RESIZE_MAX_WR = 1, |
80 | IB_DEVICE_BAD_PKEY_CNTR = (1<<1), | 86 | IB_DEVICE_BAD_PKEY_CNTR = (1<<1), |
@@ -1010,6 +1016,8 @@ struct ib_device { | |||
1010 | int (*query_port)(struct ib_device *device, | 1016 | int (*query_port)(struct ib_device *device, |
1011 | u8 port_num, | 1017 | u8 port_num, |
1012 | struct ib_port_attr *port_attr); | 1018 | struct ib_port_attr *port_attr); |
1019 | enum rdma_link_layer (*get_link_layer)(struct ib_device *device, | ||
1020 | u8 port_num); | ||
1013 | int (*query_gid)(struct ib_device *device, | 1021 | int (*query_gid)(struct ib_device *device, |
1014 | u8 port_num, int index, | 1022 | u8 port_num, int index, |
1015 | union ib_gid *gid); | 1023 | union ib_gid *gid); |
@@ -1222,6 +1230,9 @@ int ib_query_device(struct ib_device *device, | |||
1222 | int ib_query_port(struct ib_device *device, | 1230 | int ib_query_port(struct ib_device *device, |
1223 | u8 port_num, struct ib_port_attr *port_attr); | 1231 | u8 port_num, struct ib_port_attr *port_attr); |
1224 | 1232 | ||
1233 | enum rdma_link_layer rdma_port_get_link_layer(struct ib_device *device, | ||
1234 | u8 port_num); | ||
1235 | |||
1225 | int ib_query_gid(struct ib_device *device, | 1236 | int ib_query_gid(struct ib_device *device, |
1226 | u8 port_num, int index, union ib_gid *gid); | 1237 | u8 port_num, int index, union ib_gid *gid); |
1227 | 1238 | ||
diff --git a/include/scsi/srp.h b/include/scsi/srp.h index ad178fa78f66..1ae84db4c9fb 100644 --- a/include/scsi/srp.h +++ b/include/scsi/srp.h | |||
@@ -239,4 +239,42 @@ struct srp_rsp { | |||
239 | u8 data[0]; | 239 | u8 data[0]; |
240 | } __attribute__((packed)); | 240 | } __attribute__((packed)); |
241 | 241 | ||
242 | struct srp_cred_req { | ||
243 | u8 opcode; | ||
244 | u8 sol_not; | ||
245 | u8 reserved[2]; | ||
246 | __be32 req_lim_delta; | ||
247 | u64 tag; | ||
248 | }; | ||
249 | |||
250 | struct srp_cred_rsp { | ||
251 | u8 opcode; | ||
252 | u8 reserved[7]; | ||
253 | u64 tag; | ||
254 | }; | ||
255 | |||
256 | /* | ||
257 | * The SRP spec defines the fixed portion of the AER_REQ structure to be | ||
258 | * 36 bytes, so it needs to be packed to avoid having it padded to 40 bytes | ||
259 | * on 64-bit architectures. | ||
260 | */ | ||
261 | struct srp_aer_req { | ||
262 | u8 opcode; | ||
263 | u8 sol_not; | ||
264 | u8 reserved[2]; | ||
265 | __be32 req_lim_delta; | ||
266 | u64 tag; | ||
267 | u32 reserved2; | ||
268 | __be64 lun; | ||
269 | __be32 sense_data_len; | ||
270 | u32 reserved3; | ||
271 | u8 sense_data[0]; | ||
272 | } __attribute__((packed)); | ||
273 | |||
274 | struct srp_aer_rsp { | ||
275 | u8 opcode; | ||
276 | u8 reserved[7]; | ||
277 | u64 tag; | ||
278 | }; | ||
279 | |||
242 | #endif /* SCSI_SRP_H */ | 280 | #endif /* SCSI_SRP_H */ |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 01e9e0076a92..6bcb00645de4 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -242,18 +242,20 @@ TRACE_EVENT(ext4_da_writepages, | |||
242 | __entry->pages_skipped = wbc->pages_skipped; | 242 | __entry->pages_skipped = wbc->pages_skipped; |
243 | __entry->range_start = wbc->range_start; | 243 | __entry->range_start = wbc->range_start; |
244 | __entry->range_end = wbc->range_end; | 244 | __entry->range_end = wbc->range_end; |
245 | __entry->nonblocking = wbc->nonblocking; | ||
246 | __entry->for_kupdate = wbc->for_kupdate; | 245 | __entry->for_kupdate = wbc->for_kupdate; |
247 | __entry->for_reclaim = wbc->for_reclaim; | 246 | __entry->for_reclaim = wbc->for_reclaim; |
248 | __entry->range_cyclic = wbc->range_cyclic; | 247 | __entry->range_cyclic = wbc->range_cyclic; |
249 | __entry->writeback_index = inode->i_mapping->writeback_index; | 248 | __entry->writeback_index = inode->i_mapping->writeback_index; |
250 | ), | 249 | ), |
251 | 250 | ||
252 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu", | 251 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld " |
252 | "range_start %llu range_end %llu " | ||
253 | "for_kupdate %d for_reclaim %d " | ||
254 | "range_cyclic %d writeback_index %lu", | ||
253 | jbd2_dev_to_name(__entry->dev), | 255 | jbd2_dev_to_name(__entry->dev), |
254 | (unsigned long) __entry->ino, __entry->nr_to_write, | 256 | (unsigned long) __entry->ino, __entry->nr_to_write, |
255 | __entry->pages_skipped, __entry->range_start, | 257 | __entry->pages_skipped, __entry->range_start, |
256 | __entry->range_end, __entry->nonblocking, | 258 | __entry->range_end, |
257 | __entry->for_kupdate, __entry->for_reclaim, | 259 | __entry->for_kupdate, __entry->for_reclaim, |
258 | __entry->range_cyclic, | 260 | __entry->range_cyclic, |
259 | (unsigned long) __entry->writeback_index) | 261 | (unsigned long) __entry->writeback_index) |
diff --git a/include/trace/events/vmscan.h b/include/trace/events/vmscan.h index 370aa5a87322..c255fcc587bf 100644 --- a/include/trace/events/vmscan.h +++ b/include/trace/events/vmscan.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #define RECLAIM_WB_ANON 0x0001u | 11 | #define RECLAIM_WB_ANON 0x0001u |
12 | #define RECLAIM_WB_FILE 0x0002u | 12 | #define RECLAIM_WB_FILE 0x0002u |
13 | #define RECLAIM_WB_MIXED 0x0010u | ||
13 | #define RECLAIM_WB_SYNC 0x0004u | 14 | #define RECLAIM_WB_SYNC 0x0004u |
14 | #define RECLAIM_WB_ASYNC 0x0008u | 15 | #define RECLAIM_WB_ASYNC 0x0008u |
15 | 16 | ||
@@ -17,13 +18,20 @@ | |||
17 | (flags) ? __print_flags(flags, "|", \ | 18 | (flags) ? __print_flags(flags, "|", \ |
18 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ | 19 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ |
19 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ | 20 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ |
21 | {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \ | ||
20 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ | 22 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ |
21 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ | 23 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ |
22 | ) : "RECLAIM_WB_NONE" | 24 | ) : "RECLAIM_WB_NONE" |
23 | 25 | ||
24 | #define trace_reclaim_flags(page, sync) ( \ | 26 | #define trace_reclaim_flags(page, sync) ( \ |
25 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ | 27 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
26 | (sync == PAGEOUT_IO_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ | 28 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ |
29 | ) | ||
30 | |||
31 | #define trace_shrink_flags(file, sync) ( \ | ||
32 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_MIXED : \ | ||
33 | (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON)) | \ | ||
34 | (sync == LUMPY_MODE_SYNC ? RECLAIM_WB_SYNC : RECLAIM_WB_ASYNC) \ | ||
27 | ) | 35 | ) |
28 | 36 | ||
29 | TRACE_EVENT(mm_vmscan_kswapd_sleep, | 37 | TRACE_EVENT(mm_vmscan_kswapd_sleep, |
@@ -269,6 +277,40 @@ TRACE_EVENT(mm_vmscan_writepage, | |||
269 | show_reclaim_flags(__entry->reclaim_flags)) | 277 | show_reclaim_flags(__entry->reclaim_flags)) |
270 | ); | 278 | ); |
271 | 279 | ||
280 | TRACE_EVENT(mm_vmscan_lru_shrink_inactive, | ||
281 | |||
282 | TP_PROTO(int nid, int zid, | ||
283 | unsigned long nr_scanned, unsigned long nr_reclaimed, | ||
284 | int priority, int reclaim_flags), | ||
285 | |||
286 | TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags), | ||
287 | |||
288 | TP_STRUCT__entry( | ||
289 | __field(int, nid) | ||
290 | __field(int, zid) | ||
291 | __field(unsigned long, nr_scanned) | ||
292 | __field(unsigned long, nr_reclaimed) | ||
293 | __field(int, priority) | ||
294 | __field(int, reclaim_flags) | ||
295 | ), | ||
296 | |||
297 | TP_fast_assign( | ||
298 | __entry->nid = nid; | ||
299 | __entry->zid = zid; | ||
300 | __entry->nr_scanned = nr_scanned; | ||
301 | __entry->nr_reclaimed = nr_reclaimed; | ||
302 | __entry->priority = priority; | ||
303 | __entry->reclaim_flags = reclaim_flags; | ||
304 | ), | ||
305 | |||
306 | TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s", | ||
307 | __entry->nid, __entry->zid, | ||
308 | __entry->nr_scanned, __entry->nr_reclaimed, | ||
309 | __entry->priority, | ||
310 | show_reclaim_flags(__entry->reclaim_flags)) | ||
311 | ); | ||
312 | |||
313 | |||
272 | #endif /* _TRACE_VMSCAN_H */ | 314 | #endif /* _TRACE_VMSCAN_H */ |
273 | 315 | ||
274 | /* This part must be outside protection */ | 316 | /* This part must be outside protection */ |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index f345f66ae9d1..89a2b2db4375 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -96,8 +96,6 @@ DECLARE_EVENT_CLASS(wbc_class, | |||
96 | __field(long, nr_to_write) | 96 | __field(long, nr_to_write) |
97 | __field(long, pages_skipped) | 97 | __field(long, pages_skipped) |
98 | __field(int, sync_mode) | 98 | __field(int, sync_mode) |
99 | __field(int, nonblocking) | ||
100 | __field(int, encountered_congestion) | ||
101 | __field(int, for_kupdate) | 99 | __field(int, for_kupdate) |
102 | __field(int, for_background) | 100 | __field(int, for_background) |
103 | __field(int, for_reclaim) | 101 | __field(int, for_reclaim) |
@@ -153,6 +151,41 @@ DEFINE_WBC_EVENT(wbc_balance_dirty_written); | |||
153 | DEFINE_WBC_EVENT(wbc_balance_dirty_wait); | 151 | DEFINE_WBC_EVENT(wbc_balance_dirty_wait); |
154 | DEFINE_WBC_EVENT(wbc_writepage); | 152 | DEFINE_WBC_EVENT(wbc_writepage); |
155 | 153 | ||
154 | DECLARE_EVENT_CLASS(writeback_congest_waited_template, | ||
155 | |||
156 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | ||
157 | |||
158 | TP_ARGS(usec_timeout, usec_delayed), | ||
159 | |||
160 | TP_STRUCT__entry( | ||
161 | __field( unsigned int, usec_timeout ) | ||
162 | __field( unsigned int, usec_delayed ) | ||
163 | ), | ||
164 | |||
165 | TP_fast_assign( | ||
166 | __entry->usec_timeout = usec_timeout; | ||
167 | __entry->usec_delayed = usec_delayed; | ||
168 | ), | ||
169 | |||
170 | TP_printk("usec_timeout=%u usec_delayed=%u", | ||
171 | __entry->usec_timeout, | ||
172 | __entry->usec_delayed) | ||
173 | ); | ||
174 | |||
175 | DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait, | ||
176 | |||
177 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | ||
178 | |||
179 | TP_ARGS(usec_timeout, usec_delayed) | ||
180 | ); | ||
181 | |||
182 | DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested, | ||
183 | |||
184 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | ||
185 | |||
186 | TP_ARGS(usec_timeout, usec_delayed) | ||
187 | ); | ||
188 | |||
156 | #endif /* _TRACE_WRITEBACK_H */ | 189 | #endif /* _TRACE_WRITEBACK_H */ |
157 | 190 | ||
158 | /* This part must be outside protection */ | 191 | /* This part must be outside protection */ |