diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-08-28 01:00:20 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-08-28 01:00:20 -0400 |
commit | 4b61bb575b1fb42ab1df228ae7812e5135f656da (patch) | |
tree | 03456466e6f678456ea462a7da4b352d1aa03aa3 /include | |
parent | 805423e84e900e56c834aadee61a020b0d5092c3 (diff) | |
parent | 326ba5010a5429a5a528b268b36a5900d4ab0eba (diff) |
Merge commit 'v2.6.31-rc8' into next
Diffstat (limited to 'include')
65 files changed, 621 insertions, 229 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 3e798593b17b..ab0b85cf21f3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -242,6 +242,10 @@ acpi_os_derive_pci_id(acpi_handle rhandle, | |||
242 | acpi_status acpi_os_validate_interface(char *interface); | 242 | acpi_status acpi_os_validate_interface(char *interface); |
243 | acpi_status acpi_osi_invalidate(char* interface); | 243 | acpi_status acpi_osi_invalidate(char* interface); |
244 | 244 | ||
245 | acpi_status | ||
246 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | ||
247 | acpi_size length, char *name); | ||
248 | |||
245 | u64 acpi_os_get_timer(void); | 249 | u64 acpi_os_get_timer(void); |
246 | 250 | ||
247 | acpi_status acpi_os_signal(u32 function, void *info); | 251 | acpi_status acpi_os_signal(u32 function, void *info); |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index baf1e0a9a7ee..740ac3ad8fd0 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -174,7 +174,7 @@ struct acpi_processor_throttling { | |||
174 | cpumask_var_t shared_cpu_map; | 174 | cpumask_var_t shared_cpu_map; |
175 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); | 175 | int (*acpi_processor_get_throttling) (struct acpi_processor * pr); |
176 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, | 176 | int (*acpi_processor_set_throttling) (struct acpi_processor * pr, |
177 | int state); | 177 | int state, bool force); |
178 | 178 | ||
179 | u32 address; | 179 | u32 address; |
180 | u8 duty_offset; | 180 | u8 duty_offset; |
@@ -321,7 +321,8 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
321 | /* in processor_throttling.c */ | 321 | /* in processor_throttling.c */ |
322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | 322 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); |
323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 323 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 324 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, |
325 | int state, bool force); | ||
325 | extern const struct file_operations acpi_processor_throttling_fops; | 326 | extern const struct file_operations acpi_processor_throttling_fops; |
326 | extern void acpi_processor_throttling_init(void); | 327 | extern void acpi_processor_throttling_init(void); |
327 | /* in processor_idle.c */ | 328 | /* in processor_idle.c */ |
diff --git a/include/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h index 9d40e879f99e..77ff547730af 100644 --- a/include/asm-generic/4level-fixup.h +++ b/include/asm-generic/4level-fixup.h | |||
@@ -27,9 +27,9 @@ | |||
27 | #define pud_page_vaddr(pud) pgd_page_vaddr(pud) | 27 | #define pud_page_vaddr(pud) pgd_page_vaddr(pud) |
28 | 28 | ||
29 | #undef pud_free_tlb | 29 | #undef pud_free_tlb |
30 | #define pud_free_tlb(tlb, x) do { } while (0) | 30 | #define pud_free_tlb(tlb, x, addr) do { } while (0) |
31 | #define pud_free(mm, x) do { } while (0) | 31 | #define pud_free(mm, x) do { } while (0) |
32 | #define __pud_free_tlb(tlb, x) do { } while (0) | 32 | #define __pud_free_tlb(tlb, x, addr) do { } while (0) |
33 | 33 | ||
34 | #undef pud_addr_end | 34 | #undef pud_addr_end |
35 | #define pud_addr_end(addr, end) (end) | 35 | #define pud_addr_end(addr, end) (end) |
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index a7cdc48e8b78..725612b793ce 100644 --- a/include/asm-generic/pgtable-nopmd.h +++ b/include/asm-generic/pgtable-nopmd.h | |||
@@ -59,7 +59,7 @@ static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address) | |||
59 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) | 59 | static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) |
60 | { | 60 | { |
61 | } | 61 | } |
62 | #define __pmd_free_tlb(tlb, x) do { } while (0) | 62 | #define __pmd_free_tlb(tlb, x, a) do { } while (0) |
63 | 63 | ||
64 | #undef pmd_addr_end | 64 | #undef pmd_addr_end |
65 | #define pmd_addr_end(addr, end) (end) | 65 | #define pmd_addr_end(addr, end) (end) |
diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h index 87cf449a6df3..810431d8351b 100644 --- a/include/asm-generic/pgtable-nopud.h +++ b/include/asm-generic/pgtable-nopud.h | |||
@@ -52,7 +52,7 @@ static inline pud_t * pud_offset(pgd_t * pgd, unsigned long address) | |||
52 | */ | 52 | */ |
53 | #define pud_alloc_one(mm, address) NULL | 53 | #define pud_alloc_one(mm, address) NULL |
54 | #define pud_free(mm, x) do { } while (0) | 54 | #define pud_free(mm, x) do { } while (0) |
55 | #define __pud_free_tlb(tlb, x) do { } while (0) | 55 | #define __pud_free_tlb(tlb, x, a) do { } while (0) |
56 | 56 | ||
57 | #undef pud_addr_end | 57 | #undef pud_addr_end |
58 | #define pud_addr_end(addr, end) (end) | 58 | #define pud_addr_end(addr, end) (end) |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index f490e43a90b9..e43f9766259f 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -123,24 +123,24 @@ static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) | |||
123 | __tlb_remove_tlb_entry(tlb, ptep, address); \ | 123 | __tlb_remove_tlb_entry(tlb, ptep, address); \ |
124 | } while (0) | 124 | } while (0) |
125 | 125 | ||
126 | #define pte_free_tlb(tlb, ptep) \ | 126 | #define pte_free_tlb(tlb, ptep, address) \ |
127 | do { \ | 127 | do { \ |
128 | tlb->need_flush = 1; \ | 128 | tlb->need_flush = 1; \ |
129 | __pte_free_tlb(tlb, ptep); \ | 129 | __pte_free_tlb(tlb, ptep, address); \ |
130 | } while (0) | 130 | } while (0) |
131 | 131 | ||
132 | #ifndef __ARCH_HAS_4LEVEL_HACK | 132 | #ifndef __ARCH_HAS_4LEVEL_HACK |
133 | #define pud_free_tlb(tlb, pudp) \ | 133 | #define pud_free_tlb(tlb, pudp, address) \ |
134 | do { \ | 134 | do { \ |
135 | tlb->need_flush = 1; \ | 135 | tlb->need_flush = 1; \ |
136 | __pud_free_tlb(tlb, pudp); \ | 136 | __pud_free_tlb(tlb, pudp, address); \ |
137 | } while (0) | 137 | } while (0) |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #define pmd_free_tlb(tlb, pmdp) \ | 140 | #define pmd_free_tlb(tlb, pmdp, address) \ |
141 | do { \ | 141 | do { \ |
142 | tlb->need_flush = 1; \ | 142 | tlb->need_flush = 1; \ |
143 | __pmd_free_tlb(tlb, pmdp); \ | 143 | __pmd_free_tlb(tlb, pmdp, address); \ |
144 | } while (0) | 144 | } while (0) |
145 | 145 | ||
146 | #define tlb_migrate_finish(mm) do {} while (0) | 146 | #define tlb_migrate_finish(mm) do {} while (0) |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 7174818c2c13..853508499d20 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -257,9 +257,12 @@ | |||
257 | {0x1002, 0x940F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ | 257 | {0x1002, 0x940F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R600|RADEON_NEW_MEMMAP}, \ |
258 | {0x1002, 0x94A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 258 | {0x1002, 0x94A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
259 | {0x1002, 0x94A1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 259 | {0x1002, 0x94A1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
260 | {0x1002, 0x94A3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
260 | {0x1002, 0x94B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | 261 | {0x1002, 0x94B1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ |
261 | {0x1002, 0x94B3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | 262 | {0x1002, 0x94B3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ |
263 | {0x1002, 0x94B4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | ||
262 | {0x1002, 0x94B5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ | 264 | {0x1002, 0x94B5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_NEW_MEMMAP}, \ |
265 | {0x1002, 0x94B9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
263 | {0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 266 | {0x1002, 0x9440, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
264 | {0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 267 | {0x1002, 0x9441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
265 | {0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 268 | {0x1002, 0x9442, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
@@ -288,6 +291,7 @@ | |||
288 | {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 291 | {0x1002, 0x948F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
289 | {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 292 | {0x1002, 0x9490, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
290 | {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 293 | {0x1002, 0x9491, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
294 | {0x1002, 0x9495, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | ||
291 | {0x1002, 0x9498, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 295 | {0x1002, 0x9498, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
292 | {0x1002, 0x949C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 296 | {0x1002, 0x949C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
293 | {0x1002, 0x949E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ | 297 | {0x1002, 0x949E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV730|RADEON_NEW_MEMMAP}, \ |
@@ -325,6 +329,7 @@ | |||
325 | {0x1002, 0x9552, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 329 | {0x1002, 0x9552, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
326 | {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 330 | {0x1002, 0x9553, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
327 | {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 331 | {0x1002, 0x9555, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
332 | {0x1002, 0x9557, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
328 | {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \ | 333 | {0x1002, 0x9580, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_NEW_MEMMAP}, \ |
329 | {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 334 | {0x1002, 0x9581, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
330 | {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 335 | {0x1002, 0x9583, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV630|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -365,6 +370,11 @@ | |||
365 | {0x1002, 0x9614, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 370 | {0x1002, 0x9614, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
366 | {0x1002, 0x9615, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 371 | {0x1002, 0x9615, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
367 | {0x1002, 0x9616, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 372 | {0x1002, 0x9616, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
373 | {0x1002, 0x9710, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
374 | {0x1002, 0x9711, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
375 | {0x1002, 0x9712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
376 | {0x1002, 0x9713, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
377 | {0x1002, 0x9714, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
368 | {0, 0, 0} | 378 | {0, 0, 0} |
369 | 379 | ||
370 | #define r128_PCI_IDS \ | 380 | #define r128_PCI_IDS \ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 41862e9a4c20..2ba61e18fc8b 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -506,6 +506,9 @@ typedef struct { | |||
506 | #define DRM_RADEON_GEM_WAIT_IDLE 0x24 | 506 | #define DRM_RADEON_GEM_WAIT_IDLE 0x24 |
507 | #define DRM_RADEON_CS 0x26 | 507 | #define DRM_RADEON_CS 0x26 |
508 | #define DRM_RADEON_INFO 0x27 | 508 | #define DRM_RADEON_INFO 0x27 |
509 | #define DRM_RADEON_GEM_SET_TILING 0x28 | ||
510 | #define DRM_RADEON_GEM_GET_TILING 0x29 | ||
511 | #define DRM_RADEON_GEM_BUSY 0x2a | ||
509 | 512 | ||
510 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) | 513 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) |
511 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) | 514 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) |
@@ -544,7 +547,9 @@ typedef struct { | |||
544 | #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) | 547 | #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) |
545 | #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) | 548 | #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) |
546 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) | 549 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) |
547 | 550 | #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) | |
551 | #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) | ||
552 | #define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) | ||
548 | 553 | ||
549 | typedef struct drm_radeon_init { | 554 | typedef struct drm_radeon_init { |
550 | enum { | 555 | enum { |
@@ -704,6 +709,7 @@ typedef struct drm_radeon_indirect { | |||
704 | #define RADEON_PARAM_FB_LOCATION 14 /* FB location */ | 709 | #define RADEON_PARAM_FB_LOCATION 14 /* FB location */ |
705 | #define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */ | 710 | #define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */ |
706 | #define RADEON_PARAM_DEVICE_ID 16 | 711 | #define RADEON_PARAM_DEVICE_ID 16 |
712 | #define RADEON_PARAM_NUM_Z_PIPES 17 /* num Z pipes */ | ||
707 | 713 | ||
708 | typedef struct drm_radeon_getparam { | 714 | typedef struct drm_radeon_getparam { |
709 | int param; | 715 | int param; |
@@ -796,6 +802,24 @@ struct drm_radeon_gem_create { | |||
796 | uint32_t flags; | 802 | uint32_t flags; |
797 | }; | 803 | }; |
798 | 804 | ||
805 | #define RADEON_TILING_MACRO 0x1 | ||
806 | #define RADEON_TILING_MICRO 0x2 | ||
807 | #define RADEON_TILING_SWAP 0x4 | ||
808 | #define RADEON_TILING_SURFACE 0x8 /* this object requires a surface | ||
809 | * when mapped - i.e. front buffer */ | ||
810 | |||
811 | struct drm_radeon_gem_set_tiling { | ||
812 | uint32_t handle; | ||
813 | uint32_t tiling_flags; | ||
814 | uint32_t pitch; | ||
815 | }; | ||
816 | |||
817 | struct drm_radeon_gem_get_tiling { | ||
818 | uint32_t handle; | ||
819 | uint32_t tiling_flags; | ||
820 | uint32_t pitch; | ||
821 | }; | ||
822 | |||
799 | struct drm_radeon_gem_mmap { | 823 | struct drm_radeon_gem_mmap { |
800 | uint32_t handle; | 824 | uint32_t handle; |
801 | uint32_t pad; | 825 | uint32_t pad; |
@@ -817,7 +841,7 @@ struct drm_radeon_gem_wait_idle { | |||
817 | 841 | ||
818 | struct drm_radeon_gem_busy { | 842 | struct drm_radeon_gem_busy { |
819 | uint32_t handle; | 843 | uint32_t handle; |
820 | uint32_t busy; | 844 | uint32_t domain; |
821 | }; | 845 | }; |
822 | 846 | ||
823 | struct drm_radeon_gem_pread { | 847 | struct drm_radeon_gem_pread { |
@@ -874,6 +898,7 @@ struct drm_radeon_cs { | |||
874 | 898 | ||
875 | #define RADEON_INFO_DEVICE_ID 0x00 | 899 | #define RADEON_INFO_DEVICE_ID 0x00 |
876 | #define RADEON_INFO_NUM_GB_PIPES 0x01 | 900 | #define RADEON_INFO_NUM_GB_PIPES 0x01 |
901 | #define RADEON_INFO_NUM_Z_PIPES 0x02 | ||
877 | 902 | ||
878 | struct drm_radeon_info { | 903 | struct drm_radeon_info { |
879 | uint32_t request; | 904 | uint32_t request; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 62ed733c52a2..a68829db381a 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -121,6 +121,7 @@ struct ttm_backend { | |||
121 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) | 121 | #define TTM_PAGE_FLAG_SWAPPED (1 << 4) |
122 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) | 122 | #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) |
123 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) | 123 | #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) |
124 | #define TTM_PAGE_FLAG_DMA32 (1 << 7) | ||
124 | 125 | ||
125 | enum ttm_caching_state { | 126 | enum ttm_caching_state { |
126 | tt_uncached, | 127 | tt_uncached, |
@@ -353,6 +354,14 @@ struct ttm_bo_driver { | |||
353 | int (*sync_obj_flush) (void *sync_obj, void *sync_arg); | 354 | int (*sync_obj_flush) (void *sync_obj, void *sync_arg); |
354 | void (*sync_obj_unref) (void **sync_obj); | 355 | void (*sync_obj_unref) (void **sync_obj); |
355 | void *(*sync_obj_ref) (void *sync_obj); | 356 | void *(*sync_obj_ref) (void *sync_obj); |
357 | |||
358 | /* hook to notify driver about a driver move so it | ||
359 | * can do tiling things */ | ||
360 | void (*move_notify)(struct ttm_buffer_object *bo, | ||
361 | struct ttm_mem_reg *new_mem); | ||
362 | /* notify the driver we are taking a fault on this BO | ||
363 | * and have reserved it */ | ||
364 | void (*fault_reserve_notify)(struct ttm_buffer_object *bo); | ||
356 | }; | 365 | }; |
357 | 366 | ||
358 | #define TTM_NUM_MEM_TYPES 8 | 367 | #define TTM_NUM_MEM_TYPES 8 |
@@ -429,6 +438,8 @@ struct ttm_bo_device { | |||
429 | */ | 438 | */ |
430 | 439 | ||
431 | struct delayed_work wq; | 440 | struct delayed_work wq; |
441 | |||
442 | bool need_dma32; | ||
432 | }; | 443 | }; |
433 | 444 | ||
434 | /** | 445 | /** |
@@ -648,7 +659,14 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev); | |||
648 | extern int ttm_bo_device_init(struct ttm_bo_device *bdev, | 659 | extern int ttm_bo_device_init(struct ttm_bo_device *bdev, |
649 | struct ttm_mem_global *mem_glob, | 660 | struct ttm_mem_global *mem_glob, |
650 | struct ttm_bo_driver *driver, | 661 | struct ttm_bo_driver *driver, |
651 | uint64_t file_page_offset); | 662 | uint64_t file_page_offset, bool need_dma32); |
663 | |||
664 | /** | ||
665 | * ttm_bo_unmap_virtual | ||
666 | * | ||
667 | * @bo: tear down the virtual mappings for this BO | ||
668 | */ | ||
669 | extern void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); | ||
652 | 670 | ||
653 | /** | 671 | /** |
654 | * ttm_bo_reserve: | 672 | * ttm_bo_reserve: |
diff --git a/include/drm/ttm/ttm_module.h b/include/drm/ttm/ttm_module.h index 889a4c7958ae..d1d433834e4f 100644 --- a/include/drm/ttm/ttm_module.h +++ b/include/drm/ttm/ttm_module.h | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | 35 | ||
36 | #define TTM_PFX "[TTM]" | 36 | #define TTM_PFX "[TTM] " |
37 | 37 | ||
38 | enum ttm_global_types { | 38 | enum ttm_global_types { |
39 | TTM_GLOBAL_TTM_MEM = 0, | 39 | TTM_GLOBAL_TTM_MEM = 0, |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 2878811c6134..756d78b8c1c5 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -94,13 +94,13 @@ extern void __bitmap_shift_right(unsigned long *dst, | |||
94 | const unsigned long *src, int shift, int bits); | 94 | const unsigned long *src, int shift, int bits); |
95 | extern void __bitmap_shift_left(unsigned long *dst, | 95 | extern void __bitmap_shift_left(unsigned long *dst, |
96 | const unsigned long *src, int shift, int bits); | 96 | const unsigned long *src, int shift, int bits); |
97 | extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, | 97 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
98 | const unsigned long *bitmap2, int bits); | 98 | const unsigned long *bitmap2, int bits); |
99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, | 99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
100 | const unsigned long *bitmap2, int bits); | 100 | const unsigned long *bitmap2, int bits); |
101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, | 101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
102 | const unsigned long *bitmap2, int bits); | 102 | const unsigned long *bitmap2, int bits); |
103 | extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, | 103 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
104 | const unsigned long *bitmap2, int bits); | 104 | const unsigned long *bitmap2, int bits); |
105 | extern int __bitmap_intersects(const unsigned long *bitmap1, | 105 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
106 | const unsigned long *bitmap2, int bits); | 106 | const unsigned long *bitmap2, int bits); |
@@ -171,13 +171,12 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, | |||
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | static inline void bitmap_and(unsigned long *dst, const unsigned long *src1, | 174 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, |
175 | const unsigned long *src2, int nbits) | 175 | const unsigned long *src2, int nbits) |
176 | { | 176 | { |
177 | if (small_const_nbits(nbits)) | 177 | if (small_const_nbits(nbits)) |
178 | *dst = *src1 & *src2; | 178 | return (*dst = *src1 & *src2) != 0; |
179 | else | 179 | return __bitmap_and(dst, src1, src2, nbits); |
180 | __bitmap_and(dst, src1, src2, nbits); | ||
181 | } | 180 | } |
182 | 181 | ||
183 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, | 182 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, |
@@ -198,13 +197,12 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, | |||
198 | __bitmap_xor(dst, src1, src2, nbits); | 197 | __bitmap_xor(dst, src1, src2, nbits); |
199 | } | 198 | } |
200 | 199 | ||
201 | static inline void bitmap_andnot(unsigned long *dst, const unsigned long *src1, | 200 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, |
202 | const unsigned long *src2, int nbits) | 201 | const unsigned long *src2, int nbits) |
203 | { | 202 | { |
204 | if (small_const_nbits(nbits)) | 203 | if (small_const_nbits(nbits)) |
205 | *dst = *src1 & ~(*src2); | 204 | return (*dst = *src1 & ~(*src2)) != 0; |
206 | else | 205 | return __bitmap_andnot(dst, src1, src2, nbits); |
207 | __bitmap_andnot(dst, src1, src2, nbits); | ||
208 | } | 206 | } |
209 | 207 | ||
210 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, | 208 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index e7cb5dbf6c26..69103e053c92 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -913,6 +913,7 @@ extern void blk_queue_logical_block_size(struct request_queue *, unsigned short) | |||
913 | extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); | 913 | extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); |
914 | extern void blk_queue_alignment_offset(struct request_queue *q, | 914 | extern void blk_queue_alignment_offset(struct request_queue *q, |
915 | unsigned int alignment); | 915 | unsigned int alignment); |
916 | extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min); | ||
916 | extern void blk_queue_io_min(struct request_queue *q, unsigned int min); | 917 | extern void blk_queue_io_min(struct request_queue *q, unsigned int min); |
917 | extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); | 918 | extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); |
918 | extern void blk_set_default_limits(struct queue_limits *lim); | 919 | extern void blk_set_default_limits(struct queue_limits *lim); |
diff --git a/include/linux/cb710.h b/include/linux/cb710.h index 63bc9a4d2926..8cc10411bab2 100644 --- a/include/linux/cb710.h +++ b/include/linux/cb710.h | |||
@@ -140,29 +140,6 @@ void cb710_dump_regs(struct cb710_chip *chip, unsigned dump); | |||
140 | #include <linux/highmem.h> | 140 | #include <linux/highmem.h> |
141 | #include <linux/scatterlist.h> | 141 | #include <linux/scatterlist.h> |
142 | 142 | ||
143 | /** | ||
144 | * cb710_sg_miter_stop_writing - stop mapping iteration after writing | ||
145 | * @miter: sg mapping iter to be stopped | ||
146 | * | ||
147 | * Description: | ||
148 | * Stops mapping iterator @miter. @miter should have been started | ||
149 | * started using sg_miter_start(). A stopped iteration can be | ||
150 | * resumed by calling sg_miter_next() on it. This is useful when | ||
151 | * resources (kmap) need to be released during iteration. | ||
152 | * | ||
153 | * This is a convenience wrapper that will be optimized out for arches | ||
154 | * that don't need flush_kernel_dcache_page(). | ||
155 | * | ||
156 | * Context: | ||
157 | * IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise. | ||
158 | */ | ||
159 | static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter) | ||
160 | { | ||
161 | if (miter->page) | ||
162 | flush_kernel_dcache_page(miter->page); | ||
163 | sg_miter_stop(miter); | ||
164 | } | ||
165 | |||
166 | /* | 143 | /* |
167 | * 32-bit PIO mapping sg iterator | 144 | * 32-bit PIO mapping sg iterator |
168 | * | 145 | * |
@@ -171,12 +148,12 @@ static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter) | |||
171 | * without DMA support). | 148 | * without DMA support). |
172 | * | 149 | * |
173 | * Best-case reading (transfer from device): | 150 | * Best-case reading (transfer from device): |
174 | * sg_miter_start(); | 151 | * sg_miter_start(, SG_MITER_TO_SG); |
175 | * cb710_sg_dwiter_write_from_io(); | 152 | * cb710_sg_dwiter_write_from_io(); |
176 | * cb710_sg_miter_stop_writing(); | 153 | * sg_miter_stop(); |
177 | * | 154 | * |
178 | * Best-case writing (transfer to device): | 155 | * Best-case writing (transfer to device): |
179 | * sg_miter_start(); | 156 | * sg_miter_start(, SG_MITER_FROM_SG); |
180 | * cb710_sg_dwiter_read_to_io(); | 157 | * cb710_sg_dwiter_read_to_io(); |
181 | * sg_miter_stop(); | 158 | * sg_miter_stop(); |
182 | */ | 159 | */ |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 665fa70e4094..90bba9e62286 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -179,14 +179,11 @@ struct cgroup { | |||
179 | */ | 179 | */ |
180 | struct list_head release_list; | 180 | struct list_head release_list; |
181 | 181 | ||
182 | /* pids_mutex protects the fields below */ | 182 | /* pids_mutex protects pids_list and cached pid arrays. */ |
183 | struct rw_semaphore pids_mutex; | 183 | struct rw_semaphore pids_mutex; |
184 | /* Array of process ids in the cgroup */ | 184 | |
185 | pid_t *tasks_pids; | 185 | /* Linked list of struct cgroup_pids */ |
186 | /* How many files are using the current tasks_pids array */ | 186 | struct list_head pids_list; |
187 | int pids_use_count; | ||
188 | /* Length of the current tasks_pids array */ | ||
189 | int pids_length; | ||
190 | 187 | ||
191 | /* For RCU-protected deletion */ | 188 | /* For RCU-protected deletion */ |
192 | struct rcu_head rcu_head; | 189 | struct rcu_head rcu_head; |
@@ -366,6 +363,23 @@ int cgroup_task_count(const struct cgroup *cgrp); | |||
366 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); | 363 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); |
367 | 364 | ||
368 | /* | 365 | /* |
366 | * When the subsys has to access css and may add permanent refcnt to css, | ||
367 | * it should take care of racy conditions with rmdir(). Following set of | ||
368 | * functions, is for stop/restart rmdir if necessary. | ||
369 | * Because these will call css_get/put, "css" should be alive css. | ||
370 | * | ||
371 | * cgroup_exclude_rmdir(); | ||
372 | * ...do some jobs which may access arbitrary empty cgroup | ||
373 | * cgroup_release_and_wakeup_rmdir(); | ||
374 | * | ||
375 | * When someone removes a cgroup while cgroup_exclude_rmdir() holds it, | ||
376 | * it sleeps and cgroup_release_and_wakeup_rmdir() will wake him up. | ||
377 | */ | ||
378 | |||
379 | void cgroup_exclude_rmdir(struct cgroup_subsys_state *css); | ||
380 | void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css); | ||
381 | |||
382 | /* | ||
369 | * Control Group subsystem type. | 383 | * Control Group subsystem type. |
370 | * See Documentation/cgroups/cgroups.txt for details | 384 | * See Documentation/cgroups/cgroups.txt for details |
371 | */ | 385 | */ |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index c56457c8334e..1219be4fb42e 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -293,7 +293,12 @@ static inline int clocksource_enable(struct clocksource *cs) | |||
293 | if (cs->enable) | 293 | if (cs->enable) |
294 | ret = cs->enable(cs); | 294 | ret = cs->enable(cs); |
295 | 295 | ||
296 | /* save mult_orig on enable */ | 296 | /* |
297 | * The frequency may have changed while the clocksource | ||
298 | * was disabled. If so the code in ->enable() must update | ||
299 | * the mult value to reflect the new frequency. Make sure | ||
300 | * mult_orig follows this change. | ||
301 | */ | ||
297 | cs->mult_orig = cs->mult; | 302 | cs->mult_orig = cs->mult; |
298 | 303 | ||
299 | return ret; | 304 | return ret; |
@@ -309,6 +314,13 @@ static inline int clocksource_enable(struct clocksource *cs) | |||
309 | */ | 314 | */ |
310 | static inline void clocksource_disable(struct clocksource *cs) | 315 | static inline void clocksource_disable(struct clocksource *cs) |
311 | { | 316 | { |
317 | /* | ||
318 | * Save mult_orig in mult so clocksource_enable() can | ||
319 | * restore the value regardless if ->enable() updates | ||
320 | * the value of mult or not. | ||
321 | */ | ||
322 | cs->mult = cs->mult_orig; | ||
323 | |||
312 | if (cs->disable) | 324 | if (cs->disable) |
313 | cs->disable(cs); | 325 | cs->disable(cs); |
314 | } | 326 | } |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c5ac87ca7bc6..796df12091b7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -43,10 +43,10 @@ | |||
43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask | 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask |
44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask | 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask |
45 | * | 45 | * |
46 | * void cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] | 46 | * int cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] |
47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] | 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] |
48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 | 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 |
49 | * void cpus_andnot(dst, src1, src2) dst = src1 & ~src2 | 49 | * int cpus_andnot(dst, src1, src2) dst = src1 & ~src2 |
50 | * void cpus_complement(dst, src) dst = ~src | 50 | * void cpus_complement(dst, src) dst = ~src |
51 | * | 51 | * |
52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? | 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? |
@@ -179,10 +179,10 @@ static inline int __cpu_test_and_set(int cpu, cpumask_t *addr) | |||
179 | } | 179 | } |
180 | 180 | ||
181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) | 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) |
182 | static inline void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, | 182 | static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, |
183 | const cpumask_t *src2p, int nbits) | 183 | const cpumask_t *src2p, int nbits) |
184 | { | 184 | { |
185 | bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); | 185 | return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); |
186 | } | 186 | } |
187 | 187 | ||
188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) | 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) |
@@ -201,10 +201,10 @@ static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, | |||
201 | 201 | ||
202 | #define cpus_andnot(dst, src1, src2) \ | 202 | #define cpus_andnot(dst, src1, src2) \ |
203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) | 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) |
204 | static inline void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, | 204 | static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, |
205 | const cpumask_t *src2p, int nbits) | 205 | const cpumask_t *src2p, int nbits) |
206 | { | 206 | { |
207 | bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); | 207 | return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); |
208 | } | 208 | } |
209 | 209 | ||
210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) | 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) |
@@ -738,11 +738,11 @@ static inline void cpumask_clear(struct cpumask *dstp) | |||
738 | * @src1p: the first input | 738 | * @src1p: the first input |
739 | * @src2p: the second input | 739 | * @src2p: the second input |
740 | */ | 740 | */ |
741 | static inline void cpumask_and(struct cpumask *dstp, | 741 | static inline int cpumask_and(struct cpumask *dstp, |
742 | const struct cpumask *src1p, | 742 | const struct cpumask *src1p, |
743 | const struct cpumask *src2p) | 743 | const struct cpumask *src2p) |
744 | { | 744 | { |
745 | bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), | 745 | return bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), |
746 | cpumask_bits(src2p), nr_cpumask_bits); | 746 | cpumask_bits(src2p), nr_cpumask_bits); |
747 | } | 747 | } |
748 | 748 | ||
@@ -779,11 +779,11 @@ static inline void cpumask_xor(struct cpumask *dstp, | |||
779 | * @src1p: the first input | 779 | * @src1p: the first input |
780 | * @src2p: the second input | 780 | * @src2p: the second input |
781 | */ | 781 | */ |
782 | static inline void cpumask_andnot(struct cpumask *dstp, | 782 | static inline int cpumask_andnot(struct cpumask *dstp, |
783 | const struct cpumask *src1p, | 783 | const struct cpumask *src1p, |
784 | const struct cpumask *src2p) | 784 | const struct cpumask *src2p) |
785 | { | 785 | { |
786 | bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), | 786 | return bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), |
787 | cpumask_bits(src2p), nr_cpumask_bits); | 787 | cpumask_bits(src2p), nr_cpumask_bits); |
788 | } | 788 | } |
789 | 789 | ||
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h index 6dfb856327bb..0c7111a55a1a 100644 --- a/include/linux/decompress/generic.h +++ b/include/linux/decompress/generic.h | |||
@@ -1,31 +1,37 @@ | |||
1 | #ifndef DECOMPRESS_GENERIC_H | 1 | #ifndef DECOMPRESS_GENERIC_H |
2 | #define DECOMPRESS_GENERIC_H | 2 | #define DECOMPRESS_GENERIC_H |
3 | 3 | ||
4 | /* Minimal chunksize to be read. | ||
5 | *Bzip2 prefers at least 4096 | ||
6 | *Lzma prefers 0x10000 */ | ||
7 | #define COMPR_IOBUF_SIZE 4096 | ||
8 | |||
9 | typedef int (*decompress_fn) (unsigned char *inbuf, int len, | 4 | typedef int (*decompress_fn) (unsigned char *inbuf, int len, |
10 | int(*fill)(void*, unsigned int), | 5 | int(*fill)(void*, unsigned int), |
11 | int(*writebb)(void*, unsigned int), | 6 | int(*flush)(void*, unsigned int), |
12 | unsigned char *output, | 7 | unsigned char *outbuf, |
13 | int *posp, | 8 | int *posp, |
14 | void(*error)(char *x)); | 9 | void(*error)(char *x)); |
15 | 10 | ||
16 | /* inbuf - input buffer | 11 | /* inbuf - input buffer |
17 | *len - len of pre-read data in inbuf | 12 | *len - len of pre-read data in inbuf |
18 | *fill - function to fill inbuf if empty | 13 | *fill - function to fill inbuf when empty |
19 | *writebb - function to write out outbug | 14 | *flush - function to write out outbuf |
15 | *outbuf - output buffer | ||
20 | *posp - if non-null, input position (number of bytes read) will be | 16 | *posp - if non-null, input position (number of bytes read) will be |
21 | * returned here | 17 | * returned here |
22 | * | 18 | * |
23 | *If len != 0, the inbuf is initialized (with as much data), and fill | 19 | *If len != 0, inbuf should contain all the necessary input data, and fill |
24 | *should not be called | 20 | *should be NULL |
25 | *If len = 0, the inbuf is allocated, but empty. Its size is IOBUF_SIZE | 21 | *If len = 0, inbuf can be NULL, in which case the decompressor will allocate |
26 | *fill should be called (repeatedly...) to read data, at most IOBUF_SIZE | 22 | *the input buffer. If inbuf != NULL it must be at least XXX_IOBUF_SIZE bytes. |
23 | *fill will be called (repeatedly...) to read data, at most XXX_IOBUF_SIZE | ||
24 | *bytes should be read per call. Replace XXX with the appropriate decompressor | ||
25 | *name, i.e. LZMA_IOBUF_SIZE. | ||
26 | * | ||
27 | *If flush = NULL, outbuf must be large enough to buffer all the expected | ||
28 | *output. If flush != NULL, the output buffer will be allocated by the | ||
29 | *decompressor (outbuf = NULL), and the flush function will be called to | ||
30 | *flush the output buffer at the appropriate time (decompressor and stream | ||
31 | *dependent). | ||
27 | */ | 32 | */ |
28 | 33 | ||
34 | |||
29 | /* Utility routine to detect the decompression method */ | 35 | /* Utility routine to detect the decompression method */ |
30 | decompress_fn decompress_method(const unsigned char *inbuf, int len, | 36 | decompress_fn decompress_method(const unsigned char *inbuf, int len, |
31 | const char **name); | 37 | const char **name); |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 0d6310657f32..655e7721580a 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -84,7 +84,7 @@ typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, | |||
84 | 84 | ||
85 | typedef int (*iterate_devices_callout_fn) (struct dm_target *ti, | 85 | typedef int (*iterate_devices_callout_fn) (struct dm_target *ti, |
86 | struct dm_dev *dev, | 86 | struct dm_dev *dev, |
87 | sector_t physical_start, | 87 | sector_t start, sector_t len, |
88 | void *data); | 88 | void *data); |
89 | 89 | ||
90 | typedef int (*dm_iterate_devices_fn) (struct dm_target *ti, | 90 | typedef int (*dm_iterate_devices_fn) (struct dm_target *ti, |
@@ -104,7 +104,7 @@ void dm_error(const char *message); | |||
104 | * Combine device limits. | 104 | * Combine device limits. |
105 | */ | 105 | */ |
106 | int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, | 106 | int dm_set_device_limits(struct dm_target *ti, struct dm_dev *dev, |
107 | sector_t start, void *data); | 107 | sector_t start, sector_t len, void *data); |
108 | 108 | ||
109 | struct dm_dev { | 109 | struct dm_dev { |
110 | struct block_device *bdev; | 110 | struct block_device *bdev; |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 634a5e5aba3e..7499b3667798 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -874,7 +874,7 @@ struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); | |||
874 | struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); | 874 | struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); |
875 | int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, | 875 | int ext3_get_blocks_handle(handle_t *handle, struct inode *inode, |
876 | sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, | 876 | sector_t iblock, unsigned long maxblocks, struct buffer_head *bh_result, |
877 | int create, int extend_disksize); | 877 | int create); |
878 | 878 | ||
879 | extern struct inode *ext3_iget(struct super_block *, unsigned long); | 879 | extern struct inode *ext3_iget(struct super_block *, unsigned long); |
880 | extern int ext3_write_inode (struct inode *, int); | 880 | extern int ext3_write_inode (struct inode *, int); |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h new file mode 100644 index 000000000000..45ff18491514 --- /dev/null +++ b/include/linux/flex_array.h | |||
@@ -0,0 +1,49 @@ | |||
1 | #ifndef _FLEX_ARRAY_H | ||
2 | #define _FLEX_ARRAY_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <asm/page.h> | ||
6 | |||
7 | #define FLEX_ARRAY_PART_SIZE PAGE_SIZE | ||
8 | #define FLEX_ARRAY_BASE_SIZE PAGE_SIZE | ||
9 | |||
10 | struct flex_array_part; | ||
11 | |||
12 | /* | ||
13 | * This is meant to replace cases where an array-like | ||
14 | * structure has gotten too big to fit into kmalloc() | ||
15 | * and the developer is getting tempted to use | ||
16 | * vmalloc(). | ||
17 | */ | ||
18 | |||
19 | struct flex_array { | ||
20 | union { | ||
21 | struct { | ||
22 | int element_size; | ||
23 | int total_nr_elements; | ||
24 | struct flex_array_part *parts[]; | ||
25 | }; | ||
26 | /* | ||
27 | * This little trick makes sure that | ||
28 | * sizeof(flex_array) == PAGE_SIZE | ||
29 | */ | ||
30 | char padding[FLEX_ARRAY_BASE_SIZE]; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | #define FLEX_ARRAY_INIT(size, total) { { {\ | ||
35 | .element_size = (size), \ | ||
36 | .total_nr_elements = (total), \ | ||
37 | } } } | ||
38 | |||
39 | struct flex_array *flex_array_alloc(int element_size, unsigned int total, | ||
40 | gfp_t flags); | ||
41 | int flex_array_prealloc(struct flex_array *fa, unsigned int start, | ||
42 | unsigned int end, gfp_t flags); | ||
43 | void flex_array_free(struct flex_array *fa); | ||
44 | void flex_array_free_parts(struct flex_array *fa); | ||
45 | int flex_array_put(struct flex_array *fa, unsigned int element_nr, void *src, | ||
46 | gfp_t flags); | ||
47 | void *flex_array_get(struct flex_array *fa, unsigned int element_nr); | ||
48 | |||
49 | #endif /* _FLEX_ARRAY_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0872372184fe..73e9b643e455 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1946,6 +1946,7 @@ extern void putname(const char *name); | |||
1946 | extern int register_blkdev(unsigned int, const char *); | 1946 | extern int register_blkdev(unsigned int, const char *); |
1947 | extern void unregister_blkdev(unsigned int, const char *); | 1947 | extern void unregister_blkdev(unsigned int, const char *); |
1948 | extern struct block_device *bdget(dev_t); | 1948 | extern struct block_device *bdget(dev_t); |
1949 | extern struct block_device *bdgrab(struct block_device *bdev); | ||
1949 | extern void bd_set_size(struct block_device *, loff_t size); | 1950 | extern void bd_set_size(struct block_device *, loff_t size); |
1950 | extern void bd_forget(struct inode *inode); | 1951 | extern void bd_forget(struct inode *inode); |
1951 | extern void bdput(struct block_device *); | 1952 | extern void bdput(struct block_device *); |
@@ -2122,7 +2123,7 @@ extern struct file *do_filp_open(int dfd, const char *pathname, | |||
2122 | int open_flag, int mode, int acc_mode); | 2123 | int open_flag, int mode, int acc_mode); |
2123 | extern int may_open(struct path *, int, int); | 2124 | extern int may_open(struct path *, int, int); |
2124 | 2125 | ||
2125 | extern int kernel_read(struct file *, unsigned long, char *, unsigned long); | 2126 | extern int kernel_read(struct file *, loff_t, char *, unsigned long); |
2126 | extern struct file * open_exec(const char *); | 2127 | extern struct file * open_exec(const char *); |
2127 | 2128 | ||
2128 | /* fs/dcache.c -- generic fs support functions */ | 2129 | /* fs/dcache.c -- generic fs support functions */ |
@@ -2136,7 +2137,7 @@ extern loff_t default_llseek(struct file *file, loff_t offset, int origin); | |||
2136 | 2137 | ||
2137 | extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); | 2138 | extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); |
2138 | 2139 | ||
2139 | extern struct inode * inode_init_always(struct super_block *, struct inode *); | 2140 | extern int inode_init_always(struct super_block *, struct inode *); |
2140 | extern void inode_init_once(struct inode *); | 2141 | extern void inode_init_once(struct inode *); |
2141 | extern void inode_add_to_lists(struct super_block *, struct inode *); | 2142 | extern void inode_add_to_lists(struct super_block *, struct inode *); |
2142 | extern void iput(struct inode *); | 2143 | extern void iput(struct inode *); |
@@ -2163,6 +2164,7 @@ extern void __iget(struct inode * inode); | |||
2163 | extern void iget_failed(struct inode *); | 2164 | extern void iget_failed(struct inode *); |
2164 | extern void clear_inode(struct inode *); | 2165 | extern void clear_inode(struct inode *); |
2165 | extern void destroy_inode(struct inode *); | 2166 | extern void destroy_inode(struct inode *); |
2167 | extern void __destroy_inode(struct inode *); | ||
2166 | extern struct inode *new_inode(struct super_block *); | 2168 | extern struct inode *new_inode(struct super_block *); |
2167 | extern int should_remove_suid(struct dentry *); | 2169 | extern int should_remove_suid(struct dentry *); |
2168 | extern int file_remove_suid(struct file *); | 2170 | extern int file_remove_suid(struct file *); |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 6c3de999fb34..4d6f47b51189 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -352,7 +352,7 @@ extern void fsnotify_unmount_inodes(struct list_head *list); | |||
352 | /* put here because inotify does some weird stuff when destroying watches */ | 352 | /* put here because inotify does some weird stuff when destroying watches */ |
353 | extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, | 353 | extern struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask, |
354 | void *data, int data_is, const char *name, | 354 | void *data, int data_is, const char *name, |
355 | u32 cookie); | 355 | u32 cookie, gfp_t gfp); |
356 | 356 | ||
357 | #else | 357 | #else |
358 | 358 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 5c093ffc655b..a81170de7f6b 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -89,7 +89,9 @@ enum print_line_t { | |||
89 | TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ | 89 | TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */ |
90 | }; | 90 | }; |
91 | 91 | ||
92 | 92 | void tracing_generic_entry_update(struct trace_entry *entry, | |
93 | unsigned long flags, | ||
94 | int pc); | ||
93 | struct ring_buffer_event * | 95 | struct ring_buffer_event * |
94 | trace_current_buffer_lock_reserve(int type, unsigned long len, | 96 | trace_current_buffer_lock_reserve(int type, unsigned long len, |
95 | unsigned long flags, int pc); | 97 | unsigned long flags, int pc); |
@@ -119,11 +121,9 @@ struct ftrace_event_call { | |||
119 | void *filter; | 121 | void *filter; |
120 | void *mod; | 122 | void *mod; |
121 | 123 | ||
122 | #ifdef CONFIG_EVENT_PROFILE | 124 | atomic_t profile_count; |
123 | atomic_t profile_count; | 125 | int (*profile_enable)(struct ftrace_event_call *); |
124 | int (*profile_enable)(struct ftrace_event_call *); | 126 | void (*profile_disable)(struct ftrace_event_call *); |
125 | void (*profile_disable)(struct ftrace_event_call *); | ||
126 | #endif | ||
127 | }; | 127 | }; |
128 | 128 | ||
129 | #define MAX_FILTER_PRED 32 | 129 | #define MAX_FILTER_PRED 32 |
diff --git a/include/linux/gen_stats.h b/include/linux/gen_stats.h index 0ffa41df0ee8..710e901085d0 100644 --- a/include/linux/gen_stats.h +++ b/include/linux/gen_stats.h | |||
@@ -22,6 +22,11 @@ struct gnet_stats_basic | |||
22 | { | 22 | { |
23 | __u64 bytes; | 23 | __u64 bytes; |
24 | __u32 packets; | 24 | __u32 packets; |
25 | }; | ||
26 | struct gnet_stats_basic_packed | ||
27 | { | ||
28 | __u64 bytes; | ||
29 | __u32 packets; | ||
25 | } __attribute__ ((packed)); | 30 | } __attribute__ ((packed)); |
26 | 31 | ||
27 | /** | 32 | /** |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 2723513a5651..5cbc620bdfe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/tlbflush.h> | 10 | #include <asm/tlbflush.h> |
11 | 11 | ||
12 | struct ctl_table; | 12 | struct ctl_table; |
13 | struct user_struct; | ||
13 | 14 | ||
14 | int PageHuge(struct page *page); | 15 | int PageHuge(struct page *page); |
15 | 16 | ||
@@ -146,7 +147,8 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) | |||
146 | 147 | ||
147 | extern const struct file_operations hugetlbfs_file_operations; | 148 | extern const struct file_operations hugetlbfs_file_operations; |
148 | extern struct vm_operations_struct hugetlb_vm_ops; | 149 | extern struct vm_operations_struct hugetlb_vm_ops; |
149 | struct file *hugetlb_file_setup(const char *name, size_t, int); | 150 | struct file *hugetlb_file_setup(const char *name, size_t size, int acct, |
151 | struct user_struct **user); | ||
150 | int hugetlb_get_quota(struct address_space *mapping, long delta); | 152 | int hugetlb_get_quota(struct address_space *mapping, long delta); |
151 | void hugetlb_put_quota(struct address_space *mapping, long delta); | 153 | void hugetlb_put_quota(struct address_space *mapping, long delta); |
152 | 154 | ||
@@ -168,7 +170,7 @@ static inline void set_file_hugepages(struct file *file) | |||
168 | 170 | ||
169 | #define is_file_hugepages(file) 0 | 171 | #define is_file_hugepages(file) 0 |
170 | #define set_file_hugepages(file) BUG() | 172 | #define set_file_hugepages(file) BUG() |
171 | #define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS) | 173 | #define hugetlb_file_setup(name,size,acct,user) ERR_PTR(-ENOSYS) |
172 | 174 | ||
173 | #endif /* !CONFIG_HUGETLBFS */ | 175 | #endif /* !CONFIG_HUGETLBFS */ |
174 | 176 | ||
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index acef2a770b6b..ad27c7da8798 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -82,7 +82,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
82 | 82 | ||
83 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) | 83 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) |
84 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) | 84 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) |
85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_ANDCONF((in_dev), RP_FILTER) | 85 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) |
86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ | 86 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ |
87 | ACCEPT_SOURCE_ROUTE) | 87 | ACCEPT_SOURCE_ROUTE) |
88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) | 88 | #define IN_DEV_BOOTP_RELAY(in_dev) IN_DEV_ANDCONF((in_dev), BOOTP_RELAY) |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h index 7964516c6954..15d5903af2dd 100644 --- a/include/linux/input/matrix_keypad.h +++ b/include/linux/input/matrix_keypad.h | |||
@@ -15,12 +15,13 @@ | |||
15 | #define KEY_COL(k) (((k) >> 16) & 0xff) | 15 | #define KEY_COL(k) (((k) >> 16) & 0xff) |
16 | #define KEY_VAL(k) ((k) & 0xffff) | 16 | #define KEY_VAL(k) ((k) & 0xffff) |
17 | 17 | ||
18 | #define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col)) | ||
19 | |||
18 | /** | 20 | /** |
19 | * struct matrix_keymap_data - keymap for matrix keyboards | 21 | * struct matrix_keymap_data - keymap for matrix keyboards |
20 | * @keymap: pointer to array of uint32 values encoded with KEY() macro | 22 | * @keymap: pointer to array of uint32 values encoded with KEY() macro |
21 | * representing keymap | 23 | * representing keymap |
22 | * @keymap_size: number of entries (initialized) in this keymap | 24 | * @keymap_size: number of entries (initialized) in this keymap |
23 | * @max_keymap_size: maximum size of keymap supported by the device | ||
24 | * | 25 | * |
25 | * This structure is supposed to be used by platform code to supply | 26 | * This structure is supposed to be used by platform code to supply |
26 | * keymaps to drivers that implement matrix-like keypads/keyboards. | 27 | * keymaps to drivers that implement matrix-like keypads/keyboards. |
@@ -28,14 +29,13 @@ | |||
28 | struct matrix_keymap_data { | 29 | struct matrix_keymap_data { |
29 | const uint32_t *keymap; | 30 | const uint32_t *keymap; |
30 | unsigned int keymap_size; | 31 | unsigned int keymap_size; |
31 | unsigned int max_keymap_size; | ||
32 | }; | 32 | }; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * struct matrix_keypad_platform_data - platform-dependent keypad data | 35 | * struct matrix_keypad_platform_data - platform-dependent keypad data |
36 | * @keymap_data: pointer to &matrix_keymap_data | 36 | * @keymap_data: pointer to &matrix_keymap_data |
37 | * @row_gpios: array of gpio numbers reporesenting rows | 37 | * @row_gpios: pointer to array of gpio numbers representing rows |
38 | * @col_gpios: array of gpio numbers reporesenting colums | 38 | * @col_gpios: pointer to array of gpio numbers reporesenting colums |
39 | * @num_row_gpios: actual number of row gpios used by device | 39 | * @num_row_gpios: actual number of row gpios used by device |
40 | * @num_col_gpios: actual number of col gpios used by device | 40 | * @num_col_gpios: actual number of col gpios used by device |
41 | * @col_scan_delay_us: delay, measured in microseconds, that is | 41 | * @col_scan_delay_us: delay, measured in microseconds, that is |
@@ -48,8 +48,9 @@ struct matrix_keymap_data { | |||
48 | struct matrix_keypad_platform_data { | 48 | struct matrix_keypad_platform_data { |
49 | const struct matrix_keymap_data *keymap_data; | 49 | const struct matrix_keymap_data *keymap_data; |
50 | 50 | ||
51 | unsigned int row_gpios[MATRIX_MAX_ROWS]; | 51 | const unsigned int *row_gpios; |
52 | unsigned int col_gpios[MATRIX_MAX_COLS]; | 52 | const unsigned int *col_gpios; |
53 | |||
53 | unsigned int num_row_gpios; | 54 | unsigned int num_row_gpios; |
54 | unsigned int num_col_gpios; | 55 | unsigned int num_col_gpios; |
55 | 56 | ||
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index dd05434fa45f..4da4a75c3f1e 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -92,7 +92,7 @@ static inline struct io_context *ioc_task_link(struct io_context *ioc) | |||
92 | * a race). | 92 | * a race). |
93 | */ | 93 | */ |
94 | if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) { | 94 | if (ioc && atomic_long_inc_not_zero(&ioc->refcount)) { |
95 | atomic_long_inc(&ioc->refcount); | 95 | atomic_inc(&ioc->nr_tasks); |
96 | return ioc; | 96 | return ioc; |
97 | } | 97 | } |
98 | 98 | ||
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 16713dc672e4..3060bdc35ffe 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -110,6 +110,7 @@ struct kvm_memory_slot { | |||
110 | 110 | ||
111 | struct kvm_kernel_irq_routing_entry { | 111 | struct kvm_kernel_irq_routing_entry { |
112 | u32 gsi; | 112 | u32 gsi; |
113 | u32 type; | ||
113 | int (*set)(struct kvm_kernel_irq_routing_entry *e, | 114 | int (*set)(struct kvm_kernel_irq_routing_entry *e, |
114 | struct kvm *kvm, int level); | 115 | struct kvm *kvm, int level); |
115 | union { | 116 | union { |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index dbf2479e808e..2fb1dcbcb5aa 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
@@ -1,5 +1,7 @@ | |||
1 | /* Things the lguest guest needs to know. Note: like all lguest interfaces, | 1 | /* |
2 | * this is subject to wild and random change between versions. */ | 2 | * Things the lguest guest needs to know. Note: like all lguest interfaces, |
3 | * this is subject to wild and random change between versions. | ||
4 | */ | ||
3 | #ifndef _LINUX_LGUEST_H | 5 | #ifndef _LINUX_LGUEST_H |
4 | #define _LINUX_LGUEST_H | 6 | #define _LINUX_LGUEST_H |
5 | 7 | ||
@@ -11,32 +13,41 @@ | |||
11 | #define LG_CLOCK_MIN_DELTA 100UL | 13 | #define LG_CLOCK_MIN_DELTA 100UL |
12 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | 14 | #define LG_CLOCK_MAX_DELTA ULONG_MAX |
13 | 15 | ||
14 | /*G:031 The second method of communicating with the Host is to via "struct | 16 | /*G:031 |
17 | * The second method of communicating with the Host is to via "struct | ||
15 | * lguest_data". Once the Guest's initialization hypercall tells the Host where | 18 | * lguest_data". Once the Guest's initialization hypercall tells the Host where |
16 | * this is, the Guest and Host both publish information in it. :*/ | 19 | * this is, the Guest and Host both publish information in it. |
17 | struct lguest_data | 20 | :*/ |
18 | { | 21 | struct lguest_data { |
19 | /* 512 == enabled (same as eflags in normal hardware). The Guest | 22 | /* |
20 | * changes interrupts so often that a hypercall is too slow. */ | 23 | * 512 == enabled (same as eflags in normal hardware). The Guest |
24 | * changes interrupts so often that a hypercall is too slow. | ||
25 | */ | ||
21 | unsigned int irq_enabled; | 26 | unsigned int irq_enabled; |
22 | /* Fine-grained interrupt disabling by the Guest */ | 27 | /* Fine-grained interrupt disabling by the Guest */ |
23 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); | 28 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); |
24 | 29 | ||
25 | /* The Host writes the virtual address of the last page fault here, | 30 | /* |
31 | * The Host writes the virtual address of the last page fault here, | ||
26 | * which saves the Guest a hypercall. CR2 is the native register where | 32 | * which saves the Guest a hypercall. CR2 is the native register where |
27 | * this address would normally be found. */ | 33 | * this address would normally be found. |
34 | */ | ||
28 | unsigned long cr2; | 35 | unsigned long cr2; |
29 | 36 | ||
30 | /* Wallclock time set by the Host. */ | 37 | /* Wallclock time set by the Host. */ |
31 | struct timespec time; | 38 | struct timespec time; |
32 | 39 | ||
33 | /* Interrupt pending set by the Host. The Guest should do a hypercall | 40 | /* |
34 | * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). */ | 41 | * Interrupt pending set by the Host. The Guest should do a hypercall |
42 | * if it re-enables interrupts and sees this set (to X86_EFLAGS_IF). | ||
43 | */ | ||
35 | int irq_pending; | 44 | int irq_pending; |
36 | 45 | ||
37 | /* Async hypercall ring. Instead of directly making hypercalls, we can | 46 | /* |
47 | * Async hypercall ring. Instead of directly making hypercalls, we can | ||
38 | * place them in here for processing the next time the Host wants. | 48 | * place them in here for processing the next time the Host wants. |
39 | * This batching can be quite efficient. */ | 49 | * This batching can be quite efficient. |
50 | */ | ||
40 | 51 | ||
41 | /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ | 52 | /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ |
42 | u8 hcall_status[LHCALL_RING_SIZE]; | 53 | u8 hcall_status[LHCALL_RING_SIZE]; |
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index bfefbdf7498a..495203ff221c 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h | |||
@@ -29,8 +29,10 @@ struct lguest_device_desc { | |||
29 | __u8 type; | 29 | __u8 type; |
30 | /* The number of virtqueues (first in config array) */ | 30 | /* The number of virtqueues (first in config array) */ |
31 | __u8 num_vq; | 31 | __u8 num_vq; |
32 | /* The number of bytes of feature bits. Multiply by 2: one for host | 32 | /* |
33 | * features and one for Guest acknowledgements. */ | 33 | * The number of bytes of feature bits. Multiply by 2: one for host |
34 | * features and one for Guest acknowledgements. | ||
35 | */ | ||
34 | __u8 feature_len; | 36 | __u8 feature_len; |
35 | /* The number of bytes of the config array after virtqueues. */ | 37 | /* The number of bytes of the config array after virtqueues. */ |
36 | __u8 config_len; | 38 | __u8 config_len; |
@@ -39,8 +41,10 @@ struct lguest_device_desc { | |||
39 | __u8 config[0]; | 41 | __u8 config[0]; |
40 | }; | 42 | }; |
41 | 43 | ||
42 | /*D:135 This is how we expect the device configuration field for a virtqueue | 44 | /*D:135 |
43 | * to be laid out in config space. */ | 45 | * This is how we expect the device configuration field for a virtqueue |
46 | * to be laid out in config space. | ||
47 | */ | ||
44 | struct lguest_vqconfig { | 48 | struct lguest_vqconfig { |
45 | /* The number of entries in the virtio_ring */ | 49 | /* The number of entries in the virtio_ring */ |
46 | __u16 num; | 50 | __u16 num; |
@@ -61,7 +65,9 @@ enum lguest_req | |||
61 | LHREQ_EVENTFD, /* + address, fd. */ | 65 | LHREQ_EVENTFD, /* + address, fd. */ |
62 | }; | 66 | }; |
63 | 67 | ||
64 | /* The alignment to use between consumer and producer parts of vring. | 68 | /* |
65 | * x86 pagesize for historical reasons. */ | 69 | * The alignment to use between consumer and producer parts of vring. |
70 | * x86 pagesize for historical reasons. | ||
71 | */ | ||
66 | #define LGUEST_VRING_ALIGN 4096 | 72 | #define LGUEST_VRING_ALIGN 4096 |
67 | #endif /* _LINUX_LGUEST_LAUNCHER */ | 73 | #endif /* _LINUX_LGUEST_LAUNCHER */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 79b6d7fd4ac2..e5b6e33c6571 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -589,6 +589,7 @@ struct ata_device { | |||
589 | #endif | 589 | #endif |
590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ | 590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
591 | u64 n_sectors; /* size of device, if ATA */ | 591 | u64 n_sectors; /* size of device, if ATA */ |
592 | u64 n_native_sectors; /* native size, if ATA */ | ||
592 | unsigned int class; /* ATA_DEV_xxx */ | 593 | unsigned int class; /* ATA_DEV_xxx */ |
593 | unsigned long unpark_deadline; | 594 | unsigned long unpark_deadline; |
594 | 595 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index ba3a7cb1eaa0..9a72cc78e6b8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -34,8 +34,6 @@ extern int sysctl_legacy_va_layout; | |||
34 | #define sysctl_legacy_va_layout 0 | 34 | #define sysctl_legacy_va_layout 0 |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | extern unsigned long mmap_min_addr; | ||
38 | |||
39 | #include <asm/page.h> | 37 | #include <asm/page.h> |
40 | #include <asm/pgtable.h> | 38 | #include <asm/pgtable.h> |
41 | #include <asm/processor.h> | 39 | #include <asm/processor.h> |
@@ -575,19 +573,6 @@ static inline void set_page_links(struct page *page, enum zone_type zone, | |||
575 | } | 573 | } |
576 | 574 | ||
577 | /* | 575 | /* |
578 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
579 | * low as possible but still greater than mmap_min_addr | ||
580 | */ | ||
581 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
582 | { | ||
583 | hint &= PAGE_MASK; | ||
584 | if (((void *)hint != NULL) && | ||
585 | (hint < mmap_min_addr)) | ||
586 | return PAGE_ALIGN(mmap_min_addr); | ||
587 | return hint; | ||
588 | } | ||
589 | |||
590 | /* | ||
591 | * Some inline functions in vmstat.h depend on page_zone() | 576 | * Some inline functions in vmstat.h depend on page_zone() |
592 | */ | 577 | */ |
593 | #include <linux/vmstat.h> | 578 | #include <linux/vmstat.h> |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 7acc8439d9b3..0042090a4d70 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -240,8 +240,6 @@ struct mm_struct { | |||
240 | 240 | ||
241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ | 241 | unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */ |
242 | 242 | ||
243 | s8 oom_adj; /* OOM kill score adjustment (bit shift) */ | ||
244 | |||
245 | cpumask_t cpu_vm_mask; | 243 | cpumask_t cpu_vm_mask; |
246 | 244 | ||
247 | /* Architecture-specific MM context */ | 245 | /* Architecture-specific MM context */ |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 5675b63a0631..0f32a9b6ff55 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -251,7 +251,7 @@ struct mtd_info { | |||
251 | 251 | ||
252 | static inline struct mtd_info *dev_to_mtd(struct device *dev) | 252 | static inline struct mtd_info *dev_to_mtd(struct device *dev) |
253 | { | 253 | { |
254 | return dev ? container_of(dev, struct mtd_info, dev) : NULL; | 254 | return dev ? dev_get_drvdata(dev) : NULL; |
255 | } | 255 | } |
256 | 256 | ||
257 | static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) | 257 | static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index af6dcb992bc3..b70313d33ff8 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
@@ -47,6 +47,8 @@ struct mtd_partition { | |||
47 | #define MTDPART_SIZ_FULL (0) | 47 | #define MTDPART_SIZ_FULL (0) |
48 | 48 | ||
49 | 49 | ||
50 | struct mtd_info; | ||
51 | |||
50 | int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); | 52 | int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); |
51 | int del_mtd_partitions(struct mtd_info *); | 53 | int del_mtd_partitions(struct mtd_info *); |
52 | 54 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index fdffb413b192..f6b90240dd41 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -473,7 +473,6 @@ extern int nfs_writepages(struct address_space *, struct writeback_control *); | |||
473 | extern int nfs_flush_incompatible(struct file *file, struct page *page); | 473 | extern int nfs_flush_incompatible(struct file *file, struct page *page); |
474 | extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); | 474 | extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); |
475 | extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); | 475 | extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); |
476 | extern void nfs_writedata_release(void *); | ||
477 | 476 | ||
478 | /* | 477 | /* |
479 | * Try to write back everything synchronously (but check the | 478 | * Try to write back everything synchronously (but check the |
@@ -488,7 +487,6 @@ extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | |||
488 | extern int nfs_commit_inode(struct inode *, int); | 487 | extern int nfs_commit_inode(struct inode *, int); |
489 | extern struct nfs_write_data *nfs_commitdata_alloc(void); | 488 | extern struct nfs_write_data *nfs_commitdata_alloc(void); |
490 | extern void nfs_commit_free(struct nfs_write_data *wdata); | 489 | extern void nfs_commit_free(struct nfs_write_data *wdata); |
491 | extern void nfs_commitdata_release(void *wdata); | ||
492 | #else | 490 | #else |
493 | static inline int | 491 | static inline int |
494 | nfs_commit_inode(struct inode *inode, int how) | 492 | nfs_commit_inode(struct inode *inode, int how) |
@@ -507,6 +505,7 @@ nfs_have_writebacks(struct inode *inode) | |||
507 | * Allocate nfs_write_data structures | 505 | * Allocate nfs_write_data structures |
508 | */ | 506 | */ |
509 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages); | 507 | extern struct nfs_write_data *nfs_writedata_alloc(unsigned int npages); |
508 | extern void nfs_writedata_free(struct nfs_write_data *); | ||
510 | 509 | ||
511 | /* | 510 | /* |
512 | * linux/fs/nfs/read.c | 511 | * linux/fs/nfs/read.c |
@@ -515,7 +514,6 @@ extern int nfs_readpage(struct file *, struct page *); | |||
515 | extern int nfs_readpages(struct file *, struct address_space *, | 514 | extern int nfs_readpages(struct file *, struct address_space *, |
516 | struct list_head *, unsigned); | 515 | struct list_head *, unsigned); |
517 | extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); | 516 | extern int nfs_readpage_result(struct rpc_task *, struct nfs_read_data *); |
518 | extern void nfs_readdata_release(void *data); | ||
519 | extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, | 517 | extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, |
520 | struct page *); | 518 | struct page *); |
521 | 519 | ||
@@ -523,6 +521,7 @@ extern int nfs_readpage_async(struct nfs_open_context *, struct inode *, | |||
523 | * Allocate nfs_read_data structures | 521 | * Allocate nfs_read_data structures |
524 | */ | 522 | */ |
525 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages); | 523 | extern struct nfs_read_data *nfs_readdata_alloc(unsigned int npages); |
524 | extern void nfs_readdata_free(struct nfs_read_data *); | ||
526 | 525 | ||
527 | /* | 526 | /* |
528 | * linux/fs/nfs3proc.c | 527 | * linux/fs/nfs3proc.c |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 829b94b156f2..b359c4a9ec9e 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -82,6 +82,12 @@ | |||
82 | * to generate slightly worse code. So use a simple one-line #define | 82 | * to generate slightly worse code. So use a simple one-line #define |
83 | * for node_isset(), instead of wrapping an inline inside a macro, the | 83 | * for node_isset(), instead of wrapping an inline inside a macro, the |
84 | * way we do the other calls. | 84 | * way we do the other calls. |
85 | * | ||
86 | * NODEMASK_SCRATCH | ||
87 | * When doing above logical AND, OR, XOR, Remap operations the callers tend to | ||
88 | * need temporary nodemask_t's on the stack. But if NODES_SHIFT is large, | ||
89 | * nodemask_t's consume too much stack space. NODEMASK_SCRATCH is a helper | ||
90 | * for such situations. See below and CPUMASK_ALLOC also. | ||
85 | */ | 91 | */ |
86 | 92 | ||
87 | #include <linux/kernel.h> | 93 | #include <linux/kernel.h> |
@@ -473,4 +479,26 @@ static inline int num_node_state(enum node_states state) | |||
473 | #define for_each_node(node) for_each_node_state(node, N_POSSIBLE) | 479 | #define for_each_node(node) for_each_node_state(node, N_POSSIBLE) |
474 | #define for_each_online_node(node) for_each_node_state(node, N_ONLINE) | 480 | #define for_each_online_node(node) for_each_node_state(node, N_ONLINE) |
475 | 481 | ||
482 | /* | ||
483 | * For nodemask scrach area.(See CPUMASK_ALLOC() in cpumask.h) | ||
484 | */ | ||
485 | |||
486 | #if NODES_SHIFT > 8 /* nodemask_t > 64 bytes */ | ||
487 | #define NODEMASK_ALLOC(x, m) struct x *m = kmalloc(sizeof(*m), GFP_KERNEL) | ||
488 | #define NODEMASK_FREE(m) kfree(m) | ||
489 | #else | ||
490 | #define NODEMASK_ALLOC(x, m) struct x _m, *m = &_m | ||
491 | #define NODEMASK_FREE(m) | ||
492 | #endif | ||
493 | |||
494 | /* A example struture for using NODEMASK_ALLOC, used in mempolicy. */ | ||
495 | struct nodemask_scratch { | ||
496 | nodemask_t mask1; | ||
497 | nodemask_t mask2; | ||
498 | }; | ||
499 | |||
500 | #define NODEMASK_SCRATCH(x) NODEMASK_ALLOC(nodemask_scratch, x) | ||
501 | #define NODEMASK_SCRATCH_FREE(x) NODEMASK_FREE(x) | ||
502 | |||
503 | |||
476 | #endif /* __LINUX_NODEMASK_H */ | 504 | #endif /* __LINUX_NODEMASK_H */ |
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index c9663c690303..53b94e025c7c 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h | |||
@@ -18,5 +18,8 @@ extern struct phy_device *of_phy_connect(struct net_device *dev, | |||
18 | struct device_node *phy_np, | 18 | struct device_node *phy_np, |
19 | void (*hndlr)(struct net_device *), | 19 | void (*hndlr)(struct net_device *), |
20 | u32 flags, phy_interface_t iface); | 20 | u32 flags, phy_interface_t iface); |
21 | extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | ||
22 | void (*hndlr)(struct net_device *), | ||
23 | phy_interface_t iface); | ||
21 | 24 | ||
22 | #endif /* __LINUX_OF_MDIO_H */ | 25 | #endif /* __LINUX_OF_MDIO_H */ |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index bd15d7a5f5ce..b53f7006cc4e 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -115,27 +115,44 @@ enum perf_counter_sample_format { | |||
115 | PERF_SAMPLE_TID = 1U << 1, | 115 | PERF_SAMPLE_TID = 1U << 1, |
116 | PERF_SAMPLE_TIME = 1U << 2, | 116 | PERF_SAMPLE_TIME = 1U << 2, |
117 | PERF_SAMPLE_ADDR = 1U << 3, | 117 | PERF_SAMPLE_ADDR = 1U << 3, |
118 | PERF_SAMPLE_GROUP = 1U << 4, | 118 | PERF_SAMPLE_READ = 1U << 4, |
119 | PERF_SAMPLE_CALLCHAIN = 1U << 5, | 119 | PERF_SAMPLE_CALLCHAIN = 1U << 5, |
120 | PERF_SAMPLE_ID = 1U << 6, | 120 | PERF_SAMPLE_ID = 1U << 6, |
121 | PERF_SAMPLE_CPU = 1U << 7, | 121 | PERF_SAMPLE_CPU = 1U << 7, |
122 | PERF_SAMPLE_PERIOD = 1U << 8, | 122 | PERF_SAMPLE_PERIOD = 1U << 8, |
123 | PERF_SAMPLE_STREAM_ID = 1U << 9, | 123 | PERF_SAMPLE_STREAM_ID = 1U << 9, |
124 | PERF_SAMPLE_RAW = 1U << 10, | ||
124 | 125 | ||
125 | PERF_SAMPLE_MAX = 1U << 10, /* non-ABI */ | 126 | PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */ |
126 | }; | 127 | }; |
127 | 128 | ||
128 | /* | 129 | /* |
129 | * Bits that can be set in attr.read_format to request that | 130 | * The format of the data returned by read() on a perf counter fd, |
130 | * reads on the counter should return the indicated quantities, | 131 | * as specified by attr.read_format: |
131 | * in increasing order of bit value, after the counter value. | 132 | * |
133 | * struct read_format { | ||
134 | * { u64 value; | ||
135 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
136 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
137 | * { u64 id; } && PERF_FORMAT_ID | ||
138 | * } && !PERF_FORMAT_GROUP | ||
139 | * | ||
140 | * { u64 nr; | ||
141 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | ||
142 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
143 | * { u64 value; | ||
144 | * { u64 id; } && PERF_FORMAT_ID | ||
145 | * } cntr[nr]; | ||
146 | * } && PERF_FORMAT_GROUP | ||
147 | * }; | ||
132 | */ | 148 | */ |
133 | enum perf_counter_read_format { | 149 | enum perf_counter_read_format { |
134 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, | 150 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, |
135 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, | 151 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, |
136 | PERF_FORMAT_ID = 1U << 2, | 152 | PERF_FORMAT_ID = 1U << 2, |
153 | PERF_FORMAT_GROUP = 1U << 3, | ||
137 | 154 | ||
138 | PERF_FORMAT_MAX = 1U << 3, /* non-ABI */ | 155 | PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ |
139 | }; | 156 | }; |
140 | 157 | ||
141 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | 158 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ |
@@ -181,8 +198,9 @@ struct perf_counter_attr { | |||
181 | freq : 1, /* use freq, not period */ | 198 | freq : 1, /* use freq, not period */ |
182 | inherit_stat : 1, /* per task counts */ | 199 | inherit_stat : 1, /* per task counts */ |
183 | enable_on_exec : 1, /* next exec enables */ | 200 | enable_on_exec : 1, /* next exec enables */ |
201 | task : 1, /* trace fork/exit */ | ||
184 | 202 | ||
185 | __reserved_1 : 51; | 203 | __reserved_1 : 50; |
186 | 204 | ||
187 | __u32 wakeup_events; /* wakeup every n events */ | 205 | __u32 wakeup_events; /* wakeup every n events */ |
188 | __u32 __reserved_2; | 206 | __u32 __reserved_2; |
@@ -311,6 +329,15 @@ enum perf_event_type { | |||
311 | /* | 329 | /* |
312 | * struct { | 330 | * struct { |
313 | * struct perf_event_header header; | 331 | * struct perf_event_header header; |
332 | * u32 pid, ppid; | ||
333 | * u32 tid, ptid; | ||
334 | * }; | ||
335 | */ | ||
336 | PERF_EVENT_EXIT = 4, | ||
337 | |||
338 | /* | ||
339 | * struct { | ||
340 | * struct perf_event_header header; | ||
314 | * u64 time; | 341 | * u64 time; |
315 | * u64 id; | 342 | * u64 id; |
316 | * u64 stream_id; | 343 | * u64 stream_id; |
@@ -323,6 +350,7 @@ enum perf_event_type { | |||
323 | * struct { | 350 | * struct { |
324 | * struct perf_event_header header; | 351 | * struct perf_event_header header; |
325 | * u32 pid, ppid; | 352 | * u32 pid, ppid; |
353 | * u32 tid, ptid; | ||
326 | * }; | 354 | * }; |
327 | */ | 355 | */ |
328 | PERF_EVENT_FORK = 7, | 356 | PERF_EVENT_FORK = 7, |
@@ -331,10 +359,8 @@ enum perf_event_type { | |||
331 | * struct { | 359 | * struct { |
332 | * struct perf_event_header header; | 360 | * struct perf_event_header header; |
333 | * u32 pid, tid; | 361 | * u32 pid, tid; |
334 | * u64 value; | 362 | * |
335 | * { u64 time_enabled; } && PERF_FORMAT_ENABLED | 363 | * struct read_format values; |
336 | * { u64 time_running; } && PERF_FORMAT_RUNNING | ||
337 | * { u64 parent_id; } && PERF_FORMAT_ID | ||
338 | * }; | 364 | * }; |
339 | */ | 365 | */ |
340 | PERF_EVENT_READ = 8, | 366 | PERF_EVENT_READ = 8, |
@@ -352,11 +378,24 @@ enum perf_event_type { | |||
352 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 378 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
353 | * { u64 period; } && PERF_SAMPLE_PERIOD | 379 | * { u64 period; } && PERF_SAMPLE_PERIOD |
354 | * | 380 | * |
355 | * { u64 nr; | 381 | * { struct read_format values; } && PERF_SAMPLE_READ |
356 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP | ||
357 | * | 382 | * |
358 | * { u64 nr, | 383 | * { u64 nr, |
359 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN | 384 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN |
385 | * | ||
386 | * # | ||
387 | * # The RAW record below is opaque data wrt the ABI | ||
388 | * # | ||
389 | * # That is, the ABI doesn't make any promises wrt to | ||
390 | * # the stability of its content, it may vary depending | ||
391 | * # on event, hardware, kernel version and phase of | ||
392 | * # the moon. | ||
393 | * # | ||
394 | * # In other words, PERF_SAMPLE_RAW contents are not an ABI. | ||
395 | * # | ||
396 | * | ||
397 | * { u32 size; | ||
398 | * char data[size];}&& PERF_SAMPLE_RAW | ||
360 | * }; | 399 | * }; |
361 | */ | 400 | */ |
362 | PERF_EVENT_SAMPLE = 9, | 401 | PERF_EVENT_SAMPLE = 9, |
@@ -402,6 +441,11 @@ struct perf_callchain_entry { | |||
402 | __u64 ip[PERF_MAX_STACK_DEPTH]; | 441 | __u64 ip[PERF_MAX_STACK_DEPTH]; |
403 | }; | 442 | }; |
404 | 443 | ||
444 | struct perf_raw_record { | ||
445 | u32 size; | ||
446 | void *data; | ||
447 | }; | ||
448 | |||
405 | struct task_struct; | 449 | struct task_struct; |
406 | 450 | ||
407 | /** | 451 | /** |
@@ -670,10 +714,13 @@ struct perf_sample_data { | |||
670 | struct pt_regs *regs; | 714 | struct pt_regs *regs; |
671 | u64 addr; | 715 | u64 addr; |
672 | u64 period; | 716 | u64 period; |
717 | struct perf_raw_record *raw; | ||
673 | }; | 718 | }; |
674 | 719 | ||
675 | extern int perf_counter_overflow(struct perf_counter *counter, int nmi, | 720 | extern int perf_counter_overflow(struct perf_counter *counter, int nmi, |
676 | struct perf_sample_data *data); | 721 | struct perf_sample_data *data); |
722 | extern void perf_counter_output(struct perf_counter *counter, int nmi, | ||
723 | struct perf_sample_data *data); | ||
677 | 724 | ||
678 | /* | 725 | /* |
679 | * Return 1 for a software counter, 0 for a hardware counter | 726 | * Return 1 for a software counter, 0 for a hardware counter |
diff --git a/include/linux/pps.h b/include/linux/pps.h index cfe5c7214ec6..0194ab06177b 100644 --- a/include/linux/pps.h +++ b/include/linux/pps.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef _PPS_H_ | 22 | #ifndef _PPS_H_ |
23 | #define _PPS_H_ | 23 | #define _PPS_H_ |
24 | 24 | ||
25 | #include <linux/types.h> | ||
26 | |||
25 | #define PPS_VERSION "5.3.6" | 27 | #define PPS_VERSION "5.3.6" |
26 | #define PPS_MAX_SOURCES 16 /* should be enough... */ | 28 | #define PPS_MAX_SOURCES 16 /* should be enough... */ |
27 | 29 | ||
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 2ce29831feb6..278777fa8a3a 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -224,7 +224,7 @@ void rfkill_destroy(struct rfkill *rfkill); | |||
224 | * should be blocked) so that drivers need not keep track of the soft | 224 | * should be blocked) so that drivers need not keep track of the soft |
225 | * block state -- which they might not be able to. | 225 | * block state -- which they might not be able to. |
226 | */ | 226 | */ |
227 | bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | 227 | bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); |
228 | 228 | ||
229 | /** | 229 | /** |
230 | * rfkill_set_sw_state - Set the internal rfkill software block state | 230 | * rfkill_set_sw_state - Set the internal rfkill software block state |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index e5996984ddd0..9aaf5bfdad1a 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -242,6 +242,8 @@ size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, | |||
242 | */ | 242 | */ |
243 | 243 | ||
244 | #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ | 244 | #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ |
245 | #define SG_MITER_TO_SG (1 << 1) /* flush back to phys on unmap */ | ||
246 | #define SG_MITER_FROM_SG (1 << 2) /* nop */ | ||
245 | 247 | ||
246 | struct sg_mapping_iter { | 248 | struct sg_mapping_iter { |
247 | /* the following three fields can be accessed directly */ | 249 | /* the following three fields can be accessed directly */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 3ab08e4bb6b8..0f1ea4a66957 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1198,6 +1198,7 @@ struct task_struct { | |||
1198 | * a short time | 1198 | * a short time |
1199 | */ | 1199 | */ |
1200 | unsigned char fpu_counter; | 1200 | unsigned char fpu_counter; |
1201 | s8 oomkilladj; /* OOM kill score adjustment (bit shift). */ | ||
1201 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 1202 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
1202 | unsigned int btrace_seq; | 1203 | unsigned int btrace_seq; |
1203 | #endif | 1204 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 5eff459b3833..1f16eea2017b 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/resource.h> | 28 | #include <linux/resource.h> |
29 | #include <linux/sem.h> | 29 | #include <linux/sem.h> |
30 | #include <linux/shm.h> | 30 | #include <linux/shm.h> |
31 | #include <linux/mm.h> /* PAGE_ALIGN */ | ||
31 | #include <linux/msg.h> | 32 | #include <linux/msg.h> |
32 | #include <linux/sched.h> | 33 | #include <linux/sched.h> |
33 | #include <linux/key.h> | 34 | #include <linux/key.h> |
@@ -66,6 +67,9 @@ extern int cap_inode_setxattr(struct dentry *dentry, const char *name, | |||
66 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); | 67 | extern int cap_inode_removexattr(struct dentry *dentry, const char *name); |
67 | extern int cap_inode_need_killpriv(struct dentry *dentry); | 68 | extern int cap_inode_need_killpriv(struct dentry *dentry); |
68 | extern int cap_inode_killpriv(struct dentry *dentry); | 69 | extern int cap_inode_killpriv(struct dentry *dentry); |
70 | extern int cap_file_mmap(struct file *file, unsigned long reqprot, | ||
71 | unsigned long prot, unsigned long flags, | ||
72 | unsigned long addr, unsigned long addr_only); | ||
69 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); | 73 | extern int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags); |
70 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, | 74 | extern int cap_task_prctl(int option, unsigned long arg2, unsigned long arg3, |
71 | unsigned long arg4, unsigned long arg5); | 75 | unsigned long arg4, unsigned long arg5); |
@@ -92,6 +96,7 @@ extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); | |||
92 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); | 96 | extern int cap_netlink_recv(struct sk_buff *skb, int cap); |
93 | 97 | ||
94 | extern unsigned long mmap_min_addr; | 98 | extern unsigned long mmap_min_addr; |
99 | extern unsigned long dac_mmap_min_addr; | ||
95 | /* | 100 | /* |
96 | * Values used in the task_security_ops calls | 101 | * Values used in the task_security_ops calls |
97 | */ | 102 | */ |
@@ -116,6 +121,21 @@ struct request_sock; | |||
116 | #define LSM_UNSAFE_PTRACE 2 | 121 | #define LSM_UNSAFE_PTRACE 2 |
117 | #define LSM_UNSAFE_PTRACE_CAP 4 | 122 | #define LSM_UNSAFE_PTRACE_CAP 4 |
118 | 123 | ||
124 | /* | ||
125 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
126 | * low as possible but still greater than mmap_min_addr | ||
127 | */ | ||
128 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
129 | { | ||
130 | hint &= PAGE_MASK; | ||
131 | if (((void *)hint != NULL) && | ||
132 | (hint < mmap_min_addr)) | ||
133 | return PAGE_ALIGN(mmap_min_addr); | ||
134 | return hint; | ||
135 | } | ||
136 | extern int mmap_min_addr_handler(struct ctl_table *table, int write, struct file *filp, | ||
137 | void __user *buffer, size_t *lenp, loff_t *ppos); | ||
138 | |||
119 | #ifdef CONFIG_SECURITY | 139 | #ifdef CONFIG_SECURITY |
120 | 140 | ||
121 | struct security_mnt_opts { | 141 | struct security_mnt_opts { |
@@ -2197,9 +2217,7 @@ static inline int security_file_mmap(struct file *file, unsigned long reqprot, | |||
2197 | unsigned long addr, | 2217 | unsigned long addr, |
2198 | unsigned long addr_only) | 2218 | unsigned long addr_only) |
2199 | { | 2219 | { |
2200 | if ((addr < mmap_min_addr) && !capable(CAP_SYS_RAWIO)) | 2220 | return cap_file_mmap(file, reqprot, prot, flags, addr, addr_only); |
2201 | return -EACCES; | ||
2202 | return 0; | ||
2203 | } | 2221 | } |
2204 | 2222 | ||
2205 | static inline int security_file_mprotect(struct vm_area_struct *vma, | 2223 | static inline int security_file_mprotect(struct vm_area_struct *vma, |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1488d8c81aac..e8c6c9136c97 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -394,6 +394,7 @@ extern void __do_SAK(struct tty_struct *tty); | |||
394 | extern void disassociate_ctty(int priv); | 394 | extern void disassociate_ctty(int priv); |
395 | extern void no_tty(void); | 395 | extern void no_tty(void); |
396 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 396 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
397 | extern void tty_flush_to_ldisc(struct tty_struct *tty); | ||
397 | extern void tty_buffer_free_all(struct tty_struct *tty); | 398 | extern void tty_buffer_free_all(struct tty_struct *tty); |
398 | extern void tty_buffer_flush(struct tty_struct *tty); | 399 | extern void tty_buffer_flush(struct tty_struct *tty); |
399 | extern void tty_buffer_init(struct tty_struct *tty); | 400 | extern void tty_buffer_init(struct tty_struct *tty); |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 40f38d896777..0c4ee9b88f85 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -144,7 +144,7 @@ struct tty_ldisc_ops { | |||
144 | 144 | ||
145 | struct tty_ldisc { | 145 | struct tty_ldisc { |
146 | struct tty_ldisc_ops *ops; | 146 | struct tty_ldisc_ops *ops; |
147 | int refcount; | 147 | atomic_t users; |
148 | }; | 148 | }; |
149 | 149 | ||
150 | #define TTY_LDISC_MAGIC 0x5403 | 150 | #define TTY_LDISC_MAGIC 0x5403 |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index ed889f4168f3..ae779bb8cc0f 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -73,6 +73,10 @@ | |||
73 | 73 | ||
74 | #define UCB_ADC_DATA 0x68 | 74 | #define UCB_ADC_DATA 0x68 |
75 | #define UCB_ADC_DAT_VALID (1 << 15) | 75 | #define UCB_ADC_DAT_VALID (1 << 15) |
76 | |||
77 | #define UCB_FCSR 0x6c | ||
78 | #define UCB_FCSR_AVE (1 << 12) | ||
79 | |||
76 | #define UCB_ADC_DAT_MASK 0x3ff | 80 | #define UCB_ADC_DAT_MASK 0x3ff |
77 | 81 | ||
78 | #define UCB_ID 0x7e | 82 | #define UCB_ID 0x7e |
diff --git a/include/linux/uio.h b/include/linux/uio.h index b7fe13883bdb..98c114323a8b 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -19,15 +19,6 @@ struct iovec | |||
19 | __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ | 19 | __kernel_size_t iov_len; /* Must be size_t (1003.1g) */ |
20 | }; | 20 | }; |
21 | 21 | ||
22 | #ifdef __KERNEL__ | ||
23 | |||
24 | struct kvec { | ||
25 | void *iov_base; /* and that should *never* hold a userland pointer */ | ||
26 | size_t iov_len; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
30 | |||
31 | /* | 22 | /* |
32 | * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) | 23 | * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1) |
33 | */ | 24 | */ |
@@ -35,6 +26,13 @@ struct kvec { | |||
35 | #define UIO_FASTIOV 8 | 26 | #define UIO_FASTIOV 8 |
36 | #define UIO_MAXIOV 1024 | 27 | #define UIO_MAXIOV 1024 |
37 | 28 | ||
29 | #ifdef __KERNEL__ | ||
30 | |||
31 | struct kvec { | ||
32 | void *iov_base; /* and that should *never* hold a userland pointer */ | ||
33 | size_t iov_len; | ||
34 | }; | ||
35 | |||
38 | /* | 36 | /* |
39 | * Total number of bytes covered by an iovec. | 37 | * Total number of bytes covered by an iovec. |
40 | * | 38 | * |
@@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) | |||
53 | } | 51 | } |
54 | 52 | ||
55 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); | 53 | unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); |
54 | #endif | ||
56 | 55 | ||
57 | #endif | 56 | #endif |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 95846d988011..74f16876f38d 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -338,6 +338,7 @@ struct v4l2_pix_format { | |||
338 | /* Vendor-specific formats */ | 338 | /* Vendor-specific formats */ |
339 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ | 339 | #define V4L2_PIX_FMT_WNVA v4l2_fourcc('W', 'N', 'V', 'A') /* Winnov hw compress */ |
340 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ | 340 | #define V4L2_PIX_FMT_SN9C10X v4l2_fourcc('S', '9', '1', '0') /* SN9C10x compression */ |
341 | #define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0') /* SN9C20x YUV 4:2:0 */ | ||
341 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */ | 342 | #define V4L2_PIX_FMT_PWC1 v4l2_fourcc('P', 'W', 'C', '1') /* pwc older webcam */ |
342 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */ | 343 | #define V4L2_PIX_FMT_PWC2 v4l2_fourcc('P', 'W', 'C', '2') /* pwc newer webcam */ |
343 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ | 344 | #define V4L2_PIX_FMT_ET61X251 v4l2_fourcc('E', '6', '2', '5') /* ET61X251 compression */ |
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index be7d255fc7cf..8dab9f2b8832 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -20,8 +20,7 @@ | |||
20 | 20 | ||
21 | #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ | 21 | #define VIRTIO_BLK_ID_BYTES (sizeof(__u16[256])) /* IDENTIFY DATA */ |
22 | 22 | ||
23 | struct virtio_blk_config | 23 | struct virtio_blk_config { |
24 | { | ||
25 | /* The capacity (in 512-byte sectors). */ | 24 | /* The capacity (in 512-byte sectors). */ |
26 | __u64 capacity; | 25 | __u64 capacity; |
27 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ | 26 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
@@ -50,8 +49,7 @@ struct virtio_blk_config | |||
50 | #define VIRTIO_BLK_T_BARRIER 0x80000000 | 49 | #define VIRTIO_BLK_T_BARRIER 0x80000000 |
51 | 50 | ||
52 | /* This is the first element of the read scatter-gather list. */ | 51 | /* This is the first element of the read scatter-gather list. */ |
53 | struct virtio_blk_outhdr | 52 | struct virtio_blk_outhdr { |
54 | { | ||
55 | /* VIRTIO_BLK_T* */ | 53 | /* VIRTIO_BLK_T* */ |
56 | __u32 type; | 54 | __u32 type; |
57 | /* io priority. */ | 55 | /* io priority. */ |
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 99f514575f6a..e547e3c8ee9a 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
@@ -79,8 +79,7 @@ | |||
79 | * the dev->feature bits if it wants. | 79 | * the dev->feature bits if it wants. |
80 | */ | 80 | */ |
81 | typedef void vq_callback_t(struct virtqueue *); | 81 | typedef void vq_callback_t(struct virtqueue *); |
82 | struct virtio_config_ops | 82 | struct virtio_config_ops { |
83 | { | ||
84 | void (*get)(struct virtio_device *vdev, unsigned offset, | 83 | void (*get)(struct virtio_device *vdev, unsigned offset, |
85 | void *buf, unsigned len); | 84 | void *buf, unsigned len); |
86 | void (*set)(struct virtio_device *vdev, unsigned offset, | 85 | void (*set)(struct virtio_device *vdev, unsigned offset, |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 9c543d6ac535..d8dd539c9f48 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -31,8 +31,7 @@ | |||
31 | 31 | ||
32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
33 | 33 | ||
34 | struct virtio_net_config | 34 | struct virtio_net_config { |
35 | { | ||
36 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 35 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
37 | __u8 mac[6]; | 36 | __u8 mac[6]; |
38 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | 37 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ |
@@ -41,8 +40,7 @@ struct virtio_net_config | |||
41 | 40 | ||
42 | /* This is the first element of the scatter-gather list. If you don't | 41 | /* This is the first element of the scatter-gather list. If you don't |
43 | * specify GSO or CSUM features, you can simply ignore the header. */ | 42 | * specify GSO or CSUM features, you can simply ignore the header. */ |
44 | struct virtio_net_hdr | 43 | struct virtio_net_hdr { |
45 | { | ||
46 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset | 44 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset |
47 | __u8 flags; | 45 | __u8 flags; |
48 | #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame | 46 | #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index 693e0ec5afa6..e4d144b132b5 100644 --- a/include/linux/virtio_ring.h +++ b/include/linux/virtio_ring.h | |||
@@ -30,8 +30,7 @@ | |||
30 | #define VIRTIO_RING_F_INDIRECT_DESC 28 | 30 | #define VIRTIO_RING_F_INDIRECT_DESC 28 |
31 | 31 | ||
32 | /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ | 32 | /* Virtio ring descriptors: 16 bytes. These can chain together via "next". */ |
33 | struct vring_desc | 33 | struct vring_desc { |
34 | { | ||
35 | /* Address (guest-physical). */ | 34 | /* Address (guest-physical). */ |
36 | __u64 addr; | 35 | __u64 addr; |
37 | /* Length. */ | 36 | /* Length. */ |
@@ -42,24 +41,21 @@ struct vring_desc | |||
42 | __u16 next; | 41 | __u16 next; |
43 | }; | 42 | }; |
44 | 43 | ||
45 | struct vring_avail | 44 | struct vring_avail { |
46 | { | ||
47 | __u16 flags; | 45 | __u16 flags; |
48 | __u16 idx; | 46 | __u16 idx; |
49 | __u16 ring[]; | 47 | __u16 ring[]; |
50 | }; | 48 | }; |
51 | 49 | ||
52 | /* u32 is used here for ids for padding reasons. */ | 50 | /* u32 is used here for ids for padding reasons. */ |
53 | struct vring_used_elem | 51 | struct vring_used_elem { |
54 | { | ||
55 | /* Index of start of used descriptor chain. */ | 52 | /* Index of start of used descriptor chain. */ |
56 | __u32 id; | 53 | __u32 id; |
57 | /* Total length of the descriptor chain which was used (written to) */ | 54 | /* Total length of the descriptor chain which was used (written to) */ |
58 | __u32 len; | 55 | __u32 len; |
59 | }; | 56 | }; |
60 | 57 | ||
61 | struct vring_used | 58 | struct vring_used { |
62 | { | ||
63 | __u16 flags; | 59 | __u16 flags; |
64 | __u16 idx; | 60 | __u16 idx; |
65 | struct vring_used_elem ring[]; | 61 | struct vring_used_elem ring[]; |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 6788e1a4d4ca..cf3c2f5dba51 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -77,7 +77,14 @@ struct task_struct; | |||
77 | #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ | 77 | #define __WAIT_BIT_KEY_INITIALIZER(word, bit) \ |
78 | { .flags = word, .bit_nr = bit, } | 78 | { .flags = word, .bit_nr = bit, } |
79 | 79 | ||
80 | extern void init_waitqueue_head(wait_queue_head_t *q); | 80 | extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *); |
81 | |||
82 | #define init_waitqueue_head(q) \ | ||
83 | do { \ | ||
84 | static struct lock_class_key __key; \ | ||
85 | \ | ||
86 | __init_waitqueue_head((q), &__key); \ | ||
87 | } while (0) | ||
81 | 88 | ||
82 | #ifdef CONFIG_LOCKDEP | 89 | #ifdef CONFIG_LOCKDEP |
83 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ | 90 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ |
diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 11a4a2d3e364..94e908c0d7a0 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h | |||
@@ -60,6 +60,10 @@ enum { | |||
60 | V4L2_IDENT_OV7670 = 250, | 60 | V4L2_IDENT_OV7670 = 250, |
61 | V4L2_IDENT_OV7720 = 251, | 61 | V4L2_IDENT_OV7720 = 251, |
62 | V4L2_IDENT_OV7725 = 252, | 62 | V4L2_IDENT_OV7725 = 252, |
63 | V4L2_IDENT_OV7660 = 253, | ||
64 | V4L2_IDENT_OV9650 = 254, | ||
65 | V4L2_IDENT_OV9655 = 255, | ||
66 | V4L2_IDENT_SOI968 = 256, | ||
63 | 67 | ||
64 | /* module saa7146: reserved range 300-309 */ | 68 | /* module saa7146: reserved range 300-309 */ |
65 | V4L2_IDENT_SAA7146 = 300, | 69 | V4L2_IDENT_SAA7146 = 300, |
@@ -161,6 +165,9 @@ enum { | |||
161 | /* module tw9910: just ident 9910 */ | 165 | /* module tw9910: just ident 9910 */ |
162 | V4L2_IDENT_TW9910 = 9910, | 166 | V4L2_IDENT_TW9910 = 9910, |
163 | 167 | ||
168 | /* module sn9c20x: just ident 10000 */ | ||
169 | V4L2_IDENT_SN9C20X = 10000, | ||
170 | |||
164 | /* module msp3400: reserved range 34000-34999 and 44000-44999 */ | 171 | /* module msp3400: reserved range 34000-34999 and 44000-44999 */ |
165 | V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only | 172 | V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only |
166 | use internally (tveeprom.c). */ | 173 | use internally (tveeprom.c). */ |
@@ -237,6 +244,11 @@ enum { | |||
237 | V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ | 244 | V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ |
238 | V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ | 245 | V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ |
239 | V4L2_IDENT_MT9T031 = 45020, | 246 | V4L2_IDENT_MT9T031 = 45020, |
247 | V4L2_IDENT_MT9V111 = 45031, | ||
248 | V4L2_IDENT_MT9V112 = 45032, | ||
249 | |||
250 | /* HV7131R CMOS sensor: just ident 46000 */ | ||
251 | V4L2_IDENT_HV7131R = 46000, | ||
240 | 252 | ||
241 | /* module cs53132a: just ident 53132 */ | 253 | /* module cs53132a: just ident 53132 */ |
242 | V4L2_IDENT_CS53l32A = 53132, | 254 | V4L2_IDENT_CS53l32A = 53132, |
diff --git a/include/net/act_api.h b/include/net/act_api.h index 565eed8fe496..c05fd717c588 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -16,7 +16,7 @@ struct tcf_common { | |||
16 | u32 tcfc_capab; | 16 | u32 tcfc_capab; |
17 | int tcfc_action; | 17 | int tcfc_action; |
18 | struct tcf_t tcfc_tm; | 18 | struct tcf_t tcfc_tm; |
19 | struct gnet_stats_basic tcfc_bstats; | 19 | struct gnet_stats_basic_packed tcfc_bstats; |
20 | struct gnet_stats_queue tcfc_qstats; | 20 | struct gnet_stats_queue tcfc_qstats; |
21 | struct gnet_stats_rate_est tcfc_rate_est; | 21 | struct gnet_stats_rate_est tcfc_rate_est; |
22 | spinlock_t tcfc_lock; | 22 | spinlock_t tcfc_lock; |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 80072611d26a..c274993234e3 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -355,7 +355,17 @@ struct rfcomm_dev_list_req { | |||
355 | }; | 355 | }; |
356 | 356 | ||
357 | int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); | 357 | int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg); |
358 | |||
359 | #ifdef CONFIG_BT_RFCOMM_TTY | ||
358 | int rfcomm_init_ttys(void); | 360 | int rfcomm_init_ttys(void); |
359 | void rfcomm_cleanup_ttys(void); | 361 | void rfcomm_cleanup_ttys(void); |
360 | 362 | #else | |
363 | static inline int rfcomm_init_ttys(void) | ||
364 | { | ||
365 | return 0; | ||
366 | } | ||
367 | static inline void rfcomm_cleanup_ttys(void) | ||
368 | { | ||
369 | } | ||
370 | #endif | ||
361 | #endif /* __RFCOMM_H */ | 371 | #endif /* __RFCOMM_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 1a21895b732b..d1892d66701a 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -979,6 +979,10 @@ struct cfg80211_ops { | |||
979 | * channels at a later time. This can be used for devices which do not | 979 | * channels at a later time. This can be used for devices which do not |
980 | * have calibration information gauranteed for frequencies or settings | 980 | * have calibration information gauranteed for frequencies or settings |
981 | * outside of its regulatory domain. | 981 | * outside of its regulatory domain. |
982 | * @disable_beacon_hints: enable this if your driver needs to ensure that | ||
983 | * passive scan flags and beaconing flags may not be lifted by cfg80211 | ||
984 | * due to regulatory beacon hints. For more information on beacon | ||
985 | * hints read the documenation for regulatory_hint_found_beacon() | ||
982 | * @reg_notifier: the driver's regulatory notification callback | 986 | * @reg_notifier: the driver's regulatory notification callback |
983 | * @regd: the driver's regulatory domain, if one was requested via | 987 | * @regd: the driver's regulatory domain, if one was requested via |
984 | * the regulatory_hint() API. This can be used by the driver | 988 | * the regulatory_hint() API. This can be used by the driver |
@@ -1004,6 +1008,7 @@ struct wiphy { | |||
1004 | 1008 | ||
1005 | bool custom_regulatory; | 1009 | bool custom_regulatory; |
1006 | bool strict_regulatory; | 1010 | bool strict_regulatory; |
1011 | bool disable_beacon_hints; | ||
1007 | 1012 | ||
1008 | enum cfg80211_signal_type signal_type; | 1013 | enum cfg80211_signal_type signal_type; |
1009 | 1014 | ||
diff --git a/include/net/gen_stats.h b/include/net/gen_stats.h index d136b5240ef2..c1488553e349 100644 --- a/include/net/gen_stats.h +++ b/include/net/gen_stats.h | |||
@@ -28,7 +28,7 @@ extern int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, | |||
28 | spinlock_t *lock, struct gnet_dump *d); | 28 | spinlock_t *lock, struct gnet_dump *d); |
29 | 29 | ||
30 | extern int gnet_stats_copy_basic(struct gnet_dump *d, | 30 | extern int gnet_stats_copy_basic(struct gnet_dump *d, |
31 | struct gnet_stats_basic *b); | 31 | struct gnet_stats_basic_packed *b); |
32 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, | 32 | extern int gnet_stats_copy_rate_est(struct gnet_dump *d, |
33 | struct gnet_stats_rate_est *r); | 33 | struct gnet_stats_rate_est *r); |
34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, | 34 | extern int gnet_stats_copy_queue(struct gnet_dump *d, |
@@ -37,14 +37,14 @@ extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); | |||
37 | 37 | ||
38 | extern int gnet_stats_finish_copy(struct gnet_dump *d); | 38 | extern int gnet_stats_finish_copy(struct gnet_dump *d); |
39 | 39 | ||
40 | extern int gen_new_estimator(struct gnet_stats_basic *bstats, | 40 | extern int gen_new_estimator(struct gnet_stats_basic_packed *bstats, |
41 | struct gnet_stats_rate_est *rate_est, | 41 | struct gnet_stats_rate_est *rate_est, |
42 | spinlock_t *stats_lock, struct nlattr *opt); | 42 | spinlock_t *stats_lock, struct nlattr *opt); |
43 | extern void gen_kill_estimator(struct gnet_stats_basic *bstats, | 43 | extern void gen_kill_estimator(struct gnet_stats_basic_packed *bstats, |
44 | struct gnet_stats_rate_est *rate_est); | 44 | struct gnet_stats_rate_est *rate_est); |
45 | extern int gen_replace_estimator(struct gnet_stats_basic *bstats, | 45 | extern int gen_replace_estimator(struct gnet_stats_basic_packed *bstats, |
46 | struct gnet_stats_rate_est *rate_est, | 46 | struct gnet_stats_rate_est *rate_est, |
47 | spinlock_t *stats_lock, struct nlattr *opt); | 47 | spinlock_t *stats_lock, struct nlattr *opt); |
48 | extern bool gen_estimator_active(const struct gnet_stats_basic *bstats, | 48 | extern bool gen_estimator_active(const struct gnet_stats_basic_packed *bstats, |
49 | const struct gnet_stats_rate_est *rate_est); | 49 | const struct gnet_stats_rate_est *rate_est); |
50 | #endif | 50 | #endif |
diff --git a/include/net/netfilter/xt_rateest.h b/include/net/netfilter/xt_rateest.h index 65d594dffbff..ddbf37e19616 100644 --- a/include/net/netfilter/xt_rateest.h +++ b/include/net/netfilter/xt_rateest.h | |||
@@ -8,7 +8,7 @@ struct xt_rateest { | |||
8 | spinlock_t lock; | 8 | spinlock_t lock; |
9 | struct gnet_estimator params; | 9 | struct gnet_estimator params; |
10 | struct gnet_stats_rate_est rstats; | 10 | struct gnet_stats_rate_est rstats; |
11 | struct gnet_stats_basic bstats; | 11 | struct gnet_stats_basic_packed bstats; |
12 | }; | 12 | }; |
13 | 13 | ||
14 | extern struct xt_rateest *xt_rateest_lookup(const char *name); | 14 | extern struct xt_rateest *xt_rateest_lookup(const char *name); |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 82a3191375f5..7eafb8d54470 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -61,8 +61,8 @@ psched_tdiff_bounded(psched_time_t tv1, psched_time_t tv2, psched_time_t bound) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | struct qdisc_watchdog { | 63 | struct qdisc_watchdog { |
64 | struct hrtimer timer; | 64 | struct tasklet_hrtimer timer; |
65 | struct Qdisc *qdisc; | 65 | struct Qdisc *qdisc; |
66 | }; | 66 | }; |
67 | 67 | ||
68 | extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); | 68 | extern void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc); |
diff --git a/include/net/rose.h b/include/net/rose.h index cbd5364b2c8a..5ba9f02731eb 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -156,7 +156,7 @@ extern int sysctl_rose_maximum_vcs; | |||
156 | extern int sysctl_rose_window_size; | 156 | extern int sysctl_rose_window_size; |
157 | extern int rosecmp(rose_address *, rose_address *); | 157 | extern int rosecmp(rose_address *, rose_address *); |
158 | extern int rosecmpm(rose_address *, rose_address *, unsigned short); | 158 | extern int rosecmpm(rose_address *, rose_address *, unsigned short); |
159 | extern const char *rose2asc(const rose_address *); | 159 | extern char *rose2asc(char *buf, const rose_address *); |
160 | extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *); | 160 | extern struct sock *rose_find_socket(unsigned int, struct rose_neigh *); |
161 | extern void rose_kill_by_neigh(struct rose_neigh *); | 161 | extern void rose_kill_by_neigh(struct rose_neigh *); |
162 | extern unsigned int rose_new_lci(struct rose_neigh *); | 162 | extern unsigned int rose_new_lci(struct rose_neigh *); |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index 964ffa0d8815..5482e9582f55 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -72,7 +72,7 @@ struct Qdisc | |||
72 | */ | 72 | */ |
73 | unsigned long state; | 73 | unsigned long state; |
74 | struct sk_buff_head q; | 74 | struct sk_buff_head q; |
75 | struct gnet_stats_basic bstats; | 75 | struct gnet_stats_basic_packed bstats; |
76 | struct gnet_stats_queue qstats; | 76 | struct gnet_stats_queue qstats; |
77 | }; | 77 | }; |
78 | 78 | ||
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 1867553c61e5..f64fbaae781a 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -144,6 +144,9 @@ | |||
144 | #undef TP_fast_assign | 144 | #undef TP_fast_assign |
145 | #define TP_fast_assign(args...) args | 145 | #define TP_fast_assign(args...) args |
146 | 146 | ||
147 | #undef TP_perf_assign | ||
148 | #define TP_perf_assign(args...) | ||
149 | |||
147 | #undef TRACE_EVENT | 150 | #undef TRACE_EVENT |
148 | #define TRACE_EVENT(call, proto, args, tstruct, func, print) \ | 151 | #define TRACE_EVENT(call, proto, args, tstruct, func, print) \ |
149 | static int \ | 152 | static int \ |
@@ -345,6 +348,56 @@ static inline int ftrace_get_offsets_##call( \ | |||
345 | 348 | ||
346 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 349 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
347 | 350 | ||
351 | #ifdef CONFIG_EVENT_PROFILE | ||
352 | |||
353 | /* | ||
354 | * Generate the functions needed for tracepoint perf_counter support. | ||
355 | * | ||
356 | * NOTE: The insertion profile callback (ftrace_profile_<call>) is defined later | ||
357 | * | ||
358 | * static int ftrace_profile_enable_<call>(struct ftrace_event_call *event_call) | ||
359 | * { | ||
360 | * int ret = 0; | ||
361 | * | ||
362 | * if (!atomic_inc_return(&event_call->profile_count)) | ||
363 | * ret = register_trace_<call>(ftrace_profile_<call>); | ||
364 | * | ||
365 | * return ret; | ||
366 | * } | ||
367 | * | ||
368 | * static void ftrace_profile_disable_<call>(struct ftrace_event_call *event_call) | ||
369 | * { | ||
370 | * if (atomic_add_negative(-1, &event->call->profile_count)) | ||
371 | * unregister_trace_<call>(ftrace_profile_<call>); | ||
372 | * } | ||
373 | * | ||
374 | */ | ||
375 | |||
376 | #undef TRACE_EVENT | ||
377 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ | ||
378 | \ | ||
379 | static void ftrace_profile_##call(proto); \ | ||
380 | \ | ||
381 | static int ftrace_profile_enable_##call(struct ftrace_event_call *event_call) \ | ||
382 | { \ | ||
383 | int ret = 0; \ | ||
384 | \ | ||
385 | if (!atomic_inc_return(&event_call->profile_count)) \ | ||
386 | ret = register_trace_##call(ftrace_profile_##call); \ | ||
387 | \ | ||
388 | return ret; \ | ||
389 | } \ | ||
390 | \ | ||
391 | static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | ||
392 | { \ | ||
393 | if (atomic_add_negative(-1, &event_call->profile_count)) \ | ||
394 | unregister_trace_##call(ftrace_profile_##call); \ | ||
395 | } | ||
396 | |||
397 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
398 | |||
399 | #endif | ||
400 | |||
348 | /* | 401 | /* |
349 | * Stage 4 of the trace events. | 402 | * Stage 4 of the trace events. |
350 | * | 403 | * |
@@ -447,28 +500,6 @@ static inline int ftrace_get_offsets_##call( \ | |||
447 | #define TP_FMT(fmt, args...) fmt "\n", ##args | 500 | #define TP_FMT(fmt, args...) fmt "\n", ##args |
448 | 501 | ||
449 | #ifdef CONFIG_EVENT_PROFILE | 502 | #ifdef CONFIG_EVENT_PROFILE |
450 | #define _TRACE_PROFILE(call, proto, args) \ | ||
451 | static void ftrace_profile_##call(proto) \ | ||
452 | { \ | ||
453 | extern void perf_tpcounter_event(int); \ | ||
454 | perf_tpcounter_event(event_##call.id); \ | ||
455 | } \ | ||
456 | \ | ||
457 | static int ftrace_profile_enable_##call(struct ftrace_event_call *event_call) \ | ||
458 | { \ | ||
459 | int ret = 0; \ | ||
460 | \ | ||
461 | if (!atomic_inc_return(&event_call->profile_count)) \ | ||
462 | ret = register_trace_##call(ftrace_profile_##call); \ | ||
463 | \ | ||
464 | return ret; \ | ||
465 | } \ | ||
466 | \ | ||
467 | static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | ||
468 | { \ | ||
469 | if (atomic_add_negative(-1, &event_call->profile_count)) \ | ||
470 | unregister_trace_##call(ftrace_profile_##call); \ | ||
471 | } | ||
472 | 503 | ||
473 | #define _TRACE_PROFILE_INIT(call) \ | 504 | #define _TRACE_PROFILE_INIT(call) \ |
474 | .profile_count = ATOMIC_INIT(-1), \ | 505 | .profile_count = ATOMIC_INIT(-1), \ |
@@ -476,7 +507,6 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | |||
476 | .profile_disable = ftrace_profile_disable_##call, | 507 | .profile_disable = ftrace_profile_disable_##call, |
477 | 508 | ||
478 | #else | 509 | #else |
479 | #define _TRACE_PROFILE(call, proto, args) | ||
480 | #define _TRACE_PROFILE_INIT(call) | 510 | #define _TRACE_PROFILE_INIT(call) |
481 | #endif | 511 | #endif |
482 | 512 | ||
@@ -502,7 +532,6 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | |||
502 | 532 | ||
503 | #undef TRACE_EVENT | 533 | #undef TRACE_EVENT |
504 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ | 534 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ |
505 | _TRACE_PROFILE(call, PARAMS(proto), PARAMS(args)) \ | ||
506 | \ | 535 | \ |
507 | static struct ftrace_event_call event_##call; \ | 536 | static struct ftrace_event_call event_##call; \ |
508 | \ | 537 | \ |
@@ -586,6 +615,110 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ | |||
586 | 615 | ||
587 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 616 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
588 | 617 | ||
589 | #undef _TRACE_PROFILE | 618 | /* |
619 | * Define the insertion callback to profile events | ||
620 | * | ||
621 | * The job is very similar to ftrace_raw_event_<call> except that we don't | ||
622 | * insert in the ring buffer but in a perf counter. | ||
623 | * | ||
624 | * static void ftrace_profile_<call>(proto) | ||
625 | * { | ||
626 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | ||
627 | * struct ftrace_event_call *event_call = &event_<call>; | ||
628 | * extern void perf_tpcounter_event(int, u64, u64, void *, int); | ||
629 | * struct ftrace_raw_##call *entry; | ||
630 | * u64 __addr = 0, __count = 1; | ||
631 | * unsigned long irq_flags; | ||
632 | * int __entry_size; | ||
633 | * int __data_size; | ||
634 | * int pc; | ||
635 | * | ||
636 | * local_save_flags(irq_flags); | ||
637 | * pc = preempt_count(); | ||
638 | * | ||
639 | * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); | ||
640 | * | ||
641 | * // Below we want to get the aligned size by taking into account | ||
642 | * // the u32 field that will later store the buffer size | ||
643 | * __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32), | ||
644 | * sizeof(u64)); | ||
645 | * __entry_size -= sizeof(u32); | ||
646 | * | ||
647 | * do { | ||
648 | * char raw_data[__entry_size]; <- allocate our sample in the stack | ||
649 | * struct trace_entry *ent; | ||
650 | * | ||
651 | * zero dead bytes from alignment to avoid stack leak to userspace: | ||
652 | * | ||
653 | * *(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL; | ||
654 | * entry = (struct ftrace_raw_<call> *)raw_data; | ||
655 | * ent = &entry->ent; | ||
656 | * tracing_generic_entry_update(ent, irq_flags, pc); | ||
657 | * ent->type = event_call->id; | ||
658 | * | ||
659 | * <tstruct> <- do some jobs with dynamic arrays | ||
660 | * | ||
661 | * <assign> <- affect our values | ||
662 | * | ||
663 | * perf_tpcounter_event(event_call->id, __addr, __count, entry, | ||
664 | * __entry_size); <- submit them to perf counter | ||
665 | * } while (0); | ||
666 | * | ||
667 | * } | ||
668 | */ | ||
669 | |||
670 | #ifdef CONFIG_EVENT_PROFILE | ||
671 | |||
672 | #undef __perf_addr | ||
673 | #define __perf_addr(a) __addr = (a) | ||
674 | |||
675 | #undef __perf_count | ||
676 | #define __perf_count(c) __count = (c) | ||
677 | |||
678 | #undef TRACE_EVENT | ||
679 | #define TRACE_EVENT(call, proto, args, tstruct, assign, print) \ | ||
680 | static void ftrace_profile_##call(proto) \ | ||
681 | { \ | ||
682 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | ||
683 | struct ftrace_event_call *event_call = &event_##call; \ | ||
684 | extern void perf_tpcounter_event(int, u64, u64, void *, int); \ | ||
685 | struct ftrace_raw_##call *entry; \ | ||
686 | u64 __addr = 0, __count = 1; \ | ||
687 | unsigned long irq_flags; \ | ||
688 | int __entry_size; \ | ||
689 | int __data_size; \ | ||
690 | int pc; \ | ||
691 | \ | ||
692 | local_save_flags(irq_flags); \ | ||
693 | pc = preempt_count(); \ | ||
694 | \ | ||
695 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ | ||
696 | __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ | ||
697 | sizeof(u64)); \ | ||
698 | __entry_size -= sizeof(u32); \ | ||
699 | \ | ||
700 | do { \ | ||
701 | char raw_data[__entry_size]; \ | ||
702 | struct trace_entry *ent; \ | ||
703 | \ | ||
704 | *(u64 *)(&raw_data[__entry_size - sizeof(u64)]) = 0ULL; \ | ||
705 | entry = (struct ftrace_raw_##call *)raw_data; \ | ||
706 | ent = &entry->ent; \ | ||
707 | tracing_generic_entry_update(ent, irq_flags, pc); \ | ||
708 | ent->type = event_call->id; \ | ||
709 | \ | ||
710 | tstruct \ | ||
711 | \ | ||
712 | { assign; } \ | ||
713 | \ | ||
714 | perf_tpcounter_event(event_call->id, __addr, __count, entry,\ | ||
715 | __entry_size); \ | ||
716 | } while (0); \ | ||
717 | \ | ||
718 | } | ||
719 | |||
720 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ||
721 | #endif /* CONFIG_EVENT_PROFILE */ | ||
722 | |||
590 | #undef _TRACE_PROFILE_INIT | 723 | #undef _TRACE_PROFILE_INIT |
591 | 724 | ||