diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2009-08-21 11:27:29 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-08-21 11:27:29 -0400 |
commit | e9dc122166b8d863d3057a66ada04838e5548e52 (patch) | |
tree | 749e15bf719b64bf9113db7acd8e043d9742cb26 /include | |
parent | 560ab42ef923aaf2e4347315bdfcc74b2708972c (diff) | |
parent | 405d8f8b1d936414da2093d4149ff790ff3f84a5 (diff) |
Merge branch 'nfs-for-2.6.32' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 into for-2.6.32-incoming
Conflicts:
net/sunrpc/cache.c
Diffstat (limited to 'include')
119 files changed, 1248 insertions, 593 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 3e798593b17..ab0b85cf21f 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/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h index 9d40e879f99..77ff547730a 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/percpu.h b/include/asm-generic/percpu.h index d7d50d7ee51..aa00800adac 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -97,4 +97,8 @@ extern void setup_per_cpu_areas(void); | |||
97 | #define PER_CPU_ATTRIBUTES | 97 | #define PER_CPU_ATTRIBUTES |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifndef PER_CPU_DEF_ATTRIBUTES | ||
101 | #define PER_CPU_DEF_ATTRIBUTES | ||
102 | #endif | ||
103 | |||
100 | #endif /* _ASM_GENERIC_PERCPU_H_ */ | 104 | #endif /* _ASM_GENERIC_PERCPU_H_ */ |
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h index a7cdc48e8b7..725612b793c 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 87cf449a6df..810431d8351 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 f490e43a90b..e43f9766259 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/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 92b73b6140f..6ad76bf5fb4 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -30,9 +30,7 @@ | |||
30 | * EXCEPTION_TABLE(...) | 30 | * EXCEPTION_TABLE(...) |
31 | * NOTES | 31 | * NOTES |
32 | * | 32 | * |
33 | * __bss_start = .; | 33 | * BSS_SECTION(0, 0, 0) |
34 | * BSS_SECTION(0, 0) | ||
35 | * __bss_stop = .; | ||
36 | * _end = .; | 34 | * _end = .; |
37 | * | 35 | * |
38 | * /DISCARD/ : { | 36 | * /DISCARD/ : { |
@@ -191,7 +189,7 @@ | |||
191 | . = ALIGN(align); \ | 189 | . = ALIGN(align); \ |
192 | *(.data.cacheline_aligned) | 190 | *(.data.cacheline_aligned) |
193 | 191 | ||
194 | #define INIT_TASK(align) \ | 192 | #define INIT_TASK_DATA(align) \ |
195 | . = ALIGN(align); \ | 193 | . = ALIGN(align); \ |
196 | *(.data.init_task) | 194 | *(.data.init_task) |
197 | 195 | ||
@@ -434,14 +432,15 @@ | |||
434 | /* | 432 | /* |
435 | * Init task | 433 | * Init task |
436 | */ | 434 | */ |
437 | #define INIT_TASK_DATA(align) \ | 435 | #define INIT_TASK_DATA_SECTION(align) \ |
438 | . = ALIGN(align); \ | 436 | . = ALIGN(align); \ |
439 | .data.init_task : { \ | 437 | .data.init_task : { \ |
440 | INIT_TASK \ | 438 | INIT_TASK_DATA(align) \ |
441 | } | 439 | } |
442 | 440 | ||
443 | #ifdef CONFIG_CONSTRUCTORS | 441 | #ifdef CONFIG_CONSTRUCTORS |
444 | #define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \ | 442 | #define KERNEL_CTORS() . = ALIGN(8); \ |
443 | VMLINUX_SYMBOL(__ctors_start) = .; \ | ||
445 | *(.ctors) \ | 444 | *(.ctors) \ |
446 | VMLINUX_SYMBOL(__ctors_end) = .; | 445 | VMLINUX_SYMBOL(__ctors_end) = .; |
447 | #else | 446 | #else |
@@ -488,7 +487,8 @@ | |||
488 | * bss (Block Started by Symbol) - uninitialized data | 487 | * bss (Block Started by Symbol) - uninitialized data |
489 | * zeroed during startup | 488 | * zeroed during startup |
490 | */ | 489 | */ |
491 | #define SBSS \ | 490 | #define SBSS(sbss_align) \ |
491 | . = ALIGN(sbss_align); \ | ||
492 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ | 492 | .sbss : AT(ADDR(.sbss) - LOAD_OFFSET) { \ |
493 | *(.sbss) \ | 493 | *(.sbss) \ |
494 | *(.scommon) \ | 494 | *(.scommon) \ |
@@ -497,12 +497,10 @@ | |||
497 | #define BSS(bss_align) \ | 497 | #define BSS(bss_align) \ |
498 | . = ALIGN(bss_align); \ | 498 | . = ALIGN(bss_align); \ |
499 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ | 499 | .bss : AT(ADDR(.bss) - LOAD_OFFSET) { \ |
500 | VMLINUX_SYMBOL(__bss_start) = .; \ | ||
501 | *(.bss.page_aligned) \ | 500 | *(.bss.page_aligned) \ |
502 | *(.dynbss) \ | 501 | *(.dynbss) \ |
503 | *(.bss) \ | 502 | *(.bss) \ |
504 | *(COMMON) \ | 503 | *(COMMON) \ |
505 | VMLINUX_SYMBOL(__bss_stop) = .; \ | ||
506 | } | 504 | } |
507 | 505 | ||
508 | /* | 506 | /* |
@@ -704,15 +702,15 @@ | |||
704 | * matches the requirment of PAGE_ALIGNED_DATA. | 702 | * matches the requirment of PAGE_ALIGNED_DATA. |
705 | * | 703 | * |
706 | * use 0 as page_align if page_aligned data is not used */ | 704 | * use 0 as page_align if page_aligned data is not used */ |
707 | #define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \ | 705 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ |
708 | . = ALIGN(PAGE_SIZE); \ | 706 | . = ALIGN(PAGE_SIZE); \ |
709 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ | 707 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ |
710 | INIT_TASK(inittask) \ | 708 | INIT_TASK_DATA(inittask) \ |
711 | CACHELINE_ALIGNED_DATA(cacheline) \ | 709 | CACHELINE_ALIGNED_DATA(cacheline) \ |
712 | READ_MOSTLY_DATA(cacheline) \ | 710 | READ_MOSTLY_DATA(cacheline) \ |
713 | DATA_DATA \ | 711 | DATA_DATA \ |
714 | CONSTRUCTORS \ | 712 | CONSTRUCTORS \ |
715 | NOSAVE_DATA(nosave) \ | 713 | NOSAVE_DATA \ |
716 | PAGE_ALIGNED_DATA(pagealigned) \ | 714 | PAGE_ALIGNED_DATA(pagealigned) \ |
717 | } | 715 | } |
718 | 716 | ||
@@ -734,8 +732,10 @@ | |||
734 | INIT_RAM_FS \ | 732 | INIT_RAM_FS \ |
735 | } | 733 | } |
736 | 734 | ||
737 | #define BSS_SECTION(sbss_align, bss_align) \ | 735 | #define BSS_SECTION(sbss_align, bss_align, stop_align) \ |
738 | SBSS \ | 736 | . = ALIGN(sbss_align); \ |
737 | VMLINUX_SYMBOL(__bss_start) = .; \ | ||
738 | SBSS(sbss_align) \ | ||
739 | BSS(bss_align) \ | 739 | BSS(bss_align) \ |
740 | . = ALIGN(4); | 740 | . = ALIGN(stop_align); \ |
741 | 741 | VMLINUX_SYMBOL(__bss_stop) = .; | |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index c263e4d7175..7d6c9a2dfcb 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -35,11 +35,11 @@ struct est_timings { | |||
35 | } __attribute__((packed)); | 35 | } __attribute__((packed)); |
36 | 36 | ||
37 | /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ | 37 | /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ |
38 | #define EDID_TIMING_ASPECT_SHIFT 0 | 38 | #define EDID_TIMING_ASPECT_SHIFT 6 |
39 | #define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) | 39 | #define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) |
40 | 40 | ||
41 | /* need to add 60 */ | 41 | /* need to add 60 */ |
42 | #define EDID_TIMING_VFREQ_SHIFT 2 | 42 | #define EDID_TIMING_VFREQ_SHIFT 0 |
43 | #define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) | 43 | #define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) |
44 | 44 | ||
45 | struct std_timing { | 45 | struct std_timing { |
@@ -47,11 +47,11 @@ struct std_timing { | |||
47 | u8 vfreq_aspect; | 47 | u8 vfreq_aspect; |
48 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
49 | 49 | ||
50 | #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 6) | 50 | #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1) |
51 | #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 5) | 51 | #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2) |
52 | #define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) | 52 | #define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) |
53 | #define DRM_EDID_PT_STEREO (1 << 2) | 53 | #define DRM_EDID_PT_STEREO (1 << 5) |
54 | #define DRM_EDID_PT_INTERLACED (1 << 1) | 54 | #define DRM_EDID_PT_INTERLACED (1 << 7) |
55 | 55 | ||
56 | /* If detailed data is pixel timing */ | 56 | /* If detailed data is pixel timing */ |
57 | struct detailed_pixel_timing { | 57 | struct detailed_pixel_timing { |
@@ -93,7 +93,7 @@ struct detailed_data_monitor_range { | |||
93 | } __attribute__((packed)); | 93 | } __attribute__((packed)); |
94 | 94 | ||
95 | struct detailed_data_wpindex { | 95 | struct detailed_data_wpindex { |
96 | u8 white_xy_lo; /* Upper 2 bits each */ | 96 | u8 white_yx_lo; /* Lower 2 bits each */ |
97 | u8 white_x_hi; | 97 | u8 white_x_hi; |
98 | u8 white_y_hi; | 98 | u8 white_y_hi; |
99 | u8 gamma; /* need to divide by 100 then add 1 */ | 99 | u8 gamma; /* need to divide by 100 then add 1 */ |
@@ -135,21 +135,21 @@ struct detailed_timing { | |||
135 | } data; | 135 | } data; |
136 | } __attribute__((packed)); | 136 | } __attribute__((packed)); |
137 | 137 | ||
138 | #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 7) | 138 | #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 0) |
139 | #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 5) | 139 | #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 1) |
140 | #define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 4) | 140 | #define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 2) |
141 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) | 141 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) |
142 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 2) | 142 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 4) |
143 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 1) | 143 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 5) |
144 | #define DRM_EDID_INPUT_DIGITAL (1 << 0) /* bits above must be zero if set */ | 144 | #define DRM_EDID_INPUT_DIGITAL (1 << 7) /* bits below must be zero if set */ |
145 | 145 | ||
146 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 7) | 146 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 0) |
147 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 6) | 147 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1) |
148 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 5) | 148 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 2) |
149 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ | 149 | #define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ |
150 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 2) | 150 | #define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 5) |
151 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 1) | 151 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 6) |
152 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 0) | 152 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 7) |
153 | 153 | ||
154 | struct edid { | 154 | struct edid { |
155 | u8 header[8]; | 155 | u8 header[8]; |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 45c18672b09..853508499d2 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -43,6 +43,7 @@ | |||
43 | {0x1002, 0x4A4F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | 43 | {0x1002, 0x4A4F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ |
44 | {0x1002, 0x4A50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | 44 | {0x1002, 0x4A50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ |
45 | {0x1002, 0x4A54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | 45 | {0x1002, 0x4A54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ |
46 | {0x1002, 0x4B48, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | ||
46 | {0x1002, 0x4B49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | 47 | {0x1002, 0x4B49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ |
47 | {0x1002, 0x4B4A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | 48 | {0x1002, 0x4B4A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ |
48 | {0x1002, 0x4B4B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ | 49 | {0x1002, 0x4B4B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_R420|RADEON_NEW_MEMMAP}, \ |
@@ -256,12 +257,16 @@ | |||
256 | {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}, \ |
257 | {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}, \ |
258 | {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}, \ | ||
259 | {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}, \ |
260 | {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}, \ | ||
261 | {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}, \ | ||
262 | {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}, \ |
263 | {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}, \ |
264 | {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}, \ |
269 | {0x1002, 0x9443, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | ||
265 | {0x1002, 0x9444, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 270 | {0x1002, 0x9444, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
266 | {0x1002, 0x9446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ | 271 | {0x1002, 0x9446, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_NEW_MEMMAP}, \ |
267 | {0x1002, 0x944A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 272 | {0x1002, 0x944A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV770|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
@@ -286,6 +291,7 @@ | |||
286 | {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}, \ |
287 | {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}, \ |
288 | {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}, \ | ||
289 | {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}, \ |
290 | {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}, \ |
291 | {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}, \ |
@@ -323,6 +329,7 @@ | |||
323 | {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}, \ |
324 | {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}, \ |
325 | {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}, \ | ||
326 | {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}, \ |
327 | {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}, \ |
328 | {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}, \ |
@@ -346,12 +353,12 @@ | |||
346 | {0x1002, 0x9599, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV635|RADEON_NEW_MEMMAP}, \ | 353 | {0x1002, 0x9599, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV635|RADEON_NEW_MEMMAP}, \ |
347 | {0x1002, 0x959B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | 354 | {0x1002, 0x959B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV635|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ |
348 | {0x1002, 0x95C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 355 | {0x1002, 0x95C0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
356 | {0x1002, 0x95C2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
357 | {0x1002, 0x95C4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
349 | {0x1002, 0x95C5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 358 | {0x1002, 0x95C5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
350 | {0x1002, 0x95C6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 359 | {0x1002, 0x95C6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
351 | {0x1002, 0x95C7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 360 | {0x1002, 0x95C7, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
352 | {0x1002, 0x95C9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 361 | {0x1002, 0x95C9, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
353 | {0x1002, 0x95C2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
354 | {0x1002, 0x95C4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ | ||
355 | {0x1002, 0x95CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 362 | {0x1002, 0x95CC, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
356 | {0x1002, 0x95CD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 363 | {0x1002, 0x95CD, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
357 | {0x1002, 0x95CE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ | 364 | {0x1002, 0x95CE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV620|RADEON_NEW_MEMMAP}, \ |
@@ -363,6 +370,11 @@ | |||
363 | {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}, \ |
364 | {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}, \ |
365 | {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}, \ | ||
366 | {0, 0, 0} | 378 | {0, 0, 0} |
367 | 379 | ||
368 | #define r128_PCI_IDS \ | 380 | #define r128_PCI_IDS \ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 41862e9a4c2..af4b4826997 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -506,6 +506,8 @@ 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 | ||
509 | 511 | ||
510 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) | 512 | #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) | 513 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) |
@@ -544,7 +546,8 @@ 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) | 546 | #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) | 547 | #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) | 548 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) |
547 | 549 | #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) | |
550 | #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) | ||
548 | 551 | ||
549 | typedef struct drm_radeon_init { | 552 | typedef struct drm_radeon_init { |
550 | enum { | 553 | enum { |
@@ -796,6 +799,24 @@ struct drm_radeon_gem_create { | |||
796 | uint32_t flags; | 799 | uint32_t flags; |
797 | }; | 800 | }; |
798 | 801 | ||
802 | #define RADEON_TILING_MACRO 0x1 | ||
803 | #define RADEON_TILING_MICRO 0x2 | ||
804 | #define RADEON_TILING_SWAP 0x4 | ||
805 | #define RADEON_TILING_SURFACE 0x8 /* this object requires a surface | ||
806 | * when mapped - i.e. front buffer */ | ||
807 | |||
808 | struct drm_radeon_gem_set_tiling { | ||
809 | uint32_t handle; | ||
810 | uint32_t tiling_flags; | ||
811 | uint32_t pitch; | ||
812 | }; | ||
813 | |||
814 | struct drm_radeon_gem_get_tiling { | ||
815 | uint32_t handle; | ||
816 | uint32_t tiling_flags; | ||
817 | uint32_t pitch; | ||
818 | }; | ||
819 | |||
799 | struct drm_radeon_gem_mmap { | 820 | struct drm_radeon_gem_mmap { |
800 | uint32_t handle; | 821 | uint32_t handle; |
801 | uint32_t pad; | 822 | uint32_t pad; |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 62ed733c52a..a68829db381 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 889a4c7958a..d1d433834e4 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/aio.h b/include/linux/aio.h index b16a957030f..47f7d932a01 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -121,9 +121,9 @@ struct kiocb { | |||
121 | 121 | ||
122 | /* | 122 | /* |
123 | * If the aio_resfd field of the userspace iocb is not zero, | 123 | * If the aio_resfd field of the userspace iocb is not zero, |
124 | * this is the underlying file* to deliver event to. | 124 | * this is the underlying eventfd context to deliver events to. |
125 | */ | 125 | */ |
126 | struct file *ki_eventfd; | 126 | struct eventfd_ctx *ki_eventfd; |
127 | }; | 127 | }; |
128 | 128 | ||
129 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) | 129 | #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 0ec2c594868..1d52425a611 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -229,9 +229,14 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) | |||
229 | (1 << BDI_async_congested)); | 229 | (1 << BDI_async_congested)); |
230 | } | 230 | } |
231 | 231 | ||
232 | void clear_bdi_congested(struct backing_dev_info *bdi, int rw); | 232 | enum { |
233 | void set_bdi_congested(struct backing_dev_info *bdi, int rw); | 233 | BLK_RW_ASYNC = 0, |
234 | long congestion_wait(int rw, long timeout); | 234 | BLK_RW_SYNC = 1, |
235 | }; | ||
236 | |||
237 | void clear_bdi_congested(struct backing_dev_info *bdi, int sync); | ||
238 | void set_bdi_congested(struct backing_dev_info *bdi, int sync); | ||
239 | long congestion_wait(int sync, long timeout); | ||
235 | 240 | ||
236 | 241 | ||
237 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) | 242 | static inline bool bdi_cap_writeback_dirty(struct backing_dev_info *bdi) |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 2a04eb54c0d..2892b710771 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -319,7 +319,6 @@ static inline int bio_has_allocated_vec(struct bio *bio) | |||
319 | */ | 319 | */ |
320 | struct bio_integrity_payload { | 320 | struct bio_integrity_payload { |
321 | struct bio *bip_bio; /* parent bio */ | 321 | struct bio *bip_bio; /* parent bio */ |
322 | struct bio_vec *bip_vec; /* integrity data vector */ | ||
323 | 322 | ||
324 | sector_t bip_sector; /* virtual start sector */ | 323 | sector_t bip_sector; /* virtual start sector */ |
325 | 324 | ||
@@ -328,11 +327,12 @@ struct bio_integrity_payload { | |||
328 | 327 | ||
329 | unsigned int bip_size; | 328 | unsigned int bip_size; |
330 | 329 | ||
331 | unsigned short bip_pool; /* pool the ivec came from */ | 330 | unsigned short bip_slab; /* slab the bip came from */ |
332 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ | 331 | unsigned short bip_vcnt; /* # of integrity bio_vecs */ |
333 | unsigned short bip_idx; /* current bip_vec index */ | 332 | unsigned short bip_idx; /* current bip_vec index */ |
334 | 333 | ||
335 | struct work_struct bip_work; /* I/O completion */ | 334 | struct work_struct bip_work; /* I/O completion */ |
335 | struct bio_vec bip_vec[0]; /* embedded bvec array */ | ||
336 | }; | 336 | }; |
337 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 337 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
338 | 338 | ||
@@ -430,6 +430,9 @@ struct bio_set { | |||
430 | unsigned int front_pad; | 430 | unsigned int front_pad; |
431 | 431 | ||
432 | mempool_t *bio_pool; | 432 | mempool_t *bio_pool; |
433 | #if defined(CONFIG_BLK_DEV_INTEGRITY) | ||
434 | mempool_t *bio_integrity_pool; | ||
435 | #endif | ||
433 | mempool_t *bvec_pool; | 436 | mempool_t *bvec_pool; |
434 | }; | 437 | }; |
435 | 438 | ||
@@ -634,8 +637,9 @@ static inline struct bio *bio_list_get(struct bio_list *bl) | |||
634 | 637 | ||
635 | #define bio_integrity(bio) (bio->bi_integrity != NULL) | 638 | #define bio_integrity(bio) (bio->bi_integrity != NULL) |
636 | 639 | ||
640 | extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *); | ||
637 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); | 641 | extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); |
638 | extern void bio_integrity_free(struct bio *); | 642 | extern void bio_integrity_free(struct bio *, struct bio_set *); |
639 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); | 643 | extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); |
640 | extern int bio_integrity_enabled(struct bio *bio); | 644 | extern int bio_integrity_enabled(struct bio *bio); |
641 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); | 645 | extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); |
@@ -645,21 +649,27 @@ extern void bio_integrity_endio(struct bio *, int); | |||
645 | extern void bio_integrity_advance(struct bio *, unsigned int); | 649 | extern void bio_integrity_advance(struct bio *, unsigned int); |
646 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 650 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
647 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 651 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
648 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); | 652 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); |
653 | extern int bioset_integrity_create(struct bio_set *, int); | ||
654 | extern void bioset_integrity_free(struct bio_set *); | ||
655 | extern void bio_integrity_init(void); | ||
649 | 656 | ||
650 | #else /* CONFIG_BLK_DEV_INTEGRITY */ | 657 | #else /* CONFIG_BLK_DEV_INTEGRITY */ |
651 | 658 | ||
652 | #define bio_integrity(a) (0) | 659 | #define bio_integrity(a) (0) |
660 | #define bioset_integrity_create(a, b) (0) | ||
653 | #define bio_integrity_prep(a) (0) | 661 | #define bio_integrity_prep(a) (0) |
654 | #define bio_integrity_enabled(a) (0) | 662 | #define bio_integrity_enabled(a) (0) |
655 | #define bio_integrity_clone(a, b, c) (0) | 663 | #define bio_integrity_clone(a, b, c, d) (0) |
656 | #define bio_integrity_free(a) do { } while (0) | 664 | #define bioset_integrity_free(a) do { } while (0) |
665 | #define bio_integrity_free(a, b) do { } while (0) | ||
657 | #define bio_integrity_endio(a, b) do { } while (0) | 666 | #define bio_integrity_endio(a, b) do { } while (0) |
658 | #define bio_integrity_advance(a, b) do { } while (0) | 667 | #define bio_integrity_advance(a, b) do { } while (0) |
659 | #define bio_integrity_trim(a, b, c) do { } while (0) | 668 | #define bio_integrity_trim(a, b, c) do { } while (0) |
660 | #define bio_integrity_split(a, b, c) do { } while (0) | 669 | #define bio_integrity_split(a, b, c) do { } while (0) |
661 | #define bio_integrity_set_tag(a, b, c) do { } while (0) | 670 | #define bio_integrity_set_tag(a, b, c) do { } while (0) |
662 | #define bio_integrity_get_tag(a, b, c) do { } while (0) | 671 | #define bio_integrity_get_tag(a, b, c) do { } while (0) |
672 | #define bio_integrity_init(a) do { } while (0) | ||
663 | 673 | ||
664 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 674 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
665 | 675 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 8963d9149b5..69103e053c9 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -70,11 +70,6 @@ enum rq_cmd_type_bits { | |||
70 | REQ_TYPE_ATA_PC, | 70 | REQ_TYPE_ATA_PC, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | enum { | ||
74 | BLK_RW_ASYNC = 0, | ||
75 | BLK_RW_SYNC = 1, | ||
76 | }; | ||
77 | |||
78 | /* | 73 | /* |
79 | * For request of type REQ_TYPE_LINUX_BLOCK, rq->cmd[0] is the opcode being | 74 | * For request of type REQ_TYPE_LINUX_BLOCK, rq->cmd[0] is the opcode being |
80 | * sent down (similar to how REQ_TYPE_BLOCK_PC means that ->cmd[] holds a | 75 | * sent down (similar to how REQ_TYPE_BLOCK_PC means that ->cmd[] holds a |
@@ -301,12 +296,6 @@ struct blk_queue_tag { | |||
301 | #define BLK_SCSI_MAX_CMDS (256) | 296 | #define BLK_SCSI_MAX_CMDS (256) |
302 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) | 297 | #define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) |
303 | 298 | ||
304 | struct blk_cmd_filter { | ||
305 | unsigned long read_ok[BLK_SCSI_CMD_PER_LONG]; | ||
306 | unsigned long write_ok[BLK_SCSI_CMD_PER_LONG]; | ||
307 | struct kobject kobj; | ||
308 | }; | ||
309 | |||
310 | struct queue_limits { | 299 | struct queue_limits { |
311 | unsigned long bounce_pfn; | 300 | unsigned long bounce_pfn; |
312 | unsigned long seg_boundary_mask; | 301 | unsigned long seg_boundary_mask; |
@@ -445,7 +434,6 @@ struct request_queue | |||
445 | #if defined(CONFIG_BLK_DEV_BSG) | 434 | #if defined(CONFIG_BLK_DEV_BSG) |
446 | struct bsg_class_device bsg_dev; | 435 | struct bsg_class_device bsg_dev; |
447 | #endif | 436 | #endif |
448 | struct blk_cmd_filter cmd_filter; | ||
449 | }; | 437 | }; |
450 | 438 | ||
451 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 439 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
@@ -730,6 +718,7 @@ struct rq_map_data { | |||
730 | int nr_entries; | 718 | int nr_entries; |
731 | unsigned long offset; | 719 | unsigned long offset; |
732 | int null_mapped; | 720 | int null_mapped; |
721 | int from_user; | ||
733 | }; | 722 | }; |
734 | 723 | ||
735 | struct req_iterator { | 724 | struct req_iterator { |
@@ -786,18 +775,18 @@ extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, | |||
786 | * congested queues, and wake up anyone who was waiting for requests to be | 775 | * congested queues, and wake up anyone who was waiting for requests to be |
787 | * put back. | 776 | * put back. |
788 | */ | 777 | */ |
789 | static inline void blk_clear_queue_congested(struct request_queue *q, int rw) | 778 | static inline void blk_clear_queue_congested(struct request_queue *q, int sync) |
790 | { | 779 | { |
791 | clear_bdi_congested(&q->backing_dev_info, rw); | 780 | clear_bdi_congested(&q->backing_dev_info, sync); |
792 | } | 781 | } |
793 | 782 | ||
794 | /* | 783 | /* |
795 | * A queue has just entered congestion. Flag that in the queue's VM-visible | 784 | * A queue has just entered congestion. Flag that in the queue's VM-visible |
796 | * state flags and increment the global gounter of congested queues. | 785 | * state flags and increment the global gounter of congested queues. |
797 | */ | 786 | */ |
798 | static inline void blk_set_queue_congested(struct request_queue *q, int rw) | 787 | static inline void blk_set_queue_congested(struct request_queue *q, int sync) |
799 | { | 788 | { |
800 | set_bdi_congested(&q->backing_dev_info, rw); | 789 | set_bdi_congested(&q->backing_dev_info, sync); |
801 | } | 790 | } |
802 | 791 | ||
803 | extern void blk_start_queue(struct request_queue *q); | 792 | extern void blk_start_queue(struct request_queue *q); |
@@ -924,6 +913,7 @@ extern void blk_queue_logical_block_size(struct request_queue *, unsigned short) | |||
924 | 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); |
925 | extern void blk_queue_alignment_offset(struct request_queue *q, | 914 | extern void blk_queue_alignment_offset(struct request_queue *q, |
926 | unsigned int alignment); | 915 | unsigned int alignment); |
916 | extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min); | ||
927 | 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); |
928 | 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); |
929 | extern void blk_set_default_limits(struct queue_limits *lim); | 919 | extern void blk_set_default_limits(struct queue_limits *lim); |
@@ -998,13 +988,7 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
998 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); | 988 | return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); |
999 | } | 989 | } |
1000 | 990 | ||
1001 | /* | 991 | extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); |
1002 | * command filter functions | ||
1003 | */ | ||
1004 | extern int blk_verify_command(struct blk_cmd_filter *filter, | ||
1005 | unsigned char *cmd, fmode_t has_write_perm); | ||
1006 | extern void blk_unregister_filter(struct gendisk *disk); | ||
1007 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | ||
1008 | 992 | ||
1009 | #define MAX_PHYS_SEGMENTS 128 | 993 | #define MAX_PHYS_SEGMENTS 128 |
1010 | #define MAX_HW_SEGMENTS 128 | 994 | #define MAX_HW_SEGMENTS 128 |
diff --git a/include/linux/cb710.h b/include/linux/cb710.h index 63bc9a4d292..8cc10411bab 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 665fa70e409..90bba9e6228 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/clockchips.h b/include/linux/clockchips.h index 20a100fe2b4..3a1dbba4d3a 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -143,12 +143,3 @@ extern void clockevents_notify(unsigned long reason, void *arg); | |||
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | #endif | 145 | #endif |
146 | |||
147 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
148 | extern ktime_t clockevents_get_next_event(int cpu); | ||
149 | #else | ||
150 | static inline ktime_t clockevents_get_next_event(int cpu) | ||
151 | { | ||
152 | return (ktime_t) { .tv64 = KTIME_MAX }; | ||
153 | } | ||
154 | #endif | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index c56457c8334..1219be4fb42 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/console_struct.h b/include/linux/console_struct.h index d71f7c0f931..38fe59dc89a 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -89,7 +89,6 @@ struct vc_data { | |||
89 | unsigned int vc_need_wrap : 1; | 89 | unsigned int vc_need_wrap : 1; |
90 | unsigned int vc_can_do_color : 1; | 90 | unsigned int vc_can_do_color : 1; |
91 | unsigned int vc_report_mouse : 2; | 91 | unsigned int vc_report_mouse : 2; |
92 | unsigned int vc_kmalloced : 1; | ||
93 | unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ | 92 | unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ |
94 | unsigned char vc_utf_count; | 93 | unsigned char vc_utf_count; |
95 | int vc_utf_char; | 94 | int vc_utf_char; |
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h index 2dac064d835..0026f267da2 100644 --- a/include/linux/crash_dump.h +++ b/include/linux/crash_dump.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef CONFIG_CRASH_DUMP | 4 | #ifdef CONFIG_CRASH_DUMP |
5 | #include <linux/kexec.h> | 5 | #include <linux/kexec.h> |
6 | #include <linux/smp_lock.h> | ||
7 | #include <linux/device.h> | 6 | #include <linux/device.h> |
8 | #include <linux/proc_fs.h> | 7 | #include <linux/proc_fs.h> |
9 | 8 | ||
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h index 6dfb856327b..0c7111a55a1 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 0d6310657f3..655e7721580 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/device.h b/include/linux/device.h index ed4e39f2c42..aebb81036db 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
26 | #include <asm/device.h> | 26 | #include <asm/device.h> |
27 | 27 | ||
28 | #define BUS_ID_SIZE 20 | ||
29 | |||
30 | struct device; | 28 | struct device; |
31 | struct device_private; | 29 | struct device_private; |
32 | struct device_driver; | 30 | struct device_driver; |
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 7605c5e9589..00d6a68d042 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -122,9 +122,10 @@ static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_r | |||
122 | 122 | ||
123 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) | 123 | static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) |
124 | { | 124 | { |
125 | #ifdef ELF_CORE_COPY_TASK_REGS | 125 | #if defined (ELF_CORE_COPY_TASK_REGS) |
126 | |||
127 | return ELF_CORE_COPY_TASK_REGS(t, elfregs); | 126 | return ELF_CORE_COPY_TASK_REGS(t, elfregs); |
127 | #elif defined (task_pt_regs) | ||
128 | elf_core_copy_regs(elfregs, task_pt_regs(t)); | ||
128 | #endif | 129 | #endif |
129 | return 0; | 130 | return 0; |
130 | } | 131 | } |
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h index f45a8ae5f82..3b85ba6479f 100644 --- a/include/linux/eventfd.h +++ b/include/linux/eventfd.h | |||
@@ -8,10 +8,8 @@ | |||
8 | #ifndef _LINUX_EVENTFD_H | 8 | #ifndef _LINUX_EVENTFD_H |
9 | #define _LINUX_EVENTFD_H | 9 | #define _LINUX_EVENTFD_H |
10 | 10 | ||
11 | #ifdef CONFIG_EVENTFD | ||
12 | |||
13 | /* For O_CLOEXEC and O_NONBLOCK */ | ||
14 | #include <linux/fcntl.h> | 11 | #include <linux/fcntl.h> |
12 | #include <linux/file.h> | ||
15 | 13 | ||
16 | /* | 14 | /* |
17 | * CAREFUL: Check include/asm-generic/fcntl.h when defining | 15 | * CAREFUL: Check include/asm-generic/fcntl.h when defining |
@@ -27,16 +25,37 @@ | |||
27 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) | 25 | #define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) |
28 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) | 26 | #define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) |
29 | 27 | ||
28 | #ifdef CONFIG_EVENTFD | ||
29 | |||
30 | struct eventfd_ctx *eventfd_ctx_get(struct eventfd_ctx *ctx); | ||
31 | void eventfd_ctx_put(struct eventfd_ctx *ctx); | ||
30 | struct file *eventfd_fget(int fd); | 32 | struct file *eventfd_fget(int fd); |
31 | int eventfd_signal(struct file *file, int n); | 33 | struct eventfd_ctx *eventfd_ctx_fdget(int fd); |
34 | struct eventfd_ctx *eventfd_ctx_fileget(struct file *file); | ||
35 | int eventfd_signal(struct eventfd_ctx *ctx, int n); | ||
32 | 36 | ||
33 | #else /* CONFIG_EVENTFD */ | 37 | #else /* CONFIG_EVENTFD */ |
34 | 38 | ||
35 | #define eventfd_fget(fd) ERR_PTR(-ENOSYS) | 39 | /* |
36 | static inline int eventfd_signal(struct file *file, int n) | 40 | * Ugly ugly ugly error layer to support modules that uses eventfd but |
37 | { return 0; } | 41 | * pretend to work in !CONFIG_EVENTFD configurations. Namely, AIO. |
42 | */ | ||
43 | static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd) | ||
44 | { | ||
45 | return ERR_PTR(-ENOSYS); | ||
46 | } | ||
47 | |||
48 | static inline int eventfd_signal(struct eventfd_ctx *ctx, int n) | ||
49 | { | ||
50 | return -ENOSYS; | ||
51 | } | ||
52 | |||
53 | static inline void eventfd_ctx_put(struct eventfd_ctx *ctx) | ||
54 | { | ||
55 | |||
56 | } | ||
38 | 57 | ||
39 | #endif /* CONFIG_EVENTFD */ | 58 | #endif |
40 | 59 | ||
41 | #endif /* _LINUX_EVENTFD_H */ | 60 | #endif /* _LINUX_EVENTFD_H */ |
42 | 61 | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 634a5e5aba3..7499b366779 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/fb.h b/include/linux/fb.h index dd68358996b..f847df9e99b 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -819,6 +819,7 @@ struct fb_info { | |||
819 | int node; | 819 | int node; |
820 | int flags; | 820 | int flags; |
821 | struct mutex lock; /* Lock for open/release/ioctl funcs */ | 821 | struct mutex lock; /* Lock for open/release/ioctl funcs */ |
822 | struct mutex mm_lock; /* Lock for fb_mmap and smem_* fields */ | ||
822 | struct fb_var_screeninfo var; /* Current var */ | 823 | struct fb_var_screeninfo var; /* Current var */ |
823 | struct fb_fix_screeninfo fix; /* Current fix */ | 824 | struct fb_fix_screeninfo fix; /* Current fix */ |
824 | struct fb_monspecs monspecs; /* Current Monitor specs */ | 825 | struct fb_monspecs monspecs; /* Current Monitor specs */ |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 9823946adbc..192d1e43c43 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -127,6 +127,7 @@ struct fw_card { | |||
127 | struct delayed_work work; | 127 | struct delayed_work work; |
128 | int bm_retries; | 128 | int bm_retries; |
129 | int bm_generation; | 129 | int bm_generation; |
130 | __be32 bm_transaction_data[2]; | ||
130 | 131 | ||
131 | bool broadcast_channel_allocated; | 132 | bool broadcast_channel_allocated; |
132 | u32 broadcast_channel; | 133 | u32 broadcast_channel; |
diff --git a/include/linux/flex_array.h b/include/linux/flex_array.h new file mode 100644 index 00000000000..23c1ec79a31 --- /dev/null +++ b/include/linux/flex_array.h | |||
@@ -0,0 +1,47 @@ | |||
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[0]; | ||
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, int total, gfp_t flags); | ||
40 | int flex_array_prealloc(struct flex_array *fa, int start, int end, gfp_t flags); | ||
41 | void flex_array_free(struct flex_array *fa); | ||
42 | void flex_array_free_parts(struct flex_array *fa); | ||
43 | int flex_array_put(struct flex_array *fa, int element_nr, void *src, | ||
44 | gfp_t flags); | ||
45 | void *flex_array_get(struct flex_array *fa, int element_nr); | ||
46 | |||
47 | #endif /* _FLEX_ARRAY_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0872372184f..67888a9e065 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 *); |
@@ -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 44848aa830d..4d6f47b5118 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry) | |||
280 | assert_spin_locked(&dentry->d_lock); | 280 | assert_spin_locked(&dentry->d_lock); |
281 | 281 | ||
282 | parent = dentry->d_parent; | 282 | parent = dentry->d_parent; |
283 | if (fsnotify_inode_watches_children(parent->d_inode)) | 283 | if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode)) |
284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; | 284 | dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; |
285 | else | 285 | else |
286 | dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; | 286 | dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; |
@@ -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 5c093ffc655..a81170de7f6 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/fuse.h b/include/linux/fuse.h index d41ed593f79..cf593bf9fd3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -25,6 +25,11 @@ | |||
25 | * - add IOCTL message | 25 | * - add IOCTL message |
26 | * - add unsolicited notification support | 26 | * - add unsolicited notification support |
27 | * - add POLL message and NOTIFY_POLL notification | 27 | * - add POLL message and NOTIFY_POLL notification |
28 | * | ||
29 | * 7.12 | ||
30 | * - add umask flag to input argument of open, mknod and mkdir | ||
31 | * - add notification messages for invalidation of inodes and | ||
32 | * directory entries | ||
28 | */ | 33 | */ |
29 | 34 | ||
30 | #ifndef _LINUX_FUSE_H | 35 | #ifndef _LINUX_FUSE_H |
@@ -36,7 +41,7 @@ | |||
36 | #define FUSE_KERNEL_VERSION 7 | 41 | #define FUSE_KERNEL_VERSION 7 |
37 | 42 | ||
38 | /** Minor version number of this interface */ | 43 | /** Minor version number of this interface */ |
39 | #define FUSE_KERNEL_MINOR_VERSION 11 | 44 | #define FUSE_KERNEL_MINOR_VERSION 12 |
40 | 45 | ||
41 | /** The node ID of the root inode */ | 46 | /** The node ID of the root inode */ |
42 | #define FUSE_ROOT_ID 1 | 47 | #define FUSE_ROOT_ID 1 |
@@ -112,6 +117,7 @@ struct fuse_file_lock { | |||
112 | * INIT request/reply flags | 117 | * INIT request/reply flags |
113 | * | 118 | * |
114 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | 119 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." |
120 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations | ||
115 | */ | 121 | */ |
116 | #define FUSE_ASYNC_READ (1 << 0) | 122 | #define FUSE_ASYNC_READ (1 << 0) |
117 | #define FUSE_POSIX_LOCKS (1 << 1) | 123 | #define FUSE_POSIX_LOCKS (1 << 1) |
@@ -119,6 +125,7 @@ struct fuse_file_lock { | |||
119 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) | 125 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) |
120 | #define FUSE_EXPORT_SUPPORT (1 << 4) | 126 | #define FUSE_EXPORT_SUPPORT (1 << 4) |
121 | #define FUSE_BIG_WRITES (1 << 5) | 127 | #define FUSE_BIG_WRITES (1 << 5) |
128 | #define FUSE_DONT_MASK (1 << 6) | ||
122 | 129 | ||
123 | /** | 130 | /** |
124 | * CUSE INIT request/reply flags | 131 | * CUSE INIT request/reply flags |
@@ -224,6 +231,8 @@ enum fuse_opcode { | |||
224 | 231 | ||
225 | enum fuse_notify_code { | 232 | enum fuse_notify_code { |
226 | FUSE_NOTIFY_POLL = 1, | 233 | FUSE_NOTIFY_POLL = 1, |
234 | FUSE_NOTIFY_INVAL_INODE = 2, | ||
235 | FUSE_NOTIFY_INVAL_ENTRY = 3, | ||
227 | FUSE_NOTIFY_CODE_MAX, | 236 | FUSE_NOTIFY_CODE_MAX, |
228 | }; | 237 | }; |
229 | 238 | ||
@@ -262,14 +271,18 @@ struct fuse_attr_out { | |||
262 | struct fuse_attr attr; | 271 | struct fuse_attr attr; |
263 | }; | 272 | }; |
264 | 273 | ||
274 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | ||
275 | |||
265 | struct fuse_mknod_in { | 276 | struct fuse_mknod_in { |
266 | __u32 mode; | 277 | __u32 mode; |
267 | __u32 rdev; | 278 | __u32 rdev; |
279 | __u32 umask; | ||
280 | __u32 padding; | ||
268 | }; | 281 | }; |
269 | 282 | ||
270 | struct fuse_mkdir_in { | 283 | struct fuse_mkdir_in { |
271 | __u32 mode; | 284 | __u32 mode; |
272 | __u32 padding; | 285 | __u32 umask; |
273 | }; | 286 | }; |
274 | 287 | ||
275 | struct fuse_rename_in { | 288 | struct fuse_rename_in { |
@@ -301,7 +314,14 @@ struct fuse_setattr_in { | |||
301 | 314 | ||
302 | struct fuse_open_in { | 315 | struct fuse_open_in { |
303 | __u32 flags; | 316 | __u32 flags; |
317 | __u32 unused; | ||
318 | }; | ||
319 | |||
320 | struct fuse_create_in { | ||
321 | __u32 flags; | ||
304 | __u32 mode; | 322 | __u32 mode; |
323 | __u32 umask; | ||
324 | __u32 padding; | ||
305 | }; | 325 | }; |
306 | 326 | ||
307 | struct fuse_open_out { | 327 | struct fuse_open_out { |
@@ -508,4 +528,16 @@ struct fuse_dirent { | |||
508 | #define FUSE_DIRENT_SIZE(d) \ | 528 | #define FUSE_DIRENT_SIZE(d) \ |
509 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 529 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
510 | 530 | ||
531 | struct fuse_notify_inval_inode_out { | ||
532 | __u64 ino; | ||
533 | __s64 off; | ||
534 | __s64 len; | ||
535 | }; | ||
536 | |||
537 | struct fuse_notify_inval_entry_out { | ||
538 | __u64 parent; | ||
539 | __u32 namelen; | ||
540 | __u32 padding; | ||
541 | }; | ||
542 | |||
511 | #endif /* _LINUX_FUSE_H */ | 543 | #endif /* _LINUX_FUSE_H */ |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 45257475623..8246c697863 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -2,7 +2,9 @@ | |||
2 | #define LINUX_HARDIRQ_H | 2 | #define LINUX_HARDIRQ_H |
3 | 3 | ||
4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
5 | #ifdef CONFIG_PREEMPT | ||
5 | #include <linux/smp_lock.h> | 6 | #include <linux/smp_lock.h> |
7 | #endif | ||
6 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
7 | #include <linux/ftrace_irq.h> | 9 | #include <linux/ftrace_irq.h> |
8 | #include <asm/hardirq.h> | 10 | #include <asm/hardirq.h> |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 7400900de94..4759917adc7 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
24 | #include <linux/timer.h> | ||
24 | 25 | ||
25 | 26 | ||
26 | struct hrtimer_clock_base; | 27 | struct hrtimer_clock_base; |
@@ -447,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
447 | 448 | ||
448 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | 449 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) |
449 | { | 450 | { |
451 | if (likely(!timer->start_site)) | ||
452 | return; | ||
450 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | 453 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, |
451 | timer->function, timer->start_comm, 0); | 454 | timer->function, timer->start_comm, 0); |
452 | } | 455 | } |
@@ -456,6 +459,8 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | |||
456 | 459 | ||
457 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | 460 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) |
458 | { | 461 | { |
462 | if (likely(!timer_stats_active)) | ||
463 | return; | ||
459 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | 464 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); |
460 | } | 465 | } |
461 | 466 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 95c6e00a72e..edc93a6d931 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1062,7 +1062,6 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l | |||
1062 | extern int ide_vlb_clk; | 1062 | extern int ide_vlb_clk; |
1063 | extern int ide_pci_clk; | 1063 | extern int ide_pci_clk; |
1064 | 1064 | ||
1065 | unsigned int ide_rq_bytes(struct request *); | ||
1066 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); | 1065 | int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); |
1067 | void ide_kill_rq(ide_drive_t *, struct request *); | 1066 | void ide_kill_rq(ide_drive_t *, struct request *); |
1068 | 1067 | ||
@@ -1361,7 +1360,6 @@ int ide_in_drive_list(u16 *, const struct drive_list_entry *); | |||
1361 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1360 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1362 | int ide_dma_good_drive(ide_drive_t *); | 1361 | int ide_dma_good_drive(ide_drive_t *); |
1363 | int __ide_dma_bad_drive(ide_drive_t *); | 1362 | int __ide_dma_bad_drive(ide_drive_t *); |
1364 | int ide_id_dma_bug(ide_drive_t *); | ||
1365 | 1363 | ||
1366 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1364 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
1367 | 1365 | ||
@@ -1402,7 +1400,6 @@ void ide_dma_lost_irq(ide_drive_t *); | |||
1402 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); | 1400 | ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); |
1403 | 1401 | ||
1404 | #else | 1402 | #else |
1405 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | ||
1406 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | 1403 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } |
1407 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1404 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
1408 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } | 1405 | static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } |
@@ -1422,6 +1419,7 @@ static inline void ide_dma_unmap_sg(ide_drive_t *drive, | |||
1422 | 1419 | ||
1423 | #ifdef CONFIG_BLK_DEV_IDEACPI | 1420 | #ifdef CONFIG_BLK_DEV_IDEACPI |
1424 | int ide_acpi_init(void); | 1421 | int ide_acpi_init(void); |
1422 | bool ide_port_acpi(ide_hwif_t *hwif); | ||
1425 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); | 1423 | extern int ide_acpi_exec_tfs(ide_drive_t *drive); |
1426 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); | 1424 | extern void ide_acpi_get_timing(ide_hwif_t *hwif); |
1427 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); | 1425 | extern void ide_acpi_push_timing(ide_hwif_t *hwif); |
@@ -1430,6 +1428,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *); | |||
1430 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); | 1428 | extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); |
1431 | #else | 1429 | #else |
1432 | static inline int ide_acpi_init(void) { return 0; } | 1430 | static inline int ide_acpi_init(void) { return 0; } |
1431 | static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; } | ||
1433 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } | 1432 | static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } |
1434 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } | 1433 | static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } |
1435 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } | 1434 | static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index ae3a1871413..70fdba2bbf7 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -78,6 +78,7 @@ | |||
78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ | 78 | #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ |
79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ | 79 | #define ETH_P_AOE 0x88A2 /* ATA over Ethernet */ |
80 | #define ETH_P_TIPC 0x88CA /* TIPC */ | 80 | #define ETH_P_TIPC 0x88CA /* TIPC */ |
81 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | ||
81 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 82 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
82 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ | 83 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ |
83 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 84 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
diff --git a/include/linux/ima.h b/include/linux/ima.h index b1b827d091a..0e3f2a4c25f 100644 --- a/include/linux/ima.h +++ b/include/linux/ima.h | |||
@@ -24,6 +24,7 @@ extern int ima_path_check(struct path *path, int mask, int update_counts); | |||
24 | extern void ima_file_free(struct file *file); | 24 | extern void ima_file_free(struct file *file); |
25 | extern int ima_file_mmap(struct file *file, unsigned long prot); | 25 | extern int ima_file_mmap(struct file *file, unsigned long prot); |
26 | extern void ima_counts_get(struct file *file); | 26 | extern void ima_counts_get(struct file *file); |
27 | extern void ima_counts_put(struct path *path, int mask); | ||
27 | 28 | ||
28 | #else | 29 | #else |
29 | static inline int ima_bprm_check(struct linux_binprm *bprm) | 30 | static inline int ima_bprm_check(struct linux_binprm *bprm) |
@@ -60,5 +61,10 @@ static inline void ima_counts_get(struct file *file) | |||
60 | { | 61 | { |
61 | return; | 62 | return; |
62 | } | 63 | } |
64 | |||
65 | static inline void ima_counts_put(struct path *path, int mask) | ||
66 | { | ||
67 | return; | ||
68 | } | ||
63 | #endif /* CONFIG_IMA_H */ | 69 | #endif /* CONFIG_IMA_H */ |
64 | #endif /* _LINUX_IMA_H */ | 70 | #endif /* _LINUX_IMA_H */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index acef2a770b6..ad27c7da879 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/init_task.h b/include/linux/init_task.h index 5368fbdc780..7fc01b13be4 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -183,5 +183,8 @@ extern struct cred init_cred; | |||
183 | LIST_HEAD_INIT(cpu_timers[2]), \ | 183 | LIST_HEAD_INIT(cpu_timers[2]), \ |
184 | } | 184 | } |
185 | 185 | ||
186 | /* Attach to the init_task data structure for proper alignment */ | ||
187 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | ||
188 | |||
186 | 189 | ||
187 | #endif | 190 | #endif |
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h new file mode 100644 index 00000000000..15d5903af2d --- /dev/null +++ b/include/linux/input/matrix_keypad.h | |||
@@ -0,0 +1,66 @@ | |||
1 | #ifndef _MATRIX_KEYPAD_H | ||
2 | #define _MATRIX_KEYPAD_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <linux/input.h> | ||
6 | |||
7 | #define MATRIX_MAX_ROWS 16 | ||
8 | #define MATRIX_MAX_COLS 16 | ||
9 | |||
10 | #define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\ | ||
11 | (((col) & (MATRIX_MAX_COLS - 1)) << 16) |\ | ||
12 | (val & 0xffff)) | ||
13 | |||
14 | #define KEY_ROW(k) (((k) >> 24) & 0xff) | ||
15 | #define KEY_COL(k) (((k) >> 16) & 0xff) | ||
16 | #define KEY_VAL(k) ((k) & 0xffff) | ||
17 | |||
18 | #define MATRIX_SCAN_CODE(row, col, row_shift) (((row) << (row_shift)) + (col)) | ||
19 | |||
20 | /** | ||
21 | * struct matrix_keymap_data - keymap for matrix keyboards | ||
22 | * @keymap: pointer to array of uint32 values encoded with KEY() macro | ||
23 | * representing keymap | ||
24 | * @keymap_size: number of entries (initialized) in this keymap | ||
25 | * | ||
26 | * This structure is supposed to be used by platform code to supply | ||
27 | * keymaps to drivers that implement matrix-like keypads/keyboards. | ||
28 | */ | ||
29 | struct matrix_keymap_data { | ||
30 | const uint32_t *keymap; | ||
31 | unsigned int keymap_size; | ||
32 | }; | ||
33 | |||
34 | /** | ||
35 | * struct matrix_keypad_platform_data - platform-dependent keypad data | ||
36 | * @keymap_data: pointer to &matrix_keymap_data | ||
37 | * @row_gpios: pointer to array of gpio numbers representing rows | ||
38 | * @col_gpios: pointer to array of gpio numbers reporesenting colums | ||
39 | * @num_row_gpios: actual number of row 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 | ||
42 | * needed before we can keypad after activating column gpio | ||
43 | * @debounce_ms: debounce interval in milliseconds | ||
44 | * | ||
45 | * This structure represents platform-specific data that use used by | ||
46 | * matrix_keypad driver to perform proper initialization. | ||
47 | */ | ||
48 | struct matrix_keypad_platform_data { | ||
49 | const struct matrix_keymap_data *keymap_data; | ||
50 | |||
51 | const unsigned int *row_gpios; | ||
52 | const unsigned int *col_gpios; | ||
53 | |||
54 | unsigned int num_row_gpios; | ||
55 | unsigned int num_col_gpios; | ||
56 | |||
57 | unsigned int col_scan_delay_us; | ||
58 | |||
59 | /* key debounce interval in milli-second */ | ||
60 | unsigned int debounce_ms; | ||
61 | |||
62 | bool active_low; | ||
63 | bool wakeup; | ||
64 | }; | ||
65 | |||
66 | #endif /* _MATRIX_KEYPAD_H */ | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2721f07e935..35e7df1e9f3 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/irqflags.h> | 14 | #include <linux/irqflags.h> |
15 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
16 | #include <linux/percpu.h> | 16 | #include <linux/percpu.h> |
17 | #include <linux/hrtimer.h> | ||
17 | 18 | ||
18 | #include <asm/atomic.h> | 19 | #include <asm/atomic.h> |
19 | #include <asm/ptrace.h> | 20 | #include <asm/ptrace.h> |
@@ -64,11 +65,13 @@ | |||
64 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run | 65 | * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run |
65 | * IRQTF_DIED - handler thread died | 66 | * IRQTF_DIED - handler thread died |
66 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed | 67 | * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed |
68 | * IRQTF_AFFINITY - irq thread is requested to adjust affinity | ||
67 | */ | 69 | */ |
68 | enum { | 70 | enum { |
69 | IRQTF_RUNTHREAD, | 71 | IRQTF_RUNTHREAD, |
70 | IRQTF_DIED, | 72 | IRQTF_DIED, |
71 | IRQTF_WARNED, | 73 | IRQTF_WARNED, |
74 | IRQTF_AFFINITY, | ||
72 | }; | 75 | }; |
73 | 76 | ||
74 | typedef irqreturn_t (*irq_handler_t)(int, void *); | 77 | typedef irqreturn_t (*irq_handler_t)(int, void *); |
@@ -517,6 +520,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); | |||
517 | extern void tasklet_init(struct tasklet_struct *t, | 520 | extern void tasklet_init(struct tasklet_struct *t, |
518 | void (*func)(unsigned long), unsigned long data); | 521 | void (*func)(unsigned long), unsigned long data); |
519 | 522 | ||
523 | struct tasklet_hrtimer { | ||
524 | struct hrtimer timer; | ||
525 | struct tasklet_struct tasklet; | ||
526 | enum hrtimer_restart (*function)(struct hrtimer *); | ||
527 | }; | ||
528 | |||
529 | extern void | ||
530 | tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, | ||
531 | enum hrtimer_restart (*function)(struct hrtimer *), | ||
532 | clockid_t which_clock, enum hrtimer_mode mode); | ||
533 | |||
534 | static inline | ||
535 | int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time, | ||
536 | const enum hrtimer_mode mode) | ||
537 | { | ||
538 | return hrtimer_start(&ttimer->timer, time, mode); | ||
539 | } | ||
540 | |||
541 | static inline | ||
542 | void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) | ||
543 | { | ||
544 | hrtimer_cancel(&ttimer->timer); | ||
545 | tasklet_kill(&ttimer->tasklet); | ||
546 | } | ||
547 | |||
520 | /* | 548 | /* |
521 | * Autoprobing for irqs: | 549 | * Autoprobing for irqs: |
522 | * | 550 | * |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index dd05434fa45..4da4a75c3f1 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/kernel.h b/include/linux/kernel.h index fac104e7186..d6320a3e8de 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -303,6 +303,7 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in | |||
303 | extern int panic_timeout; | 303 | extern int panic_timeout; |
304 | extern int panic_on_oops; | 304 | extern int panic_on_oops; |
305 | extern int panic_on_unrecovered_nmi; | 305 | extern int panic_on_unrecovered_nmi; |
306 | extern int panic_on_io_nmi; | ||
306 | extern const char *print_tainted(void); | 307 | extern const char *print_tainted(void); |
307 | extern void add_taint(unsigned flag); | 308 | extern void add_taint(unsigned flag); |
308 | extern int test_taint(unsigned flag); | 309 | extern int test_taint(unsigned flag); |
diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h index 7796aed6cdd..6a63807f714 100644 --- a/include/linux/kmemleak.h +++ b/include/linux/kmemleak.h | |||
@@ -27,6 +27,7 @@ extern void kmemleak_init(void); | |||
27 | extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, | 27 | extern void kmemleak_alloc(const void *ptr, size_t size, int min_count, |
28 | gfp_t gfp); | 28 | gfp_t gfp); |
29 | extern void kmemleak_free(const void *ptr); | 29 | extern void kmemleak_free(const void *ptr); |
30 | extern void kmemleak_free_part(const void *ptr, size_t size); | ||
30 | extern void kmemleak_padding(const void *ptr, unsigned long offset, | 31 | extern void kmemleak_padding(const void *ptr, unsigned long offset, |
31 | size_t size); | 32 | size_t size); |
32 | extern void kmemleak_not_leak(const void *ptr); | 33 | extern void kmemleak_not_leak(const void *ptr); |
@@ -71,6 +72,9 @@ static inline void kmemleak_alloc_recursive(const void *ptr, size_t size, | |||
71 | static inline void kmemleak_free(const void *ptr) | 72 | static inline void kmemleak_free(const void *ptr) |
72 | { | 73 | { |
73 | } | 74 | } |
75 | static inline void kmemleak_free_part(const void *ptr, size_t size) | ||
76 | { | ||
77 | } | ||
74 | static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) | 78 | static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) |
75 | { | 79 | { |
76 | } | 80 | } |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index aacc5449f58..3060bdc35ff 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 { |
@@ -125,6 +126,7 @@ struct kvm_kernel_irq_routing_entry { | |||
125 | struct kvm { | 126 | struct kvm { |
126 | struct mutex lock; /* protects the vcpus array and APIC accesses */ | 127 | struct mutex lock; /* protects the vcpus array and APIC accesses */ |
127 | spinlock_t mmu_lock; | 128 | spinlock_t mmu_lock; |
129 | spinlock_t requests_lock; | ||
128 | struct rw_semaphore slots_lock; | 130 | struct rw_semaphore slots_lock; |
129 | struct mm_struct *mm; /* userspace tied to this vm */ | 131 | struct mm_struct *mm; /* userspace tied to this vm */ |
130 | int nmemslots; | 132 | int nmemslots; |
diff --git a/include/linux/leds-lp3944.h b/include/linux/leds-lp3944.h new file mode 100644 index 00000000000..afc9f9fd70f --- /dev/null +++ b/include/linux/leds-lp3944.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * leds-lp3944.h - platform data structure for lp3944 led controller | ||
3 | * | ||
4 | * Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef __LINUX_LEDS_LP3944_H | ||
13 | #define __LINUX_LEDS_LP3944_H | ||
14 | |||
15 | #include <linux/leds.h> | ||
16 | #include <linux/workqueue.h> | ||
17 | |||
18 | #define LP3944_LED0 0 | ||
19 | #define LP3944_LED1 1 | ||
20 | #define LP3944_LED2 2 | ||
21 | #define LP3944_LED3 3 | ||
22 | #define LP3944_LED4 4 | ||
23 | #define LP3944_LED5 5 | ||
24 | #define LP3944_LED6 6 | ||
25 | #define LP3944_LED7 7 | ||
26 | #define LP3944_LEDS_MAX 8 | ||
27 | |||
28 | #define LP3944_LED_STATUS_MASK 0x03 | ||
29 | enum lp3944_status { | ||
30 | LP3944_LED_STATUS_OFF = 0x0, | ||
31 | LP3944_LED_STATUS_ON = 0x1, | ||
32 | LP3944_LED_STATUS_DIM0 = 0x2, | ||
33 | LP3944_LED_STATUS_DIM1 = 0x3 | ||
34 | }; | ||
35 | |||
36 | enum lp3944_type { | ||
37 | LP3944_LED_TYPE_NONE, | ||
38 | LP3944_LED_TYPE_LED, | ||
39 | LP3944_LED_TYPE_LED_INVERTED, | ||
40 | }; | ||
41 | |||
42 | struct lp3944_led { | ||
43 | char *name; | ||
44 | enum lp3944_type type; | ||
45 | enum lp3944_status status; | ||
46 | }; | ||
47 | |||
48 | struct lp3944_platform_data { | ||
49 | struct lp3944_led leds[LP3944_LEDS_MAX]; | ||
50 | u8 leds_size; | ||
51 | }; | ||
52 | |||
53 | #endif /* __LINUX_LEDS_LP3944_H */ | ||
diff --git a/include/linux/leds.h b/include/linux/leds.h index 376fe07732e..d8bf9665e70 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -45,7 +45,10 @@ struct led_classdev { | |||
45 | /* Get LED brightness level */ | 45 | /* Get LED brightness level */ |
46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); | 46 | enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); |
47 | 47 | ||
48 | /* Activate hardware accelerated blink */ | 48 | /* Activate hardware accelerated blink, delays are in |
49 | * miliseconds and if none is provided then a sensible default | ||
50 | * should be chosen. The call can adjust the timings if it can't | ||
51 | * match the values specified exactly. */ | ||
49 | int (*blink_set)(struct led_classdev *led_cdev, | 52 | int (*blink_set)(struct led_classdev *led_cdev, |
50 | unsigned long *delay_on, | 53 | unsigned long *delay_on, |
51 | unsigned long *delay_off); | 54 | unsigned long *delay_off); |
@@ -141,9 +144,14 @@ struct gpio_led { | |||
141 | const char *name; | 144 | const char *name; |
142 | const char *default_trigger; | 145 | const char *default_trigger; |
143 | unsigned gpio; | 146 | unsigned gpio; |
144 | u8 active_low : 1; | 147 | unsigned active_low : 1; |
145 | u8 retain_state_suspended : 1; | 148 | unsigned retain_state_suspended : 1; |
149 | unsigned default_state : 2; | ||
150 | /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */ | ||
146 | }; | 151 | }; |
152 | #define LEDS_GPIO_DEFSTATE_OFF 0 | ||
153 | #define LEDS_GPIO_DEFSTATE_ON 1 | ||
154 | #define LEDS_GPIO_DEFSTATE_KEEP 2 | ||
147 | 155 | ||
148 | struct gpio_led_platform_data { | 156 | struct gpio_led_platform_data { |
149 | int num_leds; | 157 | int num_leds; |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 7bc1440fc47..2fb1dcbcb5a 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:032 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 bfefbdf7498..495203ff221 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 3d501db36a2..e5b6e33c657 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -385,6 +385,7 @@ enum { | |||
385 | not multiple of 16 bytes */ | 385 | not multiple of 16 bytes */ |
386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ | 386 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firmware update warning */ |
387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | 387 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ |
388 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | ||
388 | 389 | ||
389 | /* DMA mask for user DMA control: User visible values; DO NOT | 390 | /* DMA mask for user DMA control: User visible values; DO NOT |
390 | renumber */ | 391 | renumber */ |
@@ -588,6 +589,7 @@ struct ata_device { | |||
588 | #endif | 589 | #endif |
589 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ | 590 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
590 | 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 */ | ||
591 | unsigned int class; /* ATA_DEV_xxx */ | 593 | unsigned int class; /* ATA_DEV_xxx */ |
592 | unsigned long unpark_deadline; | 594 | unsigned long unpark_deadline; |
593 | 595 | ||
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index fee9e59649c..691f59171c6 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -22,6 +22,15 @@ | |||
22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) | 22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * For assembly routines. | ||
26 | * | ||
27 | * Note when using these that you must specify the appropriate | ||
28 | * alignment directives yourself | ||
29 | */ | ||
30 | #define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw" | ||
31 | #define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw" | ||
32 | |||
33 | /* | ||
25 | * This is used by architectures to keep arguments on the stack | 34 | * This is used by architectures to keep arguments on the stack |
26 | * untouched by the compiler by keeping them live until the end. | 35 | * untouched by the compiler by keeping them live until the end. |
27 | * The argument stack may be owned by the assembly-language | 36 | * The argument stack may be owned by the assembly-language |
diff --git a/include/linux/mm.h b/include/linux/mm.h index d006e93d5c9..ba3a7cb1eaa 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -826,7 +826,7 @@ extern int make_pages_present(unsigned long addr, unsigned long end); | |||
826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); | 826 | extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); |
827 | 827 | ||
828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | 828 | int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, |
829 | unsigned long start, int len, int write, int force, | 829 | unsigned long start, int nr_pages, int write, int force, |
830 | struct page **pages, struct vm_area_struct **vmas); | 830 | struct page **pages, struct vm_area_struct **vmas); |
831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 831 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
832 | struct page **pages); | 832 | struct page **pages); |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 3beb2592b03..d74785c2393 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
@@ -2,10 +2,9 @@ | |||
2 | #define _NAMESPACE_H_ | 2 | #define _NAMESPACE_H_ |
3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
4 | 4 | ||
5 | #include <linux/mount.h> | 5 | #include <linux/path.h> |
6 | #include <linux/sched.h> | ||
7 | #include <linux/nsproxy.h> | ||
8 | #include <linux/seq_file.h> | 6 | #include <linux/seq_file.h> |
7 | #include <linux/wait.h> | ||
9 | 8 | ||
10 | struct mnt_namespace { | 9 | struct mnt_namespace { |
11 | atomic_t count; | 10 | atomic_t count; |
@@ -28,14 +27,6 @@ extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt); | |||
28 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 27 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
29 | struct fs_struct *); | 28 | struct fs_struct *); |
30 | extern void put_mnt_ns(struct mnt_namespace *ns); | 29 | extern void put_mnt_ns(struct mnt_namespace *ns); |
31 | |||
32 | static inline void exit_mnt_ns(struct task_struct *p) | ||
33 | { | ||
34 | struct mnt_namespace *ns = p->nsproxy->mnt_ns; | ||
35 | if (ns) | ||
36 | put_mnt_ns(ns); | ||
37 | } | ||
38 | |||
39 | static inline void get_mnt_ns(struct mnt_namespace *ns) | 30 | static inline void get_mnt_ns(struct mnt_namespace *ns) |
40 | { | 31 | { |
41 | atomic_inc(&ns->count); | 32 | atomic_inc(&ns->count); |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 5675b63a063..0f32a9b6ff5 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 af6dcb992bc..b70313d33ff 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/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 3430c775194..7ae05338e94 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -81,4 +81,17 @@ struct xt_conntrack_mtinfo1 { | |||
81 | __u8 state_mask, status_mask; | 81 | __u8 state_mask, status_mask; |
82 | }; | 82 | }; |
83 | 83 | ||
84 | struct xt_conntrack_mtinfo2 { | ||
85 | union nf_inet_addr origsrc_addr, origsrc_mask; | ||
86 | union nf_inet_addr origdst_addr, origdst_mask; | ||
87 | union nf_inet_addr replsrc_addr, replsrc_mask; | ||
88 | union nf_inet_addr repldst_addr, repldst_mask; | ||
89 | __u32 expires_min, expires_max; | ||
90 | __u16 l4proto; | ||
91 | __be16 origsrc_port, origdst_port; | ||
92 | __be16 replsrc_port, repldst_port; | ||
93 | __u16 match_flags, invert_flags; | ||
94 | __u16 state_mask, status_mask; | ||
95 | }; | ||
96 | |||
84 | #endif /*_XT_CONNTRACK_H*/ | 97 | #endif /*_XT_CONNTRACK_H*/ |
diff --git a/include/linux/netfilter/xt_osf.h b/include/linux/netfilter/xt_osf.h index fd2272e0959..18afa495f97 100644 --- a/include/linux/netfilter/xt_osf.h +++ b/include/linux/netfilter/xt_osf.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #ifndef _XT_OSF_H | 20 | #ifndef _XT_OSF_H |
21 | #define _XT_OSF_H | 21 | #define _XT_OSF_H |
22 | 22 | ||
23 | #include <linux/types.h> | ||
24 | |||
23 | #define MAXGENRELEN 32 | 25 | #define MAXGENRELEN 32 |
24 | 26 | ||
25 | #define XT_OSF_GENRE (1<<0) | 27 | #define XT_OSF_GENRE (1<<0) |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index fdffb413b19..f6b90240dd4 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/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 19fe15d1204..320569eabe3 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -167,6 +167,15 @@ struct nfs_server { | |||
167 | #define NFS_CAP_SYMLINKS (1U << 2) | 167 | #define NFS_CAP_SYMLINKS (1U << 2) |
168 | #define NFS_CAP_ACLS (1U << 3) | 168 | #define NFS_CAP_ACLS (1U << 3) |
169 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) | 169 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) |
170 | #define NFS_CAP_CHANGE_ATTR (1U << 5) | ||
171 | #define NFS_CAP_FILEID (1U << 6) | ||
172 | #define NFS_CAP_MODE (1U << 7) | ||
173 | #define NFS_CAP_NLINK (1U << 8) | ||
174 | #define NFS_CAP_OWNER (1U << 9) | ||
175 | #define NFS_CAP_OWNER_GROUP (1U << 10) | ||
176 | #define NFS_CAP_ATIME (1U << 11) | ||
177 | #define NFS_CAP_CTIME (1U << 12) | ||
178 | #define NFS_CAP_MTIME (1U << 13) | ||
170 | 179 | ||
171 | 180 | ||
172 | /* maximum number of slots to use */ | 181 | /* maximum number of slots to use */ |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 829b94b156f..b359c4a9ec9 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 c9663c69030..53b94e025c7 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/pci.h b/include/linux/pci.h index d304ddf412d..115fb7ba508 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1145,7 +1145,7 @@ static inline void pci_set_drvdata(struct pci_dev *pdev, void *data) | |||
1145 | /* If you want to know what to call your pci_dev, ask this function. | 1145 | /* If you want to know what to call your pci_dev, ask this function. |
1146 | * Again, it's a wrapper around the generic device. | 1146 | * Again, it's a wrapper around the generic device. |
1147 | */ | 1147 | */ |
1148 | static inline const char *pci_name(struct pci_dev *pdev) | 1148 | static inline const char *pci_name(const struct pci_dev *pdev) |
1149 | { | 1149 | { |
1150 | return dev_name(&pdev->dev); | 1150 | return dev_name(&pdev->dev); |
1151 | } | 1151 | } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a3b00036579..73b46b6b904 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2645,6 +2645,7 @@ | |||
2645 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 | 2645 | #define PCI_DEVICE_ID_NETMOS_9835 0x9835 |
2646 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2646 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2647 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2647 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2648 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 | ||
2648 | 2649 | ||
2649 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2650 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
2650 | 2651 | ||
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 8f921d74f49..68438e18fff 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | 25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ |
26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | 26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ |
27 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 27 | PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES \ |
28 | __typeof__(type) per_cpu__##name | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Variant on the per-CPU variable declaration/definition theme used for | 31 | * Variant on the per-CPU variable declaration/definition theme used for |
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 89698d8aba5..b53f7006cc4 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -115,26 +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, | ||
124 | PERF_SAMPLE_RAW = 1U << 10, | ||
123 | 125 | ||
124 | PERF_SAMPLE_MAX = 1U << 9, /* non-ABI */ | 126 | PERF_SAMPLE_MAX = 1U << 11, /* non-ABI */ |
125 | }; | 127 | }; |
126 | 128 | ||
127 | /* | 129 | /* |
128 | * 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, |
129 | * reads on the counter should return the indicated quantities, | 131 | * as specified by attr.read_format: |
130 | * 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 | * }; | ||
131 | */ | 148 | */ |
132 | enum perf_counter_read_format { | 149 | enum perf_counter_read_format { |
133 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, | 150 | PERF_FORMAT_TOTAL_TIME_ENABLED = 1U << 0, |
134 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, | 151 | PERF_FORMAT_TOTAL_TIME_RUNNING = 1U << 1, |
135 | PERF_FORMAT_ID = 1U << 2, | 152 | PERF_FORMAT_ID = 1U << 2, |
153 | PERF_FORMAT_GROUP = 1U << 3, | ||
136 | 154 | ||
137 | PERF_FORMAT_MAX = 1U << 3, /* non-ABI */ | 155 | PERF_FORMAT_MAX = 1U << 4, /* non-ABI */ |
138 | }; | 156 | }; |
139 | 157 | ||
140 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ | 158 | #define PERF_ATTR_SIZE_VER0 64 /* sizeof first published struct */ |
@@ -178,8 +196,11 @@ struct perf_counter_attr { | |||
178 | mmap : 1, /* include mmap data */ | 196 | mmap : 1, /* include mmap data */ |
179 | comm : 1, /* include comm data */ | 197 | comm : 1, /* include comm data */ |
180 | freq : 1, /* use freq, not period */ | 198 | freq : 1, /* use freq, not period */ |
199 | inherit_stat : 1, /* per task counts */ | ||
200 | enable_on_exec : 1, /* next exec enables */ | ||
201 | task : 1, /* trace fork/exit */ | ||
181 | 202 | ||
182 | __reserved_1 : 53; | 203 | __reserved_1 : 50; |
183 | 204 | ||
184 | __u32 wakeup_events; /* wakeup every n events */ | 205 | __u32 wakeup_events; /* wakeup every n events */ |
185 | __u32 __reserved_2; | 206 | __u32 __reserved_2; |
@@ -232,6 +253,14 @@ struct perf_counter_mmap_page { | |||
232 | __u32 lock; /* seqlock for synchronization */ | 253 | __u32 lock; /* seqlock for synchronization */ |
233 | __u32 index; /* hardware counter identifier */ | 254 | __u32 index; /* hardware counter identifier */ |
234 | __s64 offset; /* add to hardware counter value */ | 255 | __s64 offset; /* add to hardware counter value */ |
256 | __u64 time_enabled; /* time counter active */ | ||
257 | __u64 time_running; /* time counter on cpu */ | ||
258 | |||
259 | /* | ||
260 | * Hole for extension of the self monitor capabilities | ||
261 | */ | ||
262 | |||
263 | __u64 __reserved[123]; /* align to 1k */ | ||
235 | 264 | ||
236 | /* | 265 | /* |
237 | * Control data for the mmap() data buffer. | 266 | * Control data for the mmap() data buffer. |
@@ -253,7 +282,6 @@ struct perf_counter_mmap_page { | |||
253 | #define PERF_EVENT_MISC_KERNEL (1 << 0) | 282 | #define PERF_EVENT_MISC_KERNEL (1 << 0) |
254 | #define PERF_EVENT_MISC_USER (2 << 0) | 283 | #define PERF_EVENT_MISC_USER (2 << 0) |
255 | #define PERF_EVENT_MISC_HYPERVISOR (3 << 0) | 284 | #define PERF_EVENT_MISC_HYPERVISOR (3 << 0) |
256 | #define PERF_EVENT_MISC_OVERFLOW (1 << 2) | ||
257 | 285 | ||
258 | struct perf_event_header { | 286 | struct perf_event_header { |
259 | __u32 type; | 287 | __u32 type; |
@@ -301,18 +329,18 @@ enum perf_event_type { | |||
301 | /* | 329 | /* |
302 | * struct { | 330 | * struct { |
303 | * struct perf_event_header header; | 331 | * struct perf_event_header header; |
304 | * u64 time; | 332 | * u32 pid, ppid; |
305 | * u64 id; | 333 | * u32 tid, ptid; |
306 | * u64 sample_period; | ||
307 | * }; | 334 | * }; |
308 | */ | 335 | */ |
309 | PERF_EVENT_PERIOD = 4, | 336 | PERF_EVENT_EXIT = 4, |
310 | 337 | ||
311 | /* | 338 | /* |
312 | * struct { | 339 | * struct { |
313 | * struct perf_event_header header; | 340 | * struct perf_event_header header; |
314 | * u64 time; | 341 | * u64 time; |
315 | * u64 id; | 342 | * u64 id; |
343 | * u64 stream_id; | ||
316 | * }; | 344 | * }; |
317 | */ | 345 | */ |
318 | PERF_EVENT_THROTTLE = 5, | 346 | PERF_EVENT_THROTTLE = 5, |
@@ -322,14 +350,22 @@ enum perf_event_type { | |||
322 | * struct { | 350 | * struct { |
323 | * struct perf_event_header header; | 351 | * struct perf_event_header header; |
324 | * u32 pid, ppid; | 352 | * u32 pid, ppid; |
353 | * u32 tid, ptid; | ||
325 | * }; | 354 | * }; |
326 | */ | 355 | */ |
327 | PERF_EVENT_FORK = 7, | 356 | PERF_EVENT_FORK = 7, |
328 | 357 | ||
329 | /* | 358 | /* |
330 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field | 359 | * struct { |
331 | * will be PERF_SAMPLE_* | 360 | * struct perf_event_header header; |
361 | * u32 pid, tid; | ||
332 | * | 362 | * |
363 | * struct read_format values; | ||
364 | * }; | ||
365 | */ | ||
366 | PERF_EVENT_READ = 8, | ||
367 | |||
368 | /* | ||
333 | * struct { | 369 | * struct { |
334 | * struct perf_event_header header; | 370 | * struct perf_event_header header; |
335 | * | 371 | * |
@@ -337,16 +373,34 @@ enum perf_event_type { | |||
337 | * { u32 pid, tid; } && PERF_SAMPLE_TID | 373 | * { u32 pid, tid; } && PERF_SAMPLE_TID |
338 | * { u64 time; } && PERF_SAMPLE_TIME | 374 | * { u64 time; } && PERF_SAMPLE_TIME |
339 | * { u64 addr; } && PERF_SAMPLE_ADDR | 375 | * { u64 addr; } && PERF_SAMPLE_ADDR |
340 | * { u64 config; } && PERF_SAMPLE_CONFIG | 376 | * { u64 id; } && PERF_SAMPLE_ID |
377 | * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID | ||
341 | * { u32 cpu, res; } && PERF_SAMPLE_CPU | 378 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
379 | * { u64 period; } && PERF_SAMPLE_PERIOD | ||
342 | * | 380 | * |
343 | * { u64 nr; | 381 | * { struct read_format values; } && PERF_SAMPLE_READ |
344 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP | ||
345 | * | 382 | * |
346 | * { u64 nr, | 383 | * { u64 nr, |
347 | * 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 | ||
348 | * }; | 399 | * }; |
349 | */ | 400 | */ |
401 | PERF_EVENT_SAMPLE = 9, | ||
402 | |||
403 | PERF_EVENT_MAX, /* non-ABI */ | ||
350 | }; | 404 | }; |
351 | 405 | ||
352 | enum perf_callchain_context { | 406 | enum perf_callchain_context { |
@@ -387,6 +441,11 @@ struct perf_callchain_entry { | |||
387 | __u64 ip[PERF_MAX_STACK_DEPTH]; | 441 | __u64 ip[PERF_MAX_STACK_DEPTH]; |
388 | }; | 442 | }; |
389 | 443 | ||
444 | struct perf_raw_record { | ||
445 | u32 size; | ||
446 | void *data; | ||
447 | }; | ||
448 | |||
390 | struct task_struct; | 449 | struct task_struct; |
391 | 450 | ||
392 | /** | 451 | /** |
@@ -582,6 +641,7 @@ struct perf_counter_context { | |||
582 | int nr_counters; | 641 | int nr_counters; |
583 | int nr_active; | 642 | int nr_active; |
584 | int is_active; | 643 | int is_active; |
644 | int nr_stat; | ||
585 | atomic_t refcount; | 645 | atomic_t refcount; |
586 | struct task_struct *task; | 646 | struct task_struct *task; |
587 | 647 | ||
@@ -654,10 +714,13 @@ struct perf_sample_data { | |||
654 | struct pt_regs *regs; | 714 | struct pt_regs *regs; |
655 | u64 addr; | 715 | u64 addr; |
656 | u64 period; | 716 | u64 period; |
717 | struct perf_raw_record *raw; | ||
657 | }; | 718 | }; |
658 | 719 | ||
659 | extern int perf_counter_overflow(struct perf_counter *counter, int nmi, | 720 | extern int perf_counter_overflow(struct perf_counter *counter, int nmi, |
660 | 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); | ||
661 | 724 | ||
662 | /* | 725 | /* |
663 | * Return 1 for a software counter, 0 for a hardware counter | 726 | * Return 1 for a software counter, 0 for a hardware counter |
@@ -669,7 +732,16 @@ static inline int is_software_counter(struct perf_counter *counter) | |||
669 | (counter->attr.type != PERF_TYPE_HW_CACHE); | 732 | (counter->attr.type != PERF_TYPE_HW_CACHE); |
670 | } | 733 | } |
671 | 734 | ||
672 | extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | 735 | extern atomic_t perf_swcounter_enabled[PERF_COUNT_SW_MAX]; |
736 | |||
737 | extern void __perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); | ||
738 | |||
739 | static inline void | ||
740 | perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs, u64 addr) | ||
741 | { | ||
742 | if (atomic_read(&perf_swcounter_enabled[event])) | ||
743 | __perf_swcounter_event(event, nr, nmi, regs, addr); | ||
744 | } | ||
673 | 745 | ||
674 | extern void __perf_counter_mmap(struct vm_area_struct *vma); | 746 | extern void __perf_counter_mmap(struct vm_area_struct *vma); |
675 | 747 | ||
diff --git a/include/linux/personality.h b/include/linux/personality.h index a84e9ff9b27..126120819a0 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -40,7 +40,10 @@ enum { | |||
40 | * Security-relevant compatibility flags that must be | 40 | * Security-relevant compatibility flags that must be |
41 | * cleared upon setuid or setgid exec: | 41 | * cleared upon setuid or setgid exec: |
42 | */ | 42 | */ |
43 | #define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE) | 43 | #define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC | \ |
44 | ADDR_NO_RANDOMIZE | \ | ||
45 | ADDR_COMPAT_LAYOUT | \ | ||
46 | MMAP_PAGE_ZERO) | ||
44 | 47 | ||
45 | /* | 48 | /* |
46 | * Personality types. | 49 | * Personality types. |
diff --git a/include/linux/pps.h b/include/linux/pps.h index cfe5c7214ec..0194ab06177 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/quotaops.h b/include/linux/quotaops.h index 7bc45759368..26361c4c037 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef _LINUX_QUOTAOPS_ | 7 | #ifndef _LINUX_QUOTAOPS_ |
8 | #define _LINUX_QUOTAOPS_ | 8 | #define _LINUX_QUOTAOPS_ |
9 | 9 | ||
10 | #include <linux/smp_lock.h> | ||
11 | #include <linux/fs.h> | 10 | #include <linux/fs.h> |
12 | 11 | ||
13 | static inline struct quota_info *sb_dqopt(struct super_block *sb) | 12 | static inline struct quota_info *sb_dqopt(struct super_block *sb) |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index e73e2429a1b..278777fa8a3 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -99,7 +99,6 @@ enum rfkill_user_states { | |||
99 | #undef RFKILL_STATE_UNBLOCKED | 99 | #undef RFKILL_STATE_UNBLOCKED |
100 | #undef RFKILL_STATE_HARD_BLOCKED | 100 | #undef RFKILL_STATE_HARD_BLOCKED |
101 | 101 | ||
102 | #include <linux/types.h> | ||
103 | #include <linux/kernel.h> | 102 | #include <linux/kernel.h> |
104 | #include <linux/list.h> | 103 | #include <linux/list.h> |
105 | #include <linux/mutex.h> | 104 | #include <linux/mutex.h> |
@@ -225,7 +224,7 @@ void rfkill_destroy(struct rfkill *rfkill); | |||
225 | * 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 |
226 | * block state -- which they might not be able to. | 225 | * block state -- which they might not be able to. |
227 | */ | 226 | */ |
228 | bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | 227 | bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); |
229 | 228 | ||
230 | /** | 229 | /** |
231 | * 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 e5996984ddd..9aaf5bfdad1 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 4d075426988..3ab08e4bb6b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -209,7 +209,7 @@ extern unsigned long long time_sync_thresh; | |||
209 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) | 209 | ((task->state & (__TASK_STOPPED | __TASK_TRACED)) != 0) |
210 | #define task_contributes_to_load(task) \ | 210 | #define task_contributes_to_load(task) \ |
211 | ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ | 211 | ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ |
212 | (task->flags & PF_FROZEN) == 0) | 212 | (task->flags & PF_FREEZING) == 0) |
213 | 213 | ||
214 | #define __set_task_state(tsk, state_value) \ | 214 | #define __set_task_state(tsk, state_value) \ |
215 | do { (tsk)->state = (state_value); } while (0) | 215 | do { (tsk)->state = (state_value); } while (0) |
@@ -349,8 +349,20 @@ extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner); | |||
349 | struct nsproxy; | 349 | struct nsproxy; |
350 | struct user_namespace; | 350 | struct user_namespace; |
351 | 351 | ||
352 | /* Maximum number of active map areas.. This is a random (large) number */ | 352 | /* |
353 | #define DEFAULT_MAX_MAP_COUNT 65536 | 353 | * Default maximum number of active map areas, this limits the number of vmas |
354 | * per mm struct. Users can overwrite this number by sysctl but there is a | ||
355 | * problem. | ||
356 | * | ||
357 | * When a program's coredump is generated as ELF format, a section is created | ||
358 | * per a vma. In ELF, the number of sections is represented in unsigned short. | ||
359 | * This means the number of sections should be smaller than 65535 at coredump. | ||
360 | * Because the kernel adds some informative sections to a image of program at | ||
361 | * generating coredump, we need some margin. The number of extra sections is | ||
362 | * 1-3 now and depends on arch. We use "5" as safe margin, here. | ||
363 | */ | ||
364 | #define MAPCOUNT_ELF_CORE_MARGIN (5) | ||
365 | #define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN) | ||
354 | 366 | ||
355 | extern int sysctl_max_map_count; | 367 | extern int sysctl_max_map_count; |
356 | 368 | ||
@@ -486,6 +498,15 @@ struct task_cputime { | |||
486 | .sum_exec_runtime = 0, \ | 498 | .sum_exec_runtime = 0, \ |
487 | } | 499 | } |
488 | 500 | ||
501 | /* | ||
502 | * Disable preemption until the scheduler is running. | ||
503 | * Reset by start_kernel()->sched_init()->init_idle(). | ||
504 | * | ||
505 | * We include PREEMPT_ACTIVE to avoid cond_resched() from working | ||
506 | * before the scheduler is active -- see should_resched(). | ||
507 | */ | ||
508 | #define INIT_PREEMPT_COUNT (1 + PREEMPT_ACTIVE) | ||
509 | |||
489 | /** | 510 | /** |
490 | * struct thread_group_cputimer - thread group interval timer counts | 511 | * struct thread_group_cputimer - thread group interval timer counts |
491 | * @cputime: thread group interval timers. | 512 | * @cputime: thread group interval timers. |
@@ -1659,6 +1680,7 @@ extern cputime_t task_gtime(struct task_struct *p); | |||
1659 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ | 1680 | #define PF_MEMALLOC 0x00000800 /* Allocating memory */ |
1660 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ | 1681 | #define PF_FLUSHER 0x00001000 /* responsible for disk writeback */ |
1661 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ | 1682 | #define PF_USED_MATH 0x00002000 /* if unset the fpu must be initialized before use */ |
1683 | #define PF_FREEZING 0x00004000 /* freeze in progress. do not account to load */ | ||
1662 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ | 1684 | #define PF_NOFREEZE 0x00008000 /* this thread should not be frozen */ |
1663 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ | 1685 | #define PF_FROZEN 0x00010000 /* frozen for system suspend */ |
1664 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ | 1686 | #define PF_FSTRANS 0x00020000 /* inside a filesystem transaction */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index b47b3f039d1..f2c69a2cca1 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1342,12 +1342,12 @@ static inline int skb_network_offset(const struct sk_buff *skb) | |||
1342 | * shifting the start of the packet by 2 bytes. Drivers should do this | 1342 | * shifting the start of the packet by 2 bytes. Drivers should do this |
1343 | * with: | 1343 | * with: |
1344 | * | 1344 | * |
1345 | * skb_reserve(NET_IP_ALIGN); | 1345 | * skb_reserve(skb, NET_IP_ALIGN); |
1346 | * | 1346 | * |
1347 | * The downside to this alignment of the IP header is that the DMA is now | 1347 | * The downside to this alignment of the IP header is that the DMA is now |
1348 | * unaligned. On some architectures the cost of an unaligned DMA is high | 1348 | * unaligned. On some architectures the cost of an unaligned DMA is high |
1349 | * and this cost outweighs the gains made by aligning the IP header. | 1349 | * and this cost outweighs the gains made by aligning the IP header. |
1350 | * | 1350 | * |
1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN | 1351 | * Since this trade off varies between architectures, we allow NET_IP_ALIGN |
1352 | * to be overridden. | 1352 | * to be overridden. |
1353 | */ | 1353 | */ |
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 4dcbc2c7149..c1c862b1d01 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/workqueue.h> | 11 | #include <linux/workqueue.h> |
12 | #include <linux/kobject.h> | 12 | #include <linux/kobject.h> |
13 | #include <linux/kmemtrace.h> | 13 | #include <linux/kmemtrace.h> |
14 | #include <linux/kmemleak.h> | ||
14 | 15 | ||
15 | enum stat_item { | 16 | enum stat_item { |
16 | ALLOC_FASTPATH, /* Allocation from cpu slab */ | 17 | ALLOC_FASTPATH, /* Allocation from cpu slab */ |
@@ -233,6 +234,7 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) | |||
233 | unsigned int order = get_order(size); | 234 | unsigned int order = get_order(size); |
234 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); | 235 | void *ret = (void *) __get_free_pages(flags | __GFP_COMP, order); |
235 | 236 | ||
237 | kmemleak_alloc(ret, size, 1, flags); | ||
236 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); | 238 | trace_kmalloc(_THIS_IP_, ret, size, PAGE_SIZE << order, flags); |
237 | 239 | ||
238 | return ret; | 240 | return ret; |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 9c4cd27f468..c47c4b4da97 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -80,6 +80,8 @@ struct spi_device { | |||
80 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ | 80 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ |
81 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ | 81 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ |
82 | #define SPI_LOOP 0x20 /* loopback mode */ | 82 | #define SPI_LOOP 0x20 /* loopback mode */ |
83 | #define SPI_NO_CS 0x40 /* 1 dev/bus, no chipselect */ | ||
84 | #define SPI_READY 0x80 /* slave pulls low to pause */ | ||
83 | u8 bits_per_word; | 85 | u8 bits_per_word; |
84 | int irq; | 86 | int irq; |
85 | void *controller_state; | 87 | void *controller_state; |
@@ -248,6 +250,10 @@ struct spi_master { | |||
248 | /* spi_device.mode flags understood by this controller driver */ | 250 | /* spi_device.mode flags understood by this controller driver */ |
249 | u16 mode_bits; | 251 | u16 mode_bits; |
250 | 252 | ||
253 | /* other constraints relevant to this driver */ | ||
254 | u16 flags; | ||
255 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ | ||
256 | |||
251 | /* Setup mode and clock, etc (spi driver may call many times). | 257 | /* Setup mode and clock, etc (spi driver may call many times). |
252 | * | 258 | * |
253 | * IMPORTANT: this may be called when transfers to another | 259 | * IMPORTANT: this may be called when transfers to another |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index 95251ccd5a0..bf0570a84f7 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
@@ -40,6 +40,8 @@ | |||
40 | #define SPI_LSB_FIRST 0x08 | 40 | #define SPI_LSB_FIRST 0x08 |
41 | #define SPI_3WIRE 0x10 | 41 | #define SPI_3WIRE 0x10 |
42 | #define SPI_LOOP 0x20 | 42 | #define SPI_LOOP 0x20 |
43 | #define SPI_NO_CS 0x40 | ||
44 | #define SPI_READY 0x80 | ||
43 | 45 | ||
44 | /*---------------------------------------------------------------------------*/ | 46 | /*---------------------------------------------------------------------------*/ |
45 | 47 | ||
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 252b245cfcf..4be57ab0347 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -132,6 +132,11 @@ do { \ | |||
132 | #endif /*__raw_spin_is_contended*/ | 132 | #endif /*__raw_spin_is_contended*/ |
133 | #endif | 133 | #endif |
134 | 134 | ||
135 | /* The lock does not imply full memory barrier. */ | ||
136 | #ifndef ARCH_HAS_SMP_MB_AFTER_LOCK | ||
137 | static inline void smp_mb__after_lock(void) { smp_mb(); } | ||
138 | #endif | ||
139 | |||
135 | /** | 140 | /** |
136 | * spin_unlock_wait - wait until the spinlock gets unlocked | 141 | * spin_unlock_wait - wait until the spinlock gets unlocked |
137 | * @lock: the spinlock in question. | 142 | * @lock: the spinlock in question. |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 2d8b211b932..6f52b4d7c44 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -59,6 +59,15 @@ struct cache_head { | |||
59 | 59 | ||
60 | #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ | 60 | #define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */ |
61 | 61 | ||
62 | struct cache_detail_procfs { | ||
63 | struct proc_dir_entry *proc_ent; | ||
64 | struct proc_dir_entry *flush_ent, *channel_ent, *content_ent; | ||
65 | }; | ||
66 | |||
67 | struct cache_detail_pipefs { | ||
68 | struct dentry *dir; | ||
69 | }; | ||
70 | |||
62 | struct cache_detail { | 71 | struct cache_detail { |
63 | struct module * owner; | 72 | struct module * owner; |
64 | int hash_size; | 73 | int hash_size; |
@@ -70,15 +79,17 @@ struct cache_detail { | |||
70 | char *name; | 79 | char *name; |
71 | void (*cache_put)(struct kref *); | 80 | void (*cache_put)(struct kref *); |
72 | 81 | ||
73 | void (*cache_request)(struct cache_detail *cd, | 82 | int (*cache_upcall)(struct cache_detail *, |
74 | struct cache_head *h, | 83 | struct cache_head *); |
75 | char **bpp, int *blen); | 84 | |
76 | int (*cache_parse)(struct cache_detail *, | 85 | int (*cache_parse)(struct cache_detail *, |
77 | char *buf, int len); | 86 | char *buf, int len); |
78 | 87 | ||
79 | int (*cache_show)(struct seq_file *m, | 88 | int (*cache_show)(struct seq_file *m, |
80 | struct cache_detail *cd, | 89 | struct cache_detail *cd, |
81 | struct cache_head *h); | 90 | struct cache_head *h); |
91 | void (*warn_no_listener)(struct cache_detail *cd, | ||
92 | int has_died); | ||
82 | 93 | ||
83 | struct cache_head * (*alloc)(void); | 94 | struct cache_head * (*alloc)(void); |
84 | int (*match)(struct cache_head *orig, struct cache_head *new); | 95 | int (*match)(struct cache_head *orig, struct cache_head *new); |
@@ -96,13 +107,15 @@ struct cache_detail { | |||
96 | 107 | ||
97 | /* fields for communication over channel */ | 108 | /* fields for communication over channel */ |
98 | struct list_head queue; | 109 | struct list_head queue; |
99 | struct proc_dir_entry *proc_ent; | ||
100 | struct proc_dir_entry *flush_ent, *channel_ent, *content_ent; | ||
101 | 110 | ||
102 | atomic_t readers; /* how many time is /chennel open */ | 111 | atomic_t readers; /* how many time is /chennel open */ |
103 | time_t last_close; /* if no readers, when did last close */ | 112 | time_t last_close; /* if no readers, when did last close */ |
104 | time_t last_warn; /* when we last warned about no readers */ | 113 | time_t last_warn; /* when we last warned about no readers */ |
105 | void (*warn_no_listener)(struct cache_detail *cd); | 114 | |
115 | union { | ||
116 | struct cache_detail_procfs procfs; | ||
117 | struct cache_detail_pipefs pipefs; | ||
118 | } u; | ||
106 | }; | 119 | }; |
107 | 120 | ||
108 | 121 | ||
@@ -127,6 +140,10 @@ struct cache_deferred_req { | |||
127 | }; | 140 | }; |
128 | 141 | ||
129 | 142 | ||
143 | extern const struct file_operations cache_file_operations_pipefs; | ||
144 | extern const struct file_operations content_file_operations_pipefs; | ||
145 | extern const struct file_operations cache_flush_operations_pipefs; | ||
146 | |||
130 | extern struct cache_head * | 147 | extern struct cache_head * |
131 | sunrpc_cache_lookup(struct cache_detail *detail, | 148 | sunrpc_cache_lookup(struct cache_detail *detail, |
132 | struct cache_head *key, int hash); | 149 | struct cache_head *key, int hash); |
@@ -134,6 +151,13 @@ extern struct cache_head * | |||
134 | sunrpc_cache_update(struct cache_detail *detail, | 151 | sunrpc_cache_update(struct cache_detail *detail, |
135 | struct cache_head *new, struct cache_head *old, int hash); | 152 | struct cache_head *new, struct cache_head *old, int hash); |
136 | 153 | ||
154 | extern int | ||
155 | sunrpc_cache_pipe_upcall(struct cache_detail *detail, struct cache_head *h, | ||
156 | void (*cache_request)(struct cache_detail *, | ||
157 | struct cache_head *, | ||
158 | char **, | ||
159 | int *)); | ||
160 | |||
137 | 161 | ||
138 | extern void cache_clean_deferred(void *owner); | 162 | extern void cache_clean_deferred(void *owner); |
139 | 163 | ||
@@ -171,6 +195,10 @@ extern void cache_purge(struct cache_detail *detail); | |||
171 | extern int cache_register(struct cache_detail *cd); | 195 | extern int cache_register(struct cache_detail *cd); |
172 | extern void cache_unregister(struct cache_detail *cd); | 196 | extern void cache_unregister(struct cache_detail *cd); |
173 | 197 | ||
198 | extern int sunrpc_cache_register_pipefs(struct dentry *parent, const char *, | ||
199 | mode_t, struct cache_detail *); | ||
200 | extern void sunrpc_cache_unregister_pipefs(struct cache_detail *); | ||
201 | |||
174 | extern void qword_add(char **bpp, int *lp, char *str); | 202 | extern void qword_add(char **bpp, int *lp, char *str); |
175 | extern void qword_addhex(char **bpp, int *lp, char *buf, int blen); | 203 | extern void qword_addhex(char **bpp, int *lp, char *buf, int blen); |
176 | extern int qword_get(char **bpp, char *dest, int bufsize); | 204 | extern int qword_get(char **bpp, char *dest, int bufsize); |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 37881f1a0bd..ab3f6e90caa 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -9,6 +9,10 @@ | |||
9 | #ifndef _LINUX_SUNRPC_CLNT_H | 9 | #ifndef _LINUX_SUNRPC_CLNT_H |
10 | #define _LINUX_SUNRPC_CLNT_H | 10 | #define _LINUX_SUNRPC_CLNT_H |
11 | 11 | ||
12 | #include <linux/socket.h> | ||
13 | #include <linux/in.h> | ||
14 | #include <linux/in6.h> | ||
15 | |||
12 | #include <linux/sunrpc/msg_prot.h> | 16 | #include <linux/sunrpc/msg_prot.h> |
13 | #include <linux/sunrpc/sched.h> | 17 | #include <linux/sunrpc/sched.h> |
14 | #include <linux/sunrpc/xprt.h> | 18 | #include <linux/sunrpc/xprt.h> |
@@ -17,6 +21,7 @@ | |||
17 | #include <linux/sunrpc/xdr.h> | 21 | #include <linux/sunrpc/xdr.h> |
18 | #include <linux/sunrpc/timer.h> | 22 | #include <linux/sunrpc/timer.h> |
19 | #include <asm/signal.h> | 23 | #include <asm/signal.h> |
24 | #include <linux/path.h> | ||
20 | 25 | ||
21 | struct rpc_inode; | 26 | struct rpc_inode; |
22 | 27 | ||
@@ -50,9 +55,7 @@ struct rpc_clnt { | |||
50 | 55 | ||
51 | int cl_nodelen; /* nodename length */ | 56 | int cl_nodelen; /* nodename length */ |
52 | char cl_nodename[UNX_MAXNODENAME]; | 57 | char cl_nodename[UNX_MAXNODENAME]; |
53 | char cl_pathname[30];/* Path in rpc_pipe_fs */ | 58 | struct path cl_path; |
54 | struct vfsmount * cl_vfsmnt; | ||
55 | struct dentry * cl_dentry; /* inode */ | ||
56 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ | 59 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ |
57 | struct rpc_rtt cl_rtt_default; | 60 | struct rpc_rtt cl_rtt_default; |
58 | struct rpc_timeout cl_timeout_default; | 61 | struct rpc_timeout cl_timeout_default; |
@@ -151,5 +154,39 @@ void rpc_force_rebind(struct rpc_clnt *); | |||
151 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | 154 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); |
152 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | 155 | const char *rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); |
153 | 156 | ||
157 | size_t rpc_ntop(const struct sockaddr *, char *, const size_t); | ||
158 | size_t rpc_pton(const char *, const size_t, | ||
159 | struct sockaddr *, const size_t); | ||
160 | char * rpc_sockaddr2uaddr(const struct sockaddr *); | ||
161 | size_t rpc_uaddr2sockaddr(const char *, const size_t, | ||
162 | struct sockaddr *, const size_t); | ||
163 | |||
164 | static inline unsigned short rpc_get_port(const struct sockaddr *sap) | ||
165 | { | ||
166 | switch (sap->sa_family) { | ||
167 | case AF_INET: | ||
168 | return ntohs(((struct sockaddr_in *)sap)->sin_port); | ||
169 | case AF_INET6: | ||
170 | return ntohs(((struct sockaddr_in6 *)sap)->sin6_port); | ||
171 | } | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static inline void rpc_set_port(struct sockaddr *sap, | ||
176 | const unsigned short port) | ||
177 | { | ||
178 | switch (sap->sa_family) { | ||
179 | case AF_INET: | ||
180 | ((struct sockaddr_in *)sap)->sin_port = htons(port); | ||
181 | break; | ||
182 | case AF_INET6: | ||
183 | ((struct sockaddr_in6 *)sap)->sin6_port = htons(port); | ||
184 | break; | ||
185 | } | ||
186 | } | ||
187 | |||
188 | #define IPV6_SCOPE_DELIMITER '%' | ||
189 | #define IPV6_SCOPE_ID_LEN sizeof("%nnnnnnnnnn") | ||
190 | |||
154 | #endif /* __KERNEL__ */ | 191 | #endif /* __KERNEL__ */ |
155 | #endif /* _LINUX_SUNRPC_CLNT_H */ | 192 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
diff --git a/include/linux/sunrpc/msg_prot.h b/include/linux/sunrpc/msg_prot.h index 70df4f1d884..77e62488339 100644 --- a/include/linux/sunrpc/msg_prot.h +++ b/include/linux/sunrpc/msg_prot.h | |||
@@ -189,7 +189,22 @@ typedef __be32 rpc_fraghdr; | |||
189 | * Additionally, the two alternative forms specified in Section 2.2 of | 189 | * Additionally, the two alternative forms specified in Section 2.2 of |
190 | * [RFC2373] are also acceptable. | 190 | * [RFC2373] are also acceptable. |
191 | */ | 191 | */ |
192 | #define RPCBIND_MAXUADDRLEN (56u) | 192 | |
193 | #include <linux/inet.h> | ||
194 | |||
195 | /* Maximum size of the port number part of a universal address */ | ||
196 | #define RPCBIND_MAXUADDRPLEN sizeof(".255.255") | ||
197 | |||
198 | /* Maximum size of an IPv4 universal address */ | ||
199 | #define RPCBIND_MAXUADDR4LEN \ | ||
200 | (INET_ADDRSTRLEN + RPCBIND_MAXUADDRPLEN) | ||
201 | |||
202 | /* Maximum size of an IPv6 universal address */ | ||
203 | #define RPCBIND_MAXUADDR6LEN \ | ||
204 | (INET6_ADDRSTRLEN + RPCBIND_MAXUADDRPLEN) | ||
205 | |||
206 | /* Assume INET6_ADDRSTRLEN will always be larger than INET_ADDRSTRLEN... */ | ||
207 | #define RPCBIND_MAXUADDRLEN RPCBIND_MAXUADDR6LEN | ||
193 | 208 | ||
194 | #endif /* __KERNEL__ */ | 209 | #endif /* __KERNEL__ */ |
195 | #endif /* _LINUX_SUNRPC_MSGPROT_H_ */ | 210 | #endif /* _LINUX_SUNRPC_MSGPROT_H_ */ |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index cea764c2359..cf14db975da 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/workqueue.h> | ||
7 | |||
6 | struct rpc_pipe_msg { | 8 | struct rpc_pipe_msg { |
7 | struct list_head list; | 9 | struct list_head list; |
8 | void *data; | 10 | void *data; |
@@ -32,8 +34,8 @@ struct rpc_inode { | |||
32 | wait_queue_head_t waitq; | 34 | wait_queue_head_t waitq; |
33 | #define RPC_PIPE_WAIT_FOR_OPEN 1 | 35 | #define RPC_PIPE_WAIT_FOR_OPEN 1 |
34 | int flags; | 36 | int flags; |
35 | struct rpc_pipe_ops *ops; | ||
36 | struct delayed_work queue_timeout; | 37 | struct delayed_work queue_timeout; |
38 | const struct rpc_pipe_ops *ops; | ||
37 | }; | 39 | }; |
38 | 40 | ||
39 | static inline struct rpc_inode * | 41 | static inline struct rpc_inode * |
@@ -44,9 +46,19 @@ RPC_I(struct inode *inode) | |||
44 | 46 | ||
45 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | 47 | extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); |
46 | 48 | ||
47 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); | 49 | struct rpc_clnt; |
48 | extern int rpc_rmdir(struct dentry *); | 50 | extern struct dentry *rpc_create_client_dir(struct dentry *, struct qstr *, struct rpc_clnt *); |
49 | extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, struct rpc_pipe_ops *, int flags); | 51 | extern int rpc_remove_client_dir(struct dentry *); |
52 | |||
53 | struct cache_detail; | ||
54 | extern struct dentry *rpc_create_cache_dir(struct dentry *, | ||
55 | struct qstr *, | ||
56 | mode_t umode, | ||
57 | struct cache_detail *); | ||
58 | extern void rpc_remove_cache_dir(struct dentry *); | ||
59 | |||
60 | extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, | ||
61 | const struct rpc_pipe_ops *, int flags); | ||
50 | extern int rpc_unlink(struct dentry *); | 62 | extern int rpc_unlink(struct dentry *); |
51 | extern struct vfsmount *rpc_get_mount(void); | 63 | extern struct vfsmount *rpc_get_mount(void); |
52 | extern void rpc_put_mount(void); | 64 | extern void rpc_put_mount(void); |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index d8910b68e1b..7da466ba4b0 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/uio.h> | 12 | #include <linux/uio.h> |
13 | #include <asm/byteorder.h> | 13 | #include <asm/byteorder.h> |
14 | #include <linux/scatterlist.h> | 14 | #include <linux/scatterlist.h> |
15 | #include <linux/smp_lock.h> | ||
16 | 15 | ||
17 | /* | 16 | /* |
18 | * Buffer adjustment | 17 | * Buffer adjustment |
@@ -118,17 +117,15 @@ static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int le | |||
118 | static inline __be32 * | 117 | static inline __be32 * |
119 | xdr_encode_hyper(__be32 *p, __u64 val) | 118 | xdr_encode_hyper(__be32 *p, __u64 val) |
120 | { | 119 | { |
121 | *p++ = htonl(val >> 32); | 120 | *(__be64 *)p = cpu_to_be64(val); |
122 | *p++ = htonl(val & 0xFFFFFFFF); | 121 | return p + 2; |
123 | return p; | ||
124 | } | 122 | } |
125 | 123 | ||
126 | static inline __be32 * | 124 | static inline __be32 * |
127 | xdr_decode_hyper(__be32 *p, __u64 *valp) | 125 | xdr_decode_hyper(__be32 *p, __u64 *valp) |
128 | { | 126 | { |
129 | *valp = ((__u64) ntohl(*p++)) << 32; | 127 | *valp = be64_to_cpup((__be64 *)p); |
130 | *valp |= ntohl(*p++); | 128 | return p + 2; |
131 | return p; | ||
132 | } | 129 | } |
133 | 130 | ||
134 | /* | 131 | /* |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 1175d58efc2..c090df44257 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -38,10 +38,8 @@ enum rpc_display_format_t { | |||
38 | RPC_DISPLAY_ADDR = 0, | 38 | RPC_DISPLAY_ADDR = 0, |
39 | RPC_DISPLAY_PORT, | 39 | RPC_DISPLAY_PORT, |
40 | RPC_DISPLAY_PROTO, | 40 | RPC_DISPLAY_PROTO, |
41 | RPC_DISPLAY_ALL, | ||
42 | RPC_DISPLAY_HEX_ADDR, | 41 | RPC_DISPLAY_HEX_ADDR, |
43 | RPC_DISPLAY_HEX_PORT, | 42 | RPC_DISPLAY_HEX_PORT, |
44 | RPC_DISPLAY_UNIVERSAL_ADDR, | ||
45 | RPC_DISPLAY_NETID, | 43 | RPC_DISPLAY_NETID, |
46 | RPC_DISPLAY_MAX, | 44 | RPC_DISPLAY_MAX, |
47 | }; | 45 | }; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index fa4242cdade..80de7003d8c 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -321,6 +321,8 @@ asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese, | |||
321 | siginfo_t __user *uinfo, | 321 | siginfo_t __user *uinfo, |
322 | const struct timespec __user *uts, | 322 | const struct timespec __user *uts, |
323 | size_t sigsetsize); | 323 | size_t sigsetsize); |
324 | asmlinkage long sys_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, | ||
325 | siginfo_t __user *uinfo); | ||
324 | asmlinkage long sys_kill(int pid, int sig); | 326 | asmlinkage long sys_kill(int pid, int sig); |
325 | asmlinkage long sys_tgkill(int tgid, int pid, int sig); | 327 | asmlinkage long sys_tgkill(int tgid, int pid, int sig); |
326 | asmlinkage long sys_tkill(int pid, int sig); | 328 | asmlinkage long sys_tkill(int pid, int sig); |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 98a1d8cfb73..99adcdc0d3c 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef _LINUX_SYSRQ_H | 14 | #ifndef _LINUX_SYSRQ_H |
15 | #define _LINUX_SYSRQ_H | 15 | #define _LINUX_SYSRQ_H |
16 | 16 | ||
17 | #include <linux/errno.h> | ||
18 | |||
17 | struct pt_regs; | 19 | struct pt_regs; |
18 | struct tty_struct; | 20 | struct tty_struct; |
19 | 21 | ||
diff --git a/include/linux/timer.h b/include/linux/timer.h index ccf882eed8f..be62ec2ebea 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -190,6 +190,8 @@ extern unsigned long get_next_timer_interrupt(unsigned long now); | |||
190 | */ | 190 | */ |
191 | #ifdef CONFIG_TIMER_STATS | 191 | #ifdef CONFIG_TIMER_STATS |
192 | 192 | ||
193 | extern int timer_stats_active; | ||
194 | |||
193 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 | 195 | #define TIMER_STATS_FLAG_DEFERRABLE 0x1 |
194 | 196 | ||
195 | extern void init_timer_stats(void); | 197 | extern void init_timer_stats(void); |
@@ -203,6 +205,8 @@ extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | |||
203 | 205 | ||
204 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | 206 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) |
205 | { | 207 | { |
208 | if (likely(!timer_stats_active)) | ||
209 | return; | ||
206 | __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); | 210 | __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); |
207 | } | 211 | } |
208 | 212 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index 1488d8c81aa..e8c6c9136c9 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 40f38d89677..0c4ee9b88f8 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/uio.h b/include/linux/uio.h index b7fe13883bd..98c114323a8 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/usb.h b/include/linux/usb.h index 84929e91403..b1e3c2fbfe1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -888,8 +888,6 @@ struct usb_driver { | |||
888 | * struct usb_device_driver - identifies USB device driver to usbcore | 888 | * struct usb_device_driver - identifies USB device driver to usbcore |
889 | * @name: The driver name should be unique among USB drivers, | 889 | * @name: The driver name should be unique among USB drivers, |
890 | * and should normally be the same as the module name. | 890 | * and should normally be the same as the module name. |
891 | * @nodename: Callback to provide a naming hint for a possible | ||
892 | * device node to create. | ||
893 | * @probe: Called to see if the driver is willing to manage a particular | 891 | * @probe: Called to see if the driver is willing to manage a particular |
894 | * device. If it is, probe returns zero and uses dev_set_drvdata() | 892 | * device. If it is, probe returns zero and uses dev_set_drvdata() |
895 | * to associate driver-specific data with the device. If unwilling | 893 | * to associate driver-specific data with the device. If unwilling |
@@ -924,6 +922,8 @@ extern struct bus_type usb_bus_type; | |||
924 | /** | 922 | /** |
925 | * struct usb_class_driver - identifies a USB driver that wants to use the USB major number | 923 | * struct usb_class_driver - identifies a USB driver that wants to use the USB major number |
926 | * @name: the usb class device name for this driver. Will show up in sysfs. | 924 | * @name: the usb class device name for this driver. Will show up in sysfs. |
925 | * @nodename: Callback to provide a naming hint for a possible | ||
926 | * device node to create. | ||
927 | * @fops: pointer to the struct file_operations of this driver. | 927 | * @fops: pointer to the struct file_operations of this driver. |
928 | * @minor_base: the start of the minor range for this driver. | 928 | * @minor_base: the start of the minor range for this driver. |
929 | * | 929 | * |
@@ -1046,6 +1046,8 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1046 | * the device driver is saying that it provided this DMA address, | 1046 | * the device driver is saying that it provided this DMA address, |
1047 | * which the host controller driver should use in preference to the | 1047 | * which the host controller driver should use in preference to the |
1048 | * transfer_buffer. | 1048 | * transfer_buffer. |
1049 | * @sg: scatter gather buffer list | ||
1050 | * @num_sgs: number of entries in the sg list | ||
1049 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may | 1051 | * @transfer_buffer_length: How big is transfer_buffer. The transfer may |
1050 | * be broken up into chunks according to the current maximum packet | 1052 | * be broken up into chunks according to the current maximum packet |
1051 | * size for the endpoint, which is a function of the configuration | 1053 | * size for the endpoint, which is a function of the configuration |
diff --git a/include/linux/usb/langwell_otg.h b/include/linux/usb/langwell_otg.h deleted file mode 100644 index e115ae6df1d..00000000000 --- a/include/linux/usb/langwell_otg.h +++ /dev/null | |||
@@ -1,177 +0,0 @@ | |||
1 | /* | ||
2 | * Intel Langwell USB OTG transceiver driver | ||
3 | * Copyright (C) 2008, Intel Corporation. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms and conditions of the GNU General Public License, | ||
7 | * version 2, as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
12 | * more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __LANGWELL_OTG_H__ | ||
21 | #define __LANGWELL_OTG_H__ | ||
22 | |||
23 | /* notify transceiver driver about OTG events */ | ||
24 | extern void langwell_update_transceiver(void); | ||
25 | /* HCD register bus driver */ | ||
26 | extern int langwell_register_host(struct pci_driver *host_driver); | ||
27 | /* HCD unregister bus driver */ | ||
28 | extern void langwell_unregister_host(struct pci_driver *host_driver); | ||
29 | /* DCD register bus driver */ | ||
30 | extern int langwell_register_peripheral(struct pci_driver *client_driver); | ||
31 | /* DCD unregister bus driver */ | ||
32 | extern void langwell_unregister_peripheral(struct pci_driver *client_driver); | ||
33 | /* No silent failure, output warning message */ | ||
34 | extern void langwell_otg_nsf_msg(unsigned long message); | ||
35 | |||
36 | #define CI_USBCMD 0x30 | ||
37 | # define USBCMD_RST BIT(1) | ||
38 | # define USBCMD_RS BIT(0) | ||
39 | #define CI_USBSTS 0x34 | ||
40 | # define USBSTS_SLI BIT(8) | ||
41 | # define USBSTS_URI BIT(6) | ||
42 | # define USBSTS_PCI BIT(2) | ||
43 | #define CI_PORTSC1 0x74 | ||
44 | # define PORTSC_PP BIT(12) | ||
45 | # define PORTSC_LS (BIT(11) | BIT(10)) | ||
46 | # define PORTSC_SUSP BIT(7) | ||
47 | # define PORTSC_CCS BIT(0) | ||
48 | #define CI_HOSTPC1 0xb4 | ||
49 | # define HOSTPC1_PHCD BIT(22) | ||
50 | #define CI_OTGSC 0xf4 | ||
51 | # define OTGSC_DPIE BIT(30) | ||
52 | # define OTGSC_1MSE BIT(29) | ||
53 | # define OTGSC_BSEIE BIT(28) | ||
54 | # define OTGSC_BSVIE BIT(27) | ||
55 | # define OTGSC_ASVIE BIT(26) | ||
56 | # define OTGSC_AVVIE BIT(25) | ||
57 | # define OTGSC_IDIE BIT(24) | ||
58 | # define OTGSC_DPIS BIT(22) | ||
59 | # define OTGSC_1MSS BIT(21) | ||
60 | # define OTGSC_BSEIS BIT(20) | ||
61 | # define OTGSC_BSVIS BIT(19) | ||
62 | # define OTGSC_ASVIS BIT(18) | ||
63 | # define OTGSC_AVVIS BIT(17) | ||
64 | # define OTGSC_IDIS BIT(16) | ||
65 | # define OTGSC_DPS BIT(14) | ||
66 | # define OTGSC_1MST BIT(13) | ||
67 | # define OTGSC_BSE BIT(12) | ||
68 | # define OTGSC_BSV BIT(11) | ||
69 | # define OTGSC_ASV BIT(10) | ||
70 | # define OTGSC_AVV BIT(9) | ||
71 | # define OTGSC_ID BIT(8) | ||
72 | # define OTGSC_HABA BIT(7) | ||
73 | # define OTGSC_HADP BIT(6) | ||
74 | # define OTGSC_IDPU BIT(5) | ||
75 | # define OTGSC_DP BIT(4) | ||
76 | # define OTGSC_OT BIT(3) | ||
77 | # define OTGSC_HAAR BIT(2) | ||
78 | # define OTGSC_VC BIT(1) | ||
79 | # define OTGSC_VD BIT(0) | ||
80 | # define OTGSC_INTEN_MASK (0x7f << 24) | ||
81 | # define OTGSC_INTSTS_MASK (0x7f << 16) | ||
82 | #define CI_USBMODE 0xf8 | ||
83 | # define USBMODE_CM (BIT(1) | BIT(0)) | ||
84 | # define USBMODE_IDLE 0 | ||
85 | # define USBMODE_DEVICE 0x2 | ||
86 | # define USBMODE_HOST 0x3 | ||
87 | |||
88 | #define INTR_DUMMY_MASK (USBSTS_SLI | USBSTS_URI | USBSTS_PCI) | ||
89 | |||
90 | struct otg_hsm { | ||
91 | /* Input */ | ||
92 | int a_bus_resume; | ||
93 | int a_bus_suspend; | ||
94 | int a_conn; | ||
95 | int a_sess_vld; | ||
96 | int a_srp_det; | ||
97 | int a_vbus_vld; | ||
98 | int b_bus_resume; | ||
99 | int b_bus_suspend; | ||
100 | int b_conn; | ||
101 | int b_se0_srp; | ||
102 | int b_sess_end; | ||
103 | int b_sess_vld; | ||
104 | int id; | ||
105 | |||
106 | /* Internal variables */ | ||
107 | int a_set_b_hnp_en; | ||
108 | int b_srp_done; | ||
109 | int b_hnp_enable; | ||
110 | |||
111 | /* Timeout indicator for timers */ | ||
112 | int a_wait_vrise_tmout; | ||
113 | int a_wait_bcon_tmout; | ||
114 | int a_aidl_bdis_tmout; | ||
115 | int b_ase0_brst_tmout; | ||
116 | int b_bus_suspend_tmout; | ||
117 | int b_srp_res_tmout; | ||
118 | |||
119 | /* Informative variables */ | ||
120 | int a_bus_drop; | ||
121 | int a_bus_req; | ||
122 | int a_clr_err; | ||
123 | int a_suspend_req; | ||
124 | int b_bus_req; | ||
125 | |||
126 | /* Output */ | ||
127 | int drv_vbus; | ||
128 | int loc_conn; | ||
129 | int loc_sof; | ||
130 | |||
131 | /* Others */ | ||
132 | int b_bus_suspend_vld; | ||
133 | }; | ||
134 | |||
135 | #define TA_WAIT_VRISE 100 | ||
136 | #define TA_WAIT_BCON 30000 | ||
137 | #define TA_AIDL_BDIS 15000 | ||
138 | #define TB_ASE0_BRST 5000 | ||
139 | #define TB_SE0_SRP 2 | ||
140 | #define TB_SRP_RES 100 | ||
141 | #define TB_BUS_SUSPEND 500 | ||
142 | |||
143 | struct langwell_otg_timer { | ||
144 | unsigned long expires; /* Number of count increase to timeout */ | ||
145 | unsigned long count; /* Tick counter */ | ||
146 | void (*function)(unsigned long); /* Timeout function */ | ||
147 | unsigned long data; /* Data passed to function */ | ||
148 | struct list_head list; | ||
149 | }; | ||
150 | |||
151 | struct langwell_otg { | ||
152 | struct otg_transceiver otg; | ||
153 | struct otg_hsm hsm; | ||
154 | void __iomem *regs; | ||
155 | unsigned region; | ||
156 | struct pci_driver *host_ops; | ||
157 | struct pci_driver *client_ops; | ||
158 | struct pci_dev *pdev; | ||
159 | struct work_struct work; | ||
160 | struct workqueue_struct *qwork; | ||
161 | spinlock_t lock; | ||
162 | spinlock_t wq_lock; | ||
163 | }; | ||
164 | |||
165 | static inline struct langwell_otg *otg_to_langwell(struct otg_transceiver *otg) | ||
166 | { | ||
167 | return container_of(otg, struct langwell_otg, otg); | ||
168 | } | ||
169 | |||
170 | #ifdef DEBUG | ||
171 | #define otg_dbg(fmt, args...) \ | ||
172 | printk(KERN_DEBUG fmt , ## args) | ||
173 | #else | ||
174 | #define otg_dbg(fmt, args...) \ | ||
175 | do { } while (0) | ||
176 | #endif /* DEBUG */ | ||
177 | #endif /* __LANGWELL_OTG_H__ */ | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 44801d26a37..0ec50ba6213 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -317,7 +317,8 @@ extern int usb_serial_generic_register(int debug); | |||
317 | extern void usb_serial_generic_deregister(void); | 317 | extern void usb_serial_generic_deregister(void); |
318 | extern void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port, | 318 | extern void usb_serial_generic_resubmit_read_urb(struct usb_serial_port *port, |
319 | gfp_t mem_flags); | 319 | gfp_t mem_flags); |
320 | extern int usb_serial_handle_sysrq_char(struct usb_serial_port *port, | 320 | extern int usb_serial_handle_sysrq_char(struct tty_struct *tty, |
321 | struct usb_serial_port *port, | ||
321 | unsigned int ch); | 322 | unsigned int ch); |
322 | extern int usb_serial_handle_break(struct usb_serial_port *port); | 323 | extern int usb_serial_handle_break(struct usb_serial_port *port); |
323 | 324 | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 5d44059f6d6..310e18a880f 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -42,7 +42,6 @@ struct usbnet { | |||
42 | 42 | ||
43 | /* protocol/interface state */ | 43 | /* protocol/interface state */ |
44 | struct net_device *net; | 44 | struct net_device *net; |
45 | struct net_device_stats stats; | ||
46 | int msg_enable; | 45 | int msg_enable; |
47 | unsigned long data [5]; | 46 | unsigned long data [5]; |
48 | u32 xid; | 47 | u32 xid; |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 8a025d51090..74f16876f38 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -318,6 +318,8 @@ struct v4l2_pix_format { | |||
318 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 318 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
319 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | 319 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ |
320 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ | 320 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ |
321 | #define V4L2_PIX_FMT_SGRBG8 v4l2_fourcc('G', 'R', 'B', 'G') /* 8 GRGR.. BGBG.. */ | ||
322 | |||
321 | /* | 323 | /* |
322 | * 10bit raw bayer, expanded to 16 bits | 324 | * 10bit raw bayer, expanded to 16 bits |
323 | * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... | 325 | * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... |
@@ -336,6 +338,7 @@ struct v4l2_pix_format { | |||
336 | /* Vendor-specific formats */ | 338 | /* Vendor-specific formats */ |
337 | #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 */ |
338 | #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 */ | ||
339 | #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 */ |
340 | #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 */ |
341 | #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 be7d255fc7c..8dab9f2b883 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 99f514575f6..e547e3c8ee9 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 cec79adbe3e..d8dd539c9f4 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -27,11 +27,11 @@ | |||
27 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ | 27 | #define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */ |
28 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ | 28 | #define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */ |
29 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ | 29 | #define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */ |
30 | #define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */ | ||
30 | 31 | ||
31 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ | 32 | #define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ |
32 | 33 | ||
33 | struct virtio_net_config | 34 | struct virtio_net_config { |
34 | { | ||
35 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ | 35 | /* The config defining mac address (if VIRTIO_NET_F_MAC) */ |
36 | __u8 mac[6]; | 36 | __u8 mac[6]; |
37 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ | 37 | /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ |
@@ -40,8 +40,7 @@ struct virtio_net_config | |||
40 | 40 | ||
41 | /* 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 |
42 | * specify GSO or CSUM features, you can simply ignore the header. */ | 42 | * specify GSO or CSUM features, you can simply ignore the header. */ |
43 | struct virtio_net_hdr | 43 | struct virtio_net_hdr { |
44 | { | ||
45 | #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 |
46 | __u8 flags; | 45 | __u8 flags; |
47 | #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame | 46 | #define VIRTIO_NET_HDR_GSO_NONE 0 // Not a GSO frame |
@@ -81,14 +80,19 @@ typedef __u8 virtio_net_ctrl_ack; | |||
81 | #define VIRTIO_NET_ERR 1 | 80 | #define VIRTIO_NET_ERR 1 |
82 | 81 | ||
83 | /* | 82 | /* |
84 | * Control the RX mode, ie. promisucous and allmulti. PROMISC and | 83 | * Control the RX mode, ie. promisucous, allmulti, etc... |
85 | * ALLMULTI commands require an "out" sg entry containing a 1 byte | 84 | * All commands require an "out" sg entry containing a 1 byte |
86 | * state value, zero = disable, non-zero = enable. These commands | 85 | * state value, zero = disable, non-zero = enable. Commands |
87 | * are supported with the VIRTIO_NET_F_CTRL_RX feature. | 86 | * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature. |
87 | * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA. | ||
88 | */ | 88 | */ |
89 | #define VIRTIO_NET_CTRL_RX 0 | 89 | #define VIRTIO_NET_CTRL_RX 0 |
90 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 | 90 | #define VIRTIO_NET_CTRL_RX_PROMISC 0 |
91 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 | 91 | #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 |
92 | #define VIRTIO_NET_CTRL_RX_ALLUNI 2 | ||
93 | #define VIRTIO_NET_CTRL_RX_NOMULTI 3 | ||
94 | #define VIRTIO_NET_CTRL_RX_NOUNI 4 | ||
95 | #define VIRTIO_NET_CTRL_RX_NOBCAST 5 | ||
92 | 96 | ||
93 | /* | 97 | /* |
94 | * Control the MAC filter table. | 98 | * Control the MAC filter table. |
diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index 693e0ec5afa..e4d144b132b 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 6788e1a4d4c..cf3c2f5dba5 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 4d7e2272c42..94e908c0d7a 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, |
@@ -155,9 +159,15 @@ enum { | |||
155 | /* module cafe_ccic, just ident 8801 */ | 159 | /* module cafe_ccic, just ident 8801 */ |
156 | V4L2_IDENT_CAFE = 8801, | 160 | V4L2_IDENT_CAFE = 8801, |
157 | 161 | ||
162 | /* module mt9v011, just ident 8243 */ | ||
163 | V4L2_IDENT_MT9V011 = 8243, | ||
164 | |||
158 | /* module tw9910: just ident 9910 */ | 165 | /* module tw9910: just ident 9910 */ |
159 | V4L2_IDENT_TW9910 = 9910, | 166 | V4L2_IDENT_TW9910 = 9910, |
160 | 167 | ||
168 | /* module sn9c20x: just ident 10000 */ | ||
169 | V4L2_IDENT_SN9C20X = 10000, | ||
170 | |||
161 | /* module msp3400: reserved range 34000-34999 and 44000-44999 */ | 171 | /* module msp3400: reserved range 34000-34999 and 44000-44999 */ |
162 | V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only | 172 | V4L2_IDENT_MSPX4XX = 34000, /* generic MSPX4XX identifier, only |
163 | use internally (tveeprom.c). */ | 173 | use internally (tveeprom.c). */ |
@@ -234,6 +244,11 @@ enum { | |||
234 | V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ | 244 | V4L2_IDENT_MT9V022IX7ATC = 45010, /* No way to detect "normal" I77ATx */ |
235 | V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ | 245 | V4L2_IDENT_MT9V022IX7ATM = 45015, /* and "lead free" IA7ATx chips */ |
236 | 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, | ||
237 | 252 | ||
238 | /* module cs53132a: just ident 53132 */ | 253 | /* module cs53132a: just ident 53132 */ |
239 | V4L2_IDENT_CS53l32A = 53132, | 254 | V4L2_IDENT_CS53l32A = 53132, |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 80072611d26..c274993234e 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 1a21895b732..d1892d66701 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/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index a632689b61b..cbdd6284996 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -258,8 +258,8 @@ static inline bool nf_ct_kill(struct nf_conn *ct) | |||
258 | /* Update TCP window tracking data when NAT mangles the packet */ | 258 | /* Update TCP window tracking data when NAT mangles the packet */ |
259 | extern void nf_conntrack_tcp_update(const struct sk_buff *skb, | 259 | extern void nf_conntrack_tcp_update(const struct sk_buff *skb, |
260 | unsigned int dataoff, | 260 | unsigned int dataoff, |
261 | struct nf_conn *ct, | 261 | struct nf_conn *ct, int dir, |
262 | int dir); | 262 | s16 offset); |
263 | 263 | ||
264 | /* Fake conntrack entry for untracked connections */ | 264 | /* Fake conntrack entry for untracked connections */ |
265 | extern struct nf_conn nf_conntrack_untracked; | 265 | extern struct nf_conn nf_conntrack_untracked; |
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h index 5054dc5ea2c..29d12673661 100644 --- a/include/net/phonet/pn_dev.h +++ b/include/net/phonet/pn_dev.h | |||
@@ -45,6 +45,7 @@ int phonet_address_add(struct net_device *dev, u8 addr); | |||
45 | int phonet_address_del(struct net_device *dev, u8 addr); | 45 | int phonet_address_del(struct net_device *dev, u8 addr); |
46 | u8 phonet_address_get(struct net_device *dev, u8 addr); | 46 | u8 phonet_address_get(struct net_device *dev, u8 addr); |
47 | int phonet_address_lookup(struct net *net, u8 addr); | 47 | int phonet_address_lookup(struct net *net, u8 addr); |
48 | void phonet_address_notify(int event, struct net_device *dev, u8 addr); | ||
48 | 49 | ||
49 | #define PN_NO_ADDR 0xff | 50 | #define PN_NO_ADDR 0xff |
50 | 51 | ||
diff --git a/include/net/rose.h b/include/net/rose.h index cbd5364b2c8..5ba9f02731e 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/sock.h b/include/net/sock.h index 352f06bbd7a..950409dcec3 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -54,6 +54,7 @@ | |||
54 | 54 | ||
55 | #include <linux/filter.h> | 55 | #include <linux/filter.h> |
56 | #include <linux/rculist_nulls.h> | 56 | #include <linux/rculist_nulls.h> |
57 | #include <linux/poll.h> | ||
57 | 58 | ||
58 | #include <asm/atomic.h> | 59 | #include <asm/atomic.h> |
59 | #include <net/dst.h> | 60 | #include <net/dst.h> |
@@ -103,15 +104,15 @@ struct net; | |||
103 | 104 | ||
104 | /** | 105 | /** |
105 | * struct sock_common - minimal network layer representation of sockets | 106 | * struct sock_common - minimal network layer representation of sockets |
107 | * @skc_node: main hash linkage for various protocol lookup tables | ||
108 | * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol | ||
109 | * @skc_refcnt: reference count | ||
110 | * @skc_hash: hash value used with various protocol lookup tables | ||
106 | * @skc_family: network address family | 111 | * @skc_family: network address family |
107 | * @skc_state: Connection state | 112 | * @skc_state: Connection state |
108 | * @skc_reuse: %SO_REUSEADDR setting | 113 | * @skc_reuse: %SO_REUSEADDR setting |
109 | * @skc_bound_dev_if: bound device index if != 0 | 114 | * @skc_bound_dev_if: bound device index if != 0 |
110 | * @skc_node: main hash linkage for various protocol lookup tables | ||
111 | * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol | ||
112 | * @skc_bind_node: bind hash linkage for various protocol lookup tables | 115 | * @skc_bind_node: bind hash linkage for various protocol lookup tables |
113 | * @skc_refcnt: reference count | ||
114 | * @skc_hash: hash value used with various protocol lookup tables | ||
115 | * @skc_prot: protocol handlers inside a network family | 116 | * @skc_prot: protocol handlers inside a network family |
116 | * @skc_net: reference to the network namespace of this socket | 117 | * @skc_net: reference to the network namespace of this socket |
117 | * | 118 | * |
@@ -119,17 +120,21 @@ struct net; | |||
119 | * for struct sock and struct inet_timewait_sock. | 120 | * for struct sock and struct inet_timewait_sock. |
120 | */ | 121 | */ |
121 | struct sock_common { | 122 | struct sock_common { |
122 | unsigned short skc_family; | 123 | /* |
123 | volatile unsigned char skc_state; | 124 | * first fields are not copied in sock_copy() |
124 | unsigned char skc_reuse; | 125 | */ |
125 | int skc_bound_dev_if; | ||
126 | union { | 126 | union { |
127 | struct hlist_node skc_node; | 127 | struct hlist_node skc_node; |
128 | struct hlist_nulls_node skc_nulls_node; | 128 | struct hlist_nulls_node skc_nulls_node; |
129 | }; | 129 | }; |
130 | struct hlist_node skc_bind_node; | ||
131 | atomic_t skc_refcnt; | 130 | atomic_t skc_refcnt; |
131 | |||
132 | unsigned int skc_hash; | 132 | unsigned int skc_hash; |
133 | unsigned short skc_family; | ||
134 | volatile unsigned char skc_state; | ||
135 | unsigned char skc_reuse; | ||
136 | int skc_bound_dev_if; | ||
137 | struct hlist_node skc_bind_node; | ||
133 | struct proto *skc_prot; | 138 | struct proto *skc_prot; |
134 | #ifdef CONFIG_NET_NS | 139 | #ifdef CONFIG_NET_NS |
135 | struct net *skc_net; | 140 | struct net *skc_net; |
@@ -207,15 +212,17 @@ struct sock { | |||
207 | * don't add nothing before this first member (__sk_common) --acme | 212 | * don't add nothing before this first member (__sk_common) --acme |
208 | */ | 213 | */ |
209 | struct sock_common __sk_common; | 214 | struct sock_common __sk_common; |
215 | #define sk_node __sk_common.skc_node | ||
216 | #define sk_nulls_node __sk_common.skc_nulls_node | ||
217 | #define sk_refcnt __sk_common.skc_refcnt | ||
218 | |||
219 | #define sk_copy_start __sk_common.skc_hash | ||
220 | #define sk_hash __sk_common.skc_hash | ||
210 | #define sk_family __sk_common.skc_family | 221 | #define sk_family __sk_common.skc_family |
211 | #define sk_state __sk_common.skc_state | 222 | #define sk_state __sk_common.skc_state |
212 | #define sk_reuse __sk_common.skc_reuse | 223 | #define sk_reuse __sk_common.skc_reuse |
213 | #define sk_bound_dev_if __sk_common.skc_bound_dev_if | 224 | #define sk_bound_dev_if __sk_common.skc_bound_dev_if |
214 | #define sk_node __sk_common.skc_node | ||
215 | #define sk_nulls_node __sk_common.skc_nulls_node | ||
216 | #define sk_bind_node __sk_common.skc_bind_node | 225 | #define sk_bind_node __sk_common.skc_bind_node |
217 | #define sk_refcnt __sk_common.skc_refcnt | ||
218 | #define sk_hash __sk_common.skc_hash | ||
219 | #define sk_prot __sk_common.skc_prot | 226 | #define sk_prot __sk_common.skc_prot |
220 | #define sk_net __sk_common.skc_net | 227 | #define sk_net __sk_common.skc_net |
221 | kmemcheck_bitfield_begin(flags); | 228 | kmemcheck_bitfield_begin(flags); |
@@ -1241,6 +1248,74 @@ static inline int sk_has_allocations(const struct sock *sk) | |||
1241 | return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk); | 1248 | return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk); |
1242 | } | 1249 | } |
1243 | 1250 | ||
1251 | /** | ||
1252 | * sk_has_sleeper - check if there are any waiting processes | ||
1253 | * @sk: socket | ||
1254 | * | ||
1255 | * Returns true if socket has waiting processes | ||
1256 | * | ||
1257 | * The purpose of the sk_has_sleeper and sock_poll_wait is to wrap the memory | ||
1258 | * barrier call. They were added due to the race found within the tcp code. | ||
1259 | * | ||
1260 | * Consider following tcp code paths: | ||
1261 | * | ||
1262 | * CPU1 CPU2 | ||
1263 | * | ||
1264 | * sys_select receive packet | ||
1265 | * ... ... | ||
1266 | * __add_wait_queue update tp->rcv_nxt | ||
1267 | * ... ... | ||
1268 | * tp->rcv_nxt check sock_def_readable | ||
1269 | * ... { | ||
1270 | * schedule ... | ||
1271 | * if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) | ||
1272 | * wake_up_interruptible(sk->sk_sleep) | ||
1273 | * ... | ||
1274 | * } | ||
1275 | * | ||
1276 | * The race for tcp fires when the __add_wait_queue changes done by CPU1 stay | ||
1277 | * in its cache, and so does the tp->rcv_nxt update on CPU2 side. The CPU1 | ||
1278 | * could then endup calling schedule and sleep forever if there are no more | ||
1279 | * data on the socket. | ||
1280 | * | ||
1281 | * The sk_has_sleeper is always called right after a call to read_lock, so we | ||
1282 | * can use smp_mb__after_lock barrier. | ||
1283 | */ | ||
1284 | static inline int sk_has_sleeper(struct sock *sk) | ||
1285 | { | ||
1286 | /* | ||
1287 | * We need to be sure we are in sync with the | ||
1288 | * add_wait_queue modifications to the wait queue. | ||
1289 | * | ||
1290 | * This memory barrier is paired in the sock_poll_wait. | ||
1291 | */ | ||
1292 | smp_mb__after_lock(); | ||
1293 | return sk->sk_sleep && waitqueue_active(sk->sk_sleep); | ||
1294 | } | ||
1295 | |||
1296 | /** | ||
1297 | * sock_poll_wait - place memory barrier behind the poll_wait call. | ||
1298 | * @filp: file | ||
1299 | * @wait_address: socket wait queue | ||
1300 | * @p: poll_table | ||
1301 | * | ||
1302 | * See the comments in the sk_has_sleeper function. | ||
1303 | */ | ||
1304 | static inline void sock_poll_wait(struct file *filp, | ||
1305 | wait_queue_head_t *wait_address, poll_table *p) | ||
1306 | { | ||
1307 | if (p && wait_address) { | ||
1308 | poll_wait(filp, wait_address, p); | ||
1309 | /* | ||
1310 | * We need to be sure we are in sync with the | ||
1311 | * socket flags modification. | ||
1312 | * | ||
1313 | * This memory barrier is paired in the sk_has_sleeper. | ||
1314 | */ | ||
1315 | smp_mb(); | ||
1316 | } | ||
1317 | } | ||
1318 | |||
1244 | /* | 1319 | /* |
1245 | * Queue a received datagram if it will fit. Stream and sequenced | 1320 | * Queue a received datagram if it will fit. Stream and sequenced |
1246 | * protocols can't normally use this as they need to fit buffers in | 1321 | * protocols can't normally use this as they need to fit buffers in |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 19f4150f4d4..88af8430647 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1425,6 +1425,11 @@ struct tcp_request_sock_ops { | |||
1425 | #ifdef CONFIG_TCP_MD5SIG | 1425 | #ifdef CONFIG_TCP_MD5SIG |
1426 | struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, | 1426 | struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, |
1427 | struct request_sock *req); | 1427 | struct request_sock *req); |
1428 | int (*calc_md5_hash) (char *location, | ||
1429 | struct tcp_md5sig_key *md5, | ||
1430 | struct sock *sk, | ||
1431 | struct request_sock *req, | ||
1432 | struct sk_buff *skb); | ||
1428 | #endif | 1433 | #endif |
1429 | }; | 1434 | }; |
1430 | 1435 | ||
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index d6b05f42dd4..9a74b468a22 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM block | ||
3 | |||
1 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_BLOCK_H | 5 | #define _TRACE_BLOCK_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM block | ||
10 | |||
11 | TRACE_EVENT(block_rq_abort, | 11 | TRACE_EVENT(block_rq_abort, |
12 | 12 | ||
13 | TP_PROTO(struct request_queue *q, struct request *rq), | 13 | TP_PROTO(struct request_queue *q, struct request *rq), |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index acf4cc9cd36..7d8b5bc7418 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -1,9 +1,9 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | 1 | #undef TRACE_SYSTEM |
5 | #define TRACE_SYSTEM ext4 | 2 | #define TRACE_SYSTEM ext4 |
6 | 3 | ||
4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_EXT4_H | ||
6 | |||
7 | #include <linux/writeback.h> | 7 | #include <linux/writeback.h> |
8 | #include "../../../fs/ext4/ext4.h" | 8 | #include "../../../fs/ext4/ext4.h" |
9 | #include "../../../fs/ext4/mballoc.h" | 9 | #include "../../../fs/ext4/mballoc.h" |
@@ -34,7 +34,8 @@ TRACE_EVENT(ext4_free_inode, | |||
34 | 34 | ||
35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", | 35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", |
36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, | 36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, |
37 | __entry->uid, __entry->gid, __entry->blocks) | 37 | __entry->uid, __entry->gid, |
38 | (unsigned long long) __entry->blocks) | ||
38 | ); | 39 | ); |
39 | 40 | ||
40 | TRACE_EVENT(ext4_request_inode, | 41 | TRACE_EVENT(ext4_request_inode, |
@@ -189,7 +190,7 @@ TRACE_EVENT(ext4_journalled_write_end, | |||
189 | __entry->copied) | 190 | __entry->copied) |
190 | ); | 191 | ); |
191 | 192 | ||
192 | TRACE_EVENT(ext4_da_writepage, | 193 | TRACE_EVENT(ext4_writepage, |
193 | TP_PROTO(struct inode *inode, struct page *page), | 194 | TP_PROTO(struct inode *inode, struct page *page), |
194 | 195 | ||
195 | TP_ARGS(inode, page), | 196 | TP_ARGS(inode, page), |
@@ -341,49 +342,6 @@ TRACE_EVENT(ext4_da_write_end, | |||
341 | __entry->copied) | 342 | __entry->copied) |
342 | ); | 343 | ); |
343 | 344 | ||
344 | TRACE_EVENT(ext4_normal_writepage, | ||
345 | TP_PROTO(struct inode *inode, struct page *page), | ||
346 | |||
347 | TP_ARGS(inode, page), | ||
348 | |||
349 | TP_STRUCT__entry( | ||
350 | __field( dev_t, dev ) | ||
351 | __field( ino_t, ino ) | ||
352 | __field( pgoff_t, index ) | ||
353 | ), | ||
354 | |||
355 | TP_fast_assign( | ||
356 | __entry->dev = inode->i_sb->s_dev; | ||
357 | __entry->ino = inode->i_ino; | ||
358 | __entry->index = page->index; | ||
359 | ), | ||
360 | |||
361 | TP_printk("dev %s ino %lu page_index %lu", | ||
362 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
363 | ); | ||
364 | |||
365 | TRACE_EVENT(ext4_journalled_writepage, | ||
366 | TP_PROTO(struct inode *inode, struct page *page), | ||
367 | |||
368 | TP_ARGS(inode, page), | ||
369 | |||
370 | TP_STRUCT__entry( | ||
371 | __field( dev_t, dev ) | ||
372 | __field( ino_t, ino ) | ||
373 | __field( pgoff_t, index ) | ||
374 | |||
375 | ), | ||
376 | |||
377 | TP_fast_assign( | ||
378 | __entry->dev = inode->i_sb->s_dev; | ||
379 | __entry->ino = inode->i_ino; | ||
380 | __entry->index = page->index; | ||
381 | ), | ||
382 | |||
383 | TP_printk("dev %s ino %lu page_index %lu", | ||
384 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
385 | ); | ||
386 | |||
387 | TRACE_EVENT(ext4_discard_blocks, | 345 | TRACE_EVENT(ext4_discard_blocks, |
388 | TP_PROTO(struct super_block *sb, unsigned long long blk, | 346 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
389 | unsigned long long count), | 347 | unsigned long long count), |
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index b0c7ede55eb..1cb0c3aa11e 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM irq | ||
3 | |||
1 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_IRQ_H | 5 | #define _TRACE_IRQ_H |
3 | 6 | ||
4 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
5 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM irq | ||
9 | |||
10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } | 10 | #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } |
11 | #define show_softirq_name(val) \ | 11 | #define show_softirq_name(val) \ |
12 | __print_symbolic(val, \ | 12 | __print_symbolic(val, \ |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 845b0b4b48f..10813fa0c8d 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM jbd2 | ||
3 | |||
1 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_JBD2_H | 5 | #define _TRACE_JBD2_H |
3 | 6 | ||
4 | #include <linux/jbd2.h> | 7 | #include <linux/jbd2.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM jbd2 | ||
9 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | 10 | TRACE_EVENT(jbd2_checkpoint, |
11 | 11 | ||
12 | TP_PROTO(journal_t *journal, int result), | 12 | TP_PROTO(journal_t *journal, int result), |
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 9baba50d651..1493c541f9c 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM kmem | ||
3 | |||
1 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_KMEM_H | 5 | #define _TRACE_KMEM_H |
3 | 6 | ||
4 | #include <linux/types.h> | 7 | #include <linux/types.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM kmem | ||
9 | |||
10 | /* | 10 | /* |
11 | * The order of these masks is important. Matching masks will be seen | 11 | * The order of these masks is important. Matching masks will be seen |
12 | * first and the left over flags will end up showing by themselves. | 12 | * first and the left over flags will end up showing by themselves. |
diff --git a/include/trace/events/lockdep.h b/include/trace/events/lockdep.h index 0e956c9dfd7..bcf1d209a00 100644 --- a/include/trace/events/lockdep.h +++ b/include/trace/events/lockdep.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM lockdep | ||
3 | |||
1 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_LOCKDEP_H | 5 | #define _TRACE_LOCKDEP_H |
3 | 6 | ||
4 | #include <linux/lockdep.h> | 7 | #include <linux/lockdep.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM lockdep | ||
9 | |||
10 | #ifdef CONFIG_LOCKDEP | 10 | #ifdef CONFIG_LOCKDEP |
11 | 11 | ||
12 | TRACE_EVENT(lock_acquire, | 12 | TRACE_EVENT(lock_acquire, |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 24ab5bcff7b..8949bb7eb08 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM sched | ||
3 | |||
1 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SCHED_H | 5 | #define _TRACE_SCHED_H |
3 | 6 | ||
4 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM sched | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for calling kthread_stop, performed to end a kthread: | 11 | * Tracepoint for calling kthread_stop, performed to end a kthread: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h index 1e8fabb57c0..e499863b966 100644 --- a/include/trace/events/skb.h +++ b/include/trace/events/skb.h | |||
@@ -1,12 +1,12 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM skb | ||
3 | |||
1 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_SKB_H | 5 | #define _TRACE_SKB_H |
3 | 6 | ||
4 | #include <linux/skbuff.h> | 7 | #include <linux/skbuff.h> |
5 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
6 | 9 | ||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM skb | ||
9 | |||
10 | /* | 10 | /* |
11 | * Tracepoint for free an sk_buff: | 11 | * Tracepoint for free an sk_buff: |
12 | */ | 12 | */ |
diff --git a/include/trace/events/workqueue.h b/include/trace/events/workqueue.h index 035f1bff288..fcfd9a1e4b9 100644 --- a/include/trace/events/workqueue.h +++ b/include/trace/events/workqueue.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM workqueue | ||
3 | |||
1 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) | 4 | #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) |
2 | #define _TRACE_WORKQUEUE_H | 5 | #define _TRACE_WORKQUEUE_H |
3 | 6 | ||
@@ -5,9 +8,6 @@ | |||
5 | #include <linux/sched.h> | 8 | #include <linux/sched.h> |
6 | #include <linux/tracepoint.h> | 9 | #include <linux/tracepoint.h> |
7 | 10 | ||
8 | #undef TRACE_SYSTEM | ||
9 | #define TRACE_SYSTEM workqueue | ||
10 | |||
11 | TRACE_EVENT(workqueue_insertion, | 11 | TRACE_EVENT(workqueue_insertion, |
12 | 12 | ||
13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), | 13 | TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 1867553c61e..f64fbaae781 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 | ||