diff options
Diffstat (limited to 'include')
73 files changed, 2201 insertions, 903 deletions
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h new file mode 100644 index 000000000000..5406a601185c --- /dev/null +++ b/include/asm-generic/dma-mapping-common.h | |||
@@ -0,0 +1,190 @@ | |||
1 | #ifndef _ASM_GENERIC_DMA_MAPPING_H | ||
2 | #define _ASM_GENERIC_DMA_MAPPING_H | ||
3 | |||
4 | #include <linux/kmemcheck.h> | ||
5 | #include <linux/scatterlist.h> | ||
6 | #include <linux/dma-debug.h> | ||
7 | #include <linux/dma-attrs.h> | ||
8 | |||
9 | static inline dma_addr_t dma_map_single_attrs(struct device *dev, void *ptr, | ||
10 | size_t size, | ||
11 | enum dma_data_direction dir, | ||
12 | struct dma_attrs *attrs) | ||
13 | { | ||
14 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
15 | dma_addr_t addr; | ||
16 | |||
17 | kmemcheck_mark_initialized(ptr, size); | ||
18 | BUG_ON(!valid_dma_direction(dir)); | ||
19 | addr = ops->map_page(dev, virt_to_page(ptr), | ||
20 | (unsigned long)ptr & ~PAGE_MASK, size, | ||
21 | dir, attrs); | ||
22 | debug_dma_map_page(dev, virt_to_page(ptr), | ||
23 | (unsigned long)ptr & ~PAGE_MASK, size, | ||
24 | dir, addr, true); | ||
25 | return addr; | ||
26 | } | ||
27 | |||
28 | static inline void dma_unmap_single_attrs(struct device *dev, dma_addr_t addr, | ||
29 | size_t size, | ||
30 | enum dma_data_direction dir, | ||
31 | struct dma_attrs *attrs) | ||
32 | { | ||
33 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
34 | |||
35 | BUG_ON(!valid_dma_direction(dir)); | ||
36 | if (ops->unmap_page) | ||
37 | ops->unmap_page(dev, addr, size, dir, attrs); | ||
38 | debug_dma_unmap_page(dev, addr, size, dir, true); | ||
39 | } | ||
40 | |||
41 | static inline int dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, | ||
42 | int nents, enum dma_data_direction dir, | ||
43 | struct dma_attrs *attrs) | ||
44 | { | ||
45 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
46 | int i, ents; | ||
47 | struct scatterlist *s; | ||
48 | |||
49 | for_each_sg(sg, s, nents, i) | ||
50 | kmemcheck_mark_initialized(sg_virt(s), s->length); | ||
51 | BUG_ON(!valid_dma_direction(dir)); | ||
52 | ents = ops->map_sg(dev, sg, nents, dir, attrs); | ||
53 | debug_dma_map_sg(dev, sg, nents, ents, dir); | ||
54 | |||
55 | return ents; | ||
56 | } | ||
57 | |||
58 | static inline void dma_unmap_sg_attrs(struct device *dev, struct scatterlist *sg, | ||
59 | int nents, enum dma_data_direction dir, | ||
60 | struct dma_attrs *attrs) | ||
61 | { | ||
62 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
63 | |||
64 | BUG_ON(!valid_dma_direction(dir)); | ||
65 | debug_dma_unmap_sg(dev, sg, nents, dir); | ||
66 | if (ops->unmap_sg) | ||
67 | ops->unmap_sg(dev, sg, nents, dir, attrs); | ||
68 | } | ||
69 | |||
70 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, | ||
71 | size_t offset, size_t size, | ||
72 | enum dma_data_direction dir) | ||
73 | { | ||
74 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
75 | dma_addr_t addr; | ||
76 | |||
77 | kmemcheck_mark_initialized(page_address(page) + offset, size); | ||
78 | BUG_ON(!valid_dma_direction(dir)); | ||
79 | addr = ops->map_page(dev, page, offset, size, dir, NULL); | ||
80 | debug_dma_map_page(dev, page, offset, size, dir, addr, false); | ||
81 | |||
82 | return addr; | ||
83 | } | ||
84 | |||
85 | static inline void dma_unmap_page(struct device *dev, dma_addr_t addr, | ||
86 | size_t size, enum dma_data_direction dir) | ||
87 | { | ||
88 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
89 | |||
90 | BUG_ON(!valid_dma_direction(dir)); | ||
91 | if (ops->unmap_page) | ||
92 | ops->unmap_page(dev, addr, size, dir, NULL); | ||
93 | debug_dma_unmap_page(dev, addr, size, dir, false); | ||
94 | } | ||
95 | |||
96 | static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, | ||
97 | size_t size, | ||
98 | enum dma_data_direction dir) | ||
99 | { | ||
100 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
101 | |||
102 | BUG_ON(!valid_dma_direction(dir)); | ||
103 | if (ops->sync_single_for_cpu) | ||
104 | ops->sync_single_for_cpu(dev, addr, size, dir); | ||
105 | debug_dma_sync_single_for_cpu(dev, addr, size, dir); | ||
106 | flush_write_buffers(); | ||
107 | } | ||
108 | |||
109 | static inline void dma_sync_single_for_device(struct device *dev, | ||
110 | dma_addr_t addr, size_t size, | ||
111 | enum dma_data_direction dir) | ||
112 | { | ||
113 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
114 | |||
115 | BUG_ON(!valid_dma_direction(dir)); | ||
116 | if (ops->sync_single_for_device) | ||
117 | ops->sync_single_for_device(dev, addr, size, dir); | ||
118 | debug_dma_sync_single_for_device(dev, addr, size, dir); | ||
119 | flush_write_buffers(); | ||
120 | } | ||
121 | |||
122 | static inline void dma_sync_single_range_for_cpu(struct device *dev, | ||
123 | dma_addr_t addr, | ||
124 | unsigned long offset, | ||
125 | size_t size, | ||
126 | enum dma_data_direction dir) | ||
127 | { | ||
128 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
129 | |||
130 | BUG_ON(!valid_dma_direction(dir)); | ||
131 | if (ops->sync_single_range_for_cpu) { | ||
132 | ops->sync_single_range_for_cpu(dev, addr, offset, size, dir); | ||
133 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); | ||
134 | |||
135 | flush_write_buffers(); | ||
136 | } else | ||
137 | dma_sync_single_for_cpu(dev, addr, size, dir); | ||
138 | } | ||
139 | |||
140 | static inline void dma_sync_single_range_for_device(struct device *dev, | ||
141 | dma_addr_t addr, | ||
142 | unsigned long offset, | ||
143 | size_t size, | ||
144 | enum dma_data_direction dir) | ||
145 | { | ||
146 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
147 | |||
148 | BUG_ON(!valid_dma_direction(dir)); | ||
149 | if (ops->sync_single_range_for_device) { | ||
150 | ops->sync_single_range_for_device(dev, addr, offset, size, dir); | ||
151 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); | ||
152 | |||
153 | flush_write_buffers(); | ||
154 | } else | ||
155 | dma_sync_single_for_device(dev, addr, size, dir); | ||
156 | } | ||
157 | |||
158 | static inline void | ||
159 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | ||
160 | int nelems, enum dma_data_direction dir) | ||
161 | { | ||
162 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
163 | |||
164 | BUG_ON(!valid_dma_direction(dir)); | ||
165 | if (ops->sync_sg_for_cpu) | ||
166 | ops->sync_sg_for_cpu(dev, sg, nelems, dir); | ||
167 | debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir); | ||
168 | flush_write_buffers(); | ||
169 | } | ||
170 | |||
171 | static inline void | ||
172 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | ||
173 | int nelems, enum dma_data_direction dir) | ||
174 | { | ||
175 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
176 | |||
177 | BUG_ON(!valid_dma_direction(dir)); | ||
178 | if (ops->sync_sg_for_device) | ||
179 | ops->sync_sg_for_device(dev, sg, nelems, dir); | ||
180 | debug_dma_sync_sg_for_device(dev, sg, nelems, dir); | ||
181 | |||
182 | flush_write_buffers(); | ||
183 | } | ||
184 | |||
185 | #define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL) | ||
186 | #define dma_unmap_single(d, a, s, r) dma_unmap_single_attrs(d, a, s, r, NULL) | ||
187 | #define dma_map_sg(d, s, n, r) dma_map_sg_attrs(d, s, n, r, NULL) | ||
188 | #define dma_unmap_sg(d, s, n, r) dma_unmap_sg_attrs(d, s, n, r, NULL) | ||
189 | |||
190 | #endif | ||
diff --git a/include/asm-generic/kmap_types.h b/include/asm-generic/kmap_types.h index 54e8b3d956b7..eddbce0f9fb9 100644 --- a/include/asm-generic/kmap_types.h +++ b/include/asm-generic/kmap_types.h | |||
@@ -24,7 +24,10 @@ D(12) KM_SOFTIRQ1, | |||
24 | D(13) KM_SYNC_ICACHE, | 24 | D(13) KM_SYNC_ICACHE, |
25 | D(14) KM_SYNC_DCACHE, | 25 | D(14) KM_SYNC_DCACHE, |
26 | D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ | 26 | D(15) KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */ |
27 | D(16) KM_TYPE_NR | 27 | D(16) KM_IRQ_PTE, |
28 | D(17) KM_NMI, | ||
29 | D(18) KM_NMI_PTE, | ||
30 | D(19) KM_TYPE_NR | ||
28 | }; | 31 | }; |
29 | 32 | ||
30 | #undef D | 33 | #undef D |
diff --git a/include/asm-generic/pci.h b/include/asm-generic/pci.h index 515c6e2e3218..b4326b5466eb 100644 --- a/include/asm-generic/pci.h +++ b/include/asm-generic/pci.h | |||
@@ -30,19 +30,6 @@ pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | |||
30 | res->end = region->end; | 30 | res->end = region->end; |
31 | } | 31 | } |
32 | 32 | ||
33 | static inline struct resource * | ||
34 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
35 | { | ||
36 | struct resource *root = NULL; | ||
37 | |||
38 | if (res->flags & IORESOURCE_IO) | ||
39 | root = &ioport_resource; | ||
40 | if (res->flags & IORESOURCE_MEM) | ||
41 | root = &iomem_resource; | ||
42 | |||
43 | return root; | ||
44 | } | ||
45 | |||
46 | #define pcibios_scan_all_fns(a, b) 0 | 33 | #define pcibios_scan_all_fns(a, b) 0 |
47 | 34 | ||
48 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ | 35 | #ifndef HAVE_ARCH_PCI_GET_LEGACY_IDE_IRQ |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 4ce48e878530..d083561337f2 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -14,6 +14,9 @@ extern char __kprobes_text_start[], __kprobes_text_end[]; | |||
14 | extern char __initdata_begin[], __initdata_end[]; | 14 | extern char __initdata_begin[], __initdata_end[]; |
15 | extern char __start_rodata[], __end_rodata[]; | 15 | extern char __start_rodata[], __end_rodata[]; |
16 | 16 | ||
17 | /* Start and end of .ctors section - used for constructor calls. */ | ||
18 | extern char __ctors_start[], __ctors_end[]; | ||
19 | |||
17 | /* function descriptor handling (if any). Override | 20 | /* function descriptor handling (if any). Override |
18 | * in asm/sections.h */ | 21 | * in asm/sections.h */ |
19 | #ifndef dereference_function_descriptor | 22 | #ifndef dereference_function_descriptor |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 6bdba10fef4a..55413e568f07 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -440,12 +440,21 @@ | |||
440 | INIT_TASK \ | 440 | INIT_TASK \ |
441 | } | 441 | } |
442 | 442 | ||
443 | #ifdef CONFIG_CONSTRUCTORS | ||
444 | #define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \ | ||
445 | *(.ctors) \ | ||
446 | VMLINUX_SYMBOL(__ctors_end) = .; | ||
447 | #else | ||
448 | #define KERNEL_CTORS() | ||
449 | #endif | ||
450 | |||
443 | /* init and exit section handling */ | 451 | /* init and exit section handling */ |
444 | #define INIT_DATA \ | 452 | #define INIT_DATA \ |
445 | *(.init.data) \ | 453 | *(.init.data) \ |
446 | DEV_DISCARD(init.data) \ | 454 | DEV_DISCARD(init.data) \ |
447 | CPU_DISCARD(init.data) \ | 455 | CPU_DISCARD(init.data) \ |
448 | MEM_DISCARD(init.data) \ | 456 | MEM_DISCARD(init.data) \ |
457 | KERNEL_CTORS() \ | ||
449 | *(.init.rodata) \ | 458 | *(.init.rodata) \ |
450 | DEV_DISCARD(init.rodata) \ | 459 | DEV_DISCARD(init.rodata) \ |
451 | CPU_DISCARD(init.rodata) \ | 460 | CPU_DISCARD(init.rodata) \ |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index d4ddc22e46bb..45b67d9c39c1 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -34,9 +34,6 @@ | |||
34 | #ifndef _DRM_P_H_ | 34 | #ifndef _DRM_P_H_ |
35 | #define _DRM_P_H_ | 35 | #define _DRM_P_H_ |
36 | 36 | ||
37 | /* If you want the memory alloc debug functionality, change define below */ | ||
38 | /* #define DEBUG_MEMORY */ | ||
39 | |||
40 | #ifdef __KERNEL__ | 37 | #ifdef __KERNEL__ |
41 | #ifdef __alpha__ | 38 | #ifdef __alpha__ |
42 | /* add include of current.h so that "current" is defined | 39 | /* add include of current.h so that "current" is defined |
@@ -133,31 +130,6 @@ extern void drm_ut_debug_printk(unsigned int request_level, | |||
133 | 130 | ||
134 | #define DRM_FLAG_DEBUG 0x01 | 131 | #define DRM_FLAG_DEBUG 0x01 |
135 | 132 | ||
136 | #define DRM_MEM_DMA 0 | ||
137 | #define DRM_MEM_SAREA 1 | ||
138 | #define DRM_MEM_DRIVER 2 | ||
139 | #define DRM_MEM_MAGIC 3 | ||
140 | #define DRM_MEM_IOCTLS 4 | ||
141 | #define DRM_MEM_MAPS 5 | ||
142 | #define DRM_MEM_VMAS 6 | ||
143 | #define DRM_MEM_BUFS 7 | ||
144 | #define DRM_MEM_SEGS 8 | ||
145 | #define DRM_MEM_PAGES 9 | ||
146 | #define DRM_MEM_FILES 10 | ||
147 | #define DRM_MEM_QUEUES 11 | ||
148 | #define DRM_MEM_CMDS 12 | ||
149 | #define DRM_MEM_MAPPINGS 13 | ||
150 | #define DRM_MEM_BUFLISTS 14 | ||
151 | #define DRM_MEM_AGPLISTS 15 | ||
152 | #define DRM_MEM_TOTALAGP 16 | ||
153 | #define DRM_MEM_BOUNDAGP 17 | ||
154 | #define DRM_MEM_CTXBITMAP 18 | ||
155 | #define DRM_MEM_STUB 19 | ||
156 | #define DRM_MEM_SGLISTS 20 | ||
157 | #define DRM_MEM_CTXLIST 21 | ||
158 | #define DRM_MEM_MM 22 | ||
159 | #define DRM_MEM_HASHTAB 23 | ||
160 | |||
161 | #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) | 133 | #define DRM_MAX_CTXBITMAP (PAGE_SIZE * 8) |
162 | #define DRM_MAP_HASH_OFFSET 0x10000000 | 134 | #define DRM_MAP_HASH_OFFSET 0x10000000 |
163 | 135 | ||
@@ -1517,24 +1489,6 @@ static __inline__ void drm_core_dropmap(struct drm_local_map *map) | |||
1517 | { | 1489 | { |
1518 | } | 1490 | } |
1519 | 1491 | ||
1520 | #ifndef DEBUG_MEMORY | ||
1521 | /** Wrapper around kmalloc() */ | ||
1522 | static __inline__ void *drm_alloc(size_t size, int area) | ||
1523 | { | ||
1524 | return kmalloc(size, GFP_KERNEL); | ||
1525 | } | ||
1526 | |||
1527 | /** Wrapper around kfree() */ | ||
1528 | static __inline__ void drm_free(void *pt, size_t size, int area) | ||
1529 | { | ||
1530 | kfree(pt); | ||
1531 | } | ||
1532 | |||
1533 | /** Wrapper around kcalloc() */ | ||
1534 | static __inline__ void *drm_calloc(size_t nmemb, size_t size, int area) | ||
1535 | { | ||
1536 | return kcalloc(nmemb, size, GFP_KERNEL); | ||
1537 | } | ||
1538 | 1492 | ||
1539 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) | 1493 | static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) |
1540 | { | 1494 | { |
@@ -1555,12 +1509,6 @@ static __inline void drm_free_large(void *ptr) | |||
1555 | 1509 | ||
1556 | vfree(ptr); | 1510 | vfree(ptr); |
1557 | } | 1511 | } |
1558 | #else | ||
1559 | extern void *drm_alloc(size_t size, int area); | ||
1560 | extern void drm_free(void *pt, size_t size, int area); | ||
1561 | extern void *drm_calloc(size_t nmemb, size_t size, int area); | ||
1562 | #endif | ||
1563 | |||
1564 | /*@}*/ | 1512 | /*@}*/ |
1565 | 1513 | ||
1566 | #endif /* __KERNEL__ */ | 1514 | #endif /* __KERNEL__ */ |
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index a11cc9d32591..c263e4d71754 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -28,53 +28,49 @@ | |||
28 | #define EDID_LENGTH 128 | 28 | #define EDID_LENGTH 128 |
29 | #define DDC_ADDR 0x50 | 29 | #define DDC_ADDR 0x50 |
30 | 30 | ||
31 | #ifdef BIG_ENDIAN | ||
32 | #error "EDID structure is little endian, need big endian versions" | ||
33 | #else | ||
34 | |||
35 | struct est_timings { | 31 | struct est_timings { |
36 | u8 t1; | 32 | u8 t1; |
37 | u8 t2; | 33 | u8 t2; |
38 | u8 mfg_rsvd; | 34 | u8 mfg_rsvd; |
39 | } __attribute__((packed)); | 35 | } __attribute__((packed)); |
40 | 36 | ||
37 | /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ | ||
38 | #define EDID_TIMING_ASPECT_SHIFT 0 | ||
39 | #define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) | ||
40 | |||
41 | /* need to add 60 */ | ||
42 | #define EDID_TIMING_VFREQ_SHIFT 2 | ||
43 | #define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) | ||
44 | |||
41 | struct std_timing { | 45 | struct std_timing { |
42 | u8 hsize; /* need to multiply by 8 then add 248 */ | 46 | u8 hsize; /* need to multiply by 8 then add 248 */ |
43 | u8 vfreq:6; /* need to add 60 */ | 47 | u8 vfreq_aspect; |
44 | u8 aspect_ratio:2; /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ | ||
45 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
46 | 49 | ||
50 | #define DRM_EDID_PT_HSYNC_POSITIVE (1 << 6) | ||
51 | #define DRM_EDID_PT_VSYNC_POSITIVE (1 << 5) | ||
52 | #define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) | ||
53 | #define DRM_EDID_PT_STEREO (1 << 2) | ||
54 | #define DRM_EDID_PT_INTERLACED (1 << 1) | ||
55 | |||
47 | /* If detailed data is pixel timing */ | 56 | /* If detailed data is pixel timing */ |
48 | struct detailed_pixel_timing { | 57 | struct detailed_pixel_timing { |
49 | u8 hactive_lo; | 58 | u8 hactive_lo; |
50 | u8 hblank_lo; | 59 | u8 hblank_lo; |
51 | u8 hblank_hi:4; | 60 | u8 hactive_hblank_hi; |
52 | u8 hactive_hi:4; | ||
53 | u8 vactive_lo; | 61 | u8 vactive_lo; |
54 | u8 vblank_lo; | 62 | u8 vblank_lo; |
55 | u8 vblank_hi:4; | 63 | u8 vactive_vblank_hi; |
56 | u8 vactive_hi:4; | ||
57 | u8 hsync_offset_lo; | 64 | u8 hsync_offset_lo; |
58 | u8 hsync_pulse_width_lo; | 65 | u8 hsync_pulse_width_lo; |
59 | u8 vsync_pulse_width_lo:4; | 66 | u8 vsync_offset_pulse_width_lo; |
60 | u8 vsync_offset_lo:4; | 67 | u8 hsync_vsync_offset_pulse_width_hi; |
61 | u8 vsync_pulse_width_hi:2; | ||
62 | u8 vsync_offset_hi:2; | ||
63 | u8 hsync_pulse_width_hi:2; | ||
64 | u8 hsync_offset_hi:2; | ||
65 | u8 width_mm_lo; | 68 | u8 width_mm_lo; |
66 | u8 height_mm_lo; | 69 | u8 height_mm_lo; |
67 | u8 height_mm_hi:4; | 70 | u8 width_height_mm_hi; |
68 | u8 width_mm_hi:4; | ||
69 | u8 hborder; | 71 | u8 hborder; |
70 | u8 vborder; | 72 | u8 vborder; |
71 | u8 unknown0:1; | 73 | u8 misc; |
72 | u8 hsync_positive:1; | ||
73 | u8 vsync_positive:1; | ||
74 | u8 separate_sync:2; | ||
75 | u8 stereo:1; | ||
76 | u8 unknown6:1; | ||
77 | u8 interlaced:1; | ||
78 | } __attribute__((packed)); | 74 | } __attribute__((packed)); |
79 | 75 | ||
80 | /* If it's not pixel timing, it'll be one of the below */ | 76 | /* If it's not pixel timing, it'll be one of the below */ |
@@ -88,18 +84,16 @@ struct detailed_data_monitor_range { | |||
88 | u8 min_hfreq_khz; | 84 | u8 min_hfreq_khz; |
89 | u8 max_hfreq_khz; | 85 | u8 max_hfreq_khz; |
90 | u8 pixel_clock_mhz; /* need to multiply by 10 */ | 86 | u8 pixel_clock_mhz; /* need to multiply by 10 */ |
91 | u16 sec_gtf_toggle; /* A000=use above, 20=use below */ /* FIXME: byte order */ | 87 | __le16 sec_gtf_toggle; /* A000=use above, 20=use below */ |
92 | u8 hfreq_start_khz; /* need to multiply by 2 */ | 88 | u8 hfreq_start_khz; /* need to multiply by 2 */ |
93 | u8 c; /* need to divide by 2 */ | 89 | u8 c; /* need to divide by 2 */ |
94 | u16 m; /* FIXME: byte order */ | 90 | __le16 m; |
95 | u8 k; | 91 | u8 k; |
96 | u8 j; /* need to divide by 2 */ | 92 | u8 j; /* need to divide by 2 */ |
97 | } __attribute__((packed)); | 93 | } __attribute__((packed)); |
98 | 94 | ||
99 | struct detailed_data_wpindex { | 95 | struct detailed_data_wpindex { |
100 | u8 white_y_lo:2; | 96 | u8 white_xy_lo; /* Upper 2 bits each */ |
101 | u8 white_x_lo:2; | ||
102 | u8 pad:4; | ||
103 | u8 white_x_hi; | 97 | u8 white_x_hi; |
104 | u8 white_y_hi; | 98 | u8 white_y_hi; |
105 | u8 gamma; /* need to divide by 100 then add 1 */ | 99 | u8 gamma; /* need to divide by 100 then add 1 */ |
@@ -134,13 +128,29 @@ struct detailed_non_pixel { | |||
134 | #define EDID_DETAIL_MONITOR_SERIAL 0xff | 128 | #define EDID_DETAIL_MONITOR_SERIAL 0xff |
135 | 129 | ||
136 | struct detailed_timing { | 130 | struct detailed_timing { |
137 | u16 pixel_clock; /* need to multiply by 10 KHz */ /* FIXME: byte order */ | 131 | __le16 pixel_clock; /* need to multiply by 10 KHz */ |
138 | union { | 132 | union { |
139 | struct detailed_pixel_timing pixel_data; | 133 | struct detailed_pixel_timing pixel_data; |
140 | struct detailed_non_pixel other_data; | 134 | struct detailed_non_pixel other_data; |
141 | } data; | 135 | } data; |
142 | } __attribute__((packed)); | 136 | } __attribute__((packed)); |
143 | 137 | ||
138 | #define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 7) | ||
139 | #define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 5) | ||
140 | #define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 4) | ||
141 | #define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) | ||
142 | #define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 2) | ||
143 | #define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 1) | ||
144 | #define DRM_EDID_INPUT_DIGITAL (1 << 0) /* bits above must be zero if set */ | ||
145 | |||
146 | #define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 7) | ||
147 | #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 6) | ||
148 | #define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 5) | ||
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) | ||
151 | #define DRM_EDID_FEATURE_PM_SUSPEND (1 << 1) | ||
152 | #define DRM_EDID_FEATURE_PM_STANDBY (1 << 0) | ||
153 | |||
144 | struct edid { | 154 | struct edid { |
145 | u8 header[8]; | 155 | u8 header[8]; |
146 | /* Vendor & product info */ | 156 | /* Vendor & product info */ |
@@ -153,25 +163,11 @@ struct edid { | |||
153 | u8 version; | 163 | u8 version; |
154 | u8 revision; | 164 | u8 revision; |
155 | /* Display info: */ | 165 | /* Display info: */ |
156 | /* input definition */ | 166 | u8 input; |
157 | u8 serration_vsync:1; | ||
158 | u8 sync_on_green:1; | ||
159 | u8 composite_sync:1; | ||
160 | u8 separate_syncs:1; | ||
161 | u8 blank_to_black:1; | ||
162 | u8 video_level:2; | ||
163 | u8 digital:1; /* bits below must be zero if set */ | ||
164 | u8 width_cm; | 167 | u8 width_cm; |
165 | u8 height_cm; | 168 | u8 height_cm; |
166 | u8 gamma; | 169 | u8 gamma; |
167 | /* feature support */ | 170 | u8 features; |
168 | u8 default_gtf:1; | ||
169 | u8 preferred_timing:1; | ||
170 | u8 standard_color:1; | ||
171 | u8 display_type:2; /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ | ||
172 | u8 pm_active_off:1; | ||
173 | u8 pm_suspend:1; | ||
174 | u8 pm_standby:1; | ||
175 | /* Color characteristics */ | 171 | /* Color characteristics */ |
176 | u8 red_green_lo; | 172 | u8 red_green_lo; |
177 | u8 black_white_lo; | 173 | u8 black_white_lo; |
@@ -195,8 +191,6 @@ struct edid { | |||
195 | u8 checksum; | 191 | u8 checksum; |
196 | } __attribute__((packed)); | 192 | } __attribute__((packed)); |
197 | 193 | ||
198 | #endif /* little endian structs */ | ||
199 | |||
200 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) | 194 | #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8)) |
201 | 195 | ||
202 | #endif /* __DRM_EDID_H__ */ | 196 | #endif /* __DRM_EDID_H__ */ |
diff --git a/include/drm/drm_memory_debug.h b/include/drm/drm_memory_debug.h deleted file mode 100644 index 6463271deea8..000000000000 --- a/include/drm/drm_memory_debug.h +++ /dev/null | |||
@@ -1,309 +0,0 @@ | |||
1 | /** | ||
2 | * \file drm_memory_debug.h | ||
3 | * Memory management wrappers for DRM. | ||
4 | * | ||
5 | * \author Rickard E. (Rik) Faith <faith@valinux.com> | ||
6 | * \author Gareth Hughes <gareth@valinux.com> | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. | ||
11 | * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. | ||
12 | * All Rights Reserved. | ||
13 | * | ||
14 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
15 | * copy of this software and associated documentation files (the "Software"), | ||
16 | * to deal in the Software without restriction, including without limitation | ||
17 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
18 | * and/or sell copies of the Software, and to permit persons to whom the | ||
19 | * Software is furnished to do so, subject to the following conditions: | ||
20 | * | ||
21 | * The above copyright notice and this permission notice (including the next | ||
22 | * paragraph) shall be included in all copies or substantial portions of the | ||
23 | * Software. | ||
24 | * | ||
25 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
26 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
27 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
28 | * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
29 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
30 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
31 | * OTHER DEALINGS IN THE SOFTWARE. | ||
32 | */ | ||
33 | |||
34 | #include "drmP.h" | ||
35 | |||
36 | typedef struct drm_mem_stats { | ||
37 | const char *name; | ||
38 | int succeed_count; | ||
39 | int free_count; | ||
40 | int fail_count; | ||
41 | unsigned long bytes_allocated; | ||
42 | unsigned long bytes_freed; | ||
43 | } drm_mem_stats_t; | ||
44 | |||
45 | static DEFINE_SPINLOCK(drm_mem_lock); | ||
46 | static unsigned long drm_ram_available = 0; /* In pages */ | ||
47 | static unsigned long drm_ram_used = 0; | ||
48 | static drm_mem_stats_t drm_mem_stats[] = | ||
49 | { | ||
50 | [DRM_MEM_DMA] = {"dmabufs"}, | ||
51 | [DRM_MEM_SAREA] = {"sareas"}, | ||
52 | [DRM_MEM_DRIVER] = {"driver"}, | ||
53 | [DRM_MEM_MAGIC] = {"magic"}, | ||
54 | [DRM_MEM_IOCTLS] = {"ioctltab"}, | ||
55 | [DRM_MEM_MAPS] = {"maplist"}, | ||
56 | [DRM_MEM_VMAS] = {"vmalist"}, | ||
57 | [DRM_MEM_BUFS] = {"buflist"}, | ||
58 | [DRM_MEM_SEGS] = {"seglist"}, | ||
59 | [DRM_MEM_PAGES] = {"pagelist"}, | ||
60 | [DRM_MEM_FILES] = {"files"}, | ||
61 | [DRM_MEM_QUEUES] = {"queues"}, | ||
62 | [DRM_MEM_CMDS] = {"commands"}, | ||
63 | [DRM_MEM_MAPPINGS] = {"mappings"}, | ||
64 | [DRM_MEM_BUFLISTS] = {"buflists"}, | ||
65 | [DRM_MEM_AGPLISTS] = {"agplist"}, | ||
66 | [DRM_MEM_SGLISTS] = {"sglist"}, | ||
67 | [DRM_MEM_TOTALAGP] = {"totalagp"}, | ||
68 | [DRM_MEM_BOUNDAGP] = {"boundagp"}, | ||
69 | [DRM_MEM_CTXBITMAP] = {"ctxbitmap"}, | ||
70 | [DRM_MEM_CTXLIST] = {"ctxlist"}, | ||
71 | [DRM_MEM_STUB] = {"stub"}, | ||
72 | {NULL, 0,} /* Last entry must be null */ | ||
73 | }; | ||
74 | |||
75 | void drm_mem_init (void) { | ||
76 | drm_mem_stats_t *mem; | ||
77 | struct sysinfo si; | ||
78 | |||
79 | for (mem = drm_mem_stats; mem->name; ++mem) { | ||
80 | mem->succeed_count = 0; | ||
81 | mem->free_count = 0; | ||
82 | mem->fail_count = 0; | ||
83 | mem->bytes_allocated = 0; | ||
84 | mem->bytes_freed = 0; | ||
85 | } | ||
86 | |||
87 | si_meminfo(&si); | ||
88 | drm_ram_available = si.totalram; | ||
89 | drm_ram_used = 0; | ||
90 | } | ||
91 | |||
92 | /* drm_mem_info is called whenever a process reads /dev/drm/mem. */ | ||
93 | |||
94 | static int drm__mem_info (char *buf, char **start, off_t offset, | ||
95 | int request, int *eof, void *data) { | ||
96 | drm_mem_stats_t *pt; | ||
97 | int len = 0; | ||
98 | |||
99 | if (offset > DRM_PROC_LIMIT) { | ||
100 | *eof = 1; | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | *eof = 0; | ||
105 | *start = &buf[offset]; | ||
106 | |||
107 | DRM_PROC_PRINT(" total counts " | ||
108 | " | outstanding \n"); | ||
109 | DRM_PROC_PRINT("type alloc freed fail bytes freed" | ||
110 | " | allocs bytes\n\n"); | ||
111 | DRM_PROC_PRINT("%-9.9s %5d %5d %4d %10lu kB |\n", | ||
112 | "system", 0, 0, 0, | ||
113 | drm_ram_available << (PAGE_SHIFT - 10)); | ||
114 | DRM_PROC_PRINT("%-9.9s %5d %5d %4d %10lu kB |\n", | ||
115 | "locked", 0, 0, 0, drm_ram_used >> 10); | ||
116 | DRM_PROC_PRINT("\n"); | ||
117 | for (pt = drm_mem_stats; pt->name; pt++) { | ||
118 | DRM_PROC_PRINT("%-9.9s %5d %5d %4d %10lu %10lu | %6d %10ld\n", | ||
119 | pt->name, | ||
120 | pt->succeed_count, | ||
121 | pt->free_count, | ||
122 | pt->fail_count, | ||
123 | pt->bytes_allocated, | ||
124 | pt->bytes_freed, | ||
125 | pt->succeed_count - pt->free_count, | ||
126 | (long)pt->bytes_allocated | ||
127 | - (long)pt->bytes_freed); | ||
128 | } | ||
129 | |||
130 | if (len > request + offset) | ||
131 | return request; | ||
132 | *eof = 1; | ||
133 | return len - offset; | ||
134 | } | ||
135 | |||
136 | int drm_mem_info (char *buf, char **start, off_t offset, | ||
137 | int len, int *eof, void *data) { | ||
138 | int ret; | ||
139 | |||
140 | spin_lock(&drm_mem_lock); | ||
141 | ret = drm__mem_info (buf, start, offset, len, eof, data); | ||
142 | spin_unlock(&drm_mem_lock); | ||
143 | return ret; | ||
144 | } | ||
145 | |||
146 | void *drm_alloc (size_t size, int area) { | ||
147 | void *pt; | ||
148 | |||
149 | if (!size) { | ||
150 | DRM_MEM_ERROR(area, "Allocating 0 bytes\n"); | ||
151 | return NULL; | ||
152 | } | ||
153 | |||
154 | if (!(pt = kmalloc(size, GFP_KERNEL))) { | ||
155 | spin_lock(&drm_mem_lock); | ||
156 | ++drm_mem_stats[area].fail_count; | ||
157 | spin_unlock(&drm_mem_lock); | ||
158 | return NULL; | ||
159 | } | ||
160 | spin_lock(&drm_mem_lock); | ||
161 | ++drm_mem_stats[area].succeed_count; | ||
162 | drm_mem_stats[area].bytes_allocated += size; | ||
163 | spin_unlock(&drm_mem_lock); | ||
164 | return pt; | ||
165 | } | ||
166 | |||
167 | void *drm_calloc (size_t nmemb, size_t size, int area) { | ||
168 | void *addr; | ||
169 | |||
170 | addr = drm_alloc (nmemb * size, area); | ||
171 | if (addr != NULL) | ||
172 | memset((void *)addr, 0, size * nmemb); | ||
173 | |||
174 | return addr; | ||
175 | } | ||
176 | |||
177 | void *drm_realloc (void *oldpt, size_t oldsize, size_t size, int area) { | ||
178 | void *pt; | ||
179 | |||
180 | if (!(pt = drm_alloc (size, area))) | ||
181 | return NULL; | ||
182 | if (oldpt && oldsize) { | ||
183 | memcpy(pt, oldpt, oldsize); | ||
184 | drm_free (oldpt, oldsize, area); | ||
185 | } | ||
186 | return pt; | ||
187 | } | ||
188 | |||
189 | void drm_free (void *pt, size_t size, int area) { | ||
190 | int alloc_count; | ||
191 | int free_count; | ||
192 | |||
193 | if (!pt) | ||
194 | DRM_MEM_ERROR(area, "Attempt to free NULL pointer\n"); | ||
195 | else | ||
196 | kfree(pt); | ||
197 | spin_lock(&drm_mem_lock); | ||
198 | drm_mem_stats[area].bytes_freed += size; | ||
199 | free_count = ++drm_mem_stats[area].free_count; | ||
200 | alloc_count = drm_mem_stats[area].succeed_count; | ||
201 | spin_unlock(&drm_mem_lock); | ||
202 | if (free_count > alloc_count) { | ||
203 | DRM_MEM_ERROR(area, "Excess frees: %d frees, %d allocs\n", | ||
204 | free_count, alloc_count); | ||
205 | } | ||
206 | } | ||
207 | |||
208 | #if __OS_HAS_AGP | ||
209 | |||
210 | DRM_AGP_MEM *drm_alloc_agp (drm_device_t *dev, int pages, u32 type) { | ||
211 | DRM_AGP_MEM *handle; | ||
212 | |||
213 | if (!pages) { | ||
214 | DRM_MEM_ERROR(DRM_MEM_TOTALAGP, "Allocating 0 pages\n"); | ||
215 | return NULL; | ||
216 | } | ||
217 | |||
218 | if ((handle = drm_agp_allocate_memory (pages, type))) { | ||
219 | spin_lock(&drm_mem_lock); | ||
220 | ++drm_mem_stats[DRM_MEM_TOTALAGP].succeed_count; | ||
221 | drm_mem_stats[DRM_MEM_TOTALAGP].bytes_allocated | ||
222 | += pages << PAGE_SHIFT; | ||
223 | spin_unlock(&drm_mem_lock); | ||
224 | return handle; | ||
225 | } | ||
226 | spin_lock(&drm_mem_lock); | ||
227 | ++drm_mem_stats[DRM_MEM_TOTALAGP].fail_count; | ||
228 | spin_unlock(&drm_mem_lock); | ||
229 | return NULL; | ||
230 | } | ||
231 | |||
232 | int drm_free_agp (DRM_AGP_MEM * handle, int pages) { | ||
233 | int alloc_count; | ||
234 | int free_count; | ||
235 | int retval = -EINVAL; | ||
236 | |||
237 | if (!handle) { | ||
238 | DRM_MEM_ERROR(DRM_MEM_TOTALAGP, | ||
239 | "Attempt to free NULL AGP handle\n"); | ||
240 | return retval; | ||
241 | } | ||
242 | |||
243 | if (drm_agp_free_memory (handle)) { | ||
244 | spin_lock(&drm_mem_lock); | ||
245 | free_count = ++drm_mem_stats[DRM_MEM_TOTALAGP].free_count; | ||
246 | alloc_count = drm_mem_stats[DRM_MEM_TOTALAGP].succeed_count; | ||
247 | drm_mem_stats[DRM_MEM_TOTALAGP].bytes_freed | ||
248 | += pages << PAGE_SHIFT; | ||
249 | spin_unlock(&drm_mem_lock); | ||
250 | if (free_count > alloc_count) { | ||
251 | DRM_MEM_ERROR(DRM_MEM_TOTALAGP, | ||
252 | "Excess frees: %d frees, %d allocs\n", | ||
253 | free_count, alloc_count); | ||
254 | } | ||
255 | return 0; | ||
256 | } | ||
257 | return retval; | ||
258 | } | ||
259 | |||
260 | int drm_bind_agp (DRM_AGP_MEM * handle, unsigned int start) { | ||
261 | int retcode = -EINVAL; | ||
262 | |||
263 | if (!handle) { | ||
264 | DRM_MEM_ERROR(DRM_MEM_BOUNDAGP, | ||
265 | "Attempt to bind NULL AGP handle\n"); | ||
266 | return retcode; | ||
267 | } | ||
268 | |||
269 | if (!(retcode = drm_agp_bind_memory (handle, start))) { | ||
270 | spin_lock(&drm_mem_lock); | ||
271 | ++drm_mem_stats[DRM_MEM_BOUNDAGP].succeed_count; | ||
272 | drm_mem_stats[DRM_MEM_BOUNDAGP].bytes_allocated | ||
273 | += handle->page_count << PAGE_SHIFT; | ||
274 | spin_unlock(&drm_mem_lock); | ||
275 | return retcode; | ||
276 | } | ||
277 | spin_lock(&drm_mem_lock); | ||
278 | ++drm_mem_stats[DRM_MEM_BOUNDAGP].fail_count; | ||
279 | spin_unlock(&drm_mem_lock); | ||
280 | return retcode; | ||
281 | } | ||
282 | |||
283 | int drm_unbind_agp (DRM_AGP_MEM * handle) { | ||
284 | int alloc_count; | ||
285 | int free_count; | ||
286 | int retcode = -EINVAL; | ||
287 | |||
288 | if (!handle) { | ||
289 | DRM_MEM_ERROR(DRM_MEM_BOUNDAGP, | ||
290 | "Attempt to unbind NULL AGP handle\n"); | ||
291 | return retcode; | ||
292 | } | ||
293 | |||
294 | if ((retcode = drm_agp_unbind_memory (handle))) | ||
295 | return retcode; | ||
296 | spin_lock(&drm_mem_lock); | ||
297 | free_count = ++drm_mem_stats[DRM_MEM_BOUNDAGP].free_count; | ||
298 | alloc_count = drm_mem_stats[DRM_MEM_BOUNDAGP].succeed_count; | ||
299 | drm_mem_stats[DRM_MEM_BOUNDAGP].bytes_freed | ||
300 | += handle->page_count << PAGE_SHIFT; | ||
301 | spin_unlock(&drm_mem_lock); | ||
302 | if (free_count > alloc_count) { | ||
303 | DRM_MEM_ERROR(DRM_MEM_BOUNDAGP, | ||
304 | "Excess frees: %d frees, %d allocs\n", | ||
305 | free_count, alloc_count); | ||
306 | } | ||
307 | return retcode; | ||
308 | } | ||
309 | #endif | ||
diff --git a/include/drm/drm_mm.h b/include/drm/drm_mm.h index 5662f4278ef3..f8332073d277 100644 --- a/include/drm/drm_mm.h +++ b/include/drm/drm_mm.h | |||
@@ -59,13 +59,22 @@ struct drm_mm { | |||
59 | /* | 59 | /* |
60 | * Basic range manager support (drm_mm.c) | 60 | * Basic range manager support (drm_mm.c) |
61 | */ | 61 | */ |
62 | 62 | extern struct drm_mm_node *drm_mm_get_block_generic(struct drm_mm_node *node, | |
63 | extern struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent, | 63 | unsigned long size, |
64 | unsigned long size, | 64 | unsigned alignment, |
65 | unsigned alignment); | 65 | int atomic); |
66 | extern struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent, | 66 | static inline struct drm_mm_node *drm_mm_get_block(struct drm_mm_node *parent, |
67 | unsigned long size, | 67 | unsigned long size, |
68 | unsigned alignment); | 68 | unsigned alignment) |
69 | { | ||
70 | return drm_mm_get_block_generic(parent, size, alignment, 0); | ||
71 | } | ||
72 | static inline struct drm_mm_node *drm_mm_get_block_atomic(struct drm_mm_node *parent, | ||
73 | unsigned long size, | ||
74 | unsigned alignment) | ||
75 | { | ||
76 | return drm_mm_get_block_generic(parent, size, alignment, 1); | ||
77 | } | ||
69 | extern void drm_mm_put_block(struct drm_mm_node *cur); | 78 | extern void drm_mm_put_block(struct drm_mm_node *cur); |
70 | extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, | 79 | extern struct drm_mm_node *drm_mm_search_free(const struct drm_mm *mm, |
71 | unsigned long size, | 80 | unsigned long size, |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index a2df7030d49d..03f22076381f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -308,6 +308,7 @@ unifdef-y += pmu.h | |||
308 | unifdef-y += poll.h | 308 | unifdef-y += poll.h |
309 | unifdef-y += ppp_defs.h | 309 | unifdef-y += ppp_defs.h |
310 | unifdef-y += ppp-comp.h | 310 | unifdef-y += ppp-comp.h |
311 | unifdef-y += pps.h | ||
311 | unifdef-y += ptrace.h | 312 | unifdef-y += ptrace.h |
312 | unifdef-y += quota.h | 313 | unifdef-y += quota.h |
313 | unifdef-y += random.h | 314 | unifdef-y += random.h |
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 2b8df8b420fd..76fa794fdac0 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -70,7 +70,7 @@ struct agp_memory { | |||
70 | struct agp_memory *next; | 70 | struct agp_memory *next; |
71 | struct agp_memory *prev; | 71 | struct agp_memory *prev; |
72 | struct agp_bridge_data *bridge; | 72 | struct agp_bridge_data *bridge; |
73 | unsigned long *memory; | 73 | struct page **pages; |
74 | size_t page_count; | 74 | size_t page_count; |
75 | int key; | 75 | int key; |
76 | int num_scratch_pages; | 76 | int num_scratch_pages; |
diff --git a/include/linux/amba/pl061.h b/include/linux/amba/pl061.h new file mode 100644 index 000000000000..b4fbd9862606 --- /dev/null +++ b/include/linux/amba/pl061.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* platform data for the PL061 GPIO driver */ | ||
2 | |||
3 | struct pl061_platform_data { | ||
4 | /* number of the first GPIO */ | ||
5 | unsigned gpio_base; | ||
6 | |||
7 | /* number of the first IRQ. | ||
8 | * If the IRQ functionality in not desired this must be set to | ||
9 | * (unsigned) -1. | ||
10 | */ | ||
11 | unsigned irq_base; | ||
12 | |||
13 | u8 directions; /* startup directions, 1: out, 0: in */ | ||
14 | u8 values; /* startup values */ | ||
15 | }; | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 915da43edee1..9c75921f0c16 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -800,6 +800,20 @@ static inline int ata_id_is_ssd(const u16 *id) | |||
800 | return id[ATA_ID_ROT_SPEED] == 0x01; | 800 | return id[ATA_ID_ROT_SPEED] == 0x01; |
801 | } | 801 | } |
802 | 802 | ||
803 | static inline int ata_id_pio_need_iordy(const u16 *id, const u8 pio) | ||
804 | { | ||
805 | /* CF spec. r4.1 Table 22 says no IORDY on PIO5 and PIO6. */ | ||
806 | if (pio > 4 && ata_id_is_cfa(id)) | ||
807 | return 0; | ||
808 | /* For PIO3 and higher it is mandatory. */ | ||
809 | if (pio > 2) | ||
810 | return 1; | ||
811 | /* Turn it on when possible. */ | ||
812 | if (ata_id_has_iordy(id)) | ||
813 | return 1; | ||
814 | return 0; | ||
815 | } | ||
816 | |||
803 | static inline int ata_drive_40wire(const u16 *dev_id) | 817 | static inline int ata_drive_40wire(const u16 *dev_id) |
804 | { | 818 | { |
805 | if (ata_id_is_sata(dev_id)) | 819 | if (ata_id_is_sata(dev_id)) |
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index 8005effc04f1..b721129e0469 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h | |||
@@ -16,6 +16,12 @@ | |||
16 | #define __must_check __attribute__((warn_unused_result)) | 16 | #define __must_check __attribute__((warn_unused_result)) |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef CONFIG_GCOV_KERNEL | ||
20 | # if __GNUC_MINOR__ < 4 | ||
21 | # error "GCOV profiling support for gcc versions below 3.4 not included" | ||
22 | # endif /* __GNUC_MINOR__ */ | ||
23 | #endif /* CONFIG_GCOV_KERNEL */ | ||
24 | |||
19 | /* | 25 | /* |
20 | * A trick to suppress uninitialized variable warning without generating any | 26 | * A trick to suppress uninitialized variable warning without generating any |
21 | * code | 27 | * code |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 8083b6a36a38..07dfd460d286 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -63,24 +63,26 @@ struct dma_map_ops { | |||
63 | 63 | ||
64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | 64 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
65 | 65 | ||
66 | typedef u64 DMA_nnBIT_MASK __deprecated; | ||
67 | |||
66 | /* | 68 | /* |
67 | * NOTE: do not use the below macros in new code and do not add new definitions | 69 | * NOTE: do not use the below macros in new code and do not add new definitions |
68 | * here. | 70 | * here. |
69 | * | 71 | * |
70 | * Instead, just open-code DMA_BIT_MASK(n) within your driver | 72 | * Instead, just open-code DMA_BIT_MASK(n) within your driver |
71 | */ | 73 | */ |
72 | #define DMA_64BIT_MASK DMA_BIT_MASK(64) | 74 | #define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64) |
73 | #define DMA_48BIT_MASK DMA_BIT_MASK(48) | 75 | #define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48) |
74 | #define DMA_47BIT_MASK DMA_BIT_MASK(47) | 76 | #define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47) |
75 | #define DMA_40BIT_MASK DMA_BIT_MASK(40) | 77 | #define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40) |
76 | #define DMA_39BIT_MASK DMA_BIT_MASK(39) | 78 | #define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39) |
77 | #define DMA_35BIT_MASK DMA_BIT_MASK(35) | 79 | #define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35) |
78 | #define DMA_32BIT_MASK DMA_BIT_MASK(32) | 80 | #define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32) |
79 | #define DMA_31BIT_MASK DMA_BIT_MASK(31) | 81 | #define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31) |
80 | #define DMA_30BIT_MASK DMA_BIT_MASK(30) | 82 | #define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30) |
81 | #define DMA_29BIT_MASK DMA_BIT_MASK(29) | 83 | #define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29) |
82 | #define DMA_28BIT_MASK DMA_BIT_MASK(28) | 84 | #define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28) |
83 | #define DMA_24BIT_MASK DMA_BIT_MASK(24) | 85 | #define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24) |
84 | 86 | ||
85 | #define DMA_MASK_NONE 0x0ULL | 87 | #define DMA_MASK_NONE 0x0ULL |
86 | 88 | ||
@@ -107,9 +109,20 @@ static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size) | |||
107 | #include <asm-generic/dma-mapping-broken.h> | 109 | #include <asm-generic/dma-mapping-broken.h> |
108 | #endif | 110 | #endif |
109 | 111 | ||
110 | /* Backwards compat, remove in 2.7.x */ | 112 | /* for backwards compatibility, removed soon */ |
111 | #define dma_sync_single dma_sync_single_for_cpu | 113 | static inline void __deprecated dma_sync_single(struct device *dev, |
112 | #define dma_sync_sg dma_sync_sg_for_cpu | 114 | dma_addr_t addr, size_t size, |
115 | enum dma_data_direction dir) | ||
116 | { | ||
117 | dma_sync_single_for_cpu(dev, addr, size, dir); | ||
118 | } | ||
119 | |||
120 | static inline void __deprecated dma_sync_sg(struct device *dev, | ||
121 | struct scatterlist *sg, int nelems, | ||
122 | enum dma_data_direction dir) | ||
123 | { | ||
124 | dma_sync_sg_for_cpu(dev, sg, nelems, dir); | ||
125 | } | ||
113 | 126 | ||
114 | static inline u64 dma_get_mask(struct device *dev) | 127 | static inline u64 dma_get_mask(struct device *dev) |
115 | { | 128 | { |
diff --git a/include/linux/efi.h b/include/linux/efi.h index bb66feb164bd..ce4581fbc08b 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -101,7 +101,7 @@ typedef struct { | |||
101 | u64 attribute; | 101 | u64 attribute; |
102 | } efi_memory_desc_t; | 102 | } efi_memory_desc_t; |
103 | 103 | ||
104 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); | 104 | typedef int (*efi_freemem_callback_t) (u64 start, u64 end, void *arg); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Types and defines for Time Services | 107 | * Types and defines for Time Services |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 244677cc082b..43fc95d822d5 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
@@ -79,10 +79,6 @@ struct fsl_spi_platform_data { | |||
79 | u16 max_chipselect; | 79 | u16 max_chipselect; |
80 | void (*cs_control)(struct spi_device *spi, bool on); | 80 | void (*cs_control)(struct spi_device *spi, bool on); |
81 | u32 sysclk; | 81 | u32 sysclk; |
82 | |||
83 | /* Legacy hooks, used by mpc52xx_psc_spi driver. */ | ||
84 | void (*activate_cs)(u8 cs, u8 polarity); | ||
85 | void (*deactivate_cs)(u8 cs, u8 polarity); | ||
86 | }; | 82 | }; |
87 | 83 | ||
88 | struct mpc8xx_pcmcia_ops { | 84 | struct mpc8xx_pcmcia_ops { |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 39b95c56587e..dc3b1328aaeb 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -362,6 +362,7 @@ struct ftrace_ret_stack { | |||
362 | unsigned long func; | 362 | unsigned long func; |
363 | unsigned long long calltime; | 363 | unsigned long long calltime; |
364 | unsigned long long subtime; | 364 | unsigned long long subtime; |
365 | unsigned long fp; | ||
365 | }; | 366 | }; |
366 | 367 | ||
367 | /* | 368 | /* |
@@ -372,7 +373,8 @@ struct ftrace_ret_stack { | |||
372 | extern void return_to_handler(void); | 373 | extern void return_to_handler(void); |
373 | 374 | ||
374 | extern int | 375 | extern int |
375 | ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth); | 376 | ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth, |
377 | unsigned long frame_pointer); | ||
376 | 378 | ||
377 | /* | 379 | /* |
378 | * Sometimes we don't want to trace a function with the function | 380 | * Sometimes we don't want to trace a function with the function |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 0cd825f7363a..1bc08541c2b9 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #ifdef __KERNEL__ | 12 | #ifdef __KERNEL__ |
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <linux/types.h> | ||
14 | #include <linux/list.h> | 15 | #include <linux/list.h> |
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
16 | #include <linux/device.h> | 17 | #include <linux/device.h> |
@@ -62,7 +63,7 @@ struct gameport_driver { | |||
62 | 63 | ||
63 | struct device_driver driver; | 64 | struct device_driver driver; |
64 | 65 | ||
65 | unsigned int ignore; | 66 | bool ignore; |
66 | }; | 67 | }; |
67 | #define to_gameport_driver(d) container_of(d, struct gameport_driver, driver) | 68 | #define to_gameport_driver(d) container_of(d, struct gameport_driver, driver) |
68 | 69 | ||
diff --git a/include/linux/gcd.h b/include/linux/gcd.h new file mode 100644 index 000000000000..69f5e8a01bad --- /dev/null +++ b/include/linux/gcd.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _GCD_H | ||
2 | #define _GCD_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | |||
6 | unsigned long gcd(unsigned long a, unsigned long b) __attribute_const__; | ||
7 | |||
8 | #endif /* _GCD_H */ | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index cfdb35d71bca..7c777a0da17a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -99,7 +99,7 @@ struct vm_area_struct; | |||
99 | __GFP_NORETRY|__GFP_NOMEMALLOC) | 99 | __GFP_NORETRY|__GFP_NOMEMALLOC) |
100 | 100 | ||
101 | /* Control slab gfp mask during early boot */ | 101 | /* Control slab gfp mask during early boot */ |
102 | #define SLAB_GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) | 102 | #define GFP_BOOT_MASK __GFP_BITS_MASK & ~(__GFP_WAIT|__GFP_IO|__GFP_FS) |
103 | 103 | ||
104 | /* Control allocation constraints */ | 104 | /* Control allocation constraints */ |
105 | #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) | 105 | #define GFP_CONSTRAINT_MASK (__GFP_HARDWALL|__GFP_THISNODE) |
@@ -348,4 +348,11 @@ static inline void oom_killer_enable(void) | |||
348 | oom_killer_disabled = false; | 348 | oom_killer_disabled = false; |
349 | } | 349 | } |
350 | 350 | ||
351 | extern gfp_t gfp_allowed_mask; | ||
352 | |||
353 | static inline void set_gfp_allowed_mask(gfp_t mask) | ||
354 | { | ||
355 | gfp_allowed_mask = mask; | ||
356 | } | ||
357 | |||
351 | #endif /* __LINUX_GFP_H */ | 358 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ad2580596033..f4784c0fe975 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -47,6 +47,7 @@ struct i2c_driver; | |||
47 | union i2c_smbus_data; | 47 | union i2c_smbus_data; |
48 | struct i2c_board_info; | 48 | struct i2c_board_info; |
49 | 49 | ||
50 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | ||
50 | /* | 51 | /* |
51 | * The master routines are the ones normally used to transmit data to devices | 52 | * The master routines are the ones normally used to transmit data to devices |
52 | * on a bus (or read from them). Apart from two basic transfer functions to | 53 | * on a bus (or read from them). Apart from two basic transfer functions to |
@@ -93,6 +94,7 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client *client, | |||
93 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, | 94 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, |
94 | u8 command, u8 length, | 95 | u8 command, u8 length, |
95 | const u8 *values); | 96 | const u8 *values); |
97 | #endif /* I2C */ | ||
96 | 98 | ||
97 | /** | 99 | /** |
98 | * struct i2c_driver - represent an I2C device driver | 100 | * struct i2c_driver - represent an I2C device driver |
@@ -100,9 +102,8 @@ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client *client, | |||
100 | * @class: What kind of i2c device we instantiate (for detect) | 102 | * @class: What kind of i2c device we instantiate (for detect) |
101 | * @attach_adapter: Callback for bus addition (for legacy drivers) | 103 | * @attach_adapter: Callback for bus addition (for legacy drivers) |
102 | * @detach_adapter: Callback for bus removal (for legacy drivers) | 104 | * @detach_adapter: Callback for bus removal (for legacy drivers) |
103 | * @detach_client: Callback for device removal (for legacy drivers) | 105 | * @probe: Callback for device binding |
104 | * @probe: Callback for device binding (new-style drivers) | 106 | * @remove: Callback for device unbinding |
105 | * @remove: Callback for device unbinding (new-style drivers) | ||
106 | * @shutdown: Callback for device shutdown | 107 | * @shutdown: Callback for device shutdown |
107 | * @suspend: Callback for device suspend | 108 | * @suspend: Callback for device suspend |
108 | * @resume: Callback for device resume | 109 | * @resume: Callback for device resume |
@@ -137,26 +138,14 @@ struct i2c_driver { | |||
137 | int id; | 138 | int id; |
138 | unsigned int class; | 139 | unsigned int class; |
139 | 140 | ||
140 | /* Notifies the driver that a new bus has appeared. This routine | 141 | /* Notifies the driver that a new bus has appeared or is about to be |
141 | * can be used by the driver to test if the bus meets its conditions | 142 | * removed. You should avoid using this if you can, it will probably |
142 | * & seek for the presence of the chip(s) it supports. If found, it | 143 | * be removed in a near future. |
143 | * registers the client(s) that are on the bus to the i2c admin. via | ||
144 | * i2c_attach_client. (LEGACY I2C DRIVERS ONLY) | ||
145 | */ | 144 | */ |
146 | int (*attach_adapter)(struct i2c_adapter *); | 145 | int (*attach_adapter)(struct i2c_adapter *); |
147 | int (*detach_adapter)(struct i2c_adapter *); | 146 | int (*detach_adapter)(struct i2c_adapter *); |
148 | 147 | ||
149 | /* tells the driver that a client is about to be deleted & gives it | 148 | /* Standard driver model interfaces */ |
150 | * the chance to remove its private data. Also, if the client struct | ||
151 | * has been dynamically allocated by the driver in the function above, | ||
152 | * it must be freed here. (LEGACY I2C DRIVERS ONLY) | ||
153 | */ | ||
154 | int (*detach_client)(struct i2c_client *) __deprecated; | ||
155 | |||
156 | /* Standard driver model interfaces, for "new style" i2c drivers. | ||
157 | * With the driver model, device enumeration is NEVER done by drivers; | ||
158 | * it's done by infrastructure. (NEW STYLE DRIVERS ONLY) | ||
159 | */ | ||
160 | int (*probe)(struct i2c_client *, const struct i2c_device_id *); | 149 | int (*probe)(struct i2c_client *, const struct i2c_device_id *); |
161 | int (*remove)(struct i2c_client *); | 150 | int (*remove)(struct i2c_client *); |
162 | 151 | ||
@@ -191,9 +180,8 @@ struct i2c_driver { | |||
191 | * @driver: device's driver, hence pointer to access routines | 180 | * @driver: device's driver, hence pointer to access routines |
192 | * @dev: Driver model device node for the slave. | 181 | * @dev: Driver model device node for the slave. |
193 | * @irq: indicates the IRQ generated by this device (if any) | 182 | * @irq: indicates the IRQ generated by this device (if any) |
194 | * @list: list of active/busy clients (DEPRECATED) | 183 | * @detected: member of an i2c_driver.clients list or i2c-core's |
195 | * @detected: member of an i2c_driver.clients list | 184 | * userspace_devices list |
196 | * @released: used to synchronize client releases & detaches and references | ||
197 | * | 185 | * |
198 | * An i2c_client identifies a single device (i.e. chip) connected to an | 186 | * An i2c_client identifies a single device (i.e. chip) connected to an |
199 | * i2c bus. The behaviour exposed to Linux is defined by the driver | 187 | * i2c bus. The behaviour exposed to Linux is defined by the driver |
@@ -209,9 +197,7 @@ struct i2c_client { | |||
209 | struct i2c_driver *driver; /* and our access routines */ | 197 | struct i2c_driver *driver; /* and our access routines */ |
210 | struct device dev; /* the device structure */ | 198 | struct device dev; /* the device structure */ |
211 | int irq; /* irq issued by device */ | 199 | int irq; /* irq issued by device */ |
212 | struct list_head list; /* DEPRECATED */ | ||
213 | struct list_head detected; | 200 | struct list_head detected; |
214 | struct completion released; | ||
215 | }; | 201 | }; |
216 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) | 202 | #define to_i2c_client(d) container_of(d, struct i2c_client, dev) |
217 | 203 | ||
@@ -248,11 +234,10 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data) | |||
248 | * that, such as chip type, configuration, associated IRQ, and so on. | 234 | * that, such as chip type, configuration, associated IRQ, and so on. |
249 | * | 235 | * |
250 | * i2c_board_info is used to build tables of information listing I2C devices | 236 | * i2c_board_info is used to build tables of information listing I2C devices |
251 | * that are present. This information is used to grow the driver model tree | 237 | * that are present. This information is used to grow the driver model tree. |
252 | * for "new style" I2C drivers. For mainboards this is done statically using | 238 | * For mainboards this is done statically using i2c_register_board_info(); |
253 | * i2c_register_board_info(); bus numbers identify adapters that aren't | 239 | * bus numbers identify adapters that aren't yet available. For add-on boards, |
254 | * yet available. For add-on boards, i2c_new_device() does this dynamically | 240 | * i2c_new_device() does this dynamically with the adapter already known. |
255 | * with the adapter already known. | ||
256 | */ | 241 | */ |
257 | struct i2c_board_info { | 242 | struct i2c_board_info { |
258 | char type[I2C_NAME_SIZE]; | 243 | char type[I2C_NAME_SIZE]; |
@@ -277,6 +262,7 @@ struct i2c_board_info { | |||
277 | .type = dev_type, .addr = (dev_addr) | 262 | .type = dev_type, .addr = (dev_addr) |
278 | 263 | ||
279 | 264 | ||
265 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | ||
280 | /* Add-on boards should register/unregister their devices; e.g. a board | 266 | /* Add-on boards should register/unregister their devices; e.g. a board |
281 | * with integrated I2C, a config eeprom, sensors, and a codec that's | 267 | * with integrated I2C, a config eeprom, sensors, and a codec that's |
282 | * used in conjunction with the primary hardware. | 268 | * used in conjunction with the primary hardware. |
@@ -300,6 +286,7 @@ extern struct i2c_client * | |||
300 | i2c_new_dummy(struct i2c_adapter *adap, u16 address); | 286 | i2c_new_dummy(struct i2c_adapter *adap, u16 address); |
301 | 287 | ||
302 | extern void i2c_unregister_device(struct i2c_client *); | 288 | extern void i2c_unregister_device(struct i2c_client *); |
289 | #endif /* I2C */ | ||
303 | 290 | ||
304 | /* Mainboard arch_initcall() code should register all its I2C devices. | 291 | /* Mainboard arch_initcall() code should register all its I2C devices. |
305 | * This is done at arch_initcall time, before declaring any i2c adapters. | 292 | * This is done at arch_initcall time, before declaring any i2c adapters. |
@@ -316,7 +303,7 @@ i2c_register_board_info(int busnum, struct i2c_board_info const *info, | |||
316 | { | 303 | { |
317 | return 0; | 304 | return 0; |
318 | } | 305 | } |
319 | #endif | 306 | #endif /* I2C_BOARDINFO */ |
320 | 307 | ||
321 | /* | 308 | /* |
322 | * The following structs are for those who like to implement new bus drivers: | 309 | * The following structs are for those who like to implement new bus drivers: |
@@ -352,21 +339,15 @@ struct i2c_adapter { | |||
352 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ | 339 | const struct i2c_algorithm *algo; /* the algorithm to access the bus */ |
353 | void *algo_data; | 340 | void *algo_data; |
354 | 341 | ||
355 | /* --- administration stuff. */ | ||
356 | int (*client_register)(struct i2c_client *) __deprecated; | ||
357 | int (*client_unregister)(struct i2c_client *) __deprecated; | ||
358 | |||
359 | /* data fields that are valid for all devices */ | 342 | /* data fields that are valid for all devices */ |
360 | u8 level; /* nesting level for lockdep */ | 343 | u8 level; /* nesting level for lockdep */ |
361 | struct mutex bus_lock; | 344 | struct mutex bus_lock; |
362 | struct mutex clist_lock; | ||
363 | 345 | ||
364 | int timeout; /* in jiffies */ | 346 | int timeout; /* in jiffies */ |
365 | int retries; | 347 | int retries; |
366 | struct device dev; /* the adapter device */ | 348 | struct device dev; /* the adapter device */ |
367 | 349 | ||
368 | int nr; | 350 | int nr; |
369 | struct list_head clients; /* DEPRECATED */ | ||
370 | char name[48]; | 351 | char name[48]; |
371 | struct completion dev_released; | 352 | struct completion dev_released; |
372 | }; | 353 | }; |
@@ -412,11 +393,16 @@ struct i2c_client_address_data { | |||
412 | /* The numbers to use to set I2C bus address */ | 393 | /* The numbers to use to set I2C bus address */ |
413 | #define ANY_I2C_BUS 0xffff | 394 | #define ANY_I2C_BUS 0xffff |
414 | 395 | ||
396 | /* Construct an I2C_CLIENT_END-terminated array of i2c addresses */ | ||
397 | #define I2C_ADDRS(addr, addrs...) \ | ||
398 | ((const unsigned short []){ addr, ## addrs, I2C_CLIENT_END }) | ||
399 | |||
415 | 400 | ||
416 | /* ----- functions exported by i2c.o */ | 401 | /* ----- functions exported by i2c.o */ |
417 | 402 | ||
418 | /* administration... | 403 | /* administration... |
419 | */ | 404 | */ |
405 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | ||
420 | extern int i2c_add_adapter(struct i2c_adapter *); | 406 | extern int i2c_add_adapter(struct i2c_adapter *); |
421 | extern int i2c_del_adapter(struct i2c_adapter *); | 407 | extern int i2c_del_adapter(struct i2c_adapter *); |
422 | extern int i2c_add_numbered_adapter(struct i2c_adapter *); | 408 | extern int i2c_add_numbered_adapter(struct i2c_adapter *); |
@@ -429,11 +415,6 @@ static inline int i2c_add_driver(struct i2c_driver *driver) | |||
429 | return i2c_register_driver(THIS_MODULE, driver); | 415 | return i2c_register_driver(THIS_MODULE, driver); |
430 | } | 416 | } |
431 | 417 | ||
432 | /* These are deprecated, your driver should use the standard .probe() | ||
433 | * and .remove() methods instead. */ | ||
434 | extern int __deprecated i2c_attach_client(struct i2c_client *); | ||
435 | extern int __deprecated i2c_detach_client(struct i2c_client *); | ||
436 | |||
437 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); | 418 | extern struct i2c_client *i2c_use_client(struct i2c_client *client); |
438 | extern void i2c_release_client(struct i2c_client *client); | 419 | extern void i2c_release_client(struct i2c_client *client); |
439 | 420 | ||
@@ -442,14 +423,6 @@ extern void i2c_release_client(struct i2c_client *client); | |||
442 | extern void i2c_clients_command(struct i2c_adapter *adap, | 423 | extern void i2c_clients_command(struct i2c_adapter *adap, |
443 | unsigned int cmd, void *arg); | 424 | unsigned int cmd, void *arg); |
444 | 425 | ||
445 | /* Detect function. It iterates over all possible addresses itself. | ||
446 | * It will only call found_proc if some client is connected at the | ||
447 | * specific address (unless a 'force' matched); | ||
448 | */ | ||
449 | extern int i2c_probe(struct i2c_adapter *adapter, | ||
450 | const struct i2c_client_address_data *address_data, | ||
451 | int (*found_proc) (struct i2c_adapter *, int, int)); | ||
452 | |||
453 | extern struct i2c_adapter *i2c_get_adapter(int id); | 426 | extern struct i2c_adapter *i2c_get_adapter(int id); |
454 | extern void i2c_put_adapter(struct i2c_adapter *adap); | 427 | extern void i2c_put_adapter(struct i2c_adapter *adap); |
455 | 428 | ||
@@ -471,6 +444,7 @@ static inline int i2c_adapter_id(struct i2c_adapter *adap) | |||
471 | { | 444 | { |
472 | return adap->nr; | 445 | return adap->nr; |
473 | } | 446 | } |
447 | #endif /* I2C */ | ||
474 | #endif /* __KERNEL__ */ | 448 | #endif /* __KERNEL__ */ |
475 | 449 | ||
476 | /** | 450 | /** |
diff --git a/include/linux/i2c/lm8323.h b/include/linux/i2c/lm8323.h new file mode 100644 index 000000000000..478d668bc590 --- /dev/null +++ b/include/linux/i2c/lm8323.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * lm8323.h - Configuration for LM8323 keypad driver. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation (version 2 of the License only). | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
16 | */ | ||
17 | |||
18 | #ifndef __LINUX_LM8323_H | ||
19 | #define __LINUX_LM8323_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | /* | ||
24 | * Largest keycode that the chip can send, plus one, | ||
25 | * so keys can be mapped directly at the index of the | ||
26 | * LM8323 keycode instead of subtracting one. | ||
27 | */ | ||
28 | #define LM8323_KEYMAP_SIZE (0x7f + 1) | ||
29 | |||
30 | #define LM8323_NUM_PWMS 3 | ||
31 | |||
32 | struct lm8323_platform_data { | ||
33 | int debounce_time; /* Time to watch for key bouncing, in ms. */ | ||
34 | int active_time; /* Idle time until sleep, in ms. */ | ||
35 | |||
36 | int size_x; | ||
37 | int size_y; | ||
38 | bool repeat; | ||
39 | const unsigned short *keymap; | ||
40 | |||
41 | const char *pwm_names[LM8323_NUM_PWMS]; | ||
42 | |||
43 | const char *name; /* Device name. */ | ||
44 | }; | ||
45 | |||
46 | #endif /* __LINUX_LM8323_H */ | ||
diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h index 3c7361217df8..81736d6a8db7 100644 --- a/include/linux/i2c/pca953x.h +++ b/include/linux/i2c/pca953x.h | |||
@@ -15,4 +15,5 @@ struct pca953x_platform_data { | |||
15 | int (*teardown)(struct i2c_client *client, | 15 | int (*teardown)(struct i2c_client *client, |
16 | unsigned gpio, unsigned ngpio, | 16 | unsigned gpio, unsigned ngpio, |
17 | void *context); | 17 | void *context); |
18 | char **names; | ||
18 | }; | 19 | }; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index a6c6a2fad7c8..95c6e00a72e8 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -157,12 +157,6 @@ enum { | |||
157 | #define REQ_UNPARK_HEADS 0x23 | 157 | #define REQ_UNPARK_HEADS 0x23 |
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Check for an interrupt and acknowledge the interrupt status | ||
161 | */ | ||
162 | struct hwif_s; | ||
163 | typedef int (ide_ack_intr_t)(struct hwif_s *); | ||
164 | |||
165 | /* | ||
166 | * hwif_chipset_t is used to keep track of the specific hardware | 160 | * hwif_chipset_t is used to keep track of the specific hardware |
167 | * chipset used by each IDE interface, if known. | 161 | * chipset used by each IDE interface, if known. |
168 | */ | 162 | */ |
@@ -185,7 +179,6 @@ struct ide_hw { | |||
185 | }; | 179 | }; |
186 | 180 | ||
187 | int irq; /* our irq number */ | 181 | int irq; /* our irq number */ |
188 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | ||
189 | struct device *dev, *parent; | 182 | struct device *dev, *parent; |
190 | unsigned long config; | 183 | unsigned long config; |
191 | }; | 184 | }; |
@@ -331,11 +324,6 @@ enum { | |||
331 | PC_FLAG_WRITING = (1 << 6), | 324 | PC_FLAG_WRITING = (1 << 6), |
332 | }; | 325 | }; |
333 | 326 | ||
334 | /* | ||
335 | * With each packet command, we allocate a buffer of IDE_PC_BUFFER_SIZE bytes. | ||
336 | * This is used for several packet commands (not for READ/WRITE commands). | ||
337 | */ | ||
338 | #define IDE_PC_BUFFER_SIZE 64 | ||
339 | #define ATAPI_WAIT_PC (60 * HZ) | 327 | #define ATAPI_WAIT_PC (60 * HZ) |
340 | 328 | ||
341 | struct ide_atapi_pc { | 329 | struct ide_atapi_pc { |
@@ -347,12 +335,6 @@ struct ide_atapi_pc { | |||
347 | 335 | ||
348 | /* bytes to transfer */ | 336 | /* bytes to transfer */ |
349 | int req_xfer; | 337 | int req_xfer; |
350 | /* bytes actually transferred */ | ||
351 | int xferred; | ||
352 | |||
353 | /* data buffer */ | ||
354 | u8 *buf; | ||
355 | int buf_size; | ||
356 | 338 | ||
357 | /* the corresponding request */ | 339 | /* the corresponding request */ |
358 | struct request *rq; | 340 | struct request *rq; |
@@ -363,8 +345,6 @@ struct ide_atapi_pc { | |||
363 | * those are more or less driver-specific and some of them are subject | 345 | * those are more or less driver-specific and some of them are subject |
364 | * to change/removal later. | 346 | * to change/removal later. |
365 | */ | 347 | */ |
366 | u8 pc_buf[IDE_PC_BUFFER_SIZE]; | ||
367 | |||
368 | unsigned long timeout; | 348 | unsigned long timeout; |
369 | }; | 349 | }; |
370 | 350 | ||
@@ -552,7 +532,7 @@ struct ide_drive_s { | |||
552 | 532 | ||
553 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 533 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
554 | unsigned int cyl; /* "real" number of cyls */ | 534 | unsigned int cyl; /* "real" number of cyls */ |
555 | unsigned int drive_data; /* used by set_pio_mode/dev_select() */ | 535 | void *drive_data; /* used by set_pio_mode/dev_select() */ |
556 | unsigned int failures; /* current failure count */ | 536 | unsigned int failures; /* current failure count */ |
557 | unsigned int max_failures; /* maximum allowed failure count */ | 537 | unsigned int max_failures; /* maximum allowed failure count */ |
558 | u64 probed_capacity;/* initial/native media capacity */ | 538 | u64 probed_capacity;/* initial/native media capacity */ |
@@ -649,6 +629,7 @@ struct ide_port_ops { | |||
649 | void (*maskproc)(ide_drive_t *, int); | 629 | void (*maskproc)(ide_drive_t *, int); |
650 | void (*quirkproc)(ide_drive_t *); | 630 | void (*quirkproc)(ide_drive_t *); |
651 | void (*clear_irq)(ide_drive_t *); | 631 | void (*clear_irq)(ide_drive_t *); |
632 | int (*test_irq)(struct hwif_s *); | ||
652 | 633 | ||
653 | u8 (*mdma_filter)(ide_drive_t *); | 634 | u8 (*mdma_filter)(ide_drive_t *); |
654 | u8 (*udma_filter)(ide_drive_t *); | 635 | u8 (*udma_filter)(ide_drive_t *); |
@@ -674,6 +655,10 @@ struct ide_dma_ops { | |||
674 | u8 (*dma_sff_read_status)(struct hwif_s *); | 655 | u8 (*dma_sff_read_status)(struct hwif_s *); |
675 | }; | 656 | }; |
676 | 657 | ||
658 | enum { | ||
659 | IDE_PFLAG_PROBING = (1 << 0), | ||
660 | }; | ||
661 | |||
677 | struct ide_host; | 662 | struct ide_host; |
678 | 663 | ||
679 | typedef struct hwif_s { | 664 | typedef struct hwif_s { |
@@ -690,6 +675,8 @@ typedef struct hwif_s { | |||
690 | 675 | ||
691 | ide_drive_t *devices[MAX_DRIVES + 1]; | 676 | ide_drive_t *devices[MAX_DRIVES + 1]; |
692 | 677 | ||
678 | unsigned long port_flags; | ||
679 | |||
693 | u8 major; /* our major number */ | 680 | u8 major; /* our major number */ |
694 | u8 index; /* 0 for ide0; 1 for ide1; ... */ | 681 | u8 index; /* 0 for ide0; 1 for ide1; ... */ |
695 | u8 channel; /* for dual-port chips: 0=primary, 1=secondary */ | 682 | u8 channel; /* for dual-port chips: 0=primary, 1=secondary */ |
@@ -708,8 +695,6 @@ typedef struct hwif_s { | |||
708 | 695 | ||
709 | struct device *dev; | 696 | struct device *dev; |
710 | 697 | ||
711 | ide_ack_intr_t *ack_intr; | ||
712 | |||
713 | void (*rw_disk)(ide_drive_t *, struct request *); | 698 | void (*rw_disk)(ide_drive_t *, struct request *); |
714 | 699 | ||
715 | const struct ide_tp_ops *tp_ops; | 700 | const struct ide_tp_ops *tp_ops; |
@@ -1130,6 +1115,8 @@ void SELECT_MASK(ide_drive_t *, int); | |||
1130 | u8 ide_read_error(ide_drive_t *); | 1115 | u8 ide_read_error(ide_drive_t *); |
1131 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | 1116 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); |
1132 | 1117 | ||
1118 | int ide_check_ireason(ide_drive_t *, struct request *, int, int, int); | ||
1119 | |||
1133 | int ide_check_atapi_device(ide_drive_t *, const char *); | 1120 | int ide_check_atapi_device(ide_drive_t *, const char *); |
1134 | 1121 | ||
1135 | void ide_init_pc(struct ide_atapi_pc *); | 1122 | void ide_init_pc(struct ide_atapi_pc *); |
@@ -1154,7 +1141,8 @@ enum { | |||
1154 | REQ_IDETAPE_WRITE = (1 << 3), | 1141 | REQ_IDETAPE_WRITE = (1 << 3), |
1155 | }; | 1142 | }; |
1156 | 1143 | ||
1157 | int ide_queue_pc_tail(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *); | 1144 | int ide_queue_pc_tail(ide_drive_t *, struct gendisk *, struct ide_atapi_pc *, |
1145 | void *, unsigned int); | ||
1158 | 1146 | ||
1159 | int ide_do_test_unit_ready(ide_drive_t *, struct gendisk *); | 1147 | int ide_do_test_unit_ready(ide_drive_t *, struct gendisk *); |
1160 | int ide_do_start_stop(ide_drive_t *, struct gendisk *, int); | 1148 | int ide_do_start_stop(ide_drive_t *, struct gendisk *, int); |
@@ -1524,6 +1512,7 @@ int ide_timing_compute(ide_drive_t *, u8, struct ide_timing *, int, int); | |||
1524 | int ide_scan_pio_blacklist(char *); | 1512 | int ide_scan_pio_blacklist(char *); |
1525 | const char *ide_xfer_verbose(u8); | 1513 | const char *ide_xfer_verbose(u8); |
1526 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); | 1514 | u8 ide_get_best_pio_mode(ide_drive_t *, u8, u8); |
1515 | int ide_pio_need_iordy(ide_drive_t *, const u8); | ||
1527 | int ide_set_pio_mode(ide_drive_t *, u8); | 1516 | int ide_set_pio_mode(ide_drive_t *, u8); |
1528 | int ide_set_dma_mode(ide_drive_t *, u8); | 1517 | int ide_set_dma_mode(ide_drive_t *, u8); |
1529 | void ide_set_pio(ide_drive_t *, u8); | 1518 | void ide_set_pio(ide_drive_t *, u8); |
@@ -1561,6 +1550,16 @@ static inline ide_drive_t *ide_get_pair_dev(ide_drive_t *drive) | |||
1561 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; | 1550 | return (peer->dev_flags & IDE_DFLAG_PRESENT) ? peer : NULL; |
1562 | } | 1551 | } |
1563 | 1552 | ||
1553 | static inline void *ide_get_drivedata(ide_drive_t *drive) | ||
1554 | { | ||
1555 | return drive->drive_data; | ||
1556 | } | ||
1557 | |||
1558 | static inline void ide_set_drivedata(ide_drive_t *drive, void *data) | ||
1559 | { | ||
1560 | drive->drive_data = data; | ||
1561 | } | ||
1562 | |||
1564 | #define ide_port_for_each_dev(i, dev, port) \ | 1563 | #define ide_port_for_each_dev(i, dev, port) \ |
1565 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) | 1564 | for ((i) = 0; ((dev) = (port)->devices[i]) || (i) < MAX_DRIVES; (i)++) |
1566 | 1565 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index 8c2c9989626d..13b633ed695e 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -134,6 +134,9 @@ typedef void (*exitcall_t)(void); | |||
134 | extern initcall_t __con_initcall_start[], __con_initcall_end[]; | 134 | extern initcall_t __con_initcall_start[], __con_initcall_end[]; |
135 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 135 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
136 | 136 | ||
137 | /* Used for contructor calls. */ | ||
138 | typedef void (*ctor_fn_t)(void); | ||
139 | |||
137 | /* Defined in init/main.c */ | 140 | /* Defined in init/main.c */ |
138 | extern int do_one_initcall(initcall_t fn); | 141 | extern int do_one_initcall(initcall_t fn); |
139 | extern char __initdata boot_command_line[]; | 142 | extern char __initdata boot_command_line[]; |
diff --git a/include/linux/input.h b/include/linux/input.h index 6fed4f6a9c9e..8b3bc3e0d146 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -53,6 +53,7 @@ struct input_absinfo { | |||
53 | __s32 maximum; | 53 | __s32 maximum; |
54 | __s32 fuzz; | 54 | __s32 fuzz; |
55 | __s32 flat; | 55 | __s32 flat; |
56 | __s32 resolution; | ||
56 | }; | 57 | }; |
57 | 58 | ||
58 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
@@ -1109,6 +1110,7 @@ struct input_dev { | |||
1109 | int absmin[ABS_MAX + 1]; | 1110 | int absmin[ABS_MAX + 1]; |
1110 | int absfuzz[ABS_MAX + 1]; | 1111 | int absfuzz[ABS_MAX + 1]; |
1111 | int absflat[ABS_MAX + 1]; | 1112 | int absflat[ABS_MAX + 1]; |
1113 | int absres[ABS_MAX + 1]; | ||
1112 | 1114 | ||
1113 | int (*open)(struct input_dev *dev); | 1115 | int (*open)(struct input_dev *dev); |
1114 | void (*close)(struct input_dev *dev); | 1116 | void (*close)(struct input_dev *dev); |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 32e4b2f72294..786e7b8cece9 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -49,6 +49,8 @@ struct resource_list { | |||
49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ |
50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ |
51 | 51 | ||
52 | #define IORESOURCE_MEM_64 0x00100000 | ||
53 | |||
52 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 54 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
53 | #define IORESOURCE_DISABLED 0x10000000 | 55 | #define IORESOURCE_DISABLED 0x10000000 |
54 | #define IORESOURCE_UNSET 0x20000000 | 56 | #define IORESOURCE_UNSET 0x20000000 |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 3bf40e246a80..e408722a84c7 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -94,13 +94,8 @@ static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } | |||
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | #if defined(CONFIG_IPC_NS) | 96 | #if defined(CONFIG_IPC_NS) |
97 | extern void free_ipc_ns(struct ipc_namespace *ns); | ||
98 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | 97 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, |
99 | struct ipc_namespace *ns); | 98 | struct ipc_namespace *ns); |
100 | extern void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids, | ||
101 | void (*free)(struct ipc_namespace *, | ||
102 | struct kern_ipc_perm *)); | ||
103 | |||
104 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | 99 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) |
105 | { | 100 | { |
106 | if (ns) | 101 | if (ns) |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 1e50c34f0062..cb2e77a3f7f7 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -157,7 +157,7 @@ struct irq_2_iommu; | |||
157 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 157 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
158 | * @lock: locking for SMP | 158 | * @lock: locking for SMP |
159 | * @affinity: IRQ affinity on SMP | 159 | * @affinity: IRQ affinity on SMP |
160 | * @cpu: cpu index useful for balancing | 160 | * @node: node index useful for balancing |
161 | * @pending_mask: pending rebalanced interrupts | 161 | * @pending_mask: pending rebalanced interrupts |
162 | * @threads_active: number of irqaction threads currently running | 162 | * @threads_active: number of irqaction threads currently running |
163 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers | 163 | * @wait_for_threads: wait queue for sync_irq to wait for threaded handlers |
@@ -423,7 +423,7 @@ extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | |||
423 | /** | 423 | /** |
424 | * alloc_desc_masks - allocate cpumasks for irq_desc | 424 | * alloc_desc_masks - allocate cpumasks for irq_desc |
425 | * @desc: pointer to irq_desc struct | 425 | * @desc: pointer to irq_desc struct |
426 | * @cpu: cpu which will be handling the cpumasks | 426 | * @node: node which will be handling the cpumasks |
427 | * @boot: true if need bootmem | 427 | * @boot: true if need bootmem |
428 | * | 428 | * |
429 | * Allocates affinity and pending_mask cpumask if required. | 429 | * Allocates affinity and pending_mask cpumask if required. |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index cc02393bfce8..d97eb652d6ca 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1315,6 +1315,12 @@ extern int jbd_blocks_per_page(struct inode *inode); | |||
1315 | #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) | 1315 | #define BUFFER_TRACE2(bh, bh2, info) do {} while (0) |
1316 | #define JBUFFER_TRACE(jh, info) do {} while (0) | 1316 | #define JBUFFER_TRACE(jh, info) do {} while (0) |
1317 | 1317 | ||
1318 | /* | ||
1319 | * jbd2_dev_to_name is a utility function used by the jbd2 and ext4 | ||
1320 | * tracing infrastructure to map a dev_t to a device name. | ||
1321 | */ | ||
1322 | extern const char *jbd2_dev_to_name(dev_t device); | ||
1323 | |||
1318 | #endif /* __KERNEL__ */ | 1324 | #endif /* __KERNEL__ */ |
1319 | 1325 | ||
1320 | #endif /* _LINUX_JBD2_H */ | 1326 | #endif /* _LINUX_JBD2_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index c5a71c38a95f..fac104e7186a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -58,7 +58,7 @@ extern const char linux_proc_banner[]; | |||
58 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) | 58 | #define _RET_IP_ (unsigned long)__builtin_return_address(0) |
59 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | 59 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) |
60 | 60 | ||
61 | #ifdef CONFIG_LBD | 61 | #ifdef CONFIG_LBDAF |
62 | # include <asm/div64.h> | 62 | # include <asm/div64.h> |
63 | # define sector_div(a, b) do_div(a, b) | 63 | # define sector_div(a, b) do_div(a, b) |
64 | #else | 64 | #else |
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index a77c6007dc99..348fa8874b52 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <linux/percpu.h> | 6 | #include <linux/percpu.h> |
7 | #include <linux/cpumask.h> | 7 | #include <linux/cpumask.h> |
8 | #include <linux/interrupt.h> | ||
8 | #include <asm/irq.h> | 9 | #include <asm/irq.h> |
9 | #include <asm/cputime.h> | 10 | #include <asm/cputime.h> |
10 | 11 | ||
@@ -31,6 +32,7 @@ struct kernel_stat { | |||
31 | #ifndef CONFIG_GENERIC_HARDIRQS | 32 | #ifndef CONFIG_GENERIC_HARDIRQS |
32 | unsigned int irqs[NR_IRQS]; | 33 | unsigned int irqs[NR_IRQS]; |
33 | #endif | 34 | #endif |
35 | unsigned int softirqs[NR_SOFTIRQS]; | ||
34 | }; | 36 | }; |
35 | 37 | ||
36 | DECLARE_PER_CPU(struct kernel_stat, kstat); | 38 | DECLARE_PER_CPU(struct kernel_stat, kstat); |
@@ -67,6 +69,16 @@ extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); | |||
67 | 69 | ||
68 | #endif | 70 | #endif |
69 | 71 | ||
72 | static inline void kstat_incr_softirqs_this_cpu(unsigned int irq) | ||
73 | { | ||
74 | kstat_this_cpu.softirqs[irq]++; | ||
75 | } | ||
76 | |||
77 | static inline unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) | ||
78 | { | ||
79 | return kstat_cpu(cpu).softirqs[irq]; | ||
80 | } | ||
81 | |||
70 | /* | 82 | /* |
71 | * Number of interrupts per specific IRQ source, since bootup | 83 | * Number of interrupts per specific IRQ source, since bootup |
72 | */ | 84 | */ |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 45add35dda1b..e46a0734ab6e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -117,7 +117,7 @@ static inline bool mem_cgroup_disabled(void) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | extern bool mem_cgroup_oom_called(struct task_struct *task); | 119 | extern bool mem_cgroup_oom_called(struct task_struct *task); |
120 | 120 | void mem_cgroup_update_mapped_file_stat(struct page *page, int val); | |
121 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ | 121 | #else /* CONFIG_CGROUP_MEM_RES_CTLR */ |
122 | struct mem_cgroup; | 122 | struct mem_cgroup; |
123 | 123 | ||
@@ -271,6 +271,11 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p) | |||
271 | { | 271 | { |
272 | } | 272 | } |
273 | 273 | ||
274 | static inline void mem_cgroup_update_mapped_file_stat(struct page *page, | ||
275 | int val) | ||
276 | { | ||
277 | } | ||
278 | |||
274 | #endif /* CONFIG_CGROUP_MEM_CONT */ | 279 | #endif /* CONFIG_CGROUP_MEM_CONT */ |
275 | 280 | ||
276 | #endif /* _LINUX_MEMCONTROL_H */ | 281 | #endif /* _LINUX_MEMCONTROL_H */ |
diff --git a/include/linux/mfd/ab3100.h b/include/linux/mfd/ab3100.h new file mode 100644 index 000000000000..7a3f316e3848 --- /dev/null +++ b/include/linux/mfd/ab3100.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2009 ST-Ericsson AB | ||
3 | * License terms: GNU General Public License (GPL) version 2 | ||
4 | * AB3100 core access functions | ||
5 | * Author: Linus Walleij <linus.walleij@stericsson.com> | ||
6 | */ | ||
7 | |||
8 | #include <linux/device.h> | ||
9 | |||
10 | #ifndef MFD_AB3100_H | ||
11 | #define MFD_AB3100_H | ||
12 | |||
13 | #define ABUNKNOWN 0 | ||
14 | #define AB3000 1 | ||
15 | #define AB3100 2 | ||
16 | |||
17 | /* | ||
18 | * AB3100, EVENTA1, A2 and A3 event register flags | ||
19 | * these are catenated into a single 32-bit flag in the code | ||
20 | * for event notification broadcasts. | ||
21 | */ | ||
22 | #define AB3100_EVENTA1_ONSWA (0x01<<16) | ||
23 | #define AB3100_EVENTA1_ONSWB (0x02<<16) | ||
24 | #define AB3100_EVENTA1_ONSWC (0x04<<16) | ||
25 | #define AB3100_EVENTA1_DCIO (0x08<<16) | ||
26 | #define AB3100_EVENTA1_OVER_TEMP (0x10<<16) | ||
27 | #define AB3100_EVENTA1_SIM_OFF (0x20<<16) | ||
28 | #define AB3100_EVENTA1_VBUS (0x40<<16) | ||
29 | #define AB3100_EVENTA1_VSET_USB (0x80<<16) | ||
30 | |||
31 | #define AB3100_EVENTA2_READY_TX (0x01<<8) | ||
32 | #define AB3100_EVENTA2_READY_RX (0x02<<8) | ||
33 | #define AB3100_EVENTA2_OVERRUN_ERROR (0x04<<8) | ||
34 | #define AB3100_EVENTA2_FRAMING_ERROR (0x08<<8) | ||
35 | #define AB3100_EVENTA2_CHARG_OVERCURRENT (0x10<<8) | ||
36 | #define AB3100_EVENTA2_MIDR (0x20<<8) | ||
37 | #define AB3100_EVENTA2_BATTERY_REM (0x40<<8) | ||
38 | #define AB3100_EVENTA2_ALARM (0x80<<8) | ||
39 | |||
40 | #define AB3100_EVENTA3_ADC_TRIG5 (0x01) | ||
41 | #define AB3100_EVENTA3_ADC_TRIG4 (0x02) | ||
42 | #define AB3100_EVENTA3_ADC_TRIG3 (0x04) | ||
43 | #define AB3100_EVENTA3_ADC_TRIG2 (0x08) | ||
44 | #define AB3100_EVENTA3_ADC_TRIGVBAT (0x10) | ||
45 | #define AB3100_EVENTA3_ADC_TRIGVTX (0x20) | ||
46 | #define AB3100_EVENTA3_ADC_TRIG1 (0x40) | ||
47 | #define AB3100_EVENTA3_ADC_TRIG0 (0x80) | ||
48 | |||
49 | /* AB3100, STR register flags */ | ||
50 | #define AB3100_STR_ONSWA (0x01) | ||
51 | #define AB3100_STR_ONSWB (0x02) | ||
52 | #define AB3100_STR_ONSWC (0x04) | ||
53 | #define AB3100_STR_DCIO (0x08) | ||
54 | #define AB3100_STR_BOOT_MODE (0x10) | ||
55 | #define AB3100_STR_SIM_OFF (0x20) | ||
56 | #define AB3100_STR_BATT_REMOVAL (0x40) | ||
57 | #define AB3100_STR_VBUS (0x80) | ||
58 | |||
59 | /** | ||
60 | * struct ab3100 | ||
61 | * @access_mutex: lock out concurrent accesses to the AB3100 registers | ||
62 | * @dev: pointer to the containing device | ||
63 | * @i2c_client: I2C client for this chip | ||
64 | * @testreg_client: secondary client for test registers | ||
65 | * @chip_name: name of this chip variant | ||
66 | * @chip_id: 8 bit chip ID for this chip variant | ||
67 | * @work: an event handling worker | ||
68 | * @event_subscribers: event subscribers are listed here | ||
69 | * @startup_events: a copy of the first reading of the event registers | ||
70 | * @startup_events_read: whether the first events have been read | ||
71 | * | ||
72 | * This struct is PRIVATE and devices using it should NOT | ||
73 | * access ANY fields. It is used as a token for calling the | ||
74 | * AB3100 functions. | ||
75 | */ | ||
76 | struct ab3100 { | ||
77 | struct mutex access_mutex; | ||
78 | struct device *dev; | ||
79 | struct i2c_client *i2c_client; | ||
80 | struct i2c_client *testreg_client; | ||
81 | char chip_name[32]; | ||
82 | u8 chip_id; | ||
83 | struct work_struct work; | ||
84 | struct blocking_notifier_head event_subscribers; | ||
85 | u32 startup_events; | ||
86 | bool startup_events_read; | ||
87 | }; | ||
88 | |||
89 | int ab3100_set_register(struct ab3100 *ab3100, u8 reg, u8 regval); | ||
90 | int ab3100_get_register(struct ab3100 *ab3100, u8 reg, u8 *regval); | ||
91 | int ab3100_get_register_page(struct ab3100 *ab3100, | ||
92 | u8 first_reg, u8 *regvals, u8 numregs); | ||
93 | int ab3100_mask_and_set_register(struct ab3100 *ab3100, | ||
94 | u8 reg, u8 andmask, u8 ormask); | ||
95 | u8 ab3100_get_chip_type(struct ab3100 *ab3100); | ||
96 | int ab3100_event_register(struct ab3100 *ab3100, | ||
97 | struct notifier_block *nb); | ||
98 | int ab3100_event_unregister(struct ab3100 *ab3100, | ||
99 | struct notifier_block *nb); | ||
100 | int ab3100_event_registers_startup_state_get(struct ab3100 *ab3100, | ||
101 | u32 *fatevent); | ||
102 | |||
103 | #endif | ||
diff --git a/include/linux/mfd/asic3.h b/include/linux/mfd/asic3.h index 322cd6deb9f0..de3c4ad19afb 100644 --- a/include/linux/mfd/asic3.h +++ b/include/linux/mfd/asic3.h | |||
@@ -30,6 +30,13 @@ struct asic3_platform_data { | |||
30 | #define ASIC3_NUM_GPIOS 64 | 30 | #define ASIC3_NUM_GPIOS 64 |
31 | #define ASIC3_NR_IRQS ASIC3_NUM_GPIOS + 6 | 31 | #define ASIC3_NR_IRQS ASIC3_NUM_GPIOS + 6 |
32 | 32 | ||
33 | #define ASIC3_IRQ_LED0 64 | ||
34 | #define ASIC3_IRQ_LED1 65 | ||
35 | #define ASIC3_IRQ_LED2 66 | ||
36 | #define ASIC3_IRQ_SPI 67 | ||
37 | #define ASIC3_IRQ_SMBUS 68 | ||
38 | #define ASIC3_IRQ_OWM 69 | ||
39 | |||
33 | #define ASIC3_TO_GPIO(gpio) (NR_BUILTIN_GPIO + (gpio)) | 40 | #define ASIC3_TO_GPIO(gpio) (NR_BUILTIN_GPIO + (gpio)) |
34 | 41 | ||
35 | #define ASIC3_GPIO_BANK_A 0 | 42 | #define ASIC3_GPIO_BANK_A 0 |
@@ -227,8 +234,8 @@ struct asic3_platform_data { | |||
227 | 234 | ||
228 | 235 | ||
229 | /* Basic control of the SD ASIC */ | 236 | /* Basic control of the SD ASIC */ |
230 | #define ASIC3_SDHWCTRL_Base 0x0E00 | 237 | #define ASIC3_SDHWCTRL_BASE 0x0E00 |
231 | #define ASIC3_SDHWCTRL_SDConf 0x00 | 238 | #define ASIC3_SDHWCTRL_SDCONF 0x00 |
232 | 239 | ||
233 | #define ASIC3_SDHWCTRL_SUSPEND (1 << 0) /* 1=suspend all SD operations */ | 240 | #define ASIC3_SDHWCTRL_SUSPEND (1 << 0) /* 1=suspend all SD operations */ |
234 | #define ASIC3_SDHWCTRL_CLKSEL (1 << 1) /* 1=SDICK, 0=HCLK */ | 241 | #define ASIC3_SDHWCTRL_CLKSEL (1 << 1) /* 1=SDICK, 0=HCLK */ |
@@ -242,10 +249,10 @@ struct asic3_platform_data { | |||
242 | /* SD card power supply ctrl 1=enable */ | 249 | /* SD card power supply ctrl 1=enable */ |
243 | #define ASIC3_SDHWCTRL_SDPWR (1 << 6) | 250 | #define ASIC3_SDHWCTRL_SDPWR (1 << 6) |
244 | 251 | ||
245 | #define ASIC3_EXTCF_Base 0x1100 | 252 | #define ASIC3_EXTCF_BASE 0x1100 |
246 | 253 | ||
247 | #define ASIC3_EXTCF_Select 0x00 | 254 | #define ASIC3_EXTCF_SELECT 0x00 |
248 | #define ASIC3_EXTCF_Reset 0x04 | 255 | #define ASIC3_EXTCF_RESET 0x04 |
249 | 256 | ||
250 | #define ASIC3_EXTCF_SMOD0 (1 << 0) /* slot number of mode 0 */ | 257 | #define ASIC3_EXTCF_SMOD0 (1 << 0) /* slot number of mode 0 */ |
251 | #define ASIC3_EXTCF_SMOD1 (1 << 1) /* slot number of mode 1 */ | 258 | #define ASIC3_EXTCF_SMOD1 (1 << 1) /* slot number of mode 1 */ |
@@ -279,222 +286,9 @@ struct asic3_platform_data { | |||
279 | * SDIO_CTRL Control registers for SDIO operations | 286 | * SDIO_CTRL Control registers for SDIO operations |
280 | * | 287 | * |
281 | *****************************************************************************/ | 288 | *****************************************************************************/ |
282 | #define ASIC3_SD_CONFIG_Base 0x0400 /* Assumes 32 bit addressing */ | 289 | #define ASIC3_SD_CONFIG_BASE 0x0400 /* Assumes 32 bit addressing */ |
283 | 290 | #define ASIC3_SD_CTRL_BASE 0x1000 | |
284 | #define ASIC3_SD_CONFIG_Command 0x08 /* R/W: Command */ | 291 | #define ASIC3_SDIO_CTRL_BASE 0x1200 |
285 | |||
286 | /* [0:8] SD Control Register Base Address */ | ||
287 | #define ASIC3_SD_CONFIG_Addr0 0x20 | ||
288 | |||
289 | /* [9:31] SD Control Register Base Address */ | ||
290 | #define ASIC3_SD_CONFIG_Addr1 0x24 | ||
291 | |||
292 | /* R/O: interrupt assigned to pin */ | ||
293 | #define ASIC3_SD_CONFIG_IntPin 0x78 | ||
294 | |||
295 | /* | ||
296 | * Set to 0x1f to clock SD controller, 0 otherwise. | ||
297 | * At 0x82 - Gated Clock Ctrl | ||
298 | */ | ||
299 | #define ASIC3_SD_CONFIG_ClkStop 0x80 | ||
300 | |||
301 | /* Control clock of SD controller */ | ||
302 | #define ASIC3_SD_CONFIG_ClockMode 0x84 | ||
303 | #define ASIC3_SD_CONFIG_SDHC_PinStatus 0x88 /* R/0: SD pins status */ | ||
304 | #define ASIC3_SD_CONFIG_SDHC_Power1 0x90 /* Power1 - manual pwr ctrl */ | ||
305 | |||
306 | /* auto power up after card inserted */ | ||
307 | #define ASIC3_SD_CONFIG_SDHC_Power2 0x92 | ||
308 | |||
309 | /* auto power down when card removed */ | ||
310 | #define ASIC3_SD_CONFIG_SDHC_Power3 0x94 | ||
311 | #define ASIC3_SD_CONFIG_SDHC_CardDetect 0x98 | ||
312 | #define ASIC3_SD_CONFIG_SDHC_Slot 0xA0 /* R/O: support slot number */ | ||
313 | #define ASIC3_SD_CONFIG_SDHC_ExtGateClk1 0x1E0 /* Not used */ | ||
314 | #define ASIC3_SD_CONFIG_SDHC_ExtGateClk2 0x1E2 /* Not used*/ | ||
315 | |||
316 | /* GPIO Output Reg. , at 0x1EA - GPIO Output Enable Reg. */ | ||
317 | #define ASIC3_SD_CONFIG_SDHC_GPIO_OutAndEnable 0x1E8 | ||
318 | #define ASIC3_SD_CONFIG_SDHC_GPIO_Status 0x1EC /* GPIO Status Reg. */ | ||
319 | |||
320 | /* Bit 1: double buffer/single buffer */ | ||
321 | #define ASIC3_SD_CONFIG_SDHC_ExtGateClk3 0x1F0 | ||
322 | |||
323 | /* Memory access enable (set to 1 to access SD Controller) */ | ||
324 | #define SD_CONFIG_COMMAND_MAE (1<<1) | ||
325 | |||
326 | #define SD_CONFIG_CLK_ENABLE_ALL 0x1f | ||
327 | |||
328 | #define SD_CONFIG_POWER1_PC_33V 0x0200 /* Set for 3.3 volts */ | ||
329 | #define SD_CONFIG_POWER1_PC_OFF 0x0000 /* Turn off power */ | ||
330 | |||
331 | /* two bits - number of cycles for card detection */ | ||
332 | #define SD_CONFIG_CARDDETECTMODE_CLK ((x) & 0x3) | ||
333 | |||
334 | |||
335 | #define ASIC3_SD_CTRL_Base 0x1000 | ||
336 | |||
337 | #define ASIC3_SD_CTRL_Cmd 0x00 | ||
338 | #define ASIC3_SD_CTRL_Arg0 0x08 | ||
339 | #define ASIC3_SD_CTRL_Arg1 0x0C | ||
340 | #define ASIC3_SD_CTRL_StopInternal 0x10 | ||
341 | #define ASIC3_SD_CTRL_TransferSectorCount 0x14 | ||
342 | #define ASIC3_SD_CTRL_Response0 0x18 | ||
343 | #define ASIC3_SD_CTRL_Response1 0x1C | ||
344 | #define ASIC3_SD_CTRL_Response2 0x20 | ||
345 | #define ASIC3_SD_CTRL_Response3 0x24 | ||
346 | #define ASIC3_SD_CTRL_Response4 0x28 | ||
347 | #define ASIC3_SD_CTRL_Response5 0x2C | ||
348 | #define ASIC3_SD_CTRL_Response6 0x30 | ||
349 | #define ASIC3_SD_CTRL_Response7 0x34 | ||
350 | #define ASIC3_SD_CTRL_CardStatus 0x38 | ||
351 | #define ASIC3_SD_CTRL_BufferCtrl 0x3C | ||
352 | #define ASIC3_SD_CTRL_IntMaskCard 0x40 | ||
353 | #define ASIC3_SD_CTRL_IntMaskBuffer 0x44 | ||
354 | #define ASIC3_SD_CTRL_CardClockCtrl 0x48 | ||
355 | #define ASIC3_SD_CTRL_MemCardXferDataLen 0x4C | ||
356 | #define ASIC3_SD_CTRL_MemCardOptionSetup 0x50 | ||
357 | #define ASIC3_SD_CTRL_ErrorStatus0 0x58 | ||
358 | #define ASIC3_SD_CTRL_ErrorStatus1 0x5C | ||
359 | #define ASIC3_SD_CTRL_DataPort 0x60 | ||
360 | #define ASIC3_SD_CTRL_TransactionCtrl 0x68 | ||
361 | #define ASIC3_SD_CTRL_SoftwareReset 0x1C0 | ||
362 | |||
363 | #define SD_CTRL_SOFTWARE_RESET_CLEAR (1<<0) | ||
364 | |||
365 | #define SD_CTRL_TRANSACTIONCONTROL_SET (1<<8) | ||
366 | |||
367 | #define SD_CTRL_CARDCLOCKCONTROL_FOR_SD_CARD (1<<15) | ||
368 | #define SD_CTRL_CARDCLOCKCONTROL_ENABLE_CLOCK (1<<8) | ||
369 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_512 (1<<7) | ||
370 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_256 (1<<6) | ||
371 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_128 (1<<5) | ||
372 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_64 (1<<4) | ||
373 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_32 (1<<3) | ||
374 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_16 (1<<2) | ||
375 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_8 (1<<1) | ||
376 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_4 (1<<0) | ||
377 | #define SD_CTRL_CARDCLOCKCONTROL_CLK_DIV_2 (0<<0) | ||
378 | |||
379 | #define MEM_CARD_OPTION_REQUIRED 0x000e | ||
380 | #define MEM_CARD_OPTION_DATA_RESPONSE_TIMEOUT(x) (((x) & 0x0f) << 4) | ||
381 | #define MEM_CARD_OPTION_C2_MODULE_NOT_PRESENT (1<<14) | ||
382 | #define MEM_CARD_OPTION_DATA_XFR_WIDTH_1 (1<<15) | ||
383 | #define MEM_CARD_OPTION_DATA_XFR_WIDTH_4 0 | ||
384 | |||
385 | #define SD_CTRL_COMMAND_INDEX(x) ((x) & 0x3f) | ||
386 | #define SD_CTRL_COMMAND_TYPE_CMD (0 << 6) | ||
387 | #define SD_CTRL_COMMAND_TYPE_ACMD (1 << 6) | ||
388 | #define SD_CTRL_COMMAND_TYPE_AUTHENTICATION (2 << 6) | ||
389 | #define SD_CTRL_COMMAND_RESPONSE_TYPE_NORMAL (0 << 8) | ||
390 | #define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1 (4 << 8) | ||
391 | #define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R1B (5 << 8) | ||
392 | #define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R2 (6 << 8) | ||
393 | #define SD_CTRL_COMMAND_RESPONSE_TYPE_EXT_R3 (7 << 8) | ||
394 | #define SD_CTRL_COMMAND_DATA_PRESENT (1 << 11) | ||
395 | #define SD_CTRL_COMMAND_TRANSFER_READ (1 << 12) | ||
396 | #define SD_CTRL_COMMAND_TRANSFER_WRITE (0 << 12) | ||
397 | #define SD_CTRL_COMMAND_MULTI_BLOCK (1 << 13) | ||
398 | #define SD_CTRL_COMMAND_SECURITY_CMD (1 << 14) | ||
399 | |||
400 | #define SD_CTRL_STOP_INTERNAL_ISSSUE_CMD12 (1 << 0) | ||
401 | #define SD_CTRL_STOP_INTERNAL_AUTO_ISSUE_CMD12 (1 << 8) | ||
402 | |||
403 | #define SD_CTRL_CARDSTATUS_RESPONSE_END (1 << 0) | ||
404 | #define SD_CTRL_CARDSTATUS_RW_END (1 << 2) | ||
405 | #define SD_CTRL_CARDSTATUS_CARD_REMOVED_0 (1 << 3) | ||
406 | #define SD_CTRL_CARDSTATUS_CARD_INSERTED_0 (1 << 4) | ||
407 | #define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_0 (1 << 5) | ||
408 | #define SD_CTRL_CARDSTATUS_WRITE_PROTECT (1 << 7) | ||
409 | #define SD_CTRL_CARDSTATUS_CARD_REMOVED_3 (1 << 8) | ||
410 | #define SD_CTRL_CARDSTATUS_CARD_INSERTED_3 (1 << 9) | ||
411 | #define SD_CTRL_CARDSTATUS_SIGNAL_STATE_PRESENT_3 (1 << 10) | ||
412 | |||
413 | #define SD_CTRL_BUFFERSTATUS_CMD_INDEX_ERROR (1 << 0) | ||
414 | #define SD_CTRL_BUFFERSTATUS_CRC_ERROR (1 << 1) | ||
415 | #define SD_CTRL_BUFFERSTATUS_STOP_BIT_END_ERROR (1 << 2) | ||
416 | #define SD_CTRL_BUFFERSTATUS_DATA_TIMEOUT (1 << 3) | ||
417 | #define SD_CTRL_BUFFERSTATUS_BUFFER_OVERFLOW (1 << 4) | ||
418 | #define SD_CTRL_BUFFERSTATUS_BUFFER_UNDERFLOW (1 << 5) | ||
419 | #define SD_CTRL_BUFFERSTATUS_CMD_TIMEOUT (1 << 6) | ||
420 | #define SD_CTRL_BUFFERSTATUS_UNK7 (1 << 7) | ||
421 | #define SD_CTRL_BUFFERSTATUS_BUFFER_READ_ENABLE (1 << 8) | ||
422 | #define SD_CTRL_BUFFERSTATUS_BUFFER_WRITE_ENABLE (1 << 9) | ||
423 | #define SD_CTRL_BUFFERSTATUS_ILLEGAL_FUNCTION (1 << 13) | ||
424 | #define SD_CTRL_BUFFERSTATUS_CMD_BUSY (1 << 14) | ||
425 | #define SD_CTRL_BUFFERSTATUS_ILLEGAL_ACCESS (1 << 15) | ||
426 | |||
427 | #define SD_CTRL_INTMASKCARD_RESPONSE_END (1 << 0) | ||
428 | #define SD_CTRL_INTMASKCARD_RW_END (1 << 2) | ||
429 | #define SD_CTRL_INTMASKCARD_CARD_REMOVED_0 (1 << 3) | ||
430 | #define SD_CTRL_INTMASKCARD_CARD_INSERTED_0 (1 << 4) | ||
431 | #define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_0 (1 << 5) | ||
432 | #define SD_CTRL_INTMASKCARD_UNK6 (1 << 6) | ||
433 | #define SD_CTRL_INTMASKCARD_WRITE_PROTECT (1 << 7) | ||
434 | #define SD_CTRL_INTMASKCARD_CARD_REMOVED_3 (1 << 8) | ||
435 | #define SD_CTRL_INTMASKCARD_CARD_INSERTED_3 (1 << 9) | ||
436 | #define SD_CTRL_INTMASKCARD_SIGNAL_STATE_PRESENT_3 (1 << 10) | ||
437 | |||
438 | #define SD_CTRL_INTMASKBUFFER_CMD_INDEX_ERROR (1 << 0) | ||
439 | #define SD_CTRL_INTMASKBUFFER_CRC_ERROR (1 << 1) | ||
440 | #define SD_CTRL_INTMASKBUFFER_STOP_BIT_END_ERROR (1 << 2) | ||
441 | #define SD_CTRL_INTMASKBUFFER_DATA_TIMEOUT (1 << 3) | ||
442 | #define SD_CTRL_INTMASKBUFFER_BUFFER_OVERFLOW (1 << 4) | ||
443 | #define SD_CTRL_INTMASKBUFFER_BUFFER_UNDERFLOW (1 << 5) | ||
444 | #define SD_CTRL_INTMASKBUFFER_CMD_TIMEOUT (1 << 6) | ||
445 | #define SD_CTRL_INTMASKBUFFER_UNK7 (1 << 7) | ||
446 | #define SD_CTRL_INTMASKBUFFER_BUFFER_READ_ENABLE (1 << 8) | ||
447 | #define SD_CTRL_INTMASKBUFFER_BUFFER_WRITE_ENABLE (1 << 9) | ||
448 | #define SD_CTRL_INTMASKBUFFER_ILLEGAL_FUNCTION (1 << 13) | ||
449 | #define SD_CTRL_INTMASKBUFFER_CMD_BUSY (1 << 14) | ||
450 | #define SD_CTRL_INTMASKBUFFER_ILLEGAL_ACCESS (1 << 15) | ||
451 | |||
452 | #define SD_CTRL_DETAIL0_RESPONSE_CMD_ERROR (1 << 0) | ||
453 | #define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 2) | ||
454 | #define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_RESPONSE_CMD12 (1 << 3) | ||
455 | #define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_READ_DATA (1 << 4) | ||
456 | #define SD_CTRL_DETAIL0_END_BIT_ERROR_FOR_WRITE_CRC_STATUS (1 << 5) | ||
457 | #define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_NON_CMD12 (1 << 8) | ||
458 | #define SD_CTRL_DETAIL0_CRC_ERROR_FOR_RESPONSE_CMD12 (1 << 9) | ||
459 | #define SD_CTRL_DETAIL0_CRC_ERROR_FOR_READ_DATA (1 << 10) | ||
460 | #define SD_CTRL_DETAIL0_CRC_ERROR_FOR_WRITE_CMD (1 << 11) | ||
461 | |||
462 | #define SD_CTRL_DETAIL1_NO_CMD_RESPONSE (1 << 0) | ||
463 | #define SD_CTRL_DETAIL1_TIMEOUT_READ_DATA (1 << 4) | ||
464 | #define SD_CTRL_DETAIL1_TIMEOUT_CRS_STATUS (1 << 5) | ||
465 | #define SD_CTRL_DETAIL1_TIMEOUT_CRC_BUSY (1 << 6) | ||
466 | |||
467 | #define ASIC3_SDIO_CTRL_Base 0x1200 | ||
468 | |||
469 | #define ASIC3_SDIO_CTRL_Cmd 0x00 | ||
470 | #define ASIC3_SDIO_CTRL_CardPortSel 0x04 | ||
471 | #define ASIC3_SDIO_CTRL_Arg0 0x08 | ||
472 | #define ASIC3_SDIO_CTRL_Arg1 0x0C | ||
473 | #define ASIC3_SDIO_CTRL_TransferBlockCount 0x14 | ||
474 | #define ASIC3_SDIO_CTRL_Response0 0x18 | ||
475 | #define ASIC3_SDIO_CTRL_Response1 0x1C | ||
476 | #define ASIC3_SDIO_CTRL_Response2 0x20 | ||
477 | #define ASIC3_SDIO_CTRL_Response3 0x24 | ||
478 | #define ASIC3_SDIO_CTRL_Response4 0x28 | ||
479 | #define ASIC3_SDIO_CTRL_Response5 0x2C | ||
480 | #define ASIC3_SDIO_CTRL_Response6 0x30 | ||
481 | #define ASIC3_SDIO_CTRL_Response7 0x34 | ||
482 | #define ASIC3_SDIO_CTRL_CardStatus 0x38 | ||
483 | #define ASIC3_SDIO_CTRL_BufferCtrl 0x3C | ||
484 | #define ASIC3_SDIO_CTRL_IntMaskCard 0x40 | ||
485 | #define ASIC3_SDIO_CTRL_IntMaskBuffer 0x44 | ||
486 | #define ASIC3_SDIO_CTRL_CardXferDataLen 0x4C | ||
487 | #define ASIC3_SDIO_CTRL_CardOptionSetup 0x50 | ||
488 | #define ASIC3_SDIO_CTRL_ErrorStatus0 0x54 | ||
489 | #define ASIC3_SDIO_CTRL_ErrorStatus1 0x58 | ||
490 | #define ASIC3_SDIO_CTRL_DataPort 0x60 | ||
491 | #define ASIC3_SDIO_CTRL_TransactionCtrl 0x68 | ||
492 | #define ASIC3_SDIO_CTRL_CardIntCtrl 0x6C | ||
493 | #define ASIC3_SDIO_CTRL_ClocknWaitCtrl 0x70 | ||
494 | #define ASIC3_SDIO_CTRL_HostInformation 0x74 | ||
495 | #define ASIC3_SDIO_CTRL_ErrorCtrl 0x78 | ||
496 | #define ASIC3_SDIO_CTRL_LEDCtrl 0x7C | ||
497 | #define ASIC3_SDIO_CTRL_SoftwareReset 0x1C0 | ||
498 | 292 | ||
499 | #define ASIC3_MAP_SIZE_32BIT 0x2000 | 293 | #define ASIC3_MAP_SIZE_32BIT 0x2000 |
500 | #define ASIC3_MAP_SIZE_16BIT 0x1000 | 294 | #define ASIC3_MAP_SIZE_16BIT 0x1000 |
diff --git a/include/linux/mfd/ezx-pcap.h b/include/linux/mfd/ezx-pcap.h new file mode 100644 index 000000000000..c12c3c0932bf --- /dev/null +++ b/include/linux/mfd/ezx-pcap.h | |||
@@ -0,0 +1,256 @@ | |||
1 | /* | ||
2 | * Copyright 2009 Daniel Ribeiro <drwyrm@gmail.com> | ||
3 | * | ||
4 | * For further information, please see http://wiki.openezx.org/PCAP2 | ||
5 | */ | ||
6 | |||
7 | #ifndef EZX_PCAP_H | ||
8 | #define EZX_PCAP_H | ||
9 | |||
10 | struct pcap_subdev { | ||
11 | int id; | ||
12 | const char *name; | ||
13 | void *platform_data; | ||
14 | }; | ||
15 | |||
16 | struct pcap_platform_data { | ||
17 | unsigned int irq_base; | ||
18 | unsigned int config; | ||
19 | void (*init) (void *); /* board specific init */ | ||
20 | int num_subdevs; | ||
21 | struct pcap_subdev *subdevs; | ||
22 | }; | ||
23 | |||
24 | struct pcap_chip; | ||
25 | |||
26 | int ezx_pcap_write(struct pcap_chip *, u8, u32); | ||
27 | int ezx_pcap_read(struct pcap_chip *, u8, u32 *); | ||
28 | int pcap_to_irq(struct pcap_chip *, int); | ||
29 | int pcap_adc_async(struct pcap_chip *, u8, u32, u8[], void *, void *); | ||
30 | int pcap_adc_sync(struct pcap_chip *, u8, u32, u8[], u16[]); | ||
31 | |||
32 | #define PCAP_SECOND_PORT 1 | ||
33 | #define PCAP_CS_AH 2 | ||
34 | |||
35 | #define PCAP_REGISTER_WRITE_OP_BIT 0x80000000 | ||
36 | #define PCAP_REGISTER_READ_OP_BIT 0x00000000 | ||
37 | |||
38 | #define PCAP_REGISTER_VALUE_MASK 0x01ffffff | ||
39 | #define PCAP_REGISTER_ADDRESS_MASK 0x7c000000 | ||
40 | #define PCAP_REGISTER_ADDRESS_SHIFT 26 | ||
41 | #define PCAP_REGISTER_NUMBER 32 | ||
42 | #define PCAP_CLEAR_INTERRUPT_REGISTER 0x01ffffff | ||
43 | #define PCAP_MASK_ALL_INTERRUPT 0x01ffffff | ||
44 | |||
45 | /* registers acessible by both pcap ports */ | ||
46 | #define PCAP_REG_ISR 0x0 /* Interrupt Status */ | ||
47 | #define PCAP_REG_MSR 0x1 /* Interrupt Mask */ | ||
48 | #define PCAP_REG_PSTAT 0x2 /* Processor Status */ | ||
49 | #define PCAP_REG_VREG2 0x6 /* Regulator Bank 2 Control */ | ||
50 | #define PCAP_REG_AUXVREG 0x7 /* Auxiliary Regulator Control */ | ||
51 | #define PCAP_REG_BATT 0x8 /* Battery Control */ | ||
52 | #define PCAP_REG_ADC 0x9 /* AD Control */ | ||
53 | #define PCAP_REG_ADR 0xa /* AD Result */ | ||
54 | #define PCAP_REG_CODEC 0xb /* Audio Codec Control */ | ||
55 | #define PCAP_REG_RX_AMPS 0xc /* RX Audio Amplifiers Control */ | ||
56 | #define PCAP_REG_ST_DAC 0xd /* Stereo DAC Control */ | ||
57 | #define PCAP_REG_BUSCTRL 0x14 /* Connectivity Control */ | ||
58 | #define PCAP_REG_PERIPH 0x15 /* Peripheral Control */ | ||
59 | #define PCAP_REG_LOWPWR 0x18 /* Regulator Low Power Control */ | ||
60 | #define PCAP_REG_TX_AMPS 0x1a /* TX Audio Amplifiers Control */ | ||
61 | #define PCAP_REG_GP 0x1b /* General Purpose */ | ||
62 | #define PCAP_REG_TEST1 0x1c | ||
63 | #define PCAP_REG_TEST2 0x1d | ||
64 | #define PCAP_REG_VENDOR_TEST1 0x1e | ||
65 | #define PCAP_REG_VENDOR_TEST2 0x1f | ||
66 | |||
67 | /* registers acessible by pcap port 1 only (a1200, e2 & e6) */ | ||
68 | #define PCAP_REG_INT_SEL 0x3 /* Interrupt Select */ | ||
69 | #define PCAP_REG_SWCTRL 0x4 /* Switching Regulator Control */ | ||
70 | #define PCAP_REG_VREG1 0x5 /* Regulator Bank 1 Control */ | ||
71 | #define PCAP_REG_RTC_TOD 0xe /* RTC Time of Day */ | ||
72 | #define PCAP_REG_RTC_TODA 0xf /* RTC Time of Day Alarm */ | ||
73 | #define PCAP_REG_RTC_DAY 0x10 /* RTC Day */ | ||
74 | #define PCAP_REG_RTC_DAYA 0x11 /* RTC Day Alarm */ | ||
75 | #define PCAP_REG_MTRTMR 0x12 /* AD Monitor Timer */ | ||
76 | #define PCAP_REG_PWR 0x13 /* Power Control */ | ||
77 | #define PCAP_REG_AUXVREG_MASK 0x16 /* Auxiliary Regulator Mask */ | ||
78 | #define PCAP_REG_VENDOR_REV 0x17 | ||
79 | #define PCAP_REG_PERIPH_MASK 0x19 /* Peripheral Mask */ | ||
80 | |||
81 | /* PCAP2 Interrupts */ | ||
82 | #define PCAP_NIRQS 23 | ||
83 | #define PCAP_IRQ_ADCDONE 0 /* ADC done port 1 */ | ||
84 | #define PCAP_IRQ_TS 1 /* Touch Screen */ | ||
85 | #define PCAP_IRQ_1HZ 2 /* 1HZ timer */ | ||
86 | #define PCAP_IRQ_WH 3 /* ADC above high limit */ | ||
87 | #define PCAP_IRQ_WL 4 /* ADC below low limit */ | ||
88 | #define PCAP_IRQ_TODA 5 /* Time of day alarm */ | ||
89 | #define PCAP_IRQ_USB4V 6 /* USB above 4V */ | ||
90 | #define PCAP_IRQ_ONOFF 7 /* On/Off button */ | ||
91 | #define PCAP_IRQ_ONOFF2 8 /* On/Off button 2 */ | ||
92 | #define PCAP_IRQ_USB1V 9 /* USB above 1V */ | ||
93 | #define PCAP_IRQ_MOBPORT 10 | ||
94 | #define PCAP_IRQ_MIC 11 /* Mic attach/HS button */ | ||
95 | #define PCAP_IRQ_HS 12 /* Headset attach */ | ||
96 | #define PCAP_IRQ_ST 13 | ||
97 | #define PCAP_IRQ_PC 14 /* Power Cut */ | ||
98 | #define PCAP_IRQ_WARM 15 | ||
99 | #define PCAP_IRQ_EOL 16 /* Battery End Of Life */ | ||
100 | #define PCAP_IRQ_CLK 17 | ||
101 | #define PCAP_IRQ_SYSRST 18 /* System Reset */ | ||
102 | #define PCAP_IRQ_DUMMY 19 | ||
103 | #define PCAP_IRQ_ADCDONE2 20 /* ADC done port 2 */ | ||
104 | #define PCAP_IRQ_SOFTRESET 21 | ||
105 | #define PCAP_IRQ_MNEXB 22 | ||
106 | |||
107 | /* voltage regulators */ | ||
108 | #define V1 0 | ||
109 | #define V2 1 | ||
110 | #define V3 2 | ||
111 | #define V4 3 | ||
112 | #define V5 4 | ||
113 | #define V6 5 | ||
114 | #define V7 6 | ||
115 | #define V8 7 | ||
116 | #define V9 8 | ||
117 | #define V10 9 | ||
118 | #define VAUX1 10 | ||
119 | #define VAUX2 11 | ||
120 | #define VAUX3 12 | ||
121 | #define VAUX4 13 | ||
122 | #define VSIM 14 | ||
123 | #define VSIM2 15 | ||
124 | #define VVIB 16 | ||
125 | #define SW1 17 | ||
126 | #define SW2 18 | ||
127 | #define SW3 19 | ||
128 | #define SW1S 20 | ||
129 | #define SW2S 21 | ||
130 | |||
131 | #define PCAP_BATT_DAC_MASK 0x000000ff | ||
132 | #define PCAP_BATT_DAC_SHIFT 0 | ||
133 | #define PCAP_BATT_B_FDBK (1 << 8) | ||
134 | #define PCAP_BATT_EXT_ISENSE (1 << 9) | ||
135 | #define PCAP_BATT_V_COIN_MASK 0x00003c00 | ||
136 | #define PCAP_BATT_V_COIN_SHIFT 10 | ||
137 | #define PCAP_BATT_I_COIN (1 << 14) | ||
138 | #define PCAP_BATT_COIN_CH_EN (1 << 15) | ||
139 | #define PCAP_BATT_EOL_SEL_MASK 0x000e0000 | ||
140 | #define PCAP_BATT_EOL_SEL_SHIFT 17 | ||
141 | #define PCAP_BATT_EOL_CMP_EN (1 << 20) | ||
142 | #define PCAP_BATT_BATT_DET_EN (1 << 21) | ||
143 | #define PCAP_BATT_THERMBIAS_CTRL (1 << 22) | ||
144 | |||
145 | #define PCAP_ADC_ADEN (1 << 0) | ||
146 | #define PCAP_ADC_RAND (1 << 1) | ||
147 | #define PCAP_ADC_AD_SEL1 (1 << 2) | ||
148 | #define PCAP_ADC_AD_SEL2 (1 << 3) | ||
149 | #define PCAP_ADC_ADA1_MASK 0x00000070 | ||
150 | #define PCAP_ADC_ADA1_SHIFT 4 | ||
151 | #define PCAP_ADC_ADA2_MASK 0x00000380 | ||
152 | #define PCAP_ADC_ADA2_SHIFT 7 | ||
153 | #define PCAP_ADC_ATO_MASK 0x00003c00 | ||
154 | #define PCAP_ADC_ATO_SHIFT 10 | ||
155 | #define PCAP_ADC_ATOX (1 << 14) | ||
156 | #define PCAP_ADC_MTR1 (1 << 15) | ||
157 | #define PCAP_ADC_MTR2 (1 << 16) | ||
158 | #define PCAP_ADC_TS_M_MASK 0x000e0000 | ||
159 | #define PCAP_ADC_TS_M_SHIFT 17 | ||
160 | #define PCAP_ADC_TS_REF_LOWPWR (1 << 20) | ||
161 | #define PCAP_ADC_TS_REFENB (1 << 21) | ||
162 | #define PCAP_ADC_BATT_I_POLARITY (1 << 22) | ||
163 | #define PCAP_ADC_BATT_I_ADC (1 << 23) | ||
164 | |||
165 | #define PCAP_ADC_BANK_0 0 | ||
166 | #define PCAP_ADC_BANK_1 1 | ||
167 | /* ADC bank 0 */ | ||
168 | #define PCAP_ADC_CH_COIN 0 | ||
169 | #define PCAP_ADC_CH_BATT 1 | ||
170 | #define PCAP_ADC_CH_BPLUS 2 | ||
171 | #define PCAP_ADC_CH_MOBPORTB 3 | ||
172 | #define PCAP_ADC_CH_TEMPERATURE 4 | ||
173 | #define PCAP_ADC_CH_CHARGER_ID 5 | ||
174 | #define PCAP_ADC_CH_AD6 6 | ||
175 | /* ADC bank 1 */ | ||
176 | #define PCAP_ADC_CH_AD7 0 | ||
177 | #define PCAP_ADC_CH_AD8 1 | ||
178 | #define PCAP_ADC_CH_AD9 2 | ||
179 | #define PCAP_ADC_CH_TS_X1 3 | ||
180 | #define PCAP_ADC_CH_TS_X2 4 | ||
181 | #define PCAP_ADC_CH_TS_Y1 5 | ||
182 | #define PCAP_ADC_CH_TS_Y2 6 | ||
183 | |||
184 | #define PCAP_ADC_T_NOW 0 | ||
185 | #define PCAP_ADC_T_IN_BURST 1 | ||
186 | #define PCAP_ADC_T_OUT_BURST 2 | ||
187 | |||
188 | #define PCAP_ADC_ATO_IN_BURST 6 | ||
189 | #define PCAP_ADC_ATO_OUT_BURST 0 | ||
190 | |||
191 | #define PCAP_ADC_TS_M_XY 1 | ||
192 | #define PCAP_ADC_TS_M_PRESSURE 2 | ||
193 | #define PCAP_ADC_TS_M_PLATE_X 3 | ||
194 | #define PCAP_ADC_TS_M_PLATE_Y 4 | ||
195 | #define PCAP_ADC_TS_M_STANDBY 5 | ||
196 | #define PCAP_ADC_TS_M_NONTS 6 | ||
197 | |||
198 | #define PCAP_ADR_ADD1_MASK 0x000003ff | ||
199 | #define PCAP_ADR_ADD1_SHIFT 0 | ||
200 | #define PCAP_ADR_ADD2_MASK 0x000ffc00 | ||
201 | #define PCAP_ADR_ADD2_SHIFT 10 | ||
202 | #define PCAP_ADR_ADINC1 (1 << 20) | ||
203 | #define PCAP_ADR_ADINC2 (1 << 21) | ||
204 | #define PCAP_ADR_ASC (1 << 22) | ||
205 | #define PCAP_ADR_ONESHOT (1 << 23) | ||
206 | |||
207 | #define PCAP_BUSCTRL_FSENB (1 << 0) | ||
208 | #define PCAP_BUSCTRL_USB_SUSPEND (1 << 1) | ||
209 | #define PCAP_BUSCTRL_USB_PU (1 << 2) | ||
210 | #define PCAP_BUSCTRL_USB_PD (1 << 3) | ||
211 | #define PCAP_BUSCTRL_VUSB_EN (1 << 4) | ||
212 | #define PCAP_BUSCTRL_USB_PS (1 << 5) | ||
213 | #define PCAP_BUSCTRL_VUSB_MSTR_EN (1 << 6) | ||
214 | #define PCAP_BUSCTRL_VBUS_PD_ENB (1 << 7) | ||
215 | #define PCAP_BUSCTRL_CURRLIM (1 << 8) | ||
216 | #define PCAP_BUSCTRL_RS232ENB (1 << 9) | ||
217 | #define PCAP_BUSCTRL_RS232_DIR (1 << 10) | ||
218 | #define PCAP_BUSCTRL_SE0_CONN (1 << 11) | ||
219 | #define PCAP_BUSCTRL_USB_PDM (1 << 12) | ||
220 | #define PCAP_BUSCTRL_BUS_PRI_ADJ (1 << 24) | ||
221 | |||
222 | /* leds */ | ||
223 | #define PCAP_LED0 0 | ||
224 | #define PCAP_LED1 1 | ||
225 | #define PCAP_BL0 2 | ||
226 | #define PCAP_BL1 3 | ||
227 | #define PCAP_VIB 4 | ||
228 | #define PCAP_LED_3MA 0 | ||
229 | #define PCAP_LED_4MA 1 | ||
230 | #define PCAP_LED_5MA 2 | ||
231 | #define PCAP_LED_9MA 3 | ||
232 | #define PCAP_LED_GPIO_VAL_MASK 0x00ffffff | ||
233 | #define PCAP_LED_GPIO_EN 0x01000000 | ||
234 | #define PCAP_LED_GPIO_INVERT 0x02000000 | ||
235 | #define PCAP_LED_T_MASK 0xf | ||
236 | #define PCAP_LED_C_MASK 0x3 | ||
237 | #define PCAP_BL_MASK 0x1f | ||
238 | #define PCAP_BL0_SHIFT 0 | ||
239 | #define PCAP_LED0_EN (1 << 5) | ||
240 | #define PCAP_LED1_EN (1 << 6) | ||
241 | #define PCAP_LED0_T_SHIFT 7 | ||
242 | #define PCAP_LED1_T_SHIFT 11 | ||
243 | #define PCAP_LED0_C_SHIFT 15 | ||
244 | #define PCAP_LED1_C_SHIFT 17 | ||
245 | #define PCAP_BL1_SHIFT 20 | ||
246 | #define PCAP_VIB_MASK 0x3 | ||
247 | #define PCAP_VIB_SHIFT 20 | ||
248 | #define PCAP_VIB_EN (1 << 19) | ||
249 | |||
250 | /* RTC */ | ||
251 | #define PCAP_RTC_DAY_MASK 0x3fff | ||
252 | #define PCAP_RTC_TOD_MASK 0xffff | ||
253 | #define PCAP_RTC_PC_MASK 0x7 | ||
254 | #define SEC_PER_DAY 86400 | ||
255 | |||
256 | #endif | ||
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index c377118884e6..6b9c5d06690c 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * data for the MMC controller | 22 | * data for the MMC controller |
23 | */ | 23 | */ |
24 | struct tmio_mmc_data { | 24 | struct tmio_mmc_data { |
25 | unsigned int hclk; | 25 | const unsigned int hclk; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | /* | 28 | /* |
diff --git a/include/linux/mm.h b/include/linux/mm.h index d88d6fc530ad..d006e93d5c93 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -810,11 +810,11 @@ extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); | |||
810 | 810 | ||
811 | #ifdef CONFIG_MMU | 811 | #ifdef CONFIG_MMU |
812 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 812 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
813 | unsigned long address, int write_access); | 813 | unsigned long address, unsigned int flags); |
814 | #else | 814 | #else |
815 | static inline int handle_mm_fault(struct mm_struct *mm, | 815 | static inline int handle_mm_fault(struct mm_struct *mm, |
816 | struct vm_area_struct *vma, unsigned long address, | 816 | struct vm_area_struct *vma, unsigned long address, |
817 | int write_access) | 817 | unsigned int flags) |
818 | { | 818 | { |
819 | /* should never happen if there's no MMU */ | 819 | /* should never happen if there's no MMU */ |
820 | BUG(); | 820 | BUG(); |
@@ -854,6 +854,12 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
854 | unsigned long end, unsigned long newflags); | 854 | unsigned long end, unsigned long newflags); |
855 | 855 | ||
856 | /* | 856 | /* |
857 | * doesn't attempt to fault and will return short. | ||
858 | */ | ||
859 | int __get_user_pages_fast(unsigned long start, int nr_pages, int write, | ||
860 | struct page **pages); | ||
861 | |||
862 | /* | ||
857 | * A callback you can register to apply pressure to ageable caches. | 863 | * A callback you can register to apply pressure to ageable caches. |
858 | * | 864 | * |
859 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should | 865 | * 'shrink' is passed a count 'nr_to_scan' and a 'gfpmask'. It should |
diff --git a/include/linux/module.h b/include/linux/module.h index 505f20dcc1c7..098bdb7bfacf 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -363,6 +363,12 @@ struct module | |||
363 | local_t ref; | 363 | local_t ref; |
364 | #endif | 364 | #endif |
365 | #endif | 365 | #endif |
366 | |||
367 | #ifdef CONFIG_CONSTRUCTORS | ||
368 | /* Constructor functions. */ | ||
369 | ctor_fn_t *ctors; | ||
370 | unsigned int num_ctors; | ||
371 | #endif | ||
366 | }; | 372 | }; |
367 | #ifndef MODULE_ARCH_INIT | 373 | #ifndef MODULE_ARCH_INIT |
368 | #define MODULE_ARCH_INIT {} | 374 | #define MODULE_ARCH_INIT {} |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9ea8d6dfe540..d4a4d9867794 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -224,6 +224,11 @@ struct netdev_hw_addr { | |||
224 | struct rcu_head rcu_head; | 224 | struct rcu_head rcu_head; |
225 | }; | 225 | }; |
226 | 226 | ||
227 | struct netdev_hw_addr_list { | ||
228 | struct list_head list; | ||
229 | int count; | ||
230 | }; | ||
231 | |||
227 | struct hh_cache | 232 | struct hh_cache |
228 | { | 233 | { |
229 | struct hh_cache *hh_next; /* Next entry */ | 234 | struct hh_cache *hh_next; /* Next entry */ |
@@ -776,9 +781,8 @@ struct net_device | |||
776 | unsigned char addr_len; /* hardware address length */ | 781 | unsigned char addr_len; /* hardware address length */ |
777 | unsigned short dev_id; /* for shared network cards */ | 782 | unsigned short dev_id; /* for shared network cards */ |
778 | 783 | ||
779 | struct list_head uc_list; /* Secondary unicast mac | 784 | struct netdev_hw_addr_list uc; /* Secondary unicast |
780 | addresses */ | 785 | mac addresses */ |
781 | int uc_count; /* Number of installed ucasts */ | ||
782 | int uc_promisc; | 786 | int uc_promisc; |
783 | spinlock_t addr_list_lock; | 787 | spinlock_t addr_list_lock; |
784 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ | 788 | struct dev_addr_list *mc_list; /* Multicast mac addresses */ |
@@ -810,7 +814,8 @@ struct net_device | |||
810 | because most packets are | 814 | because most packets are |
811 | unicast) */ | 815 | unicast) */ |
812 | 816 | ||
813 | struct list_head dev_addr_list; /* list of device hw addresses */ | 817 | struct netdev_hw_addr_list dev_addrs; /* list of device |
818 | hw addresses */ | ||
814 | 819 | ||
815 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 820 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
816 | 821 | ||
@@ -1806,11 +1811,11 @@ static inline void netif_addr_unlock_bh(struct net_device *dev) | |||
1806 | } | 1811 | } |
1807 | 1812 | ||
1808 | /* | 1813 | /* |
1809 | * dev_addr_list walker. Should be used only for read access. Call with | 1814 | * dev_addrs walker. Should be used only for read access. Call with |
1810 | * rcu_read_lock held. | 1815 | * rcu_read_lock held. |
1811 | */ | 1816 | */ |
1812 | #define for_each_dev_addr(dev, ha) \ | 1817 | #define for_each_dev_addr(dev, ha) \ |
1813 | list_for_each_entry_rcu(ha, &dev->dev_addr_list, list) | 1818 | list_for_each_entry_rcu(ha, &dev->dev_addrs.list, list) |
1814 | 1819 | ||
1815 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ | 1820 | /* These functions live elsewhere (drivers/net/net_init.c, but related) */ |
1816 | 1821 | ||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 092e82e0048c..93a7c08f869d 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -15,7 +15,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | |||
15 | { | 15 | { |
16 | struct pci_bus *pbus = pdev->bus; | 16 | struct pci_bus *pbus = pdev->bus; |
17 | /* Find a PCI root bus */ | 17 | /* Find a PCI root bus */ |
18 | while (pbus->parent) | 18 | while (!pci_is_root_bus(pbus)) |
19 | pbus = pbus->parent; | 19 | pbus = pbus->parent; |
20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
21 | pbus->number); | 21 | pbus->number); |
@@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | |||
23 | 23 | ||
24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
25 | { | 25 | { |
26 | if (pbus->parent) | 26 | if (!pci_is_root_bus(pbus)) |
27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); | 27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); |
28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
29 | pbus->number); | 29 | pbus->number); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8e366bb0705f..1365c745bdb7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -607,8 +607,6 @@ extern void pci_sort_breadthfirst(void); | |||
607 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 607 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
608 | unsigned int device, | 608 | unsigned int device, |
609 | struct pci_dev *from); | 609 | struct pci_dev *from); |
610 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | ||
611 | unsigned int devfn); | ||
612 | #endif /* CONFIG_PCI_LEGACY */ | 610 | #endif /* CONFIG_PCI_LEGACY */ |
613 | 611 | ||
614 | enum pci_lost_interrupt_reason { | 612 | enum pci_lost_interrupt_reason { |
@@ -647,6 +645,7 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, | |||
647 | int where, u16 val); | 645 | int where, u16 val); |
648 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, | 646 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, |
649 | int where, u32 val); | 647 | int where, u32 val); |
648 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); | ||
650 | 649 | ||
651 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) | 650 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) |
652 | { | 651 | { |
@@ -711,8 +710,8 @@ int pcix_get_mmrbc(struct pci_dev *dev); | |||
711 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 710 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
712 | int pcie_get_readrq(struct pci_dev *dev); | 711 | int pcie_get_readrq(struct pci_dev *dev); |
713 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 712 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
713 | int __pci_reset_function(struct pci_dev *dev); | ||
714 | int pci_reset_function(struct pci_dev *dev); | 714 | int pci_reset_function(struct pci_dev *dev); |
715 | int pci_execute_reset_function(struct pci_dev *dev); | ||
716 | void pci_update_resource(struct pci_dev *dev, int resno); | 715 | void pci_update_resource(struct pci_dev *dev, int resno); |
717 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 716 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
718 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 717 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
@@ -732,7 +731,7 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
732 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 731 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
733 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 732 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
734 | void pci_pme_active(struct pci_dev *dev, bool enable); | 733 | void pci_pme_active(struct pci_dev *dev, bool enable); |
735 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 734 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); |
736 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); | 735 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); |
737 | pci_power_t pci_target_state(struct pci_dev *dev); | 736 | pci_power_t pci_target_state(struct pci_dev *dev); |
738 | int pci_prepare_to_sleep(struct pci_dev *dev); | 737 | int pci_prepare_to_sleep(struct pci_dev *dev); |
@@ -798,7 +797,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, | |||
798 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | 797 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, |
799 | int pass); | 798 | int pass); |
800 | 799 | ||
801 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), | 800 | void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), |
802 | void *userdata); | 801 | void *userdata); |
803 | int pci_cfg_space_size_ext(struct pci_dev *dev); | 802 | int pci_cfg_space_size_ext(struct pci_dev *dev); |
804 | int pci_cfg_space_size(struct pci_dev *dev); | 803 | int pci_cfg_space_size(struct pci_dev *dev); |
@@ -888,6 +887,17 @@ static inline int pcie_aspm_enabled(void) | |||
888 | extern int pcie_aspm_enabled(void); | 887 | extern int pcie_aspm_enabled(void); |
889 | #endif | 888 | #endif |
890 | 889 | ||
890 | #ifndef CONFIG_PCIE_ECRC | ||
891 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | ||
892 | { | ||
893 | return; | ||
894 | } | ||
895 | static inline void pcie_ecrc_get_policy(char *str) {}; | ||
896 | #else | ||
897 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | ||
898 | extern void pcie_ecrc_get_policy(char *str); | ||
899 | #endif | ||
900 | |||
891 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 901 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
892 | 902 | ||
893 | #ifdef CONFIG_HT_IRQ | 903 | #ifdef CONFIG_HT_IRQ |
@@ -944,12 +954,6 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, | |||
944 | return NULL; | 954 | return NULL; |
945 | } | 955 | } |
946 | 956 | ||
947 | static inline struct pci_dev *pci_find_slot(unsigned int bus, | ||
948 | unsigned int devfn) | ||
949 | { | ||
950 | return NULL; | ||
951 | } | ||
952 | |||
953 | static inline struct pci_dev *pci_get_device(unsigned int vendor, | 957 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
954 | unsigned int device, | 958 | unsigned int device, |
955 | struct pci_dev *from) | 959 | struct pci_dev *from) |
@@ -1105,6 +1109,10 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | |||
1105 | 1109 | ||
1106 | #include <asm/pci.h> | 1110 | #include <asm/pci.h> |
1107 | 1111 | ||
1112 | #ifndef PCIBIOS_MAX_MEM_32 | ||
1113 | #define PCIBIOS_MAX_MEM_32 (-1) | ||
1114 | #endif | ||
1115 | |||
1108 | /* these helpers provide future and backwards compatibility | 1116 | /* these helpers provide future and backwards compatibility |
1109 | * for accessing popular PCI BAR info */ | 1117 | * for accessing popular PCI BAR info */ |
1110 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) | 1118 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) |
@@ -1261,5 +1269,10 @@ static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev) | |||
1261 | } | 1269 | } |
1262 | #endif | 1270 | #endif |
1263 | 1271 | ||
1272 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | ||
1273 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | ||
1274 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | ||
1275 | #endif | ||
1276 | |||
1264 | #endif /* __KERNEL__ */ | 1277 | #endif /* __KERNEL__ */ |
1265 | #endif /* LINUX_PCI_H */ | 1278 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 20998746518e..b3646cd7fd5a 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -66,17 +66,10 @@ enum pcie_link_speed { | |||
66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, | 66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct hotplug_slot; | ||
70 | struct hotplug_slot_attribute { | ||
71 | struct attribute attr; | ||
72 | ssize_t (*show)(struct hotplug_slot *, char *); | ||
73 | ssize_t (*store)(struct hotplug_slot *, const char *, size_t); | ||
74 | }; | ||
75 | #define to_hotplug_attr(n) container_of(n, struct hotplug_slot_attribute, attr); | ||
76 | |||
77 | /** | 69 | /** |
78 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use | 70 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use |
79 | * @owner: The module owner of this structure | 71 | * @owner: The module owner of this structure |
72 | * @mod_name: The module name (KBUILD_MODNAME) of this structure | ||
80 | * @enable_slot: Called when the user wants to enable a specific pci slot | 73 | * @enable_slot: Called when the user wants to enable a specific pci slot |
81 | * @disable_slot: Called when the user wants to disable a specific pci slot | 74 | * @disable_slot: Called when the user wants to disable a specific pci slot |
82 | * @set_attention_status: Called to set the specific slot's attention LED to | 75 | * @set_attention_status: Called to set the specific slot's attention LED to |
@@ -109,6 +102,7 @@ struct hotplug_slot_attribute { | |||
109 | */ | 102 | */ |
110 | struct hotplug_slot_ops { | 103 | struct hotplug_slot_ops { |
111 | struct module *owner; | 104 | struct module *owner; |
105 | const char *mod_name; | ||
112 | int (*enable_slot) (struct hotplug_slot *slot); | 106 | int (*enable_slot) (struct hotplug_slot *slot); |
113 | int (*disable_slot) (struct hotplug_slot *slot); | 107 | int (*disable_slot) (struct hotplug_slot *slot); |
114 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); | 108 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); |
@@ -167,12 +161,21 @@ static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) | |||
167 | return pci_slot_name(slot->pci_slot); | 161 | return pci_slot_name(slot->pci_slot); |
168 | } | 162 | } |
169 | 163 | ||
170 | extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr, | 164 | extern int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, |
171 | const char *name); | 165 | int nr, const char *name, |
166 | struct module *owner, const char *mod_name); | ||
172 | extern int pci_hp_deregister(struct hotplug_slot *slot); | 167 | extern int pci_hp_deregister(struct hotplug_slot *slot); |
173 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 168 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
174 | struct hotplug_slot_info *info); | 169 | struct hotplug_slot_info *info); |
175 | 170 | ||
171 | static inline int pci_hp_register(struct hotplug_slot *slot, | ||
172 | struct pci_bus *pbus, | ||
173 | int devnr, const char *name) | ||
174 | { | ||
175 | return __pci_hp_register(slot, pbus, devnr, name, | ||
176 | THIS_MODULE, KBUILD_MODNAME); | ||
177 | } | ||
178 | |||
176 | /* PCI Setting Record (Type 0) */ | 179 | /* PCI Setting Record (Type 0) */ |
177 | struct hpp_type0 { | 180 | struct hpp_type0 { |
178 | u32 revision; | 181 | u32 revision; |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 616bf8b3c8b5..83b02f5a25b2 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -295,8 +295,9 @@ | |||
295 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ | 295 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ |
296 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ | 296 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ |
297 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ | 297 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ |
298 | #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ | ||
298 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 299 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
299 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ | 300 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ |
300 | 301 | ||
301 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ | 302 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ |
302 | #define PCI_MSIX_FLAGS 2 | 303 | #define PCI_MSIX_FLAGS 2 |
@@ -304,7 +305,6 @@ | |||
304 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | 305 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) |
305 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) | 306 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) |
306 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 307 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) |
307 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) | ||
308 | 308 | ||
309 | /* CompactPCI Hotswap Register */ | 309 | /* CompactPCI Hotswap Register */ |
310 | 310 | ||
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h index 1b3118a1023a..89698d8aba5c 100644 --- a/include/linux/perf_counter.h +++ b/include/linux/perf_counter.h | |||
@@ -236,10 +236,16 @@ struct perf_counter_mmap_page { | |||
236 | /* | 236 | /* |
237 | * Control data for the mmap() data buffer. | 237 | * Control data for the mmap() data buffer. |
238 | * | 238 | * |
239 | * User-space reading this value should issue an rmb(), on SMP capable | 239 | * User-space reading the @data_head value should issue an rmb(), on |
240 | * platforms, after reading this value -- see perf_counter_wakeup(). | 240 | * SMP capable platforms, after reading this value -- see |
241 | * perf_counter_wakeup(). | ||
242 | * | ||
243 | * When the mapping is PROT_WRITE the @data_tail value should be | ||
244 | * written by userspace to reflect the last read data. In this case | ||
245 | * the kernel will not over-write unread data. | ||
241 | */ | 246 | */ |
242 | __u64 data_head; /* head in the data section */ | 247 | __u64 data_head; /* head in the data section */ |
248 | __u64 data_tail; /* user-space written tail */ | ||
243 | }; | 249 | }; |
244 | 250 | ||
245 | #define PERF_EVENT_MISC_CPUMODE_MASK (3 << 0) | 251 | #define PERF_EVENT_MISC_CPUMODE_MASK (3 << 0) |
@@ -275,6 +281,15 @@ enum perf_event_type { | |||
275 | 281 | ||
276 | /* | 282 | /* |
277 | * struct { | 283 | * struct { |
284 | * struct perf_event_header header; | ||
285 | * u64 id; | ||
286 | * u64 lost; | ||
287 | * }; | ||
288 | */ | ||
289 | PERF_EVENT_LOST = 2, | ||
290 | |||
291 | /* | ||
292 | * struct { | ||
278 | * struct perf_event_header header; | 293 | * struct perf_event_header header; |
279 | * | 294 | * |
280 | * u32 pid, tid; | 295 | * u32 pid, tid; |
@@ -313,30 +328,39 @@ enum perf_event_type { | |||
313 | 328 | ||
314 | /* | 329 | /* |
315 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field | 330 | * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field |
316 | * will be PERF_RECORD_* | 331 | * will be PERF_SAMPLE_* |
317 | * | 332 | * |
318 | * struct { | 333 | * struct { |
319 | * struct perf_event_header header; | 334 | * struct perf_event_header header; |
320 | * | 335 | * |
321 | * { u64 ip; } && PERF_RECORD_IP | 336 | * { u64 ip; } && PERF_SAMPLE_IP |
322 | * { u32 pid, tid; } && PERF_RECORD_TID | 337 | * { u32 pid, tid; } && PERF_SAMPLE_TID |
323 | * { u64 time; } && PERF_RECORD_TIME | 338 | * { u64 time; } && PERF_SAMPLE_TIME |
324 | * { u64 addr; } && PERF_RECORD_ADDR | 339 | * { u64 addr; } && PERF_SAMPLE_ADDR |
325 | * { u64 config; } && PERF_RECORD_CONFIG | 340 | * { u64 config; } && PERF_SAMPLE_CONFIG |
326 | * { u32 cpu, res; } && PERF_RECORD_CPU | 341 | * { u32 cpu, res; } && PERF_SAMPLE_CPU |
327 | * | 342 | * |
328 | * { u64 nr; | 343 | * { u64 nr; |
329 | * { u64 id, val; } cnt[nr]; } && PERF_RECORD_GROUP | 344 | * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP |
330 | * | 345 | * |
331 | * { u16 nr, | 346 | * { u64 nr, |
332 | * hv, | 347 | * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN |
333 | * kernel, | ||
334 | * user; | ||
335 | * u64 ips[nr]; } && PERF_RECORD_CALLCHAIN | ||
336 | * }; | 348 | * }; |
337 | */ | 349 | */ |
338 | }; | 350 | }; |
339 | 351 | ||
352 | enum perf_callchain_context { | ||
353 | PERF_CONTEXT_HV = (__u64)-32, | ||
354 | PERF_CONTEXT_KERNEL = (__u64)-128, | ||
355 | PERF_CONTEXT_USER = (__u64)-512, | ||
356 | |||
357 | PERF_CONTEXT_GUEST = (__u64)-2048, | ||
358 | PERF_CONTEXT_GUEST_KERNEL = (__u64)-2176, | ||
359 | PERF_CONTEXT_GUEST_USER = (__u64)-2560, | ||
360 | |||
361 | PERF_CONTEXT_MAX = (__u64)-4095, | ||
362 | }; | ||
363 | |||
340 | #ifdef __KERNEL__ | 364 | #ifdef __KERNEL__ |
341 | /* | 365 | /* |
342 | * Kernel-internal data types and definitions: | 366 | * Kernel-internal data types and definitions: |
@@ -356,6 +380,13 @@ enum perf_event_type { | |||
356 | #include <linux/pid_namespace.h> | 380 | #include <linux/pid_namespace.h> |
357 | #include <asm/atomic.h> | 381 | #include <asm/atomic.h> |
358 | 382 | ||
383 | #define PERF_MAX_STACK_DEPTH 255 | ||
384 | |||
385 | struct perf_callchain_entry { | ||
386 | __u64 nr; | ||
387 | __u64 ip[PERF_MAX_STACK_DEPTH]; | ||
388 | }; | ||
389 | |||
359 | struct task_struct; | 390 | struct task_struct; |
360 | 391 | ||
361 | /** | 392 | /** |
@@ -414,6 +445,7 @@ struct file; | |||
414 | struct perf_mmap_data { | 445 | struct perf_mmap_data { |
415 | struct rcu_head rcu_head; | 446 | struct rcu_head rcu_head; |
416 | int nr_pages; /* nr of data pages */ | 447 | int nr_pages; /* nr of data pages */ |
448 | int writable; /* are we writable */ | ||
417 | int nr_locked; /* nr pages mlocked */ | 449 | int nr_locked; /* nr pages mlocked */ |
418 | 450 | ||
419 | atomic_t poll; /* POLL_ for wakeups */ | 451 | atomic_t poll; /* POLL_ for wakeups */ |
@@ -423,8 +455,8 @@ struct perf_mmap_data { | |||
423 | atomic_long_t done_head; /* completed head */ | 455 | atomic_long_t done_head; /* completed head */ |
424 | 456 | ||
425 | atomic_t lock; /* concurrent writes */ | 457 | atomic_t lock; /* concurrent writes */ |
426 | |||
427 | atomic_t wakeup; /* needs a wakeup */ | 458 | atomic_t wakeup; /* needs a wakeup */ |
459 | atomic_t lost; /* nr records lost */ | ||
428 | 460 | ||
429 | struct perf_counter_mmap_page *user_page; | 461 | struct perf_counter_mmap_page *user_page; |
430 | void *data_pages[0]; | 462 | void *data_pages[0]; |
@@ -604,6 +636,7 @@ extern void perf_counter_task_tick(struct task_struct *task, int cpu); | |||
604 | extern int perf_counter_init_task(struct task_struct *child); | 636 | extern int perf_counter_init_task(struct task_struct *child); |
605 | extern void perf_counter_exit_task(struct task_struct *child); | 637 | extern void perf_counter_exit_task(struct task_struct *child); |
606 | extern void perf_counter_free_task(struct task_struct *task); | 638 | extern void perf_counter_free_task(struct task_struct *task); |
639 | extern void set_perf_counter_pending(void); | ||
607 | extern void perf_counter_do_pending(void); | 640 | extern void perf_counter_do_pending(void); |
608 | extern void perf_counter_print_debug(void); | 641 | extern void perf_counter_print_debug(void); |
609 | extern void __perf_disable(void); | 642 | extern void __perf_disable(void); |
@@ -649,18 +682,6 @@ static inline void perf_counter_mmap(struct vm_area_struct *vma) | |||
649 | extern void perf_counter_comm(struct task_struct *tsk); | 682 | extern void perf_counter_comm(struct task_struct *tsk); |
650 | extern void perf_counter_fork(struct task_struct *tsk); | 683 | extern void perf_counter_fork(struct task_struct *tsk); |
651 | 684 | ||
652 | extern void perf_counter_task_migration(struct task_struct *task, int cpu); | ||
653 | |||
654 | #define MAX_STACK_DEPTH 255 | ||
655 | |||
656 | struct perf_callchain_entry { | ||
657 | u16 nr; | ||
658 | u16 hv; | ||
659 | u16 kernel; | ||
660 | u16 user; | ||
661 | u64 ip[MAX_STACK_DEPTH]; | ||
662 | }; | ||
663 | |||
664 | extern struct perf_callchain_entry *perf_callchain(struct pt_regs *regs); | 685 | extern struct perf_callchain_entry *perf_callchain(struct pt_regs *regs); |
665 | 686 | ||
666 | extern int sysctl_perf_counter_paranoid; | 687 | extern int sysctl_perf_counter_paranoid; |
@@ -701,8 +722,6 @@ static inline void perf_counter_mmap(struct vm_area_struct *vma) { } | |||
701 | static inline void perf_counter_comm(struct task_struct *tsk) { } | 722 | static inline void perf_counter_comm(struct task_struct *tsk) { } |
702 | static inline void perf_counter_fork(struct task_struct *tsk) { } | 723 | static inline void perf_counter_fork(struct task_struct *tsk) { } |
703 | static inline void perf_counter_init(void) { } | 724 | static inline void perf_counter_init(void) { } |
704 | static inline void perf_counter_task_migration(struct task_struct *task, | ||
705 | int cpu) { } | ||
706 | #endif | 725 | #endif |
707 | 726 | ||
708 | #endif /* __KERNEL__ */ | 727 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/pps.h b/include/linux/pps.h new file mode 100644 index 000000000000..cfe5c7214ec6 --- /dev/null +++ b/include/linux/pps.h | |||
@@ -0,0 +1,122 @@ | |||
1 | /* | ||
2 | * PPS API header | ||
3 | * | ||
4 | * Copyright (C) 2005-2009 Rodolfo Giometti <giometti@linux.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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | |||
22 | #ifndef _PPS_H_ | ||
23 | #define _PPS_H_ | ||
24 | |||
25 | #define PPS_VERSION "5.3.6" | ||
26 | #define PPS_MAX_SOURCES 16 /* should be enough... */ | ||
27 | |||
28 | /* Implementation note: the logical states ``assert'' and ``clear'' | ||
29 | * are implemented in terms of the chip register, i.e. ``assert'' | ||
30 | * means the bit is set. */ | ||
31 | |||
32 | /* | ||
33 | * 3.2 New data structures | ||
34 | */ | ||
35 | |||
36 | #define PPS_API_VERS_1 1 | ||
37 | #define PPS_API_VERS PPS_API_VERS_1 /* we use API version 1 */ | ||
38 | #define PPS_MAX_NAME_LEN 32 | ||
39 | |||
40 | /* 32-bit vs. 64-bit compatibility. | ||
41 | * | ||
42 | * 0n i386, the alignment of a uint64_t is only 4 bytes, while on most other | ||
43 | * architectures it's 8 bytes. On i386, there will be no padding between the | ||
44 | * two consecutive 'struct pps_ktime' members of struct pps_kinfo and struct | ||
45 | * pps_kparams. But on most platforms there will be padding to ensure correct | ||
46 | * alignment. | ||
47 | * | ||
48 | * The simple fix is probably to add an explicit padding. | ||
49 | * [David Woodhouse] | ||
50 | */ | ||
51 | struct pps_ktime { | ||
52 | __s64 sec; | ||
53 | __s32 nsec; | ||
54 | __u32 flags; | ||
55 | }; | ||
56 | #define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */ | ||
57 | |||
58 | struct pps_kinfo { | ||
59 | __u32 assert_sequence; /* seq. num. of assert event */ | ||
60 | __u32 clear_sequence; /* seq. num. of clear event */ | ||
61 | struct pps_ktime assert_tu; /* time of assert event */ | ||
62 | struct pps_ktime clear_tu; /* time of clear event */ | ||
63 | int current_mode; /* current mode bits */ | ||
64 | }; | ||
65 | |||
66 | struct pps_kparams { | ||
67 | int api_version; /* API version # */ | ||
68 | int mode; /* mode bits */ | ||
69 | struct pps_ktime assert_off_tu; /* offset compensation for assert */ | ||
70 | struct pps_ktime clear_off_tu; /* offset compensation for clear */ | ||
71 | }; | ||
72 | |||
73 | /* | ||
74 | * 3.3 Mode bit definitions | ||
75 | */ | ||
76 | |||
77 | /* Device/implementation parameters */ | ||
78 | #define PPS_CAPTUREASSERT 0x01 /* capture assert events */ | ||
79 | #define PPS_CAPTURECLEAR 0x02 /* capture clear events */ | ||
80 | #define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */ | ||
81 | |||
82 | #define PPS_OFFSETASSERT 0x10 /* apply compensation for assert ev. */ | ||
83 | #define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear ev. */ | ||
84 | |||
85 | #define PPS_CANWAIT 0x100 /* can we wait for an event? */ | ||
86 | #define PPS_CANPOLL 0x200 /* bit reserved for future use */ | ||
87 | |||
88 | /* Kernel actions */ | ||
89 | #define PPS_ECHOASSERT 0x40 /* feed back assert event to output */ | ||
90 | #define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */ | ||
91 | |||
92 | /* Timestamp formats */ | ||
93 | #define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */ | ||
94 | #define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */ | ||
95 | |||
96 | /* | ||
97 | * 3.4.4 New functions: disciplining the kernel timebase | ||
98 | */ | ||
99 | |||
100 | /* Kernel consumers */ | ||
101 | #define PPS_KC_HARDPPS 0 /* hardpps() (or equivalent) */ | ||
102 | #define PPS_KC_HARDPPS_PLL 1 /* hardpps() constrained to | ||
103 | use a phase-locked loop */ | ||
104 | #define PPS_KC_HARDPPS_FLL 2 /* hardpps() constrained to | ||
105 | use a frequency-locked loop */ | ||
106 | /* | ||
107 | * Here begins the implementation-specific part! | ||
108 | */ | ||
109 | |||
110 | struct pps_fdata { | ||
111 | struct pps_kinfo info; | ||
112 | struct pps_ktime timeout; | ||
113 | }; | ||
114 | |||
115 | #include <linux/ioctl.h> | ||
116 | |||
117 | #define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *) | ||
118 | #define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams *) | ||
119 | #define PPS_GETCAP _IOR('p', 0xa3, int *) | ||
120 | #define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *) | ||
121 | |||
122 | #endif /* _PPS_H_ */ | ||
diff --git a/include/linux/pps_kernel.h b/include/linux/pps_kernel.h new file mode 100644 index 000000000000..e0a193f830ef --- /dev/null +++ b/include/linux/pps_kernel.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | * PPS API kernel header | ||
3 | * | ||
4 | * Copyright (C) 2009 Rodolfo Giometti <giometti@linux.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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/pps.h> | ||
22 | |||
23 | #include <linux/cdev.h> | ||
24 | #include <linux/device.h> | ||
25 | #include <linux/time.h> | ||
26 | |||
27 | /* | ||
28 | * Global defines | ||
29 | */ | ||
30 | |||
31 | /* The specific PPS source info */ | ||
32 | struct pps_source_info { | ||
33 | char name[PPS_MAX_NAME_LEN]; /* simbolic name */ | ||
34 | char path[PPS_MAX_NAME_LEN]; /* path of connected device */ | ||
35 | int mode; /* PPS's allowed mode */ | ||
36 | |||
37 | void (*echo)(int source, int event, void *data); /* PPS echo function */ | ||
38 | |||
39 | struct module *owner; | ||
40 | struct device *dev; | ||
41 | }; | ||
42 | |||
43 | /* The main struct */ | ||
44 | struct pps_device { | ||
45 | struct pps_source_info info; /* PSS source info */ | ||
46 | |||
47 | struct pps_kparams params; /* PPS's current params */ | ||
48 | |||
49 | __u32 assert_sequence; /* PPS' assert event seq # */ | ||
50 | __u32 clear_sequence; /* PPS' clear event seq # */ | ||
51 | struct pps_ktime assert_tu; | ||
52 | struct pps_ktime clear_tu; | ||
53 | int current_mode; /* PPS mode at event time */ | ||
54 | |||
55 | int go; /* PPS event is arrived? */ | ||
56 | wait_queue_head_t queue; /* PPS event queue */ | ||
57 | |||
58 | unsigned int id; /* PPS source unique ID */ | ||
59 | struct cdev cdev; | ||
60 | struct device *dev; | ||
61 | int devno; | ||
62 | struct fasync_struct *async_queue; /* fasync method */ | ||
63 | spinlock_t lock; | ||
64 | |||
65 | atomic_t usage; /* usage count */ | ||
66 | }; | ||
67 | |||
68 | /* | ||
69 | * Global variables | ||
70 | */ | ||
71 | |||
72 | extern spinlock_t pps_idr_lock; | ||
73 | extern struct idr pps_idr; | ||
74 | extern struct timespec pps_irq_ts[]; | ||
75 | |||
76 | extern struct device_attribute pps_attrs[]; | ||
77 | |||
78 | /* | ||
79 | * Exported functions | ||
80 | */ | ||
81 | |||
82 | struct pps_device *pps_get_source(int source); | ||
83 | extern void pps_put_source(struct pps_device *pps); | ||
84 | extern int pps_register_source(struct pps_source_info *info, | ||
85 | int default_params); | ||
86 | extern void pps_unregister_source(int source); | ||
87 | extern int pps_register_cdev(struct pps_device *pps); | ||
88 | extern void pps_unregister_cdev(struct pps_device *pps); | ||
89 | extern void pps_event(int source, struct pps_ktime *ts, int event, void *data); | ||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 59e133d39d50..7456d7d87a19 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -81,7 +81,6 @@ | |||
81 | 81 | ||
82 | 82 | ||
83 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); | 83 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); |
84 | extern struct task_struct *ptrace_get_task_struct(pid_t pid); | ||
85 | extern int ptrace_traceme(void); | 84 | extern int ptrace_traceme(void); |
86 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 85 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
87 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 86 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 6ba830fa8538..ffa2efbbe382 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -232,7 +232,7 @@ struct mdp_superblock_1 { | |||
232 | __le64 reshape_position; /* next address in array-space for reshape */ | 232 | __le64 reshape_position; /* next address in array-space for reshape */ |
233 | __le32 delta_disks; /* change in number of raid_disks */ | 233 | __le32 delta_disks; /* change in number of raid_disks */ |
234 | __le32 new_layout; /* new layout */ | 234 | __le32 new_layout; /* new layout */ |
235 | __le32 new_chunk; /* new chunk size (bytes) */ | 235 | __le32 new_chunk; /* new chunk size (512byte sectors) */ |
236 | __u8 pad1[128-124]; /* set to 0 when written */ | 236 | __u8 pad1[128-124]; /* set to 0 when written */ |
237 | 237 | ||
238 | /* constant this-device information - 64 bytes */ | 238 | /* constant this-device information - 64 bytes */ |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 2245c78d5876..dd31e7bae35c 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -660,23 +660,54 @@ static inline void set_le_key_k_type(int version, struct reiserfs_key *key, | |||
660 | cpu_to_le32(type2uniqueness(type))) | 660 | cpu_to_le32(type2uniqueness(type))) |
661 | : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type)); | 661 | : (void)(set_offset_v2_k_type(&(key->u.k_offset_v2), type)); |
662 | } | 662 | } |
663 | |||
663 | static inline void set_le_ih_k_type(struct item_head *ih, int type) | 664 | static inline void set_le_ih_k_type(struct item_head *ih, int type) |
664 | { | 665 | { |
665 | set_le_key_k_type(ih_version(ih), &(ih->ih_key), type); | 666 | set_le_key_k_type(ih_version(ih), &(ih->ih_key), type); |
666 | } | 667 | } |
667 | 668 | ||
668 | #define is_direntry_le_key(version,key) (le_key_k_type (version, key) == TYPE_DIRENTRY) | 669 | static inline int is_direntry_le_key(int version, struct reiserfs_key *key) |
669 | #define is_direct_le_key(version,key) (le_key_k_type (version, key) == TYPE_DIRECT) | 670 | { |
670 | #define is_indirect_le_key(version,key) (le_key_k_type (version, key) == TYPE_INDIRECT) | 671 | return le_key_k_type(version, key) == TYPE_DIRENTRY; |
671 | #define is_statdata_le_key(version,key) (le_key_k_type (version, key) == TYPE_STAT_DATA) | 672 | } |
673 | |||
674 | static inline int is_direct_le_key(int version, struct reiserfs_key *key) | ||
675 | { | ||
676 | return le_key_k_type(version, key) == TYPE_DIRECT; | ||
677 | } | ||
678 | |||
679 | static inline int is_indirect_le_key(int version, struct reiserfs_key *key) | ||
680 | { | ||
681 | return le_key_k_type(version, key) == TYPE_INDIRECT; | ||
682 | } | ||
683 | |||
684 | static inline int is_statdata_le_key(int version, struct reiserfs_key *key) | ||
685 | { | ||
686 | return le_key_k_type(version, key) == TYPE_STAT_DATA; | ||
687 | } | ||
672 | 688 | ||
673 | // | 689 | // |
674 | // item header has version. | 690 | // item header has version. |
675 | // | 691 | // |
676 | #define is_direntry_le_ih(ih) is_direntry_le_key (ih_version (ih), &((ih)->ih_key)) | 692 | static inline int is_direntry_le_ih(struct item_head *ih) |
677 | #define is_direct_le_ih(ih) is_direct_le_key (ih_version (ih), &((ih)->ih_key)) | 693 | { |
678 | #define is_indirect_le_ih(ih) is_indirect_le_key (ih_version(ih), &((ih)->ih_key)) | 694 | return is_direntry_le_key(ih_version(ih), &ih->ih_key); |
679 | #define is_statdata_le_ih(ih) is_statdata_le_key (ih_version (ih), &((ih)->ih_key)) | 695 | } |
696 | |||
697 | static inline int is_direct_le_ih(struct item_head *ih) | ||
698 | { | ||
699 | return is_direct_le_key(ih_version(ih), &ih->ih_key); | ||
700 | } | ||
701 | |||
702 | static inline int is_indirect_le_ih(struct item_head *ih) | ||
703 | { | ||
704 | return is_indirect_le_key(ih_version(ih), &ih->ih_key); | ||
705 | } | ||
706 | |||
707 | static inline int is_statdata_le_ih(struct item_head *ih) | ||
708 | { | ||
709 | return is_statdata_le_key(ih_version(ih), &ih->ih_key); | ||
710 | } | ||
680 | 711 | ||
681 | // | 712 | // |
682 | // key is pointer to cpu key, result is cpu | 713 | // key is pointer to cpu key, result is cpu |
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 4c5bcf6ca7e8..511f42fc6816 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -49,6 +49,8 @@ struct res_counter { | |||
49 | struct res_counter *parent; | 49 | struct res_counter *parent; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define RESOURCE_MAX (unsigned long long)LLONG_MAX | ||
53 | |||
52 | /** | 54 | /** |
53 | * Helpers to interact with userspace | 55 | * Helpers to interact with userspace |
54 | * res_counter_read_u64() - returns the value of the specified member. | 56 | * res_counter_read_u64() - returns the value of the specified member. |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 16e39c7a67fc..e73e2429a1b1 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
@@ -160,8 +160,9 @@ struct rfkill * __must_check rfkill_alloc(const char *name, | |||
160 | * the rfkill structure. Before calling this function the driver needs | 160 | * the rfkill structure. Before calling this function the driver needs |
161 | * to be ready to service method calls from rfkill. | 161 | * to be ready to service method calls from rfkill. |
162 | * | 162 | * |
163 | * If the software blocked state is not set before registration, | 163 | * If rfkill_init_sw_state() is not called before registration, |
164 | * set_block will be called to initialize it to a default value. | 164 | * set_block() will be called to initialize the software blocked state |
165 | * to a default value. | ||
165 | * | 166 | * |
166 | * If the hardware blocked state is not set before registration, | 167 | * If the hardware blocked state is not set before registration, |
167 | * it is assumed to be unblocked. | 168 | * it is assumed to be unblocked. |
@@ -234,9 +235,11 @@ bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | |||
234 | * rfkill drivers that get events when the soft-blocked state changes | 235 | * rfkill drivers that get events when the soft-blocked state changes |
235 | * (yes, some platforms directly act on input but allow changing again) | 236 | * (yes, some platforms directly act on input but allow changing again) |
236 | * use this function to notify the rfkill core (and through that also | 237 | * use this function to notify the rfkill core (and through that also |
237 | * userspace) of the current state. It is not necessary to notify on | 238 | * userspace) of the current state. |
238 | * resume; since hibernation can always change the soft-blocked state, | 239 | * |
239 | * the rfkill core will unconditionally restore the previous state. | 240 | * Drivers should also call this function after resume if the state has |
241 | * been changed by the user. This only makes sense for "persistent" | ||
242 | * devices (see rfkill_init_sw_state()). | ||
240 | * | 243 | * |
241 | * This function can be called in any context, even from within rfkill | 244 | * This function can be called in any context, even from within rfkill |
242 | * callbacks. | 245 | * callbacks. |
@@ -247,6 +250,22 @@ bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | |||
247 | bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked); | 250 | bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked); |
248 | 251 | ||
249 | /** | 252 | /** |
253 | * rfkill_init_sw_state - Initialize persistent software block state | ||
254 | * @rfkill: pointer to the rfkill class to modify. | ||
255 | * @state: the current software block state to set | ||
256 | * | ||
257 | * rfkill drivers that preserve their software block state over power off | ||
258 | * use this function to notify the rfkill core (and through that also | ||
259 | * userspace) of their initial state. It should only be used before | ||
260 | * registration. | ||
261 | * | ||
262 | * In addition, it marks the device as "persistent", an attribute which | ||
263 | * can be read by userspace. Persistent devices are expected to preserve | ||
264 | * their own state when suspended. | ||
265 | */ | ||
266 | void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked); | ||
267 | |||
268 | /** | ||
250 | * rfkill_set_states - Set the internal rfkill block states | 269 | * rfkill_set_states - Set the internal rfkill block states |
251 | * @rfkill: pointer to the rfkill class to modify. | 270 | * @rfkill: pointer to the rfkill class to modify. |
252 | * @sw: the current software block state to set | 271 | * @sw: the current software block state to set |
@@ -307,6 +326,10 @@ static inline bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked) | |||
307 | return blocked; | 326 | return blocked; |
308 | } | 327 | } |
309 | 328 | ||
329 | static inline void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked) | ||
330 | { | ||
331 | } | ||
332 | |||
310 | static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) | 333 | static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) |
311 | { | 334 | { |
312 | } | 335 | } |
diff --git a/include/linux/rotary_encoder.h b/include/linux/rotary_encoder.h index 12d63a30c347..215278b8df2a 100644 --- a/include/linux/rotary_encoder.h +++ b/include/linux/rotary_encoder.h | |||
@@ -8,6 +8,8 @@ struct rotary_encoder_platform_data { | |||
8 | unsigned int gpio_b; | 8 | unsigned int gpio_b; |
9 | unsigned int inverted_a; | 9 | unsigned int inverted_a; |
10 | unsigned int inverted_b; | 10 | unsigned int inverted_b; |
11 | bool relative_axis; | ||
12 | bool rollover; | ||
11 | }; | 13 | }; |
12 | 14 | ||
13 | #endif /* __ROTARY_ENCODER_H__ */ | 15 | #endif /* __ROTARY_ENCODER_H__ */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 02042e7f2196..4d0754269884 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -92,7 +92,6 @@ struct sched_param { | |||
92 | 92 | ||
93 | #include <asm/processor.h> | 93 | #include <asm/processor.h> |
94 | 94 | ||
95 | struct mem_cgroup; | ||
96 | struct exec_domain; | 95 | struct exec_domain; |
97 | struct futex_pi_state; | 96 | struct futex_pi_state; |
98 | struct robust_list_head; | 97 | struct robust_list_head; |
@@ -1879,9 +1878,6 @@ extern struct pid_namespace init_pid_ns; | |||
1879 | /* | 1878 | /* |
1880 | * find a task by one of its numerical ids | 1879 | * find a task by one of its numerical ids |
1881 | * | 1880 | * |
1882 | * find_task_by_pid_type_ns(): | ||
1883 | * it is the most generic call - it finds a task by all id, | ||
1884 | * type and namespace specified | ||
1885 | * find_task_by_pid_ns(): | 1881 | * find_task_by_pid_ns(): |
1886 | * finds a task by its pid in the specified namespace | 1882 | * finds a task by its pid in the specified namespace |
1887 | * find_task_by_vpid(): | 1883 | * find_task_by_vpid(): |
@@ -1890,9 +1886,6 @@ extern struct pid_namespace init_pid_ns; | |||
1890 | * see also find_vpid() etc in include/linux/pid.h | 1886 | * see also find_vpid() etc in include/linux/pid.h |
1891 | */ | 1887 | */ |
1892 | 1888 | ||
1893 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | ||
1894 | struct pid_namespace *ns); | ||
1895 | |||
1896 | extern struct task_struct *find_task_by_vpid(pid_t nr); | 1889 | extern struct task_struct *find_task_by_vpid(pid_t nr); |
1897 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, | 1890 | extern struct task_struct *find_task_by_pid_ns(pid_t nr, |
1898 | struct pid_namespace *ns); | 1891 | struct pid_namespace *ns); |
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 004f3b3342c5..0c6a86b79596 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h | |||
@@ -43,6 +43,7 @@ int seq_release(struct inode *, struct file *); | |||
43 | int seq_escape(struct seq_file *, const char *, const char *); | 43 | int seq_escape(struct seq_file *, const char *, const char *); |
44 | int seq_putc(struct seq_file *m, char c); | 44 | int seq_putc(struct seq_file *m, char c); |
45 | int seq_puts(struct seq_file *m, const char *s); | 45 | int seq_puts(struct seq_file *m, const char *s); |
46 | int seq_write(struct seq_file *seq, const void *data, size_t len); | ||
46 | 47 | ||
47 | int seq_printf(struct seq_file *, const char *, ...) | 48 | int seq_printf(struct seq_file *, const char *, ...) |
48 | __attribute__ ((format (printf,2,3))); | 49 | __attribute__ ((format (printf,2,3))); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 6fd80c4243f1..23d2fb051f97 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -171,6 +171,9 @@ | |||
171 | /* Timberdale UART */ | 171 | /* Timberdale UART */ |
172 | #define PORT_TIMBUART 87 | 172 | #define PORT_TIMBUART 87 |
173 | 173 | ||
174 | /* Qualcomm MSM SoCs */ | ||
175 | #define PORT_MSM 88 | ||
176 | |||
174 | #ifdef __KERNEL__ | 177 | #ifdef __KERNEL__ |
175 | 178 | ||
176 | #include <linux/compiler.h> | 179 | #include <linux/compiler.h> |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 96c0d93fc2ca..850db2e80510 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
@@ -323,6 +323,7 @@ | |||
323 | #define UART_OMAP_MVER 0x14 /* Module version register */ | 323 | #define UART_OMAP_MVER 0x14 /* Module version register */ |
324 | #define UART_OMAP_SYSC 0x15 /* System configuration register */ | 324 | #define UART_OMAP_SYSC 0x15 /* System configuration register */ |
325 | #define UART_OMAP_SYSS 0x16 /* System status register */ | 325 | #define UART_OMAP_SYSS 0x16 /* System status register */ |
326 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | ||
326 | 327 | ||
327 | #endif /* _LINUX_SERIAL_REG_H */ | 328 | #endif /* _LINUX_SERIAL_REG_H */ |
328 | 329 | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index e0417e4d3f15..126d24c9eaa8 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | 17 | ||
18 | #include <linux/types.h> | ||
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/list.h> | 20 | #include <linux/list.h> |
20 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
@@ -28,7 +29,10 @@ struct serio { | |||
28 | char name[32]; | 29 | char name[32]; |
29 | char phys[32]; | 30 | char phys[32]; |
30 | 31 | ||
31 | unsigned int manual_bind; | 32 | bool manual_bind; |
33 | bool registered; /* port has been fully registered with driver core */ | ||
34 | bool suspended; /* port is suspended */ | ||
35 | |||
32 | 36 | ||
33 | struct serio_device_id id; | 37 | struct serio_device_id id; |
34 | 38 | ||
@@ -47,7 +51,6 @@ struct serio { | |||
47 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ | 51 | struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ |
48 | 52 | ||
49 | struct device dev; | 53 | struct device dev; |
50 | unsigned int registered; /* port has been fully registered with driver core */ | ||
51 | 54 | ||
52 | struct list_head node; | 55 | struct list_head node; |
53 | }; | 56 | }; |
@@ -58,7 +61,7 @@ struct serio_driver { | |||
58 | char *description; | 61 | char *description; |
59 | 62 | ||
60 | struct serio_device_id *id_table; | 63 | struct serio_device_id *id_table; |
61 | unsigned int manual_bind; | 64 | bool manual_bind; |
62 | 65 | ||
63 | void (*write_wakeup)(struct serio *); | 66 | void (*write_wakeup)(struct serio *); |
64 | irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int); | 67 | irqreturn_t (*interrupt)(struct serio *, unsigned char, unsigned int); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 63ef24bc01d0..b47b3f039d14 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -265,7 +265,7 @@ typedef unsigned char *sk_buff_data_t; | |||
265 | * @transport_header: Transport layer header | 265 | * @transport_header: Transport layer header |
266 | * @network_header: Network layer header | 266 | * @network_header: Network layer header |
267 | * @mac_header: Link layer header | 267 | * @mac_header: Link layer header |
268 | * @dst: destination entry | 268 | * @_skb_dst: destination entry |
269 | * @sp: the security path, used for xfrm | 269 | * @sp: the security path, used for xfrm |
270 | * @cb: Control buffer. Free for use by every layer. Put private vars here | 270 | * @cb: Control buffer. Free for use by every layer. Put private vars here |
271 | * @len: Length of actual data | 271 | * @len: Length of actual data |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index 2ea20320c093..51948eb6927a 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -17,6 +17,7 @@ struct ads7846_platform_data { | |||
17 | u16 vref_mv; /* external vref value, milliVolts */ | 17 | u16 vref_mv; /* external vref value, milliVolts */ |
18 | bool keep_vref_on; /* set to keep vref on for differential | 18 | bool keep_vref_on; /* set to keep vref on for differential |
19 | * measurements as well */ | 19 | * measurements as well */ |
20 | bool swap_xy; /* swap x and y axes */ | ||
20 | 21 | ||
21 | /* Settling time of the analog signals; a function of Vcc and the | 22 | /* Settling time of the analog signals; a function of Vcc and the |
22 | * capacitance on the X/Y drivers. If set to non-zero, two samples | 23 | * capacitance on the X/Y drivers. If set to non-zero, two samples |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index a0faa18f7b1b..9c4cd27f4685 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -245,6 +245,9 @@ struct spi_master { | |||
245 | */ | 245 | */ |
246 | u16 dma_alignment; | 246 | u16 dma_alignment; |
247 | 247 | ||
248 | /* spi_device.mode flags understood by this controller driver */ | ||
249 | u16 mode_bits; | ||
250 | |||
248 | /* Setup mode and clock, etc (spi driver may call many times). | 251 | /* Setup mode and clock, etc (spi driver may call many times). |
249 | * | 252 | * |
250 | * IMPORTANT: this may be called when transfers to another | 253 | * IMPORTANT: this may be called when transfers to another |
@@ -523,30 +526,7 @@ static inline void spi_message_free(struct spi_message *m) | |||
523 | kfree(m); | 526 | kfree(m); |
524 | } | 527 | } |
525 | 528 | ||
526 | /** | 529 | extern int spi_setup(struct spi_device *spi); |
527 | * spi_setup - setup SPI mode and clock rate | ||
528 | * @spi: the device whose settings are being modified | ||
529 | * Context: can sleep, and no requests are queued to the device | ||
530 | * | ||
531 | * SPI protocol drivers may need to update the transfer mode if the | ||
532 | * device doesn't work with its default. They may likewise need | ||
533 | * to update clock rates or word sizes from initial values. This function | ||
534 | * changes those settings, and must be called from a context that can sleep. | ||
535 | * Except for SPI_CS_HIGH, which takes effect immediately, the changes take | ||
536 | * effect the next time the device is selected and data is transferred to | ||
537 | * or from it. When this function returns, the spi device is deselected. | ||
538 | * | ||
539 | * Note that this call will fail if the protocol driver specifies an option | ||
540 | * that the underlying controller or its driver does not support. For | ||
541 | * example, not all hardware supports wire transfers using nine bit words, | ||
542 | * LSB-first wire encoding, or active-high chipselects. | ||
543 | */ | ||
544 | static inline int | ||
545 | spi_setup(struct spi_device *spi) | ||
546 | { | ||
547 | return spi->master->setup(spi); | ||
548 | } | ||
549 | |||
550 | 530 | ||
551 | /** | 531 | /** |
552 | * spi_async - asynchronous SPI transfer | 532 | * spi_async - asynchronous SPI transfer |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 0cedf31af0b0..c88b36665f79 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -319,10 +319,11 @@ static inline void disable_swap_token(void) | |||
319 | } | 319 | } |
320 | 320 | ||
321 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 321 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
322 | extern void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent); | 322 | extern void |
323 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout); | ||
323 | #else | 324 | #else |
324 | static inline void | 325 | static inline void |
325 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 326 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent, bool swapout) |
326 | { | 327 | { |
327 | } | 328 | } |
328 | #endif | 329 | #endif |
@@ -423,12 +424,6 @@ static inline swp_entry_t get_swap_page(void) | |||
423 | #define has_swap_token(x) 0 | 424 | #define has_swap_token(x) 0 |
424 | #define disable_swap_token() do { } while(0) | 425 | #define disable_swap_token() do { } while(0) |
425 | 426 | ||
426 | static inline int mem_cgroup_cache_charge_swapin(struct page *page, | ||
427 | struct mm_struct *mm, gfp_t mask, bool locked) | ||
428 | { | ||
429 | return 0; | ||
430 | } | ||
431 | |||
432 | static inline void | 427 | static inline void |
433 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) | 428 | mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) |
434 | { | 429 | { |
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h index c68bccba2074..c134dd1fe6b6 100644 --- a/include/linux/trace_seq.h +++ b/include/linux/trace_seq.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <linux/fs.h> | 4 | #include <linux/fs.h> |
5 | 5 | ||
6 | #include <asm/page.h> | ||
7 | |||
6 | /* | 8 | /* |
7 | * Trace sequences are used to allow a function to call several other functions | 9 | * Trace sequences are used to allow a function to call several other functions |
8 | * to create a string of data to use (up to a max of PAGE_SIZE. | 10 | * to create a string of data to use (up to a max of PAGE_SIZE. |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index eb96603d92db..17ba82efa483 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
@@ -143,7 +143,7 @@ static inline void tracehook_report_syscall_exit(struct pt_regs *regs, int step) | |||
143 | * | 143 | * |
144 | * Return %LSM_UNSAFE_* bits applied to an exec because of tracing. | 144 | * Return %LSM_UNSAFE_* bits applied to an exec because of tracing. |
145 | * | 145 | * |
146 | * Called with task_lock() held on @task. | 146 | * @task->cred_guard_mutex is held by the caller through the do_execve(). |
147 | */ | 147 | */ |
148 | static inline int tracehook_unsafe_exec(struct task_struct *task) | 148 | static inline int tracehook_unsafe_exec(struct task_struct *task) |
149 | { | 149 | { |
diff --git a/include/linux/types.h b/include/linux/types.h index 5abe354020f9..c42724f8c802 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -131,7 +131,7 @@ typedef __s64 int64_t; | |||
131 | * | 131 | * |
132 | * blkcnt_t is the type of the inode's block count. | 132 | * blkcnt_t is the type of the inode's block count. |
133 | */ | 133 | */ |
134 | #ifdef CONFIG_LBD | 134 | #ifdef CONFIG_LBDAF |
135 | typedef u64 sector_t; | 135 | typedef u64 sector_t; |
136 | typedef u64 blkcnt_t; | 136 | typedef u64 blkcnt_t; |
137 | #else | 137 | #else |
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h index 970473bf8d5a..ed889f4168f3 100644 --- a/include/linux/ucb1400.h +++ b/include/linux/ucb1400.h | |||
@@ -134,28 +134,13 @@ static inline void ucb1400_adc_enable(struct snd_ac97 *ac97) | |||
134 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); | 134 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA); |
135 | } | 135 | } |
136 | 136 | ||
137 | static unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | ||
138 | int adcsync) | ||
139 | { | ||
140 | unsigned int val; | ||
141 | |||
142 | if (adcsync) | ||
143 | adc_channel |= UCB_ADC_SYNC_ENA; | ||
144 | |||
145 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel); | ||
146 | ucb1400_reg_write(ac97, UCB_ADC_CR, UCB_ADC_ENA | adc_channel | | ||
147 | UCB_ADC_START); | ||
148 | |||
149 | while (!((val = ucb1400_reg_read(ac97, UCB_ADC_DATA)) | ||
150 | & UCB_ADC_DAT_VALID)) | ||
151 | schedule_timeout_uninterruptible(1); | ||
152 | |||
153 | return val & UCB_ADC_DAT_MASK; | ||
154 | } | ||
155 | |||
156 | static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) | 137 | static inline void ucb1400_adc_disable(struct snd_ac97 *ac97) |
157 | { | 138 | { |
158 | ucb1400_reg_write(ac97, UCB_ADC_CR, 0); | 139 | ucb1400_reg_write(ac97, UCB_ADC_CR, 0); |
159 | } | 140 | } |
160 | 141 | ||
142 | |||
143 | unsigned int ucb1400_adc_read(struct snd_ac97 *ac97, u16 adc_channel, | ||
144 | int adcsync); | ||
145 | |||
161 | #endif | 146 | #endif |
diff --git a/include/linux/w1-gpio.h b/include/linux/w1-gpio.h index 9797fec7748a..3adeff82212f 100644 --- a/include/linux/w1-gpio.h +++ b/include/linux/w1-gpio.h | |||
@@ -18,6 +18,7 @@ | |||
18 | struct w1_gpio_platform_data { | 18 | struct w1_gpio_platform_data { |
19 | unsigned int pin; | 19 | unsigned int pin; |
20 | unsigned int is_open_drain:1; | 20 | unsigned int is_open_drain:1; |
21 | void (*enable_external_pullup)(int enable); | ||
21 | }; | 22 | }; |
22 | 23 | ||
23 | #endif /* _LINUX_W1_GPIO_H */ | 24 | #endif /* _LINUX_W1_GPIO_H */ |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index 21ee49ffcbaf..f82a1e877372 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
@@ -94,8 +94,6 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock, | |||
94 | poll_table *wait); | 94 | poll_table *wait); |
95 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); | 95 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); |
96 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); | 96 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); |
97 | int iucv_sock_wait_state(struct sock *sk, int state, int state2, | ||
98 | unsigned long timeo); | ||
99 | int iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo); | 97 | int iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo); |
100 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); | 98 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); |
101 | void iucv_accept_unlink(struct sock *sk); | 99 | void iucv_accept_unlink(struct sock *sk); |
diff --git a/include/net/sock.h b/include/net/sock.h index 95bd3fd75f94..07133c5e9868 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1208,6 +1208,39 @@ static inline int skb_copy_to_page(struct sock *sk, char __user *from, | |||
1208 | return 0; | 1208 | return 0; |
1209 | } | 1209 | } |
1210 | 1210 | ||
1211 | /** | ||
1212 | * sk_wmem_alloc_get - returns write allocations | ||
1213 | * @sk: socket | ||
1214 | * | ||
1215 | * Returns sk_wmem_alloc minus initial offset of one | ||
1216 | */ | ||
1217 | static inline int sk_wmem_alloc_get(const struct sock *sk) | ||
1218 | { | ||
1219 | return atomic_read(&sk->sk_wmem_alloc) - 1; | ||
1220 | } | ||
1221 | |||
1222 | /** | ||
1223 | * sk_rmem_alloc_get - returns read allocations | ||
1224 | * @sk: socket | ||
1225 | * | ||
1226 | * Returns sk_rmem_alloc | ||
1227 | */ | ||
1228 | static inline int sk_rmem_alloc_get(const struct sock *sk) | ||
1229 | { | ||
1230 | return atomic_read(&sk->sk_rmem_alloc); | ||
1231 | } | ||
1232 | |||
1233 | /** | ||
1234 | * sk_has_allocations - check if allocations are outstanding | ||
1235 | * @sk: socket | ||
1236 | * | ||
1237 | * Returns true if socket has write or read allocations | ||
1238 | */ | ||
1239 | static inline int sk_has_allocations(const struct sock *sk) | ||
1240 | { | ||
1241 | return sk_wmem_alloc_get(sk) || sk_rmem_alloc_get(sk); | ||
1242 | } | ||
1243 | |||
1211 | /* | 1244 | /* |
1212 | * Queue a received datagram if it will fit. Stream and sequenced | 1245 | * Queue a received datagram if it will fit. Stream and sequenced |
1213 | * protocols can't normally use this as they need to fit buffers in | 1246 | * protocols can't normally use this as they need to fit buffers in |
diff --git a/include/net/x25.h b/include/net/x25.h index fc3f03d976f8..2cda04011568 100644 --- a/include/net/x25.h +++ b/include/net/x25.h | |||
@@ -187,7 +187,7 @@ extern int x25_addr_ntoa(unsigned char *, struct x25_address *, | |||
187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, | 187 | extern int x25_addr_aton(unsigned char *, struct x25_address *, |
188 | struct x25_address *); | 188 | struct x25_address *); |
189 | extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); | 189 | extern struct sock *x25_find_socket(unsigned int, struct x25_neigh *); |
190 | extern void x25_destroy_socket(struct sock *); | 190 | extern void x25_destroy_socket_from_timer(struct sock *); |
191 | extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); | 191 | extern int x25_rx_call_request(struct sk_buff *, struct x25_neigh *, unsigned int); |
192 | extern void x25_kill_by_neigh(struct x25_neigh *); | 192 | extern void x25_kill_by_neigh(struct x25_neigh *); |
193 | 193 | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h new file mode 100644 index 000000000000..acf4cc9cd36d --- /dev/null +++ b/include/trace/events/ext4.h | |||
@@ -0,0 +1,719 @@ | |||
1 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_EXT4_H | ||
3 | |||
4 | #undef TRACE_SYSTEM | ||
5 | #define TRACE_SYSTEM ext4 | ||
6 | |||
7 | #include <linux/writeback.h> | ||
8 | #include "../../../fs/ext4/ext4.h" | ||
9 | #include "../../../fs/ext4/mballoc.h" | ||
10 | #include <linux/tracepoint.h> | ||
11 | |||
12 | TRACE_EVENT(ext4_free_inode, | ||
13 | TP_PROTO(struct inode *inode), | ||
14 | |||
15 | TP_ARGS(inode), | ||
16 | |||
17 | TP_STRUCT__entry( | ||
18 | __field( dev_t, dev ) | ||
19 | __field( ino_t, ino ) | ||
20 | __field( umode_t, mode ) | ||
21 | __field( uid_t, uid ) | ||
22 | __field( gid_t, gid ) | ||
23 | __field( blkcnt_t, blocks ) | ||
24 | ), | ||
25 | |||
26 | TP_fast_assign( | ||
27 | __entry->dev = inode->i_sb->s_dev; | ||
28 | __entry->ino = inode->i_ino; | ||
29 | __entry->mode = inode->i_mode; | ||
30 | __entry->uid = inode->i_uid; | ||
31 | __entry->gid = inode->i_gid; | ||
32 | __entry->blocks = inode->i_blocks; | ||
33 | ), | ||
34 | |||
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, | ||
37 | __entry->uid, __entry->gid, __entry->blocks) | ||
38 | ); | ||
39 | |||
40 | TRACE_EVENT(ext4_request_inode, | ||
41 | TP_PROTO(struct inode *dir, int mode), | ||
42 | |||
43 | TP_ARGS(dir, mode), | ||
44 | |||
45 | TP_STRUCT__entry( | ||
46 | __field( dev_t, dev ) | ||
47 | __field( ino_t, dir ) | ||
48 | __field( umode_t, mode ) | ||
49 | ), | ||
50 | |||
51 | TP_fast_assign( | ||
52 | __entry->dev = dir->i_sb->s_dev; | ||
53 | __entry->dir = dir->i_ino; | ||
54 | __entry->mode = mode; | ||
55 | ), | ||
56 | |||
57 | TP_printk("dev %s dir %lu mode %d", | ||
58 | jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) | ||
59 | ); | ||
60 | |||
61 | TRACE_EVENT(ext4_allocate_inode, | ||
62 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), | ||
63 | |||
64 | TP_ARGS(inode, dir, mode), | ||
65 | |||
66 | TP_STRUCT__entry( | ||
67 | __field( dev_t, dev ) | ||
68 | __field( ino_t, ino ) | ||
69 | __field( ino_t, dir ) | ||
70 | __field( umode_t, mode ) | ||
71 | ), | ||
72 | |||
73 | TP_fast_assign( | ||
74 | __entry->dev = inode->i_sb->s_dev; | ||
75 | __entry->ino = inode->i_ino; | ||
76 | __entry->dir = dir->i_ino; | ||
77 | __entry->mode = mode; | ||
78 | ), | ||
79 | |||
80 | TP_printk("dev %s ino %lu dir %lu mode %d", | ||
81 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) | ||
82 | ); | ||
83 | |||
84 | TRACE_EVENT(ext4_write_begin, | ||
85 | |||
86 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
87 | unsigned int flags), | ||
88 | |||
89 | TP_ARGS(inode, pos, len, flags), | ||
90 | |||
91 | TP_STRUCT__entry( | ||
92 | __field( dev_t, dev ) | ||
93 | __field( ino_t, ino ) | ||
94 | __field( loff_t, pos ) | ||
95 | __field( unsigned int, len ) | ||
96 | __field( unsigned int, flags ) | ||
97 | ), | ||
98 | |||
99 | TP_fast_assign( | ||
100 | __entry->dev = inode->i_sb->s_dev; | ||
101 | __entry->ino = inode->i_ino; | ||
102 | __entry->pos = pos; | ||
103 | __entry->len = len; | ||
104 | __entry->flags = flags; | ||
105 | ), | ||
106 | |||
107 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
108 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
109 | __entry->flags) | ||
110 | ); | ||
111 | |||
112 | TRACE_EVENT(ext4_ordered_write_end, | ||
113 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
114 | unsigned int copied), | ||
115 | |||
116 | TP_ARGS(inode, pos, len, copied), | ||
117 | |||
118 | TP_STRUCT__entry( | ||
119 | __field( dev_t, dev ) | ||
120 | __field( ino_t, ino ) | ||
121 | __field( loff_t, pos ) | ||
122 | __field( unsigned int, len ) | ||
123 | __field( unsigned int, copied ) | ||
124 | ), | ||
125 | |||
126 | TP_fast_assign( | ||
127 | __entry->dev = inode->i_sb->s_dev; | ||
128 | __entry->ino = inode->i_ino; | ||
129 | __entry->pos = pos; | ||
130 | __entry->len = len; | ||
131 | __entry->copied = copied; | ||
132 | ), | ||
133 | |||
134 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
135 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
136 | __entry->copied) | ||
137 | ); | ||
138 | |||
139 | TRACE_EVENT(ext4_writeback_write_end, | ||
140 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
141 | unsigned int copied), | ||
142 | |||
143 | TP_ARGS(inode, pos, len, copied), | ||
144 | |||
145 | TP_STRUCT__entry( | ||
146 | __field( dev_t, dev ) | ||
147 | __field( ino_t, ino ) | ||
148 | __field( loff_t, pos ) | ||
149 | __field( unsigned int, len ) | ||
150 | __field( unsigned int, copied ) | ||
151 | ), | ||
152 | |||
153 | TP_fast_assign( | ||
154 | __entry->dev = inode->i_sb->s_dev; | ||
155 | __entry->ino = inode->i_ino; | ||
156 | __entry->pos = pos; | ||
157 | __entry->len = len; | ||
158 | __entry->copied = copied; | ||
159 | ), | ||
160 | |||
161 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
162 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
163 | __entry->copied) | ||
164 | ); | ||
165 | |||
166 | TRACE_EVENT(ext4_journalled_write_end, | ||
167 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
168 | unsigned int copied), | ||
169 | TP_ARGS(inode, pos, len, copied), | ||
170 | |||
171 | TP_STRUCT__entry( | ||
172 | __field( dev_t, dev ) | ||
173 | __field( ino_t, ino ) | ||
174 | __field( loff_t, pos ) | ||
175 | __field( unsigned int, len ) | ||
176 | __field( unsigned int, copied ) | ||
177 | ), | ||
178 | |||
179 | TP_fast_assign( | ||
180 | __entry->dev = inode->i_sb->s_dev; | ||
181 | __entry->ino = inode->i_ino; | ||
182 | __entry->pos = pos; | ||
183 | __entry->len = len; | ||
184 | __entry->copied = copied; | ||
185 | ), | ||
186 | |||
187 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
188 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
189 | __entry->copied) | ||
190 | ); | ||
191 | |||
192 | TRACE_EVENT(ext4_da_writepage, | ||
193 | TP_PROTO(struct inode *inode, struct page *page), | ||
194 | |||
195 | TP_ARGS(inode, page), | ||
196 | |||
197 | TP_STRUCT__entry( | ||
198 | __field( dev_t, dev ) | ||
199 | __field( ino_t, ino ) | ||
200 | __field( pgoff_t, index ) | ||
201 | |||
202 | ), | ||
203 | |||
204 | TP_fast_assign( | ||
205 | __entry->dev = inode->i_sb->s_dev; | ||
206 | __entry->ino = inode->i_ino; | ||
207 | __entry->index = page->index; | ||
208 | ), | ||
209 | |||
210 | TP_printk("dev %s ino %lu page_index %lu", | ||
211 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) | ||
212 | ); | ||
213 | |||
214 | TRACE_EVENT(ext4_da_writepages, | ||
215 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | ||
216 | |||
217 | TP_ARGS(inode, wbc), | ||
218 | |||
219 | TP_STRUCT__entry( | ||
220 | __field( dev_t, dev ) | ||
221 | __field( ino_t, ino ) | ||
222 | __field( long, nr_to_write ) | ||
223 | __field( long, pages_skipped ) | ||
224 | __field( loff_t, range_start ) | ||
225 | __field( loff_t, range_end ) | ||
226 | __field( char, nonblocking ) | ||
227 | __field( char, for_kupdate ) | ||
228 | __field( char, for_reclaim ) | ||
229 | __field( char, for_writepages ) | ||
230 | __field( char, range_cyclic ) | ||
231 | ), | ||
232 | |||
233 | TP_fast_assign( | ||
234 | __entry->dev = inode->i_sb->s_dev; | ||
235 | __entry->ino = inode->i_ino; | ||
236 | __entry->nr_to_write = wbc->nr_to_write; | ||
237 | __entry->pages_skipped = wbc->pages_skipped; | ||
238 | __entry->range_start = wbc->range_start; | ||
239 | __entry->range_end = wbc->range_end; | ||
240 | __entry->nonblocking = wbc->nonblocking; | ||
241 | __entry->for_kupdate = wbc->for_kupdate; | ||
242 | __entry->for_reclaim = wbc->for_reclaim; | ||
243 | __entry->for_writepages = wbc->for_writepages; | ||
244 | __entry->range_cyclic = wbc->range_cyclic; | ||
245 | ), | ||
246 | |||
247 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", | ||
248 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, | ||
249 | __entry->pages_skipped, __entry->range_start, | ||
250 | __entry->range_end, __entry->nonblocking, | ||
251 | __entry->for_kupdate, __entry->for_reclaim, | ||
252 | __entry->for_writepages, __entry->range_cyclic) | ||
253 | ); | ||
254 | |||
255 | TRACE_EVENT(ext4_da_writepages_result, | ||
256 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, | ||
257 | int ret, int pages_written), | ||
258 | |||
259 | TP_ARGS(inode, wbc, ret, pages_written), | ||
260 | |||
261 | TP_STRUCT__entry( | ||
262 | __field( dev_t, dev ) | ||
263 | __field( ino_t, ino ) | ||
264 | __field( int, ret ) | ||
265 | __field( int, pages_written ) | ||
266 | __field( long, pages_skipped ) | ||
267 | __field( char, encountered_congestion ) | ||
268 | __field( char, more_io ) | ||
269 | __field( char, no_nrwrite_index_update ) | ||
270 | ), | ||
271 | |||
272 | TP_fast_assign( | ||
273 | __entry->dev = inode->i_sb->s_dev; | ||
274 | __entry->ino = inode->i_ino; | ||
275 | __entry->ret = ret; | ||
276 | __entry->pages_written = pages_written; | ||
277 | __entry->pages_skipped = wbc->pages_skipped; | ||
278 | __entry->encountered_congestion = wbc->encountered_congestion; | ||
279 | __entry->more_io = wbc->more_io; | ||
280 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; | ||
281 | ), | ||
282 | |||
283 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", | ||
284 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, | ||
285 | __entry->pages_written, __entry->pages_skipped, | ||
286 | __entry->encountered_congestion, __entry->more_io, | ||
287 | __entry->no_nrwrite_index_update) | ||
288 | ); | ||
289 | |||
290 | TRACE_EVENT(ext4_da_write_begin, | ||
291 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
292 | unsigned int flags), | ||
293 | |||
294 | TP_ARGS(inode, pos, len, flags), | ||
295 | |||
296 | TP_STRUCT__entry( | ||
297 | __field( dev_t, dev ) | ||
298 | __field( ino_t, ino ) | ||
299 | __field( loff_t, pos ) | ||
300 | __field( unsigned int, len ) | ||
301 | __field( unsigned int, flags ) | ||
302 | ), | ||
303 | |||
304 | TP_fast_assign( | ||
305 | __entry->dev = inode->i_sb->s_dev; | ||
306 | __entry->ino = inode->i_ino; | ||
307 | __entry->pos = pos; | ||
308 | __entry->len = len; | ||
309 | __entry->flags = flags; | ||
310 | ), | ||
311 | |||
312 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", | ||
313 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
314 | __entry->flags) | ||
315 | ); | ||
316 | |||
317 | TRACE_EVENT(ext4_da_write_end, | ||
318 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
319 | unsigned int copied), | ||
320 | |||
321 | TP_ARGS(inode, pos, len, copied), | ||
322 | |||
323 | TP_STRUCT__entry( | ||
324 | __field( dev_t, dev ) | ||
325 | __field( ino_t, ino ) | ||
326 | __field( loff_t, pos ) | ||
327 | __field( unsigned int, len ) | ||
328 | __field( unsigned int, copied ) | ||
329 | ), | ||
330 | |||
331 | TP_fast_assign( | ||
332 | __entry->dev = inode->i_sb->s_dev; | ||
333 | __entry->ino = inode->i_ino; | ||
334 | __entry->pos = pos; | ||
335 | __entry->len = len; | ||
336 | __entry->copied = copied; | ||
337 | ), | ||
338 | |||
339 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", | ||
340 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, | ||
341 | __entry->copied) | ||
342 | ); | ||
343 | |||
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, | ||
388 | TP_PROTO(struct super_block *sb, unsigned long long blk, | ||
389 | unsigned long long count), | ||
390 | |||
391 | TP_ARGS(sb, blk, count), | ||
392 | |||
393 | TP_STRUCT__entry( | ||
394 | __field( dev_t, dev ) | ||
395 | __field( __u64, blk ) | ||
396 | __field( __u64, count ) | ||
397 | |||
398 | ), | ||
399 | |||
400 | TP_fast_assign( | ||
401 | __entry->dev = sb->s_dev; | ||
402 | __entry->blk = blk; | ||
403 | __entry->count = count; | ||
404 | ), | ||
405 | |||
406 | TP_printk("dev %s blk %llu count %llu", | ||
407 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) | ||
408 | ); | ||
409 | |||
410 | TRACE_EVENT(ext4_mb_new_inode_pa, | ||
411 | TP_PROTO(struct ext4_allocation_context *ac, | ||
412 | struct ext4_prealloc_space *pa), | ||
413 | |||
414 | TP_ARGS(ac, pa), | ||
415 | |||
416 | TP_STRUCT__entry( | ||
417 | __field( dev_t, dev ) | ||
418 | __field( ino_t, ino ) | ||
419 | __field( __u64, pa_pstart ) | ||
420 | __field( __u32, pa_len ) | ||
421 | __field( __u64, pa_lstart ) | ||
422 | |||
423 | ), | ||
424 | |||
425 | TP_fast_assign( | ||
426 | __entry->dev = ac->ac_sb->s_dev; | ||
427 | __entry->ino = ac->ac_inode->i_ino; | ||
428 | __entry->pa_pstart = pa->pa_pstart; | ||
429 | __entry->pa_len = pa->pa_len; | ||
430 | __entry->pa_lstart = pa->pa_lstart; | ||
431 | ), | ||
432 | |||
433 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | ||
434 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | ||
435 | __entry->pa_len, __entry->pa_lstart) | ||
436 | ); | ||
437 | |||
438 | TRACE_EVENT(ext4_mb_new_group_pa, | ||
439 | TP_PROTO(struct ext4_allocation_context *ac, | ||
440 | struct ext4_prealloc_space *pa), | ||
441 | |||
442 | TP_ARGS(ac, pa), | ||
443 | |||
444 | TP_STRUCT__entry( | ||
445 | __field( dev_t, dev ) | ||
446 | __field( ino_t, ino ) | ||
447 | __field( __u64, pa_pstart ) | ||
448 | __field( __u32, pa_len ) | ||
449 | __field( __u64, pa_lstart ) | ||
450 | |||
451 | ), | ||
452 | |||
453 | TP_fast_assign( | ||
454 | __entry->dev = ac->ac_sb->s_dev; | ||
455 | __entry->ino = ac->ac_inode->i_ino; | ||
456 | __entry->pa_pstart = pa->pa_pstart; | ||
457 | __entry->pa_len = pa->pa_len; | ||
458 | __entry->pa_lstart = pa->pa_lstart; | ||
459 | ), | ||
460 | |||
461 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", | ||
462 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, | ||
463 | __entry->pa_len, __entry->pa_lstart) | ||
464 | ); | ||
465 | |||
466 | TRACE_EVENT(ext4_mb_release_inode_pa, | ||
467 | TP_PROTO(struct ext4_allocation_context *ac, | ||
468 | struct ext4_prealloc_space *pa, | ||
469 | unsigned long long block, unsigned int count), | ||
470 | |||
471 | TP_ARGS(ac, pa, block, count), | ||
472 | |||
473 | TP_STRUCT__entry( | ||
474 | __field( dev_t, dev ) | ||
475 | __field( ino_t, ino ) | ||
476 | __field( __u64, block ) | ||
477 | __field( __u32, count ) | ||
478 | |||
479 | ), | ||
480 | |||
481 | TP_fast_assign( | ||
482 | __entry->dev = ac->ac_sb->s_dev; | ||
483 | __entry->ino = ac->ac_inode->i_ino; | ||
484 | __entry->block = block; | ||
485 | __entry->count = count; | ||
486 | ), | ||
487 | |||
488 | TP_printk("dev %s ino %lu block %llu count %u", | ||
489 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | ||
490 | __entry->count) | ||
491 | ); | ||
492 | |||
493 | TRACE_EVENT(ext4_mb_release_group_pa, | ||
494 | TP_PROTO(struct ext4_allocation_context *ac, | ||
495 | struct ext4_prealloc_space *pa), | ||
496 | |||
497 | TP_ARGS(ac, pa), | ||
498 | |||
499 | TP_STRUCT__entry( | ||
500 | __field( dev_t, dev ) | ||
501 | __field( ino_t, ino ) | ||
502 | __field( __u64, pa_pstart ) | ||
503 | __field( __u32, pa_len ) | ||
504 | |||
505 | ), | ||
506 | |||
507 | TP_fast_assign( | ||
508 | __entry->dev = ac->ac_sb->s_dev; | ||
509 | __entry->ino = ac->ac_inode->i_ino; | ||
510 | __entry->pa_pstart = pa->pa_pstart; | ||
511 | __entry->pa_len = pa->pa_len; | ||
512 | ), | ||
513 | |||
514 | TP_printk("dev %s pstart %llu len %u", | ||
515 | jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) | ||
516 | ); | ||
517 | |||
518 | TRACE_EVENT(ext4_discard_preallocations, | ||
519 | TP_PROTO(struct inode *inode), | ||
520 | |||
521 | TP_ARGS(inode), | ||
522 | |||
523 | TP_STRUCT__entry( | ||
524 | __field( dev_t, dev ) | ||
525 | __field( ino_t, ino ) | ||
526 | |||
527 | ), | ||
528 | |||
529 | TP_fast_assign( | ||
530 | __entry->dev = inode->i_sb->s_dev; | ||
531 | __entry->ino = inode->i_ino; | ||
532 | ), | ||
533 | |||
534 | TP_printk("dev %s ino %lu", | ||
535 | jbd2_dev_to_name(__entry->dev), __entry->ino) | ||
536 | ); | ||
537 | |||
538 | TRACE_EVENT(ext4_mb_discard_preallocations, | ||
539 | TP_PROTO(struct super_block *sb, int needed), | ||
540 | |||
541 | TP_ARGS(sb, needed), | ||
542 | |||
543 | TP_STRUCT__entry( | ||
544 | __field( dev_t, dev ) | ||
545 | __field( int, needed ) | ||
546 | |||
547 | ), | ||
548 | |||
549 | TP_fast_assign( | ||
550 | __entry->dev = sb->s_dev; | ||
551 | __entry->needed = needed; | ||
552 | ), | ||
553 | |||
554 | TP_printk("dev %s needed %d", | ||
555 | jbd2_dev_to_name(__entry->dev), __entry->needed) | ||
556 | ); | ||
557 | |||
558 | TRACE_EVENT(ext4_request_blocks, | ||
559 | TP_PROTO(struct ext4_allocation_request *ar), | ||
560 | |||
561 | TP_ARGS(ar), | ||
562 | |||
563 | TP_STRUCT__entry( | ||
564 | __field( dev_t, dev ) | ||
565 | __field( ino_t, ino ) | ||
566 | __field( unsigned int, flags ) | ||
567 | __field( unsigned int, len ) | ||
568 | __field( __u64, logical ) | ||
569 | __field( __u64, goal ) | ||
570 | __field( __u64, lleft ) | ||
571 | __field( __u64, lright ) | ||
572 | __field( __u64, pleft ) | ||
573 | __field( __u64, pright ) | ||
574 | ), | ||
575 | |||
576 | TP_fast_assign( | ||
577 | __entry->dev = ar->inode->i_sb->s_dev; | ||
578 | __entry->ino = ar->inode->i_ino; | ||
579 | __entry->flags = ar->flags; | ||
580 | __entry->len = ar->len; | ||
581 | __entry->logical = ar->logical; | ||
582 | __entry->goal = ar->goal; | ||
583 | __entry->lleft = ar->lleft; | ||
584 | __entry->lright = ar->lright; | ||
585 | __entry->pleft = ar->pleft; | ||
586 | __entry->pright = ar->pright; | ||
587 | ), | ||
588 | |||
589 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | ||
590 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | ||
591 | __entry->len, | ||
592 | (unsigned long long) __entry->logical, | ||
593 | (unsigned long long) __entry->goal, | ||
594 | (unsigned long long) __entry->lleft, | ||
595 | (unsigned long long) __entry->lright, | ||
596 | (unsigned long long) __entry->pleft, | ||
597 | (unsigned long long) __entry->pright) | ||
598 | ); | ||
599 | |||
600 | TRACE_EVENT(ext4_allocate_blocks, | ||
601 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), | ||
602 | |||
603 | TP_ARGS(ar, block), | ||
604 | |||
605 | TP_STRUCT__entry( | ||
606 | __field( dev_t, dev ) | ||
607 | __field( ino_t, ino ) | ||
608 | __field( __u64, block ) | ||
609 | __field( unsigned int, flags ) | ||
610 | __field( unsigned int, len ) | ||
611 | __field( __u64, logical ) | ||
612 | __field( __u64, goal ) | ||
613 | __field( __u64, lleft ) | ||
614 | __field( __u64, lright ) | ||
615 | __field( __u64, pleft ) | ||
616 | __field( __u64, pright ) | ||
617 | ), | ||
618 | |||
619 | TP_fast_assign( | ||
620 | __entry->dev = ar->inode->i_sb->s_dev; | ||
621 | __entry->ino = ar->inode->i_ino; | ||
622 | __entry->block = block; | ||
623 | __entry->flags = ar->flags; | ||
624 | __entry->len = ar->len; | ||
625 | __entry->logical = ar->logical; | ||
626 | __entry->goal = ar->goal; | ||
627 | __entry->lleft = ar->lleft; | ||
628 | __entry->lright = ar->lright; | ||
629 | __entry->pleft = ar->pleft; | ||
630 | __entry->pright = ar->pright; | ||
631 | ), | ||
632 | |||
633 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", | ||
634 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, | ||
635 | __entry->len, __entry->block, | ||
636 | (unsigned long long) __entry->logical, | ||
637 | (unsigned long long) __entry->goal, | ||
638 | (unsigned long long) __entry->lleft, | ||
639 | (unsigned long long) __entry->lright, | ||
640 | (unsigned long long) __entry->pleft, | ||
641 | (unsigned long long) __entry->pright) | ||
642 | ); | ||
643 | |||
644 | TRACE_EVENT(ext4_free_blocks, | ||
645 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, | ||
646 | int metadata), | ||
647 | |||
648 | TP_ARGS(inode, block, count, metadata), | ||
649 | |||
650 | TP_STRUCT__entry( | ||
651 | __field( dev_t, dev ) | ||
652 | __field( ino_t, ino ) | ||
653 | __field( __u64, block ) | ||
654 | __field( unsigned long, count ) | ||
655 | __field( int, metadata ) | ||
656 | |||
657 | ), | ||
658 | |||
659 | TP_fast_assign( | ||
660 | __entry->dev = inode->i_sb->s_dev; | ||
661 | __entry->ino = inode->i_ino; | ||
662 | __entry->block = block; | ||
663 | __entry->count = count; | ||
664 | __entry->metadata = metadata; | ||
665 | ), | ||
666 | |||
667 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", | ||
668 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, | ||
669 | __entry->count, __entry->metadata) | ||
670 | ); | ||
671 | |||
672 | TRACE_EVENT(ext4_sync_file, | ||
673 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), | ||
674 | |||
675 | TP_ARGS(file, dentry, datasync), | ||
676 | |||
677 | TP_STRUCT__entry( | ||
678 | __field( dev_t, dev ) | ||
679 | __field( ino_t, ino ) | ||
680 | __field( ino_t, parent ) | ||
681 | __field( int, datasync ) | ||
682 | ), | ||
683 | |||
684 | TP_fast_assign( | ||
685 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
686 | __entry->ino = dentry->d_inode->i_ino; | ||
687 | __entry->datasync = datasync; | ||
688 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
689 | ), | ||
690 | |||
691 | TP_printk("dev %s ino %ld parent %ld datasync %d ", | ||
692 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, | ||
693 | __entry->datasync) | ||
694 | ); | ||
695 | |||
696 | TRACE_EVENT(ext4_sync_fs, | ||
697 | TP_PROTO(struct super_block *sb, int wait), | ||
698 | |||
699 | TP_ARGS(sb, wait), | ||
700 | |||
701 | TP_STRUCT__entry( | ||
702 | __field( dev_t, dev ) | ||
703 | __field( int, wait ) | ||
704 | |||
705 | ), | ||
706 | |||
707 | TP_fast_assign( | ||
708 | __entry->dev = sb->s_dev; | ||
709 | __entry->wait = wait; | ||
710 | ), | ||
711 | |||
712 | TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), | ||
713 | __entry->wait) | ||
714 | ); | ||
715 | |||
716 | #endif /* _TRACE_EXT4_H */ | ||
717 | |||
718 | /* This part must be outside protection */ | ||
719 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h new file mode 100644 index 000000000000..845b0b4b48fd --- /dev/null +++ b/include/trace/events/jbd2.h | |||
@@ -0,0 +1,168 @@ | |||
1 | #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) | ||
2 | #define _TRACE_JBD2_H | ||
3 | |||
4 | #include <linux/jbd2.h> | ||
5 | #include <linux/tracepoint.h> | ||
6 | |||
7 | #undef TRACE_SYSTEM | ||
8 | #define TRACE_SYSTEM jbd2 | ||
9 | |||
10 | TRACE_EVENT(jbd2_checkpoint, | ||
11 | |||
12 | TP_PROTO(journal_t *journal, int result), | ||
13 | |||
14 | TP_ARGS(journal, result), | ||
15 | |||
16 | TP_STRUCT__entry( | ||
17 | __field( dev_t, dev ) | ||
18 | __field( int, result ) | ||
19 | ), | ||
20 | |||
21 | TP_fast_assign( | ||
22 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
23 | __entry->result = result; | ||
24 | ), | ||
25 | |||
26 | TP_printk("dev %s result %d", | ||
27 | jbd2_dev_to_name(__entry->dev), __entry->result) | ||
28 | ); | ||
29 | |||
30 | TRACE_EVENT(jbd2_start_commit, | ||
31 | |||
32 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
33 | |||
34 | TP_ARGS(journal, commit_transaction), | ||
35 | |||
36 | TP_STRUCT__entry( | ||
37 | __field( dev_t, dev ) | ||
38 | __field( char, sync_commit ) | ||
39 | __field( int, transaction ) | ||
40 | ), | ||
41 | |||
42 | TP_fast_assign( | ||
43 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
44 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
45 | __entry->transaction = commit_transaction->t_tid; | ||
46 | ), | ||
47 | |||
48 | TP_printk("dev %s transaction %d sync %d", | ||
49 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
50 | __entry->sync_commit) | ||
51 | ); | ||
52 | |||
53 | TRACE_EVENT(jbd2_commit_locking, | ||
54 | |||
55 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
56 | |||
57 | TP_ARGS(journal, commit_transaction), | ||
58 | |||
59 | TP_STRUCT__entry( | ||
60 | __field( dev_t, dev ) | ||
61 | __field( char, sync_commit ) | ||
62 | __field( int, transaction ) | ||
63 | ), | ||
64 | |||
65 | TP_fast_assign( | ||
66 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
67 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
68 | __entry->transaction = commit_transaction->t_tid; | ||
69 | ), | ||
70 | |||
71 | TP_printk("dev %s transaction %d sync %d", | ||
72 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
73 | __entry->sync_commit) | ||
74 | ); | ||
75 | |||
76 | TRACE_EVENT(jbd2_commit_flushing, | ||
77 | |||
78 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
79 | |||
80 | TP_ARGS(journal, commit_transaction), | ||
81 | |||
82 | TP_STRUCT__entry( | ||
83 | __field( dev_t, dev ) | ||
84 | __field( char, sync_commit ) | ||
85 | __field( int, transaction ) | ||
86 | ), | ||
87 | |||
88 | TP_fast_assign( | ||
89 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
90 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
91 | __entry->transaction = commit_transaction->t_tid; | ||
92 | ), | ||
93 | |||
94 | TP_printk("dev %s transaction %d sync %d", | ||
95 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
96 | __entry->sync_commit) | ||
97 | ); | ||
98 | |||
99 | TRACE_EVENT(jbd2_commit_logging, | ||
100 | |||
101 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
102 | |||
103 | TP_ARGS(journal, commit_transaction), | ||
104 | |||
105 | TP_STRUCT__entry( | ||
106 | __field( dev_t, dev ) | ||
107 | __field( char, sync_commit ) | ||
108 | __field( int, transaction ) | ||
109 | ), | ||
110 | |||
111 | TP_fast_assign( | ||
112 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
113 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
114 | __entry->transaction = commit_transaction->t_tid; | ||
115 | ), | ||
116 | |||
117 | TP_printk("dev %s transaction %d sync %d", | ||
118 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
119 | __entry->sync_commit) | ||
120 | ); | ||
121 | |||
122 | TRACE_EVENT(jbd2_end_commit, | ||
123 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
124 | |||
125 | TP_ARGS(journal, commit_transaction), | ||
126 | |||
127 | TP_STRUCT__entry( | ||
128 | __field( dev_t, dev ) | ||
129 | __field( char, sync_commit ) | ||
130 | __field( int, transaction ) | ||
131 | __field( int, head ) | ||
132 | ), | ||
133 | |||
134 | TP_fast_assign( | ||
135 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
136 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
137 | __entry->transaction = commit_transaction->t_tid; | ||
138 | __entry->head = journal->j_tail_sequence; | ||
139 | ), | ||
140 | |||
141 | TP_printk("dev %s transaction %d sync %d head %d", | ||
142 | jbd2_dev_to_name(__entry->dev), __entry->transaction, | ||
143 | __entry->sync_commit, __entry->head) | ||
144 | ); | ||
145 | |||
146 | TRACE_EVENT(jbd2_submit_inode_data, | ||
147 | TP_PROTO(struct inode *inode), | ||
148 | |||
149 | TP_ARGS(inode), | ||
150 | |||
151 | TP_STRUCT__entry( | ||
152 | __field( dev_t, dev ) | ||
153 | __field( ino_t, ino ) | ||
154 | ), | ||
155 | |||
156 | TP_fast_assign( | ||
157 | __entry->dev = inode->i_sb->s_dev; | ||
158 | __entry->ino = inode->i_ino; | ||
159 | ), | ||
160 | |||
161 | TP_printk("dev %s ino %lu", | ||
162 | jbd2_dev_to_name(__entry->dev), __entry->ino) | ||
163 | ); | ||
164 | |||
165 | #endif /* _TRACE_JBD2_H */ | ||
166 | |||
167 | /* This part must be outside protection */ | ||
168 | #include <trace/define_trace.h> | ||