diff options
Diffstat (limited to 'include')
77 files changed, 1110 insertions, 416 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 29831768c0e6..1172c27adadf 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -238,7 +238,7 @@ struct acpi_processor_errata { | |||
238 | 238 | ||
239 | extern int acpi_processor_preregister_performance(struct | 239 | extern int acpi_processor_preregister_performance(struct |
240 | acpi_processor_performance | 240 | acpi_processor_performance |
241 | *performance); | 241 | __percpu *performance); |
242 | 242 | ||
243 | extern int acpi_processor_register_performance(struct acpi_processor_performance | 243 | extern int acpi_processor_register_performance(struct acpi_processor_performance |
244 | *performance, unsigned int cpu); | 244 | *performance, unsigned int cpu); |
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index fc218444e315..c8a5d68541d7 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -52,23 +52,4 @@ typedef struct | |||
52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) | 52 | #define __local_add(i,l) local_set((l), local_read(l) + (i)) |
53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) | 53 | #define __local_sub(i,l) local_set((l), local_read(l) - (i)) |
54 | 54 | ||
55 | /* Use these for per-cpu local_t variables: on some archs they are | ||
56 | * much more efficient than these naive implementations. Note they take | ||
57 | * a variable (eg. mystruct.foo), not an address. | ||
58 | */ | ||
59 | #define cpu_local_read(l) local_read(&__get_cpu_var(l)) | ||
60 | #define cpu_local_set(l, i) local_set(&__get_cpu_var(l), (i)) | ||
61 | #define cpu_local_inc(l) local_inc(&__get_cpu_var(l)) | ||
62 | #define cpu_local_dec(l) local_dec(&__get_cpu_var(l)) | ||
63 | #define cpu_local_add(i, l) local_add((i), &__get_cpu_var(l)) | ||
64 | #define cpu_local_sub(i, l) local_sub((i), &__get_cpu_var(l)) | ||
65 | |||
66 | /* Non-atomic increments, ie. preemption disabled and won't be touched | ||
67 | * in interrupt, etc. Some archs can optimize this case well. | ||
68 | */ | ||
69 | #define __cpu_local_inc(l) __local_inc(&__get_cpu_var(l)) | ||
70 | #define __cpu_local_dec(l) __local_dec(&__get_cpu_var(l)) | ||
71 | #define __cpu_local_add(i, l) __local_add((i), &__get_cpu_var(l)) | ||
72 | #define __cpu_local_sub(i, l) __local_sub((i), &__get_cpu_var(l)) | ||
73 | |||
74 | #endif /* _ASM_GENERIC_LOCAL_H */ | 55 | #endif /* _ASM_GENERIC_LOCAL_H */ |
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 8087b90d4673..04f91c2d3f7b 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -41,7 +41,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
41 | * Only S390 provides its own means of moving the pointer. | 41 | * Only S390 provides its own means of moving the pointer. |
42 | */ | 42 | */ |
43 | #ifndef SHIFT_PERCPU_PTR | 43 | #ifndef SHIFT_PERCPU_PTR |
44 | #define SHIFT_PERCPU_PTR(__p, __offset) RELOC_HIDE((__p), (__offset)) | 44 | /* Weird cast keeps both GCC and sparse happy. */ |
45 | #define SHIFT_PERCPU_PTR(__p, __offset) ({ \ | ||
46 | __verify_pcpu_ptr((__p)); \ | ||
47 | RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ | ||
48 | }) | ||
45 | #endif | 49 | #endif |
46 | 50 | ||
47 | /* | 51 | /* |
@@ -50,11 +54,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
50 | * offset. | 54 | * offset. |
51 | */ | 55 | */ |
52 | #define per_cpu(var, cpu) \ | 56 | #define per_cpu(var, cpu) \ |
53 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), per_cpu_offset(cpu))) | 57 | (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu))) |
54 | #define __get_cpu_var(var) \ | 58 | #define __get_cpu_var(var) \ |
55 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), my_cpu_offset)) | 59 | (*SHIFT_PERCPU_PTR(&(var), my_cpu_offset)) |
56 | #define __raw_get_cpu_var(var) \ | 60 | #define __raw_get_cpu_var(var) \ |
57 | (*SHIFT_PERCPU_PTR(&per_cpu_var(var), __my_cpu_offset)) | 61 | (*SHIFT_PERCPU_PTR(&(var), __my_cpu_offset)) |
58 | 62 | ||
59 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) | 63 | #define this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, my_cpu_offset) |
60 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) | 64 | #define __this_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset) |
@@ -66,9 +70,9 @@ extern void setup_per_cpu_areas(void); | |||
66 | 70 | ||
67 | #else /* ! SMP */ | 71 | #else /* ! SMP */ |
68 | 72 | ||
69 | #define per_cpu(var, cpu) (*((void)(cpu), &per_cpu_var(var))) | 73 | #define per_cpu(var, cpu) (*((void)(cpu), &(var))) |
70 | #define __get_cpu_var(var) per_cpu_var(var) | 74 | #define __get_cpu_var(var) (var) |
71 | #define __raw_get_cpu_var(var) per_cpu_var(var) | 75 | #define __raw_get_cpu_var(var) (var) |
72 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) | 76 | #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0) |
73 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) | 77 | #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr) |
74 | 78 | ||
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ffac157fb5b2..4a3c4e441027 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -801,6 +801,7 @@ struct drm_driver { | |||
801 | */ | 801 | */ |
802 | int (*gem_init_object) (struct drm_gem_object *obj); | 802 | int (*gem_init_object) (struct drm_gem_object *obj); |
803 | void (*gem_free_object) (struct drm_gem_object *obj); | 803 | void (*gem_free_object) (struct drm_gem_object *obj); |
804 | void (*gem_free_object_unlocked) (struct drm_gem_object *obj); | ||
804 | 805 | ||
805 | /* vga arb irq handler */ | 806 | /* vga arb irq handler */ |
806 | void (*vgaarb_irq)(struct drm_device *dev, bool state); | 807 | void (*vgaarb_irq)(struct drm_device *dev, bool state); |
@@ -1427,6 +1428,7 @@ extern void drm_sysfs_connector_remove(struct drm_connector *connector); | |||
1427 | int drm_gem_init(struct drm_device *dev); | 1428 | int drm_gem_init(struct drm_device *dev); |
1428 | void drm_gem_destroy(struct drm_device *dev); | 1429 | void drm_gem_destroy(struct drm_device *dev); |
1429 | void drm_gem_object_free(struct kref *kref); | 1430 | void drm_gem_object_free(struct kref *kref); |
1431 | void drm_gem_object_free_unlocked(struct kref *kref); | ||
1430 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, | 1432 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, |
1431 | size_t size); | 1433 | size_t size); |
1432 | void drm_gem_object_handle_free(struct kref *kref); | 1434 | void drm_gem_object_handle_free(struct kref *kref); |
@@ -1443,10 +1445,15 @@ drm_gem_object_reference(struct drm_gem_object *obj) | |||
1443 | static inline void | 1445 | static inline void |
1444 | drm_gem_object_unreference(struct drm_gem_object *obj) | 1446 | drm_gem_object_unreference(struct drm_gem_object *obj) |
1445 | { | 1447 | { |
1446 | if (obj == NULL) | 1448 | if (obj != NULL) |
1447 | return; | 1449 | kref_put(&obj->refcount, drm_gem_object_free); |
1450 | } | ||
1448 | 1451 | ||
1449 | kref_put(&obj->refcount, drm_gem_object_free); | 1452 | static inline void |
1453 | drm_gem_object_unreference_unlocked(struct drm_gem_object *obj) | ||
1454 | { | ||
1455 | if (obj != NULL) | ||
1456 | kref_put(&obj->refcount, drm_gem_object_free_unlocked); | ||
1450 | } | 1457 | } |
1451 | 1458 | ||
1452 | int drm_gem_handle_create(struct drm_file *file_priv, | 1459 | int drm_gem_handle_create(struct drm_file *file_priv, |
@@ -1475,6 +1482,21 @@ drm_gem_object_handle_unreference(struct drm_gem_object *obj) | |||
1475 | drm_gem_object_unreference(obj); | 1482 | drm_gem_object_unreference(obj); |
1476 | } | 1483 | } |
1477 | 1484 | ||
1485 | static inline void | ||
1486 | drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj) | ||
1487 | { | ||
1488 | if (obj == NULL) | ||
1489 | return; | ||
1490 | |||
1491 | /* | ||
1492 | * Must bump handle count first as this may be the last | ||
1493 | * ref, in which case the object would disappear before we | ||
1494 | * checked for a name | ||
1495 | */ | ||
1496 | kref_put(&obj->handlecount, drm_gem_object_handle_free); | ||
1497 | drm_gem_object_unreference_unlocked(obj); | ||
1498 | } | ||
1499 | |||
1478 | struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, | 1500 | struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, |
1479 | struct drm_file *filp, | 1501 | struct drm_file *filp, |
1480 | u32 handle); | 1502 | u32 handle); |
diff --git a/include/drm/drm_buffer.h b/include/drm/drm_buffer.h new file mode 100644 index 000000000000..322dbff3f861 --- /dev/null +++ b/include/drm/drm_buffer.h | |||
@@ -0,0 +1,148 @@ | |||
1 | /************************************************************************** | ||
2 | * | ||
3 | * Copyright 2010 Pauli Nieminen. | ||
4 | * All Rights Reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the | ||
8 | * "Software"), to deal in the Software without restriction, including | ||
9 | * without limitation the rights to use, copy, modify, merge, publish, | ||
10 | * distribute, sub license, and/or sell copies of the Software, and to | ||
11 | * permit persons to whom the Software is furnished to do so, subject to | ||
12 | * the following conditions: | ||
13 | * | ||
14 | * The above copyright notice and this permission notice (including the | ||
15 | * next paragraph) shall be included in all copies or substantial portions | ||
16 | * of the Software. | ||
17 | * | ||
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL | ||
21 | * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, | ||
22 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
23 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
24 | * USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
25 | * | ||
26 | * | ||
27 | **************************************************************************/ | ||
28 | /* | ||
29 | * Multipart buffer for coping data which is larger than the page size. | ||
30 | * | ||
31 | * Authors: | ||
32 | * Pauli Nieminen <suokkos-at-gmail-dot-com> | ||
33 | */ | ||
34 | |||
35 | #ifndef _DRM_BUFFER_H_ | ||
36 | #define _DRM_BUFFER_H_ | ||
37 | |||
38 | #include "drmP.h" | ||
39 | |||
40 | struct drm_buffer { | ||
41 | int iterator; | ||
42 | int size; | ||
43 | char *data[]; | ||
44 | }; | ||
45 | |||
46 | |||
47 | /** | ||
48 | * Return the index of page that buffer is currently pointing at. | ||
49 | */ | ||
50 | static inline int drm_buffer_page(struct drm_buffer *buf) | ||
51 | { | ||
52 | return buf->iterator / PAGE_SIZE; | ||
53 | } | ||
54 | /** | ||
55 | * Return the index of the current byte in the page | ||
56 | */ | ||
57 | static inline int drm_buffer_index(struct drm_buffer *buf) | ||
58 | { | ||
59 | return buf->iterator & (PAGE_SIZE - 1); | ||
60 | } | ||
61 | /** | ||
62 | * Return number of bytes that is left to process | ||
63 | */ | ||
64 | static inline int drm_buffer_unprocessed(struct drm_buffer *buf) | ||
65 | { | ||
66 | return buf->size - buf->iterator; | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * Advance the buffer iterator number of bytes that is given. | ||
71 | */ | ||
72 | static inline void drm_buffer_advance(struct drm_buffer *buf, int bytes) | ||
73 | { | ||
74 | buf->iterator += bytes; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * Allocate the drm buffer object. | ||
79 | * | ||
80 | * buf: A pointer to a pointer where the object is stored. | ||
81 | * size: The number of bytes to allocate. | ||
82 | */ | ||
83 | extern int drm_buffer_alloc(struct drm_buffer **buf, int size); | ||
84 | |||
85 | /** | ||
86 | * Copy the user data to the begin of the buffer and reset the processing | ||
87 | * iterator. | ||
88 | * | ||
89 | * user_data: A pointer the data that is copied to the buffer. | ||
90 | * size: The Number of bytes to copy. | ||
91 | */ | ||
92 | extern int drm_buffer_copy_from_user(struct drm_buffer *buf, | ||
93 | void __user *user_data, int size); | ||
94 | |||
95 | /** | ||
96 | * Free the drm buffer object | ||
97 | */ | ||
98 | extern void drm_buffer_free(struct drm_buffer *buf); | ||
99 | |||
100 | /** | ||
101 | * Read an object from buffer that may be split to multiple parts. If object | ||
102 | * is not split function just returns the pointer to object in buffer. But in | ||
103 | * case of split object data is copied to given stack object that is suplied | ||
104 | * by caller. | ||
105 | * | ||
106 | * The processing location of the buffer is also advanced to the next byte | ||
107 | * after the object. | ||
108 | * | ||
109 | * objsize: The size of the objet in bytes. | ||
110 | * stack_obj: A pointer to a memory location where object can be copied. | ||
111 | */ | ||
112 | extern void *drm_buffer_read_object(struct drm_buffer *buf, | ||
113 | int objsize, void *stack_obj); | ||
114 | |||
115 | /** | ||
116 | * Returns the pointer to the dword which is offset number of elements from the | ||
117 | * current processing location. | ||
118 | * | ||
119 | * Caller must make sure that dword is not split in the buffer. This | ||
120 | * requirement is easily met if all the sizes of objects in buffer are | ||
121 | * multiples of dword and PAGE_SIZE is multiple dword. | ||
122 | * | ||
123 | * Call to this function doesn't change the processing location. | ||
124 | * | ||
125 | * offset: The index of the dword relative to the internat iterator. | ||
126 | */ | ||
127 | static inline void *drm_buffer_pointer_to_dword(struct drm_buffer *buffer, | ||
128 | int offset) | ||
129 | { | ||
130 | int iter = buffer->iterator + offset * 4; | ||
131 | return &buffer->data[iter / PAGE_SIZE][iter & (PAGE_SIZE - 1)]; | ||
132 | } | ||
133 | /** | ||
134 | * Returns the pointer to the dword which is offset number of elements from | ||
135 | * the current processing location. | ||
136 | * | ||
137 | * Call to this function doesn't change the processing location. | ||
138 | * | ||
139 | * offset: The index of the byte relative to the internat iterator. | ||
140 | */ | ||
141 | static inline void *drm_buffer_pointer_to_byte(struct drm_buffer *buffer, | ||
142 | int offset) | ||
143 | { | ||
144 | int iter = buffer->iterator + offset; | ||
145 | return &buffer->data[iter / PAGE_SIZE][iter & (PAGE_SIZE - 1)]; | ||
146 | } | ||
147 | |||
148 | #endif | ||
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index fdf43abc36db..1347524a8e30 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -801,4 +801,6 @@ extern struct drm_display_mode *drm_gtf_mode(struct drm_device *dev, | |||
801 | bool interlaced, int margins); | 801 | bool interlaced, int margins); |
802 | extern int drm_add_modes_noedid(struct drm_connector *connector, | 802 | extern int drm_add_modes_noedid(struct drm_connector *connector, |
803 | int hdisplay, int vdisplay); | 803 | int hdisplay, int vdisplay); |
804 | |||
805 | extern bool drm_edid_is_valid(struct edid *edid); | ||
804 | #endif /* __DRM_CRTC_H__ */ | 806 | #endif /* __DRM_CRTC_H__ */ |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index d33c3e038606..b4209898f115 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -201,4 +201,7 @@ struct edid { | |||
201 | 201 | ||
202 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) | 202 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
203 | 203 | ||
204 | /* define the number of Extension EDID block */ | ||
205 | #define DRM_MAX_EDID_EXT_NUM 4 | ||
206 | |||
204 | #endif /* __DRM_EDID_H__ */ | 207 | #endif /* __DRM_EDID_H__ */ |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index e6f3b120f51a..676104b7818c 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -141,6 +141,41 @@ | |||
141 | {0x1002, 0x5e4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ | 141 | {0x1002, 0x5e4c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ |
142 | {0x1002, 0x5e4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ | 142 | {0x1002, 0x5e4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ |
143 | {0x1002, 0x5e4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ | 143 | {0x1002, 0x5e4f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV410|RADEON_NEW_MEMMAP}, \ |
144 | {0x1002, 0x6880, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
145 | {0x1002, 0x6888, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
146 | {0x1002, 0x6889, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
147 | {0x1002, 0x688A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
148 | {0x1002, 0x6898, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
149 | {0x1002, 0x6899, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
150 | {0x1002, 0x689c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | ||
151 | {0x1002, 0x689d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HEMLOCK|RADEON_NEW_MEMMAP}, \ | ||
152 | {0x1002, 0x689e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYPRESS|RADEON_NEW_MEMMAP}, \ | ||
153 | {0x1002, 0x68a0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
154 | {0x1002, 0x68a1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
155 | {0x1002, 0x68a8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
156 | {0x1002, 0x68a9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
157 | {0x1002, 0x68b0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
158 | {0x1002, 0x68b8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
159 | {0x1002, 0x68b9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
160 | {0x1002, 0x68be, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_JUNIPER|RADEON_NEW_MEMMAP}, \ | ||
161 | {0x1002, 0x68c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
162 | {0x1002, 0x68c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
163 | {0x1002, 0x68c8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
164 | {0x1002, 0x68c9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
165 | {0x1002, 0x68d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
166 | {0x1002, 0x68d9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
167 | {0x1002, 0x68da, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
168 | {0x1002, 0x68de, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_REDWOOD|RADEON_NEW_MEMMAP}, \ | ||
169 | {0x1002, 0x68e0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
170 | {0x1002, 0x68e1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
171 | {0x1002, 0x68e4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
172 | {0x1002, 0x68e5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
173 | {0x1002, 0x68e8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
174 | {0x1002, 0x68e9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
175 | {0x1002, 0x68f1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
176 | {0x1002, 0x68f8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
177 | {0x1002, 0x68f9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
178 | {0x1002, 0x68fe, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CEDAR|RADEON_NEW_MEMMAP}, \ | ||
144 | {0x1002, 0x7100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_NEW_MEMMAP}, \ | 179 | {0x1002, 0x7100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_NEW_MEMMAP}, \ |
145 | {0x1002, 0x7101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 180 | {0x1002, 0x7101, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
146 | {0x1002, 0x7102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 181 | {0x1002, 0x7102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R520|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -558,4 +593,5 @@ | |||
558 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 593 | {0x8086, 0x35e8, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
559 | {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 594 | {0x8086, 0x0042, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
560 | {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 595 | {0x8086, 0x0046, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
596 | {0x8086, 0x0102, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
561 | {0, 0, 0} | 597 | {0, 0, 0} |
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index f745948b61e4..a6a9f4af5ebd 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
@@ -25,13 +25,14 @@ | |||
25 | #ifndef __NOUVEAU_DRM_H__ | 25 | #ifndef __NOUVEAU_DRM_H__ |
26 | #define __NOUVEAU_DRM_H__ | 26 | #define __NOUVEAU_DRM_H__ |
27 | 27 | ||
28 | #define NOUVEAU_DRM_HEADER_PATCHLEVEL 15 | 28 | #define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 |
29 | 29 | ||
30 | struct drm_nouveau_channel_alloc { | 30 | struct drm_nouveau_channel_alloc { |
31 | uint32_t fb_ctxdma_handle; | 31 | uint32_t fb_ctxdma_handle; |
32 | uint32_t tt_ctxdma_handle; | 32 | uint32_t tt_ctxdma_handle; |
33 | 33 | ||
34 | int channel; | 34 | int channel; |
35 | uint32_t pushbuf_domains; | ||
35 | 36 | ||
36 | /* Notifier memory */ | 37 | /* Notifier memory */ |
37 | uint32_t notifier_handle; | 38 | uint32_t notifier_handle; |
@@ -109,68 +110,58 @@ struct drm_nouveau_gem_new { | |||
109 | uint32_t align; | 110 | uint32_t align; |
110 | }; | 111 | }; |
111 | 112 | ||
113 | #define NOUVEAU_GEM_MAX_BUFFERS 1024 | ||
114 | struct drm_nouveau_gem_pushbuf_bo_presumed { | ||
115 | uint32_t valid; | ||
116 | uint32_t domain; | ||
117 | uint64_t offset; | ||
118 | }; | ||
119 | |||
112 | struct drm_nouveau_gem_pushbuf_bo { | 120 | struct drm_nouveau_gem_pushbuf_bo { |
113 | uint64_t user_priv; | 121 | uint64_t user_priv; |
114 | uint32_t handle; | 122 | uint32_t handle; |
115 | uint32_t read_domains; | 123 | uint32_t read_domains; |
116 | uint32_t write_domains; | 124 | uint32_t write_domains; |
117 | uint32_t valid_domains; | 125 | uint32_t valid_domains; |
118 | uint32_t presumed_ok; | 126 | struct drm_nouveau_gem_pushbuf_bo_presumed presumed; |
119 | uint32_t presumed_domain; | ||
120 | uint64_t presumed_offset; | ||
121 | }; | 127 | }; |
122 | 128 | ||
123 | #define NOUVEAU_GEM_RELOC_LOW (1 << 0) | 129 | #define NOUVEAU_GEM_RELOC_LOW (1 << 0) |
124 | #define NOUVEAU_GEM_RELOC_HIGH (1 << 1) | 130 | #define NOUVEAU_GEM_RELOC_HIGH (1 << 1) |
125 | #define NOUVEAU_GEM_RELOC_OR (1 << 2) | 131 | #define NOUVEAU_GEM_RELOC_OR (1 << 2) |
132 | #define NOUVEAU_GEM_MAX_RELOCS 1024 | ||
126 | struct drm_nouveau_gem_pushbuf_reloc { | 133 | struct drm_nouveau_gem_pushbuf_reloc { |
134 | uint32_t reloc_bo_index; | ||
135 | uint32_t reloc_bo_offset; | ||
127 | uint32_t bo_index; | 136 | uint32_t bo_index; |
128 | uint32_t reloc_index; | ||
129 | uint32_t flags; | 137 | uint32_t flags; |
130 | uint32_t data; | 138 | uint32_t data; |
131 | uint32_t vor; | 139 | uint32_t vor; |
132 | uint32_t tor; | 140 | uint32_t tor; |
133 | }; | 141 | }; |
134 | 142 | ||
135 | #define NOUVEAU_GEM_MAX_BUFFERS 1024 | 143 | #define NOUVEAU_GEM_MAX_PUSH 512 |
136 | #define NOUVEAU_GEM_MAX_RELOCS 1024 | 144 | struct drm_nouveau_gem_pushbuf_push { |
145 | uint32_t bo_index; | ||
146 | uint32_t pad; | ||
147 | uint64_t offset; | ||
148 | uint64_t length; | ||
149 | }; | ||
137 | 150 | ||
138 | struct drm_nouveau_gem_pushbuf { | 151 | struct drm_nouveau_gem_pushbuf { |
139 | uint32_t channel; | 152 | uint32_t channel; |
140 | uint32_t nr_dwords; | ||
141 | uint32_t nr_buffers; | 153 | uint32_t nr_buffers; |
142 | uint32_t nr_relocs; | ||
143 | uint64_t dwords; | ||
144 | uint64_t buffers; | 154 | uint64_t buffers; |
145 | uint64_t relocs; | ||
146 | }; | ||
147 | |||
148 | struct drm_nouveau_gem_pushbuf_call { | ||
149 | uint32_t channel; | ||
150 | uint32_t handle; | ||
151 | uint32_t offset; | ||
152 | uint32_t nr_buffers; | ||
153 | uint32_t nr_relocs; | 155 | uint32_t nr_relocs; |
154 | uint32_t nr_dwords; | 156 | uint32_t nr_push; |
155 | uint64_t buffers; | ||
156 | uint64_t relocs; | 157 | uint64_t relocs; |
158 | uint64_t push; | ||
157 | uint32_t suffix0; | 159 | uint32_t suffix0; |
158 | uint32_t suffix1; | 160 | uint32_t suffix1; |
159 | /* below only accessed for CALL2 */ | ||
160 | uint64_t vram_available; | 161 | uint64_t vram_available; |
161 | uint64_t gart_available; | 162 | uint64_t gart_available; |
162 | }; | 163 | }; |
163 | 164 | ||
164 | struct drm_nouveau_gem_pin { | ||
165 | uint32_t handle; | ||
166 | uint32_t domain; | ||
167 | uint64_t offset; | ||
168 | }; | ||
169 | |||
170 | struct drm_nouveau_gem_unpin { | ||
171 | uint32_t handle; | ||
172 | }; | ||
173 | |||
174 | #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 | 165 | #define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 |
175 | #define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 | 166 | #define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 |
176 | #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 | 167 | #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 |
@@ -183,14 +174,6 @@ struct drm_nouveau_gem_cpu_fini { | |||
183 | uint32_t handle; | 174 | uint32_t handle; |
184 | }; | 175 | }; |
185 | 176 | ||
186 | struct drm_nouveau_gem_tile { | ||
187 | uint32_t handle; | ||
188 | uint32_t offset; | ||
189 | uint32_t size; | ||
190 | uint32_t tile_mode; | ||
191 | uint32_t tile_flags; | ||
192 | }; | ||
193 | |||
194 | enum nouveau_bus_type { | 177 | enum nouveau_bus_type { |
195 | NV_AGP = 0, | 178 | NV_AGP = 0, |
196 | NV_PCI = 1, | 179 | NV_PCI = 1, |
@@ -200,22 +183,17 @@ enum nouveau_bus_type { | |||
200 | struct drm_nouveau_sarea { | 183 | struct drm_nouveau_sarea { |
201 | }; | 184 | }; |
202 | 185 | ||
203 | #define DRM_NOUVEAU_CARD_INIT 0x00 | 186 | #define DRM_NOUVEAU_GETPARAM 0x00 |
204 | #define DRM_NOUVEAU_GETPARAM 0x01 | 187 | #define DRM_NOUVEAU_SETPARAM 0x01 |
205 | #define DRM_NOUVEAU_SETPARAM 0x02 | 188 | #define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 |
206 | #define DRM_NOUVEAU_CHANNEL_ALLOC 0x03 | 189 | #define DRM_NOUVEAU_CHANNEL_FREE 0x03 |
207 | #define DRM_NOUVEAU_CHANNEL_FREE 0x04 | 190 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x04 |
208 | #define DRM_NOUVEAU_GROBJ_ALLOC 0x05 | 191 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 |
209 | #define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x06 | 192 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x06 |
210 | #define DRM_NOUVEAU_GPUOBJ_FREE 0x07 | ||
211 | #define DRM_NOUVEAU_GEM_NEW 0x40 | 193 | #define DRM_NOUVEAU_GEM_NEW 0x40 |
212 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 | 194 | #define DRM_NOUVEAU_GEM_PUSHBUF 0x41 |
213 | #define DRM_NOUVEAU_GEM_PUSHBUF_CALL 0x42 | 195 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x42 |
214 | #define DRM_NOUVEAU_GEM_PIN 0x43 /* !KMS only */ | 196 | #define DRM_NOUVEAU_GEM_CPU_FINI 0x43 |
215 | #define DRM_NOUVEAU_GEM_UNPIN 0x44 /* !KMS only */ | 197 | #define DRM_NOUVEAU_GEM_INFO 0x44 |
216 | #define DRM_NOUVEAU_GEM_CPU_PREP 0x45 | ||
217 | #define DRM_NOUVEAU_GEM_CPU_FINI 0x46 | ||
218 | #define DRM_NOUVEAU_GEM_INFO 0x47 | ||
219 | #define DRM_NOUVEAU_GEM_PUSHBUF_CALL2 0x48 | ||
220 | 198 | ||
221 | #endif /* __NOUVEAU_DRM_H__ */ | 199 | #endif /* __NOUVEAU_DRM_H__ */ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 39537f3cf98a..81e614bf2dc3 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -808,6 +808,7 @@ struct drm_radeon_gem_create { | |||
808 | #define RADEON_TILING_SWAP_32BIT 0x8 | 808 | #define RADEON_TILING_SWAP_32BIT 0x8 |
809 | #define RADEON_TILING_SURFACE 0x10 /* this object requires a surface | 809 | #define RADEON_TILING_SURFACE 0x10 /* this object requires a surface |
810 | * when mapped - i.e. front buffer */ | 810 | * when mapped - i.e. front buffer */ |
811 | #define RADEON_TILING_MICRO_SQUARE 0x20 | ||
811 | 812 | ||
812 | struct drm_radeon_gem_set_tiling { | 813 | struct drm_radeon_gem_set_tiling { |
813 | uint32_t handle; | 814 | uint32_t handle; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 4c4e0f8375b3..e3f1b4a4b601 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -908,7 +908,7 @@ extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, | |||
908 | * Utility function that returns the pgprot_t that should be used for | 908 | * Utility function that returns the pgprot_t that should be used for |
909 | * setting up a PTE with the caching model indicated by @c_state. | 909 | * setting up a PTE with the caching model indicated by @c_state. |
910 | */ | 910 | */ |
911 | extern pgprot_t ttm_io_prot(enum ttm_caching_state c_state, pgprot_t tmp); | 911 | extern pgprot_t ttm_io_prot(uint32_t caching_flags, pgprot_t tmp); |
912 | 912 | ||
913 | #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) | 913 | #if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE))) |
914 | #define TTM_HAS_AGP | 914 | #define TTM_HAS_AGP |
diff --git a/include/linux/audit.h b/include/linux/audit.h index 3c7a358241a7..f391d45c8aea 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -424,7 +424,7 @@ extern void audit_syscall_exit(int failed, long return_code); | |||
424 | extern void __audit_getname(const char *name); | 424 | extern void __audit_getname(const char *name); |
425 | extern void audit_putname(const char *name); | 425 | extern void audit_putname(const char *name); |
426 | extern void __audit_inode(const char *name, const struct dentry *dentry); | 426 | extern void __audit_inode(const char *name, const struct dentry *dentry); |
427 | extern void __audit_inode_child(const char *dname, const struct dentry *dentry, | 427 | extern void __audit_inode_child(const struct dentry *dentry, |
428 | const struct inode *parent); | 428 | const struct inode *parent); |
429 | extern void __audit_ptrace(struct task_struct *t); | 429 | extern void __audit_ptrace(struct task_struct *t); |
430 | 430 | ||
@@ -442,11 +442,10 @@ static inline void audit_inode(const char *name, const struct dentry *dentry) { | |||
442 | if (unlikely(!audit_dummy_context())) | 442 | if (unlikely(!audit_dummy_context())) |
443 | __audit_inode(name, dentry); | 443 | __audit_inode(name, dentry); |
444 | } | 444 | } |
445 | static inline void audit_inode_child(const char *dname, | 445 | static inline void audit_inode_child(const struct dentry *dentry, |
446 | const struct dentry *dentry, | ||
447 | const struct inode *parent) { | 446 | const struct inode *parent) { |
448 | if (unlikely(!audit_dummy_context())) | 447 | if (unlikely(!audit_dummy_context())) |
449 | __audit_inode_child(dname, dentry, parent); | 448 | __audit_inode_child(dentry, parent); |
450 | } | 449 | } |
451 | void audit_core_dumps(long signr); | 450 | void audit_core_dumps(long signr); |
452 | 451 | ||
@@ -544,9 +543,9 @@ extern int audit_signals; | |||
544 | #define audit_getname(n) do { ; } while (0) | 543 | #define audit_getname(n) do { ; } while (0) |
545 | #define audit_putname(n) do { ; } while (0) | 544 | #define audit_putname(n) do { ; } while (0) |
546 | #define __audit_inode(n,d) do { ; } while (0) | 545 | #define __audit_inode(n,d) do { ; } while (0) |
547 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 546 | #define __audit_inode_child(i,p) do { ; } while (0) |
548 | #define audit_inode(n,d) do { ; } while (0) | 547 | #define audit_inode(n,d) do { ; } while (0) |
549 | #define audit_inode_child(d,i,p) do { ; } while (0) | 548 | #define audit_inode_child(i,p) do { ; } while (0) |
550 | #define audit_core_dumps(i) do { ; } while (0) | 549 | #define audit_core_dumps(i) do { ; } while (0) |
551 | #define auditsc_get_stamp(c,t,s) (0) | 550 | #define auditsc_get_stamp(c,t,s) (0) |
552 | #define audit_get_loginuid(t) (-1) | 551 | #define audit_get_loginuid(t) (-1) |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 3b73b9992b26..416bf62d6d46 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -150,8 +150,8 @@ struct blk_user_trace_setup { | |||
150 | struct blk_trace { | 150 | struct blk_trace { |
151 | int trace_state; | 151 | int trace_state; |
152 | struct rchan *rchan; | 152 | struct rchan *rchan; |
153 | unsigned long *sequence; | 153 | unsigned long __percpu *sequence; |
154 | unsigned char *msg_data; | 154 | unsigned char __percpu *msg_data; |
155 | u16 act_mask; | 155 | u16 act_mask; |
156 | u64 start_lba; | 156 | u64 start_lba; |
157 | u64 end_lba; | 157 | u64 end_lba; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index b10ec49ee2dd..266ab9291232 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -23,6 +23,7 @@ extern unsigned long max_pfn; | |||
23 | extern unsigned long saved_max_pfn; | 23 | extern unsigned long saved_max_pfn; |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #ifndef CONFIG_NO_BOOTMEM | ||
26 | /* | 27 | /* |
27 | * node_bootmem_map is a map pointer - the bits represent all physical | 28 | * node_bootmem_map is a map pointer - the bits represent all physical |
28 | * memory pages (including holes) on the node. | 29 | * memory pages (including holes) on the node. |
@@ -37,6 +38,7 @@ typedef struct bootmem_data { | |||
37 | } bootmem_data_t; | 38 | } bootmem_data_t; |
38 | 39 | ||
39 | extern bootmem_data_t bootmem_node_data[]; | 40 | extern bootmem_data_t bootmem_node_data[]; |
41 | #endif | ||
40 | 42 | ||
41 | extern unsigned long bootmem_bootmap_pages(unsigned long); | 43 | extern unsigned long bootmem_bootmap_pages(unsigned long); |
42 | 44 | ||
@@ -46,6 +48,7 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
46 | unsigned long endpfn); | 48 | unsigned long endpfn); |
47 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 49 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
48 | 50 | ||
51 | unsigned long free_all_memory_core_early(int nodeid); | ||
49 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | 52 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); |
50 | extern unsigned long free_all_bootmem(void); | 53 | extern unsigned long free_all_bootmem(void); |
51 | 54 | ||
@@ -84,6 +87,10 @@ extern void *__alloc_bootmem_node(pg_data_t *pgdat, | |||
84 | unsigned long size, | 87 | unsigned long size, |
85 | unsigned long align, | 88 | unsigned long align, |
86 | unsigned long goal); | 89 | unsigned long goal); |
90 | void *__alloc_bootmem_node_high(pg_data_t *pgdat, | ||
91 | unsigned long size, | ||
92 | unsigned long align, | ||
93 | unsigned long goal); | ||
87 | extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, | 94 | extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, |
88 | unsigned long size, | 95 | unsigned long size, |
89 | unsigned long align, | 96 | unsigned long align, |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 188fcae10a99..a5a472b10746 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #ifdef __CHECKER__ | 6 | #ifdef __CHECKER__ |
7 | # define __user __attribute__((noderef, address_space(1))) | 7 | # define __user __attribute__((noderef, address_space(1))) |
8 | # define __kernel /* default address space */ | 8 | # define __kernel __attribute__((address_space(0))) |
9 | # define __safe __attribute__((safe)) | 9 | # define __safe __attribute__((safe)) |
10 | # define __force __attribute__((force)) | 10 | # define __force __attribute__((force)) |
11 | # define __nocast __attribute__((nocast)) | 11 | # define __nocast __attribute__((nocast)) |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 78784982b33e..20ea12c86fd0 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -31,6 +31,8 @@ | |||
31 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code | 31 | * if dma_cookie_t is >0 it's a DMA request cookie, <0 it's an error code |
32 | */ | 32 | */ |
33 | typedef s32 dma_cookie_t; | 33 | typedef s32 dma_cookie_t; |
34 | #define DMA_MIN_COOKIE 1 | ||
35 | #define DMA_MAX_COOKIE INT_MAX | ||
34 | 36 | ||
35 | #define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) | 37 | #define dma_submit_error(cookie) ((cookie) < 0 ? 1 : 0) |
36 | 38 | ||
@@ -162,7 +164,7 @@ struct dma_chan { | |||
162 | struct dma_chan_dev *dev; | 164 | struct dma_chan_dev *dev; |
163 | 165 | ||
164 | struct list_head device_node; | 166 | struct list_head device_node; |
165 | struct dma_chan_percpu *local; | 167 | struct dma_chan_percpu __percpu *local; |
166 | int client_count; | 168 | int client_count; |
167 | int table_count; | 169 | int table_count; |
168 | void *private; | 170 | void *private; |
diff --git a/include/linux/early_res.h b/include/linux/early_res.h new file mode 100644 index 000000000000..29c09f57a13c --- /dev/null +++ b/include/linux/early_res.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef _LINUX_EARLY_RES_H | ||
2 | #define _LINUX_EARLY_RES_H | ||
3 | #ifdef __KERNEL__ | ||
4 | |||
5 | extern void reserve_early(u64 start, u64 end, char *name); | ||
6 | extern void reserve_early_overlap_ok(u64 start, u64 end, char *name); | ||
7 | extern void free_early(u64 start, u64 end); | ||
8 | void free_early_partial(u64 start, u64 end); | ||
9 | extern void early_res_to_bootmem(u64 start, u64 end); | ||
10 | |||
11 | void reserve_early_without_check(u64 start, u64 end, char *name); | ||
12 | u64 find_early_area(u64 ei_start, u64 ei_last, u64 start, u64 end, | ||
13 | u64 size, u64 align); | ||
14 | u64 find_early_area_size(u64 ei_start, u64 ei_last, u64 start, | ||
15 | u64 *sizep, u64 align); | ||
16 | u64 find_fw_memmap_area(u64 start, u64 end, u64 size, u64 align); | ||
17 | u64 get_max_mapped(void); | ||
18 | #include <linux/range.h> | ||
19 | int get_free_all_memory_range(struct range **rangep, int nodeid); | ||
20 | |||
21 | #endif /* __KERNEL__ */ | ||
22 | |||
23 | #endif /* _LINUX_EARLY_RES_H */ | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index e6590f8f0b3c..cac84b006667 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -894,7 +894,7 @@ int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, | |||
894 | int create); | 894 | int create); |
895 | 895 | ||
896 | extern struct inode *ext3_iget(struct super_block *, unsigned long); | 896 | extern struct inode *ext3_iget(struct super_block *, unsigned long); |
897 | extern int ext3_write_inode (struct inode *, int); | 897 | extern int ext3_write_inode (struct inode *, struct writeback_control *); |
898 | extern int ext3_setattr (struct dentry *, struct iattr *); | 898 | extern int ext3_setattr (struct dentry *, struct iattr *); |
899 | extern void ext3_delete_inode (struct inode *); | 899 | extern void ext3_delete_inode (struct inode *); |
900 | extern int ext3_sync_inode (handle_t *, struct inode *); | 900 | extern int ext3_sync_inode (handle_t *, struct inode *); |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 369767bd873e..c10163b4c40e 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -543,6 +543,8 @@ struct fb_cursor_user { | |||
543 | #define FB_EVENT_GET_REQ 0x0D | 543 | #define FB_EVENT_GET_REQ 0x0D |
544 | /* Unbind from the console if possible */ | 544 | /* Unbind from the console if possible */ |
545 | #define FB_EVENT_FB_UNBIND 0x0E | 545 | #define FB_EVENT_FB_UNBIND 0x0E |
546 | /* CONSOLE-SPECIFIC: remap all consoles to new fb - for vga switcheroo */ | ||
547 | #define FB_EVENT_REMAP_ALL_CONSOLE 0x0F | ||
546 | 548 | ||
547 | struct fb_event { | 549 | struct fb_event { |
548 | struct fb_info *info; | 550 | struct fb_info *info; |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 520ecf86cbb3..40b11013408e 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -248,13 +248,20 @@ union fw_cdev_event { | |||
248 | #define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) | 248 | #define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) |
249 | #define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) | 249 | #define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) |
250 | 250 | ||
251 | /* available since kernel version 2.6.34 */ | ||
252 | #define FW_CDEV_IOC_GET_CYCLE_TIMER2 _IOWR('#', 0x14, struct fw_cdev_get_cycle_timer2) | ||
253 | |||
251 | /* | 254 | /* |
252 | * FW_CDEV_VERSION History | 255 | * FW_CDEV_VERSION History |
253 | * 1 (2.6.22) - initial version | 256 | * 1 (2.6.22) - initial version |
254 | * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if | 257 | * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if |
255 | * &fw_cdev_create_iso_context.header_size is 8 or more | 258 | * &fw_cdev_create_iso_context.header_size is 8 or more |
259 | * (2.6.32) - added time stamp to xmit &fw_cdev_event_iso_interrupt | ||
260 | * (2.6.33) - IR has always packet-per-buffer semantics now, not one of | ||
261 | * dual-buffer or packet-per-buffer depending on hardware | ||
262 | * 3 (2.6.34) - made &fw_cdev_get_cycle_timer reliable | ||
256 | */ | 263 | */ |
257 | #define FW_CDEV_VERSION 2 | 264 | #define FW_CDEV_VERSION 3 |
258 | 265 | ||
259 | /** | 266 | /** |
260 | * struct fw_cdev_get_info - General purpose information ioctl | 267 | * struct fw_cdev_get_info - General purpose information ioctl |
@@ -544,14 +551,18 @@ struct fw_cdev_stop_iso { | |||
544 | /** | 551 | /** |
545 | * struct fw_cdev_get_cycle_timer - read cycle timer register | 552 | * struct fw_cdev_get_cycle_timer - read cycle timer register |
546 | * @local_time: system time, in microseconds since the Epoch | 553 | * @local_time: system time, in microseconds since the Epoch |
547 | * @cycle_timer: isochronous cycle timer, as per OHCI 1.1 clause 5.13 | 554 | * @cycle_timer: Cycle Time register contents |
548 | * | 555 | * |
549 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer | 556 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer |
550 | * and also the system clock. This allows to express the receive time of an | 557 | * and also the system clock (%CLOCK_REALTIME). This allows to express the |
551 | * isochronous packet as a system time with microsecond accuracy. | 558 | * receive time of an isochronous packet as a system time. |
552 | * | 559 | * |
553 | * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and | 560 | * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and |
554 | * 12 bits cycleOffset, in host byte order. | 561 | * 12 bits cycleOffset, in host byte order. Cf. the Cycle Time register |
562 | * per IEEE 1394 or Isochronous Cycle Timer register per OHCI-1394. | ||
563 | * | ||
564 | * In version 1 and 2 of the ABI, this ioctl returned unreliable (non- | ||
565 | * monotonic) @cycle_timer values on certain controllers. | ||
555 | */ | 566 | */ |
556 | struct fw_cdev_get_cycle_timer { | 567 | struct fw_cdev_get_cycle_timer { |
557 | __u64 local_time; | 568 | __u64 local_time; |
@@ -559,6 +570,25 @@ struct fw_cdev_get_cycle_timer { | |||
559 | }; | 570 | }; |
560 | 571 | ||
561 | /** | 572 | /** |
573 | * struct fw_cdev_get_cycle_timer2 - read cycle timer register | ||
574 | * @tv_sec: system time, seconds | ||
575 | * @tv_nsec: system time, sub-seconds part in nanoseconds | ||
576 | * @clk_id: input parameter, clock from which to get the system time | ||
577 | * @cycle_timer: Cycle Time register contents | ||
578 | * | ||
579 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER2 works like | ||
580 | * %FW_CDEV_IOC_GET_CYCLE_TIMER but lets you choose a clock like with POSIX' | ||
581 | * clock_gettime function. Supported @clk_id values are POSIX' %CLOCK_REALTIME | ||
582 | * and %CLOCK_MONOTONIC and Linux' %CLOCK_MONOTONIC_RAW. | ||
583 | */ | ||
584 | struct fw_cdev_get_cycle_timer2 { | ||
585 | __s64 tv_sec; | ||
586 | __s32 tv_nsec; | ||
587 | __s32 clk_id; | ||
588 | __u32 cycle_timer; | ||
589 | }; | ||
590 | |||
591 | /** | ||
562 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | 592 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth |
563 | * @closure: Passed back to userspace in correponding iso resource events | 593 | * @closure: Passed back to userspace in correponding iso resource events |
564 | * @channels: Isochronous channels of which one is to be (de)allocated | 594 | * @channels: Isochronous channels of which one is to be (de)allocated |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index a0e67150a729..4bd94bf5e739 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -65,12 +65,13 @@ | |||
65 | #define CSR_DIRECTORY_ID 0x20 | 65 | #define CSR_DIRECTORY_ID 0x20 |
66 | 66 | ||
67 | struct fw_csr_iterator { | 67 | struct fw_csr_iterator { |
68 | u32 *p; | 68 | const u32 *p; |
69 | u32 *end; | 69 | const u32 *end; |
70 | }; | 70 | }; |
71 | 71 | ||
72 | void fw_csr_iterator_init(struct fw_csr_iterator *ci, u32 *p); | 72 | void fw_csr_iterator_init(struct fw_csr_iterator *ci, const u32 *p); |
73 | int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value); | 73 | int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value); |
74 | int fw_csr_string(const u32 *directory, int key, char *buf, size_t size); | ||
74 | 75 | ||
75 | extern struct bus_type fw_bus_type; | 76 | extern struct bus_type fw_bus_type; |
76 | 77 | ||
@@ -162,7 +163,7 @@ struct fw_device { | |||
162 | struct mutex client_list_mutex; | 163 | struct mutex client_list_mutex; |
163 | struct list_head client_list; | 164 | struct list_head client_list; |
164 | 165 | ||
165 | u32 *config_rom; | 166 | const u32 *config_rom; |
166 | size_t config_rom_length; | 167 | size_t config_rom_length; |
167 | int config_rom_retries; | 168 | int config_rom_retries; |
168 | unsigned is_local:1; | 169 | unsigned is_local:1; |
@@ -204,7 +205,7 @@ int fw_device_enable_phys_dma(struct fw_device *device); | |||
204 | */ | 205 | */ |
205 | struct fw_unit { | 206 | struct fw_unit { |
206 | struct device device; | 207 | struct device device; |
207 | u32 *directory; | 208 | const u32 *directory; |
208 | struct fw_attribute_group attribute_group; | 209 | struct fw_attribute_group attribute_group; |
209 | }; | 210 | }; |
210 | 211 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index ebb1cd5bc241..45689621a851 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1305,6 +1305,8 @@ extern int send_sigurg(struct fown_struct *fown); | |||
1305 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ | 1305 | #define MNT_FORCE 0x00000001 /* Attempt to forcibily umount */ |
1306 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ | 1306 | #define MNT_DETACH 0x00000002 /* Just detach from the tree */ |
1307 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ | 1307 | #define MNT_EXPIRE 0x00000004 /* Mark for expiry */ |
1308 | #define UMOUNT_NOFOLLOW 0x00000008 /* Don't follow symlink on umount */ | ||
1309 | #define UMOUNT_UNUSED 0x80000000 /* Flag guaranteed to be unused */ | ||
1308 | 1310 | ||
1309 | extern struct list_head super_blocks; | 1311 | extern struct list_head super_blocks; |
1310 | extern spinlock_t sb_lock; | 1312 | extern spinlock_t sb_lock; |
@@ -1314,9 +1316,9 @@ extern spinlock_t sb_lock; | |||
1314 | struct super_block { | 1316 | struct super_block { |
1315 | struct list_head s_list; /* Keep this first */ | 1317 | struct list_head s_list; /* Keep this first */ |
1316 | dev_t s_dev; /* search index; _not_ kdev_t */ | 1318 | dev_t s_dev; /* search index; _not_ kdev_t */ |
1317 | unsigned long s_blocksize; | ||
1318 | unsigned char s_blocksize_bits; | ||
1319 | unsigned char s_dirt; | 1319 | unsigned char s_dirt; |
1320 | unsigned char s_blocksize_bits; | ||
1321 | unsigned long s_blocksize; | ||
1320 | loff_t s_maxbytes; /* Max file size */ | 1322 | loff_t s_maxbytes; /* Max file size */ |
1321 | struct file_system_type *s_type; | 1323 | struct file_system_type *s_type; |
1322 | const struct super_operations *s_op; | 1324 | const struct super_operations *s_op; |
@@ -1357,16 +1359,16 @@ struct super_block { | |||
1357 | void *s_fs_info; /* Filesystem private info */ | 1359 | void *s_fs_info; /* Filesystem private info */ |
1358 | fmode_t s_mode; | 1360 | fmode_t s_mode; |
1359 | 1361 | ||
1362 | /* Granularity of c/m/atime in ns. | ||
1363 | Cannot be worse than a second */ | ||
1364 | u32 s_time_gran; | ||
1365 | |||
1360 | /* | 1366 | /* |
1361 | * The next field is for VFS *only*. No filesystems have any business | 1367 | * The next field is for VFS *only*. No filesystems have any business |
1362 | * even looking at it. You had been warned. | 1368 | * even looking at it. You had been warned. |
1363 | */ | 1369 | */ |
1364 | struct mutex s_vfs_rename_mutex; /* Kludge */ | 1370 | struct mutex s_vfs_rename_mutex; /* Kludge */ |
1365 | 1371 | ||
1366 | /* Granularity of c/m/atime in ns. | ||
1367 | Cannot be worse than a second */ | ||
1368 | u32 s_time_gran; | ||
1369 | |||
1370 | /* | 1372 | /* |
1371 | * Filesystem subtype. If non-empty the filesystem type field | 1373 | * Filesystem subtype. If non-empty the filesystem type field |
1372 | * in /proc/mounts will be "type.subtype" | 1374 | * in /proc/mounts will be "type.subtype" |
@@ -1555,7 +1557,7 @@ struct super_operations { | |||
1555 | void (*destroy_inode)(struct inode *); | 1557 | void (*destroy_inode)(struct inode *); |
1556 | 1558 | ||
1557 | void (*dirty_inode) (struct inode *); | 1559 | void (*dirty_inode) (struct inode *); |
1558 | int (*write_inode) (struct inode *, int); | 1560 | int (*write_inode) (struct inode *, struct writeback_control *wbc); |
1559 | void (*drop_inode) (struct inode *); | 1561 | void (*drop_inode) (struct inode *); |
1560 | void (*delete_inode) (struct inode *); | 1562 | void (*delete_inode) (struct inode *); |
1561 | void (*put_super) (struct super_block *); | 1563 | void (*put_super) (struct super_block *); |
@@ -1794,7 +1796,8 @@ extern int may_umount(struct vfsmount *); | |||
1794 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 1796 | extern long do_mount(char *, char *, char *, unsigned long, void *); |
1795 | extern struct vfsmount *collect_mounts(struct path *); | 1797 | extern struct vfsmount *collect_mounts(struct path *); |
1796 | extern void drop_collected_mounts(struct vfsmount *); | 1798 | extern void drop_collected_mounts(struct vfsmount *); |
1797 | 1799 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | |
1800 | struct vfsmount *); | ||
1798 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1801 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
1799 | 1802 | ||
1800 | extern int current_umask(void); | 1803 | extern int current_umask(void); |
@@ -2058,12 +2061,6 @@ extern int invalidate_inodes(struct super_block *); | |||
2058 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 2061 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
2059 | pgoff_t start, pgoff_t end); | 2062 | pgoff_t start, pgoff_t end); |
2060 | 2063 | ||
2061 | static inline unsigned long __deprecated | ||
2062 | invalidate_inode_pages(struct address_space *mapping) | ||
2063 | { | ||
2064 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
2065 | } | ||
2066 | |||
2067 | static inline void invalidate_remote_inode(struct inode *inode) | 2064 | static inline void invalidate_remote_inode(struct inode *inode) |
2068 | { | 2065 | { |
2069 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 2066 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
@@ -2132,6 +2129,7 @@ extern struct file * open_exec(const char *); | |||
2132 | 2129 | ||
2133 | /* fs/dcache.c -- generic fs support functions */ | 2130 | /* fs/dcache.c -- generic fs support functions */ |
2134 | extern int is_subdir(struct dentry *, struct dentry *); | 2131 | extern int is_subdir(struct dentry *, struct dentry *); |
2132 | extern int path_is_under(struct path *, struct path *); | ||
2135 | extern ino_t find_inode_number(struct dentry *, struct qstr *); | 2133 | extern ino_t find_inode_number(struct dentry *, struct qstr *); |
2136 | 2134 | ||
2137 | #include <linux/err.h> | 2135 | #include <linux/err.h> |
@@ -2340,8 +2338,6 @@ extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct | |||
2340 | extern int simple_sync_file(struct file *, struct dentry *, int); | 2338 | extern int simple_sync_file(struct file *, struct dentry *, int); |
2341 | extern int simple_empty(struct dentry *); | 2339 | extern int simple_empty(struct dentry *); |
2342 | extern int simple_readpage(struct file *file, struct page *page); | 2340 | extern int simple_readpage(struct file *file, struct page *page); |
2343 | extern int simple_prepare_write(struct file *file, struct page *page, | ||
2344 | unsigned offset, unsigned to); | ||
2345 | extern int simple_write_begin(struct file *file, struct address_space *mapping, | 2341 | extern int simple_write_begin(struct file *file, struct address_space *mapping, |
2346 | loff_t pos, unsigned len, unsigned flags, | 2342 | loff_t pos, unsigned len, unsigned flags, |
2347 | struct page **pagep, void **fsdata); | 2343 | struct page **pagep, void **fsdata); |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 936f9aa8bb97..df8fd9a3b214 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -65,7 +65,7 @@ static inline void fsnotify_link_count(struct inode *inode) | |||
65 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir | 65 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir |
66 | */ | 66 | */ |
67 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | 67 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, |
68 | const char *old_name, const char *new_name, | 68 | const char *old_name, |
69 | int isdir, struct inode *target, struct dentry *moved) | 69 | int isdir, struct inode *target, struct dentry *moved) |
70 | { | 70 | { |
71 | struct inode *source = moved->d_inode; | 71 | struct inode *source = moved->d_inode; |
@@ -73,6 +73,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
73 | u32 fs_cookie = fsnotify_get_cookie(); | 73 | u32 fs_cookie = fsnotify_get_cookie(); |
74 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); | 74 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); |
75 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); | 75 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); |
76 | const char *new_name = moved->d_name.name; | ||
76 | 77 | ||
77 | if (old_dir == new_dir) | 78 | if (old_dir == new_dir) |
78 | old_dir_mask |= FS_DN_RENAME; | 79 | old_dir_mask |= FS_DN_RENAME; |
@@ -103,7 +104,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
103 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | 104 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
104 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 105 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
105 | } | 106 | } |
106 | audit_inode_child(new_name, moved, new_dir); | 107 | audit_inode_child(moved, new_dir); |
107 | } | 108 | } |
108 | 109 | ||
109 | /* | 110 | /* |
@@ -146,7 +147,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
146 | { | 147 | { |
147 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, | 148 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
148 | dentry->d_inode); | 149 | dentry->d_inode); |
149 | audit_inode_child(dentry->d_name.name, dentry, inode); | 150 | audit_inode_child(dentry, inode); |
150 | 151 | ||
151 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 152 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
152 | } | 153 | } |
@@ -161,7 +162,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct | |||
161 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, | 162 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, |
162 | inode); | 163 | inode); |
163 | fsnotify_link_count(inode); | 164 | fsnotify_link_count(inode); |
164 | audit_inode_child(new_dentry->d_name.name, new_dentry, dir); | 165 | audit_inode_child(new_dentry, dir); |
165 | 166 | ||
166 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); | 167 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); |
167 | } | 168 | } |
@@ -175,7 +176,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
175 | struct inode *d_inode = dentry->d_inode; | 176 | struct inode *d_inode = dentry->d_inode; |
176 | 177 | ||
177 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); | 178 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); |
178 | audit_inode_child(dentry->d_name.name, dentry, inode); | 179 | audit_inode_child(dentry, inode); |
179 | 180 | ||
180 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 181 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
181 | } | 182 | } |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9717081c75ad..56b50514ab25 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -101,7 +101,7 @@ struct hd_struct { | |||
101 | unsigned long stamp; | 101 | unsigned long stamp; |
102 | int in_flight[2]; | 102 | int in_flight[2]; |
103 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
104 | struct disk_stats *dkstats; | 104 | struct disk_stats __percpu *dkstats; |
105 | #else | 105 | #else |
106 | struct disk_stats dkstats; | 106 | struct disk_stats dkstats; |
107 | #endif | 107 | #endif |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 81f90a59cda6..4f4462974c14 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -180,33 +180,6 @@ struct gfs2_rgrp { | |||
180 | }; | 180 | }; |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * quota linked list: user quotas and group quotas form two separate | ||
184 | * singly linked lists. ll_next stores uids or gids of next quotas in the | ||
185 | * linked list. | ||
186 | |||
187 | Given the uid/gid, how to calculate the quota file offsets for the corresponding | ||
188 | gfs2_quota structures on disk: | ||
189 | |||
190 | for user quotas, given uid, | ||
191 | offset = uid * sizeof(struct gfs2_quota); | ||
192 | |||
193 | for group quotas, given gid, | ||
194 | offset = (gid * sizeof(struct gfs2_quota)) + sizeof(struct gfs2_quota); | ||
195 | |||
196 | |||
197 | uid:0 gid:0 uid:12 gid:12 uid:17 gid:17 uid:5142 gid:5142 | ||
198 | +-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+ | ||
199 | | valid | valid | :: | valid | valid | :: | valid | inval | :: | inval | valid | | ||
200 | +-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+ | ||
201 | next:12 next:12 next:17 next:5142 next:NULL next:NULL | ||
202 | | | | | |<-- user quota list | | ||
203 | \______|___________/ \______|___________/ group quota list -->| | ||
204 | | | | | ||
205 | \__________________/ \_______________________________________/ | ||
206 | |||
207 | */ | ||
208 | |||
209 | /* | ||
210 | * quota structure | 183 | * quota structure |
211 | */ | 184 | */ |
212 | 185 | ||
@@ -214,8 +187,7 @@ struct gfs2_quota { | |||
214 | __be64 qu_limit; | 187 | __be64 qu_limit; |
215 | __be64 qu_warn; | 188 | __be64 qu_warn; |
216 | __be64 qu_value; | 189 | __be64 qu_value; |
217 | __be32 qu_ll_next; /* location of next quota in list */ | 190 | __u8 qu_reserved[64]; |
218 | __u8 qu_reserved[60]; | ||
219 | }; | 191 | }; |
220 | 192 | ||
221 | /* | 193 | /* |
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h new file mode 100644 index 000000000000..63f57a8c8b31 --- /dev/null +++ b/include/linux/i2c-smbus.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * i2c-smbus.h - SMBus extensions to the I2C protocol | ||
3 | * | ||
4 | * Copyright (C) 2010 Jean Delvare <khali@linux-fr.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _LINUX_I2C_SMBUS_H | ||
22 | #define _LINUX_I2C_SMBUS_H | ||
23 | |||
24 | #include <linux/i2c.h> | ||
25 | |||
26 | |||
27 | /** | ||
28 | * i2c_smbus_alert_setup - platform data for the smbus_alert i2c client | ||
29 | * @alert_edge_triggered: whether the alert interrupt is edge (1) or level (0) | ||
30 | * triggered | ||
31 | * @irq: IRQ number, if the smbus_alert driver should take care of interrupt | ||
32 | * handling | ||
33 | * | ||
34 | * If irq is not specified, the smbus_alert driver doesn't take care of | ||
35 | * interrupt handling. In that case it is up to the I2C bus driver to either | ||
36 | * handle the interrupts or to poll for alerts. | ||
37 | * | ||
38 | * If irq is specified then it it crucial that alert_edge_triggered is | ||
39 | * properly set. | ||
40 | */ | ||
41 | struct i2c_smbus_alert_setup { | ||
42 | unsigned int alert_edge_triggered:1; | ||
43 | int irq; | ||
44 | }; | ||
45 | |||
46 | struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter, | ||
47 | struct i2c_smbus_alert_setup *setup); | ||
48 | int i2c_handle_smbus_alert(struct i2c_client *ara); | ||
49 | |||
50 | #endif /* _LINUX_I2C_SMBUS_H */ | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 02fc617782ef..0a5da639b327 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -53,6 +53,7 @@ struct i2c_board_info; | |||
53 | * on a bus (or read from them). Apart from two basic transfer functions to | 53 | * on a bus (or read from them). Apart from two basic transfer functions to |
54 | * transmit one message at a time, a more complex version can be used to | 54 | * transmit one message at a time, a more complex version can be used to |
55 | * transmit an arbitrary number of messages without interruption. | 55 | * transmit an arbitrary number of messages without interruption. |
56 | * @count must be be less than 64k since msg.len is u16. | ||
56 | */ | 57 | */ |
57 | extern int i2c_master_send(struct i2c_client *client, const char *buf, | 58 | extern int i2c_master_send(struct i2c_client *client, const char *buf, |
58 | int count); | 59 | int count); |
@@ -152,6 +153,13 @@ struct i2c_driver { | |||
152 | int (*suspend)(struct i2c_client *, pm_message_t mesg); | 153 | int (*suspend)(struct i2c_client *, pm_message_t mesg); |
153 | int (*resume)(struct i2c_client *); | 154 | int (*resume)(struct i2c_client *); |
154 | 155 | ||
156 | /* Alert callback, for example for the SMBus alert protocol. | ||
157 | * The format and meaning of the data value depends on the protocol. | ||
158 | * For the SMBus alert protocol, there is a single bit of data passed | ||
159 | * as the alert response's low bit ("event flag"). | ||
160 | */ | ||
161 | void (*alert)(struct i2c_client *, unsigned int data); | ||
162 | |||
155 | /* a ioctl like command that can be used to perform specific functions | 163 | /* a ioctl like command that can be used to perform specific functions |
156 | * with the device. | 164 | * with the device. |
157 | */ | 165 | */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 0ec612959042..97e6ab435184 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -515,6 +515,8 @@ struct ide_drive_s { | |||
515 | u8 init_speed; /* transfer rate set at boot */ | 515 | u8 init_speed; /* transfer rate set at boot */ |
516 | u8 current_speed; /* current transfer rate set */ | 516 | u8 current_speed; /* current transfer rate set */ |
517 | u8 desired_speed; /* desired transfer rate set */ | 517 | u8 desired_speed; /* desired transfer rate set */ |
518 | u8 pio_mode; /* for ->set_pio_mode _only_ */ | ||
519 | u8 dma_mode; /* for ->dma_pio_mode _only_ */ | ||
518 | u8 dn; /* now wide spread use */ | 520 | u8 dn; /* now wide spread use */ |
519 | u8 acoustic; /* acoustic management */ | 521 | u8 acoustic; /* acoustic management */ |
520 | u8 media; /* disk, cdrom, tape, floppy, ... */ | 522 | u8 media; /* disk, cdrom, tape, floppy, ... */ |
@@ -622,8 +624,8 @@ extern const struct ide_tp_ops default_tp_ops; | |||
622 | */ | 624 | */ |
623 | struct ide_port_ops { | 625 | struct ide_port_ops { |
624 | void (*init_dev)(ide_drive_t *); | 626 | void (*init_dev)(ide_drive_t *); |
625 | void (*set_pio_mode)(ide_drive_t *, const u8); | 627 | void (*set_pio_mode)(struct hwif_s *, ide_drive_t *); |
626 | void (*set_dma_mode)(ide_drive_t *, const u8); | 628 | void (*set_dma_mode)(struct hwif_s *, ide_drive_t *); |
627 | int (*reset_poll)(ide_drive_t *); | 629 | int (*reset_poll)(ide_drive_t *); |
628 | void (*pre_reset)(ide_drive_t *); | 630 | void (*pre_reset)(ide_drive_t *); |
629 | void (*resetproc)(ide_drive_t *); | 631 | void (*resetproc)(ide_drive_t *); |
@@ -1494,7 +1496,6 @@ int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | |||
1494 | #ifdef CONFIG_IDE_XFER_MODE | 1496 | #ifdef CONFIG_IDE_XFER_MODE |
1495 | int ide_scan_pio_blacklist(char *); | 1497 | int ide_scan_pio_blacklist(char *); |
1496 | const char *ide_xfer_verbose(u8); | 1498 | const char *ide_xfer_verbose(u8); |
1497 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | ||
1498 | int ide_pio_need_iordy(ide_drive_t *, const u8); | 1499 | int ide_pio_need_iordy(ide_drive_t *, const u8); |
1499 | int ide_set_pio_mode(ide_drive_t *, u8); | 1500 | int ide_set_pio_mode(ide_drive_t *, u8); |
1500 | int ide_set_dma_mode(ide_drive_t *, u8); | 1501 | int ide_set_dma_mode(ide_drive_t *, u8); |
diff --git a/include/linux/irq.h b/include/linux/irq.h index d13492df57a1..707ab122e2e6 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -400,7 +400,9 @@ static inline int irq_has_action(unsigned int irq) | |||
400 | 400 | ||
401 | /* Dynamic irq helper functions */ | 401 | /* Dynamic irq helper functions */ |
402 | extern void dynamic_irq_init(unsigned int irq); | 402 | extern void dynamic_irq_init(unsigned int irq); |
403 | void dynamic_irq_init_keep_chip_data(unsigned int irq); | ||
403 | extern void dynamic_irq_cleanup(unsigned int irq); | 404 | extern void dynamic_irq_cleanup(unsigned int irq); |
405 | void dynamic_irq_cleanup_keep_chip_data(unsigned int irq); | ||
404 | 406 | ||
405 | /* Set/get chip/data for an IRQ: */ | 407 | /* Set/get chip/data for an IRQ: */ |
406 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | 408 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 4cf619161ed0..1ec876358180 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -69,15 +69,8 @@ extern u8 jbd2_journal_enable_debug; | |||
69 | #define jbd_debug(f, a...) /**/ | 69 | #define jbd_debug(f, a...) /**/ |
70 | #endif | 70 | #endif |
71 | 71 | ||
72 | static inline void *jbd2_alloc(size_t size, gfp_t flags) | 72 | extern void *jbd2_alloc(size_t size, gfp_t flags); |
73 | { | 73 | extern void jbd2_free(void *ptr, size_t size); |
74 | return (void *)__get_free_pages(flags, get_order(size)); | ||
75 | } | ||
76 | |||
77 | static inline void jbd2_free(void *ptr, size_t size) | ||
78 | { | ||
79 | free_pages((unsigned long)ptr, get_order(size)); | ||
80 | }; | ||
81 | 74 | ||
82 | #define JBD2_MIN_JOURNAL_BLOCKS 1024 | 75 | #define JBD2_MIN_JOURNAL_BLOCKS 1024 |
83 | 76 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 1221d2331a6d..7f0707463360 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -44,6 +44,16 @@ extern const char linux_proc_banner[]; | |||
44 | 44 | ||
45 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 45 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
46 | 46 | ||
47 | /* | ||
48 | * This looks more complex than it should be. But we need to | ||
49 | * get the type for the ~ right in round_down (it needs to be | ||
50 | * as wide as the result!), and we want to evaluate the macro | ||
51 | * arguments just once each. | ||
52 | */ | ||
53 | #define __round_mask(x, y) ((__typeof__(x))((y)-1)) | ||
54 | #define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) | ||
55 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) | ||
56 | |||
47 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | 57 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) |
48 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) | 58 | #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) |
49 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) | 59 | #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index c356b6914ffd..03e8e8dbc577 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -199,7 +199,7 @@ extern struct kimage *kexec_crash_image; | |||
199 | */ | 199 | */ |
200 | extern struct resource crashk_res; | 200 | extern struct resource crashk_res; |
201 | typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; | 201 | typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4]; |
202 | extern note_buf_t *crash_notes; | 202 | extern note_buf_t __percpu *crash_notes; |
203 | extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; | 203 | extern u32 vmcoreinfo_note[VMCOREINFO_NOTE_SIZE/4]; |
204 | extern size_t vmcoreinfo_size; | 204 | extern size_t vmcoreinfo_size; |
205 | extern size_t vmcoreinfo_max_size; | 205 | extern size_t vmcoreinfo_max_size; |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 1b672f74a32f..e7d1b2e0070d 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -122,6 +122,11 @@ struct kprobe { | |||
122 | /* Kprobe status flags */ | 122 | /* Kprobe status flags */ |
123 | #define KPROBE_FLAG_GONE 1 /* breakpoint has already gone */ | 123 | #define KPROBE_FLAG_GONE 1 /* breakpoint has already gone */ |
124 | #define KPROBE_FLAG_DISABLED 2 /* probe is temporarily disabled */ | 124 | #define KPROBE_FLAG_DISABLED 2 /* probe is temporarily disabled */ |
125 | #define KPROBE_FLAG_OPTIMIZED 4 /* | ||
126 | * probe is really optimized. | ||
127 | * NOTE: | ||
128 | * this flag is only for optimized_kprobe. | ||
129 | */ | ||
125 | 130 | ||
126 | /* Has this kprobe gone ? */ | 131 | /* Has this kprobe gone ? */ |
127 | static inline int kprobe_gone(struct kprobe *p) | 132 | static inline int kprobe_gone(struct kprobe *p) |
@@ -134,6 +139,12 @@ static inline int kprobe_disabled(struct kprobe *p) | |||
134 | { | 139 | { |
135 | return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE); | 140 | return p->flags & (KPROBE_FLAG_DISABLED | KPROBE_FLAG_GONE); |
136 | } | 141 | } |
142 | |||
143 | /* Is this kprobe really running optimized path ? */ | ||
144 | static inline int kprobe_optimized(struct kprobe *p) | ||
145 | { | ||
146 | return p->flags & KPROBE_FLAG_OPTIMIZED; | ||
147 | } | ||
137 | /* | 148 | /* |
138 | * Special probe type that uses setjmp-longjmp type tricks to resume | 149 | * Special probe type that uses setjmp-longjmp type tricks to resume |
139 | * execution at a specified entry with a matching prototype corresponding | 150 | * execution at a specified entry with a matching prototype corresponding |
@@ -249,6 +260,39 @@ extern kprobe_opcode_t *get_insn_slot(void); | |||
249 | extern void free_insn_slot(kprobe_opcode_t *slot, int dirty); | 260 | extern void free_insn_slot(kprobe_opcode_t *slot, int dirty); |
250 | extern void kprobes_inc_nmissed_count(struct kprobe *p); | 261 | extern void kprobes_inc_nmissed_count(struct kprobe *p); |
251 | 262 | ||
263 | #ifdef CONFIG_OPTPROBES | ||
264 | /* | ||
265 | * Internal structure for direct jump optimized probe | ||
266 | */ | ||
267 | struct optimized_kprobe { | ||
268 | struct kprobe kp; | ||
269 | struct list_head list; /* list for optimizing queue */ | ||
270 | struct arch_optimized_insn optinsn; | ||
271 | }; | ||
272 | |||
273 | /* Architecture dependent functions for direct jump optimization */ | ||
274 | extern int arch_prepared_optinsn(struct arch_optimized_insn *optinsn); | ||
275 | extern int arch_check_optimized_kprobe(struct optimized_kprobe *op); | ||
276 | extern int arch_prepare_optimized_kprobe(struct optimized_kprobe *op); | ||
277 | extern void arch_remove_optimized_kprobe(struct optimized_kprobe *op); | ||
278 | extern int arch_optimize_kprobe(struct optimized_kprobe *op); | ||
279 | extern void arch_unoptimize_kprobe(struct optimized_kprobe *op); | ||
280 | extern kprobe_opcode_t *get_optinsn_slot(void); | ||
281 | extern void free_optinsn_slot(kprobe_opcode_t *slot, int dirty); | ||
282 | extern int arch_within_optimized_kprobe(struct optimized_kprobe *op, | ||
283 | unsigned long addr); | ||
284 | |||
285 | extern void opt_pre_handler(struct kprobe *p, struct pt_regs *regs); | ||
286 | |||
287 | #ifdef CONFIG_SYSCTL | ||
288 | extern int sysctl_kprobes_optimization; | ||
289 | extern int proc_kprobes_optimization_handler(struct ctl_table *table, | ||
290 | int write, void __user *buffer, | ||
291 | size_t *length, loff_t *ppos); | ||
292 | #endif | ||
293 | |||
294 | #endif /* CONFIG_OPTPROBES */ | ||
295 | |||
252 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ | 296 | /* Get the kprobe at this addr (if any) - called with preemption disabled */ |
253 | struct kprobe *get_kprobe(void *addr); | 297 | struct kprobe *get_kprobe(void *addr); |
254 | void kretprobe_hash_lock(struct task_struct *tsk, | 298 | void kretprobe_hash_lock(struct task_struct *tsk, |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index a24de0b1858e..60df9c84ecae 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -103,7 +103,7 @@ struct kvm_userspace_memory_region { | |||
103 | 103 | ||
104 | /* for kvm_memory_region::flags */ | 104 | /* for kvm_memory_region::flags */ |
105 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL | 105 | #define KVM_MEM_LOG_DIRTY_PAGES 1UL |
106 | 106 | #define KVM_MEMSLOT_INVALID (1UL << 1) | |
107 | 107 | ||
108 | /* for KVM_IRQ_LINE */ | 108 | /* for KVM_IRQ_LINE */ |
109 | struct kvm_irq_level { | 109 | struct kvm_irq_level { |
@@ -497,6 +497,11 @@ struct kvm_ioeventfd { | |||
497 | #endif | 497 | #endif |
498 | #define KVM_CAP_S390_PSW 42 | 498 | #define KVM_CAP_S390_PSW 42 |
499 | #define KVM_CAP_PPC_SEGSTATE 43 | 499 | #define KVM_CAP_PPC_SEGSTATE 43 |
500 | #define KVM_CAP_HYPERV 44 | ||
501 | #define KVM_CAP_HYPERV_VAPIC 45 | ||
502 | #define KVM_CAP_HYPERV_SPIN 46 | ||
503 | #define KVM_CAP_PCI_SEGMENT 47 | ||
504 | #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 | ||
500 | 505 | ||
501 | #ifdef KVM_CAP_IRQ_ROUTING | 506 | #ifdef KVM_CAP_IRQ_ROUTING |
502 | 507 | ||
@@ -691,8 +696,9 @@ struct kvm_assigned_pci_dev { | |||
691 | __u32 busnr; | 696 | __u32 busnr; |
692 | __u32 devfn; | 697 | __u32 devfn; |
693 | __u32 flags; | 698 | __u32 flags; |
699 | __u32 segnr; | ||
694 | union { | 700 | union { |
695 | __u32 reserved[12]; | 701 | __u32 reserved[11]; |
696 | }; | 702 | }; |
697 | }; | 703 | }; |
698 | 704 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index bd5a616d9373..a3fd0f91d943 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -38,6 +38,7 @@ | |||
38 | #define KVM_REQ_MMU_SYNC 7 | 38 | #define KVM_REQ_MMU_SYNC 7 |
39 | #define KVM_REQ_KVMCLOCK_UPDATE 8 | 39 | #define KVM_REQ_KVMCLOCK_UPDATE 8 |
40 | #define KVM_REQ_KICK 9 | 40 | #define KVM_REQ_KICK 9 |
41 | #define KVM_REQ_DEACTIVATE_FPU 10 | ||
41 | 42 | ||
42 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 43 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
43 | 44 | ||
@@ -57,20 +58,20 @@ struct kvm_io_bus { | |||
57 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 58 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; |
58 | }; | 59 | }; |
59 | 60 | ||
60 | void kvm_io_bus_init(struct kvm_io_bus *bus); | 61 | enum kvm_bus { |
61 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); | 62 | KVM_MMIO_BUS, |
62 | int kvm_io_bus_write(struct kvm_io_bus *bus, gpa_t addr, int len, | 63 | KVM_PIO_BUS, |
63 | const void *val); | 64 | KVM_NR_BUSES |
64 | int kvm_io_bus_read(struct kvm_io_bus *bus, gpa_t addr, int len, | 65 | }; |
66 | |||
67 | int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, | ||
68 | int len, const void *val); | ||
69 | int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, | ||
65 | void *val); | 70 | void *val); |
66 | int __kvm_io_bus_register_dev(struct kvm_io_bus *bus, | 71 | int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
67 | struct kvm_io_device *dev); | ||
68 | int kvm_io_bus_register_dev(struct kvm *kvm, struct kvm_io_bus *bus, | ||
69 | struct kvm_io_device *dev); | 72 | struct kvm_io_device *dev); |
70 | void __kvm_io_bus_unregister_dev(struct kvm_io_bus *bus, | 73 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
71 | struct kvm_io_device *dev); | 74 | struct kvm_io_device *dev); |
72 | void kvm_io_bus_unregister_dev(struct kvm *kvm, struct kvm_io_bus *bus, | ||
73 | struct kvm_io_device *dev); | ||
74 | 75 | ||
75 | struct kvm_vcpu { | 76 | struct kvm_vcpu { |
76 | struct kvm *kvm; | 77 | struct kvm *kvm; |
@@ -83,6 +84,8 @@ struct kvm_vcpu { | |||
83 | struct kvm_run *run; | 84 | struct kvm_run *run; |
84 | unsigned long requests; | 85 | unsigned long requests; |
85 | unsigned long guest_debug; | 86 | unsigned long guest_debug; |
87 | int srcu_idx; | ||
88 | |||
86 | int fpu_active; | 89 | int fpu_active; |
87 | int guest_fpu_loaded; | 90 | int guest_fpu_loaded; |
88 | wait_queue_head_t wq; | 91 | wait_queue_head_t wq; |
@@ -150,14 +153,19 @@ struct kvm_irq_routing_table {}; | |||
150 | 153 | ||
151 | #endif | 154 | #endif |
152 | 155 | ||
153 | struct kvm { | 156 | struct kvm_memslots { |
154 | spinlock_t mmu_lock; | ||
155 | spinlock_t requests_lock; | ||
156 | struct rw_semaphore slots_lock; | ||
157 | struct mm_struct *mm; /* userspace tied to this vm */ | ||
158 | int nmemslots; | 157 | int nmemslots; |
159 | struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + | 158 | struct kvm_memory_slot memslots[KVM_MEMORY_SLOTS + |
160 | KVM_PRIVATE_MEM_SLOTS]; | 159 | KVM_PRIVATE_MEM_SLOTS]; |
160 | }; | ||
161 | |||
162 | struct kvm { | ||
163 | spinlock_t mmu_lock; | ||
164 | raw_spinlock_t requests_lock; | ||
165 | struct mutex slots_lock; | ||
166 | struct mm_struct *mm; /* userspace tied to this vm */ | ||
167 | struct kvm_memslots *memslots; | ||
168 | struct srcu_struct srcu; | ||
161 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE | 169 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE |
162 | u32 bsp_vcpu_id; | 170 | u32 bsp_vcpu_id; |
163 | struct kvm_vcpu *bsp_vcpu; | 171 | struct kvm_vcpu *bsp_vcpu; |
@@ -166,8 +174,7 @@ struct kvm { | |||
166 | atomic_t online_vcpus; | 174 | atomic_t online_vcpus; |
167 | struct list_head vm_list; | 175 | struct list_head vm_list; |
168 | struct mutex lock; | 176 | struct mutex lock; |
169 | struct kvm_io_bus mmio_bus; | 177 | struct kvm_io_bus *buses[KVM_NR_BUSES]; |
170 | struct kvm_io_bus pio_bus; | ||
171 | #ifdef CONFIG_HAVE_KVM_EVENTFD | 178 | #ifdef CONFIG_HAVE_KVM_EVENTFD |
172 | struct { | 179 | struct { |
173 | spinlock_t lock; | 180 | spinlock_t lock; |
@@ -249,13 +256,20 @@ int kvm_set_memory_region(struct kvm *kvm, | |||
249 | int __kvm_set_memory_region(struct kvm *kvm, | 256 | int __kvm_set_memory_region(struct kvm *kvm, |
250 | struct kvm_userspace_memory_region *mem, | 257 | struct kvm_userspace_memory_region *mem, |
251 | int user_alloc); | 258 | int user_alloc); |
252 | int kvm_arch_set_memory_region(struct kvm *kvm, | 259 | int kvm_arch_prepare_memory_region(struct kvm *kvm, |
260 | struct kvm_memory_slot *memslot, | ||
261 | struct kvm_memory_slot old, | ||
262 | struct kvm_userspace_memory_region *mem, | ||
263 | int user_alloc); | ||
264 | void kvm_arch_commit_memory_region(struct kvm *kvm, | ||
253 | struct kvm_userspace_memory_region *mem, | 265 | struct kvm_userspace_memory_region *mem, |
254 | struct kvm_memory_slot old, | 266 | struct kvm_memory_slot old, |
255 | int user_alloc); | 267 | int user_alloc); |
256 | void kvm_disable_largepages(void); | 268 | void kvm_disable_largepages(void); |
257 | void kvm_arch_flush_shadow(struct kvm *kvm); | 269 | void kvm_arch_flush_shadow(struct kvm *kvm); |
258 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); | 270 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); |
271 | gfn_t unalias_gfn_instantiation(struct kvm *kvm, gfn_t gfn); | ||
272 | |||
259 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); | 273 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); |
260 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); | 274 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); |
261 | void kvm_release_page_clean(struct page *page); | 275 | void kvm_release_page_clean(struct page *page); |
@@ -264,6 +278,9 @@ void kvm_set_page_dirty(struct page *page); | |||
264 | void kvm_set_page_accessed(struct page *page); | 278 | void kvm_set_page_accessed(struct page *page); |
265 | 279 | ||
266 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); | 280 | pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn); |
281 | pfn_t gfn_to_pfn_memslot(struct kvm *kvm, | ||
282 | struct kvm_memory_slot *slot, gfn_t gfn); | ||
283 | int memslot_id(struct kvm *kvm, gfn_t gfn); | ||
267 | void kvm_release_pfn_dirty(pfn_t); | 284 | void kvm_release_pfn_dirty(pfn_t); |
268 | void kvm_release_pfn_clean(pfn_t pfn); | 285 | void kvm_release_pfn_clean(pfn_t pfn); |
269 | void kvm_set_pfn_dirty(pfn_t pfn); | 286 | void kvm_set_pfn_dirty(pfn_t pfn); |
@@ -283,6 +300,7 @@ int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len); | |||
283 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); | 300 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); |
284 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); | 301 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); |
285 | int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn); | 302 | int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn); |
303 | unsigned long kvm_host_page_size(struct kvm *kvm, gfn_t gfn); | ||
286 | void mark_page_dirty(struct kvm *kvm, gfn_t gfn); | 304 | void mark_page_dirty(struct kvm *kvm, gfn_t gfn); |
287 | 305 | ||
288 | void kvm_vcpu_block(struct kvm_vcpu *vcpu); | 306 | void kvm_vcpu_block(struct kvm_vcpu *vcpu); |
@@ -383,6 +401,7 @@ struct kvm_assigned_dev_kernel { | |||
383 | struct work_struct interrupt_work; | 401 | struct work_struct interrupt_work; |
384 | struct list_head list; | 402 | struct list_head list; |
385 | int assigned_dev_id; | 403 | int assigned_dev_id; |
404 | int host_segnr; | ||
386 | int host_busnr; | 405 | int host_busnr; |
387 | int host_devfn; | 406 | int host_devfn; |
388 | unsigned int entries_nr; | 407 | unsigned int entries_nr; |
@@ -429,8 +448,7 @@ void kvm_free_irq_source_id(struct kvm *kvm, int irq_source_id); | |||
429 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 | 448 | #define KVM_IOMMU_CACHE_COHERENCY 0x1 |
430 | 449 | ||
431 | #ifdef CONFIG_IOMMU_API | 450 | #ifdef CONFIG_IOMMU_API |
432 | int kvm_iommu_map_pages(struct kvm *kvm, gfn_t base_gfn, | 451 | int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot); |
433 | unsigned long npages); | ||
434 | int kvm_iommu_map_guest(struct kvm *kvm); | 452 | int kvm_iommu_map_guest(struct kvm *kvm); |
435 | int kvm_iommu_unmap_guest(struct kvm *kvm); | 453 | int kvm_iommu_unmap_guest(struct kvm *kvm); |
436 | int kvm_assign_device(struct kvm *kvm, | 454 | int kvm_assign_device(struct kvm *kvm, |
@@ -480,11 +498,6 @@ static inline void kvm_guest_exit(void) | |||
480 | current->flags &= ~PF_VCPU; | 498 | current->flags &= ~PF_VCPU; |
481 | } | 499 | } |
482 | 500 | ||
483 | static inline int memslot_id(struct kvm *kvm, struct kvm_memory_slot *slot) | ||
484 | { | ||
485 | return slot - kvm->memslots; | ||
486 | } | ||
487 | |||
488 | static inline gpa_t gfn_to_gpa(gfn_t gfn) | 501 | static inline gpa_t gfn_to_gpa(gfn_t gfn) |
489 | { | 502 | { |
490 | return (gpa_t)gfn << PAGE_SHIFT; | 503 | return (gpa_t)gfn << PAGE_SHIFT; |
@@ -532,6 +545,10 @@ static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_se | |||
532 | } | 545 | } |
533 | #endif | 546 | #endif |
534 | 547 | ||
548 | #ifndef KVM_ARCH_HAS_UNALIAS_INSTANTIATION | ||
549 | #define unalias_gfn_instantiation unalias_gfn | ||
550 | #endif | ||
551 | |||
535 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 552 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
536 | 553 | ||
537 | #define KVM_MAX_IRQ_ROUTES 1024 | 554 | #define KVM_MAX_IRQ_ROUTES 1024 |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 76285e01b39e..eb9800f05782 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -52,7 +52,6 @@ | |||
52 | #define CGROUP_SUPER_MAGIC 0x27e0eb | 52 | #define CGROUP_SUPER_MAGIC 0x27e0eb |
53 | 53 | ||
54 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA | 54 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA |
55 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA | ||
56 | 55 | ||
57 | #define STACK_END_MAGIC 0x57AC6E9D | 56 | #define STACK_END_MAGIC 0x57AC6E9D |
58 | 57 | ||
diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h index 35680409b8cf..94cb51a64037 100644 --- a/include/linux/mfd/mc13783.h +++ b/include/linux/mfd/mc13783.h | |||
@@ -108,6 +108,8 @@ int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode, | |||
108 | #define MC13783_REGU_V2 28 | 108 | #define MC13783_REGU_V2 28 |
109 | #define MC13783_REGU_V3 29 | 109 | #define MC13783_REGU_V3 29 |
110 | #define MC13783_REGU_V4 30 | 110 | #define MC13783_REGU_V4 30 |
111 | #define MC13783_REGU_PWGT1SPI 31 | ||
112 | #define MC13783_REGU_PWGT2SPI 32 | ||
111 | 113 | ||
112 | #define MC13783_IRQ_ADCDONE 0 | 114 | #define MC13783_IRQ_ADCDONE 0 |
113 | #define MC13783_IRQ_ADCBISDONE 1 | 115 | #define MC13783_IRQ_ADCBISDONE 1 |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8b2fa8593c61..90957f14195c 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/prio_tree.h> | 12 | #include <linux/prio_tree.h> |
13 | #include <linux/debug_locks.h> | 13 | #include <linux/debug_locks.h> |
14 | #include <linux/mm_types.h> | 14 | #include <linux/mm_types.h> |
15 | #include <linux/range.h> | ||
15 | 16 | ||
16 | struct mempolicy; | 17 | struct mempolicy; |
17 | struct anon_vma; | 18 | struct anon_vma; |
@@ -1049,6 +1050,10 @@ extern void get_pfn_range_for_nid(unsigned int nid, | |||
1049 | extern unsigned long find_min_pfn_with_active_regions(void); | 1050 | extern unsigned long find_min_pfn_with_active_regions(void); |
1050 | extern void free_bootmem_with_active_regions(int nid, | 1051 | extern void free_bootmem_with_active_regions(int nid, |
1051 | unsigned long max_low_pfn); | 1052 | unsigned long max_low_pfn); |
1053 | int add_from_early_node_map(struct range *range, int az, | ||
1054 | int nr_range, int nid); | ||
1055 | void *__alloc_memory_core_early(int nodeid, u64 size, u64 align, | ||
1056 | u64 goal, u64 limit); | ||
1052 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1057 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
1053 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); | 1058 | extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); |
1054 | extern void sparse_memory_present_with_active_regions(int nid); | 1059 | extern void sparse_memory_present_with_active_regions(int nid); |
@@ -1081,11 +1086,7 @@ extern void si_meminfo(struct sysinfo * val); | |||
1081 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 1086 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
1082 | extern int after_bootmem; | 1087 | extern int after_bootmem; |
1083 | 1088 | ||
1084 | #ifdef CONFIG_NUMA | ||
1085 | extern void setup_per_cpu_pageset(void); | 1089 | extern void setup_per_cpu_pageset(void); |
1086 | #else | ||
1087 | static inline void setup_per_cpu_pageset(void) {} | ||
1088 | #endif | ||
1089 | 1090 | ||
1090 | extern void zone_pcp_update(struct zone *zone); | 1091 | extern void zone_pcp_update(struct zone *zone); |
1091 | 1092 | ||
@@ -1321,12 +1322,19 @@ extern int randomize_va_space; | |||
1321 | const char * arch_vma_name(struct vm_area_struct *vma); | 1322 | const char * arch_vma_name(struct vm_area_struct *vma); |
1322 | void print_vma_addr(char *prefix, unsigned long rip); | 1323 | void print_vma_addr(char *prefix, unsigned long rip); |
1323 | 1324 | ||
1325 | void sparse_mem_maps_populate_node(struct page **map_map, | ||
1326 | unsigned long pnum_begin, | ||
1327 | unsigned long pnum_end, | ||
1328 | unsigned long map_count, | ||
1329 | int nodeid); | ||
1330 | |||
1324 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid); | 1331 | struct page *sparse_mem_map_populate(unsigned long pnum, int nid); |
1325 | pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); | 1332 | pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); |
1326 | pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); | 1333 | pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); |
1327 | pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); | 1334 | pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); |
1328 | pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); | 1335 | pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); |
1329 | void *vmemmap_alloc_block(unsigned long size, int node); | 1336 | void *vmemmap_alloc_block(unsigned long size, int node); |
1337 | void *vmemmap_alloc_block_buf(unsigned long size, int node); | ||
1330 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); | 1338 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); |
1331 | int vmemmap_populate_basepages(struct page *start_page, | 1339 | int vmemmap_populate_basepages(struct page *start_page, |
1332 | unsigned long pages, int node); | 1340 | unsigned long pages, int node); |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 30fe668c2542..a01a103341bd 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -184,13 +184,7 @@ struct per_cpu_pageset { | |||
184 | s8 stat_threshold; | 184 | s8 stat_threshold; |
185 | s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; | 185 | s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; |
186 | #endif | 186 | #endif |
187 | } ____cacheline_aligned_in_smp; | 187 | }; |
188 | |||
189 | #ifdef CONFIG_NUMA | ||
190 | #define zone_pcp(__z, __cpu) ((__z)->pageset[(__cpu)]) | ||
191 | #else | ||
192 | #define zone_pcp(__z, __cpu) (&(__z)->pageset[(__cpu)]) | ||
193 | #endif | ||
194 | 188 | ||
195 | #endif /* !__GENERATING_BOUNDS.H */ | 189 | #endif /* !__GENERATING_BOUNDS.H */ |
196 | 190 | ||
@@ -306,10 +300,8 @@ struct zone { | |||
306 | */ | 300 | */ |
307 | unsigned long min_unmapped_pages; | 301 | unsigned long min_unmapped_pages; |
308 | unsigned long min_slab_pages; | 302 | unsigned long min_slab_pages; |
309 | struct per_cpu_pageset *pageset[NR_CPUS]; | ||
310 | #else | ||
311 | struct per_cpu_pageset pageset[NR_CPUS]; | ||
312 | #endif | 303 | #endif |
304 | struct per_cpu_pageset __percpu *pageset; | ||
313 | /* | 305 | /* |
314 | * free areas of different sizes | 306 | * free areas of different sizes |
315 | */ | 307 | */ |
@@ -620,7 +612,9 @@ typedef struct pglist_data { | |||
620 | struct page_cgroup *node_page_cgroup; | 612 | struct page_cgroup *node_page_cgroup; |
621 | #endif | 613 | #endif |
622 | #endif | 614 | #endif |
615 | #ifndef CONFIG_NO_BOOTMEM | ||
623 | struct bootmem_data *bdata; | 616 | struct bootmem_data *bdata; |
617 | #endif | ||
624 | #ifdef CONFIG_MEMORY_HOTPLUG | 618 | #ifdef CONFIG_MEMORY_HOTPLUG |
625 | /* | 619 | /* |
626 | * Must be held any time you expect node_start_pfn, node_present_pages | 620 | * Must be held any time you expect node_start_pfn, node_present_pages |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index d74785c2393a..0b89efc6f215 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -35,6 +35,7 @@ static inline void get_mnt_ns(struct mnt_namespace *ns) | |||
35 | extern const struct seq_operations mounts_op; | 35 | extern const struct seq_operations mounts_op; |
36 | extern const struct seq_operations mountinfo_op; | 36 | extern const struct seq_operations mountinfo_op; |
37 | extern const struct seq_operations mountstats_op; | 37 | extern const struct seq_operations mountstats_op; |
38 | extern int mnt_had_events(struct proc_mounts *); | ||
38 | 39 | ||
39 | #endif | 40 | #endif |
40 | #endif | 41 | #endif |
diff --git a/include/linux/module.h b/include/linux/module.h index 6cb1a3cab5d3..dd618eb026aa 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
18 | #include <linux/tracepoint.h> | 18 | #include <linux/tracepoint.h> |
19 | 19 | ||
20 | #include <asm/local.h> | 20 | #include <linux/percpu.h> |
21 | #include <asm/module.h> | 21 | #include <asm/module.h> |
22 | 22 | ||
23 | #include <trace/events/module.h> | 23 | #include <trace/events/module.h> |
@@ -363,11 +363,9 @@ struct module | |||
363 | /* Destruction function. */ | 363 | /* Destruction function. */ |
364 | void (*exit)(void); | 364 | void (*exit)(void); |
365 | 365 | ||
366 | #ifdef CONFIG_SMP | 366 | struct module_ref { |
367 | char *refptr; | 367 | int count; |
368 | #else | 368 | } __percpu *refptr; |
369 | local_t ref; | ||
370 | #endif | ||
371 | #endif | 369 | #endif |
372 | 370 | ||
373 | #ifdef CONFIG_CONSTRUCTORS | 371 | #ifdef CONFIG_CONSTRUCTORS |
@@ -454,25 +452,16 @@ void __symbol_put(const char *symbol); | |||
454 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) | 452 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) |
455 | void symbol_put_addr(void *addr); | 453 | void symbol_put_addr(void *addr); |
456 | 454 | ||
457 | static inline local_t *__module_ref_addr(struct module *mod, int cpu) | ||
458 | { | ||
459 | #ifdef CONFIG_SMP | ||
460 | return (local_t *) (mod->refptr + per_cpu_offset(cpu)); | ||
461 | #else | ||
462 | return &mod->ref; | ||
463 | #endif | ||
464 | } | ||
465 | |||
466 | /* Sometimes we know we already have a refcount, and it's easier not | 455 | /* Sometimes we know we already have a refcount, and it's easier not |
467 | to handle the error case (which only happens with rmmod --wait). */ | 456 | to handle the error case (which only happens with rmmod --wait). */ |
468 | static inline void __module_get(struct module *module) | 457 | static inline void __module_get(struct module *module) |
469 | { | 458 | { |
470 | if (module) { | 459 | if (module) { |
471 | unsigned int cpu = get_cpu(); | 460 | preempt_disable(); |
472 | local_inc(__module_ref_addr(module, cpu)); | 461 | __this_cpu_inc(module->refptr->count); |
473 | trace_module_get(module, _THIS_IP_, | 462 | trace_module_get(module, _THIS_IP_, |
474 | local_read(__module_ref_addr(module, cpu))); | 463 | __this_cpu_read(module->refptr->count)); |
475 | put_cpu(); | 464 | preempt_enable(); |
476 | } | 465 | } |
477 | } | 466 | } |
478 | 467 | ||
@@ -481,15 +470,17 @@ static inline int try_module_get(struct module *module) | |||
481 | int ret = 1; | 470 | int ret = 1; |
482 | 471 | ||
483 | if (module) { | 472 | if (module) { |
484 | unsigned int cpu = get_cpu(); | 473 | preempt_disable(); |
474 | |||
485 | if (likely(module_is_live(module))) { | 475 | if (likely(module_is_live(module))) { |
486 | local_inc(__module_ref_addr(module, cpu)); | 476 | __this_cpu_inc(module->refptr->count); |
487 | trace_module_get(module, _THIS_IP_, | 477 | trace_module_get(module, _THIS_IP_, |
488 | local_read(__module_ref_addr(module, cpu))); | 478 | __this_cpu_read(module->refptr->count)); |
489 | } | 479 | } |
490 | else | 480 | else |
491 | ret = 0; | 481 | ret = 0; |
492 | put_cpu(); | 482 | |
483 | preempt_enable(); | ||
493 | } | 484 | } |
494 | return ret; | 485 | return ret; |
495 | } | 486 | } |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 5d5275364867..4bd05474d11d 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -34,7 +34,18 @@ struct mnt_namespace; | |||
34 | 34 | ||
35 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ | 35 | #define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ |
36 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ | 36 | #define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ |
37 | #define MNT_PNODE_MASK 0x3000 /* propagation flag mask */ | 37 | /* |
38 | * MNT_SHARED_MASK is the set of flags that should be cleared when a | ||
39 | * mount becomes shared. Currently, this is only the flag that says a | ||
40 | * mount cannot be bind mounted, since this is how we create a mount | ||
41 | * that shares events with another mount. If you add a new MNT_* | ||
42 | * flag, consider how it interacts with shared mounts. | ||
43 | */ | ||
44 | #define MNT_SHARED_MASK (MNT_UNBINDABLE) | ||
45 | #define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) | ||
46 | |||
47 | |||
48 | #define MNT_INTERNAL 0x4000 | ||
38 | 49 | ||
39 | struct vfsmount { | 50 | struct vfsmount { |
40 | struct list_head mnt_hash; | 51 | struct list_head mnt_hash; |
@@ -66,7 +77,7 @@ struct vfsmount { | |||
66 | int mnt_pinned; | 77 | int mnt_pinned; |
67 | int mnt_ghosts; | 78 | int mnt_ghosts; |
68 | #ifdef CONFIG_SMP | 79 | #ifdef CONFIG_SMP |
69 | int *mnt_writers; | 80 | int __percpu *mnt_writers; |
70 | #else | 81 | #else |
71 | int mnt_writers; | 82 | int mnt_writers; |
72 | #endif | 83 | #endif |
@@ -123,7 +134,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct path *path, | |||
123 | 134 | ||
124 | extern void mark_mounts_for_expiry(struct list_head *mounts); | 135 | extern void mark_mounts_for_expiry(struct list_head *mounts); |
125 | 136 | ||
126 | extern spinlock_t vfsmount_lock; | ||
127 | extern dev_t name_to_dev_t(char *name); | 137 | extern dev_t name_to_dev_t(char *name); |
128 | 138 | ||
129 | #endif /* _LINUX_MOUNT_H */ | 139 | #endif /* _LINUX_MOUNT_H */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 34fc6be5bfcf..6a2e44fd75e2 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -105,7 +105,7 @@ struct nfs_server { | |||
105 | struct rpc_clnt * client; /* RPC client handle */ | 105 | struct rpc_clnt * client; /* RPC client handle */ |
106 | struct rpc_clnt * client_acl; /* ACL RPC client handle */ | 106 | struct rpc_clnt * client_acl; /* ACL RPC client handle */ |
107 | struct nlm_host *nlm_host; /* NLM client handle */ | 107 | struct nlm_host *nlm_host; /* NLM client handle */ |
108 | struct nfs_iostats * io_stats; /* I/O statistics */ | 108 | struct nfs_iostats __percpu *io_stats; /* I/O statistics */ |
109 | struct backing_dev_info backing_dev_info; | 109 | struct backing_dev_info backing_dev_info; |
110 | atomic_long_t writeback; /* number of writeback pages */ | 110 | atomic_long_t writeback; /* number of writeback pages */ |
111 | int flags; /* various flags */ | 111 | int flags; /* various flags */ |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 3fe02cf8b65a..640702e97457 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -153,6 +153,7 @@ struct nilfs_super_root { | |||
153 | semantics also for data */ | 153 | semantics also for data */ |
154 | #define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during | 154 | #define NILFS_MOUNT_NORECOVERY 0x4000 /* Disable write access during |
155 | mount-time recovery */ | 155 | mount-time recovery */ |
156 | #define NILFS_MOUNT_DISCARD 0x8000 /* Issue DISCARD requests */ | ||
156 | 157 | ||
157 | 158 | ||
158 | /** | 159 | /** |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 0be824320580..9f688d243b86 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -770,7 +770,6 @@ | |||
770 | #define PCI_VENDOR_ID_TI 0x104c | 770 | #define PCI_VENDOR_ID_TI 0x104c |
771 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 771 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
772 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 772 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
773 | #define PCI_DEVICE_ID_TI_TSB43AB22 0x8023 | ||
774 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | 773 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 |
775 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 | 774 | #define PCI_DEVICE_ID_TI_XX21_XX11_FM 0x8033 |
776 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 | 775 | #define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034 |
@@ -2333,6 +2332,8 @@ | |||
2333 | #define PCI_VENDOR_ID_KORENIX 0x1982 | 2332 | #define PCI_VENDOR_ID_KORENIX 0x1982 |
2334 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2333 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
2335 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff | 2334 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff |
2335 | #define PCI_DEVICE_ID_KORENIX_JETCARDF2 0x1700 | ||
2336 | #define PCI_DEVICE_ID_KORENIX_JETCARDF3 0x17ff | ||
2336 | 2337 | ||
2337 | #define PCI_VENDOR_ID_QMI 0x1a32 | 2338 | #define PCI_VENDOR_ID_QMI 0x1a32 |
2338 | 2339 | ||
@@ -2697,6 +2698,7 @@ | |||
2697 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 | 2698 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 |
2698 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2699 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2699 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2700 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2701 | #define PCI_DEVICE_ID_NETMOS_9865 0x9865 | ||
2700 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 | 2702 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 |
2701 | 2703 | ||
2702 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2704 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 5a5d6ce4bd55..68567c0b3a5d 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -2,12 +2,6 @@ | |||
2 | #define _LINUX_PERCPU_DEFS_H | 2 | #define _LINUX_PERCPU_DEFS_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Determine the real variable name from the name visible in the | ||
6 | * kernel sources. | ||
7 | */ | ||
8 | #define per_cpu_var(var) per_cpu__##var | ||
9 | |||
10 | /* | ||
11 | * Base implementations of per-CPU variable declarations and definitions, where | 5 | * Base implementations of per-CPU variable declarations and definitions, where |
12 | * the section in which the variable is to be placed is provided by the | 6 | * the section in which the variable is to be placed is provided by the |
13 | * 'sec' argument. This may be used to affect the parameters governing the | 7 | * 'sec' argument. This may be used to affect the parameters governing the |
@@ -18,13 +12,23 @@ | |||
18 | * that section. | 12 | * that section. |
19 | */ | 13 | */ |
20 | #define __PCPU_ATTRS(sec) \ | 14 | #define __PCPU_ATTRS(sec) \ |
21 | __attribute__((section(PER_CPU_BASE_SECTION sec))) \ | 15 | __percpu __attribute__((section(PER_CPU_BASE_SECTION sec))) \ |
22 | PER_CPU_ATTRIBUTES | 16 | PER_CPU_ATTRIBUTES |
23 | 17 | ||
24 | #define __PCPU_DUMMY_ATTRS \ | 18 | #define __PCPU_DUMMY_ATTRS \ |
25 | __attribute__((section(".discard"), unused)) | 19 | __attribute__((section(".discard"), unused)) |
26 | 20 | ||
27 | /* | 21 | /* |
22 | * Macro which verifies @ptr is a percpu pointer without evaluating | ||
23 | * @ptr. This is to be used in percpu accessors to verify that the | ||
24 | * input parameter is a percpu pointer. | ||
25 | */ | ||
26 | #define __verify_pcpu_ptr(ptr) do { \ | ||
27 | const void __percpu *__vpp_verify = (typeof(ptr))NULL; \ | ||
28 | (void)__vpp_verify; \ | ||
29 | } while (0) | ||
30 | |||
31 | /* | ||
28 | * s390 and alpha modules require percpu variables to be defined as | 32 | * s390 and alpha modules require percpu variables to be defined as |
29 | * weak to force the compiler to generate GOT based external | 33 | * weak to force the compiler to generate GOT based external |
30 | * references for them. This is necessary because percpu sections | 34 | * references for them. This is necessary because percpu sections |
@@ -56,24 +60,24 @@ | |||
56 | */ | 60 | */ |
57 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ | 61 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ |
58 | extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ | 62 | extern __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ |
59 | extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name | 63 | extern __PCPU_ATTRS(sec) __typeof__(type) name |
60 | 64 | ||
61 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ | 65 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ |
62 | __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ | 66 | __PCPU_DUMMY_ATTRS char __pcpu_scope_##name; \ |
63 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | 67 | extern __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ |
64 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ | 68 | __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ |
65 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ | 69 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES __weak \ |
66 | __typeof__(type) per_cpu__##name | 70 | __typeof__(type) name |
67 | #else | 71 | #else |
68 | /* | 72 | /* |
69 | * Normal declaration and definition macros. | 73 | * Normal declaration and definition macros. |
70 | */ | 74 | */ |
71 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ | 75 | #define DECLARE_PER_CPU_SECTION(type, name, sec) \ |
72 | extern __PCPU_ATTRS(sec) __typeof__(type) per_cpu__##name | 76 | extern __PCPU_ATTRS(sec) __typeof__(type) name |
73 | 77 | ||
74 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ | 78 | #define DEFINE_PER_CPU_SECTION(type, name, sec) \ |
75 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \ | 79 | __PCPU_ATTRS(sec) PER_CPU_DEF_ATTRIBUTES \ |
76 | __typeof__(type) per_cpu__##name | 80 | __typeof__(type) name |
77 | #endif | 81 | #endif |
78 | 82 | ||
79 | /* | 83 | /* |
@@ -135,10 +139,16 @@ | |||
135 | __aligned(PAGE_SIZE) | 139 | __aligned(PAGE_SIZE) |
136 | 140 | ||
137 | /* | 141 | /* |
138 | * Intermodule exports for per-CPU variables. | 142 | * Intermodule exports for per-CPU variables. sparse forgets about |
143 | * address space across EXPORT_SYMBOL(), change EXPORT_SYMBOL() to | ||
144 | * noop if __CHECKER__. | ||
139 | */ | 145 | */ |
140 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | 146 | #ifndef __CHECKER__ |
141 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | 147 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(var) |
142 | 148 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(var) | |
149 | #else | ||
150 | #define EXPORT_PER_CPU_SYMBOL(var) | ||
151 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) | ||
152 | #endif | ||
143 | 153 | ||
144 | #endif /* _LINUX_PERCPU_DEFS_H */ | 154 | #endif /* _LINUX_PERCPU_DEFS_H */ |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index cf5efbcf716c..a93e5bfdccb8 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -27,10 +27,17 @@ | |||
27 | * we force a syntax error here if it isn't. | 27 | * we force a syntax error here if it isn't. |
28 | */ | 28 | */ |
29 | #define get_cpu_var(var) (*({ \ | 29 | #define get_cpu_var(var) (*({ \ |
30 | extern int simple_identifier_##var(void); \ | ||
31 | preempt_disable(); \ | 30 | preempt_disable(); \ |
32 | &__get_cpu_var(var); })) | 31 | &__get_cpu_var(var); })) |
33 | #define put_cpu_var(var) preempt_enable() | 32 | |
33 | /* | ||
34 | * The weird & is necessary because sparse considers (void)(var) to be | ||
35 | * a direct dereference of percpu variable (var). | ||
36 | */ | ||
37 | #define put_cpu_var(var) do { \ | ||
38 | (void)&(var); \ | ||
39 | preempt_enable(); \ | ||
40 | } while (0) | ||
34 | 41 | ||
35 | #ifdef CONFIG_SMP | 42 | #ifdef CONFIG_SMP |
36 | 43 | ||
@@ -127,9 +134,9 @@ extern int __init pcpu_page_first_chunk(size_t reserved_size, | |||
127 | */ | 134 | */ |
128 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | 135 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) |
129 | 136 | ||
130 | extern void *__alloc_reserved_percpu(size_t size, size_t align); | 137 | extern void __percpu *__alloc_reserved_percpu(size_t size, size_t align); |
131 | extern void *__alloc_percpu(size_t size, size_t align); | 138 | extern void __percpu *__alloc_percpu(size_t size, size_t align); |
132 | extern void free_percpu(void *__pdata); | 139 | extern void free_percpu(void __percpu *__pdata); |
133 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); | 140 | extern phys_addr_t per_cpu_ptr_to_phys(void *addr); |
134 | 141 | ||
135 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA | 142 | #ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA |
@@ -140,7 +147,7 @@ extern void __init setup_per_cpu_areas(void); | |||
140 | 147 | ||
141 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
142 | 149 | ||
143 | static inline void *__alloc_percpu(size_t size, size_t align) | 150 | static inline void __percpu *__alloc_percpu(size_t size, size_t align) |
144 | { | 151 | { |
145 | /* | 152 | /* |
146 | * Can't easily make larger alignment work with kmalloc. WARN | 153 | * Can't easily make larger alignment work with kmalloc. WARN |
@@ -151,7 +158,7 @@ static inline void *__alloc_percpu(size_t size, size_t align) | |||
151 | return kzalloc(size, GFP_KERNEL); | 158 | return kzalloc(size, GFP_KERNEL); |
152 | } | 159 | } |
153 | 160 | ||
154 | static inline void free_percpu(void *p) | 161 | static inline void free_percpu(void __percpu *p) |
155 | { | 162 | { |
156 | kfree(p); | 163 | kfree(p); |
157 | } | 164 | } |
@@ -171,7 +178,7 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
171 | #endif /* CONFIG_SMP */ | 178 | #endif /* CONFIG_SMP */ |
172 | 179 | ||
173 | #define alloc_percpu(type) \ | 180 | #define alloc_percpu(type) \ |
174 | (typeof(type) *)__alloc_percpu(sizeof(type), __alignof__(type)) | 181 | (typeof(type) __percpu *)__alloc_percpu(sizeof(type), __alignof__(type)) |
175 | 182 | ||
176 | /* | 183 | /* |
177 | * Optional methods for optimized non-lvalue per-cpu variable access. | 184 | * Optional methods for optimized non-lvalue per-cpu variable access. |
@@ -188,17 +195,19 @@ static inline void *pcpu_lpage_remapped(void *kaddr) | |||
188 | #ifndef percpu_read | 195 | #ifndef percpu_read |
189 | # define percpu_read(var) \ | 196 | # define percpu_read(var) \ |
190 | ({ \ | 197 | ({ \ |
191 | typeof(per_cpu_var(var)) __tmp_var__; \ | 198 | typeof(var) *pr_ptr__ = &(var); \ |
192 | __tmp_var__ = get_cpu_var(var); \ | 199 | typeof(var) pr_ret__; \ |
193 | put_cpu_var(var); \ | 200 | pr_ret__ = get_cpu_var(*pr_ptr__); \ |
194 | __tmp_var__; \ | 201 | put_cpu_var(*pr_ptr__); \ |
202 | pr_ret__; \ | ||
195 | }) | 203 | }) |
196 | #endif | 204 | #endif |
197 | 205 | ||
198 | #define __percpu_generic_to_op(var, val, op) \ | 206 | #define __percpu_generic_to_op(var, val, op) \ |
199 | do { \ | 207 | do { \ |
200 | get_cpu_var(var) op val; \ | 208 | typeof(var) *pgto_ptr__ = &(var); \ |
201 | put_cpu_var(var); \ | 209 | get_cpu_var(*pgto_ptr__) op val; \ |
210 | put_cpu_var(*pgto_ptr__); \ | ||
202 | } while (0) | 211 | } while (0) |
203 | 212 | ||
204 | #ifndef percpu_write | 213 | #ifndef percpu_write |
@@ -234,6 +243,7 @@ extern void __bad_size_call_parameter(void); | |||
234 | 243 | ||
235 | #define __pcpu_size_call_return(stem, variable) \ | 244 | #define __pcpu_size_call_return(stem, variable) \ |
236 | ({ typeof(variable) pscr_ret__; \ | 245 | ({ typeof(variable) pscr_ret__; \ |
246 | __verify_pcpu_ptr(&(variable)); \ | ||
237 | switch(sizeof(variable)) { \ | 247 | switch(sizeof(variable)) { \ |
238 | case 1: pscr_ret__ = stem##1(variable);break; \ | 248 | case 1: pscr_ret__ = stem##1(variable);break; \ |
239 | case 2: pscr_ret__ = stem##2(variable);break; \ | 249 | case 2: pscr_ret__ = stem##2(variable);break; \ |
@@ -247,6 +257,7 @@ extern void __bad_size_call_parameter(void); | |||
247 | 257 | ||
248 | #define __pcpu_size_call(stem, variable, ...) \ | 258 | #define __pcpu_size_call(stem, variable, ...) \ |
249 | do { \ | 259 | do { \ |
260 | __verify_pcpu_ptr(&(variable)); \ | ||
250 | switch(sizeof(variable)) { \ | 261 | switch(sizeof(variable)) { \ |
251 | case 1: stem##1(variable, __VA_ARGS__);break; \ | 262 | case 1: stem##1(variable, __VA_ARGS__);break; \ |
252 | case 2: stem##2(variable, __VA_ARGS__);break; \ | 263 | case 2: stem##2(variable, __VA_ARGS__);break; \ |
@@ -259,8 +270,7 @@ do { \ | |||
259 | 270 | ||
260 | /* | 271 | /* |
261 | * Optimized manipulation for memory allocated through the per cpu | 272 | * Optimized manipulation for memory allocated through the per cpu |
262 | * allocator or for addresses of per cpu variables (can be determined | 273 | * allocator or for addresses of per cpu variables. |
263 | * using per_cpu_var(xx). | ||
264 | * | 274 | * |
265 | * These operation guarantee exclusivity of access for other operations | 275 | * These operation guarantee exclusivity of access for other operations |
266 | * on the *same* processor. The assumption is that per cpu data is only | 276 | * on the *same* processor. The assumption is that per cpu data is only |
@@ -311,7 +321,7 @@ do { \ | |||
311 | #define _this_cpu_generic_to_op(pcp, val, op) \ | 321 | #define _this_cpu_generic_to_op(pcp, val, op) \ |
312 | do { \ | 322 | do { \ |
313 | preempt_disable(); \ | 323 | preempt_disable(); \ |
314 | *__this_cpu_ptr(&pcp) op val; \ | 324 | *__this_cpu_ptr(&(pcp)) op val; \ |
315 | preempt_enable(); \ | 325 | preempt_enable(); \ |
316 | } while (0) | 326 | } while (0) |
317 | 327 | ||
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index 794662b2be5d..c88d67b59394 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -21,7 +21,7 @@ struct percpu_counter { | |||
21 | #ifdef CONFIG_HOTPLUG_CPU | 21 | #ifdef CONFIG_HOTPLUG_CPU |
22 | struct list_head list; /* All percpu_counters are on a list */ | 22 | struct list_head list; /* All percpu_counters are on a list */ |
23 | #endif | 23 | #endif |
24 | s32 *counters; | 24 | s32 __percpu *counters; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern int percpu_counter_batch; | 27 | extern int percpu_counter_batch; |
diff --git a/include/linux/range.h b/include/linux/range.h new file mode 100644 index 000000000000..bd184a5db791 --- /dev/null +++ b/include/linux/range.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef _LINUX_RANGE_H | ||
2 | #define _LINUX_RANGE_H | ||
3 | |||
4 | struct range { | ||
5 | u64 start; | ||
6 | u64 end; | ||
7 | }; | ||
8 | |||
9 | int add_range(struct range *range, int az, int nr_range, | ||
10 | u64 start, u64 end); | ||
11 | |||
12 | |||
13 | int add_range_with_merge(struct range *range, int az, int nr_range, | ||
14 | u64 start, u64 end); | ||
15 | |||
16 | void subtract_range(struct range *range, int az, u64 start, u64 end); | ||
17 | |||
18 | int clean_sort_range(struct range *range, int az); | ||
19 | |||
20 | void sort_range(struct range *range, int nr_range); | ||
21 | |||
22 | #define MAX_RESOURCE ((resource_size_t)~0) | ||
23 | static inline resource_size_t cap_resource(u64 val) | ||
24 | { | ||
25 | if (val > MAX_RESOURCE) | ||
26 | return MAX_RESOURCE; | ||
27 | |||
28 | return val; | ||
29 | } | ||
30 | #endif | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 030d92255c7a..28c9fd020d39 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -89,8 +89,9 @@ | |||
89 | * REGULATION_OUT Regulator output is out of regulation. | 89 | * REGULATION_OUT Regulator output is out of regulation. |
90 | * FAIL Regulator output has failed. | 90 | * FAIL Regulator output has failed. |
91 | * OVER_TEMP Regulator over temp. | 91 | * OVER_TEMP Regulator over temp. |
92 | * FORCE_DISABLE Regulator shut down by software. | 92 | * FORCE_DISABLE Regulator forcibly shut down by software. |
93 | * VOLTAGE_CHANGE Regulator voltage changed. | 93 | * VOLTAGE_CHANGE Regulator voltage changed. |
94 | * DISABLE Regulator was disabled. | ||
94 | * | 95 | * |
95 | * NOTE: These events can be OR'ed together when passed into handler. | 96 | * NOTE: These events can be OR'ed together when passed into handler. |
96 | */ | 97 | */ |
@@ -102,6 +103,7 @@ | |||
102 | #define REGULATOR_EVENT_OVER_TEMP 0x10 | 103 | #define REGULATOR_EVENT_OVER_TEMP 0x10 |
103 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 | 104 | #define REGULATOR_EVENT_FORCE_DISABLE 0x20 |
104 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 | 105 | #define REGULATOR_EVENT_VOLTAGE_CHANGE 0x40 |
106 | #define REGULATOR_EVENT_DISABLE 0x80 | ||
105 | 107 | ||
106 | struct regulator; | 108 | struct regulator; |
107 | 109 | ||
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 31f2055eae28..592cd7c642c2 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -58,6 +58,9 @@ enum regulator_status { | |||
58 | * @get_optimum_mode: Get the most efficient operating mode for the regulator | 58 | * @get_optimum_mode: Get the most efficient operating mode for the regulator |
59 | * when running with the specified parameters. | 59 | * when running with the specified parameters. |
60 | * | 60 | * |
61 | * @enable_time: Time taken for the regulator voltage output voltage to | ||
62 | * stabalise after being enabled, in microseconds. | ||
63 | * | ||
61 | * @set_suspend_voltage: Set the voltage for the regulator when the system | 64 | * @set_suspend_voltage: Set the voltage for the regulator when the system |
62 | * is suspended. | 65 | * is suspended. |
63 | * @set_suspend_enable: Mark the regulator as enabled when the system is | 66 | * @set_suspend_enable: Mark the regulator as enabled when the system is |
@@ -93,6 +96,9 @@ struct regulator_ops { | |||
93 | int (*set_mode) (struct regulator_dev *, unsigned int mode); | 96 | int (*set_mode) (struct regulator_dev *, unsigned int mode); |
94 | unsigned int (*get_mode) (struct regulator_dev *); | 97 | unsigned int (*get_mode) (struct regulator_dev *); |
95 | 98 | ||
99 | /* Time taken to enable the regulator */ | ||
100 | int (*enable_time) (struct regulator_dev *); | ||
101 | |||
96 | /* report regulator status ... most other accessors report | 102 | /* report regulator status ... most other accessors report |
97 | * control inputs, this reports results of combining inputs | 103 | * control inputs, this reports results of combining inputs |
98 | * from Linux (and other sources) with the actual load. | 104 | * from Linux (and other sources) with the actual load. |
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h index e94a4a1c7c8a..ffd7d508e726 100644 --- a/include/linux/regulator/fixed.h +++ b/include/linux/regulator/fixed.h | |||
@@ -25,6 +25,7 @@ struct regulator_init_data; | |||
25 | * @microvolts: Output voltage of regulator | 25 | * @microvolts: Output voltage of regulator |
26 | * @gpio: GPIO to use for enable control | 26 | * @gpio: GPIO to use for enable control |
27 | * set to -EINVAL if not used | 27 | * set to -EINVAL if not used |
28 | * @startup_delay: Start-up time in microseconds | ||
28 | * @enable_high: Polarity of enable GPIO | 29 | * @enable_high: Polarity of enable GPIO |
29 | * 1 = Active high, 0 = Active low | 30 | * 1 = Active high, 0 = Active low |
30 | * @enabled_at_boot: Whether regulator has been enabled at | 31 | * @enabled_at_boot: Whether regulator has been enabled at |
@@ -41,6 +42,7 @@ struct fixed_voltage_config { | |||
41 | const char *supply_name; | 42 | const char *supply_name; |
42 | int microvolts; | 43 | int microvolts; |
43 | int gpio; | 44 | int gpio; |
45 | unsigned startup_delay; | ||
44 | unsigned enable_high:1; | 46 | unsigned enable_high:1; |
45 | unsigned enabled_at_boot:1; | 47 | unsigned enabled_at_boot:1; |
46 | struct regulator_init_data *init_data; | 48 | struct regulator_init_data *init_data; |
diff --git a/include/linux/regulator/max8649.h b/include/linux/regulator/max8649.h new file mode 100644 index 000000000000..417d14ecd5cb --- /dev/null +++ b/include/linux/regulator/max8649.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Interface of Maxim max8649 | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Marvell International Ltd. | ||
5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __LINUX_REGULATOR_MAX8649_H | ||
13 | #define __LINUX_REGULATOR_MAX8649_H | ||
14 | |||
15 | #include <linux/regulator/machine.h> | ||
16 | |||
17 | enum { | ||
18 | MAX8649_EXTCLK_26MHZ = 0, | ||
19 | MAX8649_EXTCLK_13MHZ, | ||
20 | MAX8649_EXTCLK_19MHZ, /* 19.2MHz */ | ||
21 | }; | ||
22 | |||
23 | enum { | ||
24 | MAX8649_RAMP_32MV = 0, | ||
25 | MAX8649_RAMP_16MV, | ||
26 | MAX8649_RAMP_8MV, | ||
27 | MAX8649_RAMP_4MV, | ||
28 | MAX8649_RAMP_2MV, | ||
29 | MAX8649_RAMP_1MV, | ||
30 | MAX8649_RAMP_0_5MV, | ||
31 | MAX8649_RAMP_0_25MV, | ||
32 | }; | ||
33 | |||
34 | struct max8649_platform_data { | ||
35 | struct regulator_init_data *regulator; | ||
36 | |||
37 | unsigned mode:2; /* bit[1:0] = VID1,VID0 */ | ||
38 | unsigned extclk_freq:2; | ||
39 | unsigned extclk:1; | ||
40 | unsigned ramp_timing:3; | ||
41 | unsigned ramp_down:1; | ||
42 | }; | ||
43 | |||
44 | #endif /* __LINUX_REGULATOR_MAX8649_H */ | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 1ba3cf6edfbb..3b603f474186 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -2034,7 +2034,7 @@ void reiserfs_read_locked_inode(struct inode *inode, | |||
2034 | int reiserfs_find_actor(struct inode *inode, void *p); | 2034 | int reiserfs_find_actor(struct inode *inode, void *p); |
2035 | int reiserfs_init_locked_inode(struct inode *inode, void *p); | 2035 | int reiserfs_init_locked_inode(struct inode *inode, void *p); |
2036 | void reiserfs_delete_inode(struct inode *inode); | 2036 | void reiserfs_delete_inode(struct inode *inode); |
2037 | int reiserfs_write_inode(struct inode *inode, int); | 2037 | int reiserfs_write_inode(struct inode *inode, struct writeback_control *wbc); |
2038 | int reiserfs_get_block(struct inode *inode, sector_t block, | 2038 | int reiserfs_get_block(struct inode *inode, sector_t block, |
2039 | struct buffer_head *bh_result, int create); | 2039 | struct buffer_head *bh_result, int create); |
2040 | struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid, | 2040 | struct dentry *reiserfs_fh_to_dentry(struct super_block *sb, struct fid *fid, |
diff --git a/include/linux/security.h b/include/linux/security.h index 2c627d361c02..233d20b52c1b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -76,7 +76,7 @@ extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
76 | extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); | 76 | extern int cap_task_setscheduler(struct task_struct *p, int policy, struct sched_param *lp); |
77 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); | 77 | extern int cap_task_setioprio(struct task_struct *p, int ioprio); |
78 | extern int cap_task_setnice(struct task_struct *p, int nice); | 78 | extern int cap_task_setnice(struct task_struct *p, int nice); |
79 | extern int cap_syslog(int type); | 79 | extern int cap_syslog(int type, bool from_file); |
80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); | 80 | extern int cap_vm_enough_memory(struct mm_struct *mm, long pages); |
81 | 81 | ||
82 | struct msghdr; | 82 | struct msghdr; |
@@ -95,6 +95,8 @@ struct seq_file; | |||
95 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | 95 | extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); |
96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
97 | 97 | ||
98 | void reset_security_ops(void); | ||
99 | |||
98 | #ifdef CONFIG_MMU | 100 | #ifdef CONFIG_MMU |
99 | extern unsigned long mmap_min_addr; | 101 | extern unsigned long mmap_min_addr; |
100 | extern unsigned long dac_mmap_min_addr; | 102 | extern unsigned long dac_mmap_min_addr; |
@@ -985,6 +987,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
985 | * Check permissions on incoming network packets. This hook is distinct | 987 | * Check permissions on incoming network packets. This hook is distinct |
986 | * from Netfilter's IP input hooks since it is the first time that the | 988 | * from Netfilter's IP input hooks since it is the first time that the |
987 | * incoming sk_buff @skb has been associated with a particular socket, @sk. | 989 | * incoming sk_buff @skb has been associated with a particular socket, @sk. |
990 | * Must not sleep inside this hook because some callers hold spinlocks. | ||
988 | * @sk contains the sock (not socket) associated with the incoming sk_buff. | 991 | * @sk contains the sock (not socket) associated with the incoming sk_buff. |
989 | * @skb contains the incoming network data. | 992 | * @skb contains the incoming network data. |
990 | * @socket_getpeersec_stream: | 993 | * @socket_getpeersec_stream: |
@@ -1348,6 +1351,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1348 | * logging to the console. | 1351 | * logging to the console. |
1349 | * See the syslog(2) manual page for an explanation of the @type values. | 1352 | * See the syslog(2) manual page for an explanation of the @type values. |
1350 | * @type contains the type of action. | 1353 | * @type contains the type of action. |
1354 | * @from_file indicates the context of action (if it came from /proc). | ||
1351 | * Return 0 if permission is granted. | 1355 | * Return 0 if permission is granted. |
1352 | * @settime: | 1356 | * @settime: |
1353 | * Check permission to change the system time. | 1357 | * Check permission to change the system time. |
@@ -1462,7 +1466,7 @@ struct security_operations { | |||
1462 | int (*sysctl) (struct ctl_table *table, int op); | 1466 | int (*sysctl) (struct ctl_table *table, int op); |
1463 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); | 1467 | int (*quotactl) (int cmds, int type, int id, struct super_block *sb); |
1464 | int (*quota_on) (struct dentry *dentry); | 1468 | int (*quota_on) (struct dentry *dentry); |
1465 | int (*syslog) (int type); | 1469 | int (*syslog) (int type, bool from_file); |
1466 | int (*settime) (struct timespec *ts, struct timezone *tz); | 1470 | int (*settime) (struct timespec *ts, struct timezone *tz); |
1467 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); | 1471 | int (*vm_enough_memory) (struct mm_struct *mm, long pages); |
1468 | 1472 | ||
@@ -1761,7 +1765,7 @@ int security_acct(struct file *file); | |||
1761 | int security_sysctl(struct ctl_table *table, int op); | 1765 | int security_sysctl(struct ctl_table *table, int op); |
1762 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); | 1766 | int security_quotactl(int cmds, int type, int id, struct super_block *sb); |
1763 | int security_quota_on(struct dentry *dentry); | 1767 | int security_quota_on(struct dentry *dentry); |
1764 | int security_syslog(int type); | 1768 | int security_syslog(int type, bool from_file); |
1765 | int security_settime(struct timespec *ts, struct timezone *tz); | 1769 | int security_settime(struct timespec *ts, struct timezone *tz); |
1766 | int security_vm_enough_memory(long pages); | 1770 | int security_vm_enough_memory(long pages); |
1767 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); | 1771 | int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); |
@@ -2007,9 +2011,9 @@ static inline int security_quota_on(struct dentry *dentry) | |||
2007 | return 0; | 2011 | return 0; |
2008 | } | 2012 | } |
2009 | 2013 | ||
2010 | static inline int security_syslog(int type) | 2014 | static inline int security_syslog(int type, bool from_file) |
2011 | { | 2015 | { |
2012 | return cap_syslog(type); | 2016 | return cap_syslog(type, from_file); |
2013 | } | 2017 | } |
2014 | 2018 | ||
2015 | static inline int security_settime(struct timespec *ts, struct timezone *tz) | 2019 | static inline int security_settime(struct timespec *ts, struct timezone *tz) |
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 3084f80909cd..4d5ecb222af9 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -33,7 +33,7 @@ struct srcu_struct_array { | |||
33 | 33 | ||
34 | struct srcu_struct { | 34 | struct srcu_struct { |
35 | int completed; | 35 | int completed; |
36 | struct srcu_struct_array *per_cpu_ref; | 36 | struct srcu_struct_array __percpu *per_cpu_ref; |
37 | struct mutex mutex; | 37 | struct mutex mutex; |
38 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 38 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
39 | struct lockdep_map dep_map; | 39 | struct lockdep_map dep_map; |
diff --git a/include/linux/syslog.h b/include/linux/syslog.h new file mode 100644 index 000000000000..38911391a139 --- /dev/null +++ b/include/linux/syslog.h | |||
@@ -0,0 +1,52 @@ | |||
1 | /* Syslog internals | ||
2 | * | ||
3 | * Copyright 2010 Canonical, Ltd. | ||
4 | * Author: Kees Cook <kees.cook@canonical.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2, or (at your option) | ||
9 | * any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; see the file COPYING. If not, write to | ||
18 | * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _LINUX_SYSLOG_H | ||
22 | #define _LINUX_SYSLOG_H | ||
23 | |||
24 | /* Close the log. Currently a NOP. */ | ||
25 | #define SYSLOG_ACTION_CLOSE 0 | ||
26 | /* Open the log. Currently a NOP. */ | ||
27 | #define SYSLOG_ACTION_OPEN 1 | ||
28 | /* Read from the log. */ | ||
29 | #define SYSLOG_ACTION_READ 2 | ||
30 | /* Read all messages remaining in the ring buffer. */ | ||
31 | #define SYSLOG_ACTION_READ_ALL 3 | ||
32 | /* Read and clear all messages remaining in the ring buffer */ | ||
33 | #define SYSLOG_ACTION_READ_CLEAR 4 | ||
34 | /* Clear ring buffer. */ | ||
35 | #define SYSLOG_ACTION_CLEAR 5 | ||
36 | /* Disable printk's to console */ | ||
37 | #define SYSLOG_ACTION_CONSOLE_OFF 6 | ||
38 | /* Enable printk's to console */ | ||
39 | #define SYSLOG_ACTION_CONSOLE_ON 7 | ||
40 | /* Set level of messages printed to console */ | ||
41 | #define SYSLOG_ACTION_CONSOLE_LEVEL 8 | ||
42 | /* Return number of unread characters in the log buffer */ | ||
43 | #define SYSLOG_ACTION_SIZE_UNREAD 9 | ||
44 | /* Return size of the log buffer */ | ||
45 | #define SYSLOG_ACTION_SIZE_BUFFER 10 | ||
46 | |||
47 | #define SYSLOG_FROM_CALL 0 | ||
48 | #define SYSLOG_FROM_FILE 1 | ||
49 | |||
50 | int do_syslog(int type, char __user *buf, int count, bool from_file); | ||
51 | |||
52 | #endif /* _LINUX_SYSLOG_H */ | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 6abfcf5b5887..d96e5882f129 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -68,6 +68,16 @@ struct tty_buffer { | |||
68 | unsigned long data[0]; | 68 | unsigned long data[0]; |
69 | }; | 69 | }; |
70 | 70 | ||
71 | /* | ||
72 | * We default to dicing tty buffer allocations to this many characters | ||
73 | * in order to avoid multiple page allocations. We assume tty_buffer itself | ||
74 | * is under 256 bytes. See tty_buffer_find for the allocation logic this | ||
75 | * must match | ||
76 | */ | ||
77 | |||
78 | #define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2) | ||
79 | |||
80 | |||
71 | struct tty_bufhead { | 81 | struct tty_bufhead { |
72 | struct delayed_work work; | 82 | struct delayed_work work; |
73 | spinlock_t lock; | 83 | spinlock_t lock; |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index eb677cf56106..9239d033a0a3 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -2,8 +2,8 @@ | |||
2 | #define _LINUX_TTY_FLIP_H | 2 | #define _LINUX_TTY_FLIP_H |
3 | 3 | ||
4 | extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); | 4 | extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); |
5 | extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size); | ||
6 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); | 5 | extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size); |
6 | extern int tty_insert_flip_string_fixed_flag(struct tty_struct *tty, const unsigned char *chars, char flag, size_t size); | ||
7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); | 7 | extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size); |
8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); | 8 | extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size); |
9 | void tty_schedule_flip(struct tty_struct *tty); | 9 | void tty_schedule_flip(struct tty_struct *tty); |
@@ -20,4 +20,9 @@ static inline int tty_insert_flip_char(struct tty_struct *tty, | |||
20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); | 20 | return tty_insert_flip_string_flags(tty, &ch, &flag, 1); |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size) | ||
24 | { | ||
25 | return tty_insert_flip_string_fixed_flag(tty, chars, TTY_NORMAL, size); | ||
26 | } | ||
27 | |||
23 | #endif /* _LINUX_TTY_FLIP_H */ | 28 | #endif /* _LINUX_TTY_FLIP_H */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 332eaea61021..3492abf82e75 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -122,7 +122,6 @@ enum usb_interface_condition { | |||
122 | * number from the USB core by calling usb_register_dev(). | 122 | * number from the USB core by calling usb_register_dev(). |
123 | * @condition: binding state of the interface: not bound, binding | 123 | * @condition: binding state of the interface: not bound, binding |
124 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 124 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
125 | * @is_active: flag set when the interface is bound and not suspended. | ||
126 | * @sysfs_files_created: sysfs attributes exist | 125 | * @sysfs_files_created: sysfs attributes exist |
127 | * @ep_devs_created: endpoint child pseudo-devices exist | 126 | * @ep_devs_created: endpoint child pseudo-devices exist |
128 | * @unregistering: flag set when the interface is being unregistered | 127 | * @unregistering: flag set when the interface is being unregistered |
@@ -135,8 +134,7 @@ enum usb_interface_condition { | |||
135 | * @dev: driver model's view of this device | 134 | * @dev: driver model's view of this device |
136 | * @usb_dev: if an interface is bound to the USB major, this will point | 135 | * @usb_dev: if an interface is bound to the USB major, this will point |
137 | * to the sysfs representation for that device. | 136 | * to the sysfs representation for that device. |
138 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | 137 | * @pm_usage_cnt: PM usage counter for this interface |
139 | * allowed unless the counter is 0. | ||
140 | * @reset_ws: Used for scheduling resets from atomic context. | 138 | * @reset_ws: Used for scheduling resets from atomic context. |
141 | * @reset_running: set to 1 if the interface is currently running a | 139 | * @reset_running: set to 1 if the interface is currently running a |
142 | * queued reset so that usb_cancel_queued_reset() doesn't try to | 140 | * queued reset so that usb_cancel_queued_reset() doesn't try to |
@@ -184,7 +182,6 @@ struct usb_interface { | |||
184 | int minor; /* minor number this interface is | 182 | int minor; /* minor number this interface is |
185 | * bound to */ | 183 | * bound to */ |
186 | enum usb_interface_condition condition; /* state of binding */ | 184 | enum usb_interface_condition condition; /* state of binding */ |
187 | unsigned is_active:1; /* the interface is not suspended */ | ||
188 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | 185 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ |
189 | unsigned ep_devs_created:1; /* endpoint "devices" exist */ | 186 | unsigned ep_devs_created:1; /* endpoint "devices" exist */ |
190 | unsigned unregistering:1; /* unregistration is in progress */ | 187 | unsigned unregistering:1; /* unregistration is in progress */ |
@@ -401,7 +398,6 @@ struct usb_tt; | |||
401 | * @portnum: parent port number (origin 1) | 398 | * @portnum: parent port number (origin 1) |
402 | * @level: number of USB hub ancestors | 399 | * @level: number of USB hub ancestors |
403 | * @can_submit: URBs may be submitted | 400 | * @can_submit: URBs may be submitted |
404 | * @discon_suspended: disconnected while suspended | ||
405 | * @persist_enabled: USB_PERSIST enabled for this device | 401 | * @persist_enabled: USB_PERSIST enabled for this device |
406 | * @have_langid: whether string_langid is valid | 402 | * @have_langid: whether string_langid is valid |
407 | * @authorized: policy has said we can use it; | 403 | * @authorized: policy has said we can use it; |
@@ -421,20 +417,15 @@ struct usb_tt; | |||
421 | * @usbfs_dentry: usbfs dentry entry for the device | 417 | * @usbfs_dentry: usbfs dentry entry for the device |
422 | * @maxchild: number of ports if hub | 418 | * @maxchild: number of ports if hub |
423 | * @children: child devices - USB devices that are attached to this hub | 419 | * @children: child devices - USB devices that are attached to this hub |
424 | * @pm_usage_cnt: usage counter for autosuspend | ||
425 | * @quirks: quirks of the whole device | 420 | * @quirks: quirks of the whole device |
426 | * @urbnum: number of URBs submitted for the whole device | 421 | * @urbnum: number of URBs submitted for the whole device |
427 | * @active_duration: total time device is not suspended | 422 | * @active_duration: total time device is not suspended |
428 | * @autosuspend: for delayed autosuspends | ||
429 | * @autoresume: for autoresumes requested while in_interrupt | ||
430 | * @pm_mutex: protects PM operations | ||
431 | * @last_busy: time of last use | 423 | * @last_busy: time of last use |
432 | * @autosuspend_delay: in jiffies | 424 | * @autosuspend_delay: in jiffies |
433 | * @connect_time: time device was first connected | 425 | * @connect_time: time device was first connected |
434 | * @do_remote_wakeup: remote wakeup should be enabled | 426 | * @do_remote_wakeup: remote wakeup should be enabled |
435 | * @reset_resume: needs reset instead of resume | 427 | * @reset_resume: needs reset instead of resume |
436 | * @autosuspend_disabled: autosuspend disabled by the user | 428 | * @autosuspend_disabled: autosuspend disabled by the user |
437 | * @skip_sys_resume: skip the next system resume | ||
438 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB | 429 | * @wusb_dev: if this is a Wireless USB device, link to the WUSB |
439 | * specific data for the device. | 430 | * specific data for the device. |
440 | * @slot_id: Slot ID assigned by xHCI | 431 | * @slot_id: Slot ID assigned by xHCI |
@@ -475,7 +466,6 @@ struct usb_device { | |||
475 | u8 level; | 466 | u8 level; |
476 | 467 | ||
477 | unsigned can_submit:1; | 468 | unsigned can_submit:1; |
478 | unsigned discon_suspended:1; | ||
479 | unsigned persist_enabled:1; | 469 | unsigned persist_enabled:1; |
480 | unsigned have_langid:1; | 470 | unsigned have_langid:1; |
481 | unsigned authorized:1; | 471 | unsigned authorized:1; |
@@ -499,17 +489,12 @@ struct usb_device { | |||
499 | int maxchild; | 489 | int maxchild; |
500 | struct usb_device *children[USB_MAXCHILDREN]; | 490 | struct usb_device *children[USB_MAXCHILDREN]; |
501 | 491 | ||
502 | int pm_usage_cnt; | ||
503 | u32 quirks; | 492 | u32 quirks; |
504 | atomic_t urbnum; | 493 | atomic_t urbnum; |
505 | 494 | ||
506 | unsigned long active_duration; | 495 | unsigned long active_duration; |
507 | 496 | ||
508 | #ifdef CONFIG_PM | 497 | #ifdef CONFIG_PM |
509 | struct delayed_work autosuspend; | ||
510 | struct work_struct autoresume; | ||
511 | struct mutex pm_mutex; | ||
512 | |||
513 | unsigned long last_busy; | 498 | unsigned long last_busy; |
514 | int autosuspend_delay; | 499 | int autosuspend_delay; |
515 | unsigned long connect_time; | 500 | unsigned long connect_time; |
@@ -517,7 +502,6 @@ struct usb_device { | |||
517 | unsigned do_remote_wakeup:1; | 502 | unsigned do_remote_wakeup:1; |
518 | unsigned reset_resume:1; | 503 | unsigned reset_resume:1; |
519 | unsigned autosuspend_disabled:1; | 504 | unsigned autosuspend_disabled:1; |
520 | unsigned skip_sys_resume:1; | ||
521 | #endif | 505 | #endif |
522 | struct wusb_dev *wusb_dev; | 506 | struct wusb_dev *wusb_dev; |
523 | int slot_id; | 507 | int slot_id; |
@@ -542,21 +526,15 @@ extern struct usb_device *usb_find_device(u16 vendor_id, u16 product_id); | |||
542 | 526 | ||
543 | /* USB autosuspend and autoresume */ | 527 | /* USB autosuspend and autoresume */ |
544 | #ifdef CONFIG_USB_SUSPEND | 528 | #ifdef CONFIG_USB_SUSPEND |
529 | extern int usb_enable_autosuspend(struct usb_device *udev); | ||
530 | extern int usb_disable_autosuspend(struct usb_device *udev); | ||
531 | |||
545 | extern int usb_autopm_get_interface(struct usb_interface *intf); | 532 | extern int usb_autopm_get_interface(struct usb_interface *intf); |
546 | extern void usb_autopm_put_interface(struct usb_interface *intf); | 533 | extern void usb_autopm_put_interface(struct usb_interface *intf); |
547 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); | 534 | extern int usb_autopm_get_interface_async(struct usb_interface *intf); |
548 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); | 535 | extern void usb_autopm_put_interface_async(struct usb_interface *intf); |
549 | 536 | extern void usb_autopm_get_interface_no_resume(struct usb_interface *intf); | |
550 | static inline void usb_autopm_get_interface_no_resume( | 537 | extern void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); |
551 | struct usb_interface *intf) | ||
552 | { | ||
553 | atomic_inc(&intf->pm_usage_cnt); | ||
554 | } | ||
555 | static inline void usb_autopm_put_interface_no_suspend( | ||
556 | struct usb_interface *intf) | ||
557 | { | ||
558 | atomic_dec(&intf->pm_usage_cnt); | ||
559 | } | ||
560 | 538 | ||
561 | static inline void usb_mark_last_busy(struct usb_device *udev) | 539 | static inline void usb_mark_last_busy(struct usb_device *udev) |
562 | { | 540 | { |
@@ -565,6 +543,11 @@ static inline void usb_mark_last_busy(struct usb_device *udev) | |||
565 | 543 | ||
566 | #else | 544 | #else |
567 | 545 | ||
546 | static inline int usb_enable_autosuspend(struct usb_device *udev) | ||
547 | { return 0; } | ||
548 | static inline int usb_disable_autosuspend(struct usb_device *udev) | ||
549 | { return 0; } | ||
550 | |||
568 | static inline int usb_autopm_get_interface(struct usb_interface *intf) | 551 | static inline int usb_autopm_get_interface(struct usb_interface *intf) |
569 | { return 0; } | 552 | { return 0; } |
570 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) | 553 | static inline int usb_autopm_get_interface_async(struct usb_interface *intf) |
@@ -1583,14 +1566,18 @@ extern void usb_register_notify(struct notifier_block *nb); | |||
1583 | extern void usb_unregister_notify(struct notifier_block *nb); | 1566 | extern void usb_unregister_notify(struct notifier_block *nb); |
1584 | 1567 | ||
1585 | #ifdef DEBUG | 1568 | #ifdef DEBUG |
1586 | #define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , \ | 1569 | #define dbg(format, arg...) \ |
1587 | __FILE__ , ## arg) | 1570 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg) |
1588 | #else | 1571 | #else |
1589 | #define dbg(format, arg...) do {} while (0) | 1572 | #define dbg(format, arg...) \ |
1573 | do { \ | ||
1574 | if (0) \ | ||
1575 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \ | ||
1576 | } while (0) | ||
1590 | #endif | 1577 | #endif |
1591 | 1578 | ||
1592 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ | 1579 | #define err(format, arg...) \ |
1593 | format "\n" , ## arg) | 1580 | printk(KERN_ERR KBUILD_MODNAME ": " format "\n", ##arg) |
1594 | 1581 | ||
1595 | /* debugfs stuff */ | 1582 | /* debugfs stuff */ |
1596 | extern struct dentry *usb_debug_root; | 1583 | extern struct dentry *usb_debug_root; |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index 54c446309a2a..29fd73b0bffc 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -5,4 +5,3 @@ header-y += gadgetfs.h | |||
5 | header-y += midi.h | 5 | header-y += midi.h |
6 | header-y += g_printer.h | 6 | header-y += g_printer.h |
7 | header-y += tmc.h | 7 | header-y += tmc.h |
8 | header-y += vstusb.h | ||
diff --git a/include/linux/usb/atmel_usba_udc.h b/include/linux/usb/atmel_usba_udc.h index 6311fa2d9f82..baf41c8616e9 100644 --- a/include/linux/usb/atmel_usba_udc.h +++ b/include/linux/usb/atmel_usba_udc.h | |||
@@ -15,6 +15,7 @@ struct usba_ep_data { | |||
15 | 15 | ||
16 | struct usba_platform_data { | 16 | struct usba_platform_data { |
17 | int vbus_pin; | 17 | int vbus_pin; |
18 | int vbus_pin_inverted; | ||
18 | int num_ep; | 19 | int num_ep; |
19 | struct usba_ep_data ep[0]; | 20 | struct usba_ep_data ep[0]; |
20 | }; | 21 | }; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 94012e649d86..e58369ff8168 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -775,7 +775,7 @@ enum usb_device_speed { | |||
775 | USB_SPEED_UNKNOWN = 0, /* enumerating */ | 775 | USB_SPEED_UNKNOWN = 0, /* enumerating */ |
776 | USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ | 776 | USB_SPEED_LOW, USB_SPEED_FULL, /* usb 1.1 */ |
777 | USB_SPEED_HIGH, /* usb 2.0 */ | 777 | USB_SPEED_HIGH, /* usb 2.0 */ |
778 | USB_SPEED_VARIABLE, /* wireless (usb 2.5) */ | 778 | USB_SPEED_WIRELESS, /* wireless (usb 2.5) */ |
779 | USB_SPEED_SUPER, /* usb 3.0 */ | 779 | USB_SPEED_SUPER, /* usb 3.0 */ |
780 | }; | 780 | }; |
781 | 781 | ||
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 5dc2f227a0f1..7acef0234c0e 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h | |||
@@ -30,26 +30,26 @@ struct musb_hdrc_eps_bits { | |||
30 | struct musb_hdrc_config { | 30 | struct musb_hdrc_config { |
31 | /* MUSB configuration-specific details */ | 31 | /* MUSB configuration-specific details */ |
32 | unsigned multipoint:1; /* multipoint device */ | 32 | unsigned multipoint:1; /* multipoint device */ |
33 | unsigned dyn_fifo:1; /* supports dynamic fifo sizing */ | 33 | unsigned dyn_fifo:1 __deprecated; /* supports dynamic fifo sizing */ |
34 | unsigned soft_con:1; /* soft connect required */ | 34 | unsigned soft_con:1 __deprecated; /* soft connect required */ |
35 | unsigned utm_16:1; /* utm data witdh is 16 bits */ | 35 | unsigned utm_16:1 __deprecated; /* utm data witdh is 16 bits */ |
36 | unsigned big_endian:1; /* true if CPU uses big-endian */ | 36 | unsigned big_endian:1; /* true if CPU uses big-endian */ |
37 | unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */ | 37 | unsigned mult_bulk_tx:1; /* Tx ep required for multbulk pkts */ |
38 | unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */ | 38 | unsigned mult_bulk_rx:1; /* Rx ep required for multbulk pkts */ |
39 | unsigned high_iso_tx:1; /* Tx ep required for HB iso */ | 39 | unsigned high_iso_tx:1; /* Tx ep required for HB iso */ |
40 | unsigned high_iso_rx:1; /* Rx ep required for HD iso */ | 40 | unsigned high_iso_rx:1; /* Rx ep required for HD iso */ |
41 | unsigned dma:1; /* supports DMA */ | 41 | unsigned dma:1 __deprecated; /* supports DMA */ |
42 | unsigned vendor_req:1; /* vendor registers required */ | 42 | unsigned vendor_req:1 __deprecated; /* vendor registers required */ |
43 | 43 | ||
44 | u8 num_eps; /* number of endpoints _with_ ep0 */ | 44 | u8 num_eps; /* number of endpoints _with_ ep0 */ |
45 | u8 dma_channels; /* number of dma channels */ | 45 | u8 dma_channels __deprecated; /* number of dma channels */ |
46 | u8 dyn_fifo_size; /* dynamic size in bytes */ | 46 | u8 dyn_fifo_size; /* dynamic size in bytes */ |
47 | u8 vendor_ctrl; /* vendor control reg width */ | 47 | u8 vendor_ctrl __deprecated; /* vendor control reg width */ |
48 | u8 vendor_stat; /* vendor status reg witdh */ | 48 | u8 vendor_stat __deprecated; /* vendor status reg witdh */ |
49 | u8 dma_req_chan; /* bitmask for required dma channels */ | 49 | u8 dma_req_chan __deprecated; /* bitmask for required dma channels */ |
50 | u8 ram_bits; /* ram address size */ | 50 | u8 ram_bits; /* ram address size */ |
51 | 51 | ||
52 | struct musb_hdrc_eps_bits *eps_bits; | 52 | struct musb_hdrc_eps_bits *eps_bits __deprecated; |
53 | #ifdef CONFIG_BLACKFIN | 53 | #ifdef CONFIG_BLACKFIN |
54 | /* A GPIO controlling VRSEL in Blackfin */ | 54 | /* A GPIO controlling VRSEL in Blackfin */ |
55 | unsigned int gpio_vrsel; | 55 | unsigned int gpio_vrsel; |
@@ -76,6 +76,9 @@ struct musb_hdrc_platform_data { | |||
76 | /* (HOST or OTG) msec/2 after VBUS on till power good */ | 76 | /* (HOST or OTG) msec/2 after VBUS on till power good */ |
77 | u8 potpgt; | 77 | u8 potpgt; |
78 | 78 | ||
79 | /* (HOST or OTG) program PHY for external Vbus */ | ||
80 | unsigned extvbus:1; | ||
81 | |||
79 | /* Power the device on or off */ | 82 | /* Power the device on or off */ |
80 | int (*set_power)(int state); | 83 | int (*set_power)(int state); |
81 | 84 | ||
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index fef0972c8146..f8302d036a76 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __LINUX_USB_OTG_H | 9 | #ifndef __LINUX_USB_OTG_H |
10 | #define __LINUX_USB_OTG_H | 10 | #define __LINUX_USB_OTG_H |
11 | 11 | ||
12 | #include <linux/notifier.h> | ||
13 | |||
12 | /* OTG defines lots of enumeration states before device reset */ | 14 | /* OTG defines lots of enumeration states before device reset */ |
13 | enum usb_otg_state { | 15 | enum usb_otg_state { |
14 | OTG_STATE_UNDEFINED = 0, | 16 | OTG_STATE_UNDEFINED = 0, |
@@ -33,6 +35,14 @@ enum usb_otg_state { | |||
33 | OTG_STATE_A_VBUS_ERR, | 35 | OTG_STATE_A_VBUS_ERR, |
34 | }; | 36 | }; |
35 | 37 | ||
38 | enum usb_xceiv_events { | ||
39 | USB_EVENT_NONE, /* no events or cable disconnected */ | ||
40 | USB_EVENT_VBUS, /* vbus valid event */ | ||
41 | USB_EVENT_ID, /* id was grounded */ | ||
42 | USB_EVENT_CHARGER, /* usb dedicated charger */ | ||
43 | USB_EVENT_ENUMERATED, /* gadget driver enumerated */ | ||
44 | }; | ||
45 | |||
36 | #define USB_OTG_PULLUP_ID (1 << 0) | 46 | #define USB_OTG_PULLUP_ID (1 << 0) |
37 | #define USB_OTG_PULLDOWN_DP (1 << 1) | 47 | #define USB_OTG_PULLDOWN_DP (1 << 1) |
38 | #define USB_OTG_PULLDOWN_DM (1 << 2) | 48 | #define USB_OTG_PULLDOWN_DM (1 << 2) |
@@ -70,6 +80,9 @@ struct otg_transceiver { | |||
70 | struct otg_io_access_ops *io_ops; | 80 | struct otg_io_access_ops *io_ops; |
71 | void __iomem *io_priv; | 81 | void __iomem *io_priv; |
72 | 82 | ||
83 | /* for notification of usb_xceiv_events */ | ||
84 | struct blocking_notifier_head notifier; | ||
85 | |||
73 | /* to pass extra port status to the root hub */ | 86 | /* to pass extra port status to the root hub */ |
74 | u16 port_status; | 87 | u16 port_status; |
75 | u16 port_change; | 88 | u16 port_change; |
@@ -213,6 +226,18 @@ otg_start_srp(struct otg_transceiver *otg) | |||
213 | return otg->start_srp(otg); | 226 | return otg->start_srp(otg); |
214 | } | 227 | } |
215 | 228 | ||
229 | /* notifiers */ | ||
230 | static inline int | ||
231 | otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | ||
232 | { | ||
233 | return blocking_notifier_chain_register(&otg->notifier, nb); | ||
234 | } | ||
235 | |||
236 | static inline void | ||
237 | otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) | ||
238 | { | ||
239 | blocking_notifier_chain_unregister(&otg->notifier, nb); | ||
240 | } | ||
216 | 241 | ||
217 | /* for OTG controller drivers (and maybe other stuff) */ | 242 | /* for OTG controller drivers (and maybe other stuff) */ |
218 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); | 243 | extern int usb_bus_start_enum(struct usb_bus *bus, unsigned port_num); |
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 2526f3bbd273..0a555dd131fc 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h | |||
@@ -19,4 +19,7 @@ | |||
19 | /* device can't handle its Configuration or Interface strings */ | 19 | /* device can't handle its Configuration or Interface strings */ |
20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 | 20 | #define USB_QUIRK_CONFIG_INTF_STRINGS 0x00000008 |
21 | 21 | ||
22 | /*device will morph if reset, don't use reset for handling errors */ | ||
23 | #define USB_QUIRK_RESET_MORPHS 0x00000010 | ||
24 | |||
22 | #endif /* __LINUX_USB_QUIRKS_H */ | 25 | #endif /* __LINUX_USB_QUIRKS_H */ |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 1819396ed501..0a458b861933 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -351,14 +351,11 @@ static inline void usb_serial_debug_data(int debug, | |||
351 | 351 | ||
352 | /* Use our own dbg macro */ | 352 | /* Use our own dbg macro */ |
353 | #undef dbg | 353 | #undef dbg |
354 | #define dbg(format, arg...) \ | 354 | #define dbg(format, arg...) \ |
355 | do { \ | 355 | do { \ |
356 | if (debug) \ | 356 | if (debug) \ |
357 | printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , \ | 357 | printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \ |
358 | ## arg); \ | 358 | } while (0) |
359 | } while (0) | ||
360 | |||
361 | |||
362 | 359 | ||
363 | #endif /* __LINUX_USB_SERIAL_H */ | 360 | #endif /* __LINUX_USB_SERIAL_H */ |
364 | 361 | ||
diff --git a/include/linux/usb/vstusb.h b/include/linux/usb/vstusb.h deleted file mode 100644 index 1cfac67191ff..000000000000 --- a/include/linux/usb/vstusb.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /***************************************************************************** | ||
2 | * File: drivers/usb/misc/vstusb.h | ||
3 | * | ||
4 | * Purpose: Support for the bulk USB Vernier Spectrophotometers | ||
5 | * | ||
6 | * Author: EQware Engineering, Inc. | ||
7 | * Oregon City, OR, USA 97045 | ||
8 | * | ||
9 | * Copyright: 2007, 2008 | ||
10 | * Vernier Software & Technology | ||
11 | * Beaverton, OR, USA 97005 | ||
12 | * | ||
13 | * Web: www.vernier.com | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License version 2 as | ||
17 | * published by the Free Software Foundation. | ||
18 | * | ||
19 | *****************************************************************************/ | ||
20 | /***************************************************************************** | ||
21 | * | ||
22 | * The vstusb module is a standard usb 'client' driver running on top of the | ||
23 | * standard usb host controller stack. | ||
24 | * | ||
25 | * In general, vstusb supports standard bulk usb pipes. It supports multiple | ||
26 | * devices and multiple pipes per device. | ||
27 | * | ||
28 | * The vstusb driver supports two interfaces: | ||
29 | * 1 - ioctl SEND_PIPE/RECV_PIPE - a general bulk write/read msg | ||
30 | * interface to any pipe with timeout support; | ||
31 | * 2 - standard read/write with ioctl config - offers standard read/write | ||
32 | * interface with ioctl configured pipes and timeouts. | ||
33 | * | ||
34 | * Both interfaces can be signal from other process and will abort its i/o | ||
35 | * operation. | ||
36 | * | ||
37 | * A timeout of 0 means NO timeout. The user can still terminate the read via | ||
38 | * signal. | ||
39 | * | ||
40 | * If using multiple threads with this driver, the user should ensure that | ||
41 | * any reads, writes, or ioctls are complete before closing the device. | ||
42 | * Changing read/write timeouts or pipes takes effect on next read/write. | ||
43 | * | ||
44 | *****************************************************************************/ | ||
45 | |||
46 | struct vstusb_args { | ||
47 | union { | ||
48 | /* this struct is used for IOCTL_VSTUSB_SEND_PIPE, * | ||
49 | * IOCTL_VSTUSB_RECV_PIPE, and read()/write() fops */ | ||
50 | struct { | ||
51 | void __user *buffer; | ||
52 | size_t count; | ||
53 | unsigned int timeout_ms; | ||
54 | int pipe; | ||
55 | }; | ||
56 | |||
57 | /* this one is used for IOCTL_VSTUSB_CONFIG_RW */ | ||
58 | struct { | ||
59 | int rd_pipe; | ||
60 | int rd_timeout_ms; | ||
61 | int wr_pipe; | ||
62 | int wr_timeout_ms; | ||
63 | }; | ||
64 | }; | ||
65 | }; | ||
66 | |||
67 | #define VST_IOC_MAGIC 'L' | ||
68 | #define VST_IOC_FIRST 0x20 | ||
69 | #define IOCTL_VSTUSB_SEND_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST) | ||
70 | #define IOCTL_VSTUSB_RECV_PIPE _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 1) | ||
71 | #define IOCTL_VSTUSB_CONFIG_RW _IO(VST_IOC_MAGIC, VST_IOC_FIRST + 2) | ||
diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h new file mode 100644 index 000000000000..ae9ab13b963d --- /dev/null +++ b/include/linux/vga_switcheroo.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2010 Red Hat Inc. | ||
3 | * Author : Dave Airlie <airlied@redhat.com> | ||
4 | * | ||
5 | * Licensed under GPLv2 | ||
6 | * | ||
7 | * vga_switcheroo.h - Support for laptop with dual GPU using one set of outputs | ||
8 | */ | ||
9 | |||
10 | #include <linux/fb.h> | ||
11 | |||
12 | enum vga_switcheroo_state { | ||
13 | VGA_SWITCHEROO_OFF, | ||
14 | VGA_SWITCHEROO_ON, | ||
15 | }; | ||
16 | |||
17 | enum vga_switcheroo_client_id { | ||
18 | VGA_SWITCHEROO_IGD, | ||
19 | VGA_SWITCHEROO_DIS, | ||
20 | VGA_SWITCHEROO_MAX_CLIENTS, | ||
21 | }; | ||
22 | |||
23 | struct vga_switcheroo_handler { | ||
24 | int (*switchto)(enum vga_switcheroo_client_id id); | ||
25 | int (*power_state)(enum vga_switcheroo_client_id id, | ||
26 | enum vga_switcheroo_state state); | ||
27 | int (*init)(void); | ||
28 | int (*get_client_id)(struct pci_dev *pdev); | ||
29 | }; | ||
30 | |||
31 | |||
32 | #if defined(CONFIG_VGA_SWITCHEROO) | ||
33 | void vga_switcheroo_unregister_client(struct pci_dev *dev); | ||
34 | int vga_switcheroo_register_client(struct pci_dev *dev, | ||
35 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | ||
36 | bool (*can_switch)(struct pci_dev *dev)); | ||
37 | |||
38 | void vga_switcheroo_client_fb_set(struct pci_dev *dev, | ||
39 | struct fb_info *info); | ||
40 | |||
41 | int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler); | ||
42 | void vga_switcheroo_unregister_handler(void); | ||
43 | |||
44 | int vga_switcheroo_process_delayed_switch(void); | ||
45 | |||
46 | #else | ||
47 | |||
48 | static inline void vga_switcheroo_unregister_client(struct pci_dev *dev) {} | ||
49 | static inline int vga_switcheroo_register_client(struct pci_dev *dev, | ||
50 | void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state), | ||
51 | bool (*can_switch)(struct pci_dev *dev)) { return 0; } | ||
52 | static inline void vga_switcheroo_client_fb_set(struct pci_dev *dev, struct fb_info *info) {} | ||
53 | static inline int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) { return 0; } | ||
54 | static inline void vga_switcheroo_unregister_handler(void) {} | ||
55 | static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } | ||
56 | |||
57 | #endif | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index ee03bba9c5df..117f0dd8ad03 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -78,22 +78,22 @@ DECLARE_PER_CPU(struct vm_event_state, vm_event_states); | |||
78 | 78 | ||
79 | static inline void __count_vm_event(enum vm_event_item item) | 79 | static inline void __count_vm_event(enum vm_event_item item) |
80 | { | 80 | { |
81 | __this_cpu_inc(per_cpu_var(vm_event_states).event[item]); | 81 | __this_cpu_inc(vm_event_states.event[item]); |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline void count_vm_event(enum vm_event_item item) | 84 | static inline void count_vm_event(enum vm_event_item item) |
85 | { | 85 | { |
86 | this_cpu_inc(per_cpu_var(vm_event_states).event[item]); | 86 | this_cpu_inc(vm_event_states.event[item]); |
87 | } | 87 | } |
88 | 88 | ||
89 | static inline void __count_vm_events(enum vm_event_item item, long delta) | 89 | static inline void __count_vm_events(enum vm_event_item item, long delta) |
90 | { | 90 | { |
91 | __this_cpu_add(per_cpu_var(vm_event_states).event[item], delta); | 91 | __this_cpu_add(vm_event_states.event[item], delta); |
92 | } | 92 | } |
93 | 93 | ||
94 | static inline void count_vm_events(enum vm_event_item item, long delta) | 94 | static inline void count_vm_events(enum vm_event_item item, long delta) |
95 | { | 95 | { |
96 | this_cpu_add(per_cpu_var(vm_event_states).event[item], delta); | 96 | this_cpu_add(vm_event_states.event[item], delta); |
97 | } | 97 | } |
98 | 98 | ||
99 | extern void all_vm_events(unsigned long *); | 99 | extern void all_vm_events(unsigned long *); |
diff --git a/include/linux/vt.h b/include/linux/vt.h index d5dd0bc408fd..778b7b2a47d4 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -27,7 +27,7 @@ struct vt_mode { | |||
27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ | 27 | #define VT_SETMODE 0x5602 /* set mode of active vt */ |
28 | #define VT_AUTO 0x00 /* auto vt switching */ | 28 | #define VT_AUTO 0x00 /* auto vt switching */ |
29 | #define VT_PROCESS 0x01 /* process controls switching */ | 29 | #define VT_PROCESS 0x01 /* process controls switching */ |
30 | #define VT_ACKACQ 0x02 /* acknowledge switch */ | 30 | #define VT_PROCESS_AUTO 0x02 /* process is notified of switching */ |
31 | 31 | ||
32 | struct vt_stat { | 32 | struct vt_stat { |
33 | unsigned short v_active; /* active vt */ | 33 | unsigned short v_active; /* active vt */ |
@@ -38,6 +38,7 @@ struct vt_stat { | |||
38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ | 38 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ |
39 | 39 | ||
40 | #define VT_RELDISP 0x5605 /* release display */ | 40 | #define VT_RELDISP 0x5605 /* release display */ |
41 | #define VT_ACKACQ 0x02 /* acknowledge switch */ | ||
41 | 42 | ||
42 | #define VT_ACTIVATE 0x5606 /* make vt active */ | 43 | #define VT_ACTIVATE 0x5606 /* make vt active */ |
43 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ | 44 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ |
diff --git a/include/rdma/ib_pack.h b/include/rdma/ib_pack.h index d7fc45c4eba9..cbb50f4da3dd 100644 --- a/include/rdma/ib_pack.h +++ b/include/rdma/ib_pack.h | |||
@@ -232,6 +232,7 @@ void ib_unpack(const struct ib_field *desc, | |||
232 | 232 | ||
233 | void ib_ud_header_init(int payload_bytes, | 233 | void ib_ud_header_init(int payload_bytes, |
234 | int grh_present, | 234 | int grh_present, |
235 | int immediate_present, | ||
235 | struct ib_ud_header *header); | 236 | struct ib_ud_header *header); |
236 | 237 | ||
237 | int ib_ud_header_pack(struct ib_ud_header *header, | 238 | int ib_ud_header_pack(struct ib_ud_header *header, |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 09509edb1c5f..a585e0f92bc3 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -984,9 +984,9 @@ struct ib_device { | |||
984 | struct list_head event_handler_list; | 984 | struct list_head event_handler_list; |
985 | spinlock_t event_handler_lock; | 985 | spinlock_t event_handler_lock; |
986 | 986 | ||
987 | spinlock_t client_data_lock; | ||
987 | struct list_head core_list; | 988 | struct list_head core_list; |
988 | struct list_head client_data_list; | 989 | struct list_head client_data_list; |
989 | spinlock_t client_data_lock; | ||
990 | 990 | ||
991 | struct ib_cache cache; | 991 | struct ib_cache cache; |
992 | int *pkey_tbl_len; | 992 | int *pkey_tbl_len; |
@@ -1144,8 +1144,8 @@ struct ib_device { | |||
1144 | IB_DEV_UNREGISTERED | 1144 | IB_DEV_UNREGISTERED |
1145 | } reg_state; | 1145 | } reg_state; |
1146 | 1146 | ||
1147 | u64 uverbs_cmd_mask; | ||
1148 | int uverbs_abi_ver; | 1147 | int uverbs_abi_ver; |
1148 | u64 uverbs_cmd_mask; | ||
1149 | 1149 | ||
1150 | char node_desc[64]; | 1150 | char node_desc[64]; |
1151 | __be64 node_guid; | 1151 | __be64 node_guid; |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index c6b2962315b3..4fae90304648 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -67,7 +67,6 @@ enum rdma_port_space { | |||
67 | RDMA_PS_IPOIB = 0x0002, | 67 | RDMA_PS_IPOIB = 0x0002, |
68 | RDMA_PS_TCP = 0x0106, | 68 | RDMA_PS_TCP = 0x0106, |
69 | RDMA_PS_UDP = 0x0111, | 69 | RDMA_PS_UDP = 0x0111, |
70 | RDMA_PS_SCTP = 0x0183 | ||
71 | }; | 70 | }; |
72 | 71 | ||
73 | struct rdma_addr { | 72 | struct rdma_addr { |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index d0b6cd3afb2f..2aa6aa3e8f61 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -874,6 +874,107 @@ TRACE_EVENT(ext4_forget, | |||
874 | __entry->mode, __entry->is_metadata, __entry->block) | 874 | __entry->mode, __entry->is_metadata, __entry->block) |
875 | ); | 875 | ); |
876 | 876 | ||
877 | TRACE_EVENT(ext4_da_update_reserve_space, | ||
878 | TP_PROTO(struct inode *inode, int used_blocks), | ||
879 | |||
880 | TP_ARGS(inode, used_blocks), | ||
881 | |||
882 | TP_STRUCT__entry( | ||
883 | __field( dev_t, dev ) | ||
884 | __field( ino_t, ino ) | ||
885 | __field( umode_t, mode ) | ||
886 | __field( __u64, i_blocks ) | ||
887 | __field( int, used_blocks ) | ||
888 | __field( int, reserved_data_blocks ) | ||
889 | __field( int, reserved_meta_blocks ) | ||
890 | __field( int, allocated_meta_blocks ) | ||
891 | ), | ||
892 | |||
893 | TP_fast_assign( | ||
894 | __entry->dev = inode->i_sb->s_dev; | ||
895 | __entry->ino = inode->i_ino; | ||
896 | __entry->mode = inode->i_mode; | ||
897 | __entry->i_blocks = inode->i_blocks; | ||
898 | __entry->used_blocks = used_blocks; | ||
899 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
900 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
901 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | ||
902 | ), | ||
903 | |||
904 | TP_printk("dev %s ino %lu mode 0%o i_blocks %llu used_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | ||
905 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
906 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
907 | __entry->used_blocks, __entry->reserved_data_blocks, | ||
908 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | ||
909 | ); | ||
910 | |||
911 | TRACE_EVENT(ext4_da_reserve_space, | ||
912 | TP_PROTO(struct inode *inode, int md_needed), | ||
913 | |||
914 | TP_ARGS(inode, md_needed), | ||
915 | |||
916 | TP_STRUCT__entry( | ||
917 | __field( dev_t, dev ) | ||
918 | __field( ino_t, ino ) | ||
919 | __field( umode_t, mode ) | ||
920 | __field( __u64, i_blocks ) | ||
921 | __field( int, md_needed ) | ||
922 | __field( int, reserved_data_blocks ) | ||
923 | __field( int, reserved_meta_blocks ) | ||
924 | ), | ||
925 | |||
926 | TP_fast_assign( | ||
927 | __entry->dev = inode->i_sb->s_dev; | ||
928 | __entry->ino = inode->i_ino; | ||
929 | __entry->mode = inode->i_mode; | ||
930 | __entry->i_blocks = inode->i_blocks; | ||
931 | __entry->md_needed = md_needed; | ||
932 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
933 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
934 | ), | ||
935 | |||
936 | TP_printk("dev %s ino %lu mode 0%o i_blocks %llu md_needed %d reserved_data_blocks %d reserved_meta_blocks %d", | ||
937 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
938 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
939 | __entry->md_needed, __entry->reserved_data_blocks, | ||
940 | __entry->reserved_meta_blocks) | ||
941 | ); | ||
942 | |||
943 | TRACE_EVENT(ext4_da_release_space, | ||
944 | TP_PROTO(struct inode *inode, int freed_blocks), | ||
945 | |||
946 | TP_ARGS(inode, freed_blocks), | ||
947 | |||
948 | TP_STRUCT__entry( | ||
949 | __field( dev_t, dev ) | ||
950 | __field( ino_t, ino ) | ||
951 | __field( umode_t, mode ) | ||
952 | __field( __u64, i_blocks ) | ||
953 | __field( int, freed_blocks ) | ||
954 | __field( int, reserved_data_blocks ) | ||
955 | __field( int, reserved_meta_blocks ) | ||
956 | __field( int, allocated_meta_blocks ) | ||
957 | ), | ||
958 | |||
959 | TP_fast_assign( | ||
960 | __entry->dev = inode->i_sb->s_dev; | ||
961 | __entry->ino = inode->i_ino; | ||
962 | __entry->mode = inode->i_mode; | ||
963 | __entry->i_blocks = inode->i_blocks; | ||
964 | __entry->freed_blocks = freed_blocks; | ||
965 | __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; | ||
966 | __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; | ||
967 | __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; | ||
968 | ), | ||
969 | |||
970 | TP_printk("dev %s ino %lu mode 0%o i_blocks %llu freed_blocks %d reserved_data_blocks %d reserved_meta_blocks %d allocated_meta_blocks %d", | ||
971 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, | ||
972 | __entry->mode, (unsigned long long) __entry->i_blocks, | ||
973 | __entry->freed_blocks, __entry->reserved_data_blocks, | ||
974 | __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) | ||
975 | ); | ||
976 | |||
977 | |||
877 | #endif /* _TRACE_EXT4_H */ | 978 | #endif /* _TRACE_EXT4_H */ |
878 | 979 | ||
879 | /* This part must be outside protection */ | 980 | /* This part must be outside protection */ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 96b370a050de..bf16545cc977 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -199,6 +199,34 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
199 | __entry->forced_to_close, __entry->written, __entry->dropped) | 199 | __entry->forced_to_close, __entry->written, __entry->dropped) |
200 | ); | 200 | ); |
201 | 201 | ||
202 | TRACE_EVENT(jbd2_cleanup_journal_tail, | ||
203 | |||
204 | TP_PROTO(journal_t *journal, tid_t first_tid, | ||
205 | unsigned long block_nr, unsigned long freed), | ||
206 | |||
207 | TP_ARGS(journal, first_tid, block_nr, freed), | ||
208 | |||
209 | TP_STRUCT__entry( | ||
210 | __field( dev_t, dev ) | ||
211 | __field( tid_t, tail_sequence ) | ||
212 | __field( tid_t, first_tid ) | ||
213 | __field(unsigned long, block_nr ) | ||
214 | __field(unsigned long, freed ) | ||
215 | ), | ||
216 | |||
217 | TP_fast_assign( | ||
218 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
219 | __entry->tail_sequence = journal->j_tail_sequence; | ||
220 | __entry->first_tid = first_tid; | ||
221 | __entry->block_nr = block_nr; | ||
222 | __entry->freed = freed; | ||
223 | ), | ||
224 | |||
225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", | ||
226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, | ||
227 | __entry->first_tid, __entry->block_nr, __entry->freed) | ||
228 | ); | ||
229 | |||
202 | #endif /* _TRACE_JBD2_H */ | 230 | #endif /* _TRACE_JBD2_H */ |
203 | 231 | ||
204 | /* This part must be outside protection */ | 232 | /* This part must be outside protection */ |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index dbe108455275..b17d49dfc3ef 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
@@ -145,6 +145,47 @@ TRACE_EVENT(kvm_mmio, | |||
145 | __entry->len, __entry->gpa, __entry->val) | 145 | __entry->len, __entry->gpa, __entry->val) |
146 | ); | 146 | ); |
147 | 147 | ||
148 | #define kvm_fpu_load_symbol \ | ||
149 | {0, "unload"}, \ | ||
150 | {1, "load"} | ||
151 | |||
152 | TRACE_EVENT(kvm_fpu, | ||
153 | TP_PROTO(int load), | ||
154 | TP_ARGS(load), | ||
155 | |||
156 | TP_STRUCT__entry( | ||
157 | __field( u32, load ) | ||
158 | ), | ||
159 | |||
160 | TP_fast_assign( | ||
161 | __entry->load = load; | ||
162 | ), | ||
163 | |||
164 | TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) | ||
165 | ); | ||
166 | |||
167 | TRACE_EVENT(kvm_age_page, | ||
168 | TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), | ||
169 | TP_ARGS(hva, slot, ref), | ||
170 | |||
171 | TP_STRUCT__entry( | ||
172 | __field( u64, hva ) | ||
173 | __field( u64, gfn ) | ||
174 | __field( u8, referenced ) | ||
175 | ), | ||
176 | |||
177 | TP_fast_assign( | ||
178 | __entry->hva = hva; | ||
179 | __entry->gfn = | ||
180 | slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT); | ||
181 | __entry->referenced = ref; | ||
182 | ), | ||
183 | |||
184 | TP_printk("hva %llx gfn %llx %s", | ||
185 | __entry->hva, __entry->gfn, | ||
186 | __entry->referenced ? "YOUNG" : "OLD") | ||
187 | ); | ||
188 | |||
148 | #endif /* _TRACE_KVM_MAIN_H */ | 189 | #endif /* _TRACE_KVM_MAIN_H */ |
149 | 190 | ||
150 | /* This part must be outside protection */ | 191 | /* This part must be outside protection */ |