diff options
Diffstat (limited to 'include')
151 files changed, 2638 insertions, 419 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 2ce1be9f6291..f72403c4b51a 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <linux/ctype.h> | 59 | #include <linux/ctype.h> |
60 | #include <linux/sched.h> | 60 | #include <linux/sched.h> |
61 | #include <asm/system.h> | 61 | #include <asm/system.h> |
62 | #include <asm/atomic.h> | 62 | #include <linux/atomic.h> |
63 | #include <asm/div64.h> | 63 | #include <asm/div64.h> |
64 | #include <asm/acpi.h> | 64 | #include <asm/acpi.h> |
65 | #include <linux/slab.h> | 65 | #include <linux/slab.h> |
diff --git a/include/acpi/video.h b/include/acpi/video.h index 0e98e679d3a7..61109f2609fc 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -5,6 +5,8 @@ | |||
5 | 5 | ||
6 | struct acpi_device; | 6 | struct acpi_device; |
7 | 7 | ||
8 | #define ACPI_VIDEO_CLASS "video" | ||
9 | |||
8 | #define ACPI_VIDEO_DISPLAY_CRT 1 | 10 | #define ACPI_VIDEO_DISPLAY_CRT 1 |
9 | #define ACPI_VIDEO_DISPLAY_TV 2 | 11 | #define ACPI_VIDEO_DISPLAY_TV 2 |
10 | #define ACPI_VIDEO_DISPLAY_DVI 3 | 12 | #define ACPI_VIDEO_DISPLAY_DVI 3 |
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index e994197f84b7..e37963c1df4d 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -1,5 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Generic C implementation of atomic counter operations | 2 | * Generic C implementation of atomic counter operations. Usable on |
3 | * UP systems only. Do not include in machine independent code. | ||
4 | * | ||
3 | * Originally implemented for MN10300. | 5 | * Originally implemented for MN10300. |
4 | * | 6 | * |
5 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | 7 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
@@ -14,7 +16,11 @@ | |||
14 | #define __ASM_GENERIC_ATOMIC_H | 16 | #define __ASM_GENERIC_ATOMIC_H |
15 | 17 | ||
16 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
17 | #error not SMP safe | 19 | /* Force people to define core atomics */ |
20 | # if !defined(atomic_add_return) || !defined(atomic_sub_return) || \ | ||
21 | !defined(atomic_clear_mask) || !defined(atomic_set_mask) | ||
22 | # error "SMP requires a little arch-specific magic" | ||
23 | # endif | ||
18 | #endif | 24 | #endif |
19 | 25 | ||
20 | /* | 26 | /* |
@@ -32,7 +38,9 @@ | |||
32 | * | 38 | * |
33 | * Atomically reads the value of @v. | 39 | * Atomically reads the value of @v. |
34 | */ | 40 | */ |
41 | #ifndef atomic_read | ||
35 | #define atomic_read(v) (*(volatile int *)&(v)->counter) | 42 | #define atomic_read(v) (*(volatile int *)&(v)->counter) |
43 | #endif | ||
36 | 44 | ||
37 | /** | 45 | /** |
38 | * atomic_set - set atomic variable | 46 | * atomic_set - set atomic variable |
@@ -53,6 +61,7 @@ | |||
53 | * | 61 | * |
54 | * Atomically adds @i to @v and returns the result | 62 | * Atomically adds @i to @v and returns the result |
55 | */ | 63 | */ |
64 | #ifndef atomic_add_return | ||
56 | static inline int atomic_add_return(int i, atomic_t *v) | 65 | static inline int atomic_add_return(int i, atomic_t *v) |
57 | { | 66 | { |
58 | unsigned long flags; | 67 | unsigned long flags; |
@@ -66,6 +75,7 @@ static inline int atomic_add_return(int i, atomic_t *v) | |||
66 | 75 | ||
67 | return temp; | 76 | return temp; |
68 | } | 77 | } |
78 | #endif | ||
69 | 79 | ||
70 | /** | 80 | /** |
71 | * atomic_sub_return - subtract integer from atomic variable | 81 | * atomic_sub_return - subtract integer from atomic variable |
@@ -74,6 +84,7 @@ static inline int atomic_add_return(int i, atomic_t *v) | |||
74 | * | 84 | * |
75 | * Atomically subtracts @i from @v and returns the result | 85 | * Atomically subtracts @i from @v and returns the result |
76 | */ | 86 | */ |
87 | #ifndef atomic_sub_return | ||
77 | static inline int atomic_sub_return(int i, atomic_t *v) | 88 | static inline int atomic_sub_return(int i, atomic_t *v) |
78 | { | 89 | { |
79 | unsigned long flags; | 90 | unsigned long flags; |
@@ -87,6 +98,7 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
87 | 98 | ||
88 | return temp; | 99 | return temp; |
89 | } | 100 | } |
101 | #endif | ||
90 | 102 | ||
91 | static inline int atomic_add_negative(int i, atomic_t *v) | 103 | static inline int atomic_add_negative(int i, atomic_t *v) |
92 | { | 104 | { |
@@ -117,8 +129,8 @@ static inline void atomic_dec(atomic_t *v) | |||
117 | #define atomic_inc_return(v) atomic_add_return(1, (v)) | 129 | #define atomic_inc_return(v) atomic_add_return(1, (v)) |
118 | 130 | ||
119 | #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) | 131 | #define atomic_sub_and_test(i, v) (atomic_sub_return((i), (v)) == 0) |
120 | #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) | 132 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
121 | #define atomic_inc_and_test(v) (atomic_add_return(1, (v)) == 0) | 133 | #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) |
122 | 134 | ||
123 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | 135 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |
124 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 136 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) |
@@ -129,26 +141,51 @@ static inline void atomic_dec(atomic_t *v) | |||
129 | 141 | ||
130 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | 142 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) |
131 | 143 | ||
132 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | 144 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
133 | { | 145 | { |
134 | int c, old; | 146 | int c, old; |
135 | c = atomic_read(v); | 147 | c = atomic_read(v); |
136 | while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c) | 148 | while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c) |
137 | c = old; | 149 | c = old; |
138 | return c != u; | 150 | return c; |
139 | } | 151 | } |
140 | 152 | ||
141 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | 153 | /** |
142 | 154 | * atomic_clear_mask - Atomically clear bits in atomic variable | |
143 | static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | 155 | * @mask: Mask of the bits to be cleared |
156 | * @v: pointer of type atomic_t | ||
157 | * | ||
158 | * Atomically clears the bits set in @mask from @v | ||
159 | */ | ||
160 | #ifndef atomic_clear_mask | ||
161 | static inline void atomic_clear_mask(unsigned long mask, atomic_t *v) | ||
144 | { | 162 | { |
145 | unsigned long flags; | 163 | unsigned long flags; |
146 | 164 | ||
147 | mask = ~mask; | 165 | mask = ~mask; |
148 | raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */ | 166 | raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */ |
149 | *addr &= mask; | 167 | v->counter &= mask; |
150 | raw_local_irq_restore(flags); | 168 | raw_local_irq_restore(flags); |
151 | } | 169 | } |
170 | #endif | ||
171 | |||
172 | /** | ||
173 | * atomic_set_mask - Atomically set bits in atomic variable | ||
174 | * @mask: Mask of the bits to be set | ||
175 | * @v: pointer of type atomic_t | ||
176 | * | ||
177 | * Atomically sets the bits set in @mask in @v | ||
178 | */ | ||
179 | #ifndef atomic_set_mask | ||
180 | static inline void atomic_set_mask(unsigned int mask, atomic_t *v) | ||
181 | { | ||
182 | unsigned long flags; | ||
183 | |||
184 | raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */ | ||
185 | v->counter |= mask; | ||
186 | raw_local_irq_restore(flags); | ||
187 | } | ||
188 | #endif | ||
152 | 189 | ||
153 | /* Assume that atomic operations are already serializing */ | 190 | /* Assume that atomic operations are already serializing */ |
154 | #define smp_mb__before_atomic_dec() barrier() | 191 | #define smp_mb__before_atomic_dec() barrier() |
@@ -156,7 +193,5 @@ static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | |||
156 | #define smp_mb__before_atomic_inc() barrier() | 193 | #define smp_mb__before_atomic_inc() barrier() |
157 | #define smp_mb__after_atomic_inc() barrier() | 194 | #define smp_mb__after_atomic_inc() barrier() |
158 | 195 | ||
159 | #include <asm-generic/atomic-long.h> | ||
160 | |||
161 | #endif /* __KERNEL__ */ | 196 | #endif /* __KERNEL__ */ |
162 | #endif /* __ASM_GENERIC_ATOMIC_H */ | 197 | #endif /* __ASM_GENERIC_ATOMIC_H */ |
diff --git a/include/asm-generic/bitops/ext2-atomic-setbit.h b/include/asm-generic/bitops/ext2-atomic-setbit.h new file mode 100644 index 000000000000..5a0997857b34 --- /dev/null +++ b/include/asm-generic/bitops/ext2-atomic-setbit.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_SETBIT_H_ | ||
2 | #define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_SETBIT_H_ | ||
3 | |||
4 | /* | ||
5 | * Atomic bitops based version of ext2 atomic bitops | ||
6 | */ | ||
7 | |||
8 | #define ext2_set_bit_atomic(l, nr, addr) test_and_set_bit_le(nr, addr) | ||
9 | #define ext2_clear_bit_atomic(l, nr, addr) test_and_clear_bit_le(nr, addr) | ||
10 | |||
11 | #endif /* _ASM_GENERIC_BITOPS_EXT2_ATOMIC_SETBIT_H_ */ | ||
diff --git a/include/asm-generic/bitops/ext2-atomic.h b/include/asm-generic/bitops/ext2-atomic.h index ecf1c9d8a7cc..87f0f109d7f1 100644 --- a/include/asm-generic/bitops/ext2-atomic.h +++ b/include/asm-generic/bitops/ext2-atomic.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_ | 1 | #ifndef _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_ |
2 | #define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_ | 2 | #define _ASM_GENERIC_BITOPS_EXT2_ATOMIC_H_ |
3 | 3 | ||
4 | /* | ||
5 | * Spinlock based version of ext2 atomic bitops | ||
6 | */ | ||
7 | |||
4 | #define ext2_set_bit_atomic(lock, nr, addr) \ | 8 | #define ext2_set_bit_atomic(lock, nr, addr) \ |
5 | ({ \ | 9 | ({ \ |
6 | int ret; \ | 10 | int ret; \ |
diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h index c8a5d68541d7..9ceb03b4f466 100644 --- a/include/asm-generic/local.h +++ b/include/asm-generic/local.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_GENERIC_LOCAL_H | 2 | #define _ASM_GENERIC_LOCAL_H |
3 | 3 | ||
4 | #include <linux/percpu.h> | 4 | #include <linux/percpu.h> |
5 | #include <asm/atomic.h> | 5 | #include <linux/atomic.h> |
6 | #include <asm/types.h> | 6 | #include <asm/types.h> |
7 | 7 | ||
8 | /* | 8 | /* |
diff --git a/include/asm-generic/local64.h b/include/asm-generic/local64.h index 02ac760c1a8b..5980002b8b7b 100644 --- a/include/asm-generic/local64.h +++ b/include/asm-generic/local64.h | |||
@@ -55,7 +55,7 @@ typedef struct { | |||
55 | 55 | ||
56 | #else /* BITS_PER_LONG != 64 */ | 56 | #else /* BITS_PER_LONG != 64 */ |
57 | 57 | ||
58 | #include <asm/atomic.h> | 58 | #include <linux/atomic.h> |
59 | 59 | ||
60 | /* Don't use typedef: don't want them to be mixed with atomic_t's. */ | 60 | /* Don't use typedef: don't want them to be mixed with atomic_t's. */ |
61 | typedef struct { | 61 | typedef struct { |
diff --git a/include/asm-generic/pci-bridge.h b/include/asm-generic/pci-bridge.h new file mode 100644 index 000000000000..4a5aca2a2c94 --- /dev/null +++ b/include/asm-generic/pci-bridge.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or | ||
3 | * modify it under the terms of the GNU General Public License | ||
4 | * as published by the Free Software Foundation; either version | ||
5 | * 2 of the License, or (at your option) any later version. | ||
6 | */ | ||
7 | #ifndef _ASM_GENERIC_PCI_BRIDGE_H | ||
8 | #define _ASM_GENERIC_PCI_BRIDGE_H | ||
9 | |||
10 | #ifdef __KERNEL__ | ||
11 | |||
12 | enum { | ||
13 | /* Force re-assigning all resources (ignore firmware | ||
14 | * setup completely) | ||
15 | */ | ||
16 | PCI_REASSIGN_ALL_RSRC = 0x00000001, | ||
17 | |||
18 | /* Re-assign all bus numbers */ | ||
19 | PCI_REASSIGN_ALL_BUS = 0x00000002, | ||
20 | |||
21 | /* Do not try to assign, just use existing setup */ | ||
22 | PCI_PROBE_ONLY = 0x00000004, | ||
23 | |||
24 | /* Don't bother with ISA alignment unless the bridge has | ||
25 | * ISA forwarding enabled | ||
26 | */ | ||
27 | PCI_CAN_SKIP_ISA_ALIGN = 0x00000008, | ||
28 | |||
29 | /* Enable domain numbers in /proc */ | ||
30 | PCI_ENABLE_PROC_DOMAINS = 0x00000010, | ||
31 | /* ... except for domain 0 */ | ||
32 | PCI_COMPAT_DOMAIN_0 = 0x00000020, | ||
33 | }; | ||
34 | |||
35 | #ifdef CONFIG_PCI | ||
36 | extern unsigned int pci_flags; | ||
37 | |||
38 | static inline void pci_set_flags(int flags) | ||
39 | { | ||
40 | pci_flags = flags; | ||
41 | } | ||
42 | |||
43 | static inline void pci_add_flags(int flags) | ||
44 | { | ||
45 | pci_flags |= flags; | ||
46 | } | ||
47 | |||
48 | static inline int pci_has_flag(int flag) | ||
49 | { | ||
50 | return pci_flags & flag; | ||
51 | } | ||
52 | #else | ||
53 | static inline void pci_set_flags(int flags) { } | ||
54 | static inline void pci_add_flags(int flags) { } | ||
55 | static inline int pci_has_flag(int flag) | ||
56 | { | ||
57 | return 0; | ||
58 | } | ||
59 | #endif /* CONFIG_PCI */ | ||
60 | |||
61 | #endif /* __KERNEL__ */ | ||
62 | #endif /* _ASM_GENERIC_PCI_BRIDGE_H */ | ||
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h index 4b0b9cbbfae5..215efa74f5a2 100644 --- a/include/asm-generic/system.h +++ b/include/asm-generic/system.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #ifndef __ASM_GENERIC_SYSTEM_H | 14 | #ifndef __ASM_GENERIC_SYSTEM_H |
15 | #define __ASM_GENERIC_SYSTEM_H | 15 | #define __ASM_GENERIC_SYSTEM_H |
16 | 16 | ||
17 | #ifdef __KERNEL__ | ||
18 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
19 | 18 | ||
20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
@@ -139,5 +138,4 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | |||
139 | 138 | ||
140 | #endif /* !__ASSEMBLY__ */ | 139 | #endif /* !__ASSEMBLY__ */ |
141 | 140 | ||
142 | #endif /* __KERNEL__ */ | ||
143 | #endif /* __ASM_GENERIC_SYSTEM_H */ | 141 | #endif /* __ASM_GENERIC_SYSTEM_H */ |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 738b3a5faa12..9b7c2bb4bb44 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -886,6 +886,8 @@ struct drm_driver { | |||
886 | */ | 886 | */ |
887 | int (*gem_init_object) (struct drm_gem_object *obj); | 887 | int (*gem_init_object) (struct drm_gem_object *obj); |
888 | void (*gem_free_object) (struct drm_gem_object *obj); | 888 | void (*gem_free_object) (struct drm_gem_object *obj); |
889 | int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); | ||
890 | void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); | ||
889 | 891 | ||
890 | /* vga arb irq handler */ | 892 | /* vga arb irq handler */ |
891 | void (*vgaarb_irq)(struct drm_device *dev, bool state); | 893 | void (*vgaarb_irq)(struct drm_device *dev, bool state); |
@@ -1539,6 +1541,8 @@ struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, | |||
1539 | size_t size); | 1541 | size_t size); |
1540 | int drm_gem_object_init(struct drm_device *dev, | 1542 | int drm_gem_object_init(struct drm_device *dev, |
1541 | struct drm_gem_object *obj, size_t size); | 1543 | struct drm_gem_object *obj, size_t size); |
1544 | int drm_gem_private_object_init(struct drm_device *dev, | ||
1545 | struct drm_gem_object *obj, size_t size); | ||
1542 | void drm_gem_object_handle_free(struct drm_gem_object *obj); | 1546 | void drm_gem_object_handle_free(struct drm_gem_object *obj); |
1543 | void drm_gem_vm_open(struct vm_area_struct *vma); | 1547 | void drm_gem_vm_open(struct vm_area_struct *vma); |
1544 | void drm_gem_vm_close(struct vm_area_struct *vma); | 1548 | void drm_gem_vm_close(struct vm_area_struct *vma); |
@@ -1672,13 +1676,6 @@ static __inline__ int drm_pci_device_is_agp(struct drm_device *dev) | |||
1672 | return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); | 1676 | return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); |
1673 | } | 1677 | } |
1674 | 1678 | ||
1675 | |||
1676 | static __inline__ int drm_pci_device_is_pcie(struct drm_device *dev) | ||
1677 | { | ||
1678 | return pci_find_capability(dev->pdev, PCI_CAP_ID_EXP); | ||
1679 | } | ||
1680 | |||
1681 | |||
1682 | extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver); | 1679 | extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver); |
1683 | extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver); | 1680 | extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver); |
1684 | extern int drm_get_pci_dev(struct pci_dev *pdev, | 1681 | extern int drm_get_pci_dev(struct pci_dev *pdev, |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 787f7b6fd622..b65be6054a18 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -911,6 +911,7 @@ struct drm_radeon_cs { | |||
911 | #define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */ | 911 | #define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */ |
912 | #define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */ | 912 | #define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */ |
913 | #define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */ | 913 | #define RADEON_INFO_FUSION_GART_WORKING 0x0c /* fusion writes to GTT were broken before this */ |
914 | #define RADEON_INFO_BACKEND_MAP 0x0d /* pipe to backend map, needed by mesa */ | ||
914 | 915 | ||
915 | struct drm_radeon_info { | 916 | struct drm_radeon_info { |
916 | uint32_t request; | 917 | uint32_t request; |
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index 62a0e4c4ceee..42e346985186 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h | |||
@@ -662,9 +662,6 @@ extern int ttm_bo_kmap(struct ttm_buffer_object *bo, unsigned long start_page, | |||
662 | 662 | ||
663 | extern void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map); | 663 | extern void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map); |
664 | 664 | ||
665 | #if 0 | ||
666 | #endif | ||
667 | |||
668 | /** | 665 | /** |
669 | * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object. | 666 | * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object. |
670 | * | 667 | * |
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 09af2d746d1c..94eb1434316e 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
@@ -78,7 +78,7 @@ struct ttm_backend_func { | |||
78 | * | 78 | * |
79 | * Bind the backend pages into the aperture in the location | 79 | * Bind the backend pages into the aperture in the location |
80 | * indicated by @bo_mem. This function should be able to handle | 80 | * indicated by @bo_mem. This function should be able to handle |
81 | * differences between aperture- and system page sizes. | 81 | * differences between aperture and system page sizes. |
82 | */ | 82 | */ |
83 | int (*bind) (struct ttm_backend *backend, struct ttm_mem_reg *bo_mem); | 83 | int (*bind) (struct ttm_backend *backend, struct ttm_mem_reg *bo_mem); |
84 | 84 | ||
@@ -88,7 +88,7 @@ struct ttm_backend_func { | |||
88 | * @backend: Pointer to a struct ttm_backend. | 88 | * @backend: Pointer to a struct ttm_backend. |
89 | * | 89 | * |
90 | * Unbind previously bound backend pages. This function should be | 90 | * Unbind previously bound backend pages. This function should be |
91 | * able to handle differences between aperture- and system page sizes. | 91 | * able to handle differences between aperture and system page sizes. |
92 | */ | 92 | */ |
93 | int (*unbind) (struct ttm_backend *backend); | 93 | int (*unbind) (struct ttm_backend *backend); |
94 | 94 | ||
@@ -786,7 +786,7 @@ extern int ttm_bo_device_release(struct ttm_bo_device *bdev); | |||
786 | * ttm_bo_device_init | 786 | * ttm_bo_device_init |
787 | * | 787 | * |
788 | * @bdev: A pointer to a struct ttm_bo_device to initialize. | 788 | * @bdev: A pointer to a struct ttm_bo_device to initialize. |
789 | * @mem_global: A pointer to an initialized struct ttm_mem_global. | 789 | * @glob: A pointer to an initialized struct ttm_bo_global. |
790 | * @driver: A pointer to a struct ttm_bo_driver set up by the caller. | 790 | * @driver: A pointer to a struct ttm_bo_driver set up by the caller. |
791 | * @file_page_offset: Offset into the device address space that is available | 791 | * @file_page_offset: Offset into the device address space that is available |
792 | * for buffer data. This ensures compatibility with other users of the | 792 | * for buffer data. This ensures compatibility with other users of the |
diff --git a/include/drm/ttm/ttm_lock.h b/include/drm/ttm/ttm_lock.h index 81ba0b0b891a..2e7f0c941b5d 100644 --- a/include/drm/ttm/ttm_lock.h +++ b/include/drm/ttm/ttm_lock.h | |||
@@ -51,7 +51,7 @@ | |||
51 | 51 | ||
52 | #include "ttm/ttm_object.h" | 52 | #include "ttm/ttm_object.h" |
53 | #include <linux/wait.h> | 53 | #include <linux/wait.h> |
54 | #include <asm/atomic.h> | 54 | #include <linux/atomic.h> |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * struct ttm_lock | 57 | * struct ttm_lock |
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h index b199170b3c2c..26c1f78d136f 100644 --- a/include/drm/ttm/ttm_memory.h +++ b/include/drm/ttm/ttm_memory.h | |||
@@ -41,7 +41,7 @@ | |||
41 | * @do_shrink: The callback function. | 41 | * @do_shrink: The callback function. |
42 | * | 42 | * |
43 | * Arguments to the do_shrink functions are intended to be passed using | 43 | * Arguments to the do_shrink functions are intended to be passed using |
44 | * inheritance. That is, the argument class derives from struct ttm_mem_srink, | 44 | * inheritance. That is, the argument class derives from struct ttm_mem_shrink, |
45 | * and can be accessed using container_of(). | 45 | * and can be accessed using container_of(). |
46 | */ | 46 | */ |
47 | 47 | ||
diff --git a/include/drm/ttm/ttm_object.h b/include/drm/ttm/ttm_object.h index 0d9db099978b..e46054e5255b 100644 --- a/include/drm/ttm/ttm_object.h +++ b/include/drm/ttm/ttm_object.h | |||
@@ -111,7 +111,7 @@ struct ttm_object_device; | |||
111 | * | 111 | * |
112 | * @ref_obj_release: A function to be called when a reference object | 112 | * @ref_obj_release: A function to be called when a reference object |
113 | * with another ttm_ref_type than TTM_REF_USAGE is deleted. | 113 | * with another ttm_ref_type than TTM_REF_USAGE is deleted. |
114 | * this function may, for example, release a lock held by a user-space | 114 | * This function may, for example, release a lock held by a user-space |
115 | * process. | 115 | * process. |
116 | * | 116 | * |
117 | * This struct is intended to be used as a base struct for objects that | 117 | * This struct is intended to be used as a base struct for objects that |
@@ -172,7 +172,7 @@ extern struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file | |||
172 | /** | 172 | /** |
173 | * ttm_base_object_unref | 173 | * ttm_base_object_unref |
174 | * | 174 | * |
175 | * @p_base: Pointer to a pointer referncing a struct ttm_base_object. | 175 | * @p_base: Pointer to a pointer referencing a struct ttm_base_object. |
176 | * | 176 | * |
177 | * Decrements the base object refcount and clears the pointer pointed to by | 177 | * Decrements the base object refcount and clears the pointer pointed to by |
178 | * p_base. | 178 | * p_base. |
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 8062890f725e..129de12353f1 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h | |||
@@ -32,7 +32,7 @@ | |||
32 | /** | 32 | /** |
33 | * Get count number of pages from pool to pages list. | 33 | * Get count number of pages from pool to pages list. |
34 | * | 34 | * |
35 | * @pages: heado of empty linked list where pages are filled. | 35 | * @pages: head of empty linked list where pages are filled. |
36 | * @flags: ttm flags for page allocation. | 36 | * @flags: ttm flags for page allocation. |
37 | * @cstate: ttm caching state for the page. | 37 | * @cstate: ttm caching state for the page. |
38 | * @count: number of pages to allocate. | 38 | * @count: number of pages to allocate. |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 01f636275057..619b5657af77 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -135,6 +135,7 @@ header-y += firewire-cdev.h | |||
135 | header-y += firewire-constants.h | 135 | header-y += firewire-constants.h |
136 | header-y += flat.h | 136 | header-y += flat.h |
137 | header-y += fs.h | 137 | header-y += fs.h |
138 | header-y += fsl_hypervisor.h | ||
138 | header-y += fuse.h | 139 | header-y += fuse.h |
139 | header-y += futex.h | 140 | header-y += futex.h |
140 | header-y += gameport.h | 141 | header-y += gameport.h |
diff --git a/include/linux/aio.h b/include/linux/aio.h index 7a8db4155281..2dcb72bff4b6 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/uio.h> | 7 | #include <linux/uio.h> |
8 | #include <linux/rcupdate.h> | 8 | #include <linux/rcupdate.h> |
9 | 9 | ||
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | 11 | ||
12 | #define AIO_MAXSEGS 4 | 12 | #define AIO_MAXSEGS 4 |
13 | #define AIO_KIOGRP_NR_ATOMIC 8 | 13 | #define AIO_KIOGRP_NR_ATOMIC 8 |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 381f4cec8260..49a83ca900ba 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -220,7 +220,7 @@ struct atm_cirange { | |||
220 | #include <linux/skbuff.h> /* struct sk_buff */ | 220 | #include <linux/skbuff.h> /* struct sk_buff */ |
221 | #include <linux/uio.h> | 221 | #include <linux/uio.h> |
222 | #include <net/sock.h> | 222 | #include <net/sock.h> |
223 | #include <asm/atomic.h> | 223 | #include <linux/atomic.h> |
224 | 224 | ||
225 | #ifdef CONFIG_PROC_FS | 225 | #ifdef CONFIG_PROC_FS |
226 | #include <linux/proc_fs.h> | 226 | #include <linux/proc_fs.h> |
diff --git a/include/linux/atomic.h b/include/linux/atomic.h index bc6615d4132b..42b77b5446d2 100644 --- a/include/linux/atomic.h +++ b/include/linux/atomic.h | |||
@@ -1,8 +1,32 @@ | |||
1 | /* Atomic operations usable in machine independent code */ | ||
1 | #ifndef _LINUX_ATOMIC_H | 2 | #ifndef _LINUX_ATOMIC_H |
2 | #define _LINUX_ATOMIC_H | 3 | #define _LINUX_ATOMIC_H |
3 | #include <asm/atomic.h> | 4 | #include <asm/atomic.h> |
4 | 5 | ||
5 | /** | 6 | /** |
7 | * atomic_add_unless - add unless the number is already a given value | ||
8 | * @v: pointer of type atomic_t | ||
9 | * @a: the amount to add to v... | ||
10 | * @u: ...unless v is equal to u. | ||
11 | * | ||
12 | * Atomically adds @a to @v, so long as @v was not already @u. | ||
13 | * Returns non-zero if @v was not @u, and zero otherwise. | ||
14 | */ | ||
15 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | ||
16 | { | ||
17 | return __atomic_add_unless(v, a, u) != u; | ||
18 | } | ||
19 | |||
20 | /** | ||
21 | * atomic_inc_not_zero - increment unless the number is zero | ||
22 | * @v: pointer of type atomic_t | ||
23 | * | ||
24 | * Atomically increments @v by 1, so long as @v is non-zero. | ||
25 | * Returns non-zero if @v was non-zero, and zero otherwise. | ||
26 | */ | ||
27 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
28 | |||
29 | /** | ||
6 | * atomic_inc_not_zero_hint - increment if not null | 30 | * atomic_inc_not_zero_hint - increment if not null |
7 | * @v: pointer of type atomic_t | 31 | * @v: pointer of type atomic_t |
8 | * @hint: probable value of the atomic before the increment | 32 | * @hint: probable value of the atomic before the increment |
@@ -73,4 +97,8 @@ static inline void atomic_or(int i, atomic_t *v) | |||
73 | } | 97 | } |
74 | #endif /* #ifndef CONFIG_ARCH_HAS_ATOMIC_OR */ | 98 | #endif /* #ifndef CONFIG_ARCH_HAS_ATOMIC_OR */ |
75 | 99 | ||
100 | #include <asm-generic/atomic-long.h> | ||
101 | #ifdef CONFIG_GENERIC_ATOMIC64 | ||
102 | #include <asm-generic/atomic64.h> | ||
103 | #endif | ||
76 | #endif /* _LINUX_ATOMIC_H */ | 104 | #endif /* _LINUX_ATOMIC_H */ |
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 96f4094b706d..3b2f9cb82986 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/writeback.h> | 18 | #include <linux/writeback.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | struct page; | 21 | struct page; |
22 | struct device; | 22 | struct device; |
@@ -40,6 +40,7 @@ typedef int (congested_fn)(void *, int); | |||
40 | enum bdi_stat_item { | 40 | enum bdi_stat_item { |
41 | BDI_RECLAIMABLE, | 41 | BDI_RECLAIMABLE, |
42 | BDI_WRITEBACK, | 42 | BDI_WRITEBACK, |
43 | BDI_WRITTEN, | ||
43 | NR_BDI_STAT_ITEMS | 44 | NR_BDI_STAT_ITEMS |
44 | }; | 45 | }; |
45 | 46 | ||
@@ -57,6 +58,7 @@ struct bdi_writeback { | |||
57 | struct list_head b_dirty; /* dirty inodes */ | 58 | struct list_head b_dirty; /* dirty inodes */ |
58 | struct list_head b_io; /* parked for writeback */ | 59 | struct list_head b_io; /* parked for writeback */ |
59 | struct list_head b_more_io; /* parked for more writeback */ | 60 | struct list_head b_more_io; /* parked for more writeback */ |
61 | spinlock_t list_lock; /* protects the b_* lists */ | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | struct backing_dev_info { | 64 | struct backing_dev_info { |
@@ -71,6 +73,11 @@ struct backing_dev_info { | |||
71 | 73 | ||
72 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; | 74 | struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS]; |
73 | 75 | ||
76 | unsigned long bw_time_stamp; /* last time write bw is updated */ | ||
77 | unsigned long written_stamp; /* pages written at bw_time_stamp */ | ||
78 | unsigned long write_bandwidth; /* the estimated write bandwidth */ | ||
79 | unsigned long avg_write_bandwidth; /* further smoothed write bw */ | ||
80 | |||
74 | struct prop_local_percpu completions; | 81 | struct prop_local_percpu completions; |
75 | int dirty_exceeded; | 82 | int dirty_exceeded; |
76 | 83 | ||
@@ -106,6 +113,7 @@ int bdi_writeback_thread(void *data); | |||
106 | int bdi_has_dirty_io(struct backing_dev_info *bdi); | 113 | int bdi_has_dirty_io(struct backing_dev_info *bdi); |
107 | void bdi_arm_supers_timer(void); | 114 | void bdi_arm_supers_timer(void); |
108 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); | 115 | void bdi_wakeup_thread_delayed(struct backing_dev_info *bdi); |
116 | void bdi_lock_two(struct bdi_writeback *wb1, struct bdi_writeback *wb2); | ||
109 | 117 | ||
110 | extern spinlock_t bdi_lock; | 118 | extern spinlock_t bdi_lock; |
111 | extern struct list_head bdi_list; | 119 | extern struct list_head bdi_list; |
diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h index 564d997e2168..ac4d9f8b52e9 100644 --- a/include/linux/bit_spinlock.h +++ b/include/linux/bit_spinlock.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <linux/preempt.h> | 5 | #include <linux/preempt.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * bit-based spin_lock() | 9 | * bit-based spin_lock() |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index dcafe0bf0005..3bac44cce142 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -144,6 +144,7 @@ extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); | |||
144 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); | 144 | extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); |
145 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); | 145 | extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); |
146 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); | 146 | extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); |
147 | extern int bitmap_ord_to_pos(const unsigned long *bitmap, int n, int bits); | ||
147 | 148 | ||
148 | #define BITMAP_LAST_WORD_MASK(nbits) \ | 149 | #define BITMAP_LAST_WORD_MASK(nbits) \ |
149 | ( \ | 150 | ( \ |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 503c8a6b3079..458f497738a4 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
14 | #include <linux/wait.h> | 14 | #include <linux/wait.h> |
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | 16 | ||
17 | #ifdef CONFIG_BLOCK | 17 | #ifdef CONFIG_BLOCK |
18 | 18 | ||
diff --git a/include/linux/ceph/messenger.h b/include/linux/ceph/messenger.h index 31d91a64838b..d7adf151d335 100644 --- a/include/linux/ceph/messenger.h +++ b/include/linux/ceph/messenger.h | |||
@@ -94,6 +94,7 @@ struct ceph_msg { | |||
94 | bool more_to_follow; | 94 | bool more_to_follow; |
95 | bool needs_out_seq; | 95 | bool needs_out_seq; |
96 | int front_max; | 96 | int front_max; |
97 | unsigned long ack_stamp; /* tx: when we were acked */ | ||
97 | 98 | ||
98 | struct ceph_msgpool *pool; | 99 | struct ceph_msgpool *pool; |
99 | }; | 100 | }; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 846bb1792572..8779405e15a8 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -438,16 +438,7 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | |||
438 | struct compat_timespec __user *tsp, | 438 | struct compat_timespec __user *tsp, |
439 | const compat_sigset_t __user *sigmask, | 439 | const compat_sigset_t __user *sigmask, |
440 | compat_size_t sigsetsize); | 440 | compat_size_t sigsetsize); |
441 | #if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && \ | ||
442 | !defined(CONFIG_NFSD_DEPRECATED) | ||
443 | union compat_nfsctl_res; | ||
444 | struct compat_nfsctl_arg; | ||
445 | asmlinkage long compat_sys_nfsservctl(int cmd, | ||
446 | struct compat_nfsctl_arg __user *arg, | ||
447 | union compat_nfsctl_res __user *res); | ||
448 | #else | ||
449 | asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2); | 441 | asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2); |
450 | #endif | ||
451 | asmlinkage long compat_sys_signalfd4(int ufd, | 442 | asmlinkage long compat_sys_signalfd4(int ufd, |
452 | const compat_sigset_t __user *sigmask, | 443 | const compat_sigset_t __user *sigmask, |
453 | compat_size_t sigsetsize, int flags); | 444 | compat_size_t sigsetsize, int flags); |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index 645778ad899b..3081c58d696e 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <linux/mutex.h> | 42 | #include <linux/mutex.h> |
43 | #include <linux/err.h> | 43 | #include <linux/err.h> |
44 | 44 | ||
45 | #include <asm/atomic.h> | 45 | #include <linux/atomic.h> |
46 | 46 | ||
47 | #define CONFIGFS_ITEM_NAME_LEN 20 | 47 | #define CONFIGFS_ITEM_NAME_LEN 20 |
48 | 48 | ||
diff --git a/include/linux/connector.h b/include/linux/connector.h index f696bccd48cb..0c69ad825b39 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -75,7 +75,7 @@ struct cn_msg { | |||
75 | 75 | ||
76 | #ifdef __KERNEL__ | 76 | #ifdef __KERNEL__ |
77 | 77 | ||
78 | #include <asm/atomic.h> | 78 | #include <linux/atomic.h> |
79 | 79 | ||
80 | #include <linux/list.h> | 80 | #include <linux/list.h> |
81 | #include <linux/workqueue.h> | 81 | #include <linux/workqueue.h> |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 5f09323ee880..b1a635acf72a 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -70,6 +70,39 @@ enum { | |||
70 | CPU_PRI_WORKQUEUE = 5, | 70 | CPU_PRI_WORKQUEUE = 5, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | #define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ | ||
74 | #define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */ | ||
75 | #define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */ | ||
76 | #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ | ||
77 | #define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ | ||
78 | #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ | ||
79 | #define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task, | ||
80 | * not handling interrupts, soon dead. | ||
81 | * Called on the dying cpu, interrupts | ||
82 | * are already disabled. Must not | ||
83 | * sleep, must not fail */ | ||
84 | #define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug | ||
85 | * lock is dropped */ | ||
86 | #define CPU_STARTING 0x000A /* CPU (unsigned)v soon running. | ||
87 | * Called on the new cpu, just before | ||
88 | * enabling interrupts. Must not sleep, | ||
89 | * must not fail */ | ||
90 | |||
91 | /* Used for CPU hotplug events occurring while tasks are frozen due to a suspend | ||
92 | * operation in progress | ||
93 | */ | ||
94 | #define CPU_TASKS_FROZEN 0x0010 | ||
95 | |||
96 | #define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN) | ||
97 | #define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN) | ||
98 | #define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN) | ||
99 | #define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN) | ||
100 | #define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN) | ||
101 | #define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN) | ||
102 | #define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN) | ||
103 | #define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN) | ||
104 | |||
105 | |||
73 | #ifdef CONFIG_SMP | 106 | #ifdef CONFIG_SMP |
74 | /* Need to know about CPUs going up/down? */ | 107 | /* Need to know about CPUs going up/down? */ |
75 | #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) | 108 | #if defined(CONFIG_HOTPLUG_CPU) || !defined(MODULE) |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 11be48e0d168..6216115c7789 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -324,11 +324,16 @@ static inline unsigned int cpufreq_get(unsigned int cpu) | |||
324 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ | 324 | /* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ |
325 | #ifdef CONFIG_CPU_FREQ | 325 | #ifdef CONFIG_CPU_FREQ |
326 | unsigned int cpufreq_quick_get(unsigned int cpu); | 326 | unsigned int cpufreq_quick_get(unsigned int cpu); |
327 | unsigned int cpufreq_quick_get_max(unsigned int cpu); | ||
327 | #else | 328 | #else |
328 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) | 329 | static inline unsigned int cpufreq_quick_get(unsigned int cpu) |
329 | { | 330 | { |
330 | return 0; | 331 | return 0; |
331 | } | 332 | } |
333 | static inline unsigned int cpufreq_quick_get_max(unsigned int cpu) | ||
334 | { | ||
335 | return 0; | ||
336 | } | ||
332 | #endif | 337 | #endif |
333 | 338 | ||
334 | 339 | ||
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index b24ac56477b4..4f7a63237471 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -617,6 +617,20 @@ static inline size_t cpumask_size(void) | |||
617 | * ... use 'tmpmask' like a normal struct cpumask * ... | 617 | * ... use 'tmpmask' like a normal struct cpumask * ... |
618 | * | 618 | * |
619 | * free_cpumask_var(tmpmask); | 619 | * free_cpumask_var(tmpmask); |
620 | * | ||
621 | * | ||
622 | * However, one notable exception is there. alloc_cpumask_var() allocates | ||
623 | * only nr_cpumask_bits bits (in the other hand, real cpumask_t always has | ||
624 | * NR_CPUS bits). Therefore you don't have to dereference cpumask_var_t. | ||
625 | * | ||
626 | * cpumask_var_t tmpmask; | ||
627 | * if (!alloc_cpumask_var(&tmpmask, GFP_KERNEL)) | ||
628 | * return -ENOMEM; | ||
629 | * | ||
630 | * var = *tmpmask; | ||
631 | * | ||
632 | * This code makes NR_CPUS length memcopy and brings to a memory corruption. | ||
633 | * cpumask_copy() provide safe copy functionality. | ||
620 | */ | 634 | */ |
621 | #ifdef CONFIG_CPUMASK_OFFSTACK | 635 | #ifdef CONFIG_CPUMASK_OFFSTACK |
622 | typedef struct cpumask *cpumask_var_t; | 636 | typedef struct cpumask *cpumask_var_t; |
diff --git a/include/linux/cred.h b/include/linux/cred.h index f240f2fa0197..48e82af1159b 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/key.h> | 17 | #include <linux/key.h> |
18 | #include <linux/selinux.h> | 18 | #include <linux/selinux.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | struct user_struct; | 21 | struct user_struct; |
22 | struct cred; | 22 | struct cred; |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index a6a7a1c83f54..e5e468e9133d 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #ifndef _LINUX_CRYPTO_H | 17 | #ifndef _LINUX_CRYPTO_H |
18 | #define _LINUX_CRYPTO_H | 18 | #define _LINUX_CRYPTO_H |
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
diff --git a/include/linux/cs5535.h b/include/linux/cs5535.h index 6fe2114f8ad2..c077aec3a6ff 100644 --- a/include/linux/cs5535.h +++ b/include/linux/cs5535.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef _CS5535_H | 11 | #ifndef _CS5535_H |
12 | #define _CS5535_H | 12 | #define _CS5535_H |
13 | 13 | ||
14 | #include <asm/msr.h> | ||
15 | |||
14 | /* MSRs */ | 16 | /* MSRs */ |
15 | #define MSR_GLIU_P2D_RO0 0x10000029 | 17 | #define MSR_GLIU_P2D_RO0 0x10000029 |
16 | 18 | ||
@@ -38,17 +40,75 @@ | |||
38 | #define MSR_MFGPT_NR 0x51400029 | 40 | #define MSR_MFGPT_NR 0x51400029 |
39 | #define MSR_MFGPT_SETUP 0x5140002B | 41 | #define MSR_MFGPT_SETUP 0x5140002B |
40 | 42 | ||
43 | #define MSR_RTC_DOMA_OFFSET 0x51400055 | ||
44 | #define MSR_RTC_MONA_OFFSET 0x51400056 | ||
45 | #define MSR_RTC_CEN_OFFSET 0x51400057 | ||
46 | |||
41 | #define MSR_LX_SPARE_MSR 0x80000011 /* DC-specific */ | 47 | #define MSR_LX_SPARE_MSR 0x80000011 /* DC-specific */ |
42 | 48 | ||
43 | #define MSR_GX_GLD_MSR_CONFIG 0xC0002001 | 49 | #define MSR_GX_GLD_MSR_CONFIG 0xC0002001 |
44 | #define MSR_GX_MSR_PADSEL 0xC0002011 | 50 | #define MSR_GX_MSR_PADSEL 0xC0002011 |
45 | 51 | ||
52 | static inline int cs5535_pic_unreqz_select_high(unsigned int group, | ||
53 | unsigned int irq) | ||
54 | { | ||
55 | uint32_t lo, hi; | ||
56 | |||
57 | rdmsr(MSR_PIC_ZSEL_HIGH, lo, hi); | ||
58 | lo &= ~(0xF << (group * 4)); | ||
59 | lo |= (irq & 0xF) << (group * 4); | ||
60 | wrmsr(MSR_PIC_ZSEL_HIGH, lo, hi); | ||
61 | return 0; | ||
62 | } | ||
63 | |||
64 | /* PIC registers */ | ||
65 | #define CS5536_PIC_INT_SEL1 0x4d0 | ||
66 | #define CS5536_PIC_INT_SEL2 0x4d1 | ||
67 | |||
46 | /* resource sizes */ | 68 | /* resource sizes */ |
47 | #define LBAR_GPIO_SIZE 0xFF | 69 | #define LBAR_GPIO_SIZE 0xFF |
48 | #define LBAR_MFGPT_SIZE 0x40 | 70 | #define LBAR_MFGPT_SIZE 0x40 |
49 | #define LBAR_ACPI_SIZE 0x40 | 71 | #define LBAR_ACPI_SIZE 0x40 |
50 | #define LBAR_PMS_SIZE 0x80 | 72 | #define LBAR_PMS_SIZE 0x80 |
51 | 73 | ||
74 | /* | ||
75 | * PMC registers (PMS block) | ||
76 | * It is only safe to access these registers as dword accesses. | ||
77 | * See CS5536 Specification Update erratas 17 & 18 | ||
78 | */ | ||
79 | #define CS5536_PM_SCLK 0x10 | ||
80 | #define CS5536_PM_IN_SLPCTL 0x20 | ||
81 | #define CS5536_PM_WKXD 0x34 | ||
82 | #define CS5536_PM_WKD 0x30 | ||
83 | #define CS5536_PM_SSC 0x54 | ||
84 | |||
85 | /* | ||
86 | * PM registers (ACPI block) | ||
87 | * It is only safe to access these registers as dword accesses. | ||
88 | * See CS5536 Specification Update erratas 17 & 18 | ||
89 | */ | ||
90 | #define CS5536_PM1_STS 0x00 | ||
91 | #define CS5536_PM1_EN 0x02 | ||
92 | #define CS5536_PM1_CNT 0x08 | ||
93 | #define CS5536_PM_GPE0_STS 0x18 | ||
94 | #define CS5536_PM_GPE0_EN 0x1c | ||
95 | |||
96 | /* CS5536_PM1_STS bits */ | ||
97 | #define CS5536_WAK_FLAG (1 << 15) | ||
98 | #define CS5536_PWRBTN_FLAG (1 << 8) | ||
99 | |||
100 | /* CS5536_PM1_EN bits */ | ||
101 | #define CS5536_PM_PWRBTN (1 << 8) | ||
102 | #define CS5536_PM_RTC (1 << 10) | ||
103 | |||
104 | /* CS5536_PM_GPE0_STS bits */ | ||
105 | #define CS5536_GPIOM7_PME_FLAG (1 << 31) | ||
106 | #define CS5536_GPIOM6_PME_FLAG (1 << 30) | ||
107 | |||
108 | /* CS5536_PM_GPE0_EN bits */ | ||
109 | #define CS5536_GPIOM7_PME_EN (1 << 31) | ||
110 | #define CS5536_GPIOM6_PME_EN (1 << 30) | ||
111 | |||
52 | /* VSA2 magic values */ | 112 | /* VSA2 magic values */ |
53 | #define VSA_VRC_INDEX 0xAC1C | 113 | #define VSA_VRC_INDEX 0xAC1C |
54 | #define VSA_VRC_DATA 0xAC1E | 114 | #define VSA_VRC_DATA 0xAC1E |
diff --git a/include/linux/ctype.h b/include/linux/ctype.h index a3d6ee0044f9..8acfe312f947 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h | |||
@@ -52,4 +52,13 @@ static inline unsigned char __toupper(unsigned char c) | |||
52 | #define tolower(c) __tolower(c) | 52 | #define tolower(c) __tolower(c) |
53 | #define toupper(c) __toupper(c) | 53 | #define toupper(c) __toupper(c) |
54 | 54 | ||
55 | /* | ||
56 | * Fast implementation of tolower() for internal usage. Do not use in your | ||
57 | * code. | ||
58 | */ | ||
59 | static inline char _tolower(const char c) | ||
60 | { | ||
61 | return c | 0x20; | ||
62 | } | ||
63 | |||
55 | #endif | 64 | #endif |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 3f22d8d6d8a3..d37d2a793099 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __LINUX_DCACHE_H | 1 | #ifndef __LINUX_DCACHE_H |
2 | #define __LINUX_DCACHE_H | 2 | #define __LINUX_DCACHE_H |
3 | 3 | ||
4 | #include <asm/atomic.h> | 4 | #include <linux/atomic.h> |
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/rculist.h> | 6 | #include <linux/rculist.h> |
7 | #include <linux/rculist_bl.h> | 7 | #include <linux/rculist_bl.h> |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index 2833452ea01c..5033fb88c107 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_DEBUG_LOCKING_H | 2 | #define __LINUX_DEBUG_LOCKING_H |
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <asm/atomic.h> | 5 | #include <linux/atomic.h> |
6 | #include <asm/system.h> | 6 | #include <asm/system.h> |
7 | 7 | ||
8 | struct task_struct; | 8 | struct task_struct; |
diff --git a/include/linux/device.h b/include/linux/device.h index 160d4ddb2499..c20dfbfc49b4 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/pm.h> | 24 | #include <linux/pm.h> |
25 | #include <asm/atomic.h> | 25 | #include <linux/atomic.h> |
26 | #include <asm/device.h> | 26 | #include <asm/device.h> |
27 | 27 | ||
28 | struct device; | 28 | struct device; |
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 1a167c48d84d..347fdc32177a 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -46,27 +46,6 @@ struct dma_map_ops { | |||
46 | 46 | ||
47 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) | 47 | #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) |
48 | 48 | ||
49 | typedef u64 DMA_nnBIT_MASK __deprecated; | ||
50 | |||
51 | /* | ||
52 | * NOTE: do not use the below macros in new code and do not add new definitions | ||
53 | * here. | ||
54 | * | ||
55 | * Instead, just open-code DMA_BIT_MASK(n) within your driver | ||
56 | */ | ||
57 | #define DMA_64BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(64) | ||
58 | #define DMA_48BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(48) | ||
59 | #define DMA_47BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(47) | ||
60 | #define DMA_40BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(40) | ||
61 | #define DMA_39BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(39) | ||
62 | #define DMA_35BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(35) | ||
63 | #define DMA_32BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(32) | ||
64 | #define DMA_31BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(31) | ||
65 | #define DMA_30BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(30) | ||
66 | #define DMA_29BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(29) | ||
67 | #define DMA_28BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(28) | ||
68 | #define DMA_24BIT_MASK (DMA_nnBIT_MASK)DMA_BIT_MASK(24) | ||
69 | |||
70 | #define DMA_MASK_NONE 0x0ULL | 49 | #define DMA_MASK_NONE 0x0ULL |
71 | 50 | ||
72 | static inline int valid_dma_direction(int dma_direction) | 51 | static inline int valid_dma_direction(int dma_direction) |
diff --git a/include/linux/edac.h b/include/linux/edac.h index 36c66443bdfd..4a73257b47d0 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #ifndef _LINUX_EDAC_H_ | 12 | #ifndef _LINUX_EDAC_H_ |
13 | #define _LINUX_EDAC_H_ | 13 | #define _LINUX_EDAC_H_ |
14 | 14 | ||
15 | #include <asm/atomic.h> | 15 | #include <linux/atomic.h> |
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | 17 | ||
18 | #define EDAC_OPSTATE_INVAL -1 | 18 | #define EDAC_OPSTATE_INVAL -1 |
diff --git a/include/linux/eeprom_93xx46.h b/include/linux/eeprom_93xx46.h new file mode 100644 index 000000000000..06791811e49d --- /dev/null +++ b/include/linux/eeprom_93xx46.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Module: eeprom_93xx46 | ||
3 | * platform description for 93xx46 EEPROMs. | ||
4 | */ | ||
5 | |||
6 | struct eeprom_93xx46_platform_data { | ||
7 | unsigned char flags; | ||
8 | #define EE_ADDR8 0x01 /* 8 bit addr. cfg */ | ||
9 | #define EE_ADDR16 0x02 /* 16 bit addr. cfg */ | ||
10 | #define EE_READONLY 0x08 /* forbid writing */ | ||
11 | |||
12 | /* | ||
13 | * optional hooks to control additional logic | ||
14 | * before and after spi transfer. | ||
15 | */ | ||
16 | void (*prepare)(void *); | ||
17 | void (*finish)(void *); | ||
18 | }; | ||
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 2dfa7076e8b6..53792bf36c71 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/magic.h> | 20 | #include <linux/magic.h> |
21 | #include <linux/fs.h> | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * The second extended filesystem constants/structures | 24 | * The second extended filesystem constants/structures |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 0c473fd79acb..67a803aee619 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -418,12 +418,11 @@ struct ext3_inode { | |||
418 | #define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS | 418 | #define EXT2_MOUNT_DATA_FLAGS EXT3_MOUNT_DATA_FLAGS |
419 | #endif | 419 | #endif |
420 | 420 | ||
421 | #define ext3_set_bit __test_and_set_bit_le | 421 | #define ext3_set_bit __set_bit_le |
422 | #define ext3_set_bit_atomic ext2_set_bit_atomic | 422 | #define ext3_set_bit_atomic ext2_set_bit_atomic |
423 | #define ext3_clear_bit __test_and_clear_bit_le | 423 | #define ext3_clear_bit __clear_bit_le |
424 | #define ext3_clear_bit_atomic ext2_clear_bit_atomic | 424 | #define ext3_clear_bit_atomic ext2_clear_bit_atomic |
425 | #define ext3_test_bit test_bit_le | 425 | #define ext3_test_bit test_bit_le |
426 | #define ext3_find_first_zero_bit find_first_zero_bit_le | ||
427 | #define ext3_find_next_zero_bit find_next_zero_bit_le | 426 | #define ext3_find_next_zero_bit find_next_zero_bit_le |
428 | 427 | ||
429 | /* | 428 | /* |
@@ -913,7 +912,7 @@ extern void ext3_dirty_inode(struct inode *, int); | |||
913 | extern int ext3_change_inode_journal_flag(struct inode *, int); | 912 | extern int ext3_change_inode_journal_flag(struct inode *, int); |
914 | extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); | 913 | extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); |
915 | extern int ext3_can_truncate(struct inode *inode); | 914 | extern int ext3_can_truncate(struct inode *inode); |
916 | extern void ext3_truncate (struct inode *); | 915 | extern void ext3_truncate(struct inode *inode); |
917 | extern void ext3_set_inode_flags(struct inode *); | 916 | extern void ext3_set_inode_flags(struct inode *); |
918 | extern void ext3_get_inode_flags(struct ext3_inode_info *); | 917 | extern void ext3_get_inode_flags(struct ext3_inode_info *); |
919 | extern void ext3_set_aops(struct inode *inode); | 918 | extern void ext3_set_aops(struct inode *inode); |
diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h index 7b64ad40e4ce..3ff060ac7810 100644 --- a/include/linux/fault-inject.h +++ b/include/linux/fault-inject.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/debugfs.h> | 7 | #include <linux/debugfs.h> |
8 | #include <asm/atomic.h> | 8 | #include <linux/atomic.h> |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * For explanation of the elements of this struct, see | 11 | * For explanation of the elements of this struct, see |
@@ -27,23 +27,7 @@ struct fault_attr { | |||
27 | unsigned long count; | 27 | unsigned long count; |
28 | 28 | ||
29 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | 29 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS |
30 | 30 | struct dentry *dir; | |
31 | struct { | ||
32 | struct dentry *dir; | ||
33 | |||
34 | struct dentry *probability_file; | ||
35 | struct dentry *interval_file; | ||
36 | struct dentry *times_file; | ||
37 | struct dentry *space_file; | ||
38 | struct dentry *verbose_file; | ||
39 | struct dentry *task_filter_file; | ||
40 | struct dentry *stacktrace_depth_file; | ||
41 | struct dentry *require_start_file; | ||
42 | struct dentry *require_end_file; | ||
43 | struct dentry *reject_start_file; | ||
44 | struct dentry *reject_end_file; | ||
45 | } dentries; | ||
46 | |||
47 | #endif | 31 | #endif |
48 | }; | 32 | }; |
49 | 33 | ||
@@ -57,7 +41,6 @@ struct fault_attr { | |||
57 | 41 | ||
58 | #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER | 42 | #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER |
59 | int setup_fault_attr(struct fault_attr *attr, char *str); | 43 | int setup_fault_attr(struct fault_attr *attr, char *str); |
60 | void should_fail_srandom(unsigned long entropy); | ||
61 | bool should_fail(struct fault_attr *attr, ssize_t size); | 44 | bool should_fail(struct fault_attr *attr, ssize_t size); |
62 | 45 | ||
63 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS | 46 | #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS |
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index df7e3cf82e97..82163c4b32c9 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
15 | 15 | ||
16 | #include <asm/atomic.h> | 16 | #include <linux/atomic.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * The default fd array needs to be at least BITS_PER_LONG, | 19 | * The default fd array needs to be at least BITS_PER_LONG, |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 9ee3f9fb0b4a..741956fa5bfd 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | /* | 15 | /* |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 5e6f42789afe..84ccf8e04fa6 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/workqueue.h> | 15 | #include <linux/workqueue.h> |
16 | 16 | ||
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | #include <asm/byteorder.h> | 18 | #include <asm/byteorder.h> |
19 | 19 | ||
20 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) | 20 | #define fw_notify(s, args...) printk(KERN_NOTICE KBUILD_MODNAME ": " s, ## args) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index cc363fa7bb82..f23bcb77260c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1072,12 +1072,12 @@ struct file_lock_operations { | |||
1072 | }; | 1072 | }; |
1073 | 1073 | ||
1074 | struct lock_manager_operations { | 1074 | struct lock_manager_operations { |
1075 | int (*fl_compare_owner)(struct file_lock *, struct file_lock *); | 1075 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
1076 | void (*fl_notify)(struct file_lock *); /* unblock callback */ | 1076 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
1077 | int (*fl_grant)(struct file_lock *, struct file_lock *, int); | 1077 | int (*lm_grant)(struct file_lock *, struct file_lock *, int); |
1078 | void (*fl_release_private)(struct file_lock *); | 1078 | void (*lm_release_private)(struct file_lock *); |
1079 | void (*fl_break)(struct file_lock *); | 1079 | void (*lm_break)(struct file_lock *); |
1080 | int (*fl_change)(struct file_lock **, int); | 1080 | int (*lm_change)(struct file_lock **, int); |
1081 | }; | 1081 | }; |
1082 | 1082 | ||
1083 | struct lock_manager { | 1083 | struct lock_manager { |
diff --git a/include/linux/fsl_hypervisor.h b/include/linux/fsl_hypervisor.h new file mode 100644 index 000000000000..1cebaeeeef57 --- /dev/null +++ b/include/linux/fsl_hypervisor.h | |||
@@ -0,0 +1,241 @@ | |||
1 | /* | ||
2 | * Freescale hypervisor ioctl and kernel interface | ||
3 | * | ||
4 | * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. | ||
5 | * Author: Timur Tabi <timur@freescale.com> | ||
6 | * | ||
7 | * Redistribution and use in source and binary forms, with or without | ||
8 | * modification, are permitted provided that the following conditions are met: | ||
9 | * * Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * * Redistributions in binary form must reproduce the above copyright | ||
12 | * notice, this list of conditions and the following disclaimer in the | ||
13 | * documentation and/or other materials provided with the distribution. | ||
14 | * * Neither the name of Freescale Semiconductor nor the | ||
15 | * names of its contributors may be used to endorse or promote products | ||
16 | * derived from this software without specific prior written permission. | ||
17 | * | ||
18 | * | ||
19 | * ALTERNATIVELY, this software may be distributed under the terms of the | ||
20 | * GNU General Public License ("GPL") as published by the Free Software | ||
21 | * Foundation, either version 2 of that License or (at your option) any | ||
22 | * later version. | ||
23 | * | ||
24 | * This software is provided by Freescale Semiconductor "as is" and any | ||
25 | * express or implied warranties, including, but not limited to, the implied | ||
26 | * warranties of merchantability and fitness for a particular purpose are | ||
27 | * disclaimed. In no event shall Freescale Semiconductor be liable for any | ||
28 | * direct, indirect, incidental, special, exemplary, or consequential damages | ||
29 | * (including, but not limited to, procurement of substitute goods or services; | ||
30 | * loss of use, data, or profits; or business interruption) however caused and | ||
31 | * on any theory of liability, whether in contract, strict liability, or tort | ||
32 | * (including negligence or otherwise) arising in any way out of the use of this | ||
33 | * software, even if advised of the possibility of such damage. | ||
34 | * | ||
35 | * This file is used by the Freescale hypervisor management driver. It can | ||
36 | * also be included by applications that need to communicate with the driver | ||
37 | * via the ioctl interface. | ||
38 | */ | ||
39 | |||
40 | #ifndef FSL_HYPERVISOR_H | ||
41 | #define FSL_HYPERVISOR_H | ||
42 | |||
43 | #include <linux/types.h> | ||
44 | |||
45 | /** | ||
46 | * struct fsl_hv_ioctl_restart - restart a partition | ||
47 | * @ret: return error code from the hypervisor | ||
48 | * @partition: the ID of the partition to restart, or -1 for the | ||
49 | * calling partition | ||
50 | * | ||
51 | * Used by FSL_HV_IOCTL_PARTITION_RESTART | ||
52 | */ | ||
53 | struct fsl_hv_ioctl_restart { | ||
54 | __u32 ret; | ||
55 | __u32 partition; | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * struct fsl_hv_ioctl_status - get a partition's status | ||
60 | * @ret: return error code from the hypervisor | ||
61 | * @partition: the ID of the partition to query, or -1 for the | ||
62 | * calling partition | ||
63 | * @status: The returned status of the partition | ||
64 | * | ||
65 | * Used by FSL_HV_IOCTL_PARTITION_GET_STATUS | ||
66 | * | ||
67 | * Values of 'status': | ||
68 | * 0 = Stopped | ||
69 | * 1 = Running | ||
70 | * 2 = Starting | ||
71 | * 3 = Stopping | ||
72 | */ | ||
73 | struct fsl_hv_ioctl_status { | ||
74 | __u32 ret; | ||
75 | __u32 partition; | ||
76 | __u32 status; | ||
77 | }; | ||
78 | |||
79 | /** | ||
80 | * struct fsl_hv_ioctl_start - start a partition | ||
81 | * @ret: return error code from the hypervisor | ||
82 | * @partition: the ID of the partition to control | ||
83 | * @entry_point: The offset within the guest IMA to start execution | ||
84 | * @load: If non-zero, reload the partition's images before starting | ||
85 | * | ||
86 | * Used by FSL_HV_IOCTL_PARTITION_START | ||
87 | */ | ||
88 | struct fsl_hv_ioctl_start { | ||
89 | __u32 ret; | ||
90 | __u32 partition; | ||
91 | __u32 entry_point; | ||
92 | __u32 load; | ||
93 | }; | ||
94 | |||
95 | /** | ||
96 | * struct fsl_hv_ioctl_stop - stop a partition | ||
97 | * @ret: return error code from the hypervisor | ||
98 | * @partition: the ID of the partition to stop, or -1 for the calling | ||
99 | * partition | ||
100 | * | ||
101 | * Used by FSL_HV_IOCTL_PARTITION_STOP | ||
102 | */ | ||
103 | struct fsl_hv_ioctl_stop { | ||
104 | __u32 ret; | ||
105 | __u32 partition; | ||
106 | }; | ||
107 | |||
108 | /** | ||
109 | * struct fsl_hv_ioctl_memcpy - copy memory between partitions | ||
110 | * @ret: return error code from the hypervisor | ||
111 | * @source: the partition ID of the source partition, or -1 for this | ||
112 | * partition | ||
113 | * @target: the partition ID of the target partition, or -1 for this | ||
114 | * partition | ||
115 | * @reserved: reserved, must be set to 0 | ||
116 | * @local_addr: user-space virtual address of a buffer in the local | ||
117 | * partition | ||
118 | * @remote_addr: guest physical address of a buffer in the | ||
119 | * remote partition | ||
120 | * @count: the number of bytes to copy. Both the local and remote | ||
121 | * buffers must be at least 'count' bytes long | ||
122 | * | ||
123 | * Used by FSL_HV_IOCTL_MEMCPY | ||
124 | * | ||
125 | * The 'local' partition is the partition that calls this ioctl. The | ||
126 | * 'remote' partition is a different partition. The data is copied from | ||
127 | * the 'source' paritition' to the 'target' partition. | ||
128 | * | ||
129 | * The buffer in the remote partition must be guest physically | ||
130 | * contiguous. | ||
131 | * | ||
132 | * This ioctl does not support copying memory between two remote | ||
133 | * partitions or within the same partition, so either 'source' or | ||
134 | * 'target' (but not both) must be -1. In other words, either | ||
135 | * | ||
136 | * source == local and target == remote | ||
137 | * or | ||
138 | * source == remote and target == local | ||
139 | */ | ||
140 | struct fsl_hv_ioctl_memcpy { | ||
141 | __u32 ret; | ||
142 | __u32 source; | ||
143 | __u32 target; | ||
144 | __u32 reserved; /* padding to ensure local_vaddr is aligned */ | ||
145 | __u64 local_vaddr; | ||
146 | __u64 remote_paddr; | ||
147 | __u64 count; | ||
148 | }; | ||
149 | |||
150 | /** | ||
151 | * struct fsl_hv_ioctl_doorbell - ring a doorbell | ||
152 | * @ret: return error code from the hypervisor | ||
153 | * @doorbell: the handle of the doorbell to ring doorbell | ||
154 | * | ||
155 | * Used by FSL_HV_IOCTL_DOORBELL | ||
156 | */ | ||
157 | struct fsl_hv_ioctl_doorbell { | ||
158 | __u32 ret; | ||
159 | __u32 doorbell; | ||
160 | }; | ||
161 | |||
162 | /** | ||
163 | * struct fsl_hv_ioctl_prop - get/set a device tree property | ||
164 | * @ret: return error code from the hypervisor | ||
165 | * @handle: handle of partition whose tree to access | ||
166 | * @path: virtual address of path name of node to access | ||
167 | * @propname: virtual address of name of property to access | ||
168 | * @propval: virtual address of property data buffer | ||
169 | * @proplen: Size of property data buffer | ||
170 | * @reserved: reserved, must be set to 0 | ||
171 | * | ||
172 | * Used by FSL_HV_IOCTL_DOORBELL | ||
173 | */ | ||
174 | struct fsl_hv_ioctl_prop { | ||
175 | __u32 ret; | ||
176 | __u32 handle; | ||
177 | __u64 path; | ||
178 | __u64 propname; | ||
179 | __u64 propval; | ||
180 | __u32 proplen; | ||
181 | __u32 reserved; /* padding to ensure structure is aligned */ | ||
182 | }; | ||
183 | |||
184 | /* The ioctl type, documented in ioctl-number.txt */ | ||
185 | #define FSL_HV_IOCTL_TYPE 0xAF | ||
186 | |||
187 | /* Restart another partition */ | ||
188 | #define FSL_HV_IOCTL_PARTITION_RESTART \ | ||
189 | _IOWR(FSL_HV_IOCTL_TYPE, 1, struct fsl_hv_ioctl_restart) | ||
190 | |||
191 | /* Get a partition's status */ | ||
192 | #define FSL_HV_IOCTL_PARTITION_GET_STATUS \ | ||
193 | _IOWR(FSL_HV_IOCTL_TYPE, 2, struct fsl_hv_ioctl_status) | ||
194 | |||
195 | /* Boot another partition */ | ||
196 | #define FSL_HV_IOCTL_PARTITION_START \ | ||
197 | _IOWR(FSL_HV_IOCTL_TYPE, 3, struct fsl_hv_ioctl_start) | ||
198 | |||
199 | /* Stop this or another partition */ | ||
200 | #define FSL_HV_IOCTL_PARTITION_STOP \ | ||
201 | _IOWR(FSL_HV_IOCTL_TYPE, 4, struct fsl_hv_ioctl_stop) | ||
202 | |||
203 | /* Copy data from one partition to another */ | ||
204 | #define FSL_HV_IOCTL_MEMCPY \ | ||
205 | _IOWR(FSL_HV_IOCTL_TYPE, 5, struct fsl_hv_ioctl_memcpy) | ||
206 | |||
207 | /* Ring a doorbell */ | ||
208 | #define FSL_HV_IOCTL_DOORBELL \ | ||
209 | _IOWR(FSL_HV_IOCTL_TYPE, 6, struct fsl_hv_ioctl_doorbell) | ||
210 | |||
211 | /* Get a property from another guest's device tree */ | ||
212 | #define FSL_HV_IOCTL_GETPROP \ | ||
213 | _IOWR(FSL_HV_IOCTL_TYPE, 7, struct fsl_hv_ioctl_prop) | ||
214 | |||
215 | /* Set a property in another guest's device tree */ | ||
216 | #define FSL_HV_IOCTL_SETPROP \ | ||
217 | _IOWR(FSL_HV_IOCTL_TYPE, 8, struct fsl_hv_ioctl_prop) | ||
218 | |||
219 | #ifdef __KERNEL__ | ||
220 | |||
221 | /** | ||
222 | * fsl_hv_event_register() - register a callback for failover events | ||
223 | * @nb: pointer to caller-supplied notifier_block structure | ||
224 | * | ||
225 | * This function is called by device drivers to register their callback | ||
226 | * functions for fail-over events. | ||
227 | * | ||
228 | * The caller should allocate a notifier_block object and initialize the | ||
229 | * 'priority' and 'notifier_call' fields. | ||
230 | */ | ||
231 | int fsl_hv_failover_register(struct notifier_block *nb); | ||
232 | |||
233 | /** | ||
234 | * fsl_hv_event_unregister() - unregister a callback for failover events | ||
235 | * @nb: the same 'nb' used in previous fsl_hv_failover_register call | ||
236 | */ | ||
237 | int fsl_hv_failover_unregister(struct notifier_block *nb); | ||
238 | |||
239 | #endif | ||
240 | |||
241 | #endif | ||
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 69ad89b50489..91d0e0a34ef3 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | 18 | ||
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | /* | 21 | /* |
22 | * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily | 22 | * IN_* from inotfy.h lines up EXACTLY with FS_*, this is so we can easily |
diff --git a/include/linux/gsmmux.h b/include/linux/gsmmux.h index 378de4195caf..c25e9477f7c3 100644 --- a/include/linux/gsmmux.h +++ b/include/linux/gsmmux.h | |||
@@ -21,5 +21,16 @@ struct gsm_config | |||
21 | #define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config) | 21 | #define GSMIOC_GETCONF _IOR('G', 0, struct gsm_config) |
22 | #define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config) | 22 | #define GSMIOC_SETCONF _IOW('G', 1, struct gsm_config) |
23 | 23 | ||
24 | struct gsm_netconfig { | ||
25 | unsigned int adaption; /* Adaption to use in network mode */ | ||
26 | unsigned short protocol;/* Protocol to use - only ETH_P_IP supported */ | ||
27 | unsigned short unused2; | ||
28 | char if_name[IFNAMSIZ]; /* interface name format string */ | ||
29 | __u8 unused[28]; /* For future use */ | ||
30 | }; | ||
31 | |||
32 | #define GSMIOC_ENABLE_NET _IOW('G', 2, struct gsm_netconfig) | ||
33 | #define GSMIOC_DISABLE_NET _IO('G', 3) | ||
34 | |||
24 | 35 | ||
25 | #endif | 36 | #endif |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 59225ef27d15..19644e0016bd 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -231,6 +231,9 @@ struct hstate { | |||
231 | struct huge_bootmem_page { | 231 | struct huge_bootmem_page { |
232 | struct list_head list; | 232 | struct list_head list; |
233 | struct hstate *hstate; | 233 | struct hstate *hstate; |
234 | #ifdef CONFIG_HIGHMEM | ||
235 | phys_addr_t phys; | ||
236 | #endif | ||
234 | }; | 237 | }; |
235 | 238 | ||
236 | struct page *alloc_huge_page_node(struct hstate *h, int nid); | 239 | struct page *alloc_huge_page_node(struct hstate *h, int nid); |
diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 7472449cbb74..0aa0cbd676f7 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h | |||
@@ -3,6 +3,33 @@ | |||
3 | 3 | ||
4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
5 | 5 | ||
6 | /* | ||
7 | * Version 2 of the I2C peripheral unit has a different register | ||
8 | * layout and extra registers. The ID register in the V2 peripheral | ||
9 | * unit on the OMAP4430 reports the same ID as the V1 peripheral | ||
10 | * unit on the OMAP3530, so we must inform the driver which IP | ||
11 | * version we know it is running on from platform / cpu-specific | ||
12 | * code using these constants in the hwmod class definition. | ||
13 | */ | ||
14 | |||
15 | #define OMAP_I2C_IP_VERSION_1 1 | ||
16 | #define OMAP_I2C_IP_VERSION_2 2 | ||
17 | |||
18 | /* struct omap_i2c_bus_platform_data .flags meanings */ | ||
19 | |||
20 | #define OMAP_I2C_FLAG_NO_FIFO BIT(0) | ||
21 | #define OMAP_I2C_FLAG_SIMPLE_CLOCK BIT(1) | ||
22 | #define OMAP_I2C_FLAG_16BIT_DATA_REG BIT(2) | ||
23 | #define OMAP_I2C_FLAG_RESET_REGS_POSTIDLE BIT(3) | ||
24 | #define OMAP_I2C_FLAG_APPLY_ERRATA_I207 BIT(4) | ||
25 | #define OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK BIT(5) | ||
26 | #define OMAP_I2C_FLAG_FORCE_19200_INT_CLK BIT(6) | ||
27 | /* how the CPU address bus must be translated for I2C unit access */ | ||
28 | #define OMAP_I2C_FLAG_BUS_SHIFT_NONE 0 | ||
29 | #define OMAP_I2C_FLAG_BUS_SHIFT_1 BIT(7) | ||
30 | #define OMAP_I2C_FLAG_BUS_SHIFT_2 BIT(8) | ||
31 | #define OMAP_I2C_FLAG_BUS_SHIFT__SHIFT 7 | ||
32 | |||
6 | struct omap_i2c_bus_platform_data { | 33 | struct omap_i2c_bus_platform_data { |
7 | u32 clkrate; | 34 | u32 clkrate; |
8 | void (*set_mpu_wkup_lat)(struct device *dev, long set); | 35 | void (*set_mpu_wkup_lat)(struct device *dev, long set); |
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h index ba4f88624fcd..114c0f6fc63d 100644 --- a/include/linux/i2c/twl.h +++ b/include/linux/i2c/twl.h | |||
@@ -657,28 +657,41 @@ struct twl4030_power_data { | |||
657 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); | 657 | extern void twl4030_power_init(struct twl4030_power_data *triton2_scripts); |
658 | extern int twl4030_remove_script(u8 flags); | 658 | extern int twl4030_remove_script(u8 flags); |
659 | 659 | ||
660 | struct twl4030_codec_audio_data { | 660 | struct twl4030_codec_data { |
661 | unsigned int digimic_delay; /* in ms */ | 661 | unsigned int digimic_delay; /* in ms */ |
662 | unsigned int ramp_delay_value; | 662 | unsigned int ramp_delay_value; |
663 | unsigned int offset_cncl_path; | 663 | unsigned int offset_cncl_path; |
664 | unsigned int check_defaults:1; | 664 | unsigned int check_defaults:1; |
665 | unsigned int reset_registers:1; | 665 | unsigned int reset_registers:1; |
666 | unsigned int hs_extmute:1; | 666 | unsigned int hs_extmute:1; |
667 | u16 hs_left_step; | ||
668 | u16 hs_right_step; | ||
669 | u16 hf_left_step; | ||
670 | u16 hf_right_step; | ||
667 | void (*set_hs_extmute)(int mute); | 671 | void (*set_hs_extmute)(int mute); |
668 | }; | 672 | }; |
669 | 673 | ||
670 | struct twl4030_codec_vibra_data { | 674 | struct twl4030_vibra_data { |
671 | unsigned int coexist; | 675 | unsigned int coexist; |
676 | |||
677 | /* twl6040 */ | ||
678 | unsigned int vibldrv_res; /* left driver resistance */ | ||
679 | unsigned int vibrdrv_res; /* right driver resistance */ | ||
680 | unsigned int viblmotor_res; /* left motor resistance */ | ||
681 | unsigned int vibrmotor_res; /* right motor resistance */ | ||
682 | int vddvibl_uV; /* VDDVIBL volt, set 0 for fixed reg */ | ||
683 | int vddvibr_uV; /* VDDVIBR volt, set 0 for fixed reg */ | ||
672 | }; | 684 | }; |
673 | 685 | ||
674 | struct twl4030_codec_data { | 686 | struct twl4030_audio_data { |
675 | unsigned int audio_mclk; | 687 | unsigned int audio_mclk; |
676 | struct twl4030_codec_audio_data *audio; | 688 | struct twl4030_codec_data *codec; |
677 | struct twl4030_codec_vibra_data *vibra; | 689 | struct twl4030_vibra_data *vibra; |
678 | 690 | ||
679 | /* twl6040 */ | 691 | /* twl6040 */ |
680 | int audpwron_gpio; /* audio power-on gpio */ | 692 | int audpwron_gpio; /* audio power-on gpio */ |
681 | int naudint_irq; /* audio interrupt */ | 693 | int naudint_irq; /* audio interrupt */ |
694 | unsigned int irq_base; | ||
682 | }; | 695 | }; |
683 | 696 | ||
684 | struct twl4030_platform_data { | 697 | struct twl4030_platform_data { |
@@ -690,7 +703,7 @@ struct twl4030_platform_data { | |||
690 | struct twl4030_keypad_data *keypad; | 703 | struct twl4030_keypad_data *keypad; |
691 | struct twl4030_usb_data *usb; | 704 | struct twl4030_usb_data *usb; |
692 | struct twl4030_power_data *power; | 705 | struct twl4030_power_data *power; |
693 | struct twl4030_codec_data *codec; | 706 | struct twl4030_audio_data *audio; |
694 | 707 | ||
695 | /* Common LDO regulators for TWL4030/TWL6030 */ | 708 | /* Common LDO regulators for TWL4030/TWL6030 */ |
696 | struct regulator_init_data *vdac; | 709 | struct regulator_init_data *vdac; |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index f6efed0039ed..a103732b7588 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/kref.h> | 17 | #include <linux/kref.h> |
18 | #include <linux/workqueue.h> | 18 | #include <linux/workqueue.h> |
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | #include <asm/ptrace.h> | 21 | #include <asm/ptrace.h> |
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | #include <trace/events/irq.h> | 23 | #include <trace/events/irq.h> |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index e9bb22cba764..c2ebfe66177c 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -109,6 +109,36 @@ struct resource_list { | |||
109 | /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ | 109 | /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ |
110 | #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ | 110 | #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ |
111 | 111 | ||
112 | |||
113 | /* helpers to define resources */ | ||
114 | #define DEFINE_RES_NAMED(_start, _size, _name, _flags) \ | ||
115 | { \ | ||
116 | .start = (_start), \ | ||
117 | .end = (_start) + (_size) - 1, \ | ||
118 | .name = (_name), \ | ||
119 | .flags = (_flags), \ | ||
120 | } | ||
121 | |||
122 | #define DEFINE_RES_IO_NAMED(_start, _size, _name) \ | ||
123 | DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_IO) | ||
124 | #define DEFINE_RES_IO(_start, _size) \ | ||
125 | DEFINE_RES_IO_NAMED((_start), (_size), NULL) | ||
126 | |||
127 | #define DEFINE_RES_MEM_NAMED(_start, _size, _name) \ | ||
128 | DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_MEM) | ||
129 | #define DEFINE_RES_MEM(_start, _size) \ | ||
130 | DEFINE_RES_MEM_NAMED((_start), (_size), NULL) | ||
131 | |||
132 | #define DEFINE_RES_IRQ_NAMED(_irq, _name) \ | ||
133 | DEFINE_RES_NAMED((_irq), 1, (_name), IORESOURCE_IRQ) | ||
134 | #define DEFINE_RES_IRQ(_irq) \ | ||
135 | DEFINE_RES_IRQ_NAMED((_irq), NULL) | ||
136 | |||
137 | #define DEFINE_RES_DMA_NAMED(_dma, _name) \ | ||
138 | DEFINE_RES_NAMED((_dma), 1, (_name), IORESOURCE_DMA) | ||
139 | #define DEFINE_RES_DMA(_dma) \ | ||
140 | DEFINE_RES_DMA_NAMED((_dma), NULL) | ||
141 | |||
112 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 142 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
113 | extern struct resource ioport_resource; | 143 | extern struct resource ioport_resource; |
114 | extern struct resource iomem_resource; | 144 | extern struct resource iomem_resource; |
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index a6d1655f9607..8a297a5e794c 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -44,6 +44,11 @@ struct ipc_namespace { | |||
44 | size_t shm_ctlall; | 44 | size_t shm_ctlall; |
45 | int shm_ctlmni; | 45 | int shm_ctlmni; |
46 | int shm_tot; | 46 | int shm_tot; |
47 | /* | ||
48 | * Defines whether IPC_RMID is forced for _all_ shm segments regardless | ||
49 | * of shmctl() | ||
50 | */ | ||
51 | int shm_rmid_forced; | ||
47 | 52 | ||
48 | struct notifier_block ipcns_nb; | 53 | struct notifier_block ipcns_nb; |
49 | 54 | ||
@@ -72,6 +77,7 @@ extern int register_ipcns_notifier(struct ipc_namespace *); | |||
72 | extern int cond_register_ipcns_notifier(struct ipc_namespace *); | 77 | extern int cond_register_ipcns_notifier(struct ipc_namespace *); |
73 | extern void unregister_ipcns_notifier(struct ipc_namespace *); | 78 | extern void unregister_ipcns_notifier(struct ipc_namespace *); |
74 | extern int ipcns_notify(unsigned long); | 79 | extern int ipcns_notify(unsigned long); |
80 | extern void shm_destroy_orphaned(struct ipc_namespace *ns); | ||
75 | #else /* CONFIG_SYSVIPC */ | 81 | #else /* CONFIG_SYSVIPC */ |
76 | static inline int register_ipcns_notifier(struct ipc_namespace *ns) | 82 | static inline int register_ipcns_notifier(struct ipc_namespace *ns) |
77 | { return 0; } | 83 | { return 0; } |
@@ -79,6 +85,7 @@ static inline int cond_register_ipcns_notifier(struct ipc_namespace *ns) | |||
79 | { return 0; } | 85 | { return 0; } |
80 | static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { } | 86 | static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { } |
81 | static inline int ipcns_notify(unsigned long l) { return 0; } | 87 | static inline int ipcns_notify(unsigned long l) { return 0; } |
88 | static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {} | ||
82 | #endif /* CONFIG_SYSVIPC */ | 89 | #endif /* CONFIG_SYSVIPC */ |
83 | 90 | ||
84 | #ifdef CONFIG_POSIX_MQUEUE | 91 | #ifdef CONFIG_POSIX_MQUEUE |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index e06965081ba5..e6a5e34bed4f 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -940,7 +940,6 @@ extern int journal_force_commit(journal_t *); | |||
940 | */ | 940 | */ |
941 | struct journal_head *journal_add_journal_head(struct buffer_head *bh); | 941 | struct journal_head *journal_add_journal_head(struct buffer_head *bh); |
942 | struct journal_head *journal_grab_journal_head(struct buffer_head *bh); | 942 | struct journal_head *journal_grab_journal_head(struct buffer_head *bh); |
943 | void journal_remove_journal_head(struct buffer_head *bh); | ||
944 | void journal_put_journal_head(struct journal_head *jh); | 943 | void journal_put_journal_head(struct journal_head *jh); |
945 | 944 | ||
946 | /* | 945 | /* |
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 44e95d0a721f..423cb6d78ee0 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h | |||
@@ -45,7 +45,7 @@ struct journal_head { | |||
45 | * has been cowed | 45 | * has been cowed |
46 | * [jbd_lock_bh_state()] | 46 | * [jbd_lock_bh_state()] |
47 | */ | 47 | */ |
48 | unsigned b_cow_tid; | 48 | tid_t b_cow_tid; |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Copy of the buffer data frozen for writing to the log. | 51 | * Copy of the buffer data frozen for writing to the log. |
diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h index 83e745f3ead7..66f23dc5e76a 100644 --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h | |||
@@ -54,7 +54,7 @@ extern void jump_label_apply_nops(struct module *mod); | |||
54 | 54 | ||
55 | #else | 55 | #else |
56 | 56 | ||
57 | #include <asm/atomic.h> | 57 | #include <linux/atomic.h> |
58 | 58 | ||
59 | #define JUMP_LABEL_INIT {ATOMIC_INIT(0)} | 59 | #define JUMP_LABEL_INIT {ATOMIC_INIT(0)} |
60 | 60 | ||
diff --git a/include/linux/kdb.h b/include/linux/kdb.h index aadff7cc2b84..529d9a0c75a5 100644 --- a/include/linux/kdb.h +++ b/include/linux/kdb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifdef CONFIG_KGDB_KDB | 16 | #ifdef CONFIG_KGDB_KDB |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | #define KDB_POLL_FUNC_MAX 5 | 21 | #define KDB_POLL_FUNC_MAX 5 |
22 | extern int kdb_poll_idx; | 22 | extern int kdb_poll_idx; |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 567a6f7bbeed..9a43ad792cfc 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -646,29 +646,6 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
646 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ | 646 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ |
647 | (type *)( (char *)__mptr - offsetof(type,member) );}) | 647 | (type *)( (char *)__mptr - offsetof(type,member) );}) |
648 | 648 | ||
649 | struct sysinfo; | ||
650 | extern int do_sysinfo(struct sysinfo *info); | ||
651 | |||
652 | #endif /* __KERNEL__ */ | ||
653 | |||
654 | #define SI_LOAD_SHIFT 16 | ||
655 | struct sysinfo { | ||
656 | long uptime; /* Seconds since boot */ | ||
657 | unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ | ||
658 | unsigned long totalram; /* Total usable main memory size */ | ||
659 | unsigned long freeram; /* Available memory size */ | ||
660 | unsigned long sharedram; /* Amount of shared memory */ | ||
661 | unsigned long bufferram; /* Memory used by buffers */ | ||
662 | unsigned long totalswap; /* Total swap space size */ | ||
663 | unsigned long freeswap; /* swap space still available */ | ||
664 | unsigned short procs; /* Number of current processes */ | ||
665 | unsigned short pad; /* explicit padding for m68k */ | ||
666 | unsigned long totalhigh; /* Total high memory size */ | ||
667 | unsigned long freehigh; /* Available high memory size */ | ||
668 | unsigned int mem_unit; /* Memory unit size in bytes */ | ||
669 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | ||
670 | }; | ||
671 | |||
672 | #ifdef __CHECKER__ | 649 | #ifdef __CHECKER__ |
673 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) | 650 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) |
674 | #define BUILD_BUG_ON_ZERO(e) (0) | 651 | #define BUILD_BUG_ON_ZERO(e) (0) |
@@ -736,4 +713,27 @@ extern int __build_bug_on_failed; | |||
736 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD | 713 | # define REBUILD_DUE_TO_FTRACE_MCOUNT_RECORD |
737 | #endif | 714 | #endif |
738 | 715 | ||
716 | struct sysinfo; | ||
717 | extern int do_sysinfo(struct sysinfo *info); | ||
718 | |||
719 | #endif /* __KERNEL__ */ | ||
720 | |||
721 | #define SI_LOAD_SHIFT 16 | ||
722 | struct sysinfo { | ||
723 | long uptime; /* Seconds since boot */ | ||
724 | unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ | ||
725 | unsigned long totalram; /* Total usable main memory size */ | ||
726 | unsigned long freeram; /* Available memory size */ | ||
727 | unsigned long sharedram; /* Amount of shared memory */ | ||
728 | unsigned long bufferram; /* Memory used by buffers */ | ||
729 | unsigned long totalswap; /* Total swap space size */ | ||
730 | unsigned long freeswap; /* swap space still available */ | ||
731 | unsigned short procs; /* Number of current processes */ | ||
732 | unsigned short pad; /* explicit padding for m68k */ | ||
733 | unsigned long totalhigh; /* Total high memory size */ | ||
734 | unsigned long freehigh; /* Available high memory size */ | ||
735 | unsigned int mem_unit; /* Memory unit size in bytes */ | ||
736 | char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ | ||
737 | }; | ||
738 | |||
739 | #endif | 739 | #endif |
diff --git a/include/linux/key.h b/include/linux/key.h index 6ea4eebd3467..183a6af7715d 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
22 | #include <linux/sysctl.h> | 22 | #include <linux/sysctl.h> |
23 | #include <linux/rwsem.h> | 23 | #include <linux/rwsem.h> |
24 | #include <asm/atomic.h> | 24 | #include <linux/atomic.h> |
25 | 25 | ||
26 | #ifdef __KERNEL__ | 26 | #ifdef __KERNEL__ |
27 | 27 | ||
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 10ca03d0a250..fa391835508d 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/serial_8250.h> | 16 | #include <linux/serial_8250.h> |
17 | #include <linux/linkage.h> | 17 | #include <linux/linkage.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #ifdef CONFIG_HAVE_ARCH_KGDB | 20 | #ifdef CONFIG_HAVE_ARCH_KGDB |
21 | #include <asm/kgdb.h> | 21 | #include <asm/kgdb.h> |
22 | #endif | 22 | #endif |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 9229b64ee3aa..668729cc0fe9 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/kobject_ns.h> | 25 | #include <linux/kobject_ns.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/wait.h> | 27 | #include <linux/wait.h> |
28 | #include <asm/atomic.h> | 28 | #include <linux/atomic.h> |
29 | 29 | ||
30 | #define UEVENT_HELPER_PATH_LEN 256 | 30 | #define UEVENT_HELPER_PATH_LEN 256 |
31 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ | 31 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ |
diff --git a/include/linux/led-lm3530.h b/include/linux/led-lm3530.h index 58592fa67d24..8eb12357a110 100644 --- a/include/linux/led-lm3530.h +++ b/include/linux/led-lm3530.h | |||
@@ -84,6 +84,8 @@ enum lm3530_als_mode { | |||
84 | * @brt_ramp_rise: rate of rise of led current | 84 | * @brt_ramp_rise: rate of rise of led current |
85 | * @als1_resistor_sel: internal resistance from ALS1 input to ground | 85 | * @als1_resistor_sel: internal resistance from ALS1 input to ground |
86 | * @als2_resistor_sel: internal resistance from ALS2 input to ground | 86 | * @als2_resistor_sel: internal resistance from ALS2 input to ground |
87 | * @als_vmin: als input voltage calibrated for max brightness in mV | ||
88 | * @als_vmax: als input voltage calibrated for min brightness in mV | ||
87 | * @brt_val: brightness value (0-255) | 89 | * @brt_val: brightness value (0-255) |
88 | */ | 90 | */ |
89 | struct lm3530_platform_data { | 91 | struct lm3530_platform_data { |
@@ -101,6 +103,9 @@ struct lm3530_platform_data { | |||
101 | u8 als1_resistor_sel; | 103 | u8 als1_resistor_sel; |
102 | u8 als2_resistor_sel; | 104 | u8 als2_resistor_sel; |
103 | 105 | ||
106 | u32 als_vmin; | ||
107 | u32 als_vmax; | ||
108 | |||
104 | u8 brt_val; | 109 | u8 brt_val; |
105 | }; | 110 | }; |
106 | 111 | ||
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 50940da6adf3..b96600786913 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -39,6 +39,16 @@ extern unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan, | |||
39 | struct mem_cgroup *mem_cont, | 39 | struct mem_cgroup *mem_cont, |
40 | int active, int file); | 40 | int active, int file); |
41 | 41 | ||
42 | struct memcg_scanrecord { | ||
43 | struct mem_cgroup *mem; /* scanend memory cgroup */ | ||
44 | struct mem_cgroup *root; /* scan target hierarchy root */ | ||
45 | int context; /* scanning context (see memcontrol.c) */ | ||
46 | unsigned long nr_scanned[2]; /* the number of scanned pages */ | ||
47 | unsigned long nr_rotated[2]; /* the number of rotated pages */ | ||
48 | unsigned long nr_freed[2]; /* the number of freed pages */ | ||
49 | unsigned long elapsed; /* nsec of time elapsed while scanning */ | ||
50 | }; | ||
51 | |||
42 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 52 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
43 | /* | 53 | /* |
44 | * All "charge" functions with gfp_mask should use GFP_KERNEL or | 54 | * All "charge" functions with gfp_mask should use GFP_KERNEL or |
@@ -111,8 +121,7 @@ int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg); | |||
111 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); | 121 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg); |
112 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); | 122 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); |
113 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, | 123 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, |
114 | struct zone *zone, | 124 | int nid, int zid, unsigned int lrumask); |
115 | enum lru_list lru); | ||
116 | struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, | 125 | struct zone_reclaim_stat *mem_cgroup_get_reclaim_stat(struct mem_cgroup *memcg, |
117 | struct zone *zone); | 126 | struct zone *zone); |
118 | struct zone_reclaim_stat* | 127 | struct zone_reclaim_stat* |
@@ -120,6 +129,15 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page); | |||
120 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | 129 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, |
121 | struct task_struct *p); | 130 | struct task_struct *p); |
122 | 131 | ||
132 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | ||
133 | gfp_t gfp_mask, bool noswap, | ||
134 | struct memcg_scanrecord *rec); | ||
135 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | ||
136 | gfp_t gfp_mask, bool noswap, | ||
137 | struct zone *zone, | ||
138 | struct memcg_scanrecord *rec, | ||
139 | unsigned long *nr_scanned); | ||
140 | |||
123 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | 141 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP |
124 | extern int do_swap_account; | 142 | extern int do_swap_account; |
125 | #endif | 143 | #endif |
@@ -313,8 +331,8 @@ mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg) | |||
313 | } | 331 | } |
314 | 332 | ||
315 | static inline unsigned long | 333 | static inline unsigned long |
316 | mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, struct zone *zone, | 334 | mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, int nid, int zid, |
317 | enum lru_list lru) | 335 | unsigned int lru_mask) |
318 | { | 336 | { |
319 | return 0; | 337 | return 0; |
320 | } | 338 | } |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 8122018d3000..0b8e2a742600 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -68,12 +68,19 @@ static inline void zone_seqlock_init(struct zone *zone) | |||
68 | extern int zone_grow_free_lists(struct zone *zone, unsigned long new_nr_pages); | 68 | extern int zone_grow_free_lists(struct zone *zone, unsigned long new_nr_pages); |
69 | extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages); | 69 | extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages); |
70 | extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); | 70 | extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); |
71 | /* need some defines for these for archs that don't support it */ | ||
72 | extern void online_page(struct page *page); | ||
73 | /* VM interface that may be used by firmware interface */ | 71 | /* VM interface that may be used by firmware interface */ |
74 | extern int online_pages(unsigned long, unsigned long); | 72 | extern int online_pages(unsigned long, unsigned long); |
75 | extern void __offline_isolated_pages(unsigned long, unsigned long); | 73 | extern void __offline_isolated_pages(unsigned long, unsigned long); |
76 | 74 | ||
75 | typedef void (*online_page_callback_t)(struct page *page); | ||
76 | |||
77 | extern int set_online_page_callback(online_page_callback_t callback); | ||
78 | extern int restore_online_page_callback(online_page_callback_t callback); | ||
79 | |||
80 | extern void __online_page_set_limits(struct page *page); | ||
81 | extern void __online_page_increment_counters(struct page *page); | ||
82 | extern void __online_page_free(struct page *page); | ||
83 | |||
77 | #ifdef CONFIG_MEMORY_HOTREMOVE | 84 | #ifdef CONFIG_MEMORY_HOTREMOVE |
78 | extern bool is_pageblock_removable_nolock(struct page *page); | 85 | extern bool is_pageblock_removable_nolock(struct page *page); |
79 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 86 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
diff --git a/include/linux/mfd/pm8xxx/rtc.h b/include/linux/mfd/pm8xxx/rtc.h new file mode 100644 index 000000000000..14f1983eaecc --- /dev/null +++ b/include/linux/mfd/pm8xxx/rtc.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved. | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 and | ||
5 | * only version 2 as published by the Free Software Foundation. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | */ | ||
12 | |||
13 | #ifndef __RTC_PM8XXX_H__ | ||
14 | #define __RTC_PM8XXX_H__ | ||
15 | |||
16 | #define PM8XXX_RTC_DEV_NAME "rtc-pm8xxx" | ||
17 | /** | ||
18 | * struct pm8xxx_rtc_pdata - RTC driver platform data | ||
19 | * @rtc_write_enable: variable stating RTC write capability | ||
20 | */ | ||
21 | struct pm8xxx_rtc_platform_data { | ||
22 | bool rtc_write_enable; | ||
23 | }; | ||
24 | |||
25 | #endif /* __RTC_PM8XXX_H__ */ | ||
diff --git a/include/linux/mfd/twl4030-codec.h b/include/linux/mfd/twl4030-audio.h index 5cc16bbd1da1..3d22b72df076 100644 --- a/include/linux/mfd/twl4030-codec.h +++ b/include/linux/mfd/twl4030-audio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * MFD driver for twl4030 codec submodule | 2 | * MFD driver for twl4030 audio submodule |
3 | * | 3 | * |
4 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> | 4 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> |
5 | * | 5 | * |
@@ -259,14 +259,14 @@ | |||
259 | #define TWL4030_VIBRA_DIR_SEL 0x20 | 259 | #define TWL4030_VIBRA_DIR_SEL 0x20 |
260 | 260 | ||
261 | /* TWL4030 codec resource IDs */ | 261 | /* TWL4030 codec resource IDs */ |
262 | enum twl4030_codec_res { | 262 | enum twl4030_audio_res { |
263 | TWL4030_CODEC_RES_POWER = 0, | 263 | TWL4030_AUDIO_RES_POWER = 0, |
264 | TWL4030_CODEC_RES_APLL, | 264 | TWL4030_AUDIO_RES_APLL, |
265 | TWL4030_CODEC_RES_MAX, | 265 | TWL4030_AUDIO_RES_MAX, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | int twl4030_codec_disable_resource(enum twl4030_codec_res id); | 268 | int twl4030_audio_disable_resource(enum twl4030_audio_res id); |
269 | int twl4030_codec_enable_resource(enum twl4030_codec_res id); | 269 | int twl4030_audio_enable_resource(enum twl4030_audio_res id); |
270 | unsigned int twl4030_codec_get_mclk(void); | 270 | unsigned int twl4030_audio_get_mclk(void); |
271 | 271 | ||
272 | #endif /* End of __TWL4030_CODEC_H__ */ | 272 | #endif /* End of __TWL4030_CODEC_H__ */ |
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h new file mode 100644 index 000000000000..4c806f6d663e --- /dev/null +++ b/include/linux/mfd/twl6040.h | |||
@@ -0,0 +1,228 @@ | |||
1 | /* | ||
2 | * MFD driver for twl6040 | ||
3 | * | ||
4 | * Authors: Jorge Eduardo Candelaria <jorge.candelaria@ti.com> | ||
5 | * Misael Lopez Cruz <misael.lopez@ti.com> | ||
6 | * | ||
7 | * Copyright: (C) 2011 Texas Instruments, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
21 | * 02110-1301 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __TWL6040_CODEC_H__ | ||
26 | #define __TWL6040_CODEC_H__ | ||
27 | |||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/mfd/core.h> | ||
30 | |||
31 | #define TWL6040_REG_ASICID 0x01 | ||
32 | #define TWL6040_REG_ASICREV 0x02 | ||
33 | #define TWL6040_REG_INTID 0x03 | ||
34 | #define TWL6040_REG_INTMR 0x04 | ||
35 | #define TWL6040_REG_NCPCTL 0x05 | ||
36 | #define TWL6040_REG_LDOCTL 0x06 | ||
37 | #define TWL6040_REG_HPPLLCTL 0x07 | ||
38 | #define TWL6040_REG_LPPLLCTL 0x08 | ||
39 | #define TWL6040_REG_LPPLLDIV 0x09 | ||
40 | #define TWL6040_REG_AMICBCTL 0x0A | ||
41 | #define TWL6040_REG_DMICBCTL 0x0B | ||
42 | #define TWL6040_REG_MICLCTL 0x0C | ||
43 | #define TWL6040_REG_MICRCTL 0x0D | ||
44 | #define TWL6040_REG_MICGAIN 0x0E | ||
45 | #define TWL6040_REG_LINEGAIN 0x0F | ||
46 | #define TWL6040_REG_HSLCTL 0x10 | ||
47 | #define TWL6040_REG_HSRCTL 0x11 | ||
48 | #define TWL6040_REG_HSGAIN 0x12 | ||
49 | #define TWL6040_REG_EARCTL 0x13 | ||
50 | #define TWL6040_REG_HFLCTL 0x14 | ||
51 | #define TWL6040_REG_HFLGAIN 0x15 | ||
52 | #define TWL6040_REG_HFRCTL 0x16 | ||
53 | #define TWL6040_REG_HFRGAIN 0x17 | ||
54 | #define TWL6040_REG_VIBCTLL 0x18 | ||
55 | #define TWL6040_REG_VIBDATL 0x19 | ||
56 | #define TWL6040_REG_VIBCTLR 0x1A | ||
57 | #define TWL6040_REG_VIBDATR 0x1B | ||
58 | #define TWL6040_REG_HKCTL1 0x1C | ||
59 | #define TWL6040_REG_HKCTL2 0x1D | ||
60 | #define TWL6040_REG_GPOCTL 0x1E | ||
61 | #define TWL6040_REG_ALB 0x1F | ||
62 | #define TWL6040_REG_DLB 0x20 | ||
63 | #define TWL6040_REG_TRIM1 0x28 | ||
64 | #define TWL6040_REG_TRIM2 0x29 | ||
65 | #define TWL6040_REG_TRIM3 0x2A | ||
66 | #define TWL6040_REG_HSOTRIM 0x2B | ||
67 | #define TWL6040_REG_HFOTRIM 0x2C | ||
68 | #define TWL6040_REG_ACCCTL 0x2D | ||
69 | #define TWL6040_REG_STATUS 0x2E | ||
70 | |||
71 | #define TWL6040_CACHEREGNUM (TWL6040_REG_STATUS + 1) | ||
72 | |||
73 | #define TWL6040_VIOREGNUM 18 | ||
74 | #define TWL6040_VDDREGNUM 21 | ||
75 | |||
76 | /* INTID (0x03) fields */ | ||
77 | |||
78 | #define TWL6040_THINT 0x01 | ||
79 | #define TWL6040_PLUGINT 0x02 | ||
80 | #define TWL6040_UNPLUGINT 0x04 | ||
81 | #define TWL6040_HOOKINT 0x08 | ||
82 | #define TWL6040_HFINT 0x10 | ||
83 | #define TWL6040_VIBINT 0x20 | ||
84 | #define TWL6040_READYINT 0x40 | ||
85 | |||
86 | /* INTMR (0x04) fields */ | ||
87 | |||
88 | #define TWL6040_THMSK 0x01 | ||
89 | #define TWL6040_PLUGMSK 0x02 | ||
90 | #define TWL6040_HOOKMSK 0x08 | ||
91 | #define TWL6040_HFMSK 0x10 | ||
92 | #define TWL6040_VIBMSK 0x20 | ||
93 | #define TWL6040_READYMSK 0x40 | ||
94 | #define TWL6040_ALLINT_MSK 0x7B | ||
95 | |||
96 | /* NCPCTL (0x05) fields */ | ||
97 | |||
98 | #define TWL6040_NCPENA 0x01 | ||
99 | #define TWL6040_NCPOPEN 0x40 | ||
100 | |||
101 | /* LDOCTL (0x06) fields */ | ||
102 | |||
103 | #define TWL6040_LSLDOENA 0x01 | ||
104 | #define TWL6040_HSLDOENA 0x04 | ||
105 | #define TWL6040_REFENA 0x40 | ||
106 | #define TWL6040_OSCENA 0x80 | ||
107 | |||
108 | /* HPPLLCTL (0x07) fields */ | ||
109 | |||
110 | #define TWL6040_HPLLENA 0x01 | ||
111 | #define TWL6040_HPLLRST 0x02 | ||
112 | #define TWL6040_HPLLBP 0x04 | ||
113 | #define TWL6040_HPLLSQRENA 0x08 | ||
114 | #define TWL6040_MCLK_12000KHZ (0 << 5) | ||
115 | #define TWL6040_MCLK_19200KHZ (1 << 5) | ||
116 | #define TWL6040_MCLK_26000KHZ (2 << 5) | ||
117 | #define TWL6040_MCLK_38400KHZ (3 << 5) | ||
118 | #define TWL6040_MCLK_MSK 0x60 | ||
119 | |||
120 | /* LPPLLCTL (0x08) fields */ | ||
121 | |||
122 | #define TWL6040_LPLLENA 0x01 | ||
123 | #define TWL6040_LPLLRST 0x02 | ||
124 | #define TWL6040_LPLLSEL 0x04 | ||
125 | #define TWL6040_LPLLFIN 0x08 | ||
126 | #define TWL6040_HPLLSEL 0x10 | ||
127 | |||
128 | /* HSLCTL (0x10) fields */ | ||
129 | |||
130 | #define TWL6040_HSDACMODEL 0x02 | ||
131 | #define TWL6040_HSDRVMODEL 0x08 | ||
132 | |||
133 | /* HSRCTL (0x11) fields */ | ||
134 | |||
135 | #define TWL6040_HSDACMODER 0x02 | ||
136 | #define TWL6040_HSDRVMODER 0x08 | ||
137 | |||
138 | /* VIBCTLL (0x18) fields */ | ||
139 | |||
140 | #define TWL6040_VIBENAL 0x01 | ||
141 | #define TWL6040_VIBCTRLL 0x04 | ||
142 | #define TWL6040_VIBCTRLLP 0x08 | ||
143 | #define TWL6040_VIBCTRLLN 0x10 | ||
144 | |||
145 | /* VIBDATL (0x19) fields */ | ||
146 | |||
147 | #define TWL6040_VIBDAT_MAX 0x64 | ||
148 | |||
149 | /* VIBCTLR (0x1A) fields */ | ||
150 | |||
151 | #define TWL6040_VIBENAR 0x01 | ||
152 | #define TWL6040_VIBCTRLR 0x04 | ||
153 | #define TWL6040_VIBCTRLRP 0x08 | ||
154 | #define TWL6040_VIBCTRLRN 0x10 | ||
155 | |||
156 | /* GPOCTL (0x1E) fields */ | ||
157 | |||
158 | #define TWL6040_GPO1 0x01 | ||
159 | #define TWL6040_GPO2 0x02 | ||
160 | #define TWL6040_GPO3 0x03 | ||
161 | |||
162 | /* ACCCTL (0x2D) fields */ | ||
163 | |||
164 | #define TWL6040_I2CSEL 0x01 | ||
165 | #define TWL6040_RESETSPLIT 0x04 | ||
166 | #define TWL6040_INTCLRMODE 0x08 | ||
167 | |||
168 | /* STATUS (0x2E) fields */ | ||
169 | |||
170 | #define TWL6040_PLUGCOMP 0x02 | ||
171 | #define TWL6040_VIBLOCDET 0x10 | ||
172 | #define TWL6040_VIBROCDET 0x20 | ||
173 | #define TWL6040_TSHUTDET 0x40 | ||
174 | |||
175 | #define TWL6040_CELLS 2 | ||
176 | |||
177 | #define TWL6040_REV_ES1_0 0x00 | ||
178 | #define TWL6040_REV_ES1_1 0x01 | ||
179 | #define TWL6040_REV_ES1_2 0x02 | ||
180 | |||
181 | #define TWL6040_IRQ_TH 0 | ||
182 | #define TWL6040_IRQ_PLUG 1 | ||
183 | #define TWL6040_IRQ_HOOK 2 | ||
184 | #define TWL6040_IRQ_HF 3 | ||
185 | #define TWL6040_IRQ_VIB 4 | ||
186 | #define TWL6040_IRQ_READY 5 | ||
187 | |||
188 | /* PLL selection */ | ||
189 | #define TWL6040_SYSCLK_SEL_LPPLL 0 | ||
190 | #define TWL6040_SYSCLK_SEL_HPPLL 1 | ||
191 | |||
192 | struct twl6040 { | ||
193 | struct device *dev; | ||
194 | struct mutex mutex; | ||
195 | struct mutex io_mutex; | ||
196 | struct mutex irq_mutex; | ||
197 | struct mfd_cell cells[TWL6040_CELLS]; | ||
198 | struct completion ready; | ||
199 | |||
200 | int audpwron; | ||
201 | int power_count; | ||
202 | int rev; | ||
203 | |||
204 | int pll; | ||
205 | unsigned int sysclk; | ||
206 | |||
207 | unsigned int irq; | ||
208 | unsigned int irq_base; | ||
209 | u8 irq_masks_cur; | ||
210 | u8 irq_masks_cache; | ||
211 | }; | ||
212 | |||
213 | int twl6040_reg_read(struct twl6040 *twl6040, unsigned int reg); | ||
214 | int twl6040_reg_write(struct twl6040 *twl6040, unsigned int reg, | ||
215 | u8 val); | ||
216 | int twl6040_set_bits(struct twl6040 *twl6040, unsigned int reg, | ||
217 | u8 mask); | ||
218 | int twl6040_clear_bits(struct twl6040 *twl6040, unsigned int reg, | ||
219 | u8 mask); | ||
220 | int twl6040_power(struct twl6040 *twl6040, int on); | ||
221 | int twl6040_set_pll(struct twl6040 *twl6040, int pll_id, | ||
222 | unsigned int freq_in, unsigned int freq_out); | ||
223 | int twl6040_get_pll(struct twl6040 *twl6040); | ||
224 | unsigned int twl6040_get_sysclk(struct twl6040 *twl6040); | ||
225 | int twl6040_irq_init(struct twl6040 *twl6040); | ||
226 | void twl6040_irq_exit(struct twl6040 *twl6040); | ||
227 | |||
228 | #endif /* End of __TWL6040_CODEC_H__ */ | ||
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 387329e02303..53ef894bfa05 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/completion.h> | 37 | #include <linux/completion.h> |
38 | #include <linux/radix-tree.h> | 38 | #include <linux/radix-tree.h> |
39 | 39 | ||
40 | #include <asm/atomic.h> | 40 | #include <linux/atomic.h> |
41 | 41 | ||
42 | #define MAX_MSIX_P_PORT 17 | 42 | #define MAX_MSIX_P_PORT 17 |
43 | #define MAX_MSIX 64 | 43 | #define MAX_MSIX 64 |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8a45ad22a170..3172a1c0f08e 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -637,7 +637,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) | |||
637 | #define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1) | 637 | #define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1) |
638 | #define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1) | 638 | #define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1) |
639 | 639 | ||
640 | static inline enum zone_type page_zonenum(struct page *page) | 640 | static inline enum zone_type page_zonenum(const struct page *page) |
641 | { | 641 | { |
642 | return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK; | 642 | return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK; |
643 | } | 643 | } |
@@ -665,15 +665,15 @@ static inline int zone_to_nid(struct zone *zone) | |||
665 | } | 665 | } |
666 | 666 | ||
667 | #ifdef NODE_NOT_IN_PAGE_FLAGS | 667 | #ifdef NODE_NOT_IN_PAGE_FLAGS |
668 | extern int page_to_nid(struct page *page); | 668 | extern int page_to_nid(const struct page *page); |
669 | #else | 669 | #else |
670 | static inline int page_to_nid(struct page *page) | 670 | static inline int page_to_nid(const struct page *page) |
671 | { | 671 | { |
672 | return (page->flags >> NODES_PGSHIFT) & NODES_MASK; | 672 | return (page->flags >> NODES_PGSHIFT) & NODES_MASK; |
673 | } | 673 | } |
674 | #endif | 674 | #endif |
675 | 675 | ||
676 | static inline struct zone *page_zone(struct page *page) | 676 | static inline struct zone *page_zone(const struct page *page) |
677 | { | 677 | { |
678 | return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)]; | 678 | return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)]; |
679 | } | 679 | } |
@@ -718,9 +718,9 @@ static inline void set_page_links(struct page *page, enum zone_type zone, | |||
718 | */ | 718 | */ |
719 | #include <linux/vmstat.h> | 719 | #include <linux/vmstat.h> |
720 | 720 | ||
721 | static __always_inline void *lowmem_page_address(struct page *page) | 721 | static __always_inline void *lowmem_page_address(const struct page *page) |
722 | { | 722 | { |
723 | return __va(PFN_PHYS(page_to_pfn(page))); | 723 | return __va(PFN_PHYS(page_to_pfn((struct page *)page))); |
724 | } | 724 | } |
725 | 725 | ||
726 | #if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) | 726 | #if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) |
@@ -911,6 +911,8 @@ unsigned long unmap_vmas(struct mmu_gather *tlb, | |||
911 | * @pte_entry: if set, called for each non-empty PTE (4th-level) entry | 911 | * @pte_entry: if set, called for each non-empty PTE (4th-level) entry |
912 | * @pte_hole: if set, called for each hole at all levels | 912 | * @pte_hole: if set, called for each hole at all levels |
913 | * @hugetlb_entry: if set, called for each hugetlb entry | 913 | * @hugetlb_entry: if set, called for each hugetlb entry |
914 | * *Caution*: The caller must hold mmap_sem() if @hugetlb_entry | ||
915 | * is used. | ||
914 | * | 916 | * |
915 | * (see walk_page_range for more details) | 917 | * (see walk_page_range for more details) |
916 | */ | 918 | */ |
@@ -986,6 +988,8 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, | |||
986 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 988 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
987 | struct page **pages); | 989 | struct page **pages); |
988 | struct page *get_dump_page(unsigned long addr); | 990 | struct page *get_dump_page(unsigned long addr); |
991 | extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, | ||
992 | unsigned long address, unsigned int fault_flags); | ||
989 | 993 | ||
990 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | 994 | extern int try_to_release_page(struct page * page, gfp_t gfp_mask); |
991 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 995 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
@@ -1409,8 +1413,7 @@ extern int do_munmap(struct mm_struct *, unsigned long, size_t); | |||
1409 | 1413 | ||
1410 | extern unsigned long do_brk(unsigned long, unsigned long); | 1414 | extern unsigned long do_brk(unsigned long, unsigned long); |
1411 | 1415 | ||
1412 | /* filemap.c */ | 1416 | /* truncate.c */ |
1413 | extern unsigned long page_unuse(struct page *); | ||
1414 | extern void truncate_inode_pages(struct address_space *, loff_t); | 1417 | extern void truncate_inode_pages(struct address_space *, loff_t); |
1415 | extern void truncate_inode_pages_range(struct address_space *, | 1418 | extern void truncate_inode_pages_range(struct address_space *, |
1416 | loff_t lstart, loff_t lend); | 1419 | loff_t lstart, loff_t lend); |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 9872d6ca58ae..8b74e9b1d0ad 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/percpu_counter.h> | 15 | #include <linux/percpu_counter.h> |
16 | 16 | ||
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | 18 | ||
19 | extern int sysctl_overcommit_memory; | 19 | extern int sysctl_overcommit_memory; |
20 | extern int sysctl_overcommit_ratio; | 20 | extern int sysctl_overcommit_ratio; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 9f7c3ebcbbad..be1ac8d7789b 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/nodemask.h> | 16 | #include <linux/nodemask.h> |
17 | #include <linux/pageblock-flags.h> | 17 | #include <linux/pageblock-flags.h> |
18 | #include <generated/bounds.h> | 18 | #include <generated/bounds.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | 21 | ||
22 | /* Free memory management - zoned buddy allocator. */ | 22 | /* Free memory management - zoned buddy allocator. */ |
@@ -158,6 +158,12 @@ static inline int is_unevictable_lru(enum lru_list l) | |||
158 | return (l == LRU_UNEVICTABLE); | 158 | return (l == LRU_UNEVICTABLE); |
159 | } | 159 | } |
160 | 160 | ||
161 | /* Mask used at gathering information at once (see memcontrol.c) */ | ||
162 | #define LRU_ALL_FILE (BIT(LRU_INACTIVE_FILE) | BIT(LRU_ACTIVE_FILE)) | ||
163 | #define LRU_ALL_ANON (BIT(LRU_INACTIVE_ANON) | BIT(LRU_ACTIVE_ANON)) | ||
164 | #define LRU_ALL_EVICTABLE (LRU_ALL_FILE | LRU_ALL_ANON) | ||
165 | #define LRU_ALL ((1 << NR_LRU_LISTS) - 1) | ||
166 | |||
161 | enum zone_watermarks { | 167 | enum zone_watermarks { |
162 | WMARK_MIN, | 168 | WMARK_MIN, |
163 | WMARK_LOW, | 169 | WMARK_LOW, |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 604f122a2326..33fe53d78110 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/nodemask.h> | 14 | #include <linux/nodemask.h> |
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/seqlock.h> | 16 | #include <linux/seqlock.h> |
17 | #include <asm/atomic.h> | 17 | #include <linux/atomic.h> |
18 | 18 | ||
19 | struct super_block; | 19 | struct super_block; |
20 | struct vfsmount; | 20 | struct vfsmount; |
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 7f87217e9d1f..9121595a8ebf 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
16 | #include <linux/lockdep.h> | 16 | #include <linux/lockdep.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Simple, straightforward mutexes with strict semantics: | 21 | * Simple, straightforward mutexes with strict semantics: |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 34f3abc6457a..2ed0b6cf11c5 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/pm_qos_params.h> | 34 | #include <linux/pm_qos_params.h> |
35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <asm/atomic.h> | 37 | #include <linux/atomic.h> |
38 | #include <asm/cache.h> | 38 | #include <asm/cache.h> |
39 | #include <asm/byteorder.h> | 39 | #include <asm/byteorder.h> |
40 | 40 | ||
@@ -1521,6 +1521,39 @@ struct packet_type { | |||
1521 | 1521 | ||
1522 | #include <linux/notifier.h> | 1522 | #include <linux/notifier.h> |
1523 | 1523 | ||
1524 | /* netdevice notifier chain. Please remember to update the rtnetlink | ||
1525 | * notification exclusion list in rtnetlink_event() when adding new | ||
1526 | * types. | ||
1527 | */ | ||
1528 | #define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ | ||
1529 | #define NETDEV_DOWN 0x0002 | ||
1530 | #define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface | ||
1531 | detected a hardware crash and restarted | ||
1532 | - we can use this eg to kick tcp sessions | ||
1533 | once done */ | ||
1534 | #define NETDEV_CHANGE 0x0004 /* Notify device state change */ | ||
1535 | #define NETDEV_REGISTER 0x0005 | ||
1536 | #define NETDEV_UNREGISTER 0x0006 | ||
1537 | #define NETDEV_CHANGEMTU 0x0007 | ||
1538 | #define NETDEV_CHANGEADDR 0x0008 | ||
1539 | #define NETDEV_GOING_DOWN 0x0009 | ||
1540 | #define NETDEV_CHANGENAME 0x000A | ||
1541 | #define NETDEV_FEAT_CHANGE 0x000B | ||
1542 | #define NETDEV_BONDING_FAILOVER 0x000C | ||
1543 | #define NETDEV_PRE_UP 0x000D | ||
1544 | #define NETDEV_PRE_TYPE_CHANGE 0x000E | ||
1545 | #define NETDEV_POST_TYPE_CHANGE 0x000F | ||
1546 | #define NETDEV_POST_INIT 0x0010 | ||
1547 | #define NETDEV_UNREGISTER_BATCH 0x0011 | ||
1548 | #define NETDEV_RELEASE 0x0012 | ||
1549 | #define NETDEV_NOTIFY_PEERS 0x0013 | ||
1550 | #define NETDEV_JOIN 0x0014 | ||
1551 | |||
1552 | extern int register_netdevice_notifier(struct notifier_block *nb); | ||
1553 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | ||
1554 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | ||
1555 | |||
1556 | |||
1524 | extern rwlock_t dev_base_lock; /* Device list lock */ | 1557 | extern rwlock_t dev_base_lock; /* Device list lock */ |
1525 | 1558 | ||
1526 | 1559 | ||
@@ -1603,12 +1636,9 @@ static inline void unregister_netdevice(struct net_device *dev) | |||
1603 | extern int netdev_refcnt_read(const struct net_device *dev); | 1636 | extern int netdev_refcnt_read(const struct net_device *dev); |
1604 | extern void free_netdev(struct net_device *dev); | 1637 | extern void free_netdev(struct net_device *dev); |
1605 | extern void synchronize_net(void); | 1638 | extern void synchronize_net(void); |
1606 | extern int register_netdevice_notifier(struct notifier_block *nb); | ||
1607 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | ||
1608 | extern int init_dummy_netdev(struct net_device *dev); | 1639 | extern int init_dummy_netdev(struct net_device *dev); |
1609 | extern void netdev_resync_ops(struct net_device *dev); | 1640 | extern void netdev_resync_ops(struct net_device *dev); |
1610 | 1641 | ||
1611 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | ||
1612 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1642 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |
1613 | extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); | 1643 | extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); |
1614 | extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); | 1644 | extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 87694ca86914..08c444aa0411 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/nfs_xdr.h> | 7 | #include <linux/nfs_xdr.h> |
8 | #include <linux/sunrpc/xprt.h> | 8 | #include <linux/sunrpc/xprt.h> |
9 | 9 | ||
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | 11 | ||
12 | struct nfs4_session; | 12 | struct nfs4_session; |
13 | struct nfs_iostats; | 13 | struct nfs_iostats; |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 84058ec69390..8a31a20efe7e 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -133,8 +133,6 @@ __be32 check_nfsd_access(struct svc_export *exp, struct svc_rqst *rqstp); | |||
133 | int nfsd_export_init(void); | 133 | int nfsd_export_init(void); |
134 | void nfsd_export_shutdown(void); | 134 | void nfsd_export_shutdown(void); |
135 | void nfsd_export_flush(void); | 135 | void nfsd_export_flush(void); |
136 | void exp_readlock(void); | ||
137 | void exp_readunlock(void); | ||
138 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, | 136 | struct svc_export * rqst_exp_get_by_name(struct svc_rqst *, |
139 | struct path *); | 137 | struct path *); |
140 | struct svc_export * rqst_exp_parent(struct svc_rqst *, | 138 | struct svc_export * rqst_exp_parent(struct svc_rqst *, |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index dba35e413371..7afc36334d52 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -66,6 +66,8 @@ | |||
66 | * int num_online_nodes() Number of online Nodes | 66 | * int num_online_nodes() Number of online Nodes |
67 | * int num_possible_nodes() Number of all possible Nodes | 67 | * int num_possible_nodes() Number of all possible Nodes |
68 | * | 68 | * |
69 | * int node_random(mask) Random node with set bit in mask | ||
70 | * | ||
69 | * int node_online(node) Is some node online? | 71 | * int node_online(node) Is some node online? |
70 | * int node_possible(node) Is some node possible? | 72 | * int node_possible(node) Is some node possible? |
71 | * | 73 | * |
@@ -430,6 +432,7 @@ static inline void node_set_offline(int nid) | |||
430 | node_clear_state(nid, N_ONLINE); | 432 | node_clear_state(nid, N_ONLINE); |
431 | nr_online_nodes = num_node_state(N_ONLINE); | 433 | nr_online_nodes = num_node_state(N_ONLINE); |
432 | } | 434 | } |
435 | |||
433 | #else | 436 | #else |
434 | 437 | ||
435 | static inline int node_state(int node, enum node_states state) | 438 | static inline int node_state(int node, enum node_states state) |
@@ -460,6 +463,16 @@ static inline int num_node_state(enum node_states state) | |||
460 | 463 | ||
461 | #define node_set_online(node) node_set_state((node), N_ONLINE) | 464 | #define node_set_online(node) node_set_state((node), N_ONLINE) |
462 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) | 465 | #define node_set_offline(node) node_clear_state((node), N_ONLINE) |
466 | |||
467 | #endif | ||
468 | |||
469 | #if defined(CONFIG_NUMA) && (MAX_NUMNODES > 1) | ||
470 | extern int node_random(const nodemask_t *maskp); | ||
471 | #else | ||
472 | static inline int node_random(const nodemask_t *mask) | ||
473 | { | ||
474 | return 0; | ||
475 | } | ||
463 | #endif | 476 | #endif |
464 | 477 | ||
465 | #define node_online_map node_states[N_ONLINE] | 478 | #define node_online_map node_states[N_ONLINE] |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index c0688b0168b3..d65746efc954 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -185,80 +185,17 @@ static inline int notifier_to_errno(int ret) | |||
185 | * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... | 185 | * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... |
186 | */ | 186 | */ |
187 | 187 | ||
188 | /* netdevice notifier chain. Please remember to update the rtnetlink | 188 | /* CPU notfiers are defined in include/linux/cpu.h. */ |
189 | * notification exclusion list in rtnetlink_event() when adding new | ||
190 | * types. | ||
191 | */ | ||
192 | #define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ | ||
193 | #define NETDEV_DOWN 0x0002 | ||
194 | #define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface | ||
195 | detected a hardware crash and restarted | ||
196 | - we can use this eg to kick tcp sessions | ||
197 | once done */ | ||
198 | #define NETDEV_CHANGE 0x0004 /* Notify device state change */ | ||
199 | #define NETDEV_REGISTER 0x0005 | ||
200 | #define NETDEV_UNREGISTER 0x0006 | ||
201 | #define NETDEV_CHANGEMTU 0x0007 | ||
202 | #define NETDEV_CHANGEADDR 0x0008 | ||
203 | #define NETDEV_GOING_DOWN 0x0009 | ||
204 | #define NETDEV_CHANGENAME 0x000A | ||
205 | #define NETDEV_FEAT_CHANGE 0x000B | ||
206 | #define NETDEV_BONDING_FAILOVER 0x000C | ||
207 | #define NETDEV_PRE_UP 0x000D | ||
208 | #define NETDEV_PRE_TYPE_CHANGE 0x000E | ||
209 | #define NETDEV_POST_TYPE_CHANGE 0x000F | ||
210 | #define NETDEV_POST_INIT 0x0010 | ||
211 | #define NETDEV_UNREGISTER_BATCH 0x0011 | ||
212 | #define NETDEV_RELEASE 0x0012 | ||
213 | #define NETDEV_NOTIFY_PEERS 0x0013 | ||
214 | #define NETDEV_JOIN 0x0014 | ||
215 | |||
216 | #define SYS_DOWN 0x0001 /* Notify of system down */ | ||
217 | #define SYS_RESTART SYS_DOWN | ||
218 | #define SYS_HALT 0x0002 /* Notify of system halt */ | ||
219 | #define SYS_POWER_OFF 0x0003 /* Notify of system power off */ | ||
220 | 189 | ||
221 | #define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ | 190 | /* netdevice notifiers are defined in include/linux/netdevice.h */ |
222 | 191 | ||
223 | #define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */ | 192 | /* reboot notifiers are defined in include/linux/reboot.h. */ |
224 | #define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */ | ||
225 | #define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */ | ||
226 | #define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ | ||
227 | #define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ | ||
228 | #define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ | ||
229 | #define CPU_DYING 0x0008 /* CPU (unsigned)v not running any task, | ||
230 | * not handling interrupts, soon dead. | ||
231 | * Called on the dying cpu, interrupts | ||
232 | * are already disabled. Must not | ||
233 | * sleep, must not fail */ | ||
234 | #define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug | ||
235 | * lock is dropped */ | ||
236 | #define CPU_STARTING 0x000A /* CPU (unsigned)v soon running. | ||
237 | * Called on the new cpu, just before | ||
238 | * enabling interrupts. Must not sleep, | ||
239 | * must not fail */ | ||
240 | 193 | ||
241 | /* Used for CPU hotplug events occurring while tasks are frozen due to a suspend | 194 | /* Hibernation and suspend events are defined in include/linux/suspend.h. */ |
242 | * operation in progress | ||
243 | */ | ||
244 | #define CPU_TASKS_FROZEN 0x0010 | ||
245 | 195 | ||
246 | #define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN) | 196 | /* Virtual Terminal events are defined in include/linux/vt.h. */ |
247 | #define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN) | ||
248 | #define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN) | ||
249 | #define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN) | ||
250 | #define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN) | ||
251 | #define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN) | ||
252 | #define CPU_DYING_FROZEN (CPU_DYING | CPU_TASKS_FROZEN) | ||
253 | #define CPU_STARTING_FROZEN (CPU_STARTING | CPU_TASKS_FROZEN) | ||
254 | 197 | ||
255 | /* Hibernation and suspend events */ | 198 | #define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ |
256 | #define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ | ||
257 | #define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ | ||
258 | #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ | ||
259 | #define PM_POST_SUSPEND 0x0004 /* Suspend finished */ | ||
260 | #define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ | ||
261 | #define PM_POST_RESTORE 0x0006 /* Restore failed */ | ||
262 | 199 | ||
263 | /* Console keyboard events. | 200 | /* Console keyboard events. |
264 | * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and | 201 | * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and |
@@ -271,12 +208,5 @@ static inline int notifier_to_errno(int ret) | |||
271 | 208 | ||
272 | extern struct blocking_notifier_head reboot_notifier_list; | 209 | extern struct blocking_notifier_head reboot_notifier_list; |
273 | 210 | ||
274 | /* Virtual Terminal events. */ | ||
275 | #define VT_ALLOCATE 0x0001 /* Console got allocated */ | ||
276 | #define VT_DEALLOCATE 0x0002 /* Console will be deallocated */ | ||
277 | #define VT_WRITE 0x0003 /* A char got output */ | ||
278 | #define VT_UPDATE 0x0004 /* A bigger update occurred */ | ||
279 | #define VT_PREWRITE 0x0005 /* A char is about to be written to the console */ | ||
280 | |||
281 | #endif /* __KERNEL__ */ | 211 | #endif /* __KERNEL__ */ |
282 | #endif /* _LINUX_NOTIFIER_H */ | 212 | #endif /* _LINUX_NOTIFIER_H */ |
diff --git a/include/linux/oom.h b/include/linux/oom.h index 4952fb874ad3..13b7b02e599a 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
@@ -64,10 +64,6 @@ static inline void oom_killer_enable(void) | |||
64 | oom_killer_disabled = false; | 64 | oom_killer_disabled = false; |
65 | } | 65 | } |
66 | 66 | ||
67 | /* The badness from the OOM killer */ | ||
68 | extern unsigned long badness(struct task_struct *p, struct mem_cgroup *mem, | ||
69 | const nodemask_t *nodemask, unsigned long uptime); | ||
70 | |||
71 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); | 67 | extern struct task_struct *find_lock_task_mm(struct task_struct *p); |
72 | 68 | ||
73 | /* sysctls */ | 69 | /* sysctls */ |
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 7f5cfd3b37dd..49c8727eeb57 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
20 | #include <linux/printk.h> | 20 | #include <linux/printk.h> |
21 | #include <asm/atomic.h> | 21 | #include <linux/atomic.h> |
22 | 22 | ||
23 | /* Each escaped entry is prefixed by ESCAPE_CODE | 23 | /* Each escaped entry is prefixed by ESCAPE_CODE |
24 | * then one of the following codes, then the | 24 | * then one of the following codes, then the |
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 6081493db68f..3e5a1b189a41 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -135,7 +135,7 @@ enum pageflags { | |||
135 | * Macros to create function definitions for page flags | 135 | * Macros to create function definitions for page flags |
136 | */ | 136 | */ |
137 | #define TESTPAGEFLAG(uname, lname) \ | 137 | #define TESTPAGEFLAG(uname, lname) \ |
138 | static inline int Page##uname(struct page *page) \ | 138 | static inline int Page##uname(const struct page *page) \ |
139 | { return test_bit(PG_##lname, &page->flags); } | 139 | { return test_bit(PG_##lname, &page->flags); } |
140 | 140 | ||
141 | #define SETPAGEFLAG(uname, lname) \ | 141 | #define SETPAGEFLAG(uname, lname) \ |
@@ -173,7 +173,7 @@ static inline int __TestClearPage##uname(struct page *page) \ | |||
173 | __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) | 173 | __SETPAGEFLAG(uname, lname) __CLEARPAGEFLAG(uname, lname) |
174 | 174 | ||
175 | #define PAGEFLAG_FALSE(uname) \ | 175 | #define PAGEFLAG_FALSE(uname) \ |
176 | static inline int Page##uname(struct page *page) \ | 176 | static inline int Page##uname(const struct page *page) \ |
177 | { return 0; } | 177 | { return 0; } |
178 | 178 | ||
179 | #define TESTSCFLAG(uname, lname) \ | 179 | #define TESTSCFLAG(uname, lname) \ |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 8e38d4c140ff..cfaaa6949b8b 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -255,26 +255,24 @@ static inline struct page *grab_cache_page(struct address_space *mapping, | |||
255 | extern struct page * grab_cache_page_nowait(struct address_space *mapping, | 255 | extern struct page * grab_cache_page_nowait(struct address_space *mapping, |
256 | pgoff_t index); | 256 | pgoff_t index); |
257 | extern struct page * read_cache_page_async(struct address_space *mapping, | 257 | extern struct page * read_cache_page_async(struct address_space *mapping, |
258 | pgoff_t index, filler_t *filler, | 258 | pgoff_t index, filler_t *filler, void *data); |
259 | void *data); | ||
260 | extern struct page * read_cache_page(struct address_space *mapping, | 259 | extern struct page * read_cache_page(struct address_space *mapping, |
261 | pgoff_t index, filler_t *filler, | 260 | pgoff_t index, filler_t *filler, void *data); |
262 | void *data); | ||
263 | extern struct page * read_cache_page_gfp(struct address_space *mapping, | 261 | extern struct page * read_cache_page_gfp(struct address_space *mapping, |
264 | pgoff_t index, gfp_t gfp_mask); | 262 | pgoff_t index, gfp_t gfp_mask); |
265 | extern int read_cache_pages(struct address_space *mapping, | 263 | extern int read_cache_pages(struct address_space *mapping, |
266 | struct list_head *pages, filler_t *filler, void *data); | 264 | struct list_head *pages, filler_t *filler, void *data); |
267 | 265 | ||
268 | static inline struct page *read_mapping_page_async( | 266 | static inline struct page *read_mapping_page_async( |
269 | struct address_space *mapping, | 267 | struct address_space *mapping, |
270 | pgoff_t index, void *data) | 268 | pgoff_t index, void *data) |
271 | { | 269 | { |
272 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | 270 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; |
273 | return read_cache_page_async(mapping, index, filler, data); | 271 | return read_cache_page_async(mapping, index, filler, data); |
274 | } | 272 | } |
275 | 273 | ||
276 | static inline struct page *read_mapping_page(struct address_space *mapping, | 274 | static inline struct page *read_mapping_page(struct address_space *mapping, |
277 | pgoff_t index, void *data) | 275 | pgoff_t index, void *data) |
278 | { | 276 | { |
279 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; | 277 | filler_t *filler = (filler_t *)mapping->a_ops->readpage; |
280 | return read_cache_page(mapping, index, filler, data); | 278 | return read_cache_page(mapping, index, filler, data); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 4e4203a96312..3a5626df37ce 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <linux/compiler.h> | 49 | #include <linux/compiler.h> |
50 | #include <linux/errno.h> | 50 | #include <linux/errno.h> |
51 | #include <linux/kobject.h> | 51 | #include <linux/kobject.h> |
52 | #include <asm/atomic.h> | 52 | #include <linux/atomic.h> |
53 | #include <linux/device.h> | 53 | #include <linux/device.h> |
54 | #include <linux/io.h> | 54 | #include <linux/io.h> |
55 | #include <linux/irqreturn.h> | 55 | #include <linux/irqreturn.h> |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 74173c585afa..b00c4ec5056e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2832,7 +2832,11 @@ | |||
2832 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 | 2832 | #define PCI_DEVICE_ID_NETMOS_9845 0x9845 |
2833 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 | 2833 | #define PCI_DEVICE_ID_NETMOS_9855 0x9855 |
2834 | #define PCI_DEVICE_ID_NETMOS_9865 0x9865 | 2834 | #define PCI_DEVICE_ID_NETMOS_9865 0x9865 |
2835 | #define PCI_DEVICE_ID_NETMOS_9900 0x9900 | ||
2835 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 | 2836 | #define PCI_DEVICE_ID_NETMOS_9901 0x9901 |
2837 | #define PCI_DEVICE_ID_NETMOS_9904 0x9904 | ||
2838 | #define PCI_DEVICE_ID_NETMOS_9912 0x9912 | ||
2839 | #define PCI_DEVICE_ID_NETMOS_9922 0x9922 | ||
2836 | 2840 | ||
2837 | #define PCI_VENDOR_ID_3COM_2 0xa727 | 2841 | #define PCI_VENDOR_ID_3COM_2 0xa727 |
2838 | 2842 | ||
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3f2711ccf910..245bafdafd5e 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -509,7 +509,7 @@ struct perf_guest_info_callbacks { | |||
509 | #include <linux/cpu.h> | 509 | #include <linux/cpu.h> |
510 | #include <linux/irq_work.h> | 510 | #include <linux/irq_work.h> |
511 | #include <linux/jump_label.h> | 511 | #include <linux/jump_label.h> |
512 | #include <asm/atomic.h> | 512 | #include <linux/atomic.h> |
513 | #include <asm/local.h> | 513 | #include <asm/local.h> |
514 | 514 | ||
515 | #define PERF_MAX_STACK_DEPTH 255 | 515 | #define PERF_MAX_STACK_DEPTH 255 |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 7da5fa845959..ad5186354d92 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/mod_devicetable.h> | 27 | #include <linux/mod_devicetable.h> |
28 | 28 | ||
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | 30 | ||
31 | #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ | 31 | #define PHY_BASIC_FEATURES (SUPPORTED_10baseT_Half | \ |
32 | SUPPORTED_10baseT_Full | \ | 32 | SUPPORTED_10baseT_Full | \ |
diff --git a/include/linux/platform_data/fsa9480.h b/include/linux/platform_data/fsa9480.h new file mode 100644 index 000000000000..72dddcb4bed1 --- /dev/null +++ b/include/linux/platform_data/fsa9480.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Samsung Electronics | ||
3 | * Minkyu Kang <mk7.kang@samsung.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #ifndef _FSA9480_H_ | ||
11 | #define _FSA9480_H_ | ||
12 | |||
13 | #define FSA9480_ATTACHED 1 | ||
14 | #define FSA9480_DETACHED 0 | ||
15 | |||
16 | struct fsa9480_platform_data { | ||
17 | void (*cfg_gpio) (void); | ||
18 | void (*usb_cb) (u8 attached); | ||
19 | void (*uart_cb) (u8 attached); | ||
20 | void (*charger_cb) (u8 attached); | ||
21 | void (*jig_cb) (u8 attached); | ||
22 | void (*reset_cb) (void); | ||
23 | void (*usb_power) (u8 on); | ||
24 | int wakeup; | ||
25 | }; | ||
26 | |||
27 | #endif /* _FSA9480_H_ */ | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index ede1a80e3358..27bb05aae70d 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -42,6 +42,7 @@ extern void platform_device_unregister(struct platform_device *); | |||
42 | extern struct bus_type platform_bus_type; | 42 | extern struct bus_type platform_bus_type; |
43 | extern struct device platform_bus; | 43 | extern struct device platform_bus; |
44 | 44 | ||
45 | extern void arch_setup_pdev_archdata(struct platform_device *); | ||
45 | extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); | 46 | extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); |
46 | extern int platform_get_irq(struct platform_device *, unsigned int); | 47 | extern int platform_get_irq(struct platform_device *, unsigned int); |
47 | extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *); | 48 | extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *); |
diff --git a/include/linux/poison.h b/include/linux/poison.h index 2110a81c5e2a..79159de0e341 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
@@ -40,6 +40,12 @@ | |||
40 | #define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ | 40 | #define RED_INACTIVE 0x09F911029D74E35BULL /* when obj is inactive */ |
41 | #define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ | 41 | #define RED_ACTIVE 0xD84156C5635688C0ULL /* when obj is active */ |
42 | 42 | ||
43 | #ifdef CONFIG_PHYS_ADDR_T_64BIT | ||
44 | #define MEMBLOCK_INACTIVE 0x3a84fb0144c9e71bULL | ||
45 | #else | ||
46 | #define MEMBLOCK_INACTIVE 0x44c9e71bUL | ||
47 | #endif | ||
48 | |||
43 | #define SLUB_RED_INACTIVE 0xbb | 49 | #define SLUB_RED_INACTIVE 0xbb |
44 | #define SLUB_RED_ACTIVE 0xcc | 50 | #define SLUB_RED_ACTIVE 0xcc |
45 | 51 | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index e7576cf9e32d..650af6deaf8f 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/fs.h> | 5 | #include <linux/fs.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/magic.h> | 7 | #include <linux/magic.h> |
8 | #include <asm/atomic.h> | 8 | #include <linux/atomic.h> |
9 | 9 | ||
10 | struct net; | 10 | struct net; |
11 | struct completion; | 11 | struct completion; |
diff --git a/include/linux/pti.h b/include/linux/pti.h index 81af667bb2d5..b3ea01a3197e 100644 --- a/include/linux/pti.h +++ b/include/linux/pti.h | |||
@@ -36,7 +36,8 @@ struct pti_masterchannel { | |||
36 | 36 | ||
37 | /* the following functions are defined in misc/pti.c */ | 37 | /* the following functions are defined in misc/pti.c */ |
38 | void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count); | 38 | void pti_writedata(struct pti_masterchannel *mc, u8 *buf, int count); |
39 | struct pti_masterchannel *pti_request_masterchannel(u8 type); | 39 | struct pti_masterchannel *pti_request_masterchannel(u8 type, |
40 | const char *thread_name); | ||
40 | void pti_release_masterchannel(struct pti_masterchannel *mc); | 41 | void pti_release_masterchannel(struct pti_masterchannel *mc); |
41 | 42 | ||
42 | #endif /*PTI_H_*/ | 43 | #endif /*PTI_H_*/ |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 9a85412e0db6..cb7855699037 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -180,7 +180,7 @@ enum { | |||
180 | #include <linux/dqblk_v1.h> | 180 | #include <linux/dqblk_v1.h> |
181 | #include <linux/dqblk_v2.h> | 181 | #include <linux/dqblk_v2.h> |
182 | 182 | ||
183 | #include <asm/atomic.h> | 183 | #include <linux/atomic.h> |
184 | 184 | ||
185 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ | 185 | typedef __kernel_uid32_t qid_t; /* Type in which we store ids in memory */ |
186 | typedef long long qsize_t; /* Type in which we store sizes */ | 186 | typedef long long qsize_t; /* Type in which we store sizes */ |
@@ -415,13 +415,5 @@ struct quota_module_name { | |||
415 | {QFMT_VFS_V0, "quota_v2"},\ | 415 | {QFMT_VFS_V0, "quota_v2"},\ |
416 | {0, NULL}} | 416 | {0, NULL}} |
417 | 417 | ||
418 | #else | ||
419 | |||
420 | # /* nodep */ include <sys/cdefs.h> | ||
421 | |||
422 | __BEGIN_DECLS | ||
423 | long quotactl __P ((unsigned int, const char *, int, caddr_t)); | ||
424 | __END_DECLS | ||
425 | |||
426 | #endif /* __KERNEL__ */ | 418 | #endif /* __KERNEL__ */ |
427 | #endif /* _QUOTA_ */ | 419 | #endif /* _QUOTA_ */ |
diff --git a/include/linux/ramoops.h b/include/linux/ramoops.h index 0ae68a2c1212..484fef81cd3a 100644 --- a/include/linux/ramoops.h +++ b/include/linux/ramoops.h | |||
@@ -10,6 +10,8 @@ | |||
10 | struct ramoops_platform_data { | 10 | struct ramoops_platform_data { |
11 | unsigned long mem_size; | 11 | unsigned long mem_size; |
12 | unsigned long mem_address; | 12 | unsigned long mem_address; |
13 | unsigned long record_size; | ||
14 | int dump_oops; | ||
13 | }; | 15 | }; |
14 | 16 | ||
15 | #endif | 17 | #endif |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 3005d5a7fce5..e0879a70e830 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -39,6 +39,11 @@ | |||
39 | 39 | ||
40 | #include <linux/notifier.h> | 40 | #include <linux/notifier.h> |
41 | 41 | ||
42 | #define SYS_DOWN 0x0001 /* Notify of system down */ | ||
43 | #define SYS_RESTART SYS_DOWN | ||
44 | #define SYS_HALT 0x0002 /* Notify of system halt */ | ||
45 | #define SYS_POWER_OFF 0x0003 /* Notify of system power off */ | ||
46 | |||
42 | extern int register_reboot_notifier(struct notifier_block *); | 47 | extern int register_reboot_notifier(struct notifier_block *); |
43 | extern int unregister_reboot_notifier(struct notifier_block *); | 48 | extern int unregister_reboot_notifier(struct notifier_block *); |
44 | 49 | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index eca75df00fed..96d465f8d3e6 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -2332,7 +2332,9 @@ __u32 keyed_hash(const signed char *msg, int len); | |||
2332 | __u32 yura_hash(const signed char *msg, int len); | 2332 | __u32 yura_hash(const signed char *msg, int len); |
2333 | __u32 r5_hash(const signed char *msg, int len); | 2333 | __u32 r5_hash(const signed char *msg, int len); |
2334 | 2334 | ||
2335 | #define reiserfs_set_le_bit __set_bit_le | ||
2335 | #define reiserfs_test_and_set_le_bit __test_and_set_bit_le | 2336 | #define reiserfs_test_and_set_le_bit __test_and_set_bit_le |
2337 | #define reiserfs_clear_le_bit __clear_bit_le | ||
2336 | #define reiserfs_test_and_clear_le_bit __test_and_clear_bit_le | 2338 | #define reiserfs_test_and_clear_le_bit __test_and_clear_bit_le |
2337 | #define reiserfs_test_le_bit test_bit_le | 2339 | #define reiserfs_test_le_bit test_bit_le |
2338 | #define reiserfs_find_next_zero_le_bit find_next_zero_bit_le | 2340 | #define reiserfs_find_next_zero_le_bit find_next_zero_bit_le |
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 77950dfa0a9e..6a6741440cb7 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | 16 | ||
17 | #include <asm/system.h> | 17 | #include <asm/system.h> |
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | 19 | ||
20 | struct rw_semaphore; | 20 | struct rw_semaphore; |
21 | 21 | ||
diff --git a/include/linux/sem.h b/include/linux/sem.h index f2961afa2f66..1feb2de2ee57 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h | |||
@@ -77,7 +77,7 @@ struct seminfo { | |||
77 | #define SEMUSZ 20 /* sizeof struct sem_undo */ | 77 | #define SEMUSZ 20 /* sizeof struct sem_undo */ |
78 | 78 | ||
79 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | #include <asm/atomic.h> | 80 | #include <linux/atomic.h> |
81 | #include <linux/rcupdate.h> | 81 | #include <linux/rcupdate.h> |
82 | #include <linux/cache.h> | 82 | #include <linux/cache.h> |
83 | 83 | ||
diff --git a/include/linux/shm.h b/include/linux/shm.h index eca6235a46c0..7d27ffde0190 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h | |||
@@ -106,6 +106,7 @@ struct shmid_kernel /* private to the kernel */ | |||
106 | #ifdef CONFIG_SYSVIPC | 106 | #ifdef CONFIG_SYSVIPC |
107 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); | 107 | long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr); |
108 | extern int is_file_shm_hugepages(struct file *file); | 108 | extern int is_file_shm_hugepages(struct file *file); |
109 | extern void exit_shm(struct task_struct *task); | ||
109 | #else | 110 | #else |
110 | static inline long do_shmat(int shmid, char __user *shmaddr, | 111 | static inline long do_shmat(int shmid, char __user *shmaddr, |
111 | int shmflg, unsigned long *addr) | 112 | int shmflg, unsigned long *addr) |
@@ -116,6 +117,9 @@ static inline int is_file_shm_hugepages(struct file *file) | |||
116 | { | 117 | { |
117 | return 0; | 118 | return 0; |
118 | } | 119 | } |
120 | static inline void exit_shm(struct task_struct *task) | ||
121 | { | ||
122 | } | ||
119 | #endif | 123 | #endif |
120 | 124 | ||
121 | #endif /* __KERNEL__ */ | 125 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index a24218c9c84b..7b996ed86d5b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/time.h> | 20 | #include <linux/time.h> |
21 | #include <linux/cache.h> | 21 | #include <linux/cache.h> |
22 | 22 | ||
23 | #include <asm/atomic.h> | 23 | #include <linux/atomic.h> |
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | #include <linux/spinlock.h> | 25 | #include <linux/spinlock.h> |
26 | #include <linux/net.h> | 26 | #include <linux/net.h> |
diff --git a/include/linux/sonet.h b/include/linux/sonet.h index 67ad11fcf88b..de8832dd272b 100644 --- a/include/linux/sonet.h +++ b/include/linux/sonet.h | |||
@@ -58,7 +58,7 @@ struct sonet_stats { | |||
58 | 58 | ||
59 | #ifdef __KERNEL__ | 59 | #ifdef __KERNEL__ |
60 | 60 | ||
61 | #include <asm/atomic.h> | 61 | #include <linux/atomic.h> |
62 | 62 | ||
63 | struct k_sonet_stats { | 63 | struct k_sonet_stats { |
64 | #define __HANDLE_ITEM(i) atomic_t i | 64 | #define __HANDLE_ITEM(i) atomic_t i |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 0b22d51258e6..7df6c17b0281 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -384,7 +384,7 @@ static inline void assert_spin_locked(spinlock_t *lock) | |||
384 | * Pull the atomic_t declaration: | 384 | * Pull the atomic_t declaration: |
385 | * (asm-mips/atomic.h needs above definitions) | 385 | * (asm-mips/atomic.h needs above definitions) |
386 | */ | 386 | */ |
387 | #include <asm/atomic.h> | 387 | #include <linux/atomic.h> |
388 | /** | 388 | /** |
389 | * atomic_dec_and_lock - lock on reaching reference count zero | 389 | * atomic_dec_and_lock - lock on reaching reference count zero |
390 | * @atomic: the atomic counter | 390 | * @atomic: the atomic counter |
diff --git a/include/linux/splice.h b/include/linux/splice.h index 997c3b4c212b..26e5b613deda 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h | |||
@@ -88,5 +88,7 @@ extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, | |||
88 | extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *); | 88 | extern int splice_grow_spd(struct pipe_inode_info *, struct splice_pipe_desc *); |
89 | extern void splice_shrink_spd(struct pipe_inode_info *, | 89 | extern void splice_shrink_spd(struct pipe_inode_info *, |
90 | struct splice_pipe_desc *); | 90 | struct splice_pipe_desc *); |
91 | extern void spd_release_page(struct splice_pipe_desc *, unsigned int); | ||
91 | 92 | ||
93 | extern const struct pipe_buf_operations page_cache_pipe_buf_ops; | ||
92 | #endif | 94 | #endif |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 8521067ed4f7..febc4dbec2ca 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
16 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
17 | 17 | ||
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <linux/rcupdate.h> | 19 | #include <linux/rcupdate.h> |
20 | 20 | ||
21 | /* size of the nodename buffer */ | 21 | /* size of the nodename buffer */ |
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 8d2eef1a8582..5efd8cef389e 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <asm/atomic.h> | 18 | #include <linux/atomic.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | 20 | ||
21 | /* | 21 | /* |
@@ -256,13 +256,4 @@ static inline time_t get_expiry(char **bpp) | |||
256 | return rv - boot.tv_sec; | 256 | return rv - boot.tv_sec; |
257 | } | 257 | } |
258 | 258 | ||
259 | #ifdef CONFIG_NFSD_DEPRECATED | ||
260 | static inline void sunrpc_invalidate(struct cache_head *h, | ||
261 | struct cache_detail *detail) | ||
262 | { | ||
263 | h->expiry_time = seconds_since_boot() - 1; | ||
264 | detail->nextcheck = seconds_since_boot(); | ||
265 | } | ||
266 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
267 | |||
268 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ | 259 | #endif /* _LINUX_SUNRPC_CACHE_H_ */ |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index ea29330b78bd..2f1e5186e049 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -273,6 +273,7 @@ struct svc_rqst { | |||
273 | /* Catering to nfsd */ | 273 | /* Catering to nfsd */ |
274 | struct auth_domain * rq_client; /* RPC peer info */ | 274 | struct auth_domain * rq_client; /* RPC peer info */ |
275 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ | 275 | struct auth_domain * rq_gssclient; /* "gss/"-style peer info */ |
276 | int rq_cachetype; | ||
276 | struct svc_cacherep * rq_cacherep; /* cache info */ | 277 | struct svc_cacherep * rq_cacherep; /* cache info */ |
277 | int rq_splice_ok; /* turned off in gss privacy | 278 | int rq_splice_ok; /* turned off in gss privacy |
278 | * to prevent encrypting page | 279 | * to prevent encrypting page |
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h index a67fd734c73b..697d6e69d61f 100644 --- a/include/linux/sunrpc/timer.h +++ b/include/linux/sunrpc/timer.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef _LINUX_SUNRPC_TIMER_H | 9 | #ifndef _LINUX_SUNRPC_TIMER_H |
10 | #define _LINUX_SUNRPC_TIMER_H | 10 | #define _LINUX_SUNRPC_TIMER_H |
11 | 11 | ||
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | 13 | ||
14 | struct rpc_rtt { | 14 | struct rpc_rtt { |
15 | unsigned long timeo; /* default timeout value */ | 15 | unsigned long timeo; /* default timeout value */ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index e1e3742733be..6bbcef22e105 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -268,6 +268,14 @@ static inline int hibernate(void) { return -ENOSYS; } | |||
268 | static inline bool system_entering_hibernation(void) { return false; } | 268 | static inline bool system_entering_hibernation(void) { return false; } |
269 | #endif /* CONFIG_HIBERNATION */ | 269 | #endif /* CONFIG_HIBERNATION */ |
270 | 270 | ||
271 | /* Hibernation and suspend events */ | ||
272 | #define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ | ||
273 | #define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ | ||
274 | #define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ | ||
275 | #define PM_POST_SUSPEND 0x0004 /* Suspend finished */ | ||
276 | #define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ | ||
277 | #define PM_POST_RESTORE 0x0006 /* Restore failed */ | ||
278 | |||
271 | #ifdef CONFIG_PM_SLEEP | 279 | #ifdef CONFIG_PM_SLEEP |
272 | void save_processor_state(void); | 280 | void save_processor_state(void); |
273 | void restore_processor_state(void); | 281 | void restore_processor_state(void); |
diff --git a/include/linux/swap.h b/include/linux/swap.h index a273468f8285..14d62490922e 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <linux/sched.h> | 9 | #include <linux/sched.h> |
10 | #include <linux/node.h> | 10 | #include <linux/node.h> |
11 | 11 | ||
12 | #include <asm/atomic.h> | 12 | #include <linux/atomic.h> |
13 | #include <asm/page.h> | 13 | #include <asm/page.h> |
14 | 14 | ||
15 | struct notifier_block; | 15 | struct notifier_block; |
@@ -251,14 +251,6 @@ static inline void lru_cache_add_file(struct page *page) | |||
251 | /* linux/mm/vmscan.c */ | 251 | /* linux/mm/vmscan.c */ |
252 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | 252 | extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, |
253 | gfp_t gfp_mask, nodemask_t *mask); | 253 | gfp_t gfp_mask, nodemask_t *mask); |
254 | extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem, | ||
255 | gfp_t gfp_mask, bool noswap, | ||
256 | unsigned int swappiness); | ||
257 | extern unsigned long mem_cgroup_shrink_node_zone(struct mem_cgroup *mem, | ||
258 | gfp_t gfp_mask, bool noswap, | ||
259 | unsigned int swappiness, | ||
260 | struct zone *zone, | ||
261 | unsigned long *nr_scanned); | ||
262 | extern int __isolate_lru_page(struct page *page, int mode, int file); | 254 | extern int __isolate_lru_page(struct page *page, int mode, int file); |
263 | extern unsigned long shrink_all_memory(unsigned long nr_pages); | 255 | extern unsigned long shrink_all_memory(unsigned long nr_pages); |
264 | extern int vm_swappiness; | 256 | extern int vm_swappiness; |
@@ -299,7 +291,14 @@ static inline void scan_unevictable_unregister_node(struct node *node) | |||
299 | 291 | ||
300 | extern int kswapd_run(int nid); | 292 | extern int kswapd_run(int nid); |
301 | extern void kswapd_stop(int nid); | 293 | extern void kswapd_stop(int nid); |
302 | 294 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | |
295 | extern int mem_cgroup_swappiness(struct mem_cgroup *mem); | ||
296 | #else | ||
297 | static inline int mem_cgroup_swappiness(struct mem_cgroup *mem) | ||
298 | { | ||
299 | return vm_swappiness; | ||
300 | } | ||
301 | #endif | ||
303 | #ifdef CONFIG_SWAP | 302 | #ifdef CONFIG_SWAP |
304 | /* linux/mm/page_io.c */ | 303 | /* linux/mm/page_io.c */ |
305 | extern int swap_readpage(struct page *); | 304 | extern int swap_readpage(struct page *); |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e2696d76a599..d7d2f2158142 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/lockdep.h> | 18 | #include <linux/lockdep.h> |
19 | #include <linux/kobject_ns.h> | 19 | #include <linux/kobject_ns.h> |
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | 21 | ||
22 | struct kobject; | 22 | struct kobject; |
23 | struct module; | 23 | struct module; |
diff --git a/include/linux/tty.h b/include/linux/tty.h index d6f05292e456..44bc0c5617e1 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -5,24 +5,6 @@ | |||
5 | * 'tty.h' defines some structures used by tty_io.c and some defines. | 5 | * 'tty.h' defines some structures used by tty_io.c and some defines. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifdef __KERNEL__ | ||
9 | #include <linux/fs.h> | ||
10 | #include <linux/major.h> | ||
11 | #include <linux/termios.h> | ||
12 | #include <linux/workqueue.h> | ||
13 | #include <linux/tty_driver.h> | ||
14 | #include <linux/tty_ldisc.h> | ||
15 | #include <linux/mutex.h> | ||
16 | |||
17 | #include <asm/system.h> | ||
18 | |||
19 | |||
20 | /* | ||
21 | * (Note: the *_driver.minor_start values 1, 64, 128, 192 are | ||
22 | * hardcoded at present.) | ||
23 | */ | ||
24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | ||
25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | ||
26 | #define NR_LDISCS 30 | 8 | #define NR_LDISCS 30 |
27 | 9 | ||
28 | /* line disciplines */ | 10 | /* line disciplines */ |
@@ -53,6 +35,25 @@ | |||
53 | #define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */ | 35 | #define N_TRACESINK 23 /* Trace data routing for MIPI P1149.7 */ |
54 | #define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */ | 36 | #define N_TRACEROUTER 24 /* Trace data routing for MIPI P1149.7 */ |
55 | 37 | ||
38 | #ifdef __KERNEL__ | ||
39 | #include <linux/fs.h> | ||
40 | #include <linux/major.h> | ||
41 | #include <linux/termios.h> | ||
42 | #include <linux/workqueue.h> | ||
43 | #include <linux/tty_driver.h> | ||
44 | #include <linux/tty_ldisc.h> | ||
45 | #include <linux/mutex.h> | ||
46 | |||
47 | #include <asm/system.h> | ||
48 | |||
49 | |||
50 | /* | ||
51 | * (Note: the *_driver.minor_start values 1, 64, 128, 192 are | ||
52 | * hardcoded at present.) | ||
53 | */ | ||
54 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | ||
55 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | ||
56 | |||
56 | /* | 57 | /* |
57 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 58 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
58 | * a c_cc[] character, but indicates that a particular special character | 59 | * a c_cc[] character, but indicates that a particular special character |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index b78cba466d3d..a316fba73518 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -59,6 +59,10 @@ struct usb_configuration; | |||
59 | * @hs_descriptors: Table of high speed descriptors, using interface and | 59 | * @hs_descriptors: Table of high speed descriptors, using interface and |
60 | * string identifiers assigned during @bind(). If this pointer is null, | 60 | * string identifiers assigned during @bind(). If this pointer is null, |
61 | * the function will not be available at high speed. | 61 | * the function will not be available at high speed. |
62 | * @ss_descriptors: Table of super speed descriptors, using interface and | ||
63 | * string identifiers assigned during @bind(). If this | ||
64 | * pointer is null after initiation, the function will not | ||
65 | * be available at super speed. | ||
62 | * @config: assigned when @usb_add_function() is called; this is the | 66 | * @config: assigned when @usb_add_function() is called; this is the |
63 | * configuration with which this function is associated. | 67 | * configuration with which this function is associated. |
64 | * @bind: Before the gadget can register, all of its functions bind() to the | 68 | * @bind: Before the gadget can register, all of its functions bind() to the |
@@ -77,6 +81,10 @@ struct usb_configuration; | |||
77 | * @setup: Used for interface-specific control requests. | 81 | * @setup: Used for interface-specific control requests. |
78 | * @suspend: Notifies functions when the host stops sending USB traffic. | 82 | * @suspend: Notifies functions when the host stops sending USB traffic. |
79 | * @resume: Notifies functions when the host restarts USB traffic. | 83 | * @resume: Notifies functions when the host restarts USB traffic. |
84 | * @get_status: Returns function status as a reply to | ||
85 | * GetStatus() request when the recepient is Interface. | ||
86 | * @func_suspend: callback to be called when | ||
87 | * SetFeature(FUNCTION_SUSPEND) is reseived | ||
80 | * | 88 | * |
81 | * A single USB function uses one or more interfaces, and should in most | 89 | * A single USB function uses one or more interfaces, and should in most |
82 | * cases support operation at both full and high speeds. Each function is | 90 | * cases support operation at both full and high speeds. Each function is |
@@ -106,6 +114,7 @@ struct usb_function { | |||
106 | struct usb_gadget_strings **strings; | 114 | struct usb_gadget_strings **strings; |
107 | struct usb_descriptor_header **descriptors; | 115 | struct usb_descriptor_header **descriptors; |
108 | struct usb_descriptor_header **hs_descriptors; | 116 | struct usb_descriptor_header **hs_descriptors; |
117 | struct usb_descriptor_header **ss_descriptors; | ||
109 | 118 | ||
110 | struct usb_configuration *config; | 119 | struct usb_configuration *config; |
111 | 120 | ||
@@ -132,6 +141,10 @@ struct usb_function { | |||
132 | void (*suspend)(struct usb_function *); | 141 | void (*suspend)(struct usb_function *); |
133 | void (*resume)(struct usb_function *); | 142 | void (*resume)(struct usb_function *); |
134 | 143 | ||
144 | /* USB 3.0 additions */ | ||
145 | int (*get_status)(struct usb_function *); | ||
146 | int (*func_suspend)(struct usb_function *, | ||
147 | u8 suspend_opt); | ||
135 | /* private: */ | 148 | /* private: */ |
136 | /* internals */ | 149 | /* internals */ |
137 | struct list_head list; | 150 | struct list_head list; |
@@ -145,20 +158,8 @@ int usb_function_activate(struct usb_function *); | |||
145 | 158 | ||
146 | int usb_interface_id(struct usb_configuration *, struct usb_function *); | 159 | int usb_interface_id(struct usb_configuration *, struct usb_function *); |
147 | 160 | ||
148 | /** | 161 | int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f, |
149 | * ep_choose - select descriptor endpoint at current device speed | 162 | struct usb_ep *_ep); |
150 | * @g: gadget, connected and running at some speed | ||
151 | * @hs: descriptor to use for high speed operation | ||
152 | * @fs: descriptor to use for full or low speed operation | ||
153 | */ | ||
154 | static inline struct usb_endpoint_descriptor * | ||
155 | ep_choose(struct usb_gadget *g, struct usb_endpoint_descriptor *hs, | ||
156 | struct usb_endpoint_descriptor *fs) | ||
157 | { | ||
158 | if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH) | ||
159 | return hs; | ||
160 | return fs; | ||
161 | } | ||
162 | 163 | ||
163 | #define MAX_CONFIG_INTERFACES 16 /* arbitrary; max 255 */ | 164 | #define MAX_CONFIG_INTERFACES 16 /* arbitrary; max 255 */ |
164 | 165 | ||
@@ -231,6 +232,7 @@ struct usb_configuration { | |||
231 | struct list_head list; | 232 | struct list_head list; |
232 | struct list_head functions; | 233 | struct list_head functions; |
233 | u8 next_interface_id; | 234 | u8 next_interface_id; |
235 | unsigned superspeed:1; | ||
234 | unsigned highspeed:1; | 236 | unsigned highspeed:1; |
235 | unsigned fullspeed:1; | 237 | unsigned fullspeed:1; |
236 | struct usb_function *interface[MAX_CONFIG_INTERFACES]; | 238 | struct usb_function *interface[MAX_CONFIG_INTERFACES]; |
@@ -252,6 +254,7 @@ int usb_add_config(struct usb_composite_dev *, | |||
252 | * identifiers. | 254 | * identifiers. |
253 | * @strings: tables of strings, keyed by identifiers assigned during bind() | 255 | * @strings: tables of strings, keyed by identifiers assigned during bind() |
254 | * and language IDs provided in control requests | 256 | * and language IDs provided in control requests |
257 | * @max_speed: Highest speed the driver supports. | ||
255 | * @needs_serial: set to 1 if the gadget needs userspace to provide | 258 | * @needs_serial: set to 1 if the gadget needs userspace to provide |
256 | * a serial number. If one is not provided, warning will be printed. | 259 | * a serial number. If one is not provided, warning will be printed. |
257 | * @unbind: Reverses bind; called as a side effect of unregistering | 260 | * @unbind: Reverses bind; called as a side effect of unregistering |
@@ -279,6 +282,7 @@ struct usb_composite_driver { | |||
279 | const char *iManufacturer; | 282 | const char *iManufacturer; |
280 | const struct usb_device_descriptor *dev; | 283 | const struct usb_device_descriptor *dev; |
281 | struct usb_gadget_strings **strings; | 284 | struct usb_gadget_strings **strings; |
285 | enum usb_device_speed max_speed; | ||
282 | unsigned needs_serial:1; | 286 | unsigned needs_serial:1; |
283 | 287 | ||
284 | int (*unbind)(struct usb_composite_dev *); | 288 | int (*unbind)(struct usb_composite_dev *); |
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index dd1571db55e7..087f4b931833 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -15,7 +15,13 @@ | |||
15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
17 | 17 | ||
18 | #include <linux/device.h> | ||
19 | #include <linux/errno.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/list.h> | ||
18 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/types.h> | ||
24 | #include <linux/usb/ch9.h> | ||
19 | 25 | ||
20 | struct usb_ep; | 26 | struct usb_ep; |
21 | 27 | ||
@@ -27,6 +33,7 @@ struct usb_ep; | |||
27 | * field, and the usb controller needs one, it is responsible | 33 | * field, and the usb controller needs one, it is responsible |
28 | * for mapping and unmapping the buffer. | 34 | * for mapping and unmapping the buffer. |
29 | * @length: Length of that data | 35 | * @length: Length of that data |
36 | * @stream_id: The stream id, when USB3.0 bulk streams are being used | ||
30 | * @no_interrupt: If true, hints that no completion irq is needed. | 37 | * @no_interrupt: If true, hints that no completion irq is needed. |
31 | * Helpful sometimes with deep request queues that are handled | 38 | * Helpful sometimes with deep request queues that are handled |
32 | * directly by DMA controllers. | 39 | * directly by DMA controllers. |
@@ -81,6 +88,7 @@ struct usb_request { | |||
81 | unsigned length; | 88 | unsigned length; |
82 | dma_addr_t dma; | 89 | dma_addr_t dma; |
83 | 90 | ||
91 | unsigned stream_id:16; | ||
84 | unsigned no_interrupt:1; | 92 | unsigned no_interrupt:1; |
85 | unsigned zero:1; | 93 | unsigned zero:1; |
86 | unsigned short_not_ok:1; | 94 | unsigned short_not_ok:1; |
@@ -131,8 +139,17 @@ struct usb_ep_ops { | |||
131 | * @maxpacket:The maximum packet size used on this endpoint. The initial | 139 | * @maxpacket:The maximum packet size used on this endpoint. The initial |
132 | * value can sometimes be reduced (hardware allowing), according to | 140 | * value can sometimes be reduced (hardware allowing), according to |
133 | * the endpoint descriptor used to configure the endpoint. | 141 | * the endpoint descriptor used to configure the endpoint. |
134 | * @driver_data:for use by the gadget driver. all other fields are | 142 | * @max_streams: The maximum number of streams supported |
135 | * read-only to gadget drivers. | 143 | * by this EP (0 - 16, actual number is 2^n) |
144 | * @mult: multiplier, 'mult' value for SS Isoc EPs | ||
145 | * @maxburst: the maximum number of bursts supported by this EP (for usb3) | ||
146 | * @driver_data:for use by the gadget driver. | ||
147 | * @address: used to identify the endpoint when finding descriptor that | ||
148 | * matches connection speed | ||
149 | * @desc: endpoint descriptor. This pointer is set before the endpoint is | ||
150 | * enabled and remains valid until the endpoint is disabled. | ||
151 | * @comp_desc: In case of SuperSpeed support, this is the endpoint companion | ||
152 | * descriptor that is used to configure the endpoint | ||
136 | * | 153 | * |
137 | * the bus controller driver lists all the general purpose endpoints in | 154 | * the bus controller driver lists all the general purpose endpoints in |
138 | * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, | 155 | * gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, |
@@ -145,6 +162,12 @@ struct usb_ep { | |||
145 | const struct usb_ep_ops *ops; | 162 | const struct usb_ep_ops *ops; |
146 | struct list_head ep_list; | 163 | struct list_head ep_list; |
147 | unsigned maxpacket:16; | 164 | unsigned maxpacket:16; |
165 | unsigned max_streams:16; | ||
166 | unsigned mult:2; | ||
167 | unsigned maxburst:4; | ||
168 | u8 address; | ||
169 | const struct usb_endpoint_descriptor *desc; | ||
170 | const struct usb_ss_ep_comp_descriptor *comp_desc; | ||
148 | }; | 171 | }; |
149 | 172 | ||
150 | /*-------------------------------------------------------------------------*/ | 173 | /*-------------------------------------------------------------------------*/ |
@@ -153,11 +176,8 @@ struct usb_ep { | |||
153 | * usb_ep_enable - configure endpoint, making it usable | 176 | * usb_ep_enable - configure endpoint, making it usable |
154 | * @ep:the endpoint being configured. may not be the endpoint named "ep0". | 177 | * @ep:the endpoint being configured. may not be the endpoint named "ep0". |
155 | * drivers discover endpoints through the ep_list of a usb_gadget. | 178 | * drivers discover endpoints through the ep_list of a usb_gadget. |
156 | * @desc:descriptor for desired behavior. caller guarantees this pointer | ||
157 | * remains valid until the endpoint is disabled; the data byte order | ||
158 | * is little-endian (usb-standard). | ||
159 | * | 179 | * |
160 | * when configurations are set, or when interface settings change, the driver | 180 | * When configurations are set, or when interface settings change, the driver |
161 | * will enable or disable the relevant endpoints. while it is enabled, an | 181 | * will enable or disable the relevant endpoints. while it is enabled, an |
162 | * endpoint may be used for i/o until the driver receives a disconnect() from | 182 | * endpoint may be used for i/o until the driver receives a disconnect() from |
163 | * the host or until the endpoint is disabled. | 183 | * the host or until the endpoint is disabled. |
@@ -172,10 +192,9 @@ struct usb_ep { | |||
172 | * | 192 | * |
173 | * returns zero, or a negative error code. | 193 | * returns zero, or a negative error code. |
174 | */ | 194 | */ |
175 | static inline int usb_ep_enable(struct usb_ep *ep, | 195 | static inline int usb_ep_enable(struct usb_ep *ep) |
176 | const struct usb_endpoint_descriptor *desc) | ||
177 | { | 196 | { |
178 | return ep->ops->enable(ep, desc); | 197 | return ep->ops->enable(ep, ep->desc); |
179 | } | 198 | } |
180 | 199 | ||
181 | /** | 200 | /** |
@@ -416,7 +435,16 @@ static inline void usb_ep_fifo_flush(struct usb_ep *ep) | |||
416 | 435 | ||
417 | /*-------------------------------------------------------------------------*/ | 436 | /*-------------------------------------------------------------------------*/ |
418 | 437 | ||
438 | struct usb_dcd_config_params { | ||
439 | __u8 bU1devExitLat; /* U1 Device exit Latency */ | ||
440 | #define USB_DEFULT_U1_DEV_EXIT_LAT 0x01 /* Less then 1 microsec */ | ||
441 | __le16 bU2DevExitLat; /* U2 Device exit Latency */ | ||
442 | #define USB_DEFULT_U2_DEV_EXIT_LAT 0x1F4 /* Less then 500 microsec */ | ||
443 | }; | ||
444 | |||
445 | |||
419 | struct usb_gadget; | 446 | struct usb_gadget; |
447 | struct usb_gadget_driver; | ||
420 | 448 | ||
421 | /* the rest of the api to the controller hardware: device operations, | 449 | /* the rest of the api to the controller hardware: device operations, |
422 | * which don't involve endpoints (or i/o). | 450 | * which don't involve endpoints (or i/o). |
@@ -430,6 +458,16 @@ struct usb_gadget_ops { | |||
430 | int (*pullup) (struct usb_gadget *, int is_on); | 458 | int (*pullup) (struct usb_gadget *, int is_on); |
431 | int (*ioctl)(struct usb_gadget *, | 459 | int (*ioctl)(struct usb_gadget *, |
432 | unsigned code, unsigned long param); | 460 | unsigned code, unsigned long param); |
461 | void (*get_config_params)(struct usb_dcd_config_params *); | ||
462 | int (*udc_start)(struct usb_gadget *, | ||
463 | struct usb_gadget_driver *); | ||
464 | int (*udc_stop)(struct usb_gadget *, | ||
465 | struct usb_gadget_driver *); | ||
466 | |||
467 | /* Those two are deprecated */ | ||
468 | int (*start)(struct usb_gadget_driver *, | ||
469 | int (*bind)(struct usb_gadget *)); | ||
470 | int (*stop)(struct usb_gadget_driver *); | ||
433 | }; | 471 | }; |
434 | 472 | ||
435 | /** | 473 | /** |
@@ -521,6 +559,24 @@ static inline int gadget_is_dualspeed(struct usb_gadget *g) | |||
521 | } | 559 | } |
522 | 560 | ||
523 | /** | 561 | /** |
562 | * gadget_is_superspeed() - return true if the hardware handles | ||
563 | * supperspeed | ||
564 | * @g: controller that might support supper speed | ||
565 | */ | ||
566 | static inline int gadget_is_superspeed(struct usb_gadget *g) | ||
567 | { | ||
568 | #ifdef CONFIG_USB_GADGET_SUPERSPEED | ||
569 | /* | ||
570 | * runtime test would check "g->is_superspeed" ... that might be | ||
571 | * useful to work around hardware bugs, but is mostly pointless | ||
572 | */ | ||
573 | return 1; | ||
574 | #else | ||
575 | return 0; | ||
576 | #endif | ||
577 | } | ||
578 | |||
579 | /** | ||
524 | * gadget_is_otg - return true iff the hardware is OTG-ready | 580 | * gadget_is_otg - return true iff the hardware is OTG-ready |
525 | * @g: controller that might have a Mini-AB connector | 581 | * @g: controller that might have a Mini-AB connector |
526 | * | 582 | * |
@@ -821,6 +877,9 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, | |||
821 | */ | 877 | */ |
822 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 878 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
823 | 879 | ||
880 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); | ||
881 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); | ||
882 | |||
824 | /*-------------------------------------------------------------------------*/ | 883 | /*-------------------------------------------------------------------------*/ |
825 | 884 | ||
826 | /* utility to simplify dealing with string descriptors */ | 885 | /* utility to simplify dealing with string descriptors */ |
@@ -870,12 +929,6 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config, | |||
870 | struct usb_descriptor_header **usb_copy_descriptors( | 929 | struct usb_descriptor_header **usb_copy_descriptors( |
871 | struct usb_descriptor_header **); | 930 | struct usb_descriptor_header **); |
872 | 931 | ||
873 | /* return copy of endpoint descriptor given original descriptor set */ | ||
874 | struct usb_endpoint_descriptor *usb_find_endpoint( | ||
875 | struct usb_descriptor_header **src, | ||
876 | struct usb_descriptor_header **copy, | ||
877 | struct usb_endpoint_descriptor *match); | ||
878 | |||
879 | /** | 932 | /** |
880 | * usb_free_descriptors - free descriptors returned by usb_copy_descriptors() | 933 | * usb_free_descriptors - free descriptors returned by usb_copy_descriptors() |
881 | * @v: vector of descriptors | 934 | * @v: vector of descriptors |
@@ -892,6 +945,11 @@ static inline void usb_free_descriptors(struct usb_descriptor_header **v) | |||
892 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 945 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
893 | struct usb_endpoint_descriptor *); | 946 | struct usb_endpoint_descriptor *); |
894 | 947 | ||
948 | |||
949 | extern struct usb_ep *usb_ep_autoconfig_ss(struct usb_gadget *, | ||
950 | struct usb_endpoint_descriptor *, | ||
951 | struct usb_ss_ep_comp_descriptor *); | ||
952 | |||
895 | extern void usb_ep_autoconfig_reset(struct usb_gadget *); | 953 | extern void usb_ep_autoconfig_reset(struct usb_gadget *); |
896 | 954 | ||
897 | #endif /* __LINUX_USB_GADGET_H */ | 955 | #endif /* __LINUX_USB_GADGET_H */ |
diff --git a/include/linux/usb/m66592.h b/include/linux/usb/m66592.h index cda9625e7df0..a4ba31ab2fed 100644 --- a/include/linux/usb/m66592.h +++ b/include/linux/usb/m66592.h | |||
@@ -38,6 +38,8 @@ struct m66592_platdata { | |||
38 | /* (external controller only) one = 3.3V, zero = 1.5V */ | 38 | /* (external controller only) one = 3.3V, zero = 1.5V */ |
39 | unsigned vif:1; | 39 | unsigned vif:1; |
40 | 40 | ||
41 | /* (external controller only) set one = WR0_N shorted to WR1_N */ | ||
42 | unsigned wr0_shorted_to_wr1:1; | ||
41 | }; | 43 | }; |
42 | 44 | ||
43 | #endif /* __LINUX_USB_M66592_H */ | 45 | #endif /* __LINUX_USB_M66592_H */ |
diff --git a/include/linux/usb/r8a66597.h b/include/linux/usb/r8a66597.h index 26d216734057..b6b8660d0c68 100644 --- a/include/linux/usb/r8a66597.h +++ b/include/linux/usb/r8a66597.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2009 Renesas Solutions Corp. | 4 | * Copyright (C) 2009 Renesas Solutions Corp. |
5 | * | 5 | * |
6 | * Author : Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> | 6 | * Author : Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -31,6 +31,9 @@ struct r8a66597_platdata { | |||
31 | /* This callback can control port power instead of DVSTCTR register. */ | 31 | /* This callback can control port power instead of DVSTCTR register. */ |
32 | void (*port_power)(int port, int power); | 32 | void (*port_power)(int port, int power); |
33 | 33 | ||
34 | /* This parameter is for BUSWAIT */ | ||
35 | u16 buswait; | ||
36 | |||
34 | /* set one = on chip controller, set zero = external controller */ | 37 | /* set one = on chip controller, set zero = external controller */ |
35 | unsigned on_chip:1; | 38 | unsigned on_chip:1; |
36 | 39 | ||
@@ -42,6 +45,9 @@ struct r8a66597_platdata { | |||
42 | 45 | ||
43 | /* set one = big endian, set zero = little endian */ | 46 | /* set one = big endian, set zero = little endian */ |
44 | unsigned endian:1; | 47 | unsigned endian:1; |
48 | |||
49 | /* (external controller only) set one = WR0_N shorted to WR1_N */ | ||
50 | unsigned wr0_shorted_to_wr1:1; | ||
45 | }; | 51 | }; |
46 | 52 | ||
47 | /* Register definitions */ | 53 | /* Register definitions */ |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index 3a7f1d982dd6..8977431259c6 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
@@ -110,6 +110,23 @@ struct renesas_usbhs_driver_param { | |||
110 | * delay time from notify_hotplug callback | 110 | * delay time from notify_hotplug callback |
111 | */ | 111 | */ |
112 | int detection_delay; | 112 | int detection_delay; |
113 | |||
114 | /* | ||
115 | * option: | ||
116 | * | ||
117 | * dma id for dmaengine | ||
118 | */ | ||
119 | int d0_tx_id; | ||
120 | int d0_rx_id; | ||
121 | int d1_tx_id; | ||
122 | int d1_rx_id; | ||
123 | |||
124 | /* | ||
125 | * option: | ||
126 | * | ||
127 | * pio <--> dma border. | ||
128 | */ | ||
129 | int pio_dma_border; /* default is 64byte */ | ||
113 | }; | 130 | }; |
114 | 131 | ||
115 | /* | 132 | /* |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index bcd942fa611c..65efb92da996 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/mm.h> | 6 | #include <linux/mm.h> |
7 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
8 | #include <linux/vm_event_item.h> | 8 | #include <linux/vm_event_item.h> |
9 | #include <asm/atomic.h> | 9 | #include <linux/atomic.h> |
10 | 10 | ||
11 | extern int sysctl_stat_interval; | 11 | extern int sysctl_stat_interval; |
12 | 12 | ||
diff --git a/include/linux/vt.h b/include/linux/vt.h index d5dd0bc408fd..30a8dd9c83ff 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -86,6 +86,13 @@ struct vt_setactivate { | |||
86 | 86 | ||
87 | #ifdef __KERNEL__ | 87 | #ifdef __KERNEL__ |
88 | 88 | ||
89 | /* Virtual Terminal events. */ | ||
90 | #define VT_ALLOCATE 0x0001 /* Console got allocated */ | ||
91 | #define VT_DEALLOCATE 0x0002 /* Console will be deallocated */ | ||
92 | #define VT_WRITE 0x0003 /* A char got output */ | ||
93 | #define VT_UPDATE 0x0004 /* A bigger update occurred */ | ||
94 | #define VT_PREWRITE 0x0005 /* A char is about to be written to the console */ | ||
95 | |||
89 | #ifdef CONFIG_VT_CONSOLE | 96 | #ifdef CONFIG_VT_CONSOLE |
90 | 97 | ||
91 | extern int vt_kmsg_redirect(int new); | 98 | extern int vt_kmsg_redirect(int new); |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 4d05e14ea60c..c2164fad0083 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -137,7 +137,7 @@ int vty_init(const struct file_operations *console_fops); | |||
137 | 137 | ||
138 | static inline bool vt_force_oops_output(struct vc_data *vc) | 138 | static inline bool vt_force_oops_output(struct vc_data *vc) |
139 | { | 139 | { |
140 | if (oops_in_progress && vc->vc_panic_force_write) | 140 | if (oops_in_progress && vc->vc_panic_force_write && panic_timeout >= 0) |
141 | return true; | 141 | return true; |
142 | return false; | 142 | return false; |
143 | } | 143 | } |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 2be2887c6958..0d556deb497b 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/lockdep.h> | 11 | #include <linux/lockdep.h> |
12 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
13 | #include <asm/atomic.h> | 13 | #include <linux/atomic.h> |
14 | 14 | ||
15 | struct workqueue_struct; | 15 | struct workqueue_struct; |
16 | 16 | ||
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 17e7ccc322a5..f1bfa12ea246 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -7,9 +7,39 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | 9 | ||
10 | struct backing_dev_info; | 10 | /* |
11 | * The 1/4 region under the global dirty thresh is for smooth dirty throttling: | ||
12 | * | ||
13 | * (thresh - thresh/DIRTY_FULL_SCOPE, thresh) | ||
14 | * | ||
15 | * The 1/16 region above the global dirty limit will be put to maximum pauses: | ||
16 | * | ||
17 | * (limit, limit + limit/DIRTY_MAXPAUSE_AREA) | ||
18 | * | ||
19 | * The 1/16 region above the max-pause region, dirty exceeded bdi's will be put | ||
20 | * to loops: | ||
21 | * | ||
22 | * (limit + limit/DIRTY_MAXPAUSE_AREA, limit + limit/DIRTY_PASSGOOD_AREA) | ||
23 | * | ||
24 | * Further beyond, all dirtier tasks will enter a loop waiting (possibly long | ||
25 | * time) for the dirty pages to drop, unless written enough pages. | ||
26 | * | ||
27 | * The global dirty threshold is normally equal to the global dirty limit, | ||
28 | * except when the system suddenly allocates a lot of anonymous memory and | ||
29 | * knocks down the global dirty threshold quickly, in which case the global | ||
30 | * dirty limit will follow down slowly to prevent livelocking all dirtier tasks. | ||
31 | */ | ||
32 | #define DIRTY_SCOPE 8 | ||
33 | #define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2) | ||
34 | #define DIRTY_MAXPAUSE_AREA 16 | ||
35 | #define DIRTY_PASSGOOD_AREA 8 | ||
11 | 36 | ||
12 | extern spinlock_t inode_wb_list_lock; | 37 | /* |
38 | * 4MB minimal write chunk size | ||
39 | */ | ||
40 | #define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_CACHE_SHIFT - 10)) | ||
41 | |||
42 | struct backing_dev_info; | ||
13 | 43 | ||
14 | /* | 44 | /* |
15 | * fs/fs-writeback.c | 45 | * fs/fs-writeback.c |
@@ -26,11 +56,6 @@ enum writeback_sync_modes { | |||
26 | */ | 56 | */ |
27 | struct writeback_control { | 57 | struct writeback_control { |
28 | enum writeback_sync_modes sync_mode; | 58 | enum writeback_sync_modes sync_mode; |
29 | unsigned long *older_than_this; /* If !NULL, only write back inodes | ||
30 | older than this */ | ||
31 | unsigned long wb_start; /* Time writeback_inodes_wb was | ||
32 | called. This is needed to avoid | ||
33 | extra jobs and livelock */ | ||
34 | long nr_to_write; /* Write this many pages, and decrement | 59 | long nr_to_write; /* Write this many pages, and decrement |
35 | this for each page written */ | 60 | this for each page written */ |
36 | long pages_skipped; /* Pages which were not written */ | 61 | long pages_skipped; /* Pages which were not written */ |
@@ -43,13 +68,11 @@ struct writeback_control { | |||
43 | loff_t range_start; | 68 | loff_t range_start; |
44 | loff_t range_end; | 69 | loff_t range_end; |
45 | 70 | ||
46 | unsigned nonblocking:1; /* Don't get stuck on request queues */ | ||
47 | unsigned encountered_congestion:1; /* An output: a queue is full */ | ||
48 | unsigned for_kupdate:1; /* A kupdate writeback */ | 71 | unsigned for_kupdate:1; /* A kupdate writeback */ |
49 | unsigned for_background:1; /* A background writeback */ | 72 | unsigned for_background:1; /* A background writeback */ |
73 | unsigned tagged_writepages:1; /* tag-and-write to avoid livelock */ | ||
50 | unsigned for_reclaim:1; /* Invoked from the page allocator */ | 74 | unsigned for_reclaim:1; /* Invoked from the page allocator */ |
51 | unsigned range_cyclic:1; /* range_start is cyclic */ | 75 | unsigned range_cyclic:1; /* range_start is cyclic */ |
52 | unsigned more_io:1; /* more io to be dispatched */ | ||
53 | }; | 76 | }; |
54 | 77 | ||
55 | /* | 78 | /* |
@@ -62,8 +85,7 @@ void writeback_inodes_sb_nr(struct super_block *, unsigned long nr); | |||
62 | int writeback_inodes_sb_if_idle(struct super_block *); | 85 | int writeback_inodes_sb_if_idle(struct super_block *); |
63 | int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr); | 86 | int writeback_inodes_sb_nr_if_idle(struct super_block *, unsigned long nr); |
64 | void sync_inodes_sb(struct super_block *); | 87 | void sync_inodes_sb(struct super_block *); |
65 | void writeback_inodes_wb(struct bdi_writeback *wb, | 88 | long writeback_inodes_wb(struct bdi_writeback *wb, long nr_pages); |
66 | struct writeback_control *wbc); | ||
67 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 89 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
68 | void wakeup_flusher_threads(long nr_pages); | 90 | void wakeup_flusher_threads(long nr_pages); |
69 | 91 | ||
@@ -94,6 +116,8 @@ static inline void laptop_sync_completion(void) { } | |||
94 | #endif | 116 | #endif |
95 | void throttle_vm_writeout(gfp_t gfp_mask); | 117 | void throttle_vm_writeout(gfp_t gfp_mask); |
96 | 118 | ||
119 | extern unsigned long global_dirty_limit; | ||
120 | |||
97 | /* These are exported to sysctl. */ | 121 | /* These are exported to sysctl. */ |
98 | extern int dirty_background_ratio; | 122 | extern int dirty_background_ratio; |
99 | extern unsigned long dirty_background_bytes; | 123 | extern unsigned long dirty_background_bytes; |
@@ -128,6 +152,13 @@ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty); | |||
128 | unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, | 152 | unsigned long bdi_dirty_limit(struct backing_dev_info *bdi, |
129 | unsigned long dirty); | 153 | unsigned long dirty); |
130 | 154 | ||
155 | void __bdi_update_bandwidth(struct backing_dev_info *bdi, | ||
156 | unsigned long thresh, | ||
157 | unsigned long dirty, | ||
158 | unsigned long bdi_thresh, | ||
159 | unsigned long bdi_dirty, | ||
160 | unsigned long start_time); | ||
161 | |||
131 | void page_writeback_init(void); | 162 | void page_writeback_init(void); |
132 | void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, | 163 | void balance_dirty_pages_ratelimited_nr(struct address_space *mapping, |
133 | unsigned long nr_pages_dirtied); | 164 | unsigned long nr_pages_dirtied); |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 206d22297ac3..94e09d361bb1 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/timer.h> | 11 | #include <linux/timer.h> |
12 | #include <linux/list.h> | 12 | #include <linux/list.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <asm/atomic.h> | 14 | #include <linux/atomic.h> |
15 | 15 | ||
16 | #define AX25_T1CLAMPLO 1 | 16 | #define AX25_T1CLAMPLO 1 |
17 | #define AX25_T1CLAMPHI (30 * HZ) | 17 | #define AX25_T1CLAMPHI (30 * HZ) |
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h index abd443604c9f..3b938743514b 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #include <linux/skbuff.h> | 41 | #include <linux/skbuff.h> |
42 | #include <net/netlabel.h> | 42 | #include <net/netlabel.h> |
43 | #include <net/request_sock.h> | 43 | #include <net/request_sock.h> |
44 | #include <asm/atomic.h> | 44 | #include <linux/atomic.h> |
45 | 45 | ||
46 | /* known doi values */ | 46 | /* known doi values */ |
47 | #define CIPSO_V4_DOI_UNKNOWN 0x00000000 | 47 | #define CIPSO_V4_DOI_UNKNOWN 0x00000000 |
diff --git a/include/net/flow.h b/include/net/flow.h index c6d5fe5ec1bf..78113daadd63 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #define _NET_FLOW_H | 8 | #define _NET_FLOW_H |
9 | 9 | ||
10 | #include <linux/in6.h> | 10 | #include <linux/in6.h> |
11 | #include <asm/atomic.h> | 11 | #include <linux/atomic.h> |
12 | 12 | ||
13 | struct flowi_common { | 13 | struct flowi_common { |
14 | int flowic_oif; | 14 | int flowic_oif; |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index e9c2ed8af864..808fc5f76b03 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <net/tcp_states.h> | 33 | #include <net/tcp_states.h> |
34 | #include <net/netns/hash.h> | 34 | #include <net/netns/hash.h> |
35 | 35 | ||
36 | #include <asm/atomic.h> | 36 | #include <linux/atomic.h> |
37 | #include <asm/byteorder.h> | 37 | #include <asm/byteorder.h> |
38 | 38 | ||
39 | /* This is for all connections with a full identity, no wildcards. | 39 | /* This is for all connections with a full identity, no wildcards. |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 17404b5388a7..f1a770977c4f 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <net/tcp_states.h> | 28 | #include <net/tcp_states.h> |
29 | #include <net/timewait_sock.h> | 29 | #include <net/timewait_sock.h> |
30 | 30 | ||
31 | #include <asm/atomic.h> | 31 | #include <linux/atomic.h> |
32 | 32 | ||
33 | struct inet_hashinfo; | 33 | struct inet_hashinfo; |
34 | 34 | ||
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h index 4233e6f9841d..78c83e62218f 100644 --- a/include/net/inetpeer.h +++ b/include/net/inetpeer.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/rtnetlink.h> | 14 | #include <linux/rtnetlink.h> |
15 | #include <net/ipv6.h> | 15 | #include <net/ipv6.h> |
16 | #include <asm/atomic.h> | 16 | #include <linux/atomic.h> |
17 | 17 | ||
18 | struct inetpeer_addr_base { | 18 | struct inetpeer_addr_base { |
19 | union { | 19 | union { |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index b1370c4015b6..1aaf915656f3 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/sysctl.h> /* for ctl_path */ | 13 | #include <linux/sysctl.h> /* for ctl_path */ |
14 | #include <linux/list.h> /* for struct list_head */ | 14 | #include <linux/list.h> /* for struct list_head */ |
15 | #include <linux/spinlock.h> /* for struct rwlock_t */ | 15 | #include <linux/spinlock.h> /* for struct rwlock_t */ |
16 | #include <asm/atomic.h> /* for struct atomic_t */ | 16 | #include <linux/atomic.h> /* for struct atomic_t */ |
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | #include <linux/timer.h> | 18 | #include <linux/timer.h> |
19 | 19 | ||
diff --git a/include/net/lib80211.h b/include/net/lib80211.h index 848cce1bb7a5..b95bbb083ee8 100644 --- a/include/net/lib80211.h +++ b/include/net/lib80211.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | #include <linux/if.h> | 30 | #include <linux/if.h> |
31 | #include <linux/skbuff.h> | 31 | #include <linux/skbuff.h> |
32 | #include <linux/ieee80211.h> | 32 | #include <linux/ieee80211.h> |
diff --git a/include/net/llc.h b/include/net/llc.h index 5503b74ab170..226c846cab08 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/hash.h> | 20 | #include <linux/hash.h> |
21 | #include <linux/jhash.h> | 21 | #include <linux/jhash.h> |
22 | 22 | ||
23 | #include <asm/atomic.h> | 23 | #include <linux/atomic.h> |
24 | 24 | ||
25 | struct net_device; | 25 | struct net_device; |
26 | struct packet_type; | 26 | struct packet_type; |
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 4ba8521490ba..2720884287c3 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * - Add neighbour cache statistics like rtstat | 16 | * - Add neighbour cache statistics like rtstat |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | #include <linux/netdevice.h> | 20 | #include <linux/netdevice.h> |
21 | #include <linux/skbuff.h> | 21 | #include <linux/skbuff.h> |
22 | #include <linux/rcupdate.h> | 22 | #include <linux/rcupdate.h> |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 1ab1aec209ac..3bb6fa0eace0 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #ifndef __NET_NET_NAMESPACE_H | 4 | #ifndef __NET_NET_NAMESPACE_H |
5 | #define __NET_NET_NAMESPACE_H | 5 | #define __NET_NET_NAMESPACE_H |
6 | 6 | ||
7 | #include <asm/atomic.h> | 7 | #include <linux/atomic.h> |
8 | #include <linux/workqueue.h> | 8 | #include <linux/workqueue.h> |
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/sysctl.h> | 10 | #include <linux/sysctl.h> |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 5d4f8e586e32..0b7f05e4a927 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <asm/atomic.h> | 19 | #include <linux/atomic.h> |
20 | 20 | ||
21 | #include <linux/netfilter/nf_conntrack_tcp.h> | 21 | #include <linux/netfilter/nf_conntrack_tcp.h> |
22 | #include <linux/netfilter/nf_conntrack_dccp.h> | 22 | #include <linux/netfilter/nf_conntrack_dccp.h> |
diff --git a/include/net/netlabel.h b/include/net/netlabel.h index 9db401a8b4d9..f21a16ee3705 100644 --- a/include/net/netlabel.h +++ b/include/net/netlabel.h | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <linux/in6.h> | 38 | #include <linux/in6.h> |
39 | #include <net/netlink.h> | 39 | #include <net/netlink.h> |
40 | #include <net/request_sock.h> | 40 | #include <net/request_sock.h> |
41 | #include <asm/atomic.h> | 41 | #include <linux/atomic.h> |
42 | 42 | ||
43 | struct cipso_v4_doi; | 43 | struct cipso_v4_doi; |
44 | 44 | ||
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index 341eb089349e..0249399e51a7 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/list_nulls.h> | 5 | #include <linux/list_nulls.h> |
6 | #include <asm/atomic.h> | 6 | #include <linux/atomic.h> |
7 | 7 | ||
8 | struct ctl_table_header; | 8 | struct ctl_table_header; |
9 | struct nf_conntrack_ecache; | 9 | struct nf_conntrack_ecache; |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 31d7ea2e1d2a..f7d9c3fc06fd 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -60,7 +60,7 @@ | |||
60 | #include <linux/in6.h> /* We get struct in6_addr */ | 60 | #include <linux/in6.h> /* We get struct in6_addr */ |
61 | #include <linux/ipv6.h> | 61 | #include <linux/ipv6.h> |
62 | #include <asm/param.h> /* We get MAXHOSTNAMELEN. */ | 62 | #include <asm/param.h> /* We get MAXHOSTNAMELEN. */ |
63 | #include <asm/atomic.h> /* This gets us atomic counters. */ | 63 | #include <linux/atomic.h> /* This gets us atomic counters. */ |
64 | #include <linux/skbuff.h> /* We need sk_buff_head. */ | 64 | #include <linux/skbuff.h> /* We need sk_buff_head. */ |
65 | #include <linux/workqueue.h> /* We need tq_struct. */ | 65 | #include <linux/workqueue.h> /* We need tq_struct. */ |
66 | #include <linux/sctp.h> /* We need sctp* header structs. */ | 66 | #include <linux/sctp.h> /* We need sctp* header structs. */ |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 7b82080eb02c..3bbbd78e1439 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
28 | #include <pcmcia/ss.h> | 28 | #include <pcmcia/ss.h> |
29 | #include <asm/atomic.h> | 29 | #include <linux/atomic.h> |
30 | 30 | ||
31 | 31 | ||
32 | /* | 32 | /* |
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h index 1082afaed158..d44a56388a3e 100644 --- a/include/rdma/ib_sa.h +++ b/include/rdma/ib_sa.h | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <linux/completion.h> | 38 | #include <linux/completion.h> |
39 | #include <linux/compiler.h> | 39 | #include <linux/compiler.h> |
40 | 40 | ||
41 | #include <asm/atomic.h> | 41 | #include <linux/atomic.h> |
42 | 42 | ||
43 | #include <rdma/ib_verbs.h> | 43 | #include <rdma/ib_verbs.h> |
44 | #include <rdma/ib_mad.h> | 44 | #include <rdma/ib_mad.h> |
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index bf4306aea169..228be3e220d9 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <linux/scatterlist.h> | 49 | #include <linux/scatterlist.h> |
50 | #include <linux/workqueue.h> | 50 | #include <linux/workqueue.h> |
51 | 51 | ||
52 | #include <asm/atomic.h> | 52 | #include <linux/atomic.h> |
53 | #include <asm/uaccess.h> | 53 | #include <asm/uaccess.h> |
54 | 54 | ||
55 | extern struct workqueue_struct *ib_wq; | 55 | extern struct workqueue_struct *ib_wq; |
diff --git a/include/rxrpc/types.h b/include/rxrpc/types.h index 327a5fc4719c..30d48f6da228 100644 --- a/include/rxrpc/types.h +++ b/include/rxrpc/types.h | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/socket.h> | 17 | #include <linux/socket.h> |
18 | #include <linux/in.h> | 18 | #include <linux/in.h> |
19 | #include <linux/spinlock.h> | 19 | #include <linux/spinlock.h> |
20 | #include <asm/atomic.h> | 20 | #include <linux/atomic.h> |
21 | 21 | ||
22 | typedef uint32_t rxrpc_seq_t; /* Rx message sequence number */ | 22 | typedef uint32_t rxrpc_seq_t; /* Rx message sequence number */ |
23 | typedef uint32_t rxrpc_serial_t; /* Rx message serial number */ | 23 | typedef uint32_t rxrpc_serial_t; /* Rx message serial number */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index dd82e02ddde3..d371c3ca90c3 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <scsi/scsi.h> | 9 | #include <scsi/scsi.h> |
10 | #include <asm/atomic.h> | 10 | #include <linux/atomic.h> |
11 | 11 | ||
12 | struct request_queue; | 12 | struct request_queue; |
13 | struct scsi_cmnd; | 13 | struct scsi_cmnd; |
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 4114129f0794..b31702ac15be 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h | |||
@@ -284,7 +284,6 @@ DECLARE_EVENT_CLASS(btrfs__writepage, | |||
284 | __field( long, pages_skipped ) | 284 | __field( long, pages_skipped ) |
285 | __field( loff_t, range_start ) | 285 | __field( loff_t, range_start ) |
286 | __field( loff_t, range_end ) | 286 | __field( loff_t, range_end ) |
287 | __field( char, nonblocking ) | ||
288 | __field( char, for_kupdate ) | 287 | __field( char, for_kupdate ) |
289 | __field( char, for_reclaim ) | 288 | __field( char, for_reclaim ) |
290 | __field( char, range_cyclic ) | 289 | __field( char, range_cyclic ) |
@@ -299,7 +298,6 @@ DECLARE_EVENT_CLASS(btrfs__writepage, | |||
299 | __entry->pages_skipped = wbc->pages_skipped; | 298 | __entry->pages_skipped = wbc->pages_skipped; |
300 | __entry->range_start = wbc->range_start; | 299 | __entry->range_start = wbc->range_start; |
301 | __entry->range_end = wbc->range_end; | 300 | __entry->range_end = wbc->range_end; |
302 | __entry->nonblocking = wbc->nonblocking; | ||
303 | __entry->for_kupdate = wbc->for_kupdate; | 301 | __entry->for_kupdate = wbc->for_kupdate; |
304 | __entry->for_reclaim = wbc->for_reclaim; | 302 | __entry->for_reclaim = wbc->for_reclaim; |
305 | __entry->range_cyclic = wbc->range_cyclic; | 303 | __entry->range_cyclic = wbc->range_cyclic; |
@@ -310,13 +308,13 @@ DECLARE_EVENT_CLASS(btrfs__writepage, | |||
310 | 308 | ||
311 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, " | 309 | TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, " |
312 | "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, " | 310 | "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, " |
313 | "range_end = %llu, nonblocking = %d, for_kupdate = %d, " | 311 | "range_end = %llu, for_kupdate = %d, " |
314 | "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu", | 312 | "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu", |
315 | show_root_type(__entry->root_objectid), | 313 | show_root_type(__entry->root_objectid), |
316 | (unsigned long)__entry->ino, __entry->index, | 314 | (unsigned long)__entry->ino, __entry->index, |
317 | __entry->nr_to_write, __entry->pages_skipped, | 315 | __entry->nr_to_write, __entry->pages_skipped, |
318 | __entry->range_start, __entry->range_end, | 316 | __entry->range_start, __entry->range_end, |
319 | __entry->nonblocking, __entry->for_kupdate, | 317 | __entry->for_kupdate, |
320 | __entry->for_reclaim, __entry->range_cyclic, | 318 | __entry->for_reclaim, __entry->range_cyclic, |
321 | (unsigned long)__entry->writeback_index) | 319 | (unsigned long)__entry->writeback_index) |
322 | ); | 320 | ); |
diff --git a/include/trace/events/ext3.h b/include/trace/events/ext3.h new file mode 100644 index 000000000000..7b53c0573dc9 --- /dev/null +++ b/include/trace/events/ext3.h | |||
@@ -0,0 +1,864 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM ext3 | ||
3 | |||
4 | #if !defined(_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_EXT3_H | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | |||
9 | TRACE_EVENT(ext3_free_inode, | ||
10 | TP_PROTO(struct inode *inode), | ||
11 | |||
12 | TP_ARGS(inode), | ||
13 | |||
14 | TP_STRUCT__entry( | ||
15 | __field( dev_t, dev ) | ||
16 | __field( ino_t, ino ) | ||
17 | __field( umode_t, mode ) | ||
18 | __field( uid_t, uid ) | ||
19 | __field( gid_t, gid ) | ||
20 | __field( blkcnt_t, blocks ) | ||
21 | ), | ||
22 | |||
23 | TP_fast_assign( | ||
24 | __entry->dev = inode->i_sb->s_dev; | ||
25 | __entry->ino = inode->i_ino; | ||
26 | __entry->mode = inode->i_mode; | ||
27 | __entry->uid = inode->i_uid; | ||
28 | __entry->gid = inode->i_gid; | ||
29 | __entry->blocks = inode->i_blocks; | ||
30 | ), | ||
31 | |||
32 | TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %lu", | ||
33 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
34 | (unsigned long) __entry->ino, | ||
35 | __entry->mode, __entry->uid, __entry->gid, | ||
36 | (unsigned long) __entry->blocks) | ||
37 | ); | ||
38 | |||
39 | TRACE_EVENT(ext3_request_inode, | ||
40 | TP_PROTO(struct inode *dir, int mode), | ||
41 | |||
42 | TP_ARGS(dir, mode), | ||
43 | |||
44 | TP_STRUCT__entry( | ||
45 | __field( dev_t, dev ) | ||
46 | __field( ino_t, dir ) | ||
47 | __field( umode_t, mode ) | ||
48 | ), | ||
49 | |||
50 | TP_fast_assign( | ||
51 | __entry->dev = dir->i_sb->s_dev; | ||
52 | __entry->dir = dir->i_ino; | ||
53 | __entry->mode = mode; | ||
54 | ), | ||
55 | |||
56 | TP_printk("dev %d,%d dir %lu mode 0%o", | ||
57 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
58 | (unsigned long) __entry->dir, __entry->mode) | ||
59 | ); | ||
60 | |||
61 | TRACE_EVENT(ext3_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 %d,%d ino %lu dir %lu mode 0%o", | ||
81 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
82 | (unsigned long) __entry->ino, | ||
83 | (unsigned long) __entry->dir, __entry->mode) | ||
84 | ); | ||
85 | |||
86 | TRACE_EVENT(ext3_evict_inode, | ||
87 | TP_PROTO(struct inode *inode), | ||
88 | |||
89 | TP_ARGS(inode), | ||
90 | |||
91 | TP_STRUCT__entry( | ||
92 | __field( dev_t, dev ) | ||
93 | __field( ino_t, ino ) | ||
94 | __field( int, nlink ) | ||
95 | ), | ||
96 | |||
97 | TP_fast_assign( | ||
98 | __entry->dev = inode->i_sb->s_dev; | ||
99 | __entry->ino = inode->i_ino; | ||
100 | __entry->nlink = inode->i_nlink; | ||
101 | ), | ||
102 | |||
103 | TP_printk("dev %d,%d ino %lu nlink %d", | ||
104 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
105 | (unsigned long) __entry->ino, __entry->nlink) | ||
106 | ); | ||
107 | |||
108 | TRACE_EVENT(ext3_drop_inode, | ||
109 | TP_PROTO(struct inode *inode, int drop), | ||
110 | |||
111 | TP_ARGS(inode, drop), | ||
112 | |||
113 | TP_STRUCT__entry( | ||
114 | __field( dev_t, dev ) | ||
115 | __field( ino_t, ino ) | ||
116 | __field( int, drop ) | ||
117 | ), | ||
118 | |||
119 | TP_fast_assign( | ||
120 | __entry->dev = inode->i_sb->s_dev; | ||
121 | __entry->ino = inode->i_ino; | ||
122 | __entry->drop = drop; | ||
123 | ), | ||
124 | |||
125 | TP_printk("dev %d,%d ino %lu drop %d", | ||
126 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
127 | (unsigned long) __entry->ino, __entry->drop) | ||
128 | ); | ||
129 | |||
130 | TRACE_EVENT(ext3_mark_inode_dirty, | ||
131 | TP_PROTO(struct inode *inode, unsigned long IP), | ||
132 | |||
133 | TP_ARGS(inode, IP), | ||
134 | |||
135 | TP_STRUCT__entry( | ||
136 | __field( dev_t, dev ) | ||
137 | __field( ino_t, ino ) | ||
138 | __field(unsigned long, ip ) | ||
139 | ), | ||
140 | |||
141 | TP_fast_assign( | ||
142 | __entry->dev = inode->i_sb->s_dev; | ||
143 | __entry->ino = inode->i_ino; | ||
144 | __entry->ip = IP; | ||
145 | ), | ||
146 | |||
147 | TP_printk("dev %d,%d ino %lu caller %pF", | ||
148 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
149 | (unsigned long) __entry->ino, (void *)__entry->ip) | ||
150 | ); | ||
151 | |||
152 | TRACE_EVENT(ext3_write_begin, | ||
153 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
154 | unsigned int flags), | ||
155 | |||
156 | TP_ARGS(inode, pos, len, flags), | ||
157 | |||
158 | TP_STRUCT__entry( | ||
159 | __field( dev_t, dev ) | ||
160 | __field( ino_t, ino ) | ||
161 | __field( loff_t, pos ) | ||
162 | __field( unsigned int, len ) | ||
163 | __field( unsigned int, flags ) | ||
164 | ), | ||
165 | |||
166 | TP_fast_assign( | ||
167 | __entry->dev = inode->i_sb->s_dev; | ||
168 | __entry->ino = inode->i_ino; | ||
169 | __entry->pos = pos; | ||
170 | __entry->len = len; | ||
171 | __entry->flags = flags; | ||
172 | ), | ||
173 | |||
174 | TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", | ||
175 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
176 | (unsigned long) __entry->ino, | ||
177 | (unsigned long long) __entry->pos, __entry->len, | ||
178 | __entry->flags) | ||
179 | ); | ||
180 | |||
181 | DECLARE_EVENT_CLASS(ext3__write_end, | ||
182 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
183 | unsigned int copied), | ||
184 | |||
185 | TP_ARGS(inode, pos, len, copied), | ||
186 | |||
187 | TP_STRUCT__entry( | ||
188 | __field( dev_t, dev ) | ||
189 | __field( ino_t, ino ) | ||
190 | __field( loff_t, pos ) | ||
191 | __field( unsigned int, len ) | ||
192 | __field( unsigned int, copied ) | ||
193 | ), | ||
194 | |||
195 | TP_fast_assign( | ||
196 | __entry->dev = inode->i_sb->s_dev; | ||
197 | __entry->ino = inode->i_ino; | ||
198 | __entry->pos = pos; | ||
199 | __entry->len = len; | ||
200 | __entry->copied = copied; | ||
201 | ), | ||
202 | |||
203 | TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", | ||
204 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
205 | (unsigned long) __entry->ino, | ||
206 | (unsigned long long) __entry->pos, __entry->len, | ||
207 | __entry->copied) | ||
208 | ); | ||
209 | |||
210 | DEFINE_EVENT(ext3__write_end, ext3_ordered_write_end, | ||
211 | |||
212 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
213 | unsigned int copied), | ||
214 | |||
215 | TP_ARGS(inode, pos, len, copied) | ||
216 | ); | ||
217 | |||
218 | DEFINE_EVENT(ext3__write_end, ext3_writeback_write_end, | ||
219 | |||
220 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
221 | unsigned int copied), | ||
222 | |||
223 | TP_ARGS(inode, pos, len, copied) | ||
224 | ); | ||
225 | |||
226 | DEFINE_EVENT(ext3__write_end, ext3_journalled_write_end, | ||
227 | |||
228 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, | ||
229 | unsigned int copied), | ||
230 | |||
231 | TP_ARGS(inode, pos, len, copied) | ||
232 | ); | ||
233 | |||
234 | DECLARE_EVENT_CLASS(ext3__page_op, | ||
235 | TP_PROTO(struct page *page), | ||
236 | |||
237 | TP_ARGS(page), | ||
238 | |||
239 | TP_STRUCT__entry( | ||
240 | __field( dev_t, dev ) | ||
241 | __field( ino_t, ino ) | ||
242 | __field( pgoff_t, index ) | ||
243 | |||
244 | ), | ||
245 | |||
246 | TP_fast_assign( | ||
247 | __entry->index = page->index; | ||
248 | __entry->ino = page->mapping->host->i_ino; | ||
249 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
250 | ), | ||
251 | |||
252 | TP_printk("dev %d,%d ino %lu page_index %lu", | ||
253 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
254 | (unsigned long) __entry->ino, __entry->index) | ||
255 | ); | ||
256 | |||
257 | DEFINE_EVENT(ext3__page_op, ext3_ordered_writepage, | ||
258 | |||
259 | TP_PROTO(struct page *page), | ||
260 | |||
261 | TP_ARGS(page) | ||
262 | ); | ||
263 | |||
264 | DEFINE_EVENT(ext3__page_op, ext3_writeback_writepage, | ||
265 | |||
266 | TP_PROTO(struct page *page), | ||
267 | |||
268 | TP_ARGS(page) | ||
269 | ); | ||
270 | |||
271 | DEFINE_EVENT(ext3__page_op, ext3_journalled_writepage, | ||
272 | |||
273 | TP_PROTO(struct page *page), | ||
274 | |||
275 | TP_ARGS(page) | ||
276 | ); | ||
277 | |||
278 | DEFINE_EVENT(ext3__page_op, ext3_readpage, | ||
279 | |||
280 | TP_PROTO(struct page *page), | ||
281 | |||
282 | TP_ARGS(page) | ||
283 | ); | ||
284 | |||
285 | DEFINE_EVENT(ext3__page_op, ext3_releasepage, | ||
286 | |||
287 | TP_PROTO(struct page *page), | ||
288 | |||
289 | TP_ARGS(page) | ||
290 | ); | ||
291 | |||
292 | TRACE_EVENT(ext3_invalidatepage, | ||
293 | TP_PROTO(struct page *page, unsigned long offset), | ||
294 | |||
295 | TP_ARGS(page, offset), | ||
296 | |||
297 | TP_STRUCT__entry( | ||
298 | __field( pgoff_t, index ) | ||
299 | __field( unsigned long, offset ) | ||
300 | __field( ino_t, ino ) | ||
301 | __field( dev_t, dev ) | ||
302 | |||
303 | ), | ||
304 | |||
305 | TP_fast_assign( | ||
306 | __entry->index = page->index; | ||
307 | __entry->offset = offset; | ||
308 | __entry->ino = page->mapping->host->i_ino; | ||
309 | __entry->dev = page->mapping->host->i_sb->s_dev; | ||
310 | ), | ||
311 | |||
312 | TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", | ||
313 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
314 | (unsigned long) __entry->ino, | ||
315 | __entry->index, __entry->offset) | ||
316 | ); | ||
317 | |||
318 | TRACE_EVENT(ext3_discard_blocks, | ||
319 | TP_PROTO(struct super_block *sb, unsigned long blk, | ||
320 | unsigned long count), | ||
321 | |||
322 | TP_ARGS(sb, blk, count), | ||
323 | |||
324 | TP_STRUCT__entry( | ||
325 | __field( dev_t, dev ) | ||
326 | __field( unsigned long, blk ) | ||
327 | __field( unsigned long, count ) | ||
328 | |||
329 | ), | ||
330 | |||
331 | TP_fast_assign( | ||
332 | __entry->dev = sb->s_dev; | ||
333 | __entry->blk = blk; | ||
334 | __entry->count = count; | ||
335 | ), | ||
336 | |||
337 | TP_printk("dev %d,%d blk %lu count %lu", | ||
338 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
339 | __entry->blk, __entry->count) | ||
340 | ); | ||
341 | |||
342 | TRACE_EVENT(ext3_request_blocks, | ||
343 | TP_PROTO(struct inode *inode, unsigned long goal, | ||
344 | unsigned long count), | ||
345 | |||
346 | TP_ARGS(inode, goal, count), | ||
347 | |||
348 | TP_STRUCT__entry( | ||
349 | __field( dev_t, dev ) | ||
350 | __field( ino_t, ino ) | ||
351 | __field( unsigned long, count ) | ||
352 | __field( unsigned long, goal ) | ||
353 | ), | ||
354 | |||
355 | TP_fast_assign( | ||
356 | __entry->dev = inode->i_sb->s_dev; | ||
357 | __entry->ino = inode->i_ino; | ||
358 | __entry->count = count; | ||
359 | __entry->goal = goal; | ||
360 | ), | ||
361 | |||
362 | TP_printk("dev %d,%d ino %lu count %lu goal %lu ", | ||
363 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
364 | (unsigned long) __entry->ino, | ||
365 | __entry->count, __entry->goal) | ||
366 | ); | ||
367 | |||
368 | TRACE_EVENT(ext3_allocate_blocks, | ||
369 | TP_PROTO(struct inode *inode, unsigned long goal, | ||
370 | unsigned long count, unsigned long block), | ||
371 | |||
372 | TP_ARGS(inode, goal, count, block), | ||
373 | |||
374 | TP_STRUCT__entry( | ||
375 | __field( dev_t, dev ) | ||
376 | __field( ino_t, ino ) | ||
377 | __field( unsigned long, block ) | ||
378 | __field( unsigned long, count ) | ||
379 | __field( unsigned long, goal ) | ||
380 | ), | ||
381 | |||
382 | TP_fast_assign( | ||
383 | __entry->dev = inode->i_sb->s_dev; | ||
384 | __entry->ino = inode->i_ino; | ||
385 | __entry->block = block; | ||
386 | __entry->count = count; | ||
387 | __entry->goal = goal; | ||
388 | ), | ||
389 | |||
390 | TP_printk("dev %d,%d ino %lu count %lu block %lu goal %lu", | ||
391 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
392 | (unsigned long) __entry->ino, | ||
393 | __entry->count, __entry->block, | ||
394 | __entry->goal) | ||
395 | ); | ||
396 | |||
397 | TRACE_EVENT(ext3_free_blocks, | ||
398 | TP_PROTO(struct inode *inode, unsigned long block, | ||
399 | unsigned long count), | ||
400 | |||
401 | TP_ARGS(inode, block, count), | ||
402 | |||
403 | TP_STRUCT__entry( | ||
404 | __field( dev_t, dev ) | ||
405 | __field( ino_t, ino ) | ||
406 | __field( umode_t, mode ) | ||
407 | __field( unsigned long, block ) | ||
408 | __field( unsigned long, count ) | ||
409 | ), | ||
410 | |||
411 | TP_fast_assign( | ||
412 | __entry->dev = inode->i_sb->s_dev; | ||
413 | __entry->ino = inode->i_ino; | ||
414 | __entry->mode = inode->i_mode; | ||
415 | __entry->block = block; | ||
416 | __entry->count = count; | ||
417 | ), | ||
418 | |||
419 | TP_printk("dev %d,%d ino %lu mode 0%o block %lu count %lu", | ||
420 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
421 | (unsigned long) __entry->ino, | ||
422 | __entry->mode, __entry->block, __entry->count) | ||
423 | ); | ||
424 | |||
425 | TRACE_EVENT(ext3_sync_file_enter, | ||
426 | TP_PROTO(struct file *file, int datasync), | ||
427 | |||
428 | TP_ARGS(file, datasync), | ||
429 | |||
430 | TP_STRUCT__entry( | ||
431 | __field( dev_t, dev ) | ||
432 | __field( ino_t, ino ) | ||
433 | __field( ino_t, parent ) | ||
434 | __field( int, datasync ) | ||
435 | ), | ||
436 | |||
437 | TP_fast_assign( | ||
438 | struct dentry *dentry = file->f_path.dentry; | ||
439 | |||
440 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
441 | __entry->ino = dentry->d_inode->i_ino; | ||
442 | __entry->datasync = datasync; | ||
443 | __entry->parent = dentry->d_parent->d_inode->i_ino; | ||
444 | ), | ||
445 | |||
446 | TP_printk("dev %d,%d ino %lu parent %ld datasync %d ", | ||
447 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
448 | (unsigned long) __entry->ino, | ||
449 | (unsigned long) __entry->parent, __entry->datasync) | ||
450 | ); | ||
451 | |||
452 | TRACE_EVENT(ext3_sync_file_exit, | ||
453 | TP_PROTO(struct inode *inode, int ret), | ||
454 | |||
455 | TP_ARGS(inode, ret), | ||
456 | |||
457 | TP_STRUCT__entry( | ||
458 | __field( int, ret ) | ||
459 | __field( ino_t, ino ) | ||
460 | __field( dev_t, dev ) | ||
461 | ), | ||
462 | |||
463 | TP_fast_assign( | ||
464 | __entry->ret = ret; | ||
465 | __entry->ino = inode->i_ino; | ||
466 | __entry->dev = inode->i_sb->s_dev; | ||
467 | ), | ||
468 | |||
469 | TP_printk("dev %d,%d ino %lu ret %d", | ||
470 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
471 | (unsigned long) __entry->ino, | ||
472 | __entry->ret) | ||
473 | ); | ||
474 | |||
475 | TRACE_EVENT(ext3_sync_fs, | ||
476 | TP_PROTO(struct super_block *sb, int wait), | ||
477 | |||
478 | TP_ARGS(sb, wait), | ||
479 | |||
480 | TP_STRUCT__entry( | ||
481 | __field( dev_t, dev ) | ||
482 | __field( int, wait ) | ||
483 | |||
484 | ), | ||
485 | |||
486 | TP_fast_assign( | ||
487 | __entry->dev = sb->s_dev; | ||
488 | __entry->wait = wait; | ||
489 | ), | ||
490 | |||
491 | TP_printk("dev %d,%d wait %d", | ||
492 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
493 | __entry->wait) | ||
494 | ); | ||
495 | |||
496 | TRACE_EVENT(ext3_rsv_window_add, | ||
497 | TP_PROTO(struct super_block *sb, | ||
498 | struct ext3_reserve_window_node *rsv_node), | ||
499 | |||
500 | TP_ARGS(sb, rsv_node), | ||
501 | |||
502 | TP_STRUCT__entry( | ||
503 | __field( unsigned long, start ) | ||
504 | __field( unsigned long, end ) | ||
505 | __field( dev_t, dev ) | ||
506 | ), | ||
507 | |||
508 | TP_fast_assign( | ||
509 | __entry->dev = sb->s_dev; | ||
510 | __entry->start = rsv_node->rsv_window._rsv_start; | ||
511 | __entry->end = rsv_node->rsv_window._rsv_end; | ||
512 | ), | ||
513 | |||
514 | TP_printk("dev %d,%d start %lu end %lu", | ||
515 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
516 | __entry->start, __entry->end) | ||
517 | ); | ||
518 | |||
519 | TRACE_EVENT(ext3_discard_reservation, | ||
520 | TP_PROTO(struct inode *inode, | ||
521 | struct ext3_reserve_window_node *rsv_node), | ||
522 | |||
523 | TP_ARGS(inode, rsv_node), | ||
524 | |||
525 | TP_STRUCT__entry( | ||
526 | __field( unsigned long, start ) | ||
527 | __field( unsigned long, end ) | ||
528 | __field( ino_t, ino ) | ||
529 | __field( dev_t, dev ) | ||
530 | ), | ||
531 | |||
532 | TP_fast_assign( | ||
533 | __entry->start = rsv_node->rsv_window._rsv_start; | ||
534 | __entry->end = rsv_node->rsv_window._rsv_end; | ||
535 | __entry->ino = inode->i_ino; | ||
536 | __entry->dev = inode->i_sb->s_dev; | ||
537 | ), | ||
538 | |||
539 | TP_printk("dev %d,%d ino %lu start %lu end %lu", | ||
540 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
541 | (unsigned long)__entry->ino, __entry->start, | ||
542 | __entry->end) | ||
543 | ); | ||
544 | |||
545 | TRACE_EVENT(ext3_alloc_new_reservation, | ||
546 | TP_PROTO(struct super_block *sb, unsigned long goal), | ||
547 | |||
548 | TP_ARGS(sb, goal), | ||
549 | |||
550 | TP_STRUCT__entry( | ||
551 | __field( dev_t, dev ) | ||
552 | __field( unsigned long, goal ) | ||
553 | ), | ||
554 | |||
555 | TP_fast_assign( | ||
556 | __entry->dev = sb->s_dev; | ||
557 | __entry->goal = goal; | ||
558 | ), | ||
559 | |||
560 | TP_printk("dev %d,%d goal %lu", | ||
561 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
562 | __entry->goal) | ||
563 | ); | ||
564 | |||
565 | TRACE_EVENT(ext3_reserved, | ||
566 | TP_PROTO(struct super_block *sb, unsigned long block, | ||
567 | struct ext3_reserve_window_node *rsv_node), | ||
568 | |||
569 | TP_ARGS(sb, block, rsv_node), | ||
570 | |||
571 | TP_STRUCT__entry( | ||
572 | __field( unsigned long, block ) | ||
573 | __field( unsigned long, start ) | ||
574 | __field( unsigned long, end ) | ||
575 | __field( dev_t, dev ) | ||
576 | ), | ||
577 | |||
578 | TP_fast_assign( | ||
579 | __entry->block = block; | ||
580 | __entry->start = rsv_node->rsv_window._rsv_start; | ||
581 | __entry->end = rsv_node->rsv_window._rsv_end; | ||
582 | __entry->dev = sb->s_dev; | ||
583 | ), | ||
584 | |||
585 | TP_printk("dev %d,%d block %lu, start %lu end %lu", | ||
586 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
587 | __entry->block, __entry->start, __entry->end) | ||
588 | ); | ||
589 | |||
590 | TRACE_EVENT(ext3_forget, | ||
591 | TP_PROTO(struct inode *inode, int is_metadata, unsigned long block), | ||
592 | |||
593 | TP_ARGS(inode, is_metadata, block), | ||
594 | |||
595 | TP_STRUCT__entry( | ||
596 | __field( dev_t, dev ) | ||
597 | __field( ino_t, ino ) | ||
598 | __field( umode_t, mode ) | ||
599 | __field( int, is_metadata ) | ||
600 | __field( unsigned long, block ) | ||
601 | ), | ||
602 | |||
603 | TP_fast_assign( | ||
604 | __entry->dev = inode->i_sb->s_dev; | ||
605 | __entry->ino = inode->i_ino; | ||
606 | __entry->mode = inode->i_mode; | ||
607 | __entry->is_metadata = is_metadata; | ||
608 | __entry->block = block; | ||
609 | ), | ||
610 | |||
611 | TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %lu", | ||
612 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
613 | (unsigned long) __entry->ino, | ||
614 | __entry->mode, __entry->is_metadata, __entry->block) | ||
615 | ); | ||
616 | |||
617 | TRACE_EVENT(ext3_read_block_bitmap, | ||
618 | TP_PROTO(struct super_block *sb, unsigned int group), | ||
619 | |||
620 | TP_ARGS(sb, group), | ||
621 | |||
622 | TP_STRUCT__entry( | ||
623 | __field( dev_t, dev ) | ||
624 | __field( __u32, group ) | ||
625 | |||
626 | ), | ||
627 | |||
628 | TP_fast_assign( | ||
629 | __entry->dev = sb->s_dev; | ||
630 | __entry->group = group; | ||
631 | ), | ||
632 | |||
633 | TP_printk("dev %d,%d group %u", | ||
634 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
635 | __entry->group) | ||
636 | ); | ||
637 | |||
638 | TRACE_EVENT(ext3_direct_IO_enter, | ||
639 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), | ||
640 | |||
641 | TP_ARGS(inode, offset, len, rw), | ||
642 | |||
643 | TP_STRUCT__entry( | ||
644 | __field( ino_t, ino ) | ||
645 | __field( dev_t, dev ) | ||
646 | __field( loff_t, pos ) | ||
647 | __field( unsigned long, len ) | ||
648 | __field( int, rw ) | ||
649 | ), | ||
650 | |||
651 | TP_fast_assign( | ||
652 | __entry->ino = inode->i_ino; | ||
653 | __entry->dev = inode->i_sb->s_dev; | ||
654 | __entry->pos = offset; | ||
655 | __entry->len = len; | ||
656 | __entry->rw = rw; | ||
657 | ), | ||
658 | |||
659 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d", | ||
660 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
661 | (unsigned long) __entry->ino, | ||
662 | (unsigned long long) __entry->pos, __entry->len, | ||
663 | __entry->rw) | ||
664 | ); | ||
665 | |||
666 | TRACE_EVENT(ext3_direct_IO_exit, | ||
667 | TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, | ||
668 | int rw, int ret), | ||
669 | |||
670 | TP_ARGS(inode, offset, len, rw, ret), | ||
671 | |||
672 | TP_STRUCT__entry( | ||
673 | __field( ino_t, ino ) | ||
674 | __field( dev_t, dev ) | ||
675 | __field( loff_t, pos ) | ||
676 | __field( unsigned long, len ) | ||
677 | __field( int, rw ) | ||
678 | __field( int, ret ) | ||
679 | ), | ||
680 | |||
681 | TP_fast_assign( | ||
682 | __entry->ino = inode->i_ino; | ||
683 | __entry->dev = inode->i_sb->s_dev; | ||
684 | __entry->pos = offset; | ||
685 | __entry->len = len; | ||
686 | __entry->rw = rw; | ||
687 | __entry->ret = ret; | ||
688 | ), | ||
689 | |||
690 | TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d", | ||
691 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
692 | (unsigned long) __entry->ino, | ||
693 | (unsigned long long) __entry->pos, __entry->len, | ||
694 | __entry->rw, __entry->ret) | ||
695 | ); | ||
696 | |||
697 | TRACE_EVENT(ext3_unlink_enter, | ||
698 | TP_PROTO(struct inode *parent, struct dentry *dentry), | ||
699 | |||
700 | TP_ARGS(parent, dentry), | ||
701 | |||
702 | TP_STRUCT__entry( | ||
703 | __field( ino_t, parent ) | ||
704 | __field( ino_t, ino ) | ||
705 | __field( loff_t, size ) | ||
706 | __field( dev_t, dev ) | ||
707 | ), | ||
708 | |||
709 | TP_fast_assign( | ||
710 | __entry->parent = parent->i_ino; | ||
711 | __entry->ino = dentry->d_inode->i_ino; | ||
712 | __entry->size = dentry->d_inode->i_size; | ||
713 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
714 | ), | ||
715 | |||
716 | TP_printk("dev %d,%d ino %lu size %lld parent %ld", | ||
717 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
718 | (unsigned long) __entry->ino, | ||
719 | (unsigned long long)__entry->size, | ||
720 | (unsigned long) __entry->parent) | ||
721 | ); | ||
722 | |||
723 | TRACE_EVENT(ext3_unlink_exit, | ||
724 | TP_PROTO(struct dentry *dentry, int ret), | ||
725 | |||
726 | TP_ARGS(dentry, ret), | ||
727 | |||
728 | TP_STRUCT__entry( | ||
729 | __field( ino_t, ino ) | ||
730 | __field( dev_t, dev ) | ||
731 | __field( int, ret ) | ||
732 | ), | ||
733 | |||
734 | TP_fast_assign( | ||
735 | __entry->ino = dentry->d_inode->i_ino; | ||
736 | __entry->dev = dentry->d_inode->i_sb->s_dev; | ||
737 | __entry->ret = ret; | ||
738 | ), | ||
739 | |||
740 | TP_printk("dev %d,%d ino %lu ret %d", | ||
741 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
742 | (unsigned long) __entry->ino, | ||
743 | __entry->ret) | ||
744 | ); | ||
745 | |||
746 | DECLARE_EVENT_CLASS(ext3__truncate, | ||
747 | TP_PROTO(struct inode *inode), | ||
748 | |||
749 | TP_ARGS(inode), | ||
750 | |||
751 | TP_STRUCT__entry( | ||
752 | __field( ino_t, ino ) | ||
753 | __field( dev_t, dev ) | ||
754 | __field( blkcnt_t, blocks ) | ||
755 | ), | ||
756 | |||
757 | TP_fast_assign( | ||
758 | __entry->ino = inode->i_ino; | ||
759 | __entry->dev = inode->i_sb->s_dev; | ||
760 | __entry->blocks = inode->i_blocks; | ||
761 | ), | ||
762 | |||
763 | TP_printk("dev %d,%d ino %lu blocks %lu", | ||
764 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
765 | (unsigned long) __entry->ino, (unsigned long) __entry->blocks) | ||
766 | ); | ||
767 | |||
768 | DEFINE_EVENT(ext3__truncate, ext3_truncate_enter, | ||
769 | |||
770 | TP_PROTO(struct inode *inode), | ||
771 | |||
772 | TP_ARGS(inode) | ||
773 | ); | ||
774 | |||
775 | DEFINE_EVENT(ext3__truncate, ext3_truncate_exit, | ||
776 | |||
777 | TP_PROTO(struct inode *inode), | ||
778 | |||
779 | TP_ARGS(inode) | ||
780 | ); | ||
781 | |||
782 | TRACE_EVENT(ext3_get_blocks_enter, | ||
783 | TP_PROTO(struct inode *inode, unsigned long lblk, | ||
784 | unsigned long len, int create), | ||
785 | |||
786 | TP_ARGS(inode, lblk, len, create), | ||
787 | |||
788 | TP_STRUCT__entry( | ||
789 | __field( ino_t, ino ) | ||
790 | __field( dev_t, dev ) | ||
791 | __field( unsigned long, lblk ) | ||
792 | __field( unsigned long, len ) | ||
793 | __field( int, create ) | ||
794 | ), | ||
795 | |||
796 | TP_fast_assign( | ||
797 | __entry->ino = inode->i_ino; | ||
798 | __entry->dev = inode->i_sb->s_dev; | ||
799 | __entry->lblk = lblk; | ||
800 | __entry->len = len; | ||
801 | __entry->create = create; | ||
802 | ), | ||
803 | |||
804 | TP_printk("dev %d,%d ino %lu lblk %lu len %lu create %u", | ||
805 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
806 | (unsigned long) __entry->ino, | ||
807 | __entry->lblk, __entry->len, __entry->create) | ||
808 | ); | ||
809 | |||
810 | TRACE_EVENT(ext3_get_blocks_exit, | ||
811 | TP_PROTO(struct inode *inode, unsigned long lblk, | ||
812 | unsigned long pblk, unsigned long len, int ret), | ||
813 | |||
814 | TP_ARGS(inode, lblk, pblk, len, ret), | ||
815 | |||
816 | TP_STRUCT__entry( | ||
817 | __field( ino_t, ino ) | ||
818 | __field( dev_t, dev ) | ||
819 | __field( unsigned long, lblk ) | ||
820 | __field( unsigned long, pblk ) | ||
821 | __field( unsigned long, len ) | ||
822 | __field( int, ret ) | ||
823 | ), | ||
824 | |||
825 | TP_fast_assign( | ||
826 | __entry->ino = inode->i_ino; | ||
827 | __entry->dev = inode->i_sb->s_dev; | ||
828 | __entry->lblk = lblk; | ||
829 | __entry->pblk = pblk; | ||
830 | __entry->len = len; | ||
831 | __entry->ret = ret; | ||
832 | ), | ||
833 | |||
834 | TP_printk("dev %d,%d ino %lu lblk %lu pblk %lu len %lu ret %d", | ||
835 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
836 | (unsigned long) __entry->ino, | ||
837 | __entry->lblk, __entry->pblk, | ||
838 | __entry->len, __entry->ret) | ||
839 | ); | ||
840 | |||
841 | TRACE_EVENT(ext3_load_inode, | ||
842 | TP_PROTO(struct inode *inode), | ||
843 | |||
844 | TP_ARGS(inode), | ||
845 | |||
846 | TP_STRUCT__entry( | ||
847 | __field( ino_t, ino ) | ||
848 | __field( dev_t, dev ) | ||
849 | ), | ||
850 | |||
851 | TP_fast_assign( | ||
852 | __entry->ino = inode->i_ino; | ||
853 | __entry->dev = inode->i_sb->s_dev; | ||
854 | ), | ||
855 | |||
856 | TP_printk("dev %d,%d ino %lu", | ||
857 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
858 | (unsigned long) __entry->ino) | ||
859 | ); | ||
860 | |||
861 | #endif /* _TRACE_EXT3_H */ | ||
862 | |||
863 | /* This part must be outside protection */ | ||
864 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 5ce2b2f5f524..6363193a3418 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -380,7 +380,6 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
380 | __field( int, pages_written ) | 380 | __field( int, pages_written ) |
381 | __field( long, pages_skipped ) | 381 | __field( long, pages_skipped ) |
382 | __field( int, sync_mode ) | 382 | __field( int, sync_mode ) |
383 | __field( char, more_io ) | ||
384 | __field( pgoff_t, writeback_index ) | 383 | __field( pgoff_t, writeback_index ) |
385 | ), | 384 | ), |
386 | 385 | ||
@@ -391,16 +390,15 @@ TRACE_EVENT(ext4_da_writepages_result, | |||
391 | __entry->pages_written = pages_written; | 390 | __entry->pages_written = pages_written; |
392 | __entry->pages_skipped = wbc->pages_skipped; | 391 | __entry->pages_skipped = wbc->pages_skipped; |
393 | __entry->sync_mode = wbc->sync_mode; | 392 | __entry->sync_mode = wbc->sync_mode; |
394 | __entry->more_io = wbc->more_io; | ||
395 | __entry->writeback_index = inode->i_mapping->writeback_index; | 393 | __entry->writeback_index = inode->i_mapping->writeback_index; |
396 | ), | 394 | ), |
397 | 395 | ||
398 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " | 396 | TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " |
399 | " more_io %d sync_mode %d writeback_index %lu", | 397 | "sync_mode %d writeback_index %lu", |
400 | MAJOR(__entry->dev), MINOR(__entry->dev), | 398 | MAJOR(__entry->dev), MINOR(__entry->dev), |
401 | (unsigned long) __entry->ino, __entry->ret, | 399 | (unsigned long) __entry->ino, __entry->ret, |
402 | __entry->pages_written, __entry->pages_skipped, | 400 | __entry->pages_written, __entry->pages_skipped, |
403 | __entry->more_io, __entry->sync_mode, | 401 | __entry->sync_mode, |
404 | (unsigned long) __entry->writeback_index) | 402 | (unsigned long) __entry->writeback_index) |
405 | ); | 403 | ); |
406 | 404 | ||
diff --git a/include/trace/events/jbd.h b/include/trace/events/jbd.h new file mode 100644 index 000000000000..aff64d82d713 --- /dev/null +++ b/include/trace/events/jbd.h | |||
@@ -0,0 +1,203 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM jbd | ||
3 | |||
4 | #if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_JBD_H | ||
6 | |||
7 | #include <linux/jbd.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | |||
10 | TRACE_EVENT(jbd_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 %d,%d result %d", | ||
27 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
28 | __entry->result) | ||
29 | ); | ||
30 | |||
31 | DECLARE_EVENT_CLASS(jbd_commit, | ||
32 | |||
33 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
34 | |||
35 | TP_ARGS(journal, commit_transaction), | ||
36 | |||
37 | TP_STRUCT__entry( | ||
38 | __field( dev_t, dev ) | ||
39 | __field( char, sync_commit ) | ||
40 | __field( int, transaction ) | ||
41 | ), | ||
42 | |||
43 | TP_fast_assign( | ||
44 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
45 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
46 | __entry->transaction = commit_transaction->t_tid; | ||
47 | ), | ||
48 | |||
49 | TP_printk("dev %d,%d transaction %d sync %d", | ||
50 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
51 | __entry->transaction, __entry->sync_commit) | ||
52 | ); | ||
53 | |||
54 | DEFINE_EVENT(jbd_commit, jbd_start_commit, | ||
55 | |||
56 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
57 | |||
58 | TP_ARGS(journal, commit_transaction) | ||
59 | ); | ||
60 | |||
61 | DEFINE_EVENT(jbd_commit, jbd_commit_locking, | ||
62 | |||
63 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
64 | |||
65 | TP_ARGS(journal, commit_transaction) | ||
66 | ); | ||
67 | |||
68 | DEFINE_EVENT(jbd_commit, jbd_commit_flushing, | ||
69 | |||
70 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
71 | |||
72 | TP_ARGS(journal, commit_transaction) | ||
73 | ); | ||
74 | |||
75 | DEFINE_EVENT(jbd_commit, jbd_commit_logging, | ||
76 | |||
77 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
78 | |||
79 | TP_ARGS(journal, commit_transaction) | ||
80 | ); | ||
81 | |||
82 | TRACE_EVENT(jbd_drop_transaction, | ||
83 | |||
84 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
85 | |||
86 | TP_ARGS(journal, commit_transaction), | ||
87 | |||
88 | TP_STRUCT__entry( | ||
89 | __field( dev_t, dev ) | ||
90 | __field( char, sync_commit ) | ||
91 | __field( int, transaction ) | ||
92 | ), | ||
93 | |||
94 | TP_fast_assign( | ||
95 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
96 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
97 | __entry->transaction = commit_transaction->t_tid; | ||
98 | ), | ||
99 | |||
100 | TP_printk("dev %d,%d transaction %d sync %d", | ||
101 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
102 | __entry->transaction, __entry->sync_commit) | ||
103 | ); | ||
104 | |||
105 | TRACE_EVENT(jbd_end_commit, | ||
106 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
107 | |||
108 | TP_ARGS(journal, commit_transaction), | ||
109 | |||
110 | TP_STRUCT__entry( | ||
111 | __field( dev_t, dev ) | ||
112 | __field( char, sync_commit ) | ||
113 | __field( int, transaction ) | ||
114 | __field( int, head ) | ||
115 | ), | ||
116 | |||
117 | TP_fast_assign( | ||
118 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
119 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
120 | __entry->transaction = commit_transaction->t_tid; | ||
121 | __entry->head = journal->j_tail_sequence; | ||
122 | ), | ||
123 | |||
124 | TP_printk("dev %d,%d transaction %d sync %d head %d", | ||
125 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
126 | __entry->transaction, __entry->sync_commit, __entry->head) | ||
127 | ); | ||
128 | |||
129 | TRACE_EVENT(jbd_do_submit_data, | ||
130 | TP_PROTO(journal_t *journal, transaction_t *commit_transaction), | ||
131 | |||
132 | TP_ARGS(journal, commit_transaction), | ||
133 | |||
134 | TP_STRUCT__entry( | ||
135 | __field( dev_t, dev ) | ||
136 | __field( char, sync_commit ) | ||
137 | __field( int, transaction ) | ||
138 | ), | ||
139 | |||
140 | TP_fast_assign( | ||
141 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
142 | __entry->sync_commit = commit_transaction->t_synchronous_commit; | ||
143 | __entry->transaction = commit_transaction->t_tid; | ||
144 | ), | ||
145 | |||
146 | TP_printk("dev %d,%d transaction %d sync %d", | ||
147 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
148 | __entry->transaction, __entry->sync_commit) | ||
149 | ); | ||
150 | |||
151 | TRACE_EVENT(jbd_cleanup_journal_tail, | ||
152 | |||
153 | TP_PROTO(journal_t *journal, tid_t first_tid, | ||
154 | unsigned long block_nr, unsigned long freed), | ||
155 | |||
156 | TP_ARGS(journal, first_tid, block_nr, freed), | ||
157 | |||
158 | TP_STRUCT__entry( | ||
159 | __field( dev_t, dev ) | ||
160 | __field( tid_t, tail_sequence ) | ||
161 | __field( tid_t, first_tid ) | ||
162 | __field(unsigned long, block_nr ) | ||
163 | __field(unsigned long, freed ) | ||
164 | ), | ||
165 | |||
166 | TP_fast_assign( | ||
167 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
168 | __entry->tail_sequence = journal->j_tail_sequence; | ||
169 | __entry->first_tid = first_tid; | ||
170 | __entry->block_nr = block_nr; | ||
171 | __entry->freed = freed; | ||
172 | ), | ||
173 | |||
174 | TP_printk("dev %d,%d from %u to %u offset %lu freed %lu", | ||
175 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
176 | __entry->tail_sequence, __entry->first_tid, | ||
177 | __entry->block_nr, __entry->freed) | ||
178 | ); | ||
179 | |||
180 | TRACE_EVENT(jbd_update_superblock_end, | ||
181 | TP_PROTO(journal_t *journal, int wait), | ||
182 | |||
183 | TP_ARGS(journal, wait), | ||
184 | |||
185 | TP_STRUCT__entry( | ||
186 | __field( dev_t, dev ) | ||
187 | __field( int, wait ) | ||
188 | ), | ||
189 | |||
190 | TP_fast_assign( | ||
191 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
192 | __entry->wait = wait; | ||
193 | ), | ||
194 | |||
195 | TP_printk("dev %d,%d wait %d", | ||
196 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
197 | __entry->wait) | ||
198 | ); | ||
199 | |||
200 | #endif /* _TRACE_JBD_H */ | ||
201 | |||
202 | /* This part must be outside protection */ | ||
203 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 4e249b927eaa..6bca4cc0063c 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -8,6 +8,19 @@ | |||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/writeback.h> | 9 | #include <linux/writeback.h> |
10 | 10 | ||
11 | #define show_inode_state(state) \ | ||
12 | __print_flags(state, "|", \ | ||
13 | {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \ | ||
14 | {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \ | ||
15 | {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \ | ||
16 | {I_NEW, "I_NEW"}, \ | ||
17 | {I_WILL_FREE, "I_WILL_FREE"}, \ | ||
18 | {I_FREEING, "I_FREEING"}, \ | ||
19 | {I_CLEAR, "I_CLEAR"}, \ | ||
20 | {I_SYNC, "I_SYNC"}, \ | ||
21 | {I_REFERENCED, "I_REFERENCED"} \ | ||
22 | ) | ||
23 | |||
11 | struct wb_writeback_work; | 24 | struct wb_writeback_work; |
12 | 25 | ||
13 | DECLARE_EVENT_CLASS(writeback_work_class, | 26 | DECLARE_EVENT_CLASS(writeback_work_class, |
@@ -49,6 +62,9 @@ DEFINE_EVENT(writeback_work_class, name, \ | |||
49 | DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread); | 62 | DEFINE_WRITEBACK_WORK_EVENT(writeback_nothread); |
50 | DEFINE_WRITEBACK_WORK_EVENT(writeback_queue); | 63 | DEFINE_WRITEBACK_WORK_EVENT(writeback_queue); |
51 | DEFINE_WRITEBACK_WORK_EVENT(writeback_exec); | 64 | DEFINE_WRITEBACK_WORK_EVENT(writeback_exec); |
65 | DEFINE_WRITEBACK_WORK_EVENT(writeback_start); | ||
66 | DEFINE_WRITEBACK_WORK_EVENT(writeback_written); | ||
67 | DEFINE_WRITEBACK_WORK_EVENT(writeback_wait); | ||
52 | 68 | ||
53 | TRACE_EVENT(writeback_pages_written, | 69 | TRACE_EVENT(writeback_pages_written, |
54 | TP_PROTO(long pages_written), | 70 | TP_PROTO(long pages_written), |
@@ -88,6 +104,30 @@ DEFINE_WRITEBACK_EVENT(writeback_bdi_register); | |||
88 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); | 104 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); |
89 | DEFINE_WRITEBACK_EVENT(writeback_thread_start); | 105 | DEFINE_WRITEBACK_EVENT(writeback_thread_start); |
90 | DEFINE_WRITEBACK_EVENT(writeback_thread_stop); | 106 | DEFINE_WRITEBACK_EVENT(writeback_thread_stop); |
107 | DEFINE_WRITEBACK_EVENT(balance_dirty_start); | ||
108 | DEFINE_WRITEBACK_EVENT(balance_dirty_wait); | ||
109 | |||
110 | TRACE_EVENT(balance_dirty_written, | ||
111 | |||
112 | TP_PROTO(struct backing_dev_info *bdi, int written), | ||
113 | |||
114 | TP_ARGS(bdi, written), | ||
115 | |||
116 | TP_STRUCT__entry( | ||
117 | __array(char, name, 32) | ||
118 | __field(int, written) | ||
119 | ), | ||
120 | |||
121 | TP_fast_assign( | ||
122 | strncpy(__entry->name, dev_name(bdi->dev), 32); | ||
123 | __entry->written = written; | ||
124 | ), | ||
125 | |||
126 | TP_printk("bdi %s written %d", | ||
127 | __entry->name, | ||
128 | __entry->written | ||
129 | ) | ||
130 | ); | ||
91 | 131 | ||
92 | DECLARE_EVENT_CLASS(wbc_class, | 132 | DECLARE_EVENT_CLASS(wbc_class, |
93 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), | 133 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), |
@@ -101,8 +141,6 @@ DECLARE_EVENT_CLASS(wbc_class, | |||
101 | __field(int, for_background) | 141 | __field(int, for_background) |
102 | __field(int, for_reclaim) | 142 | __field(int, for_reclaim) |
103 | __field(int, range_cyclic) | 143 | __field(int, range_cyclic) |
104 | __field(int, more_io) | ||
105 | __field(unsigned long, older_than_this) | ||
106 | __field(long, range_start) | 144 | __field(long, range_start) |
107 | __field(long, range_end) | 145 | __field(long, range_end) |
108 | ), | 146 | ), |
@@ -116,15 +154,12 @@ DECLARE_EVENT_CLASS(wbc_class, | |||
116 | __entry->for_background = wbc->for_background; | 154 | __entry->for_background = wbc->for_background; |
117 | __entry->for_reclaim = wbc->for_reclaim; | 155 | __entry->for_reclaim = wbc->for_reclaim; |
118 | __entry->range_cyclic = wbc->range_cyclic; | 156 | __entry->range_cyclic = wbc->range_cyclic; |
119 | __entry->more_io = wbc->more_io; | ||
120 | __entry->older_than_this = wbc->older_than_this ? | ||
121 | *wbc->older_than_this : 0; | ||
122 | __entry->range_start = (long)wbc->range_start; | 157 | __entry->range_start = (long)wbc->range_start; |
123 | __entry->range_end = (long)wbc->range_end; | 158 | __entry->range_end = (long)wbc->range_end; |
124 | ), | 159 | ), |
125 | 160 | ||
126 | TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d " | 161 | TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d " |
127 | "bgrd=%d reclm=%d cyclic=%d more=%d older=0x%lx " | 162 | "bgrd=%d reclm=%d cyclic=%d " |
128 | "start=0x%lx end=0x%lx", | 163 | "start=0x%lx end=0x%lx", |
129 | __entry->name, | 164 | __entry->name, |
130 | __entry->nr_to_write, | 165 | __entry->nr_to_write, |
@@ -134,8 +169,6 @@ DECLARE_EVENT_CLASS(wbc_class, | |||
134 | __entry->for_background, | 169 | __entry->for_background, |
135 | __entry->for_reclaim, | 170 | __entry->for_reclaim, |
136 | __entry->range_cyclic, | 171 | __entry->range_cyclic, |
137 | __entry->more_io, | ||
138 | __entry->older_than_this, | ||
139 | __entry->range_start, | 172 | __entry->range_start, |
140 | __entry->range_end) | 173 | __entry->range_end) |
141 | ) | 174 | ) |
@@ -144,14 +177,79 @@ DECLARE_EVENT_CLASS(wbc_class, | |||
144 | DEFINE_EVENT(wbc_class, name, \ | 177 | DEFINE_EVENT(wbc_class, name, \ |
145 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \ | 178 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \ |
146 | TP_ARGS(wbc, bdi)) | 179 | TP_ARGS(wbc, bdi)) |
147 | DEFINE_WBC_EVENT(wbc_writeback_start); | ||
148 | DEFINE_WBC_EVENT(wbc_writeback_written); | ||
149 | DEFINE_WBC_EVENT(wbc_writeback_wait); | ||
150 | DEFINE_WBC_EVENT(wbc_balance_dirty_start); | ||
151 | DEFINE_WBC_EVENT(wbc_balance_dirty_written); | ||
152 | DEFINE_WBC_EVENT(wbc_balance_dirty_wait); | ||
153 | DEFINE_WBC_EVENT(wbc_writepage); | 180 | DEFINE_WBC_EVENT(wbc_writepage); |
154 | 181 | ||
182 | TRACE_EVENT(writeback_queue_io, | ||
183 | TP_PROTO(struct bdi_writeback *wb, | ||
184 | unsigned long *older_than_this, | ||
185 | int moved), | ||
186 | TP_ARGS(wb, older_than_this, moved), | ||
187 | TP_STRUCT__entry( | ||
188 | __array(char, name, 32) | ||
189 | __field(unsigned long, older) | ||
190 | __field(long, age) | ||
191 | __field(int, moved) | ||
192 | ), | ||
193 | TP_fast_assign( | ||
194 | strncpy(__entry->name, dev_name(wb->bdi->dev), 32); | ||
195 | __entry->older = older_than_this ? *older_than_this : 0; | ||
196 | __entry->age = older_than_this ? | ||
197 | (jiffies - *older_than_this) * 1000 / HZ : -1; | ||
198 | __entry->moved = moved; | ||
199 | ), | ||
200 | TP_printk("bdi %s: older=%lu age=%ld enqueue=%d", | ||
201 | __entry->name, | ||
202 | __entry->older, /* older_than_this in jiffies */ | ||
203 | __entry->age, /* older_than_this in relative milliseconds */ | ||
204 | __entry->moved) | ||
205 | ); | ||
206 | |||
207 | TRACE_EVENT(global_dirty_state, | ||
208 | |||
209 | TP_PROTO(unsigned long background_thresh, | ||
210 | unsigned long dirty_thresh | ||
211 | ), | ||
212 | |||
213 | TP_ARGS(background_thresh, | ||
214 | dirty_thresh | ||
215 | ), | ||
216 | |||
217 | TP_STRUCT__entry( | ||
218 | __field(unsigned long, nr_dirty) | ||
219 | __field(unsigned long, nr_writeback) | ||
220 | __field(unsigned long, nr_unstable) | ||
221 | __field(unsigned long, background_thresh) | ||
222 | __field(unsigned long, dirty_thresh) | ||
223 | __field(unsigned long, dirty_limit) | ||
224 | __field(unsigned long, nr_dirtied) | ||
225 | __field(unsigned long, nr_written) | ||
226 | ), | ||
227 | |||
228 | TP_fast_assign( | ||
229 | __entry->nr_dirty = global_page_state(NR_FILE_DIRTY); | ||
230 | __entry->nr_writeback = global_page_state(NR_WRITEBACK); | ||
231 | __entry->nr_unstable = global_page_state(NR_UNSTABLE_NFS); | ||
232 | __entry->nr_dirtied = global_page_state(NR_DIRTIED); | ||
233 | __entry->nr_written = global_page_state(NR_WRITTEN); | ||
234 | __entry->background_thresh = background_thresh; | ||
235 | __entry->dirty_thresh = dirty_thresh; | ||
236 | __entry->dirty_limit = global_dirty_limit; | ||
237 | ), | ||
238 | |||
239 | TP_printk("dirty=%lu writeback=%lu unstable=%lu " | ||
240 | "bg_thresh=%lu thresh=%lu limit=%lu " | ||
241 | "dirtied=%lu written=%lu", | ||
242 | __entry->nr_dirty, | ||
243 | __entry->nr_writeback, | ||
244 | __entry->nr_unstable, | ||
245 | __entry->background_thresh, | ||
246 | __entry->dirty_thresh, | ||
247 | __entry->dirty_limit, | ||
248 | __entry->nr_dirtied, | ||
249 | __entry->nr_written | ||
250 | ) | ||
251 | ); | ||
252 | |||
155 | DECLARE_EVENT_CLASS(writeback_congest_waited_template, | 253 | DECLARE_EVENT_CLASS(writeback_congest_waited_template, |
156 | 254 | ||
157 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | 255 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), |
@@ -187,6 +285,63 @@ DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested, | |||
187 | TP_ARGS(usec_timeout, usec_delayed) | 285 | TP_ARGS(usec_timeout, usec_delayed) |
188 | ); | 286 | ); |
189 | 287 | ||
288 | DECLARE_EVENT_CLASS(writeback_single_inode_template, | ||
289 | |||
290 | TP_PROTO(struct inode *inode, | ||
291 | struct writeback_control *wbc, | ||
292 | unsigned long nr_to_write | ||
293 | ), | ||
294 | |||
295 | TP_ARGS(inode, wbc, nr_to_write), | ||
296 | |||
297 | TP_STRUCT__entry( | ||
298 | __array(char, name, 32) | ||
299 | __field(unsigned long, ino) | ||
300 | __field(unsigned long, state) | ||
301 | __field(unsigned long, age) | ||
302 | __field(unsigned long, writeback_index) | ||
303 | __field(long, nr_to_write) | ||
304 | __field(unsigned long, wrote) | ||
305 | ), | ||
306 | |||
307 | TP_fast_assign( | ||
308 | strncpy(__entry->name, | ||
309 | dev_name(inode->i_mapping->backing_dev_info->dev), 32); | ||
310 | __entry->ino = inode->i_ino; | ||
311 | __entry->state = inode->i_state; | ||
312 | __entry->age = (jiffies - inode->dirtied_when) * | ||
313 | 1000 / HZ; | ||
314 | __entry->writeback_index = inode->i_mapping->writeback_index; | ||
315 | __entry->nr_to_write = nr_to_write; | ||
316 | __entry->wrote = nr_to_write - wbc->nr_to_write; | ||
317 | ), | ||
318 | |||
319 | TP_printk("bdi %s: ino=%lu state=%s age=%lu " | ||
320 | "index=%lu to_write=%ld wrote=%lu", | ||
321 | __entry->name, | ||
322 | __entry->ino, | ||
323 | show_inode_state(__entry->state), | ||
324 | __entry->age, | ||
325 | __entry->writeback_index, | ||
326 | __entry->nr_to_write, | ||
327 | __entry->wrote | ||
328 | ) | ||
329 | ); | ||
330 | |||
331 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode_requeue, | ||
332 | TP_PROTO(struct inode *inode, | ||
333 | struct writeback_control *wbc, | ||
334 | unsigned long nr_to_write), | ||
335 | TP_ARGS(inode, wbc, nr_to_write) | ||
336 | ); | ||
337 | |||
338 | DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode, | ||
339 | TP_PROTO(struct inode *inode, | ||
340 | struct writeback_control *wbc, | ||
341 | unsigned long nr_to_write), | ||
342 | TP_ARGS(inode, wbc, nr_to_write) | ||
343 | ); | ||
344 | |||
190 | #endif /* _TRACE_WRITEBACK_H */ | 345 | #endif /* _TRACE_WRITEBACK_H */ |
191 | 346 | ||
192 | /* This part must be outside protection */ | 347 | /* This part must be outside protection */ |
diff --git a/include/xen/balloon.h b/include/xen/balloon.h index 4076ed72afbd..76f7538bb339 100644 --- a/include/xen/balloon.h +++ b/include/xen/balloon.h | |||
@@ -15,6 +15,10 @@ struct balloon_stats { | |||
15 | unsigned long max_schedule_delay; | 15 | unsigned long max_schedule_delay; |
16 | unsigned long retry_count; | 16 | unsigned long retry_count; |
17 | unsigned long max_retry_count; | 17 | unsigned long max_retry_count; |
18 | #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG | ||
19 | unsigned long hotplug_pages; | ||
20 | unsigned long balloon_hotplug; | ||
21 | #endif | ||
18 | }; | 22 | }; |
19 | 23 | ||
20 | extern struct balloon_stats balloon_stats; | 24 | extern struct balloon_stats balloon_stats; |