diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 11:37:49 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-05-02 11:54:19 -0400 |
commit | c032862fba51a3ca504752d3a25186b324c5ce83 (patch) | |
tree | 955dc2ba4ab3df76ecc2bb780ee84aca04967e8d /include | |
parent | fda76e074c7737fc57855dd17c762e50ed526052 (diff) | |
parent | 8700c95adb033843fc163d112b9d21d4fda78018 (diff) |
Merge commit '8700c95adb03' into timers/nohz
The full dynticks tree needs the latest RCU and sched
upstream updates in order to fix some dependencies.
Merge a common upstream merge point that has these
updates.
Conflicts:
include/linux/perf_event.h
kernel/rcutree.h
kernel/rcutree_plugin.h
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include')
217 files changed, 3517 insertions, 1120 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index e65278f560c4..22ba56e834e2 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -437,11 +437,9 @@ void acpi_remove_dir(struct acpi_device *); | |||
437 | */ | 437 | */ |
438 | struct acpi_bus_type { | 438 | struct acpi_bus_type { |
439 | struct list_head list; | 439 | struct list_head list; |
440 | struct bus_type *bus; | 440 | const char *name; |
441 | /* For general devices under the bus */ | 441 | bool (*match)(struct device *dev); |
442 | int (*find_device) (struct device *, acpi_handle *); | 442 | int (*find_device) (struct device *, acpi_handle *); |
443 | /* For bridges, such as PCI root bridge, IDE controller */ | ||
444 | int (*find_bridge) (struct device *, acpi_handle *); | ||
445 | void (*setup)(struct device *); | 443 | void (*setup)(struct device *); |
446 | void (*cleanup)(struct device *); | 444 | void (*cleanup)(struct device *); |
447 | }; | 445 | }; |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 555d0337ad95..b327b5a9296d 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -235,6 +235,9 @@ extern void acpi_processor_unregister_performance(struct | |||
235 | if a _PPC object exists, rmmod is disallowed then */ | 235 | if a _PPC object exists, rmmod is disallowed then */ |
236 | int acpi_processor_notify_smm(struct module *calling_module); | 236 | int acpi_processor_notify_smm(struct module *calling_module); |
237 | 237 | ||
238 | /* parsing the _P* objects. */ | ||
239 | extern int acpi_processor_get_performance_info(struct acpi_processor *pr); | ||
240 | |||
238 | /* for communication between multiple parts of the processor kernel module */ | 241 | /* for communication between multiple parts of the processor kernel module */ |
239 | DECLARE_PER_CPU(struct acpi_processor *, processors); | 242 | DECLARE_PER_CPU(struct acpi_processor *, processors); |
240 | extern struct acpi_processor_errata errata; | 243 | extern struct acpi_processor_errata errata; |
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 1ced6413ea03..33bd2de3bc1e 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -136,12 +136,6 @@ static inline void atomic_dec(atomic_t *v) | |||
136 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) | 136 | #define atomic_xchg(ptr, v) (xchg(&(ptr)->counter, (v))) |
137 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) | 137 | #define atomic_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), (old), (new))) |
138 | 138 | ||
139 | #define cmpxchg_local(ptr, o, n) \ | ||
140 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
141 | (unsigned long)(n), sizeof(*(ptr)))) | ||
142 | |||
143 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
144 | |||
145 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) | 139 | static inline int __atomic_add_unless(atomic_t *v, int a, int u) |
146 | { | 140 | { |
147 | int c, old; | 141 | int c, old; |
diff --git a/include/asm-generic/cmpxchg.h b/include/asm-generic/cmpxchg.h index 14883026015d..811fb1e9b061 100644 --- a/include/asm-generic/cmpxchg.h +++ b/include/asm-generic/cmpxchg.h | |||
@@ -92,6 +92,16 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | |||
92 | */ | 92 | */ |
93 | #include <asm-generic/cmpxchg-local.h> | 93 | #include <asm-generic/cmpxchg-local.h> |
94 | 94 | ||
95 | #ifndef cmpxchg_local | ||
96 | #define cmpxchg_local(ptr, o, n) \ | ||
97 | ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ | ||
98 | (unsigned long)(n), sizeof(*(ptr)))) | ||
99 | #endif | ||
100 | |||
101 | #ifndef cmpxchg64_local | ||
102 | #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) | ||
103 | #endif | ||
104 | |||
95 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) | 105 | #define cmpxchg(ptr, o, n) cmpxchg_local((ptr), (o), (n)) |
96 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) | 106 | #define cmpxchg64(ptr, o, n) cmpxchg64_local((ptr), (o), (n)) |
97 | 107 | ||
diff --git a/include/asm-generic/hugetlb.h b/include/asm-generic/hugetlb.h new file mode 100644 index 000000000000..d06079c774a0 --- /dev/null +++ b/include/asm-generic/hugetlb.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef _ASM_GENERIC_HUGETLB_H | ||
2 | #define _ASM_GENERIC_HUGETLB_H | ||
3 | |||
4 | static inline pte_t mk_huge_pte(struct page *page, pgprot_t pgprot) | ||
5 | { | ||
6 | return mk_pte(page, pgprot); | ||
7 | } | ||
8 | |||
9 | static inline int huge_pte_write(pte_t pte) | ||
10 | { | ||
11 | return pte_write(pte); | ||
12 | } | ||
13 | |||
14 | static inline int huge_pte_dirty(pte_t pte) | ||
15 | { | ||
16 | return pte_dirty(pte); | ||
17 | } | ||
18 | |||
19 | static inline pte_t huge_pte_mkwrite(pte_t pte) | ||
20 | { | ||
21 | return pte_mkwrite(pte); | ||
22 | } | ||
23 | |||
24 | static inline pte_t huge_pte_mkdirty(pte_t pte) | ||
25 | { | ||
26 | return pte_mkdirty(pte); | ||
27 | } | ||
28 | |||
29 | static inline pte_t huge_pte_modify(pte_t pte, pgprot_t newprot) | ||
30 | { | ||
31 | return pte_modify(pte, newprot); | ||
32 | } | ||
33 | |||
34 | static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr, | ||
35 | pte_t *ptep) | ||
36 | { | ||
37 | pte_clear(mm, addr, ptep); | ||
38 | } | ||
39 | |||
40 | #endif /* _ASM_GENERIC_HUGETLB_H */ | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index bfd87685fc1f..a59ff51b0166 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -7,6 +7,16 @@ | |||
7 | #include <linux/mm_types.h> | 7 | #include <linux/mm_types.h> |
8 | #include <linux/bug.h> | 8 | #include <linux/bug.h> |
9 | 9 | ||
10 | /* | ||
11 | * On almost all architectures and configurations, 0 can be used as the | ||
12 | * upper ceiling to free_pgtables(): on many architectures it has the same | ||
13 | * effect as using TASK_SIZE. However, there is one configuration which | ||
14 | * must impose a more careful limit, to avoid freeing kernel pgtables. | ||
15 | */ | ||
16 | #ifndef USER_PGTABLES_CEILING | ||
17 | #define USER_PGTABLES_CEILING 0UL | ||
18 | #endif | ||
19 | |||
10 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS | 20 | #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS |
11 | extern int ptep_set_access_flags(struct vm_area_struct *vma, | 21 | extern int ptep_set_access_flags(struct vm_area_struct *vma, |
12 | unsigned long address, pte_t *ptep, | 22 | unsigned long address, pte_t *ptep, |
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 25f01d0bc149..b1b1fa6ffffe 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h | |||
@@ -99,7 +99,12 @@ struct mmu_gather { | |||
99 | unsigned int need_flush : 1, /* Did free PTEs */ | 99 | unsigned int need_flush : 1, /* Did free PTEs */ |
100 | fast_mode : 1; /* No batching */ | 100 | fast_mode : 1; /* No batching */ |
101 | 101 | ||
102 | unsigned int fullmm; | 102 | /* we are in the middle of an operation to clear |
103 | * a full mm and can make some optimizations */ | ||
104 | unsigned int fullmm : 1, | ||
105 | /* we have performed an operation which | ||
106 | * requires a complete flush of the tlb */ | ||
107 | need_flush_all : 1; | ||
103 | 108 | ||
104 | struct mmu_gather_batch *active; | 109 | struct mmu_gather_batch *active; |
105 | struct mmu_gather_batch local; | 110 | struct mmu_gather_batch local; |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 8839b3a24660..e3e0d651c6ca 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -443,12 +443,12 @@ struct drm_crtc { | |||
443 | * @dpms: set power state (see drm_crtc_funcs above) | 443 | * @dpms: set power state (see drm_crtc_funcs above) |
444 | * @save: save connector state | 444 | * @save: save connector state |
445 | * @restore: restore connector state | 445 | * @restore: restore connector state |
446 | * @reset: reset connector after state has been invalidate (e.g. resume) | 446 | * @reset: reset connector after state has been invalidated (e.g. resume) |
447 | * @detect: is this connector active? | 447 | * @detect: is this connector active? |
448 | * @fill_modes: fill mode list for this connector | 448 | * @fill_modes: fill mode list for this connector |
449 | * @set_property: property for this connector may need update | 449 | * @set_property: property for this connector may need an update |
450 | * @destroy: make object go away | 450 | * @destroy: make object go away |
451 | * @force: notify the driver the connector is forced on | 451 | * @force: notify the driver that the connector is forced on |
452 | * | 452 | * |
453 | * Each CRTC may have one or more connectors attached to it. The functions | 453 | * Each CRTC may have one or more connectors attached to it. The functions |
454 | * below allow the core DRM code to control connectors, enumerate available modes, | 454 | * below allow the core DRM code to control connectors, enumerate available modes, |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index a386b0b654cc..918e8fe2f5e9 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -581,7 +581,11 @@ | |||
581 | {0x1002, 0x9908, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 581 | {0x1002, 0x9908, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
582 | {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 582 | {0x1002, 0x9909, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
583 | {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 583 | {0x1002, 0x990A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
584 | {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 584 | {0x1002, 0x990B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
585 | {0x1002, 0x990C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
586 | {0x1002, 0x990D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
587 | {0x1002, 0x990E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
588 | {0x1002, 0x990F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
585 | {0x1002, 0x9910, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 589 | {0x1002, 0x9910, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
586 | {0x1002, 0x9913, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 590 | {0x1002, 0x9913, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
587 | {0x1002, 0x9917, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 591 | {0x1002, 0x9917, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
@@ -592,6 +596,13 @@ | |||
592 | {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 596 | {0x1002, 0x9992, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
593 | {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 597 | {0x1002, 0x9993, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
594 | {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 598 | {0x1002, 0x9994, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
599 | {0x1002, 0x9995, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
600 | {0x1002, 0x9996, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
601 | {0x1002, 0x9997, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
602 | {0x1002, 0x9998, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
603 | {0x1002, 0x9999, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
604 | {0x1002, 0x999A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
605 | {0x1002, 0x999B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | ||
595 | {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 606 | {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
596 | {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 607 | {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
597 | {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ | 608 | {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index bcbdd7484e58..03053aca5b32 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -152,15 +152,6 @@ void acpi_penalize_isa_irq(int irq, int active); | |||
152 | 152 | ||
153 | void acpi_pci_irq_disable (struct pci_dev *dev); | 153 | void acpi_pci_irq_disable (struct pci_dev *dev); |
154 | 154 | ||
155 | struct acpi_pci_driver { | ||
156 | struct list_head node; | ||
157 | int (*add)(struct acpi_pci_root *root); | ||
158 | void (*remove)(struct acpi_pci_root *root); | ||
159 | }; | ||
160 | |||
161 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | ||
162 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); | ||
163 | |||
164 | extern int ec_read(u8 addr, u8 *val); | 155 | extern int ec_read(u8 addr, u8 *val); |
165 | extern int ec_write(u8 addr, u8 val); | 156 | extern int ec_write(u8 addr, u8 val); |
166 | extern int ec_transaction(u8 command, | 157 | extern int ec_transaction(u8 command, |
diff --git a/include/linux/amba/serial.h b/include/linux/amba/serial.h index f612c783170f..62d9303c2837 100644 --- a/include/linux/amba/serial.h +++ b/include/linux/amba/serial.h | |||
@@ -203,6 +203,9 @@ struct amba_pl011_data { | |||
203 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); | 203 | bool (*dma_filter)(struct dma_chan *chan, void *filter_param); |
204 | void *dma_rx_param; | 204 | void *dma_rx_param; |
205 | void *dma_tx_param; | 205 | void *dma_tx_param; |
206 | bool dma_rx_poll_enable; | ||
207 | unsigned int dma_rx_poll_rate; | ||
208 | unsigned int dma_rx_poll_timeout; | ||
206 | void (*init) (void); | 209 | void (*init) (void); |
207 | void (*exit) (void); | 210 | void (*exit) (void); |
208 | }; | 211 | }; |
diff --git a/include/linux/async.h b/include/linux/async.h index a2e3f18b2ad6..6b0226bdaadc 100644 --- a/include/linux/async.h +++ b/include/linux/async.h | |||
@@ -16,9 +16,8 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | 17 | ||
18 | typedef u64 async_cookie_t; | 18 | typedef u64 async_cookie_t; |
19 | typedef void (async_func_ptr) (void *data, async_cookie_t cookie); | 19 | typedef void (*async_func_t) (void *data, async_cookie_t cookie); |
20 | struct async_domain { | 20 | struct async_domain { |
21 | struct list_head node; | ||
22 | struct list_head pending; | 21 | struct list_head pending; |
23 | unsigned registered:1; | 22 | unsigned registered:1; |
24 | }; | 23 | }; |
@@ -27,8 +26,7 @@ struct async_domain { | |||
27 | * domain participates in global async_synchronize_full | 26 | * domain participates in global async_synchronize_full |
28 | */ | 27 | */ |
29 | #define ASYNC_DOMAIN(_name) \ | 28 | #define ASYNC_DOMAIN(_name) \ |
30 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | 29 | struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending), \ |
31 | .pending = LIST_HEAD_INIT(_name.pending), \ | ||
32 | .registered = 1 } | 30 | .registered = 1 } |
33 | 31 | ||
34 | /* | 32 | /* |
@@ -36,12 +34,11 @@ struct async_domain { | |||
36 | * complete, this domain does not participate in async_synchronize_full | 34 | * complete, this domain does not participate in async_synchronize_full |
37 | */ | 35 | */ |
38 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ | 36 | #define ASYNC_DOMAIN_EXCLUSIVE(_name) \ |
39 | struct async_domain _name = { .node = LIST_HEAD_INIT(_name.node), \ | 37 | struct async_domain _name = { .pending = LIST_HEAD_INIT(_name.pending), \ |
40 | .pending = LIST_HEAD_INIT(_name.pending), \ | ||
41 | .registered = 0 } | 38 | .registered = 0 } |
42 | 39 | ||
43 | extern async_cookie_t async_schedule(async_func_ptr *ptr, void *data); | 40 | extern async_cookie_t async_schedule(async_func_t func, void *data); |
44 | extern async_cookie_t async_schedule_domain(async_func_ptr *ptr, void *data, | 41 | extern async_cookie_t async_schedule_domain(async_func_t func, void *data, |
45 | struct async_domain *domain); | 42 | struct async_domain *domain); |
46 | void async_unregister_domain(struct async_domain *domain); | 43 | void async_unregister_domain(struct async_domain *domain); |
47 | extern void async_synchronize_full(void); | 44 | extern void async_synchronize_full(void); |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 8f7a3d68371a..ee0bd9524055 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -954,7 +954,7 @@ static inline int atapi_cdb_len(const u16 *dev_id) | |||
954 | } | 954 | } |
955 | } | 955 | } |
956 | 956 | ||
957 | static inline bool atapi_command_packet_set(const u16 *dev_id) | 957 | static inline int atapi_command_packet_set(const u16 *dev_id) |
958 | { | 958 | { |
959 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; | 959 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; |
960 | } | 960 | } |
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h index cdf11191e645..22990cf4439d 100644 --- a/include/linux/blk_types.h +++ b/include/linux/blk_types.h | |||
@@ -111,12 +111,13 @@ struct bio { | |||
111 | #define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */ | 111 | #define BIO_FS_INTEGRITY 9 /* fs owns integrity data, not block layer */ |
112 | #define BIO_QUIET 10 /* Make BIO Quiet */ | 112 | #define BIO_QUIET 10 /* Make BIO Quiet */ |
113 | #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */ | 113 | #define BIO_MAPPED_INTEGRITY 11/* integrity metadata has been remapped */ |
114 | #define BIO_SNAP_STABLE 12 /* bio data must be snapshotted during write */ | ||
114 | 115 | ||
115 | /* | 116 | /* |
116 | * Flags starting here get preserved by bio_reset() - this includes | 117 | * Flags starting here get preserved by bio_reset() - this includes |
117 | * BIO_POOL_IDX() | 118 | * BIO_POOL_IDX() |
118 | */ | 119 | */ |
119 | #define BIO_RESET_BITS 12 | 120 | #define BIO_RESET_BITS 13 |
120 | 121 | ||
121 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) | 122 | #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag))) |
122 | 123 | ||
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 0ea61e07a91c..7c2e030e72f1 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | struct blk_trace { | 13 | struct blk_trace { |
14 | int trace_state; | 14 | int trace_state; |
15 | bool rq_based; | ||
16 | struct rchan *rchan; | 15 | struct rchan *rchan; |
17 | unsigned long __percpu *sequence; | 16 | unsigned long __percpu *sequence; |
18 | unsigned char __percpu *msg_data; | 17 | unsigned char __percpu *msg_data; |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index cdc3bab01832..5f0b0e1f7c08 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -44,7 +44,6 @@ extern unsigned long init_bootmem_node(pg_data_t *pgdat, | |||
44 | unsigned long endpfn); | 44 | unsigned long endpfn); |
45 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); | 45 | extern unsigned long init_bootmem(unsigned long addr, unsigned long memend); |
46 | 46 | ||
47 | extern unsigned long free_low_memory_core_early(int nodeid); | ||
48 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); | 47 | extern unsigned long free_all_bootmem_node(pg_data_t *pgdat); |
49 | extern unsigned long free_all_bootmem(void); | 48 | extern unsigned long free_all_bootmem(void); |
50 | 49 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5afc4f94d110..4c16c4a88d47 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -181,6 +181,7 @@ void ll_rw_block(int, int, struct buffer_head * bh[]); | |||
181 | int sync_dirty_buffer(struct buffer_head *bh); | 181 | int sync_dirty_buffer(struct buffer_head *bh); |
182 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); | 182 | int __sync_dirty_buffer(struct buffer_head *bh, int rw); |
183 | void write_dirty_buffer(struct buffer_head *bh, int rw); | 183 | void write_dirty_buffer(struct buffer_head *bh, int rw); |
184 | int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags); | ||
184 | int submit_bh(int, struct buffer_head *); | 185 | int submit_bh(int, struct buffer_head *); |
185 | void write_boundary_block(struct block_device *bdev, | 186 | void write_boundary_block(struct block_device *bdev, |
186 | sector_t bblock, unsigned blocksize); | 187 | sector_t bblock, unsigned blocksize); |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 98503b792369..d9a4f7f40f32 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -35,6 +35,7 @@ struct cpu_vfs_cap_data { | |||
35 | #define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) | 35 | #define _KERNEL_CAP_T_SIZE (sizeof(kernel_cap_t)) |
36 | 36 | ||
37 | 37 | ||
38 | struct file; | ||
38 | struct inode; | 39 | struct inode; |
39 | struct dentry; | 40 | struct dentry; |
40 | struct user_namespace; | 41 | struct user_namespace; |
@@ -211,6 +212,7 @@ extern bool capable(int cap); | |||
211 | extern bool ns_capable(struct user_namespace *ns, int cap); | 212 | extern bool ns_capable(struct user_namespace *ns, int cap); |
212 | extern bool nsown_capable(int cap); | 213 | extern bool nsown_capable(int cap); |
213 | extern bool inode_capable(const struct inode *inode, int cap); | 214 | extern bool inode_capable(const struct inode *inode, int cap); |
215 | extern bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); | ||
214 | 216 | ||
215 | /* audit system wants to get cap info from files as well */ | 217 | /* audit system wants to get cap info from files as well */ |
216 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); | 218 | extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); |
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 900af5964f55..646ab9d15e42 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/idr.h> | 19 | #include <linux/idr.h> |
20 | #include <linux/workqueue.h> | 20 | #include <linux/workqueue.h> |
21 | #include <linux/xattr.h> | 21 | #include <linux/xattr.h> |
22 | #include <linux/fs.h> | ||
22 | 23 | ||
23 | #ifdef CONFIG_CGROUPS | 24 | #ifdef CONFIG_CGROUPS |
24 | 25 | ||
@@ -30,10 +31,6 @@ struct css_id; | |||
30 | 31 | ||
31 | extern int cgroup_init_early(void); | 32 | extern int cgroup_init_early(void); |
32 | extern int cgroup_init(void); | 33 | extern int cgroup_init(void); |
33 | extern void cgroup_lock(void); | ||
34 | extern int cgroup_lock_is_held(void); | ||
35 | extern bool cgroup_lock_live_group(struct cgroup *cgrp); | ||
36 | extern void cgroup_unlock(void); | ||
37 | extern void cgroup_fork(struct task_struct *p); | 34 | extern void cgroup_fork(struct task_struct *p); |
38 | extern void cgroup_post_fork(struct task_struct *p); | 35 | extern void cgroup_post_fork(struct task_struct *p); |
39 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 36 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); |
@@ -44,14 +41,25 @@ extern void cgroup_unload_subsys(struct cgroup_subsys *ss); | |||
44 | 41 | ||
45 | extern const struct file_operations proc_cgroup_operations; | 42 | extern const struct file_operations proc_cgroup_operations; |
46 | 43 | ||
47 | /* Define the enumeration of all builtin cgroup subsystems */ | 44 | /* |
45 | * Define the enumeration of all cgroup subsystems. | ||
46 | * | ||
47 | * We define ids for builtin subsystems and then modular ones. | ||
48 | */ | ||
48 | #define SUBSYS(_x) _x ## _subsys_id, | 49 | #define SUBSYS(_x) _x ## _subsys_id, |
49 | #define IS_SUBSYS_ENABLED(option) IS_ENABLED(option) | ||
50 | enum cgroup_subsys_id { | 50 | enum cgroup_subsys_id { |
51 | #define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option) | ||
51 | #include <linux/cgroup_subsys.h> | 52 | #include <linux/cgroup_subsys.h> |
53 | #undef IS_SUBSYS_ENABLED | ||
54 | CGROUP_BUILTIN_SUBSYS_COUNT, | ||
55 | |||
56 | __CGROUP_SUBSYS_TEMP_PLACEHOLDER = CGROUP_BUILTIN_SUBSYS_COUNT - 1, | ||
57 | |||
58 | #define IS_SUBSYS_ENABLED(option) IS_MODULE(option) | ||
59 | #include <linux/cgroup_subsys.h> | ||
60 | #undef IS_SUBSYS_ENABLED | ||
52 | CGROUP_SUBSYS_COUNT, | 61 | CGROUP_SUBSYS_COUNT, |
53 | }; | 62 | }; |
54 | #undef IS_SUBSYS_ENABLED | ||
55 | #undef SUBSYS | 63 | #undef SUBSYS |
56 | 64 | ||
57 | /* Per-subsystem/per-cgroup state maintained by the system. */ | 65 | /* Per-subsystem/per-cgroup state maintained by the system. */ |
@@ -148,6 +156,13 @@ enum { | |||
148 | * specified at mount time and thus is implemented here. | 156 | * specified at mount time and thus is implemented here. |
149 | */ | 157 | */ |
150 | CGRP_CPUSET_CLONE_CHILDREN, | 158 | CGRP_CPUSET_CLONE_CHILDREN, |
159 | /* see the comment above CGRP_ROOT_SANE_BEHAVIOR for details */ | ||
160 | CGRP_SANE_BEHAVIOR, | ||
161 | }; | ||
162 | |||
163 | struct cgroup_name { | ||
164 | struct rcu_head rcu_head; | ||
165 | char name[]; | ||
151 | }; | 166 | }; |
152 | 167 | ||
153 | struct cgroup { | 168 | struct cgroup { |
@@ -172,11 +187,23 @@ struct cgroup { | |||
172 | struct cgroup *parent; /* my parent */ | 187 | struct cgroup *parent; /* my parent */ |
173 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ | 188 | struct dentry *dentry; /* cgroup fs entry, RCU protected */ |
174 | 189 | ||
190 | /* | ||
191 | * This is a copy of dentry->d_name, and it's needed because | ||
192 | * we can't use dentry->d_name in cgroup_path(). | ||
193 | * | ||
194 | * You must acquire rcu_read_lock() to access cgrp->name, and | ||
195 | * the only place that can change it is rename(), which is | ||
196 | * protected by parent dir's i_mutex. | ||
197 | * | ||
198 | * Normally you should use cgroup_name() wrapper rather than | ||
199 | * access it directly. | ||
200 | */ | ||
201 | struct cgroup_name __rcu *name; | ||
202 | |||
175 | /* Private pointers for each registered subsystem */ | 203 | /* Private pointers for each registered subsystem */ |
176 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; | 204 | struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT]; |
177 | 205 | ||
178 | struct cgroupfs_root *root; | 206 | struct cgroupfs_root *root; |
179 | struct cgroup *top_cgroup; | ||
180 | 207 | ||
181 | /* | 208 | /* |
182 | * List of cg_cgroup_links pointing at css_sets with | 209 | * List of cg_cgroup_links pointing at css_sets with |
@@ -213,6 +240,96 @@ struct cgroup { | |||
213 | struct simple_xattrs xattrs; | 240 | struct simple_xattrs xattrs; |
214 | }; | 241 | }; |
215 | 242 | ||
243 | #define MAX_CGROUP_ROOT_NAMELEN 64 | ||
244 | |||
245 | /* cgroupfs_root->flags */ | ||
246 | enum { | ||
247 | /* | ||
248 | * Unfortunately, cgroup core and various controllers are riddled | ||
249 | * with idiosyncrasies and pointless options. The following flag, | ||
250 | * when set, will force sane behavior - some options are forced on, | ||
251 | * others are disallowed, and some controllers will change their | ||
252 | * hierarchical or other behaviors. | ||
253 | * | ||
254 | * The set of behaviors affected by this flag are still being | ||
255 | * determined and developed and the mount option for this flag is | ||
256 | * prefixed with __DEVEL__. The prefix will be dropped once we | ||
257 | * reach the point where all behaviors are compatible with the | ||
258 | * planned unified hierarchy, which will automatically turn on this | ||
259 | * flag. | ||
260 | * | ||
261 | * The followings are the behaviors currently affected this flag. | ||
262 | * | ||
263 | * - Mount options "noprefix" and "clone_children" are disallowed. | ||
264 | * Also, cgroupfs file cgroup.clone_children is not created. | ||
265 | * | ||
266 | * - When mounting an existing superblock, mount options should | ||
267 | * match. | ||
268 | * | ||
269 | * - Remount is disallowed. | ||
270 | * | ||
271 | * - memcg: use_hierarchy is on by default and the cgroup file for | ||
272 | * the flag is not created. | ||
273 | * | ||
274 | * The followings are planned changes. | ||
275 | * | ||
276 | * - release_agent will be disallowed once replacement notification | ||
277 | * mechanism is implemented. | ||
278 | */ | ||
279 | CGRP_ROOT_SANE_BEHAVIOR = (1 << 0), | ||
280 | |||
281 | CGRP_ROOT_NOPREFIX = (1 << 1), /* mounted subsystems have no named prefix */ | ||
282 | CGRP_ROOT_XATTR = (1 << 2), /* supports extended attributes */ | ||
283 | }; | ||
284 | |||
285 | /* | ||
286 | * A cgroupfs_root represents the root of a cgroup hierarchy, and may be | ||
287 | * associated with a superblock to form an active hierarchy. This is | ||
288 | * internal to cgroup core. Don't access directly from controllers. | ||
289 | */ | ||
290 | struct cgroupfs_root { | ||
291 | struct super_block *sb; | ||
292 | |||
293 | /* | ||
294 | * The bitmask of subsystems intended to be attached to this | ||
295 | * hierarchy | ||
296 | */ | ||
297 | unsigned long subsys_mask; | ||
298 | |||
299 | /* Unique id for this hierarchy. */ | ||
300 | int hierarchy_id; | ||
301 | |||
302 | /* The bitmask of subsystems currently attached to this hierarchy */ | ||
303 | unsigned long actual_subsys_mask; | ||
304 | |||
305 | /* A list running through the attached subsystems */ | ||
306 | struct list_head subsys_list; | ||
307 | |||
308 | /* The root cgroup for this hierarchy */ | ||
309 | struct cgroup top_cgroup; | ||
310 | |||
311 | /* Tracks how many cgroups are currently defined in hierarchy.*/ | ||
312 | int number_of_cgroups; | ||
313 | |||
314 | /* A list running through the active hierarchies */ | ||
315 | struct list_head root_list; | ||
316 | |||
317 | /* All cgroups on this root, cgroup_mutex protected */ | ||
318 | struct list_head allcg_list; | ||
319 | |||
320 | /* Hierarchy-specific flags */ | ||
321 | unsigned long flags; | ||
322 | |||
323 | /* IDs for cgroups in this hierarchy */ | ||
324 | struct ida cgroup_ida; | ||
325 | |||
326 | /* The path to use for release notifications. */ | ||
327 | char release_agent_path[PATH_MAX]; | ||
328 | |||
329 | /* The name for this hierarchy - may be empty */ | ||
330 | char name[MAX_CGROUP_ROOT_NAMELEN]; | ||
331 | }; | ||
332 | |||
216 | /* | 333 | /* |
217 | * A css_set is a structure holding pointers to a set of | 334 | * A css_set is a structure holding pointers to a set of |
218 | * cgroup_subsys_state objects. This saves space in the task struct | 335 | * cgroup_subsys_state objects. This saves space in the task struct |
@@ -278,6 +395,7 @@ struct cgroup_map_cb { | |||
278 | /* cftype->flags */ | 395 | /* cftype->flags */ |
279 | #define CFTYPE_ONLY_ON_ROOT (1U << 0) /* only create on root cg */ | 396 | #define CFTYPE_ONLY_ON_ROOT (1U << 0) /* only create on root cg */ |
280 | #define CFTYPE_NOT_ON_ROOT (1U << 1) /* don't create on root cg */ | 397 | #define CFTYPE_NOT_ON_ROOT (1U << 1) /* don't create on root cg */ |
398 | #define CFTYPE_INSANE (1U << 2) /* don't create if sane_behavior */ | ||
281 | 399 | ||
282 | #define MAX_CFTYPE_NAME 64 | 400 | #define MAX_CFTYPE_NAME 64 |
283 | 401 | ||
@@ -304,9 +422,6 @@ struct cftype { | |||
304 | /* CFTYPE_* flags */ | 422 | /* CFTYPE_* flags */ |
305 | unsigned int flags; | 423 | unsigned int flags; |
306 | 424 | ||
307 | /* file xattrs */ | ||
308 | struct simple_xattrs xattrs; | ||
309 | |||
310 | int (*open)(struct inode *inode, struct file *file); | 425 | int (*open)(struct inode *inode, struct file *file); |
311 | ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft, | 426 | ssize_t (*read)(struct cgroup *cgrp, struct cftype *cft, |
312 | struct file *file, | 427 | struct file *file, |
@@ -404,18 +519,31 @@ struct cgroup_scanner { | |||
404 | void *data; | 519 | void *data; |
405 | }; | 520 | }; |
406 | 521 | ||
522 | /* | ||
523 | * See the comment above CGRP_ROOT_SANE_BEHAVIOR for details. This | ||
524 | * function can be called as long as @cgrp is accessible. | ||
525 | */ | ||
526 | static inline bool cgroup_sane_behavior(const struct cgroup *cgrp) | ||
527 | { | ||
528 | return cgrp->root->flags & CGRP_ROOT_SANE_BEHAVIOR; | ||
529 | } | ||
530 | |||
531 | /* Caller should hold rcu_read_lock() */ | ||
532 | static inline const char *cgroup_name(const struct cgroup *cgrp) | ||
533 | { | ||
534 | return rcu_dereference(cgrp->name)->name; | ||
535 | } | ||
536 | |||
407 | int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); | 537 | int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); |
408 | int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); | 538 | int cgroup_rm_cftypes(struct cgroup_subsys *ss, struct cftype *cfts); |
409 | 539 | ||
410 | int cgroup_is_removed(const struct cgroup *cgrp); | 540 | int cgroup_is_removed(const struct cgroup *cgrp); |
541 | bool cgroup_is_descendant(struct cgroup *cgrp, struct cgroup *ancestor); | ||
411 | 542 | ||
412 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); | 543 | int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); |
413 | 544 | ||
414 | int cgroup_task_count(const struct cgroup *cgrp); | 545 | int cgroup_task_count(const struct cgroup *cgrp); |
415 | 546 | ||
416 | /* Return true if cgrp is a descendant of the task's cgroup */ | ||
417 | int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); | ||
418 | |||
419 | /* | 547 | /* |
420 | * Control Group taskset, used to pass around set of tasks to cgroup_subsys | 548 | * Control Group taskset, used to pass around set of tasks to cgroup_subsys |
421 | * methods. | 549 | * methods. |
@@ -458,7 +586,6 @@ struct cgroup_subsys { | |||
458 | void (*bind)(struct cgroup *root); | 586 | void (*bind)(struct cgroup *root); |
459 | 587 | ||
460 | int subsys_id; | 588 | int subsys_id; |
461 | int active; | ||
462 | int disabled; | 589 | int disabled; |
463 | int early_init; | 590 | int early_init; |
464 | /* | 591 | /* |
@@ -523,10 +650,16 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state( | |||
523 | * rcu_dereference_check() conditions, such as locks used during the | 650 | * rcu_dereference_check() conditions, such as locks used during the |
524 | * cgroup_subsys::attach() methods. | 651 | * cgroup_subsys::attach() methods. |
525 | */ | 652 | */ |
653 | #ifdef CONFIG_PROVE_RCU | ||
654 | extern struct mutex cgroup_mutex; | ||
526 | #define task_subsys_state_check(task, subsys_id, __c) \ | 655 | #define task_subsys_state_check(task, subsys_id, __c) \ |
527 | rcu_dereference_check(task->cgroups->subsys[subsys_id], \ | 656 | rcu_dereference_check((task)->cgroups->subsys[(subsys_id)], \ |
528 | lockdep_is_held(&task->alloc_lock) || \ | 657 | lockdep_is_held(&(task)->alloc_lock) || \ |
529 | cgroup_lock_is_held() || (__c)) | 658 | lockdep_is_held(&cgroup_mutex) || (__c)) |
659 | #else | ||
660 | #define task_subsys_state_check(task, subsys_id, __c) \ | ||
661 | rcu_dereference((task)->cgroups->subsys[(subsys_id)]) | ||
662 | #endif | ||
530 | 663 | ||
531 | static inline struct cgroup_subsys_state * | 664 | static inline struct cgroup_subsys_state * |
532 | task_subsys_state(struct task_struct *task, int subsys_id) | 665 | task_subsys_state(struct task_struct *task, int subsys_id) |
@@ -661,8 +794,8 @@ struct task_struct *cgroup_iter_next(struct cgroup *cgrp, | |||
661 | struct cgroup_iter *it); | 794 | struct cgroup_iter *it); |
662 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); | 795 | void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); |
663 | int cgroup_scan_tasks(struct cgroup_scanner *scan); | 796 | int cgroup_scan_tasks(struct cgroup_scanner *scan); |
664 | int cgroup_attach_task(struct cgroup *, struct task_struct *); | ||
665 | int cgroup_attach_task_all(struct task_struct *from, struct task_struct *); | 797 | int cgroup_attach_task_all(struct task_struct *from, struct task_struct *); |
798 | int cgroup_transfer_tasks(struct cgroup *to, struct cgroup *from); | ||
666 | 799 | ||
667 | /* | 800 | /* |
668 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works | 801 | * CSS ID is ID for cgroup_subsys_state structs under subsys. This only works |
@@ -687,13 +820,6 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css); | |||
687 | 820 | ||
688 | struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id); | 821 | struct cgroup_subsys_state *css_lookup(struct cgroup_subsys *ss, int id); |
689 | 822 | ||
690 | /* | ||
691 | * Get a cgroup whose id is greater than or equal to id under tree of root. | ||
692 | * Returning a cgroup_subsys_state or NULL. | ||
693 | */ | ||
694 | struct cgroup_subsys_state *css_get_next(struct cgroup_subsys *ss, int id, | ||
695 | struct cgroup_subsys_state *root, int *foundid); | ||
696 | |||
697 | /* Returns true if root is ancestor of cg */ | 823 | /* Returns true if root is ancestor of cg */ |
698 | bool css_is_ancestor(struct cgroup_subsys_state *cg, | 824 | bool css_is_ancestor(struct cgroup_subsys_state *cg, |
699 | const struct cgroup_subsys_state *root); | 825 | const struct cgroup_subsys_state *root); |
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h index 9c7f5807824b..dd7adff76e81 100644 --- a/include/linux/clk-private.h +++ b/include/linux/clk-private.h | |||
@@ -152,7 +152,7 @@ struct clk { | |||
152 | }, \ | 152 | }, \ |
153 | .reg = _reg, \ | 153 | .reg = _reg, \ |
154 | .shift = _shift, \ | 154 | .shift = _shift, \ |
155 | .width = _width, \ | 155 | .mask = BIT(_width) - 1, \ |
156 | .flags = _mux_flags, \ | 156 | .flags = _mux_flags, \ |
157 | .lock = _lock, \ | 157 | .lock = _lock, \ |
158 | }; \ | 158 | }; \ |
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h index 7f197d7addb0..11860985fecb 100644 --- a/include/linux/clk-provider.h +++ b/include/linux/clk-provider.h | |||
@@ -45,6 +45,14 @@ struct clk_hw; | |||
45 | * undo any work done in the @prepare callback. Called with | 45 | * undo any work done in the @prepare callback. Called with |
46 | * prepare_lock held. | 46 | * prepare_lock held. |
47 | * | 47 | * |
48 | * @is_prepared: Queries the hardware to determine if the clock is prepared. | ||
49 | * This function is allowed to sleep. Optional, if this op is not | ||
50 | * set then the prepare count will be used. | ||
51 | * | ||
52 | * @unprepare_unused: Unprepare the clock atomically. Only called from | ||
53 | * clk_disable_unused for prepare clocks with special needs. | ||
54 | * Called with prepare mutex held. This function may sleep. | ||
55 | * | ||
48 | * @enable: Enable the clock atomically. This must not return until the | 56 | * @enable: Enable the clock atomically. This must not return until the |
49 | * clock is generating a valid clock signal, usable by consumer | 57 | * clock is generating a valid clock signal, usable by consumer |
50 | * devices. Called with enable_lock held. This function must not | 58 | * devices. Called with enable_lock held. This function must not |
@@ -108,6 +116,8 @@ struct clk_hw; | |||
108 | struct clk_ops { | 116 | struct clk_ops { |
109 | int (*prepare)(struct clk_hw *hw); | 117 | int (*prepare)(struct clk_hw *hw); |
110 | void (*unprepare)(struct clk_hw *hw); | 118 | void (*unprepare)(struct clk_hw *hw); |
119 | int (*is_prepared)(struct clk_hw *hw); | ||
120 | void (*unprepare_unused)(struct clk_hw *hw); | ||
111 | int (*enable)(struct clk_hw *hw); | 121 | int (*enable)(struct clk_hw *hw); |
112 | void (*disable)(struct clk_hw *hw); | 122 | void (*disable)(struct clk_hw *hw); |
113 | int (*is_enabled)(struct clk_hw *hw); | 123 | int (*is_enabled)(struct clk_hw *hw); |
@@ -239,9 +249,14 @@ struct clk_div_table { | |||
239 | * CLK_DIVIDER_ONE_BASED - by default the divisor is the value read from the | 249 | * CLK_DIVIDER_ONE_BASED - by default the divisor is the value read from the |
240 | * register plus one. If CLK_DIVIDER_ONE_BASED is set then the divider is | 250 | * register plus one. If CLK_DIVIDER_ONE_BASED is set then the divider is |
241 | * the raw value read from the register, with the value of zero considered | 251 | * the raw value read from the register, with the value of zero considered |
242 | * invalid | 252 | * invalid, unless CLK_DIVIDER_ALLOW_ZERO is set. |
243 | * CLK_DIVIDER_POWER_OF_TWO - clock divisor is 2 raised to the value read from | 253 | * CLK_DIVIDER_POWER_OF_TWO - clock divisor is 2 raised to the value read from |
244 | * the hardware register | 254 | * the hardware register |
255 | * CLK_DIVIDER_ALLOW_ZERO - Allow zero divisors. For dividers which have | ||
256 | * CLK_DIVIDER_ONE_BASED set, it is possible to end up with a zero divisor. | ||
257 | * Some hardware implementations gracefully handle this case and allow a | ||
258 | * zero divisor by not modifying their input clock | ||
259 | * (divide by one / bypass). | ||
245 | */ | 260 | */ |
246 | struct clk_divider { | 261 | struct clk_divider { |
247 | struct clk_hw hw; | 262 | struct clk_hw hw; |
@@ -255,6 +270,7 @@ struct clk_divider { | |||
255 | 270 | ||
256 | #define CLK_DIVIDER_ONE_BASED BIT(0) | 271 | #define CLK_DIVIDER_ONE_BASED BIT(0) |
257 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) | 272 | #define CLK_DIVIDER_POWER_OF_TWO BIT(1) |
273 | #define CLK_DIVIDER_ALLOW_ZERO BIT(2) | ||
258 | 274 | ||
259 | extern const struct clk_ops clk_divider_ops; | 275 | extern const struct clk_ops clk_divider_ops; |
260 | struct clk *clk_register_divider(struct device *dev, const char *name, | 276 | struct clk *clk_register_divider(struct device *dev, const char *name, |
@@ -274,7 +290,7 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, | |||
274 | * @reg: register controlling multiplexer | 290 | * @reg: register controlling multiplexer |
275 | * @shift: shift to multiplexer bit field | 291 | * @shift: shift to multiplexer bit field |
276 | * @width: width of mutliplexer bit field | 292 | * @width: width of mutliplexer bit field |
277 | * @num_clks: number of parent clocks | 293 | * @flags: hardware-specific flags |
278 | * @lock: register lock | 294 | * @lock: register lock |
279 | * | 295 | * |
280 | * Clock with multiple selectable parents. Implements .get_parent, .set_parent | 296 | * Clock with multiple selectable parents. Implements .get_parent, .set_parent |
@@ -287,8 +303,9 @@ struct clk *clk_register_divider_table(struct device *dev, const char *name, | |||
287 | struct clk_mux { | 303 | struct clk_mux { |
288 | struct clk_hw hw; | 304 | struct clk_hw hw; |
289 | void __iomem *reg; | 305 | void __iomem *reg; |
306 | u32 *table; | ||
307 | u32 mask; | ||
290 | u8 shift; | 308 | u8 shift; |
291 | u8 width; | ||
292 | u8 flags; | 309 | u8 flags; |
293 | spinlock_t *lock; | 310 | spinlock_t *lock; |
294 | }; | 311 | }; |
@@ -297,11 +314,19 @@ struct clk_mux { | |||
297 | #define CLK_MUX_INDEX_BIT BIT(1) | 314 | #define CLK_MUX_INDEX_BIT BIT(1) |
298 | 315 | ||
299 | extern const struct clk_ops clk_mux_ops; | 316 | extern const struct clk_ops clk_mux_ops; |
317 | |||
300 | struct clk *clk_register_mux(struct device *dev, const char *name, | 318 | struct clk *clk_register_mux(struct device *dev, const char *name, |
301 | const char **parent_names, u8 num_parents, unsigned long flags, | 319 | const char **parent_names, u8 num_parents, unsigned long flags, |
302 | void __iomem *reg, u8 shift, u8 width, | 320 | void __iomem *reg, u8 shift, u8 width, |
303 | u8 clk_mux_flags, spinlock_t *lock); | 321 | u8 clk_mux_flags, spinlock_t *lock); |
304 | 322 | ||
323 | struct clk *clk_register_mux_table(struct device *dev, const char *name, | ||
324 | const char **parent_names, u8 num_parents, unsigned long flags, | ||
325 | void __iomem *reg, u8 shift, u32 mask, | ||
326 | u8 clk_mux_flags, u32 *table, spinlock_t *lock); | ||
327 | |||
328 | void of_fixed_factor_clk_setup(struct device_node *node); | ||
329 | |||
305 | /** | 330 | /** |
306 | * struct clk_fixed_factor - fixed multiplier and divider clock | 331 | * struct clk_fixed_factor - fixed multiplier and divider clock |
307 | * | 332 | * |
@@ -325,6 +350,37 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name, | |||
325 | const char *parent_name, unsigned long flags, | 350 | const char *parent_name, unsigned long flags, |
326 | unsigned int mult, unsigned int div); | 351 | unsigned int mult, unsigned int div); |
327 | 352 | ||
353 | /*** | ||
354 | * struct clk_composite - aggregate clock of mux, divider and gate clocks | ||
355 | * | ||
356 | * @hw: handle between common and hardware-specific interfaces | ||
357 | * @mux_hw: handle between composite and hardware-specific mux clock | ||
358 | * @rate_hw: handle between composite and hardware-specific rate clock | ||
359 | * @gate_hw: handle between composite and hardware-specific gate clock | ||
360 | * @mux_ops: clock ops for mux | ||
361 | * @rate_ops: clock ops for rate | ||
362 | * @gate_ops: clock ops for gate | ||
363 | */ | ||
364 | struct clk_composite { | ||
365 | struct clk_hw hw; | ||
366 | struct clk_ops ops; | ||
367 | |||
368 | struct clk_hw *mux_hw; | ||
369 | struct clk_hw *rate_hw; | ||
370 | struct clk_hw *gate_hw; | ||
371 | |||
372 | const struct clk_ops *mux_ops; | ||
373 | const struct clk_ops *rate_ops; | ||
374 | const struct clk_ops *gate_ops; | ||
375 | }; | ||
376 | |||
377 | struct clk *clk_register_composite(struct device *dev, const char *name, | ||
378 | const char **parent_names, int num_parents, | ||
379 | struct clk_hw *mux_hw, const struct clk_ops *mux_ops, | ||
380 | struct clk_hw *rate_hw, const struct clk_ops *rate_ops, | ||
381 | struct clk_hw *gate_hw, const struct clk_ops *gate_ops, | ||
382 | unsigned long flags); | ||
383 | |||
328 | /** | 384 | /** |
329 | * clk_register - allocate a new clock, register it and return an opaque cookie | 385 | * clk_register - allocate a new clock, register it and return an opaque cookie |
330 | * @dev: device that is registering this clock | 386 | * @dev: device that is registering this clock |
@@ -351,6 +407,7 @@ unsigned int __clk_get_enable_count(struct clk *clk); | |||
351 | unsigned int __clk_get_prepare_count(struct clk *clk); | 407 | unsigned int __clk_get_prepare_count(struct clk *clk); |
352 | unsigned long __clk_get_rate(struct clk *clk); | 408 | unsigned long __clk_get_rate(struct clk *clk); |
353 | unsigned long __clk_get_flags(struct clk *clk); | 409 | unsigned long __clk_get_flags(struct clk *clk); |
410 | bool __clk_is_prepared(struct clk *clk); | ||
354 | bool __clk_is_enabled(struct clk *clk); | 411 | bool __clk_is_enabled(struct clk *clk); |
355 | struct clk *__clk_lookup(const char *name); | 412 | struct clk *__clk_lookup(const char *name); |
356 | 413 | ||
diff --git a/include/linux/clk.h b/include/linux/clk.h index b3ac22d0fc1f..9a6d04524b1a 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h | |||
@@ -28,16 +28,16 @@ struct clk; | |||
28 | * PRE_RATE_CHANGE - called immediately before the clk rate is changed, | 28 | * PRE_RATE_CHANGE - called immediately before the clk rate is changed, |
29 | * to indicate that the rate change will proceed. Drivers must | 29 | * to indicate that the rate change will proceed. Drivers must |
30 | * immediately terminate any operations that will be affected by the | 30 | * immediately terminate any operations that will be affected by the |
31 | * rate change. Callbacks may either return NOTIFY_DONE or | 31 | * rate change. Callbacks may either return NOTIFY_DONE, NOTIFY_OK, |
32 | * NOTIFY_STOP. | 32 | * NOTIFY_STOP or NOTIFY_BAD. |
33 | * | 33 | * |
34 | * ABORT_RATE_CHANGE: called if the rate change failed for some reason | 34 | * ABORT_RATE_CHANGE: called if the rate change failed for some reason |
35 | * after PRE_RATE_CHANGE. In this case, all registered notifiers on | 35 | * after PRE_RATE_CHANGE. In this case, all registered notifiers on |
36 | * the clk will be called with ABORT_RATE_CHANGE. Callbacks must | 36 | * the clk will be called with ABORT_RATE_CHANGE. Callbacks must |
37 | * always return NOTIFY_DONE. | 37 | * always return NOTIFY_DONE or NOTIFY_OK. |
38 | * | 38 | * |
39 | * POST_RATE_CHANGE - called after the clk rate change has successfully | 39 | * POST_RATE_CHANGE - called after the clk rate change has successfully |
40 | * completed. Callbacks must always return NOTIFY_DONE. | 40 | * completed. Callbacks must always return NOTIFY_DONE or NOTIFY_OK. |
41 | * | 41 | * |
42 | */ | 42 | */ |
43 | #define PRE_RATE_CHANGE BIT(0) | 43 | #define PRE_RATE_CHANGE BIT(0) |
diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000000000000..e074fdd5a236 --- /dev/null +++ b/include/linux/clk/sunxi.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Copyright 2012 Maxime Ripard | ||
3 | * | ||
4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __LINUX_CLK_SUNXI_H_ | ||
18 | #define __LINUX_CLK_SUNXI_H_ | ||
19 | |||
20 | void __init sunxi_init_clocks(void); | ||
21 | |||
22 | #endif | ||
diff --git a/include/linux/compat.h b/include/linux/compat.h index 76a87fb57ac2..377cd8c3395e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -141,11 +141,11 @@ typedef struct { | |||
141 | } compat_sigset_t; | 141 | } compat_sigset_t; |
142 | 142 | ||
143 | struct compat_sigaction { | 143 | struct compat_sigaction { |
144 | #ifndef __ARCH_HAS_ODD_SIGACTION | 144 | #ifndef __ARCH_HAS_IRIX_SIGACTION |
145 | compat_uptr_t sa_handler; | 145 | compat_uptr_t sa_handler; |
146 | compat_ulong_t sa_flags; | 146 | compat_ulong_t sa_flags; |
147 | #else | 147 | #else |
148 | compat_ulong_t sa_flags; | 148 | compat_uint_t sa_flags; |
149 | compat_uptr_t sa_handler; | 149 | compat_uptr_t sa_handler; |
150 | #endif | 150 | #endif |
151 | #ifdef __ARCH_HAS_SA_RESTORER | 151 | #ifdef __ARCH_HAS_SA_RESTORER |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 68b162d92254..842de225055f 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | 15 | ||
16 | #if GCC_VERSION >= 40100 | 16 | #if GCC_VERSION >= 40100 && GCC_VERSION < 40600 |
17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
18 | #endif | 18 | #endif |
19 | 19 | ||
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 10b8f23fab0f..92669cd182a6 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -351,4 +351,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); | |||
351 | */ | 351 | */ |
352 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | 352 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) |
353 | 353 | ||
354 | /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ | ||
355 | #ifdef CONFIG_KPROBES | ||
356 | # define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
357 | #else | ||
358 | # define __kprobes | ||
359 | #endif | ||
354 | #endif /* __LINUX_COMPILER_H */ | 360 | #endif /* __LINUX_COMPILER_H */ |
diff --git a/include/linux/console.h b/include/linux/console.h index 29680a8cda99..73bab0f58af5 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -141,6 +141,7 @@ struct console { | |||
141 | for (con = console_drivers; con != NULL; con = con->next) | 141 | for (con = console_drivers; con != NULL; con = con->next) |
142 | 142 | ||
143 | extern int console_set_on_cmdline; | 143 | extern int console_set_on_cmdline; |
144 | extern struct console *early_console; | ||
144 | 145 | ||
145 | extern int add_preferred_console(char *name, int idx, char *options); | 146 | extern int add_preferred_console(char *name, int idx, char *options); |
146 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); | 147 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index ce7a074f2519..c6f6e0839b61 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -212,4 +212,20 @@ static inline int disable_nonboot_cpus(void) { return 0; } | |||
212 | static inline void enable_nonboot_cpus(void) {} | 212 | static inline void enable_nonboot_cpus(void) {} |
213 | #endif /* !CONFIG_PM_SLEEP_SMP */ | 213 | #endif /* !CONFIG_PM_SLEEP_SMP */ |
214 | 214 | ||
215 | enum cpuhp_state { | ||
216 | CPUHP_OFFLINE, | ||
217 | CPUHP_ONLINE, | ||
218 | }; | ||
219 | |||
220 | void cpu_startup_entry(enum cpuhp_state state); | ||
221 | void cpu_idle(void); | ||
222 | |||
223 | void cpu_idle_poll_ctrl(bool enable); | ||
224 | |||
225 | void arch_cpu_idle(void); | ||
226 | void arch_cpu_idle_prepare(void); | ||
227 | void arch_cpu_idle_enter(void); | ||
228 | void arch_cpu_idle_exit(void); | ||
229 | void arch_cpu_idle_dead(void); | ||
230 | |||
215 | #endif /* _LINUX_CPU_H_ */ | 231 | #endif /* _LINUX_CPU_H_ */ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 032560295fcb..d08e4d2a9b92 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -591,6 +591,21 @@ static inline int cpulist_scnprintf(char *buf, int len, | |||
591 | } | 591 | } |
592 | 592 | ||
593 | /** | 593 | /** |
594 | * cpumask_parse - extract a cpumask from from a string | ||
595 | * @buf: the buffer to extract from | ||
596 | * @dstp: the cpumask to set. | ||
597 | * | ||
598 | * Returns -errno, or 0 for success. | ||
599 | */ | ||
600 | static inline int cpumask_parse(const char *buf, struct cpumask *dstp) | ||
601 | { | ||
602 | char *nl = strchr(buf, '\n'); | ||
603 | int len = nl ? nl - buf : strlen(buf); | ||
604 | |||
605 | return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits); | ||
606 | } | ||
607 | |||
608 | /** | ||
594 | * cpulist_parse - extract a cpumask from a user string of ranges | 609 | * cpulist_parse - extract a cpumask from a user string of ranges |
595 | * @buf: the buffer to extract from | 610 | * @buf: the buffer to extract from |
596 | * @dstp: the cpumask to set. | 611 | * @dstp: the cpumask to set. |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 8c8a60d29407..ccd1de8ad822 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/cpumask.h> | 12 | #include <linux/cpumask.h> |
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <linux/cgroup.h> | ||
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
16 | 15 | ||
17 | #ifdef CONFIG_CPUSETS | 16 | #ifdef CONFIG_CPUSETS |
diff --git a/include/linux/ctype.h b/include/linux/ctype.h index 8acfe312f947..653589e3e30e 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h | |||
@@ -61,4 +61,10 @@ static inline char _tolower(const char c) | |||
61 | return c | 0x20; | 61 | return c | 0x20; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* Fast check for octal digit */ | ||
65 | static inline int isodigit(const char c) | ||
66 | { | ||
67 | return c >= '0' && c <= '7'; | ||
68 | } | ||
69 | |||
64 | #endif | 70 | #endif |
diff --git a/include/linux/debug_locks.h b/include/linux/debug_locks.h index a975de1ff59f..21ca773f77bf 100644 --- a/include/linux/debug_locks.h +++ b/include/linux/debug_locks.h | |||
@@ -27,7 +27,7 @@ extern int debug_locks_off(void); | |||
27 | \ | 27 | \ |
28 | if (!oops_in_progress && unlikely(c)) { \ | 28 | if (!oops_in_progress && unlikely(c)) { \ |
29 | if (debug_locks_off() && !debug_locks_silent) \ | 29 | if (debug_locks_off() && !debug_locks_silent) \ |
30 | WARN_ON(1); \ | 30 | WARN(1, "DEBUG_LOCKS_WARN_ON(%s)", #c); \ |
31 | __ret = 1; \ | 31 | __ret = 1; \ |
32 | } \ | 32 | } \ |
33 | __ret; \ | 33 | __ret; \ |
@@ -51,7 +51,7 @@ struct task_struct; | |||
51 | extern void debug_show_all_locks(void); | 51 | extern void debug_show_all_locks(void); |
52 | extern void debug_show_held_locks(struct task_struct *task); | 52 | extern void debug_show_held_locks(struct task_struct *task); |
53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); | 53 | extern void debug_check_no_locks_freed(const void *from, unsigned long len); |
54 | extern void debug_check_no_locks_held(void); | 54 | extern void debug_check_no_locks_held(struct task_struct *task); |
55 | #else | 55 | #else |
56 | static inline void debug_show_all_locks(void) | 56 | static inline void debug_show_all_locks(void) |
57 | { | 57 | { |
@@ -67,7 +67,7 @@ debug_check_no_locks_freed(const void *from, unsigned long len) | |||
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void | 69 | static inline void |
70 | debug_check_no_locks_held(void) | 70 | debug_check_no_locks_held(struct task_struct *task) |
71 | { | 71 | { |
72 | } | 72 | } |
73 | #endif | 73 | #endif |
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index e83ef39b3bea..fe8c4476f7e4 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h | |||
@@ -213,7 +213,7 @@ struct devfreq_simple_ondemand_data { | |||
213 | #endif | 213 | #endif |
214 | 214 | ||
215 | #else /* !CONFIG_PM_DEVFREQ */ | 215 | #else /* !CONFIG_PM_DEVFREQ */ |
216 | static struct devfreq *devfreq_add_device(struct device *dev, | 216 | static inline struct devfreq *devfreq_add_device(struct device *dev, |
217 | struct devfreq_dev_profile *profile, | 217 | struct devfreq_dev_profile *profile, |
218 | const char *governor_name, | 218 | const char *governor_name, |
219 | void *data) | 219 | void *data) |
@@ -221,34 +221,34 @@ static struct devfreq *devfreq_add_device(struct device *dev, | |||
221 | return NULL; | 221 | return NULL; |
222 | } | 222 | } |
223 | 223 | ||
224 | static int devfreq_remove_device(struct devfreq *devfreq) | 224 | static inline int devfreq_remove_device(struct devfreq *devfreq) |
225 | { | 225 | { |
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
228 | 228 | ||
229 | static int devfreq_suspend_device(struct devfreq *devfreq) | 229 | static inline int devfreq_suspend_device(struct devfreq *devfreq) |
230 | { | 230 | { |
231 | return 0; | 231 | return 0; |
232 | } | 232 | } |
233 | 233 | ||
234 | static int devfreq_resume_device(struct devfreq *devfreq) | 234 | static inline int devfreq_resume_device(struct devfreq *devfreq) |
235 | { | 235 | { |
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static struct opp *devfreq_recommended_opp(struct device *dev, | 239 | static inline struct opp *devfreq_recommended_opp(struct device *dev, |
240 | unsigned long *freq, u32 flags) | 240 | unsigned long *freq, u32 flags) |
241 | { | 241 | { |
242 | return -EINVAL; | 242 | return ERR_PTR(-EINVAL); |
243 | } | 243 | } |
244 | 244 | ||
245 | static int devfreq_register_opp_notifier(struct device *dev, | 245 | static inline int devfreq_register_opp_notifier(struct device *dev, |
246 | struct devfreq *devfreq) | 246 | struct devfreq *devfreq) |
247 | { | 247 | { |
248 | return -EINVAL; | 248 | return -EINVAL; |
249 | } | 249 | } |
250 | 250 | ||
251 | static int devfreq_unregister_opp_notifier(struct device *dev, | 251 | static inline int devfreq_unregister_opp_notifier(struct device *dev, |
252 | struct devfreq *devfreq) | 252 | struct devfreq *devfreq) |
253 | { | 253 | { |
254 | return -EINVAL; | 254 | return -EINVAL; |
diff --git a/include/linux/device.h b/include/linux/device.h index 9d6464ea99c6..711793b145ff 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
26 | #include <linux/atomic.h> | 26 | #include <linux/atomic.h> |
27 | #include <linux/ratelimit.h> | 27 | #include <linux/ratelimit.h> |
28 | #include <linux/uidgid.h> | ||
28 | #include <asm/device.h> | 29 | #include <asm/device.h> |
29 | 30 | ||
30 | struct device; | 31 | struct device; |
@@ -111,17 +112,11 @@ struct bus_type { | |||
111 | struct iommu_ops *iommu_ops; | 112 | struct iommu_ops *iommu_ops; |
112 | 113 | ||
113 | struct subsys_private *p; | 114 | struct subsys_private *p; |
115 | struct lock_class_key lock_key; | ||
114 | }; | 116 | }; |
115 | 117 | ||
116 | /* This is a #define to keep the compiler from merging different | 118 | extern int __must_check bus_register(struct bus_type *bus); |
117 | * instances of the __key variable */ | 119 | |
118 | #define bus_register(subsys) \ | ||
119 | ({ \ | ||
120 | static struct lock_class_key __key; \ | ||
121 | __bus_register(subsys, &__key); \ | ||
122 | }) | ||
123 | extern int __must_check __bus_register(struct bus_type *bus, | ||
124 | struct lock_class_key *key); | ||
125 | extern void bus_unregister(struct bus_type *bus); | 120 | extern void bus_unregister(struct bus_type *bus); |
126 | 121 | ||
127 | extern int __must_check bus_rescan_devices(struct bus_type *bus); | 122 | extern int __must_check bus_rescan_devices(struct bus_type *bus); |
@@ -302,6 +297,8 @@ void subsys_interface_unregister(struct subsys_interface *sif); | |||
302 | 297 | ||
303 | int subsys_system_register(struct bus_type *subsys, | 298 | int subsys_system_register(struct bus_type *subsys, |
304 | const struct attribute_group **groups); | 299 | const struct attribute_group **groups); |
300 | int subsys_virtual_register(struct bus_type *subsys, | ||
301 | const struct attribute_group **groups); | ||
305 | 302 | ||
306 | /** | 303 | /** |
307 | * struct class - device classes | 304 | * struct class - device classes |
@@ -471,7 +468,8 @@ struct device_type { | |||
471 | const char *name; | 468 | const char *name; |
472 | const struct attribute_group **groups; | 469 | const struct attribute_group **groups; |
473 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 470 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
474 | char *(*devnode)(struct device *dev, umode_t *mode); | 471 | char *(*devnode)(struct device *dev, umode_t *mode, |
472 | kuid_t *uid, kgid_t *gid); | ||
475 | void (*release)(struct device *dev); | 473 | void (*release)(struct device *dev); |
476 | 474 | ||
477 | const struct dev_pm_ops *pm; | 475 | const struct dev_pm_ops *pm; |
@@ -849,7 +847,8 @@ extern int device_rename(struct device *dev, const char *new_name); | |||
849 | extern int device_move(struct device *dev, struct device *new_parent, | 847 | extern int device_move(struct device *dev, struct device *new_parent, |
850 | enum dpm_order dpm_order); | 848 | enum dpm_order dpm_order); |
851 | extern const char *device_get_devnode(struct device *dev, | 849 | extern const char *device_get_devnode(struct device *dev, |
852 | umode_t *mode, const char **tmp); | 850 | umode_t *mode, kuid_t *uid, kgid_t *gid, |
851 | const char **tmp); | ||
853 | extern void *dev_get_drvdata(const struct device *dev); | 852 | extern void *dev_get_drvdata(const struct device *dev); |
854 | extern int dev_set_drvdata(struct device *dev, void *data); | 853 | extern int dev_set_drvdata(struct device *dev, void *data); |
855 | 854 | ||
diff --git a/include/linux/ecryptfs.h b/include/linux/ecryptfs.h index 2224a8c0cb64..8d5ab998a222 100644 --- a/include/linux/ecryptfs.h +++ b/include/linux/ecryptfs.h | |||
@@ -6,9 +6,8 @@ | |||
6 | #define ECRYPTFS_VERSION_MINOR 0x04 | 6 | #define ECRYPTFS_VERSION_MINOR 0x04 |
7 | #define ECRYPTFS_SUPPORTED_FILE_VERSION 0x03 | 7 | #define ECRYPTFS_SUPPORTED_FILE_VERSION 0x03 |
8 | /* These flags indicate which features are supported by the kernel | 8 | /* These flags indicate which features are supported by the kernel |
9 | * module; userspace tools such as the mount helper read | 9 | * module; userspace tools such as the mount helper read the feature |
10 | * ECRYPTFS_VERSIONING_MASK from a sysfs handle in order to determine | 10 | * bits from a sysfs handle in order to determine how to behave. */ |
11 | * how to behave. */ | ||
12 | #define ECRYPTFS_VERSIONING_PASSPHRASE 0x00000001 | 11 | #define ECRYPTFS_VERSIONING_PASSPHRASE 0x00000001 |
13 | #define ECRYPTFS_VERSIONING_PUBKEY 0x00000002 | 12 | #define ECRYPTFS_VERSIONING_PUBKEY 0x00000002 |
14 | #define ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH 0x00000004 | 13 | #define ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH 0x00000004 |
@@ -19,13 +18,6 @@ | |||
19 | #define ECRYPTFS_VERSIONING_HMAC 0x00000080 | 18 | #define ECRYPTFS_VERSIONING_HMAC 0x00000080 |
20 | #define ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION 0x00000100 | 19 | #define ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION 0x00000100 |
21 | #define ECRYPTFS_VERSIONING_GCM 0x00000200 | 20 | #define ECRYPTFS_VERSIONING_GCM 0x00000200 |
22 | #define ECRYPTFS_VERSIONING_MASK (ECRYPTFS_VERSIONING_PASSPHRASE \ | ||
23 | | ECRYPTFS_VERSIONING_PLAINTEXT_PASSTHROUGH \ | ||
24 | | ECRYPTFS_VERSIONING_PUBKEY \ | ||
25 | | ECRYPTFS_VERSIONING_XATTR \ | ||
26 | | ECRYPTFS_VERSIONING_MULTKEY \ | ||
27 | | ECRYPTFS_VERSIONING_DEVMISC \ | ||
28 | | ECRYPTFS_VERSIONING_FILENAME_ENCRYPTION) | ||
29 | #define ECRYPTFS_MAX_PASSWORD_LENGTH 64 | 21 | #define ECRYPTFS_MAX_PASSWORD_LENGTH 64 |
30 | #define ECRYPTFS_MAX_PASSPHRASE_BYTES ECRYPTFS_MAX_PASSWORD_LENGTH | 22 | #define ECRYPTFS_MAX_PASSPHRASE_BYTES ECRYPTFS_MAX_PASSWORD_LENGTH |
31 | #define ECRYPTFS_SALT_SIZE 8 | 23 | #define ECRYPTFS_SALT_SIZE 8 |
diff --git a/include/linux/edac.h b/include/linux/edac.h index 4fd4999ccb5b..0b763276f619 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -561,7 +561,6 @@ struct csrow_info { | |||
561 | 561 | ||
562 | u32 ue_count; /* Uncorrectable Errors for this csrow */ | 562 | u32 ue_count; /* Uncorrectable Errors for this csrow */ |
563 | u32 ce_count; /* Correctable Errors for this csrow */ | 563 | u32 ce_count; /* Correctable Errors for this csrow */ |
564 | u32 nr_pages; /* combined pages count of all channels */ | ||
565 | 564 | ||
566 | struct mem_ctl_info *mci; /* the parent */ | 565 | struct mem_ctl_info *mci; /* the parent */ |
567 | 566 | ||
@@ -676,11 +675,11 @@ struct mem_ctl_info { | |||
676 | * sees memory sticks ("dimms"), and the ones that sees memory ranks. | 675 | * sees memory sticks ("dimms"), and the ones that sees memory ranks. |
677 | * All old memory controllers enumerate memories per rank, but most | 676 | * All old memory controllers enumerate memories per rank, but most |
678 | * of the recent drivers enumerate memories per DIMM, instead. | 677 | * of the recent drivers enumerate memories per DIMM, instead. |
679 | * When the memory controller is per rank, mem_is_per_rank is true. | 678 | * When the memory controller is per rank, csbased is true. |
680 | */ | 679 | */ |
681 | unsigned n_layers; | 680 | unsigned n_layers; |
682 | struct edac_mc_layer *layers; | 681 | struct edac_mc_layer *layers; |
683 | bool mem_is_per_rank; | 682 | bool csbased; |
684 | 683 | ||
685 | /* | 684 | /* |
686 | * DIMM info. Will eventually remove the entire csrows_info some day | 685 | * DIMM info. Will eventually remove the entire csrows_info some day |
@@ -741,8 +740,6 @@ struct mem_ctl_info { | |||
741 | u32 fake_inject_ue; | 740 | u32 fake_inject_ue; |
742 | u16 fake_inject_count; | 741 | u16 fake_inject_count; |
743 | #endif | 742 | #endif |
744 | __u8 csbased : 1, /* csrow-based memory controller */ | ||
745 | __resv : 7; | ||
746 | }; | 743 | }; |
747 | 744 | ||
748 | #endif | 745 | #endif |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 9bf2f1fcae27..3d7df3d32c66 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -333,6 +333,7 @@ typedef efi_status_t efi_query_capsule_caps_t(efi_capsule_header_t **capsules, | |||
333 | unsigned long count, | 333 | unsigned long count, |
334 | u64 *max_size, | 334 | u64 *max_size, |
335 | int *reset_type); | 335 | int *reset_type); |
336 | typedef efi_status_t efi_query_variable_store_t(u32 attributes, unsigned long size); | ||
336 | 337 | ||
337 | /* | 338 | /* |
338 | * EFI Configuration Table and GUID definitions | 339 | * EFI Configuration Table and GUID definitions |
@@ -575,9 +576,15 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos | |||
575 | #ifdef CONFIG_X86 | 576 | #ifdef CONFIG_X86 |
576 | extern void efi_late_init(void); | 577 | extern void efi_late_init(void); |
577 | extern void efi_free_boot_services(void); | 578 | extern void efi_free_boot_services(void); |
579 | extern efi_status_t efi_query_variable_store(u32 attributes, unsigned long size); | ||
578 | #else | 580 | #else |
579 | static inline void efi_late_init(void) {} | 581 | static inline void efi_late_init(void) {} |
580 | static inline void efi_free_boot_services(void) {} | 582 | static inline void efi_free_boot_services(void) {} |
583 | |||
584 | static inline efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) | ||
585 | { | ||
586 | return EFI_SUCCESS; | ||
587 | } | ||
581 | #endif | 588 | #endif |
582 | extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); | 589 | extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); |
583 | extern u64 efi_get_iobase (void); | 590 | extern u64 efi_get_iobase (void); |
@@ -731,7 +738,7 @@ struct efivar_operations { | |||
731 | efi_get_variable_t *get_variable; | 738 | efi_get_variable_t *get_variable; |
732 | efi_get_next_variable_t *get_next_variable; | 739 | efi_get_next_variable_t *get_next_variable; |
733 | efi_set_variable_t *set_variable; | 740 | efi_set_variable_t *set_variable; |
734 | efi_query_variable_info_t *query_variable_info; | 741 | efi_query_variable_store_t *query_variable_store; |
735 | }; | 742 | }; |
736 | 743 | ||
737 | struct efivars { | 744 | struct efivars { |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 5b9b5b317180..41b223a59a63 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -85,6 +85,17 @@ enum fid_type { | |||
85 | FILEID_NILFS_WITH_PARENT = 0x62, | 85 | FILEID_NILFS_WITH_PARENT = 0x62, |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * 32 bit generation number, 40 bit i_pos. | ||
89 | */ | ||
90 | FILEID_FAT_WITHOUT_PARENT = 0x71, | ||
91 | |||
92 | /* | ||
93 | * 32 bit generation number, 40 bit i_pos, | ||
94 | * 32 bit parent generation number, 40 bit parent i_pos | ||
95 | */ | ||
96 | FILEID_FAT_WITH_PARENT = 0x72, | ||
97 | |||
98 | /* | ||
88 | * Filesystems must not use 0xff file ID. | 99 | * Filesystems must not use 0xff file ID. |
89 | */ | 100 | */ |
90 | FILEID_INVALID = 0xff, | 101 | FILEID_INVALID = 0xff, |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 043a5cf8b5ba..e70df40d84f6 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -3,7 +3,6 @@ | |||
3 | #ifndef FREEZER_H_INCLUDED | 3 | #ifndef FREEZER_H_INCLUDED |
4 | #define FREEZER_H_INCLUDED | 4 | #define FREEZER_H_INCLUDED |
5 | 5 | ||
6 | #include <linux/debug_locks.h> | ||
7 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
8 | #include <linux/wait.h> | 7 | #include <linux/wait.h> |
9 | #include <linux/atomic.h> | 8 | #include <linux/atomic.h> |
@@ -49,8 +48,6 @@ extern void thaw_kernel_threads(void); | |||
49 | 48 | ||
50 | static inline bool try_to_freeze(void) | 49 | static inline bool try_to_freeze(void) |
51 | { | 50 | { |
52 | if (!(current->flags & PF_NOFREEZE)) | ||
53 | debug_check_no_locks_held(); | ||
54 | might_sleep(); | 51 | might_sleep(); |
55 | if (likely(!freezing(current))) | 52 | if (likely(!freezing(current))) |
56 | return false; | 53 | return false; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 74a907b8b950..2c28271ab9d4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1825,6 +1825,8 @@ struct file_system_type { | |||
1825 | struct lock_class_key i_mutex_dir_key; | 1825 | struct lock_class_key i_mutex_dir_key; |
1826 | }; | 1826 | }; |
1827 | 1827 | ||
1828 | #define MODULE_ALIAS_FS(NAME) MODULE_ALIAS("fs-" NAME) | ||
1829 | |||
1828 | extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags, | 1830 | extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags, |
1829 | void *data, int (*fill_super)(struct super_block *, void *, int)); | 1831 | void *data, int (*fill_super)(struct super_block *, void *, int)); |
1830 | extern struct dentry *mount_bdev(struct file_system_type *fs_type, | 1832 | extern struct dentry *mount_bdev(struct file_system_type *fs_type, |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index 729eded4b24f..2b93a9a5a1e6 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -50,4 +50,6 @@ static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, | |||
50 | spin_unlock(&fs->lock); | 50 | spin_unlock(&fs->lock); |
51 | } | 51 | } |
52 | 52 | ||
53 | extern bool current_chrooted(void); | ||
54 | |||
53 | #endif /* _LINUX_FS_STRUCT_H */ | 55 | #endif /* _LINUX_FS_STRUCT_H */ |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index d5b0910d4961..4b2ee8d12f5e 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -157,7 +157,6 @@ struct fsnotify_group { | |||
157 | struct inotify_group_private_data { | 157 | struct inotify_group_private_data { |
158 | spinlock_t idr_lock; | 158 | spinlock_t idr_lock; |
159 | struct idr idr; | 159 | struct idr idr; |
160 | u32 last_wd; | ||
161 | struct user_struct *user; | 160 | struct user_struct *user; |
162 | } inotify_data; | 161 | } inotify_data; |
163 | #endif | 162 | #endif |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e5ca8ef50e9b..f83e17a40e8b 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -89,6 +89,7 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip, | |||
89 | * that the call back has its own recursion protection. If it does | 89 | * that the call back has its own recursion protection. If it does |
90 | * not set this, then the ftrace infrastructure will add recursion | 90 | * not set this, then the ftrace infrastructure will add recursion |
91 | * protection for the caller. | 91 | * protection for the caller. |
92 | * STUB - The ftrace_ops is just a place holder. | ||
92 | */ | 93 | */ |
93 | enum { | 94 | enum { |
94 | FTRACE_OPS_FL_ENABLED = 1 << 0, | 95 | FTRACE_OPS_FL_ENABLED = 1 << 0, |
@@ -98,6 +99,7 @@ enum { | |||
98 | FTRACE_OPS_FL_SAVE_REGS = 1 << 4, | 99 | FTRACE_OPS_FL_SAVE_REGS = 1 << 4, |
99 | FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, | 100 | FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5, |
100 | FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, | 101 | FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6, |
102 | FTRACE_OPS_FL_STUB = 1 << 7, | ||
101 | }; | 103 | }; |
102 | 104 | ||
103 | struct ftrace_ops { | 105 | struct ftrace_ops { |
@@ -259,8 +261,10 @@ struct ftrace_probe_ops { | |||
259 | void (*func)(unsigned long ip, | 261 | void (*func)(unsigned long ip, |
260 | unsigned long parent_ip, | 262 | unsigned long parent_ip, |
261 | void **data); | 263 | void **data); |
262 | int (*callback)(unsigned long ip, void **data); | 264 | int (*init)(struct ftrace_probe_ops *ops, |
263 | void (*free)(void **data); | 265 | unsigned long ip, void **data); |
266 | void (*free)(struct ftrace_probe_ops *ops, | ||
267 | unsigned long ip, void **data); | ||
264 | int (*print)(struct seq_file *m, | 268 | int (*print)(struct seq_file *m, |
265 | unsigned long ip, | 269 | unsigned long ip, |
266 | struct ftrace_probe_ops *ops, | 270 | struct ftrace_probe_ops *ops, |
@@ -394,7 +398,6 @@ ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf, | |||
394 | size_t cnt, loff_t *ppos); | 398 | size_t cnt, loff_t *ppos); |
395 | ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, | 399 | ssize_t ftrace_notrace_write(struct file *file, const char __user *ubuf, |
396 | size_t cnt, loff_t *ppos); | 400 | size_t cnt, loff_t *ppos); |
397 | loff_t ftrace_regex_lseek(struct file *file, loff_t offset, int whence); | ||
398 | int ftrace_regex_release(struct inode *inode, struct file *file); | 401 | int ftrace_regex_release(struct inode *inode, struct file *file); |
399 | 402 | ||
400 | void __init | 403 | void __init |
@@ -567,6 +570,8 @@ static inline int | |||
567 | ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } | 570 | ftrace_regex_release(struct inode *inode, struct file *file) { return -ENODEV; } |
568 | #endif /* CONFIG_DYNAMIC_FTRACE */ | 571 | #endif /* CONFIG_DYNAMIC_FTRACE */ |
569 | 572 | ||
573 | loff_t ftrace_filter_lseek(struct file *file, loff_t offset, int whence); | ||
574 | |||
570 | /* totally disable ftrace - can not re-enable after this */ | 575 | /* totally disable ftrace - can not re-enable after this */ |
571 | void ftrace_kill(void); | 576 | void ftrace_kill(void); |
572 | 577 | ||
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 13a54d0bdfa8..34e00fb49bec 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/perf_event.h> | 8 | #include <linux/perf_event.h> |
9 | 9 | ||
10 | struct trace_array; | 10 | struct trace_array; |
11 | struct trace_buffer; | ||
11 | struct tracer; | 12 | struct tracer; |
12 | struct dentry; | 13 | struct dentry; |
13 | 14 | ||
@@ -38,6 +39,12 @@ const char *ftrace_print_symbols_seq_u64(struct trace_seq *p, | |||
38 | const char *ftrace_print_hex_seq(struct trace_seq *p, | 39 | const char *ftrace_print_hex_seq(struct trace_seq *p, |
39 | const unsigned char *buf, int len); | 40 | const unsigned char *buf, int len); |
40 | 41 | ||
42 | struct trace_iterator; | ||
43 | struct trace_event; | ||
44 | |||
45 | int ftrace_raw_output_prep(struct trace_iterator *iter, | ||
46 | struct trace_event *event); | ||
47 | |||
41 | /* | 48 | /* |
42 | * The trace entry - the most basic unit of tracing. This is what | 49 | * The trace entry - the most basic unit of tracing. This is what |
43 | * is printed in the end as a single line in the trace output, such as: | 50 | * is printed in the end as a single line in the trace output, such as: |
@@ -61,6 +68,7 @@ struct trace_entry { | |||
61 | struct trace_iterator { | 68 | struct trace_iterator { |
62 | struct trace_array *tr; | 69 | struct trace_array *tr; |
63 | struct tracer *trace; | 70 | struct tracer *trace; |
71 | struct trace_buffer *trace_buffer; | ||
64 | void *private; | 72 | void *private; |
65 | int cpu_file; | 73 | int cpu_file; |
66 | struct mutex mutex; | 74 | struct mutex mutex; |
@@ -95,8 +103,6 @@ enum trace_iter_flags { | |||
95 | }; | 103 | }; |
96 | 104 | ||
97 | 105 | ||
98 | struct trace_event; | ||
99 | |||
100 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, | 106 | typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter, |
101 | int flags, struct trace_event *event); | 107 | int flags, struct trace_event *event); |
102 | 108 | ||
@@ -128,6 +134,13 @@ enum print_line_t { | |||
128 | void tracing_generic_entry_update(struct trace_entry *entry, | 134 | void tracing_generic_entry_update(struct trace_entry *entry, |
129 | unsigned long flags, | 135 | unsigned long flags, |
130 | int pc); | 136 | int pc); |
137 | struct ftrace_event_file; | ||
138 | |||
139 | struct ring_buffer_event * | ||
140 | trace_event_buffer_lock_reserve(struct ring_buffer **current_buffer, | ||
141 | struct ftrace_event_file *ftrace_file, | ||
142 | int type, unsigned long len, | ||
143 | unsigned long flags, int pc); | ||
131 | struct ring_buffer_event * | 144 | struct ring_buffer_event * |
132 | trace_current_buffer_lock_reserve(struct ring_buffer **current_buffer, | 145 | trace_current_buffer_lock_reserve(struct ring_buffer **current_buffer, |
133 | int type, unsigned long len, | 146 | int type, unsigned long len, |
@@ -182,53 +195,49 @@ extern int ftrace_event_reg(struct ftrace_event_call *event, | |||
182 | enum trace_reg type, void *data); | 195 | enum trace_reg type, void *data); |
183 | 196 | ||
184 | enum { | 197 | enum { |
185 | TRACE_EVENT_FL_ENABLED_BIT, | ||
186 | TRACE_EVENT_FL_FILTERED_BIT, | 198 | TRACE_EVENT_FL_FILTERED_BIT, |
187 | TRACE_EVENT_FL_RECORDED_CMD_BIT, | ||
188 | TRACE_EVENT_FL_CAP_ANY_BIT, | 199 | TRACE_EVENT_FL_CAP_ANY_BIT, |
189 | TRACE_EVENT_FL_NO_SET_FILTER_BIT, | 200 | TRACE_EVENT_FL_NO_SET_FILTER_BIT, |
190 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, | 201 | TRACE_EVENT_FL_IGNORE_ENABLE_BIT, |
202 | TRACE_EVENT_FL_WAS_ENABLED_BIT, | ||
191 | }; | 203 | }; |
192 | 204 | ||
205 | /* | ||
206 | * Event flags: | ||
207 | * FILTERED - The event has a filter attached | ||
208 | * CAP_ANY - Any user can enable for perf | ||
209 | * NO_SET_FILTER - Set when filter has error and is to be ignored | ||
210 | * IGNORE_ENABLE - For ftrace internal events, do not enable with debugfs file | ||
211 | * WAS_ENABLED - Set and stays set when an event was ever enabled | ||
212 | * (used for module unloading, if a module event is enabled, | ||
213 | * it is best to clear the buffers that used it). | ||
214 | */ | ||
193 | enum { | 215 | enum { |
194 | TRACE_EVENT_FL_ENABLED = (1 << TRACE_EVENT_FL_ENABLED_BIT), | ||
195 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), | 216 | TRACE_EVENT_FL_FILTERED = (1 << TRACE_EVENT_FL_FILTERED_BIT), |
196 | TRACE_EVENT_FL_RECORDED_CMD = (1 << TRACE_EVENT_FL_RECORDED_CMD_BIT), | ||
197 | TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), | 217 | TRACE_EVENT_FL_CAP_ANY = (1 << TRACE_EVENT_FL_CAP_ANY_BIT), |
198 | TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), | 218 | TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT), |
199 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), | 219 | TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT), |
220 | TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT), | ||
200 | }; | 221 | }; |
201 | 222 | ||
202 | struct ftrace_event_call { | 223 | struct ftrace_event_call { |
203 | struct list_head list; | 224 | struct list_head list; |
204 | struct ftrace_event_class *class; | 225 | struct ftrace_event_class *class; |
205 | char *name; | 226 | char *name; |
206 | struct dentry *dir; | ||
207 | struct trace_event event; | 227 | struct trace_event event; |
208 | const char *print_fmt; | 228 | const char *print_fmt; |
209 | struct event_filter *filter; | 229 | struct event_filter *filter; |
230 | struct list_head *files; | ||
210 | void *mod; | 231 | void *mod; |
211 | void *data; | 232 | void *data; |
212 | |||
213 | /* | 233 | /* |
214 | * 32 bit flags: | 234 | * bit 0: filter_active |
215 | * bit 1: enabled | 235 | * bit 1: allow trace by non root (cap any) |
216 | * bit 2: filter_active | 236 | * bit 2: failed to apply filter |
217 | * bit 3: enabled cmd record | 237 | * bit 3: ftrace internal event (do not enable) |
218 | * bit 4: allow trace by non root (cap any) | 238 | * bit 4: Event was enabled by module |
219 | * bit 5: failed to apply filter | ||
220 | * bit 6: ftrace internal event (do not enable) | ||
221 | * | ||
222 | * Changes to flags must hold the event_mutex. | ||
223 | * | ||
224 | * Note: Reads of flags do not hold the event_mutex since | ||
225 | * they occur in critical sections. But the way flags | ||
226 | * is currently used, these changes do no affect the code | ||
227 | * except that when a change is made, it may have a slight | ||
228 | * delay in propagating the changes to other CPUs due to | ||
229 | * caching and such. | ||
230 | */ | 239 | */ |
231 | unsigned int flags; | 240 | int flags; /* static flags of different events */ |
232 | 241 | ||
233 | #ifdef CONFIG_PERF_EVENTS | 242 | #ifdef CONFIG_PERF_EVENTS |
234 | int perf_refcount; | 243 | int perf_refcount; |
@@ -236,6 +245,56 @@ struct ftrace_event_call { | |||
236 | #endif | 245 | #endif |
237 | }; | 246 | }; |
238 | 247 | ||
248 | struct trace_array; | ||
249 | struct ftrace_subsystem_dir; | ||
250 | |||
251 | enum { | ||
252 | FTRACE_EVENT_FL_ENABLED_BIT, | ||
253 | FTRACE_EVENT_FL_RECORDED_CMD_BIT, | ||
254 | FTRACE_EVENT_FL_SOFT_MODE_BIT, | ||
255 | FTRACE_EVENT_FL_SOFT_DISABLED_BIT, | ||
256 | }; | ||
257 | |||
258 | /* | ||
259 | * Ftrace event file flags: | ||
260 | * ENABLED - The event is enabled | ||
261 | * RECORDED_CMD - The comms should be recorded at sched_switch | ||
262 | * SOFT_MODE - The event is enabled/disabled by SOFT_DISABLED | ||
263 | * SOFT_DISABLED - When set, do not trace the event (even though its | ||
264 | * tracepoint may be enabled) | ||
265 | */ | ||
266 | enum { | ||
267 | FTRACE_EVENT_FL_ENABLED = (1 << FTRACE_EVENT_FL_ENABLED_BIT), | ||
268 | FTRACE_EVENT_FL_RECORDED_CMD = (1 << FTRACE_EVENT_FL_RECORDED_CMD_BIT), | ||
269 | FTRACE_EVENT_FL_SOFT_MODE = (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT), | ||
270 | FTRACE_EVENT_FL_SOFT_DISABLED = (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT), | ||
271 | }; | ||
272 | |||
273 | struct ftrace_event_file { | ||
274 | struct list_head list; | ||
275 | struct ftrace_event_call *event_call; | ||
276 | struct dentry *dir; | ||
277 | struct trace_array *tr; | ||
278 | struct ftrace_subsystem_dir *system; | ||
279 | |||
280 | /* | ||
281 | * 32 bit flags: | ||
282 | * bit 0: enabled | ||
283 | * bit 1: enabled cmd record | ||
284 | * bit 2: enable/disable with the soft disable bit | ||
285 | * bit 3: soft disabled | ||
286 | * | ||
287 | * Note: The bits must be set atomically to prevent races | ||
288 | * from other writers. Reads of flags do not need to be in | ||
289 | * sync as they occur in critical sections. But the way flags | ||
290 | * is currently used, these changes do not affect the code | ||
291 | * except that when a change is made, it may have a slight | ||
292 | * delay in propagating the changes to other CPUs due to | ||
293 | * caching and such. Which is mostly OK ;-) | ||
294 | */ | ||
295 | unsigned long flags; | ||
296 | }; | ||
297 | |||
239 | #define __TRACE_EVENT_FLAGS(name, value) \ | 298 | #define __TRACE_EVENT_FLAGS(name, value) \ |
240 | static int __init trace_init_flags_##name(void) \ | 299 | static int __init trace_init_flags_##name(void) \ |
241 | { \ | 300 | { \ |
@@ -274,7 +333,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type, | |||
274 | extern int trace_add_event_call(struct ftrace_event_call *call); | 333 | extern int trace_add_event_call(struct ftrace_event_call *call); |
275 | extern void trace_remove_event_call(struct ftrace_event_call *call); | 334 | extern void trace_remove_event_call(struct ftrace_event_call *call); |
276 | 335 | ||
277 | #define is_signed_type(type) (((type)(-1)) < (type)0) | 336 | #define is_signed_type(type) (((type)(-1)) < (type)1) |
278 | 337 | ||
279 | int trace_set_clr_event(const char *system, const char *event, int set); | 338 | int trace_set_clr_event(const char *system, const char *event, int set); |
280 | 339 | ||
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index dd7c569aacad..661d374aeb2d 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h | |||
@@ -29,6 +29,10 @@ | |||
29 | 29 | ||
30 | #ifndef __GENALLOC_H__ | 30 | #ifndef __GENALLOC_H__ |
31 | #define __GENALLOC_H__ | 31 | #define __GENALLOC_H__ |
32 | |||
33 | struct device; | ||
34 | struct device_node; | ||
35 | |||
32 | /** | 36 | /** |
33 | * Allocation callback function type definition | 37 | * Allocation callback function type definition |
34 | * @map: Pointer to bitmap | 38 | * @map: Pointer to bitmap |
@@ -105,4 +109,18 @@ extern unsigned long gen_pool_first_fit(unsigned long *map, unsigned long size, | |||
105 | extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, | 109 | extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, |
106 | unsigned long start, unsigned int nr, void *data); | 110 | unsigned long start, unsigned int nr, void *data); |
107 | 111 | ||
112 | extern struct gen_pool *devm_gen_pool_create(struct device *dev, | ||
113 | int min_alloc_order, int nid); | ||
114 | extern struct gen_pool *dev_get_gen_pool(struct device *dev); | ||
115 | |||
116 | #ifdef CONFIG_OF | ||
117 | extern struct gen_pool *of_get_named_gen_pool(struct device_node *np, | ||
118 | const char *propname, int index); | ||
119 | #else | ||
120 | static inline struct gen_pool *of_get_named_gen_pool(struct device_node *np, | ||
121 | const char *propname, int index) | ||
122 | { | ||
123 | return NULL; | ||
124 | } | ||
125 | #endif | ||
108 | #endif /* __GENALLOC_H__ */ | 126 | #endif /* __GENALLOC_H__ */ |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 29eb805ea4a6..c1d6555d2567 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -118,10 +118,8 @@ | |||
118 | 118 | ||
119 | #ifdef CONFIG_PREEMPT_COUNT | 119 | #ifdef CONFIG_PREEMPT_COUNT |
120 | # define preemptible() (preempt_count() == 0 && !irqs_disabled()) | 120 | # define preemptible() (preempt_count() == 0 && !irqs_disabled()) |
121 | # define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1) | ||
122 | #else | 121 | #else |
123 | # define preemptible() 0 | 122 | # define preemptible() 0 |
124 | # define IRQ_EXIT_OFFSET HARDIRQ_OFFSET | ||
125 | #endif | 123 | #endif |
126 | 124 | ||
127 | #if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS) | 125 | #if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS) |
diff --git a/include/linux/hash.h b/include/linux/hash.h index 61c97ae22e01..f09a0ae4d858 100644 --- a/include/linux/hash.h +++ b/include/linux/hash.h | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #include <linux/compiler.h> | ||
18 | 19 | ||
19 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ | 20 | /* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */ |
20 | #define GOLDEN_RATIO_PRIME_32 0x9e370001UL | 21 | #define GOLDEN_RATIO_PRIME_32 0x9e370001UL |
@@ -31,7 +32,7 @@ | |||
31 | #error Wordsize not 32 or 64 | 32 | #error Wordsize not 32 or 64 |
32 | #endif | 33 | #endif |
33 | 34 | ||
34 | static inline u64 hash_64(u64 val, unsigned int bits) | 35 | static __always_inline u64 hash_64(u64 val, unsigned int bits) |
35 | { | 36 | { |
36 | u64 hash = val; | 37 | u64 hash = val; |
37 | 38 | ||
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index ee1c244a62a1..528454c2caa9 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -99,7 +99,11 @@ extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, | |||
99 | extern int handle_pte_fault(struct mm_struct *mm, | 99 | extern int handle_pte_fault(struct mm_struct *mm, |
100 | struct vm_area_struct *vma, unsigned long address, | 100 | struct vm_area_struct *vma, unsigned long address, |
101 | pte_t *pte, pmd_t *pmd, unsigned int flags); | 101 | pte_t *pte, pmd_t *pmd, unsigned int flags); |
102 | extern int split_huge_page(struct page *page); | 102 | extern int split_huge_page_to_list(struct page *page, struct list_head *list); |
103 | static inline int split_huge_page(struct page *page) | ||
104 | { | ||
105 | return split_huge_page_to_list(page, NULL); | ||
106 | } | ||
103 | extern void __split_huge_page_pmd(struct vm_area_struct *vma, | 107 | extern void __split_huge_page_pmd(struct vm_area_struct *vma, |
104 | unsigned long address, pmd_t *pmd); | 108 | unsigned long address, pmd_t *pmd); |
105 | #define split_huge_page_pmd(__vma, __address, __pmd) \ | 109 | #define split_huge_page_pmd(__vma, __address, __pmd) \ |
@@ -186,6 +190,11 @@ extern int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vm | |||
186 | #define transparent_hugepage_enabled(__vma) 0 | 190 | #define transparent_hugepage_enabled(__vma) 0 |
187 | 191 | ||
188 | #define transparent_hugepage_flags 0UL | 192 | #define transparent_hugepage_flags 0UL |
193 | static inline int | ||
194 | split_huge_page_to_list(struct page *page, struct list_head *list) | ||
195 | { | ||
196 | return 0; | ||
197 | } | ||
189 | static inline int split_huge_page(struct page *page) | 198 | static inline int split_huge_page(struct page *page) |
190 | { | 199 | { |
191 | return 0; | 200 | return 0; |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 16e4e9a643fb..3a62df310f2e 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -58,6 +58,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, | |||
58 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); | 58 | int hugetlb_prefault(struct address_space *, struct vm_area_struct *); |
59 | void hugetlb_report_meminfo(struct seq_file *); | 59 | void hugetlb_report_meminfo(struct seq_file *); |
60 | int hugetlb_report_node_meminfo(int, char *); | 60 | int hugetlb_report_node_meminfo(int, char *); |
61 | void hugetlb_show_meminfo(void); | ||
61 | unsigned long hugetlb_total_pages(void); | 62 | unsigned long hugetlb_total_pages(void); |
62 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 63 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
63 | unsigned long address, unsigned int flags); | 64 | unsigned long address, unsigned int flags); |
@@ -114,6 +115,9 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
114 | { | 115 | { |
115 | } | 116 | } |
116 | #define hugetlb_report_node_meminfo(n, buf) 0 | 117 | #define hugetlb_report_node_meminfo(n, buf) 0 |
118 | static inline void hugetlb_show_meminfo(void) | ||
119 | { | ||
120 | } | ||
117 | #define follow_huge_pmd(mm, addr, pmd, write) NULL | 121 | #define follow_huge_pmd(mm, addr, pmd, write) NULL |
118 | #define follow_huge_pud(mm, addr, pud, write) NULL | 122 | #define follow_huge_pud(mm, addr, pud, write) NULL |
119 | #define prepare_hugepage_range(file, addr, len) (-EINVAL) | 123 | #define prepare_hugepage_range(file, addr, len) (-EINVAL) |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index df77ba9a8166..c2559847d7ee 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -27,6 +27,63 @@ | |||
27 | 27 | ||
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | 29 | ||
30 | |||
31 | /* | ||
32 | * Implementation of host controlled snapshot of the guest. | ||
33 | */ | ||
34 | |||
35 | #define VSS_OP_REGISTER 128 | ||
36 | |||
37 | enum hv_vss_op { | ||
38 | VSS_OP_CREATE = 0, | ||
39 | VSS_OP_DELETE, | ||
40 | VSS_OP_HOT_BACKUP, | ||
41 | VSS_OP_GET_DM_INFO, | ||
42 | VSS_OP_BU_COMPLETE, | ||
43 | /* | ||
44 | * Following operations are only supported with IC version >= 5.0 | ||
45 | */ | ||
46 | VSS_OP_FREEZE, /* Freeze the file systems in the VM */ | ||
47 | VSS_OP_THAW, /* Unfreeze the file systems */ | ||
48 | VSS_OP_AUTO_RECOVER, | ||
49 | VSS_OP_COUNT /* Number of operations, must be last */ | ||
50 | }; | ||
51 | |||
52 | |||
53 | /* | ||
54 | * Header for all VSS messages. | ||
55 | */ | ||
56 | struct hv_vss_hdr { | ||
57 | __u8 operation; | ||
58 | __u8 reserved[7]; | ||
59 | } __attribute__((packed)); | ||
60 | |||
61 | |||
62 | /* | ||
63 | * Flag values for the hv_vss_check_feature. Linux supports only | ||
64 | * one value. | ||
65 | */ | ||
66 | #define VSS_HBU_NO_AUTO_RECOVERY 0x00000005 | ||
67 | |||
68 | struct hv_vss_check_feature { | ||
69 | __u32 flags; | ||
70 | } __attribute__((packed)); | ||
71 | |||
72 | struct hv_vss_check_dm_info { | ||
73 | __u32 flags; | ||
74 | } __attribute__((packed)); | ||
75 | |||
76 | struct hv_vss_msg { | ||
77 | union { | ||
78 | struct hv_vss_hdr vss_hdr; | ||
79 | int error; | ||
80 | }; | ||
81 | union { | ||
82 | struct hv_vss_check_feature vss_cf; | ||
83 | struct hv_vss_check_dm_info dm_info; | ||
84 | }; | ||
85 | } __attribute__((packed)); | ||
86 | |||
30 | /* | 87 | /* |
31 | * An implementation of HyperV key value pair (KVP) functionality for Linux. | 88 | * An implementation of HyperV key value pair (KVP) functionality for Linux. |
32 | * | 89 | * |
@@ -1253,6 +1310,25 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver); | |||
1253 | } | 1310 | } |
1254 | 1311 | ||
1255 | /* | 1312 | /* |
1313 | * VSS (Backup/Restore) GUID | ||
1314 | */ | ||
1315 | #define HV_VSS_GUID \ | ||
1316 | .guid = { \ | ||
1317 | 0x29, 0x2e, 0xfa, 0x35, 0x23, 0xea, 0x36, 0x42, \ | ||
1318 | 0x96, 0xae, 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40 \ | ||
1319 | } | ||
1320 | /* | ||
1321 | * Synthetic Video GUID | ||
1322 | * {DA0A7802-E377-4aac-8E77-0558EB1073F8} | ||
1323 | */ | ||
1324 | #define HV_SYNTHVID_GUID \ | ||
1325 | .guid = { \ | ||
1326 | 0x02, 0x78, 0x0a, 0xda, 0x77, 0xe3, 0xac, 0x4a, \ | ||
1327 | 0x8e, 0x77, 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8 \ | ||
1328 | } | ||
1329 | |||
1330 | |||
1331 | /* | ||
1256 | * Common header for Hyper-V ICs | 1332 | * Common header for Hyper-V ICs |
1257 | */ | 1333 | */ |
1258 | 1334 | ||
@@ -1356,6 +1432,10 @@ int hv_kvp_init(struct hv_util_service *); | |||
1356 | void hv_kvp_deinit(void); | 1432 | void hv_kvp_deinit(void); |
1357 | void hv_kvp_onchannelcallback(void *); | 1433 | void hv_kvp_onchannelcallback(void *); |
1358 | 1434 | ||
1435 | int hv_vss_init(struct hv_util_service *); | ||
1436 | void hv_vss_deinit(void); | ||
1437 | void hv_vss_onchannelcallback(void *); | ||
1438 | |||
1359 | /* | 1439 | /* |
1360 | * Negotiated version with the Host. | 1440 | * Negotiated version with the Host. |
1361 | */ | 1441 | */ |
diff --git a/include/linux/i2c/atmel_mxt_ts.h b/include/linux/i2c/atmel_mxt_ts.h index f027f7a63511..99e379b74398 100644 --- a/include/linux/i2c/atmel_mxt_ts.h +++ b/include/linux/i2c/atmel_mxt_ts.h | |||
@@ -15,6 +15,9 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | /* For key_map array */ | ||
19 | #define MXT_NUM_GPIO 4 | ||
20 | |||
18 | /* Orient */ | 21 | /* Orient */ |
19 | #define MXT_NORMAL 0x0 | 22 | #define MXT_NORMAL 0x0 |
20 | #define MXT_DIAGONAL 0x1 | 23 | #define MXT_DIAGONAL 0x1 |
@@ -39,6 +42,8 @@ struct mxt_platform_data { | |||
39 | unsigned int voltage; | 42 | unsigned int voltage; |
40 | unsigned char orient; | 43 | unsigned char orient; |
41 | unsigned long irqflags; | 44 | unsigned long irqflags; |
45 | bool is_tp; | ||
46 | const unsigned int key_map[MXT_NUM_GPIO]; | ||
42 | }; | 47 | }; |
43 | 48 | ||
44 | #endif /* __LINUX_ATMEL_MXT_TS_H */ | 49 | #endif /* __LINUX_ATMEL_MXT_TS_H */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index a6f38b5c34e4..a470ac3ef49d 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -42,6 +42,7 @@ struct idr { | |||
42 | struct idr_layer *id_free; | 42 | struct idr_layer *id_free; |
43 | int layers; /* only valid w/o concurrent changes */ | 43 | int layers; /* only valid w/o concurrent changes */ |
44 | int id_free_cnt; | 44 | int id_free_cnt; |
45 | int cur; /* current pos for cyclic allocation */ | ||
45 | spinlock_t lock; | 46 | spinlock_t lock; |
46 | }; | 47 | }; |
47 | 48 | ||
@@ -73,10 +74,9 @@ struct idr { | |||
73 | */ | 74 | */ |
74 | 75 | ||
75 | void *idr_find_slowpath(struct idr *idp, int id); | 76 | void *idr_find_slowpath(struct idr *idp, int id); |
76 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | ||
77 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | ||
78 | void idr_preload(gfp_t gfp_mask); | 77 | void idr_preload(gfp_t gfp_mask); |
79 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); | 78 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); |
79 | int idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask); | ||
80 | int idr_for_each(struct idr *idp, | 80 | int idr_for_each(struct idr *idp, |
81 | int (*fn)(int id, void *p, void *data), void *data); | 81 | int (*fn)(int id, void *p, void *data), void *data); |
82 | void *idr_get_next(struct idr *idp, int *nextid); | 82 | void *idr_get_next(struct idr *idp, int *nextid); |
@@ -99,7 +99,7 @@ static inline void idr_preload_end(void) | |||
99 | 99 | ||
100 | /** | 100 | /** |
101 | * idr_find - return pointer for given id | 101 | * idr_find - return pointer for given id |
102 | * @idp: idr handle | 102 | * @idr: idr handle |
103 | * @id: lookup key | 103 | * @id: lookup key |
104 | * | 104 | * |
105 | * Return the pointer given the id it has been registered with. A %NULL | 105 | * Return the pointer given the id it has been registered with. A %NULL |
@@ -120,19 +120,6 @@ static inline void *idr_find(struct idr *idr, int id) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * idr_get_new - allocate new idr entry | ||
124 | * @idp: idr handle | ||
125 | * @ptr: pointer you want associated with the id | ||
126 | * @id: pointer to the allocated handle | ||
127 | * | ||
128 | * Simple wrapper around idr_get_new_above() w/ @starting_id of zero. | ||
129 | */ | ||
130 | static inline int idr_get_new(struct idr *idp, void *ptr, int *id) | ||
131 | { | ||
132 | return idr_get_new_above(idp, ptr, 0, id); | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * idr_for_each_entry - iterate over an idr's elements of a given type | 123 | * idr_for_each_entry - iterate over an idr's elements of a given type |
137 | * @idp: idr handle | 124 | * @idp: idr handle |
138 | * @entry: the type * to use as cursor | 125 | * @entry: the type * to use as cursor |
@@ -143,7 +130,56 @@ static inline int idr_get_new(struct idr *idp, void *ptr, int *id) | |||
143 | entry != NULL; \ | 130 | entry != NULL; \ |
144 | ++id, entry = (typeof(entry))idr_get_next((idp), &(id))) | 131 | ++id, entry = (typeof(entry))idr_get_next((idp), &(id))) |
145 | 132 | ||
146 | void __idr_remove_all(struct idr *idp); /* don't use */ | 133 | /* |
134 | * Don't use the following functions. These exist only to suppress | ||
135 | * deprecated warnings on EXPORT_SYMBOL()s. | ||
136 | */ | ||
137 | int __idr_pre_get(struct idr *idp, gfp_t gfp_mask); | ||
138 | int __idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | ||
139 | void __idr_remove_all(struct idr *idp); | ||
140 | |||
141 | /** | ||
142 | * idr_pre_get - reserve resources for idr allocation | ||
143 | * @idp: idr handle | ||
144 | * @gfp_mask: memory allocation flags | ||
145 | * | ||
146 | * Part of old alloc interface. This is going away. Use | ||
147 | * idr_preload[_end]() and idr_alloc() instead. | ||
148 | */ | ||
149 | static inline int __deprecated idr_pre_get(struct idr *idp, gfp_t gfp_mask) | ||
150 | { | ||
151 | return __idr_pre_get(idp, gfp_mask); | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * idr_get_new_above - allocate new idr entry above or equal to a start id | ||
156 | * @idp: idr handle | ||
157 | * @ptr: pointer you want associated with the id | ||
158 | * @starting_id: id to start search at | ||
159 | * @id: pointer to the allocated handle | ||
160 | * | ||
161 | * Part of old alloc interface. This is going away. Use | ||
162 | * idr_preload[_end]() and idr_alloc() instead. | ||
163 | */ | ||
164 | static inline int __deprecated idr_get_new_above(struct idr *idp, void *ptr, | ||
165 | int starting_id, int *id) | ||
166 | { | ||
167 | return __idr_get_new_above(idp, ptr, starting_id, id); | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * idr_get_new - allocate new idr entry | ||
172 | * @idp: idr handle | ||
173 | * @ptr: pointer you want associated with the id | ||
174 | * @id: pointer to the allocated handle | ||
175 | * | ||
176 | * Part of old alloc interface. This is going away. Use | ||
177 | * idr_preload[_end]() and idr_alloc() instead. | ||
178 | */ | ||
179 | static inline int __deprecated idr_get_new(struct idr *idp, void *ptr, int *id) | ||
180 | { | ||
181 | return __idr_get_new_above(idp, ptr, 0, id); | ||
182 | } | ||
147 | 183 | ||
148 | /** | 184 | /** |
149 | * idr_remove_all - remove all ids from the given idr tree | 185 | * idr_remove_all - remove all ids from the given idr tree |
diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h index 2e4eab9868a3..e7fdec4db9da 100644 --- a/include/linux/iio/adc/ad_sigma_delta.h +++ b/include/linux/iio/adc/ad_sigma_delta.h | |||
@@ -133,9 +133,9 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); | |||
133 | .channel2 = (_channel2), \ | 133 | .channel2 = (_channel2), \ |
134 | .address = (_address), \ | 134 | .address = (_address), \ |
135 | .extend_name = (_extend_name), \ | 135 | .extend_name = (_extend_name), \ |
136 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 136 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
137 | IIO_CHAN_INFO_SCALE_SHARED_BIT | \ | 137 | BIT(IIO_CHAN_INFO_OFFSET), \ |
138 | IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, \ | 138 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ |
139 | .scan_index = (_si), \ | 139 | .scan_index = (_si), \ |
140 | .scan_type = { \ | 140 | .scan_type = { \ |
141 | .sign = 'u', \ | 141 | .sign = 'u', \ |
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 1f86a97ab2e2..172c5b23cb84 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
16 | #include <linux/irqreturn.h> | 16 | #include <linux/irqreturn.h> |
17 | #include <linux/iio/trigger.h> | 17 | #include <linux/iio/trigger.h> |
18 | #include <linux/bitops.h> | ||
18 | 19 | ||
19 | #define ST_SENSORS_TX_MAX_LENGTH 2 | 20 | #define ST_SENSORS_TX_MAX_LENGTH 2 |
20 | #define ST_SENSORS_RX_MAX_LENGTH 6 | 21 | #define ST_SENSORS_RX_MAX_LENGTH 6 |
@@ -45,8 +46,8 @@ | |||
45 | { \ | 46 | { \ |
46 | .type = device_type, \ | 47 | .type = device_type, \ |
47 | .modified = 1, \ | 48 | .modified = 1, \ |
48 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 49 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
49 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ | 50 | BIT(IIO_CHAN_INFO_SCALE), \ |
50 | .scan_index = index, \ | 51 | .scan_index = index, \ |
51 | .channel2 = mod, \ | 52 | .channel2 = mod, \ |
52 | .address = addr, \ | 53 | .address = addr, \ |
@@ -227,14 +228,17 @@ struct st_sensor_data { | |||
227 | }; | 228 | }; |
228 | 229 | ||
229 | #ifdef CONFIG_IIO_BUFFER | 230 | #ifdef CONFIG_IIO_BUFFER |
231 | irqreturn_t st_sensors_trigger_handler(int irq, void *p); | ||
232 | |||
233 | int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf); | ||
234 | #endif | ||
235 | |||
236 | #ifdef CONFIG_IIO_TRIGGER | ||
230 | int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | 237 | int st_sensors_allocate_trigger(struct iio_dev *indio_dev, |
231 | const struct iio_trigger_ops *trigger_ops); | 238 | const struct iio_trigger_ops *trigger_ops); |
232 | 239 | ||
233 | void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); | 240 | void st_sensors_deallocate_trigger(struct iio_dev *indio_dev); |
234 | 241 | ||
235 | irqreturn_t st_sensors_trigger_handler(int irq, void *p); | ||
236 | |||
237 | int st_sensors_get_buffer_element(struct iio_dev *indio_dev, u8 *buf); | ||
238 | #else | 242 | #else |
239 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, | 243 | static inline int st_sensors_allocate_trigger(struct iio_dev *indio_dev, |
240 | const struct iio_trigger_ops *trigger_ops) | 244 | const struct iio_trigger_ops *trigger_ops) |
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index da8c776ba0bd..8d171f427632 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h | |||
@@ -38,76 +38,6 @@ enum iio_chan_info_enum { | |||
38 | IIO_CHAN_INFO_HYSTERESIS, | 38 | IIO_CHAN_INFO_HYSTERESIS, |
39 | }; | 39 | }; |
40 | 40 | ||
41 | #define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2) | ||
42 | #define IIO_CHAN_INFO_SEPARATE_BIT(type) BIT(type*2 + 1) | ||
43 | #define IIO_CHAN_INFO_BITS(type) (IIO_CHAN_INFO_SHARED_BIT(type) | \ | ||
44 | IIO_CHAN_INFO_SEPARATE_BIT(type)) | ||
45 | |||
46 | #define IIO_CHAN_INFO_RAW_SEPARATE_BIT \ | ||
47 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_RAW) | ||
48 | #define IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT \ | ||
49 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PROCESSED) | ||
50 | #define IIO_CHAN_INFO_SCALE_SEPARATE_BIT \ | ||
51 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SCALE) | ||
52 | #define IIO_CHAN_INFO_SCALE_SHARED_BIT \ | ||
53 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SCALE) | ||
54 | #define IIO_CHAN_INFO_OFFSET_SEPARATE_BIT \ | ||
55 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_OFFSET) | ||
56 | #define IIO_CHAN_INFO_OFFSET_SHARED_BIT \ | ||
57 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_OFFSET) | ||
58 | #define IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT \ | ||
59 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBSCALE) | ||
60 | #define IIO_CHAN_INFO_CALIBSCALE_SHARED_BIT \ | ||
61 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBSCALE) | ||
62 | #define IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT \ | ||
63 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBBIAS) | ||
64 | #define IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT \ | ||
65 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBBIAS) | ||
66 | #define IIO_CHAN_INFO_PEAK_SEPARATE_BIT \ | ||
67 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAK) | ||
68 | #define IIO_CHAN_INFO_PEAK_SHARED_BIT \ | ||
69 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAK) | ||
70 | #define IIO_CHAN_INFO_PEAKSCALE_SEPARATE_BIT \ | ||
71 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAKSCALE) | ||
72 | #define IIO_CHAN_INFO_PEAKSCALE_SHARED_BIT \ | ||
73 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAKSCALE) | ||
74 | #define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SEPARATE_BIT \ | ||
75 | IIO_CHAN_INFO_SEPARATE_BIT( \ | ||
76 | IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW) | ||
77 | #define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SHARED_BIT \ | ||
78 | IIO_CHAN_INFO_SHARED_BIT( \ | ||
79 | IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW) | ||
80 | #define IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT \ | ||
81 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_AVERAGE_RAW) | ||
82 | #define IIO_CHAN_INFO_AVERAGE_RAW_SHARED_BIT \ | ||
83 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_AVERAGE_RAW) | ||
84 | #define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT \ | ||
85 | IIO_CHAN_INFO_SHARED_BIT( \ | ||
86 | IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY) | ||
87 | #define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT \ | ||
88 | IIO_CHAN_INFO_SEPARATE_BIT( \ | ||
89 | IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY) | ||
90 | #define IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT \ | ||
91 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SAMP_FREQ) | ||
92 | #define IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT \ | ||
93 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SAMP_FREQ) | ||
94 | #define IIO_CHAN_INFO_FREQUENCY_SEPARATE_BIT \ | ||
95 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_FREQUENCY) | ||
96 | #define IIO_CHAN_INFO_FREQUENCY_SHARED_BIT \ | ||
97 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_FREQUENCY) | ||
98 | #define IIO_CHAN_INFO_PHASE_SEPARATE_BIT \ | ||
99 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PHASE) | ||
100 | #define IIO_CHAN_INFO_PHASE_SHARED_BIT \ | ||
101 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PHASE) | ||
102 | #define IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT \ | ||
103 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HARDWAREGAIN) | ||
104 | #define IIO_CHAN_INFO_HARDWAREGAIN_SHARED_BIT \ | ||
105 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HARDWAREGAIN) | ||
106 | #define IIO_CHAN_INFO_HYSTERESIS_SEPARATE_BIT \ | ||
107 | IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HYSTERESIS) | ||
108 | #define IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT \ | ||
109 | IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HYSTERESIS) | ||
110 | |||
111 | enum iio_endian { | 41 | enum iio_endian { |
112 | IIO_CPU, | 42 | IIO_CPU, |
113 | IIO_BE, | 43 | IIO_BE, |
@@ -218,6 +148,10 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev, | |||
218 | * endianness: little or big endian | 148 | * endianness: little or big endian |
219 | * @info_mask: What information is to be exported about this channel. | 149 | * @info_mask: What information is to be exported about this channel. |
220 | * This includes calibbias, scale etc. | 150 | * This includes calibbias, scale etc. |
151 | * @info_mask_separate: What information is to be exported that is specific to | ||
152 | * this channel. | ||
153 | * @info_mask_shared_by_type: What information is to be exported that is shared | ||
154 | * by all channels of the same type. | ||
221 | * @event_mask: What events can this channel produce. | 155 | * @event_mask: What events can this channel produce. |
222 | * @ext_info: Array of extended info attributes for this channel. | 156 | * @ext_info: Array of extended info attributes for this channel. |
223 | * The array is NULL terminated, the last element should | 157 | * The array is NULL terminated, the last element should |
@@ -253,6 +187,8 @@ struct iio_chan_spec { | |||
253 | enum iio_endian endianness; | 187 | enum iio_endian endianness; |
254 | } scan_type; | 188 | } scan_type; |
255 | long info_mask; | 189 | long info_mask; |
190 | long info_mask_separate; | ||
191 | long info_mask_shared_by_type; | ||
256 | long event_mask; | 192 | long event_mask; |
257 | const struct iio_chan_spec_ext_info *ext_info; | 193 | const struct iio_chan_spec_ext_info *ext_info; |
258 | const char *extend_name; | 194 | const char *extend_name; |
@@ -275,7 +211,8 @@ struct iio_chan_spec { | |||
275 | static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, | 211 | static inline bool iio_channel_has_info(const struct iio_chan_spec *chan, |
276 | enum iio_chan_info_enum type) | 212 | enum iio_chan_info_enum type) |
277 | { | 213 | { |
278 | return chan->info_mask & IIO_CHAN_INFO_BITS(type); | 214 | return (chan->info_mask_separate & type) | |
215 | (chan->info_mask_shared_by_type & type); | ||
279 | } | 216 | } |
280 | 217 | ||
281 | #define IIO_ST(si, rb, sb, sh) \ | 218 | #define IIO_ST(si, rb, sb, sh) \ |
diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h index ff781dca2e9a..b665dc7f017b 100644 --- a/include/linux/iio/imu/adis.h +++ b/include/linux/iio/imu/adis.h | |||
@@ -162,8 +162,8 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
162 | .indexed = 1, \ | 162 | .indexed = 1, \ |
163 | .channel = (chan), \ | 163 | .channel = (chan), \ |
164 | .extend_name = name, \ | 164 | .extend_name = name, \ |
165 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 165 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
166 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ | 166 | BIT(IIO_CHAN_INFO_SCALE), \ |
167 | .address = (addr), \ | 167 | .address = (addr), \ |
168 | .scan_index = (si), \ | 168 | .scan_index = (si), \ |
169 | .scan_type = { \ | 169 | .scan_type = { \ |
@@ -184,9 +184,9 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
184 | .type = IIO_TEMP, \ | 184 | .type = IIO_TEMP, \ |
185 | .indexed = 1, \ | 185 | .indexed = 1, \ |
186 | .channel = 0, \ | 186 | .channel = 0, \ |
187 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 187 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
188 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \ | 188 | BIT(IIO_CHAN_INFO_SCALE) | \ |
189 | IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, \ | 189 | BIT(IIO_CHAN_INFO_OFFSET), \ |
190 | .address = (addr), \ | 190 | .address = (addr), \ |
191 | .scan_index = (si), \ | 191 | .scan_index = (si), \ |
192 | .scan_type = { \ | 192 | .scan_type = { \ |
@@ -197,13 +197,13 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
197 | }, \ | 197 | }, \ |
198 | } | 198 | } |
199 | 199 | ||
200 | #define ADIS_MOD_CHAN(_type, mod, addr, si, info, bits) { \ | 200 | #define ADIS_MOD_CHAN(_type, mod, addr, si, info_sep, bits) { \ |
201 | .type = (_type), \ | 201 | .type = (_type), \ |
202 | .modified = 1, \ | 202 | .modified = 1, \ |
203 | .channel2 = IIO_MOD_ ## mod, \ | 203 | .channel2 = IIO_MOD_ ## mod, \ |
204 | .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ | 204 | .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ |
205 | IIO_CHAN_INFO_SCALE_SHARED_BIT | \ | 205 | info_sep, \ |
206 | info, \ | 206 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ |
207 | .address = (addr), \ | 207 | .address = (addr), \ |
208 | .scan_index = (si), \ | 208 | .scan_index = (si), \ |
209 | .scan_type = { \ | 209 | .scan_type = { \ |
@@ -214,17 +214,17 @@ int adis_single_conversion(struct iio_dev *indio_dev, | |||
214 | }, \ | 214 | }, \ |
215 | } | 215 | } |
216 | 216 | ||
217 | #define ADIS_ACCEL_CHAN(mod, addr, si, info, bits) \ | 217 | #define ADIS_ACCEL_CHAN(mod, addr, si, info_sep, bits) \ |
218 | ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info, bits) | 218 | ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, bits) |
219 | 219 | ||
220 | #define ADIS_GYRO_CHAN(mod, addr, si, info, bits) \ | 220 | #define ADIS_GYRO_CHAN(mod, addr, si, info_sep, bits) \ |
221 | ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info, bits) | 221 | ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info_sep, bits) |
222 | 222 | ||
223 | #define ADIS_INCLI_CHAN(mod, addr, si, info, bits) \ | 223 | #define ADIS_INCLI_CHAN(mod, addr, si, info_sep, bits) \ |
224 | ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info, bits) | 224 | ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info_sep, bits) |
225 | 225 | ||
226 | #define ADIS_ROT_CHAN(mod, addr, si, info, bits) \ | 226 | #define ADIS_ROT_CHAN(mod, addr, si, info_sep, bits) \ |
227 | ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info, bits) | 227 | ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info_sep, bits) |
228 | 228 | ||
229 | #ifdef CONFIG_IIO_ADIS_LIB_BUFFER | 229 | #ifdef CONFIG_IIO_ADIS_LIB_BUFFER |
230 | 230 | ||
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h index c66e0a96f6e8..3869c525b052 100644 --- a/include/linux/iio/trigger.h +++ b/include/linux/iio/trigger.h | |||
@@ -44,7 +44,6 @@ struct iio_trigger_ops { | |||
44 | * @id: [INTERN] unique id number | 44 | * @id: [INTERN] unique id number |
45 | * @name: [DRIVER] unique name | 45 | * @name: [DRIVER] unique name |
46 | * @dev: [DRIVER] associated device (if relevant) | 46 | * @dev: [DRIVER] associated device (if relevant) |
47 | * @private_data: [DRIVER] device specific data | ||
48 | * @list: [INTERN] used in maintenance of global trigger list | 47 | * @list: [INTERN] used in maintenance of global trigger list |
49 | * @alloc_list: [DRIVER] used for driver specific trigger list | 48 | * @alloc_list: [DRIVER] used for driver specific trigger list |
50 | * @use_count: use count for the trigger | 49 | * @use_count: use count for the trigger |
@@ -60,7 +59,6 @@ struct iio_trigger { | |||
60 | const char *name; | 59 | const char *name; |
61 | struct device dev; | 60 | struct device dev; |
62 | 61 | ||
63 | void *private_data; | ||
64 | struct list_head list; | 62 | struct list_head list; |
65 | struct list_head alloc_list; | 63 | struct list_head alloc_list; |
66 | int use_count; | 64 | int use_count; |
@@ -92,6 +90,30 @@ static inline void iio_trigger_get(struct iio_trigger *trig) | |||
92 | } | 90 | } |
93 | 91 | ||
94 | /** | 92 | /** |
93 | * iio_device_set_drvdata() - Set trigger driver data | ||
94 | * @trig: IIO trigger structure | ||
95 | * @data: Driver specific data | ||
96 | * | ||
97 | * Allows to attach an arbitrary pointer to an IIO trigger, which can later be | ||
98 | * retrieved by iio_trigger_get_drvdata(). | ||
99 | */ | ||
100 | static inline void iio_trigger_set_drvdata(struct iio_trigger *trig, void *data) | ||
101 | { | ||
102 | dev_set_drvdata(&trig->dev, data); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * iio_trigger_get_drvdata() - Get trigger driver data | ||
107 | * @trig: IIO trigger structure | ||
108 | * | ||
109 | * Returns the data previously set with iio_trigger_set_drvdata() | ||
110 | */ | ||
111 | static inline void *iio_trigger_get_drvdata(struct iio_trigger *trig) | ||
112 | { | ||
113 | return dev_get_drvdata(&trig->dev); | ||
114 | } | ||
115 | |||
116 | /** | ||
95 | * iio_trigger_register() - register a trigger with the IIO core | 117 | * iio_trigger_register() - register a trigger with the IIO core |
96 | * @trig_info: trigger to be registered | 118 | * @trig_info: trigger to be registered |
97 | **/ | 119 | **/ |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 85ac9b9b72a2..89b7c24a36e9 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -192,6 +192,10 @@ extern struct resource * __request_region(struct resource *, | |||
192 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); | 192 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); |
193 | extern void __release_region(struct resource *, resource_size_t, | 193 | extern void __release_region(struct resource *, resource_size_t, |
194 | resource_size_t); | 194 | resource_size_t); |
195 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
196 | extern int release_mem_region_adjustable(struct resource *, resource_size_t, | ||
197 | resource_size_t); | ||
198 | #endif | ||
195 | 199 | ||
196 | static inline int __deprecated check_region(resource_size_t s, | 200 | static inline int __deprecated check_region(resource_size_t s, |
197 | resource_size_t n) | 201 | resource_size_t n) |
diff --git a/include/linux/ipack.h b/include/linux/ipack.h index fea12cbb2aeb..1888e06ddf64 100644 --- a/include/linux/ipack.h +++ b/include/linux/ipack.h | |||
@@ -207,19 +207,41 @@ int ipack_driver_register(struct ipack_driver *edrv, struct module *owner, | |||
207 | void ipack_driver_unregister(struct ipack_driver *edrv); | 207 | void ipack_driver_unregister(struct ipack_driver *edrv); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | * ipack_device_register -- register an IPack device with the kernel | 210 | * ipack_device_init -- initialize an IPack device |
211 | * @dev: the new device to register. | 211 | * @dev: the new device to initialize. |
212 | * | 212 | * |
213 | * Register a new IPack device ("module" in IndustryPack jargon). The call | 213 | * Initialize a new IPack device ("module" in IndustryPack jargon). The call |
214 | * is done by the carrier driver. The carrier should populate the fields | 214 | * is done by the carrier driver. The carrier should populate the fields |
215 | * bus and slot as well as the region array of @dev prior to calling this | 215 | * bus and slot as well as the region array of @dev prior to calling this |
216 | * function. The rest of the fields will be allocated and populated | 216 | * function. The rest of the fields will be allocated and populated |
217 | * during registration. | 217 | * during initalization. |
218 | * | 218 | * |
219 | * Return zero on success or error code on failure. | 219 | * Return zero on success or error code on failure. |
220 | * | ||
221 | * NOTE: _Never_ directly free @dev after calling this function, even | ||
222 | * if it returned an error! Always use ipack_put_device() to give up the | ||
223 | * reference initialized in this function instead. | ||
224 | */ | ||
225 | int ipack_device_init(struct ipack_device *dev); | ||
226 | |||
227 | /** | ||
228 | * ipack_device_add -- Add an IPack device | ||
229 | * @dev: the new device to add. | ||
230 | * | ||
231 | * Add a new IPack device. The call is done by the carrier driver | ||
232 | * after calling ipack_device_init(). | ||
233 | * | ||
234 | * Return zero on success or error code on failure. | ||
235 | * | ||
236 | * NOTE: _Never_ directly free @dev after calling this function, even | ||
237 | * if it returned an error! Always use ipack_put_device() to give up the | ||
238 | * reference initialized in this function instead. | ||
220 | */ | 239 | */ |
221 | int ipack_device_register(struct ipack_device *dev); | 240 | int ipack_device_add(struct ipack_device *dev); |
222 | void ipack_device_unregister(struct ipack_device *dev); | 241 | void ipack_device_del(struct ipack_device *dev); |
242 | |||
243 | void ipack_get_device(struct ipack_device *dev); | ||
244 | void ipack_put_device(struct ipack_device *dev); | ||
223 | 245 | ||
224 | /** | 246 | /** |
225 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table | 247 | * DEFINE_IPACK_DEVICE_TABLE - macro used to describe a IndustryPack table |
diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h index f5dbce50466e..66017028dcb3 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h | |||
@@ -37,7 +37,7 @@ void irq_work_sync(struct irq_work *work); | |||
37 | #ifdef CONFIG_IRQ_WORK | 37 | #ifdef CONFIG_IRQ_WORK |
38 | bool irq_work_needs_cpu(void); | 38 | bool irq_work_needs_cpu(void); |
39 | #else | 39 | #else |
40 | static bool irq_work_needs_cpu(void) { return false; } | 40 | static inline bool irq_work_needs_cpu(void) { return false; } |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #endif /* _LINUX_IRQ_WORK_H */ | 43 | #endif /* _LINUX_IRQ_WORK_H */ |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 80d36874689b..2dac79c39199 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -390,7 +390,6 @@ extern struct pid *session_of_pgrp(struct pid *pgrp); | |||
390 | unsigned long int_sqrt(unsigned long); | 390 | unsigned long int_sqrt(unsigned long); |
391 | 391 | ||
392 | extern void bust_spinlocks(int yes); | 392 | extern void bust_spinlocks(int yes); |
393 | extern void wake_up_klogd(void); | ||
394 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 393 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
395 | extern int panic_timeout; | 394 | extern int panic_timeout; |
396 | extern int panic_on_oops; | 395 | extern int panic_on_oops; |
@@ -487,6 +486,8 @@ enum ftrace_dump_mode { | |||
487 | void tracing_on(void); | 486 | void tracing_on(void); |
488 | void tracing_off(void); | 487 | void tracing_off(void); |
489 | int tracing_is_on(void); | 488 | int tracing_is_on(void); |
489 | void tracing_snapshot(void); | ||
490 | void tracing_snapshot_alloc(void); | ||
490 | 491 | ||
491 | extern void tracing_start(void); | 492 | extern void tracing_start(void); |
492 | extern void tracing_stop(void); | 493 | extern void tracing_stop(void); |
@@ -516,10 +517,32 @@ do { \ | |||
516 | * | 517 | * |
517 | * This is intended as a debugging tool for the developer only. | 518 | * This is intended as a debugging tool for the developer only. |
518 | * Please refrain from leaving trace_printks scattered around in | 519 | * Please refrain from leaving trace_printks scattered around in |
519 | * your code. | 520 | * your code. (Extra memory is used for special buffers that are |
521 | * allocated when trace_printk() is used) | ||
522 | * | ||
523 | * A little optization trick is done here. If there's only one | ||
524 | * argument, there's no need to scan the string for printf formats. | ||
525 | * The trace_puts() will suffice. But how can we take advantage of | ||
526 | * using trace_puts() when trace_printk() has only one argument? | ||
527 | * By stringifying the args and checking the size we can tell | ||
528 | * whether or not there are args. __stringify((__VA_ARGS__)) will | ||
529 | * turn into "()\0" with a size of 3 when there are no args, anything | ||
530 | * else will be bigger. All we need to do is define a string to this, | ||
531 | * and then take its size and compare to 3. If it's bigger, use | ||
532 | * do_trace_printk() otherwise, optimize it to trace_puts(). Then just | ||
533 | * let gcc optimize the rest. | ||
520 | */ | 534 | */ |
521 | 535 | ||
522 | #define trace_printk(fmt, args...) \ | 536 | #define trace_printk(fmt, ...) \ |
537 | do { \ | ||
538 | char _______STR[] = __stringify((__VA_ARGS__)); \ | ||
539 | if (sizeof(_______STR) > 3) \ | ||
540 | do_trace_printk(fmt, ##__VA_ARGS__); \ | ||
541 | else \ | ||
542 | trace_puts(fmt); \ | ||
543 | } while (0) | ||
544 | |||
545 | #define do_trace_printk(fmt, args...) \ | ||
523 | do { \ | 546 | do { \ |
524 | static const char *trace_printk_fmt \ | 547 | static const char *trace_printk_fmt \ |
525 | __attribute__((section("__trace_printk_fmt"))) = \ | 548 | __attribute__((section("__trace_printk_fmt"))) = \ |
@@ -539,7 +562,45 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...); | |||
539 | extern __printf(2, 3) | 562 | extern __printf(2, 3) |
540 | int __trace_printk(unsigned long ip, const char *fmt, ...); | 563 | int __trace_printk(unsigned long ip, const char *fmt, ...); |
541 | 564 | ||
542 | extern void trace_dump_stack(void); | 565 | /** |
566 | * trace_puts - write a string into the ftrace buffer | ||
567 | * @str: the string to record | ||
568 | * | ||
569 | * Note: __trace_bputs is an internal function for trace_puts and | ||
570 | * the @ip is passed in via the trace_puts macro. | ||
571 | * | ||
572 | * This is similar to trace_printk() but is made for those really fast | ||
573 | * paths that a developer wants the least amount of "Heisenbug" affects, | ||
574 | * where the processing of the print format is still too much. | ||
575 | * | ||
576 | * This function allows a kernel developer to debug fast path sections | ||
577 | * that printk is not appropriate for. By scattering in various | ||
578 | * printk like tracing in the code, a developer can quickly see | ||
579 | * where problems are occurring. | ||
580 | * | ||
581 | * This is intended as a debugging tool for the developer only. | ||
582 | * Please refrain from leaving trace_puts scattered around in | ||
583 | * your code. (Extra memory is used for special buffers that are | ||
584 | * allocated when trace_puts() is used) | ||
585 | * | ||
586 | * Returns: 0 if nothing was written, positive # if string was. | ||
587 | * (1 when __trace_bputs is used, strlen(str) when __trace_puts is used) | ||
588 | */ | ||
589 | |||
590 | extern int __trace_bputs(unsigned long ip, const char *str); | ||
591 | extern int __trace_puts(unsigned long ip, const char *str, int size); | ||
592 | #define trace_puts(str) ({ \ | ||
593 | static const char *trace_printk_fmt \ | ||
594 | __attribute__((section("__trace_printk_fmt"))) = \ | ||
595 | __builtin_constant_p(str) ? str : NULL; \ | ||
596 | \ | ||
597 | if (__builtin_constant_p(str)) \ | ||
598 | __trace_bputs(_THIS_IP_, trace_printk_fmt); \ | ||
599 | else \ | ||
600 | __trace_puts(_THIS_IP_, str, strlen(str)); \ | ||
601 | }) | ||
602 | |||
603 | extern void trace_dump_stack(int skip); | ||
543 | 604 | ||
544 | /* | 605 | /* |
545 | * The double __builtin_constant_p is because gcc will give us an error | 606 | * The double __builtin_constant_p is because gcc will give us an error |
@@ -574,6 +635,8 @@ static inline void trace_dump_stack(void) { } | |||
574 | static inline void tracing_on(void) { } | 635 | static inline void tracing_on(void) { } |
575 | static inline void tracing_off(void) { } | 636 | static inline void tracing_off(void) { } |
576 | static inline int tracing_is_on(void) { return 0; } | 637 | static inline int tracing_is_on(void) { return 0; } |
638 | static inline void tracing_snapshot(void) { } | ||
639 | static inline void tracing_snapshot_alloc(void) { } | ||
577 | 640 | ||
578 | static inline __printf(1, 2) | 641 | static inline __printf(1, 2) |
579 | int trace_printk(const char *fmt, ...) | 642 | int trace_printk(const char *fmt, ...) |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index d2e6927bbaae..d78d28a733b1 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -200,6 +200,8 @@ extern size_t vmcoreinfo_max_size; | |||
200 | 200 | ||
201 | int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, | 201 | int __init parse_crashkernel(char *cmdline, unsigned long long system_ram, |
202 | unsigned long long *crash_size, unsigned long long *crash_base); | 202 | unsigned long long *crash_size, unsigned long long *crash_base); |
203 | int parse_crashkernel_high(char *cmdline, unsigned long long system_ram, | ||
204 | unsigned long long *crash_size, unsigned long long *crash_base); | ||
203 | int parse_crashkernel_low(char *cmdline, unsigned long long system_ram, | 205 | int parse_crashkernel_low(char *cmdline, unsigned long long system_ram, |
204 | unsigned long long *crash_size, unsigned long long *crash_base); | 206 | unsigned long long *crash_size, unsigned long long *crash_base); |
205 | int crash_shrink_memory(unsigned long new_size); | 207 | int crash_shrink_memory(unsigned long new_size); |
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 4b6ef4d33cc2..ca1d27a0d6a6 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -29,6 +29,7 @@ | |||
29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi | 29 | * <jkenisto@us.ibm.com> and Prasanna S Panchamukhi |
30 | * <prasanna@in.ibm.com> added function-return probes. | 30 | * <prasanna@in.ibm.com> added function-return probes. |
31 | */ | 31 | */ |
32 | #include <linux/compiler.h> /* for __kprobes */ | ||
32 | #include <linux/linkage.h> | 33 | #include <linux/linkage.h> |
33 | #include <linux/list.h> | 34 | #include <linux/list.h> |
34 | #include <linux/notifier.h> | 35 | #include <linux/notifier.h> |
@@ -49,16 +50,11 @@ | |||
49 | #define KPROBE_REENTER 0x00000004 | 50 | #define KPROBE_REENTER 0x00000004 |
50 | #define KPROBE_HIT_SSDONE 0x00000008 | 51 | #define KPROBE_HIT_SSDONE 0x00000008 |
51 | 52 | ||
52 | /* Attach to insert probes on any functions which should be ignored*/ | ||
53 | #define __kprobes __attribute__((__section__(".kprobes.text"))) | ||
54 | |||
55 | #else /* CONFIG_KPROBES */ | 53 | #else /* CONFIG_KPROBES */ |
56 | typedef int kprobe_opcode_t; | 54 | typedef int kprobe_opcode_t; |
57 | struct arch_specific_insn { | 55 | struct arch_specific_insn { |
58 | int dummy; | 56 | int dummy; |
59 | }; | 57 | }; |
60 | #define __kprobes | ||
61 | |||
62 | #endif /* CONFIG_KPROBES */ | 58 | #endif /* CONFIG_KPROBES */ |
63 | 59 | ||
64 | struct kprobe; | 60 | struct kprobe; |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index cad77fe09d77..c13958251927 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -518,7 +518,7 @@ int kvm_write_guest(struct kvm *kvm, gpa_t gpa, const void *data, | |||
518 | int kvm_write_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, | 518 | int kvm_write_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, |
519 | void *data, unsigned long len); | 519 | void *data, unsigned long len); |
520 | int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, | 520 | int kvm_gfn_to_hva_cache_init(struct kvm *kvm, struct gfn_to_hva_cache *ghc, |
521 | gpa_t gpa); | 521 | gpa_t gpa, unsigned long len); |
522 | int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len); | 522 | int kvm_clear_guest_page(struct kvm *kvm, gfn_t gfn, int offset, int len); |
523 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); | 523 | int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len); |
524 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); | 524 | struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn); |
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index fa7cc7244cbd..b0bcce0ddc95 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h | |||
@@ -71,6 +71,7 @@ struct gfn_to_hva_cache { | |||
71 | u64 generation; | 71 | u64 generation; |
72 | gpa_t gpa; | 72 | gpa_t gpa; |
73 | unsigned long hva; | 73 | unsigned long hva; |
74 | unsigned long len; | ||
74 | struct kvm_memory_slot *memslot; | 75 | struct kvm_memory_slot *memslot; |
75 | }; | 76 | }; |
76 | 77 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 91c9d109e5f1..eae7a053dc51 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -398,6 +398,7 @@ enum { | |||
398 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ | 398 | ATA_HORKAGE_NOSETXFER = (1 << 14), /* skip SETXFER, SATA only */ |
399 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ | 399 | ATA_HORKAGE_BROKEN_FPDMA_AA = (1 << 15), /* skip AA */ |
400 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ | 400 | ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */ |
401 | ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */ | ||
401 | 402 | ||
402 | /* DMA mask for user DMA control: User visible values; DO NOT | 403 | /* DMA mask for user DMA control: User visible values; DO NOT |
403 | renumber */ | 404 | renumber */ |
diff --git a/include/linux/list.h b/include/linux/list.h index d991cc147c98..6a1f8df9144b 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -667,7 +667,9 @@ static inline void hlist_move_list(struct hlist_head *old, | |||
667 | pos = n) | 667 | pos = n) |
668 | 668 | ||
669 | #define hlist_entry_safe(ptr, type, member) \ | 669 | #define hlist_entry_safe(ptr, type, member) \ |
670 | (ptr) ? hlist_entry(ptr, type, member) : NULL | 670 | ({ typeof(ptr) ____ptr = (ptr); \ |
671 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \ | ||
672 | }) | ||
671 | 673 | ||
672 | /** | 674 | /** |
673 | * hlist_for_each_entry - iterate over list of given type | 675 | * hlist_for_each_entry - iterate over list of given type |
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h index 31f9d75adc5b..2eb88556c5c5 100644 --- a/include/linux/list_bl.h +++ b/include/linux/list_bl.h | |||
@@ -125,6 +125,11 @@ static inline void hlist_bl_unlock(struct hlist_bl_head *b) | |||
125 | __bit_spin_unlock(0, (unsigned long *)b); | 125 | __bit_spin_unlock(0, (unsigned long *)b); |
126 | } | 126 | } |
127 | 127 | ||
128 | static inline bool hlist_bl_is_locked(struct hlist_bl_head *b) | ||
129 | { | ||
130 | return bit_spin_is_locked(0, (unsigned long *)b); | ||
131 | } | ||
132 | |||
128 | /** | 133 | /** |
129 | * hlist_bl_for_each_entry - iterate over list of given type | 134 | * hlist_bl_for_each_entry - iterate over list of given type |
130 | * @tpos: the type * to use as a loop cursor. | 135 | * @tpos: the type * to use as a loop cursor. |
diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h new file mode 100644 index 000000000000..d14af7b722ef --- /dev/null +++ b/include/linux/mei_cl_bus.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef _LINUX_MEI_CL_BUS_H | ||
2 | #define _LINUX_MEI_CL_BUS_H | ||
3 | |||
4 | #include <linux/device.h> | ||
5 | #include <linux/uuid.h> | ||
6 | |||
7 | struct mei_cl_device; | ||
8 | |||
9 | struct mei_cl_driver { | ||
10 | struct device_driver driver; | ||
11 | const char *name; | ||
12 | |||
13 | const struct mei_cl_device_id *id_table; | ||
14 | |||
15 | int (*probe)(struct mei_cl_device *dev, | ||
16 | const struct mei_cl_device_id *id); | ||
17 | int (*remove)(struct mei_cl_device *dev); | ||
18 | }; | ||
19 | |||
20 | int __mei_cl_driver_register(struct mei_cl_driver *driver, | ||
21 | struct module *owner); | ||
22 | #define mei_cl_driver_register(driver) \ | ||
23 | __mei_cl_driver_register(driver, THIS_MODULE) | ||
24 | |||
25 | void mei_cl_driver_unregister(struct mei_cl_driver *driver); | ||
26 | |||
27 | int mei_cl_send(struct mei_cl_device *device, u8 *buf, size_t length); | ||
28 | int mei_cl_recv(struct mei_cl_device *device, u8 *buf, size_t length); | ||
29 | |||
30 | typedef void (*mei_cl_event_cb_t)(struct mei_cl_device *device, | ||
31 | u32 events, void *context); | ||
32 | int mei_cl_register_event_cb(struct mei_cl_device *device, | ||
33 | mei_cl_event_cb_t read_cb, void *context); | ||
34 | |||
35 | #define MEI_CL_EVENT_RX 0 | ||
36 | #define MEI_CL_EVENT_TX 1 | ||
37 | |||
38 | void *mei_cl_get_drvdata(const struct mei_cl_device *device); | ||
39 | void mei_cl_set_drvdata(struct mei_cl_device *device, void *data); | ||
40 | |||
41 | int mei_cl_enable_device(struct mei_cl_device *device); | ||
42 | int mei_cl_disable_device(struct mei_cl_device *device); | ||
43 | |||
44 | #endif /* _LINUX_MEI_CL_BUS_H */ | ||
diff --git a/include/linux/memory.h b/include/linux/memory.h index 45e93b468878..73817af8b480 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/node.h> | 18 | #include <linux/node.h> |
19 | #include <linux/compiler.h> | 19 | #include <linux/compiler.h> |
20 | #include <linux/mutex.h> | 20 | #include <linux/mutex.h> |
21 | #include <linux/notifier.h> | ||
21 | 22 | ||
22 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) | 23 | #define MIN_MEMORY_BLOCK_SIZE (1UL << SECTION_SIZE_BITS) |
23 | 24 | ||
@@ -114,9 +115,10 @@ extern void unregister_memory_notifier(struct notifier_block *nb); | |||
114 | extern int register_memory_isolate_notifier(struct notifier_block *nb); | 115 | extern int register_memory_isolate_notifier(struct notifier_block *nb); |
115 | extern void unregister_memory_isolate_notifier(struct notifier_block *nb); | 116 | extern void unregister_memory_isolate_notifier(struct notifier_block *nb); |
116 | extern int register_new_memory(int, struct mem_section *); | 117 | extern int register_new_memory(int, struct mem_section *); |
118 | #ifdef CONFIG_MEMORY_HOTREMOVE | ||
117 | extern int unregister_memory_section(struct mem_section *); | 119 | extern int unregister_memory_section(struct mem_section *); |
120 | #endif | ||
118 | extern int memory_dev_init(void); | 121 | extern int memory_dev_init(void); |
119 | extern int remove_memory_block(unsigned long, struct mem_section *, int); | ||
120 | extern int memory_notify(unsigned long val, void *v); | 122 | extern int memory_notify(unsigned long val, void *v); |
121 | extern int memory_isolate_notify(unsigned long val, void *v); | 123 | extern int memory_isolate_notify(unsigned long val, void *v); |
122 | extern struct memory_block *find_memory_block_hinted(struct mem_section *, | 124 | extern struct memory_block *find_memory_block_hinted(struct mem_section *, |
@@ -127,13 +129,18 @@ enum mem_add_context { BOOT, HOTPLUG }; | |||
127 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ | 129 | #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ |
128 | 130 | ||
129 | #ifdef CONFIG_MEMORY_HOTPLUG | 131 | #ifdef CONFIG_MEMORY_HOTPLUG |
130 | #define hotplug_memory_notifier(fn, pri) { \ | 132 | #define hotplug_memory_notifier(fn, pri) ({ \ |
131 | static __meminitdata struct notifier_block fn##_mem_nb =\ | 133 | static __meminitdata struct notifier_block fn##_mem_nb =\ |
132 | { .notifier_call = fn, .priority = pri }; \ | 134 | { .notifier_call = fn, .priority = pri };\ |
133 | register_memory_notifier(&fn##_mem_nb); \ | 135 | register_memory_notifier(&fn##_mem_nb); \ |
134 | } | 136 | }) |
137 | #define register_hotmemory_notifier(nb) register_memory_notifier(nb) | ||
138 | #define unregister_hotmemory_notifier(nb) unregister_memory_notifier(nb) | ||
135 | #else | 139 | #else |
136 | #define hotplug_memory_notifier(fn, pri) do { } while (0) | 140 | #define hotplug_memory_notifier(fn, pri) (0) |
141 | /* These aren't inline functions due to a GCC bug. */ | ||
142 | #define register_hotmemory_notifier(nb) ({ (void)(nb); 0; }) | ||
143 | #define unregister_hotmemory_notifier(nb) ({ (void)(nb); }) | ||
137 | #endif | 144 | #endif |
138 | 145 | ||
139 | /* | 146 | /* |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index b6a3be7d47bf..3e622c610925 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -97,13 +97,13 @@ extern void __online_page_free(struct page *page); | |||
97 | #ifdef CONFIG_MEMORY_HOTREMOVE | 97 | #ifdef CONFIG_MEMORY_HOTREMOVE |
98 | extern bool is_pageblock_removable_nolock(struct page *page); | 98 | extern bool is_pageblock_removable_nolock(struct page *page); |
99 | extern int arch_remove_memory(u64 start, u64 size); | 99 | extern int arch_remove_memory(u64 start, u64 size); |
100 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | ||
101 | unsigned long nr_pages); | ||
100 | #endif /* CONFIG_MEMORY_HOTREMOVE */ | 102 | #endif /* CONFIG_MEMORY_HOTREMOVE */ |
101 | 103 | ||
102 | /* reasonably generic interface to expand the physical pages in a zone */ | 104 | /* reasonably generic interface to expand the physical pages in a zone */ |
103 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, | 105 | extern int __add_pages(int nid, struct zone *zone, unsigned long start_pfn, |
104 | unsigned long nr_pages); | 106 | unsigned long nr_pages); |
105 | extern int __remove_pages(struct zone *zone, unsigned long start_pfn, | ||
106 | unsigned long nr_pages); | ||
107 | 107 | ||
108 | #ifdef CONFIG_NUMA | 108 | #ifdef CONFIG_NUMA |
109 | extern int memory_add_physaddr_to_nid(u64 start); | 109 | extern int memory_add_physaddr_to_nid(u64 start); |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 9db0bda446a0..84f449475c25 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
@@ -364,8 +364,7 @@ struct ab8500 { | |||
364 | const int *irq_reg_offset; | 364 | const int *irq_reg_offset; |
365 | }; | 365 | }; |
366 | 366 | ||
367 | struct regulator_reg_init; | 367 | struct ab8500_regulator_platform_data; |
368 | struct regulator_init_data; | ||
369 | struct ab8500_gpio_platform_data; | 368 | struct ab8500_gpio_platform_data; |
370 | struct ab8500_codec_platform_data; | 369 | struct ab8500_codec_platform_data; |
371 | struct ab8500_sysctrl_platform_data; | 370 | struct ab8500_sysctrl_platform_data; |
@@ -375,19 +374,13 @@ struct ab8500_sysctrl_platform_data; | |||
375 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used | 374 | * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used |
376 | * @pm_power_off: Should machine pm power off hook be registered or not | 375 | * @pm_power_off: Should machine pm power off hook be registered or not |
377 | * @init: board-specific initialization after detection of ab8500 | 376 | * @init: board-specific initialization after detection of ab8500 |
378 | * @num_regulator_reg_init: number of regulator init registers | ||
379 | * @regulator_reg_init: regulator init registers | ||
380 | * @num_regulator: number of regulators | ||
381 | * @regulator: machine-specific constraints for regulators | 377 | * @regulator: machine-specific constraints for regulators |
382 | */ | 378 | */ |
383 | struct ab8500_platform_data { | 379 | struct ab8500_platform_data { |
384 | int irq_base; | 380 | int irq_base; |
385 | bool pm_power_off; | 381 | bool pm_power_off; |
386 | void (*init) (struct ab8500 *); | 382 | void (*init) (struct ab8500 *); |
387 | int num_regulator_reg_init; | 383 | struct ab8500_regulator_platform_data *regulator; |
388 | struct ab8500_regulator_reg_init *regulator_reg_init; | ||
389 | int num_regulator; | ||
390 | struct regulator_init_data *regulator; | ||
391 | struct abx500_gpio_platform_data *gpio; | 384 | struct abx500_gpio_platform_data *gpio; |
392 | struct ab8500_codec_platform_data *codec; | 385 | struct ab8500_codec_platform_data *codec; |
393 | struct ab8500_sysctrl_platform_data *sysctrl; | 386 | struct ab8500_sysctrl_platform_data *sysctrl; |
diff --git a/include/linux/mfd/arizona/core.h b/include/linux/mfd/arizona/core.h index a710255528d7..cc281368dc55 100644 --- a/include/linux/mfd/arizona/core.h +++ b/include/linux/mfd/arizona/core.h | |||
@@ -100,6 +100,9 @@ struct arizona { | |||
100 | struct regmap_irq_chip_data *aod_irq_chip; | 100 | struct regmap_irq_chip_data *aod_irq_chip; |
101 | struct regmap_irq_chip_data *irq_chip; | 101 | struct regmap_irq_chip_data *irq_chip; |
102 | 102 | ||
103 | bool hpdet_magic; | ||
104 | unsigned int hp_ena; | ||
105 | |||
103 | struct mutex clk_lock; | 106 | struct mutex clk_lock; |
104 | int clk32k_ref; | 107 | int clk32k_ref; |
105 | 108 | ||
diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 455c51d22d6b..a0f940987a3e 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h | |||
@@ -86,6 +86,11 @@ struct arizona_micd_config { | |||
86 | bool gpio; | 86 | bool gpio; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | struct arizona_micd_range { | ||
90 | int max; /** Ohms */ | ||
91 | int key; /** Key to report to input layer */ | ||
92 | }; | ||
93 | |||
89 | struct arizona_pdata { | 94 | struct arizona_pdata { |
90 | int reset; /** GPIO controlling /RESET, if any */ | 95 | int reset; /** GPIO controlling /RESET, if any */ |
91 | int ldoena; /** GPIO controlling LODENA, if any */ | 96 | int ldoena; /** GPIO controlling LODENA, if any */ |
@@ -117,12 +122,21 @@ struct arizona_pdata { | |||
117 | /** GPIO5 is used for jack detection */ | 122 | /** GPIO5 is used for jack detection */ |
118 | bool jd_gpio5; | 123 | bool jd_gpio5; |
119 | 124 | ||
125 | /** Internal pull on GPIO5 is disabled when used for jack detection */ | ||
126 | bool jd_gpio5_nopull; | ||
127 | |||
120 | /** Use the headphone detect circuit to identify the accessory */ | 128 | /** Use the headphone detect circuit to identify the accessory */ |
121 | bool hpdet_acc_id; | 129 | bool hpdet_acc_id; |
122 | 130 | ||
131 | /** Check for line output with HPDET method */ | ||
132 | bool hpdet_acc_id_line; | ||
133 | |||
123 | /** GPIO used for mic isolation with HPDET */ | 134 | /** GPIO used for mic isolation with HPDET */ |
124 | int hpdet_id_gpio; | 135 | int hpdet_id_gpio; |
125 | 136 | ||
137 | /** Extra debounce timeout used during initial mic detection (ms) */ | ||
138 | int micd_detect_debounce; | ||
139 | |||
126 | /** GPIO for mic detection polarity */ | 140 | /** GPIO for mic detection polarity */ |
127 | int micd_pol_gpio; | 141 | int micd_pol_gpio; |
128 | 142 | ||
@@ -135,9 +149,16 @@ struct arizona_pdata { | |||
135 | /** Mic detect debounce level */ | 149 | /** Mic detect debounce level */ |
136 | int micd_dbtime; | 150 | int micd_dbtime; |
137 | 151 | ||
152 | /** Mic detect timeout (ms) */ | ||
153 | int micd_timeout; | ||
154 | |||
138 | /** Force MICBIAS on for mic detect */ | 155 | /** Force MICBIAS on for mic detect */ |
139 | bool micd_force_micbias; | 156 | bool micd_force_micbias; |
140 | 157 | ||
158 | /** Mic detect level parameters */ | ||
159 | const struct arizona_micd_range *micd_ranges; | ||
160 | int num_micd_ranges; | ||
161 | |||
141 | /** Headset polarity configurations */ | 162 | /** Headset polarity configurations */ |
142 | struct arizona_micd_config *micd_configs; | 163 | struct arizona_micd_config *micd_configs; |
143 | int num_micd_configs; | 164 | int num_micd_configs; |
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h index 340355136069..f43aa7c8d040 100644 --- a/include/linux/mfd/arizona/registers.h +++ b/include/linux/mfd/arizona/registers.h | |||
@@ -124,6 +124,10 @@ | |||
124 | #define ARIZONA_MIC_DETECT_1 0x2A3 | 124 | #define ARIZONA_MIC_DETECT_1 0x2A3 |
125 | #define ARIZONA_MIC_DETECT_2 0x2A4 | 125 | #define ARIZONA_MIC_DETECT_2 0x2A4 |
126 | #define ARIZONA_MIC_DETECT_3 0x2A5 | 126 | #define ARIZONA_MIC_DETECT_3 0x2A5 |
127 | #define ARIZONA_MIC_DETECT_LEVEL_1 0x2A6 | ||
128 | #define ARIZONA_MIC_DETECT_LEVEL_2 0x2A7 | ||
129 | #define ARIZONA_MIC_DETECT_LEVEL_3 0x2A8 | ||
130 | #define ARIZONA_MIC_DETECT_LEVEL_4 0x2A9 | ||
127 | #define ARIZONA_MIC_NOISE_MIX_CONTROL_1 0x2C3 | 131 | #define ARIZONA_MIC_NOISE_MIX_CONTROL_1 0x2C3 |
128 | #define ARIZONA_ISOLATION_CONTROL 0x2CB | 132 | #define ARIZONA_ISOLATION_CONTROL 0x2CB |
129 | #define ARIZONA_JACK_DETECT_ANALOGUE 0x2D3 | 133 | #define ARIZONA_JACK_DETECT_ANALOGUE 0x2D3 |
diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index 5b18ecde69b5..1aa4f13cdfa6 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h | |||
@@ -106,6 +106,29 @@ enum max77693_muic_reg { | |||
106 | MAX77693_MUIC_REG_END, | 106 | MAX77693_MUIC_REG_END, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | /* MAX77693 INTMASK1~2 Register */ | ||
110 | #define INTMASK1_ADC1K_SHIFT 3 | ||
111 | #define INTMASK1_ADCERR_SHIFT 2 | ||
112 | #define INTMASK1_ADCLOW_SHIFT 1 | ||
113 | #define INTMASK1_ADC_SHIFT 0 | ||
114 | #define INTMASK1_ADC1K_MASK (1 << INTMASK1_ADC1K_SHIFT) | ||
115 | #define INTMASK1_ADCERR_MASK (1 << INTMASK1_ADCERR_SHIFT) | ||
116 | #define INTMASK1_ADCLOW_MASK (1 << INTMASK1_ADCLOW_SHIFT) | ||
117 | #define INTMASK1_ADC_MASK (1 << INTMASK1_ADC_SHIFT) | ||
118 | |||
119 | #define INTMASK2_VIDRM_SHIFT 5 | ||
120 | #define INTMASK2_VBVOLT_SHIFT 4 | ||
121 | #define INTMASK2_DXOVP_SHIFT 3 | ||
122 | #define INTMASK2_DCDTMR_SHIFT 2 | ||
123 | #define INTMASK2_CHGDETRUN_SHIFT 1 | ||
124 | #define INTMASK2_CHGTYP_SHIFT 0 | ||
125 | #define INTMASK2_VIDRM_MASK (1 << INTMASK2_VIDRM_SHIFT) | ||
126 | #define INTMASK2_VBVOLT_MASK (1 << INTMASK2_VBVOLT_SHIFT) | ||
127 | #define INTMASK2_DXOVP_MASK (1 << INTMASK2_DXOVP_SHIFT) | ||
128 | #define INTMASK2_DCDTMR_MASK (1 << INTMASK2_DCDTMR_SHIFT) | ||
129 | #define INTMASK2_CHGDETRUN_MASK (1 << INTMASK2_CHGDETRUN_SHIFT) | ||
130 | #define INTMASK2_CHGTYP_MASK (1 << INTMASK2_CHGTYP_SHIFT) | ||
131 | |||
109 | /* MAX77693 MUIC - STATUS1~3 Register */ | 132 | /* MAX77693 MUIC - STATUS1~3 Register */ |
110 | #define STATUS1_ADC_SHIFT (0) | 133 | #define STATUS1_ADC_SHIFT (0) |
111 | #define STATUS1_ADCLOW_SHIFT (5) | 134 | #define STATUS1_ADCLOW_SHIFT (5) |
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h index a4d13d7cd001..ecddc5173c7c 100644 --- a/include/linux/mfd/palmas.h +++ b/include/linux/mfd/palmas.h | |||
@@ -109,19 +109,6 @@ struct palmas_reg_init { | |||
109 | */ | 109 | */ |
110 | int mode_sleep; | 110 | int mode_sleep; |
111 | 111 | ||
112 | /* tstep is the timestep loaded to the TSTEP register | ||
113 | * | ||
114 | * For SMPS | ||
115 | * | ||
116 | * 0: Jump (no slope control) | ||
117 | * 1: 10mV/us | ||
118 | * 2: 5mV/us | ||
119 | * 3: 2.5mV/us | ||
120 | * | ||
121 | * For LDO unused | ||
122 | */ | ||
123 | int tstep; | ||
124 | |||
125 | /* voltage_sel is the bitfield loaded onto the SMPSX_VOLTAGE | 112 | /* voltage_sel is the bitfield loaded onto the SMPSX_VOLTAGE |
126 | * register. Set this is the default voltage set in OTP needs | 113 | * register. Set this is the default voltage set in OTP needs |
127 | * to be overridden. | 114 | * to be overridden. |
@@ -154,6 +141,12 @@ enum palmas_regulators { | |||
154 | PALMAS_REG_LDO9, | 141 | PALMAS_REG_LDO9, |
155 | PALMAS_REG_LDOLN, | 142 | PALMAS_REG_LDOLN, |
156 | PALMAS_REG_LDOUSB, | 143 | PALMAS_REG_LDOUSB, |
144 | /* External regulators */ | ||
145 | PALMAS_REG_REGEN1, | ||
146 | PALMAS_REG_REGEN2, | ||
147 | PALMAS_REG_REGEN3, | ||
148 | PALMAS_REG_SYSEN1, | ||
149 | PALMAS_REG_SYSEN2, | ||
157 | /* Total number of regulators */ | 150 | /* Total number of regulators */ |
158 | PALMAS_NUM_REGS, | 151 | PALMAS_NUM_REGS, |
159 | }; | 152 | }; |
@@ -171,6 +164,9 @@ struct palmas_pmic_platform_data { | |||
171 | 164 | ||
172 | /* use LDO6 for vibrator control */ | 165 | /* use LDO6 for vibrator control */ |
173 | int ldo6_vibrator; | 166 | int ldo6_vibrator; |
167 | |||
168 | /* Enable tracking mode of LDO8 */ | ||
169 | bool enable_ldo8_tracking; | ||
174 | }; | 170 | }; |
175 | 171 | ||
176 | struct palmas_usb_platform_data { | 172 | struct palmas_usb_platform_data { |
@@ -221,6 +217,7 @@ struct palmas_clk_platform_data { | |||
221 | }; | 217 | }; |
222 | 218 | ||
223 | struct palmas_platform_data { | 219 | struct palmas_platform_data { |
220 | int irq_flags; | ||
224 | int gpio_base; | 221 | int gpio_base; |
225 | 222 | ||
226 | /* bit value to be loaded to the POWER_CTRL register */ | 223 | /* bit value to be loaded to the POWER_CTRL register */ |
@@ -330,6 +327,8 @@ struct palmas_pmic { | |||
330 | int smps457; | 327 | int smps457; |
331 | 328 | ||
332 | int range[PALMAS_REG_SMPS10]; | 329 | int range[PALMAS_REG_SMPS10]; |
330 | unsigned int ramp_delay[PALMAS_REG_SMPS10]; | ||
331 | unsigned int current_reg_mode[PALMAS_REG_SMPS10]; | ||
333 | }; | 332 | }; |
334 | 333 | ||
335 | struct palmas_resource { | 334 | struct palmas_resource { |
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 290762f93930..29eab2bd3dfa 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
@@ -228,6 +228,7 @@ enum tps65217_bl_fdim { | |||
228 | struct tps65217_bl_pdata { | 228 | struct tps65217_bl_pdata { |
229 | enum tps65217_bl_isel isel; | 229 | enum tps65217_bl_isel isel; |
230 | enum tps65217_bl_fdim fdim; | 230 | enum tps65217_bl_fdim fdim; |
231 | int dft_brightness; | ||
231 | }; | 232 | }; |
232 | 233 | ||
233 | /** | 234 | /** |
diff --git a/include/linux/mfd/tps65912.h b/include/linux/mfd/tps65912.h index aaceab402ec5..6d309032dc0d 100644 --- a/include/linux/mfd/tps65912.h +++ b/include/linux/mfd/tps65912.h | |||
@@ -323,5 +323,6 @@ int tps65912_device_init(struct tps65912 *tps65912); | |||
323 | void tps65912_device_exit(struct tps65912 *tps65912); | 323 | void tps65912_device_exit(struct tps65912 *tps65912); |
324 | int tps65912_irq_init(struct tps65912 *tps65912, int irq, | 324 | int tps65912_irq_init(struct tps65912 *tps65912, int irq, |
325 | struct tps65912_platform_data *pdata); | 325 | struct tps65912_platform_data *pdata); |
326 | int tps65912_irq_exit(struct tps65912 *tps65912); | ||
326 | 327 | ||
327 | #endif /* __LINUX_MFD_TPS65912_H */ | 328 | #endif /* __LINUX_MFD_TPS65912_H */ |
diff --git a/include/linux/mfd/wm831x/auxadc.h b/include/linux/mfd/wm831x/auxadc.h index b132067e9e99..867aa23f9370 100644 --- a/include/linux/mfd/wm831x/auxadc.h +++ b/include/linux/mfd/wm831x/auxadc.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __MFD_WM831X_AUXADC_H__ | 15 | #ifndef __MFD_WM831X_AUXADC_H__ |
16 | #define __MFD_WM831X_AUXADC_H__ | 16 | #define __MFD_WM831X_AUXADC_H__ |
17 | 17 | ||
18 | struct wm831x; | ||
19 | |||
18 | /* | 20 | /* |
19 | * R16429 (0x402D) - AuxADC Data | 21 | * R16429 (0x402D) - AuxADC Data |
20 | */ | 22 | */ |
diff --git a/include/linux/mfd/wm831x/core.h b/include/linux/mfd/wm831x/core.h index 4a3b83a77614..76c22648436f 100644 --- a/include/linux/mfd/wm831x/core.h +++ b/include/linux/mfd/wm831x/core.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/irqdomain.h> | 20 | #include <linux/irqdomain.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/regmap.h> | 22 | #include <linux/regmap.h> |
23 | #include <linux/mfd/wm831x/auxadc.h> | ||
23 | 24 | ||
24 | /* | 25 | /* |
25 | * Register values. | 26 | * Register values. |
@@ -355,7 +356,6 @@ enum wm831x_parent { | |||
355 | }; | 356 | }; |
356 | 357 | ||
357 | struct wm831x; | 358 | struct wm831x; |
358 | enum wm831x_auxadc; | ||
359 | 359 | ||
360 | typedef int (*wm831x_auxadc_read_fn)(struct wm831x *wm831x, | 360 | typedef int (*wm831x_auxadc_read_fn)(struct wm831x *wm831x, |
361 | enum wm831x_auxadc input); | 361 | enum wm831x_auxadc input); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 7acc9dc73c9f..c05d7cfbb6b9 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -44,6 +44,9 @@ extern int sysctl_legacy_va_layout; | |||
44 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
45 | #include <asm/processor.h> | 45 | #include <asm/processor.h> |
46 | 46 | ||
47 | extern unsigned long sysctl_user_reserve_kbytes; | ||
48 | extern unsigned long sysctl_admin_reserve_kbytes; | ||
49 | |||
47 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) | 50 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) |
48 | 51 | ||
49 | /* to align the pointer to the (next) page boundary */ | 52 | /* to align the pointer to the (next) page boundary */ |
@@ -87,7 +90,6 @@ extern unsigned int kobjsize(const void *objp); | |||
87 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | 90 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ |
88 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 91 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
89 | 92 | ||
90 | #define VM_POPULATE 0x00001000 | ||
91 | #define VM_LOCKED 0x00002000 | 93 | #define VM_LOCKED 0x00002000 |
92 | #define VM_IO 0x00004000 /* Memory mapped I/O or similar */ | 94 | #define VM_IO 0x00004000 /* Memory mapped I/O or similar */ |
93 | 95 | ||
@@ -900,7 +902,8 @@ extern void pagefault_out_of_memory(void); | |||
900 | * Flags passed to show_mem() and show_free_areas() to suppress output in | 902 | * Flags passed to show_mem() and show_free_areas() to suppress output in |
901 | * various contexts. | 903 | * various contexts. |
902 | */ | 904 | */ |
903 | #define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */ | 905 | #define SHOW_MEM_FILTER_NODES (0x0001u) /* disallowed nodes */ |
906 | #define SHOW_MEM_FILTER_PAGE_COUNT (0x0002u) /* page type count */ | ||
904 | 907 | ||
905 | extern void show_free_areas(unsigned int flags); | 908 | extern void show_free_areas(unsigned int flags); |
906 | extern bool skip_free_areas_node(unsigned int flags, int nid); | 909 | extern bool skip_free_areas_node(unsigned int flags, int nid); |
@@ -1295,6 +1298,61 @@ extern void free_area_init_node(int nid, unsigned long * zones_size, | |||
1295 | unsigned long zone_start_pfn, unsigned long *zholes_size); | 1298 | unsigned long zone_start_pfn, unsigned long *zholes_size); |
1296 | extern void free_initmem(void); | 1299 | extern void free_initmem(void); |
1297 | 1300 | ||
1301 | /* | ||
1302 | * Free reserved pages within range [PAGE_ALIGN(start), end & PAGE_MASK) | ||
1303 | * into the buddy system. The freed pages will be poisoned with pattern | ||
1304 | * "poison" if it's non-zero. | ||
1305 | * Return pages freed into the buddy system. | ||
1306 | */ | ||
1307 | extern unsigned long free_reserved_area(unsigned long start, unsigned long end, | ||
1308 | int poison, char *s); | ||
1309 | #ifdef CONFIG_HIGHMEM | ||
1310 | /* | ||
1311 | * Free a highmem page into the buddy system, adjusting totalhigh_pages | ||
1312 | * and totalram_pages. | ||
1313 | */ | ||
1314 | extern void free_highmem_page(struct page *page); | ||
1315 | #endif | ||
1316 | |||
1317 | static inline void adjust_managed_page_count(struct page *page, long count) | ||
1318 | { | ||
1319 | totalram_pages += count; | ||
1320 | } | ||
1321 | |||
1322 | /* Free the reserved page into the buddy system, so it gets managed. */ | ||
1323 | static inline void __free_reserved_page(struct page *page) | ||
1324 | { | ||
1325 | ClearPageReserved(page); | ||
1326 | init_page_count(page); | ||
1327 | __free_page(page); | ||
1328 | } | ||
1329 | |||
1330 | static inline void free_reserved_page(struct page *page) | ||
1331 | { | ||
1332 | __free_reserved_page(page); | ||
1333 | adjust_managed_page_count(page, 1); | ||
1334 | } | ||
1335 | |||
1336 | static inline void mark_page_reserved(struct page *page) | ||
1337 | { | ||
1338 | SetPageReserved(page); | ||
1339 | adjust_managed_page_count(page, -1); | ||
1340 | } | ||
1341 | |||
1342 | /* | ||
1343 | * Default method to free all the __init memory into the buddy system. | ||
1344 | * The freed pages will be poisoned with pattern "poison" if it is | ||
1345 | * non-zero. Return pages freed into the buddy system. | ||
1346 | */ | ||
1347 | static inline unsigned long free_initmem_default(int poison) | ||
1348 | { | ||
1349 | extern char __init_begin[], __init_end[]; | ||
1350 | |||
1351 | return free_reserved_area(PAGE_ALIGN((unsigned long)&__init_begin) , | ||
1352 | ((unsigned long)&__init_end) & PAGE_MASK, | ||
1353 | poison, "unused kernel"); | ||
1354 | } | ||
1355 | |||
1298 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP | 1356 | #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP |
1299 | /* | 1357 | /* |
1300 | * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its | 1358 | * With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its |
@@ -1612,6 +1670,8 @@ int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, | |||
1612 | unsigned long pfn); | 1670 | unsigned long pfn); |
1613 | int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, | 1671 | int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, |
1614 | unsigned long pfn); | 1672 | unsigned long pfn); |
1673 | int vm_iomap_memory(struct vm_area_struct *vma, phys_addr_t start, unsigned long len); | ||
1674 | |||
1615 | 1675 | ||
1616 | struct page *follow_page_mask(struct vm_area_struct *vma, | 1676 | struct page *follow_page_mask(struct vm_area_struct *vma, |
1617 | unsigned long address, unsigned int foll_flags, | 1677 | unsigned long address, unsigned int foll_flags, |
@@ -1674,8 +1734,12 @@ int in_gate_area_no_mm(unsigned long addr); | |||
1674 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) | 1734 | #define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);}) |
1675 | #endif /* __HAVE_ARCH_GATE_AREA */ | 1735 | #endif /* __HAVE_ARCH_GATE_AREA */ |
1676 | 1736 | ||
1737 | #ifdef CONFIG_SYSCTL | ||
1738 | extern int sysctl_drop_caches; | ||
1677 | int drop_caches_sysctl_handler(struct ctl_table *, int, | 1739 | int drop_caches_sysctl_handler(struct ctl_table *, int, |
1678 | void __user *, size_t *, loff_t *); | 1740 | void __user *, size_t *, loff_t *); |
1741 | #endif | ||
1742 | |||
1679 | unsigned long shrink_slab(struct shrink_control *shrink, | 1743 | unsigned long shrink_slab(struct shrink_control *shrink, |
1680 | unsigned long nr_pages_scanned, | 1744 | unsigned long nr_pages_scanned, |
1681 | unsigned long lru_pages); | 1745 | unsigned long lru_pages); |
@@ -1703,12 +1767,12 @@ pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); | |||
1703 | void *vmemmap_alloc_block(unsigned long size, int node); | 1767 | void *vmemmap_alloc_block(unsigned long size, int node); |
1704 | void *vmemmap_alloc_block_buf(unsigned long size, int node); | 1768 | void *vmemmap_alloc_block_buf(unsigned long size, int node); |
1705 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); | 1769 | void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); |
1706 | int vmemmap_populate_basepages(struct page *start_page, | 1770 | int vmemmap_populate_basepages(unsigned long start, unsigned long end, |
1707 | unsigned long pages, int node); | 1771 | int node); |
1708 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); | 1772 | int vmemmap_populate(unsigned long start, unsigned long end, int node); |
1709 | void vmemmap_populate_print_last(void); | 1773 | void vmemmap_populate_print_last(void); |
1710 | #ifdef CONFIG_MEMORY_HOTPLUG | 1774 | #ifdef CONFIG_MEMORY_HOTPLUG |
1711 | void vmemmap_free(struct page *memmap, unsigned long nr_pages); | 1775 | void vmemmap_free(unsigned long start, unsigned long end); |
1712 | #endif | 1776 | #endif |
1713 | void register_page_bootmem_memmap(unsigned long section_nr, struct page *map, | 1777 | void register_page_bootmem_memmap(unsigned long section_nr, struct page *map, |
1714 | unsigned long size); | 1778 | unsigned long size); |
@@ -1755,5 +1819,11 @@ static inline unsigned int debug_guardpage_minorder(void) { return 0; } | |||
1755 | static inline bool page_is_guard(struct page *page) { return false; } | 1819 | static inline bool page_is_guard(struct page *page) { return false; } |
1756 | #endif /* CONFIG_DEBUG_PAGEALLOC */ | 1820 | #endif /* CONFIG_DEBUG_PAGEALLOC */ |
1757 | 1821 | ||
1822 | #if MAX_NUMNODES > 1 | ||
1823 | void __init setup_nr_node_ids(void); | ||
1824 | #else | ||
1825 | static inline void setup_nr_node_ids(void) {} | ||
1826 | #endif | ||
1827 | |||
1758 | #endif /* __KERNEL__ */ | 1828 | #endif /* __KERNEL__ */ |
1759 | #endif /* _LINUX_MM_H */ | 1829 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mman.h b/include/linux/mman.h index 61c7a87e5d2b..9aa863da287f 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h | |||
@@ -79,8 +79,6 @@ calc_vm_flag_bits(unsigned long flags) | |||
79 | { | 79 | { |
80 | return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | | 80 | return _calc_vm_trans(flags, MAP_GROWSDOWN, VM_GROWSDOWN ) | |
81 | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | | 81 | _calc_vm_trans(flags, MAP_DENYWRITE, VM_DENYWRITE ) | |
82 | ((flags & MAP_LOCKED) ? (VM_LOCKED | VM_POPULATE) : 0) | | 82 | _calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ); |
83 | (((flags & (MAP_POPULATE | MAP_NONBLOCK)) == MAP_POPULATE) ? | ||
84 | VM_POPULATE : 0); | ||
85 | } | 83 | } |
86 | #endif /* _LINUX_MMAN_H */ | 84 | #endif /* _LINUX_MMAN_H */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index ede274957e05..c74092eebf5c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -527,7 +527,7 @@ static inline int zone_is_oom_locked(const struct zone *zone) | |||
527 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); | 527 | return test_bit(ZONE_OOM_LOCKED, &zone->flags); |
528 | } | 528 | } |
529 | 529 | ||
530 | static inline unsigned zone_end_pfn(const struct zone *zone) | 530 | static inline unsigned long zone_end_pfn(const struct zone *zone) |
531 | { | 531 | { |
532 | return zone->zone_start_pfn + zone->spanned_pages; | 532 | return zone->zone_start_pfn + zone->spanned_pages; |
533 | } | 533 | } |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 779cf7c4a3d1..b508016fb76d 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/uuid.h> | ||
12 | typedef unsigned long kernel_ulong_t; | 13 | typedef unsigned long kernel_ulong_t; |
13 | #endif | 14 | #endif |
14 | 15 | ||
@@ -568,4 +569,12 @@ struct ipack_device_id { | |||
568 | __u32 device; /* Device ID or IPACK_ANY_ID */ | 569 | __u32 device; /* Device ID or IPACK_ANY_ID */ |
569 | }; | 570 | }; |
570 | 571 | ||
572 | #define MEI_CL_MODULE_PREFIX "mei:" | ||
573 | #define MEI_CL_NAME_SIZE 32 | ||
574 | |||
575 | struct mei_cl_device_id { | ||
576 | char name[MEI_CL_NAME_SIZE]; | ||
577 | kernel_ulong_t driver_info; | ||
578 | }; | ||
579 | |||
571 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 580 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index d7029f4a191a..73005f9957ea 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -47,6 +47,8 @@ struct mnt_namespace; | |||
47 | 47 | ||
48 | #define MNT_INTERNAL 0x4000 | 48 | #define MNT_INTERNAL 0x4000 |
49 | 49 | ||
50 | #define MNT_LOCK_READONLY 0x400000 | ||
51 | |||
50 | struct vfsmount { | 52 | struct vfsmount { |
51 | struct dentry *mnt_root; /* root of the mounted tree */ | 53 | struct dentry *mnt_root; /* root of the mounted tree */ |
52 | struct super_block *mnt_sb; /* pointer to superblock */ | 54 | struct super_block *mnt_sb; /* pointer to superblock */ |
diff --git a/include/linux/msi.h b/include/linux/msi.h index ce93a341337d..20c2d6dd5d25 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -13,14 +13,14 @@ struct msi_msg { | |||
13 | /* Helper functions */ | 13 | /* Helper functions */ |
14 | struct irq_data; | 14 | struct irq_data; |
15 | struct msi_desc; | 15 | struct msi_desc; |
16 | extern void mask_msi_irq(struct irq_data *data); | 16 | void mask_msi_irq(struct irq_data *data); |
17 | extern void unmask_msi_irq(struct irq_data *data); | 17 | void unmask_msi_irq(struct irq_data *data); |
18 | extern void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 18 | void __read_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
19 | extern void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 19 | void __get_cached_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
20 | extern void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); | 20 | void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg); |
21 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 21 | void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
22 | extern void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); | 22 | void get_cached_msi_msg(unsigned int irq, struct msi_msg *msg); |
23 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 23 | void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
24 | 24 | ||
25 | struct msi_desc { | 25 | struct msi_desc { |
26 | struct { | 26 | struct { |
@@ -54,9 +54,8 @@ struct msi_desc { | |||
54 | */ | 54 | */ |
55 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); | 55 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
56 | void arch_teardown_msi_irq(unsigned int irq); | 56 | void arch_teardown_msi_irq(unsigned int irq); |
57 | extern int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); | 57 | int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type); |
58 | extern void arch_teardown_msi_irqs(struct pci_dev *dev); | 58 | void arch_teardown_msi_irqs(struct pci_dev *dev); |
59 | extern int arch_msi_check_device(struct pci_dev* dev, int nvec, int type); | 59 | int arch_msi_check_device(struct pci_dev* dev, int nvec, int type); |
60 | |||
61 | 60 | ||
62 | #endif /* LINUX_MSI_H */ | 61 | #endif /* LINUX_MSI_H */ |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 7ccb3c59ed60..ef52d9c91459 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -187,6 +187,13 @@ typedef enum { | |||
187 | * This happens with the Renesas AG-AND chips, possibly others. | 187 | * This happens with the Renesas AG-AND chips, possibly others. |
188 | */ | 188 | */ |
189 | #define BBT_AUTO_REFRESH 0x00000080 | 189 | #define BBT_AUTO_REFRESH 0x00000080 |
190 | /* | ||
191 | * Chip requires ready check on read (for auto-incremented sequential read). | ||
192 | * True only for small page devices; large page devices do not support | ||
193 | * autoincrement. | ||
194 | */ | ||
195 | #define NAND_NEED_READRDY 0x00000100 | ||
196 | |||
190 | /* Chip does not allow subpage writes */ | 197 | /* Chip does not allow subpage writes */ |
191 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 | 198 | #define NAND_NO_SUBPAGE_WRITE 0x00000200 |
192 | 199 | ||
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 9121595a8ebf..433da8a1a426 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h | |||
@@ -53,6 +53,9 @@ struct mutex { | |||
53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) | 53 | #if defined(CONFIG_DEBUG_MUTEXES) || defined(CONFIG_SMP) |
54 | struct task_struct *owner; | 54 | struct task_struct *owner; |
55 | #endif | 55 | #endif |
56 | #ifdef CONFIG_MUTEX_SPIN_ON_OWNER | ||
57 | void *spin_mlock; /* Spinner MCS lock */ | ||
58 | #endif | ||
56 | #ifdef CONFIG_DEBUG_MUTEXES | 59 | #ifdef CONFIG_DEBUG_MUTEXES |
57 | const char *name; | 60 | const char *name; |
58 | void *magic; | 61 | void *magic; |
diff --git a/include/linux/mxsfb.h b/include/linux/mxsfb.h index f14943d55315..f80af8674342 100644 --- a/include/linux/mxsfb.h +++ b/include/linux/mxsfb.h | |||
@@ -24,8 +24,8 @@ | |||
24 | #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ | 24 | #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ |
25 | #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ | 25 | #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ |
26 | 26 | ||
27 | #define FB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6) | 27 | #define MXSFB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6) |
28 | #define FB_SYNC_DOTCLK_FAILING_ACT (1 << 7) /* failing/negtive edge sampling */ | 28 | #define MXSFB_SYNC_DOTCLK_FAILING_ACT (1 << 7) /* failing/negtive edge sampling */ |
29 | 29 | ||
30 | struct mxsfb_platform_data { | 30 | struct mxsfb_platform_data { |
31 | struct fb_videomode *mode_list; | 31 | struct fb_videomode *mode_list; |
@@ -44,6 +44,9 @@ struct mxsfb_platform_data { | |||
44 | * allocated. If specified,fb_size must also be specified. | 44 | * allocated. If specified,fb_size must also be specified. |
45 | * fb_phys must be unused by Linux. | 45 | * fb_phys must be unused by Linux. |
46 | */ | 46 | */ |
47 | u32 sync; /* sync mask, contains MXSFB specifics not | ||
48 | * carried in fb_info->var.sync | ||
49 | */ | ||
47 | }; | 50 | }; |
48 | 51 | ||
49 | #endif /* __LINUX_MXSFB_H */ | 52 | #endif /* __LINUX_MXSFB_H */ |
diff --git a/include/linux/net.h b/include/linux/net.h index aa1673160a45..99c9f0c103c2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -240,8 +240,8 @@ do { \ | |||
240 | #define net_dbg_ratelimited(fmt, ...) \ | 240 | #define net_dbg_ratelimited(fmt, ...) \ |
241 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 241 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
242 | 242 | ||
243 | #define net_random() random32() | 243 | #define net_random() prandom_u32() |
244 | #define net_srandom(seed) srandom32((__force u32)seed) | 244 | #define net_srandom(seed) prandom_seed((__force u32)(seed)) |
245 | 245 | ||
246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, | 246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, |
247 | struct kvec *vec, size_t num, size_t len); | 247 | struct kvec *vec, size_t num, size_t len); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b3d00fa4b314..6151e903eef0 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -210,9 +210,9 @@ struct netdev_hw_addr { | |||
210 | #define NETDEV_HW_ADDR_T_SLAVE 3 | 210 | #define NETDEV_HW_ADDR_T_SLAVE 3 |
211 | #define NETDEV_HW_ADDR_T_UNICAST 4 | 211 | #define NETDEV_HW_ADDR_T_UNICAST 4 |
212 | #define NETDEV_HW_ADDR_T_MULTICAST 5 | 212 | #define NETDEV_HW_ADDR_T_MULTICAST 5 |
213 | bool synced; | ||
214 | bool global_use; | 213 | bool global_use; |
215 | int refcount; | 214 | int refcount; |
215 | int synced; | ||
216 | struct rcu_head rcu_head; | 216 | struct rcu_head rcu_head; |
217 | }; | 217 | }; |
218 | 218 | ||
@@ -895,7 +895,7 @@ struct netdev_fcoe_hbainfo { | |||
895 | * | 895 | * |
896 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh) | 896 | * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh) |
897 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, | 897 | * int (*ndo_bridge_getlink)(struct sk_buff *skb, u32 pid, u32 seq, |
898 | * struct net_device *dev) | 898 | * struct net_device *dev, u32 filter_mask) |
899 | * | 899 | * |
900 | * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); | 900 | * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier); |
901 | * Called to change device carrier. Soft-devices (like dummy, team, etc) | 901 | * Called to change device carrier. Soft-devices (like dummy, team, etc) |
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h index ef9acd3c8450..0214c4c146fa 100644 --- a/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/include/linux/netfilter/ipset/ip_set_ahash.h | |||
@@ -291,6 +291,7 @@ ip_set_hash_destroy(struct ip_set *set) | |||
291 | #define type_pf_data_tlist TOKEN(TYPE, PF, _data_tlist) | 291 | #define type_pf_data_tlist TOKEN(TYPE, PF, _data_tlist) |
292 | #define type_pf_data_next TOKEN(TYPE, PF, _data_next) | 292 | #define type_pf_data_next TOKEN(TYPE, PF, _data_next) |
293 | #define type_pf_data_flags TOKEN(TYPE, PF, _data_flags) | 293 | #define type_pf_data_flags TOKEN(TYPE, PF, _data_flags) |
294 | #define type_pf_data_reset_flags TOKEN(TYPE, PF, _data_reset_flags) | ||
294 | #ifdef IP_SET_HASH_WITH_NETS | 295 | #ifdef IP_SET_HASH_WITH_NETS |
295 | #define type_pf_data_match TOKEN(TYPE, PF, _data_match) | 296 | #define type_pf_data_match TOKEN(TYPE, PF, _data_match) |
296 | #else | 297 | #else |
@@ -385,9 +386,9 @@ type_pf_resize(struct ip_set *set, bool retried) | |||
385 | struct ip_set_hash *h = set->data; | 386 | struct ip_set_hash *h = set->data; |
386 | struct htable *t, *orig = h->table; | 387 | struct htable *t, *orig = h->table; |
387 | u8 htable_bits = orig->htable_bits; | 388 | u8 htable_bits = orig->htable_bits; |
388 | const struct type_pf_elem *data; | 389 | struct type_pf_elem *data; |
389 | struct hbucket *n, *m; | 390 | struct hbucket *n, *m; |
390 | u32 i, j; | 391 | u32 i, j, flags = 0; |
391 | int ret; | 392 | int ret; |
392 | 393 | ||
393 | retry: | 394 | retry: |
@@ -412,9 +413,16 @@ retry: | |||
412 | n = hbucket(orig, i); | 413 | n = hbucket(orig, i); |
413 | for (j = 0; j < n->pos; j++) { | 414 | for (j = 0; j < n->pos; j++) { |
414 | data = ahash_data(n, j); | 415 | data = ahash_data(n, j); |
416 | #ifdef IP_SET_HASH_WITH_NETS | ||
417 | flags = 0; | ||
418 | type_pf_data_reset_flags(data, &flags); | ||
419 | #endif | ||
415 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); | 420 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); |
416 | ret = type_pf_elem_add(m, data, AHASH_MAX(h), 0); | 421 | ret = type_pf_elem_add(m, data, AHASH_MAX(h), flags); |
417 | if (ret < 0) { | 422 | if (ret < 0) { |
423 | #ifdef IP_SET_HASH_WITH_NETS | ||
424 | type_pf_data_flags(data, flags); | ||
425 | #endif | ||
418 | read_unlock_bh(&set->lock); | 426 | read_unlock_bh(&set->lock); |
419 | ahash_destroy(t); | 427 | ahash_destroy(t); |
420 | if (ret == -EAGAIN) | 428 | if (ret == -EAGAIN) |
@@ -836,9 +844,9 @@ type_pf_tresize(struct ip_set *set, bool retried) | |||
836 | struct ip_set_hash *h = set->data; | 844 | struct ip_set_hash *h = set->data; |
837 | struct htable *t, *orig = h->table; | 845 | struct htable *t, *orig = h->table; |
838 | u8 htable_bits = orig->htable_bits; | 846 | u8 htable_bits = orig->htable_bits; |
839 | const struct type_pf_elem *data; | 847 | struct type_pf_elem *data; |
840 | struct hbucket *n, *m; | 848 | struct hbucket *n, *m; |
841 | u32 i, j; | 849 | u32 i, j, flags = 0; |
842 | int ret; | 850 | int ret; |
843 | 851 | ||
844 | /* Try to cleanup once */ | 852 | /* Try to cleanup once */ |
@@ -854,6 +862,8 @@ type_pf_tresize(struct ip_set *set, bool retried) | |||
854 | retry: | 862 | retry: |
855 | ret = 0; | 863 | ret = 0; |
856 | htable_bits++; | 864 | htable_bits++; |
865 | pr_debug("attempt to resize set %s from %u to %u, t %p\n", | ||
866 | set->name, orig->htable_bits, htable_bits, orig); | ||
857 | if (!htable_bits) { | 867 | if (!htable_bits) { |
858 | /* In case we have plenty of memory :-) */ | 868 | /* In case we have plenty of memory :-) */ |
859 | pr_warning("Cannot increase the hashsize of set %s further\n", | 869 | pr_warning("Cannot increase the hashsize of set %s further\n", |
@@ -871,10 +881,17 @@ retry: | |||
871 | n = hbucket(orig, i); | 881 | n = hbucket(orig, i); |
872 | for (j = 0; j < n->pos; j++) { | 882 | for (j = 0; j < n->pos; j++) { |
873 | data = ahash_tdata(n, j); | 883 | data = ahash_tdata(n, j); |
884 | #ifdef IP_SET_HASH_WITH_NETS | ||
885 | flags = 0; | ||
886 | type_pf_data_reset_flags(data, &flags); | ||
887 | #endif | ||
874 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); | 888 | m = hbucket(t, HKEY(data, h->initval, htable_bits)); |
875 | ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), 0, | 889 | ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), flags, |
876 | type_pf_data_timeout(data)); | 890 | ip_set_timeout_get(type_pf_data_timeout(data))); |
877 | if (ret < 0) { | 891 | if (ret < 0) { |
892 | #ifdef IP_SET_HASH_WITH_NETS | ||
893 | type_pf_data_flags(data, flags); | ||
894 | #endif | ||
878 | read_unlock_bh(&set->lock); | 895 | read_unlock_bh(&set->lock); |
879 | ahash_destroy(t); | 896 | ahash_destroy(t); |
880 | if (ret == -EAGAIN) | 897 | if (ret == -EAGAIN) |
@@ -1185,6 +1202,7 @@ type_pf_gc_init(struct ip_set *set) | |||
1185 | #undef type_pf_data_tlist | 1202 | #undef type_pf_data_tlist |
1186 | #undef type_pf_data_next | 1203 | #undef type_pf_data_next |
1187 | #undef type_pf_data_flags | 1204 | #undef type_pf_data_flags |
1205 | #undef type_pf_data_reset_flags | ||
1188 | #undef type_pf_data_match | 1206 | #undef type_pf_data_match |
1189 | 1207 | ||
1190 | #undef type_pf_elem | 1208 | #undef type_pf_elem |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index d65746efc954..d14a4c362465 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -47,8 +47,11 @@ | |||
47 | * runtime initialization. | 47 | * runtime initialization. |
48 | */ | 48 | */ |
49 | 49 | ||
50 | typedef int (*notifier_fn_t)(struct notifier_block *nb, | ||
51 | unsigned long action, void *data); | ||
52 | |||
50 | struct notifier_block { | 53 | struct notifier_block { |
51 | int (*notifier_call)(struct notifier_block *, unsigned long, void *); | 54 | notifier_fn_t notifier_call; |
52 | struct notifier_block __rcu *next; | 55 | struct notifier_block __rcu *next; |
53 | int priority; | 56 | int priority; |
54 | }; | 57 | }; |
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index c25cccaa555a..4fa3b0b9b071 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
@@ -137,6 +137,34 @@ enum { | |||
137 | NVME_LBAF_RP_DEGRADED = 3, | 137 | NVME_LBAF_RP_DEGRADED = 3, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | struct nvme_smart_log { | ||
141 | __u8 critical_warning; | ||
142 | __u8 temperature[2]; | ||
143 | __u8 avail_spare; | ||
144 | __u8 spare_thresh; | ||
145 | __u8 percent_used; | ||
146 | __u8 rsvd6[26]; | ||
147 | __u8 data_units_read[16]; | ||
148 | __u8 data_units_written[16]; | ||
149 | __u8 host_reads[16]; | ||
150 | __u8 host_writes[16]; | ||
151 | __u8 ctrl_busy_time[16]; | ||
152 | __u8 power_cycles[16]; | ||
153 | __u8 power_on_hours[16]; | ||
154 | __u8 unsafe_shutdowns[16]; | ||
155 | __u8 media_errors[16]; | ||
156 | __u8 num_err_log_entries[16]; | ||
157 | __u8 rsvd192[320]; | ||
158 | }; | ||
159 | |||
160 | enum { | ||
161 | NVME_SMART_CRIT_SPARE = 1 << 0, | ||
162 | NVME_SMART_CRIT_TEMPERATURE = 1 << 1, | ||
163 | NVME_SMART_CRIT_RELIABILITY = 1 << 2, | ||
164 | NVME_SMART_CRIT_MEDIA = 1 << 3, | ||
165 | NVME_SMART_CRIT_VOLATILE_MEMORY = 1 << 4, | ||
166 | }; | ||
167 | |||
140 | struct nvme_lba_range_type { | 168 | struct nvme_lba_range_type { |
141 | __u8 type; | 169 | __u8 type; |
142 | __u8 attributes; | 170 | __u8 attributes; |
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 0e38e13eb249..e3dea75a078b 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h | |||
@@ -149,7 +149,7 @@ static inline int page_cache_get_speculative(struct page *page) | |||
149 | { | 149 | { |
150 | VM_BUG_ON(in_interrupt()); | 150 | VM_BUG_ON(in_interrupt()); |
151 | 151 | ||
152 | #if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU) | 152 | #ifdef CONFIG_TINY_RCU |
153 | # ifdef CONFIG_PREEMPT_COUNT | 153 | # ifdef CONFIG_PREEMPT_COUNT |
154 | VM_BUG_ON(!in_atomic()); | 154 | VM_BUG_ON(!in_atomic()); |
155 | # endif | 155 | # endif |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 9a22b5efb384..81b31613eb25 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -41,8 +41,37 @@ static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | |||
41 | 41 | ||
42 | return DEVICE_ACPI_HANDLE(dev); | 42 | return DEVICE_ACPI_HANDLE(dev); |
43 | } | 43 | } |
44 | |||
45 | void acpi_pci_add_bus(struct pci_bus *bus); | ||
46 | void acpi_pci_remove_bus(struct pci_bus *bus); | ||
47 | |||
48 | #ifdef CONFIG_ACPI_PCI_SLOT | ||
49 | void acpi_pci_slot_init(void); | ||
50 | void acpi_pci_slot_enumerate(struct pci_bus *bus, acpi_handle handle); | ||
51 | void acpi_pci_slot_remove(struct pci_bus *bus); | ||
52 | #else | ||
53 | static inline void acpi_pci_slot_init(void) { } | ||
54 | static inline void acpi_pci_slot_enumerate(struct pci_bus *bus, | ||
55 | acpi_handle handle) { } | ||
56 | static inline void acpi_pci_slot_remove(struct pci_bus *bus) { } | ||
44 | #endif | 57 | #endif |
45 | 58 | ||
59 | #ifdef CONFIG_HOTPLUG_PCI_ACPI | ||
60 | void acpiphp_init(void); | ||
61 | void acpiphp_enumerate_slots(struct pci_bus *bus, acpi_handle handle); | ||
62 | void acpiphp_remove_slots(struct pci_bus *bus); | ||
63 | #else | ||
64 | static inline void acpiphp_init(void) { } | ||
65 | static inline void acpiphp_enumerate_slots(struct pci_bus *bus, | ||
66 | acpi_handle handle) { } | ||
67 | static inline void acpiphp_remove_slots(struct pci_bus *bus) { } | ||
68 | #endif | ||
69 | |||
70 | #else /* CONFIG_ACPI */ | ||
71 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } | ||
72 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } | ||
73 | #endif /* CONFIG_ACPI */ | ||
74 | |||
46 | #ifdef CONFIG_ACPI_APEI | 75 | #ifdef CONFIG_ACPI_APEI |
47 | extern bool aer_acpi_firmware_first(void); | 76 | extern bool aer_acpi_firmware_first(void); |
48 | #else | 77 | #else |
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index c8320144fe79..8af4610c2e41 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -23,14 +23,14 @@ | |||
23 | #define PCIE_LINK_STATE_CLKPM 4 | 23 | #define PCIE_LINK_STATE_CLKPM 4 |
24 | 24 | ||
25 | #ifdef CONFIG_PCIEASPM | 25 | #ifdef CONFIG_PCIEASPM |
26 | extern void pcie_aspm_init_link_state(struct pci_dev *pdev); | 26 | void pcie_aspm_init_link_state(struct pci_dev *pdev); |
27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | 27 | void pcie_aspm_exit_link_state(struct pci_dev *pdev); |
28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
29 | extern void pcie_aspm_powersave_config_link(struct pci_dev *pdev); | 29 | void pcie_aspm_powersave_config_link(struct pci_dev *pdev); |
30 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 30 | void pci_disable_link_state(struct pci_dev *pdev, int state); |
31 | extern void pci_disable_link_state_locked(struct pci_dev *pdev, int state); | 31 | void pci_disable_link_state_locked(struct pci_dev *pdev, int state); |
32 | extern void pcie_clear_aspm(struct pci_bus *bus); | 32 | void pcie_clear_aspm(struct pci_bus *bus); |
33 | extern void pcie_no_aspm(void); | 33 | void pcie_no_aspm(void); |
34 | #else | 34 | #else |
35 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) | 35 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) |
36 | { | 36 | { |
@@ -56,8 +56,8 @@ static inline void pcie_no_aspm(void) | |||
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */ | 58 | #ifdef CONFIG_PCIEASPM_DEBUG /* this depends on CONFIG_PCIEASPM */ |
59 | extern void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); | 59 | void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev); |
60 | extern void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); | 60 | void pcie_aspm_remove_sysfs_dev_files(struct pci_dev *pdev); |
61 | #else | 61 | #else |
62 | static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) | 62 | static inline void pcie_aspm_create_sysfs_dev_files(struct pci_dev *pdev) |
63 | { | 63 | { |
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h index 7ef68724f0f0..68bcefd7fca0 100644 --- a/include/linux/pci-ats.h +++ b/include/linux/pci-ats.h | |||
@@ -14,9 +14,9 @@ struct pci_ats { | |||
14 | 14 | ||
15 | #ifdef CONFIG_PCI_ATS | 15 | #ifdef CONFIG_PCI_ATS |
16 | 16 | ||
17 | extern int pci_enable_ats(struct pci_dev *dev, int ps); | 17 | int pci_enable_ats(struct pci_dev *dev, int ps); |
18 | extern void pci_disable_ats(struct pci_dev *dev); | 18 | void pci_disable_ats(struct pci_dev *dev); |
19 | extern int pci_ats_queue_depth(struct pci_dev *dev); | 19 | int pci_ats_queue_depth(struct pci_dev *dev); |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * pci_ats_enabled - query the ATS status | 22 | * pci_ats_enabled - query the ATS status |
@@ -54,12 +54,12 @@ static inline int pci_ats_enabled(struct pci_dev *dev) | |||
54 | 54 | ||
55 | #ifdef CONFIG_PCI_PRI | 55 | #ifdef CONFIG_PCI_PRI |
56 | 56 | ||
57 | extern int pci_enable_pri(struct pci_dev *pdev, u32 reqs); | 57 | int pci_enable_pri(struct pci_dev *pdev, u32 reqs); |
58 | extern void pci_disable_pri(struct pci_dev *pdev); | 58 | void pci_disable_pri(struct pci_dev *pdev); |
59 | extern bool pci_pri_enabled(struct pci_dev *pdev); | 59 | bool pci_pri_enabled(struct pci_dev *pdev); |
60 | extern int pci_reset_pri(struct pci_dev *pdev); | 60 | int pci_reset_pri(struct pci_dev *pdev); |
61 | extern bool pci_pri_stopped(struct pci_dev *pdev); | 61 | bool pci_pri_stopped(struct pci_dev *pdev); |
62 | extern int pci_pri_status(struct pci_dev *pdev); | 62 | int pci_pri_status(struct pci_dev *pdev); |
63 | 63 | ||
64 | #else /* CONFIG_PCI_PRI */ | 64 | #else /* CONFIG_PCI_PRI */ |
65 | 65 | ||
@@ -95,10 +95,10 @@ static inline int pci_pri_status(struct pci_dev *pdev) | |||
95 | 95 | ||
96 | #ifdef CONFIG_PCI_PASID | 96 | #ifdef CONFIG_PCI_PASID |
97 | 97 | ||
98 | extern int pci_enable_pasid(struct pci_dev *pdev, int features); | 98 | int pci_enable_pasid(struct pci_dev *pdev, int features); |
99 | extern void pci_disable_pasid(struct pci_dev *pdev); | 99 | void pci_disable_pasid(struct pci_dev *pdev); |
100 | extern int pci_pasid_features(struct pci_dev *pdev); | 100 | int pci_pasid_features(struct pci_dev *pdev); |
101 | extern int pci_max_pasids(struct pci_dev *pdev); | 101 | int pci_max_pasids(struct pci_dev *pdev); |
102 | 102 | ||
103 | #else /* CONFIG_PCI_PASID */ | 103 | #else /* CONFIG_PCI_PASID */ |
104 | 104 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 2461033a7987..e73dfa308b87 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -35,6 +35,21 @@ | |||
35 | /* Include the ID list */ | 35 | /* Include the ID list */ |
36 | #include <linux/pci_ids.h> | 36 | #include <linux/pci_ids.h> |
37 | 37 | ||
38 | /* | ||
39 | * The PCI interface treats multi-function devices as independent | ||
40 | * devices. The slot/function address of each device is encoded | ||
41 | * in a single byte as follows: | ||
42 | * | ||
43 | * 7:3 = slot | ||
44 | * 2:0 = function | ||
45 | * PCI_DEVFN(), PCI_SLOT(), and PCI_FUNC() are defined uapi/linux/pci.h | ||
46 | * In the interest of not exposing interfaces to user-space unnecessarily, | ||
47 | * the following kernel only defines are being added here. | ||
48 | */ | ||
49 | #define PCI_DEVID(bus, devfn) ((((u16)bus) << 8) | devfn) | ||
50 | /* return bus from PCI devid = ((u16)bus_number) << 8) | devfn */ | ||
51 | #define PCI_BUS_NUM(x) (((x) >> 8) & 0xff) | ||
52 | |||
38 | /* pci_slot represents a physical slot */ | 53 | /* pci_slot represents a physical slot */ |
39 | struct pci_slot { | 54 | struct pci_slot { |
40 | struct pci_bus *bus; /* The bus this slot is on */ | 55 | struct pci_bus *bus; /* The bus this slot is on */ |
@@ -232,6 +247,8 @@ struct pci_dev { | |||
232 | u8 revision; /* PCI revision, low byte of class word */ | 247 | u8 revision; /* PCI revision, low byte of class word */ |
233 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ | 248 | u8 hdr_type; /* PCI header type (`multi' flag masked out) */ |
234 | u8 pcie_cap; /* PCI-E capability offset */ | 249 | u8 pcie_cap; /* PCI-E capability offset */ |
250 | u8 msi_cap; /* MSI capability offset */ | ||
251 | u8 msix_cap; /* MSI-X capability offset */ | ||
235 | u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ | 252 | u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */ |
236 | u8 rom_base_reg; /* which config register controls the ROM */ | 253 | u8 rom_base_reg; /* which config register controls the ROM */ |
237 | u8 pin; /* which interrupt pin this device uses */ | 254 | u8 pin; /* which interrupt pin this device uses */ |
@@ -249,8 +266,7 @@ struct pci_dev { | |||
249 | pci_power_t current_state; /* Current operating state. In ACPI-speak, | 266 | pci_power_t current_state; /* Current operating state. In ACPI-speak, |
250 | this is D0-D3, D0 being fully functional, | 267 | this is D0-D3, D0 being fully functional, |
251 | and D3 being off. */ | 268 | and D3 being off. */ |
252 | int pm_cap; /* PM capability offset in the | 269 | u8 pm_cap; /* PM capability offset */ |
253 | configuration space */ | ||
254 | unsigned int pme_support:5; /* Bitmask of states from which PME# | 270 | unsigned int pme_support:5; /* Bitmask of states from which PME# |
255 | can be generated */ | 271 | can be generated */ |
256 | unsigned int pme_interrupt:1; | 272 | unsigned int pme_interrupt:1; |
@@ -348,7 +364,7 @@ static inline struct pci_dev *pci_physfn(struct pci_dev *dev) | |||
348 | return dev; | 364 | return dev; |
349 | } | 365 | } |
350 | 366 | ||
351 | extern struct pci_dev *alloc_pci_dev(void); | 367 | struct pci_dev *alloc_pci_dev(void); |
352 | 368 | ||
353 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 369 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
354 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 370 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
@@ -504,10 +520,10 @@ struct pci_ops { | |||
504 | * ACPI needs to be able to access PCI config space before we've done a | 520 | * ACPI needs to be able to access PCI config space before we've done a |
505 | * PCI bus scan and created pci_bus structures. | 521 | * PCI bus scan and created pci_bus structures. |
506 | */ | 522 | */ |
507 | extern int raw_pci_read(unsigned int domain, unsigned int bus, | 523 | int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, |
508 | unsigned int devfn, int reg, int len, u32 *val); | 524 | int reg, int len, u32 *val); |
509 | extern int raw_pci_write(unsigned int domain, unsigned int bus, | 525 | int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, |
510 | unsigned int devfn, int reg, int len, u32 val); | 526 | int reg, int len, u32 val); |
511 | 527 | ||
512 | struct pci_bus_region { | 528 | struct pci_bus_region { |
513 | resource_size_t start; | 529 | resource_size_t start; |
@@ -658,7 +674,7 @@ struct pci_driver { | |||
658 | /* these external functions are only available when PCI support is enabled */ | 674 | /* these external functions are only available when PCI support is enabled */ |
659 | #ifdef CONFIG_PCI | 675 | #ifdef CONFIG_PCI |
660 | 676 | ||
661 | extern void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); | 677 | void pcie_bus_configure_settings(struct pci_bus *bus, u8 smpss); |
662 | 678 | ||
663 | enum pcie_bus_config_types { | 679 | enum pcie_bus_config_types { |
664 | PCIE_BUS_TUNE_OFF, | 680 | PCIE_BUS_TUNE_OFF, |
@@ -675,9 +691,11 @@ extern struct bus_type pci_bus_type; | |||
675 | * code, or pci core code. */ | 691 | * code, or pci core code. */ |
676 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 692 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
677 | /* Some device drivers need know if pci is initiated */ | 693 | /* Some device drivers need know if pci is initiated */ |
678 | extern int no_pci_devices(void); | 694 | int no_pci_devices(void); |
679 | 695 | ||
680 | void pcibios_resource_survey_bus(struct pci_bus *bus); | 696 | void pcibios_resource_survey_bus(struct pci_bus *bus); |
697 | void pcibios_add_bus(struct pci_bus *bus); | ||
698 | void pcibios_remove_bus(struct pci_bus *bus); | ||
681 | void pcibios_fixup_bus(struct pci_bus *); | 699 | void pcibios_fixup_bus(struct pci_bus *); |
682 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 700 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); |
683 | /* Architecture specific versions may override this (weak) */ | 701 | /* Architecture specific versions may override this (weak) */ |
@@ -699,7 +717,7 @@ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | |||
699 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | 717 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, |
700 | struct pci_bus_region *region); | 718 | struct pci_bus_region *region); |
701 | void pcibios_scan_specific_bus(int busn); | 719 | void pcibios_scan_specific_bus(int busn); |
702 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 720 | struct pci_bus *pci_find_bus(int domain, int busnr); |
703 | void pci_bus_add_devices(const struct pci_bus *bus); | 721 | void pci_bus_add_devices(const struct pci_bus *bus); |
704 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, | 722 | struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, |
705 | struct pci_ops *ops, void *sysdata); | 723 | struct pci_ops *ops, void *sysdata); |
@@ -732,14 +750,14 @@ struct resource *pci_find_parent_resource(const struct pci_dev *dev, | |||
732 | u8 pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin); | 750 | u8 pci_swizzle_interrupt_pin(const struct pci_dev *dev, u8 pin); |
733 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); | 751 | int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); |
734 | u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); | 752 | u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp); |
735 | extern struct pci_dev *pci_dev_get(struct pci_dev *dev); | 753 | struct pci_dev *pci_dev_get(struct pci_dev *dev); |
736 | extern void pci_dev_put(struct pci_dev *dev); | 754 | void pci_dev_put(struct pci_dev *dev); |
737 | extern void pci_remove_bus(struct pci_bus *b); | 755 | void pci_remove_bus(struct pci_bus *b); |
738 | extern void pci_stop_and_remove_bus_device(struct pci_dev *dev); | 756 | void pci_stop_and_remove_bus_device(struct pci_dev *dev); |
739 | void pci_stop_root_bus(struct pci_bus *bus); | 757 | void pci_stop_root_bus(struct pci_bus *bus); |
740 | void pci_remove_root_bus(struct pci_bus *bus); | 758 | void pci_remove_root_bus(struct pci_bus *bus); |
741 | void pci_setup_cardbus(struct pci_bus *bus); | 759 | void pci_setup_cardbus(struct pci_bus *bus); |
742 | extern void pci_sort_breadthfirst(void); | 760 | void pci_sort_breadthfirst(void); |
743 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) | 761 | #define dev_is_pci(d) ((d)->bus == &pci_bus_type) |
744 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) | 762 | #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false)) |
745 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) | 763 | #define dev_num_vf(d) ((dev_is_pci(d) ? pci_num_vf(to_pci_dev(d)) : 0)) |
@@ -916,6 +934,7 @@ void pci_disable_rom(struct pci_dev *pdev); | |||
916 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 934 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
917 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 935 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
918 | size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); | 936 | size_t pci_get_rom_size(struct pci_dev *pdev, void __iomem *rom, size_t size); |
937 | void __iomem __must_check *pci_platform_rom(struct pci_dev *pdev, size_t *size); | ||
919 | 938 | ||
920 | /* Power management related routines */ | 939 | /* Power management related routines */ |
921 | int pci_save_state(struct pci_dev *dev); | 940 | int pci_save_state(struct pci_dev *dev); |
@@ -1141,18 +1160,17 @@ static inline int pci_msi_enabled(void) | |||
1141 | return 0; | 1160 | return 0; |
1142 | } | 1161 | } |
1143 | #else | 1162 | #else |
1144 | extern int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); | 1163 | int pci_enable_msi_block(struct pci_dev *dev, unsigned int nvec); |
1145 | extern int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); | 1164 | int pci_enable_msi_block_auto(struct pci_dev *dev, unsigned int *maxvec); |
1146 | extern void pci_msi_shutdown(struct pci_dev *dev); | 1165 | void pci_msi_shutdown(struct pci_dev *dev); |
1147 | extern void pci_disable_msi(struct pci_dev *dev); | 1166 | void pci_disable_msi(struct pci_dev *dev); |
1148 | extern int pci_msix_table_size(struct pci_dev *dev); | 1167 | int pci_msix_table_size(struct pci_dev *dev); |
1149 | extern int pci_enable_msix(struct pci_dev *dev, | 1168 | int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec); |
1150 | struct msix_entry *entries, int nvec); | 1169 | void pci_msix_shutdown(struct pci_dev *dev); |
1151 | extern void pci_msix_shutdown(struct pci_dev *dev); | 1170 | void pci_disable_msix(struct pci_dev *dev); |
1152 | extern void pci_disable_msix(struct pci_dev *dev); | 1171 | void msi_remove_pci_irq_vectors(struct pci_dev *dev); |
1153 | extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); | 1172 | void pci_restore_msi_state(struct pci_dev *dev); |
1154 | extern void pci_restore_msi_state(struct pci_dev *dev); | 1173 | int pci_msi_enabled(void); |
1155 | extern int pci_msi_enabled(void); | ||
1156 | #endif | 1174 | #endif |
1157 | 1175 | ||
1158 | #ifdef CONFIG_PCIEPORTBUS | 1176 | #ifdef CONFIG_PCIEPORTBUS |
@@ -1167,8 +1185,8 @@ extern bool pcie_ports_auto; | |||
1167 | static inline int pcie_aspm_enabled(void) { return 0; } | 1185 | static inline int pcie_aspm_enabled(void) { return 0; } |
1168 | static inline bool pcie_aspm_support_enabled(void) { return false; } | 1186 | static inline bool pcie_aspm_support_enabled(void) { return false; } |
1169 | #else | 1187 | #else |
1170 | extern int pcie_aspm_enabled(void); | 1188 | int pcie_aspm_enabled(void); |
1171 | extern bool pcie_aspm_support_enabled(void); | 1189 | bool pcie_aspm_support_enabled(void); |
1172 | #endif | 1190 | #endif |
1173 | 1191 | ||
1174 | #ifdef CONFIG_PCIEAER | 1192 | #ifdef CONFIG_PCIEAER |
@@ -1186,8 +1204,8 @@ static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | |||
1186 | } | 1204 | } |
1187 | static inline void pcie_ecrc_get_policy(char *str) {}; | 1205 | static inline void pcie_ecrc_get_policy(char *str) {}; |
1188 | #else | 1206 | #else |
1189 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | 1207 | void pcie_set_ecrc_checking(struct pci_dev *dev); |
1190 | extern void pcie_ecrc_get_policy(char *str); | 1208 | void pcie_ecrc_get_policy(char *str); |
1191 | #endif | 1209 | #endif |
1192 | 1210 | ||
1193 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 1211 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
@@ -1198,9 +1216,9 @@ int ht_create_irq(struct pci_dev *dev, int idx); | |||
1198 | void ht_destroy_irq(unsigned int irq); | 1216 | void ht_destroy_irq(unsigned int irq); |
1199 | #endif /* CONFIG_HT_IRQ */ | 1217 | #endif /* CONFIG_HT_IRQ */ |
1200 | 1218 | ||
1201 | extern void pci_cfg_access_lock(struct pci_dev *dev); | 1219 | void pci_cfg_access_lock(struct pci_dev *dev); |
1202 | extern bool pci_cfg_access_trylock(struct pci_dev *dev); | 1220 | bool pci_cfg_access_trylock(struct pci_dev *dev); |
1203 | extern void pci_cfg_access_unlock(struct pci_dev *dev); | 1221 | void pci_cfg_access_unlock(struct pci_dev *dev); |
1204 | 1222 | ||
1205 | /* | 1223 | /* |
1206 | * PCI domain support. Sometimes called PCI segment (eg by ACPI), | 1224 | * PCI domain support. Sometimes called PCI segment (eg by ACPI), |
@@ -1225,7 +1243,7 @@ static inline int pci_proc_domain(struct pci_bus *bus) | |||
1225 | /* some architectures require additional setup to direct VGA traffic */ | 1243 | /* some architectures require additional setup to direct VGA traffic */ |
1226 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, | 1244 | typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, |
1227 | unsigned int command_bits, u32 flags); | 1245 | unsigned int command_bits, u32 flags); |
1228 | extern void pci_register_set_vga_state(arch_set_vga_state_t func); | 1246 | void pci_register_set_vga_state(arch_set_vga_state_t func); |
1229 | 1247 | ||
1230 | #else /* CONFIG_PCI is not enabled */ | 1248 | #else /* CONFIG_PCI is not enabled */ |
1231 | 1249 | ||
@@ -1627,8 +1645,8 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, | |||
1627 | int pcibios_add_device(struct pci_dev *dev); | 1645 | int pcibios_add_device(struct pci_dev *dev); |
1628 | 1646 | ||
1629 | #ifdef CONFIG_PCI_MMCONFIG | 1647 | #ifdef CONFIG_PCI_MMCONFIG |
1630 | extern void __init pci_mmcfg_early_init(void); | 1648 | void __init pci_mmcfg_early_init(void); |
1631 | extern void __init pci_mmcfg_late_init(void); | 1649 | void __init pci_mmcfg_late_init(void); |
1632 | #else | 1650 | #else |
1633 | static inline void pci_mmcfg_early_init(void) { } | 1651 | static inline void pci_mmcfg_early_init(void) { } |
1634 | static inline void pci_mmcfg_late_init(void) { } | 1652 | static inline void pci_mmcfg_late_init(void) { } |
@@ -1639,12 +1657,12 @@ int pci_ext_cfg_avail(void); | |||
1639 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1657 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1640 | 1658 | ||
1641 | #ifdef CONFIG_PCI_IOV | 1659 | #ifdef CONFIG_PCI_IOV |
1642 | extern int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); | 1660 | int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); |
1643 | extern void pci_disable_sriov(struct pci_dev *dev); | 1661 | void pci_disable_sriov(struct pci_dev *dev); |
1644 | extern irqreturn_t pci_sriov_migration(struct pci_dev *dev); | 1662 | irqreturn_t pci_sriov_migration(struct pci_dev *dev); |
1645 | extern int pci_num_vf(struct pci_dev *dev); | 1663 | int pci_num_vf(struct pci_dev *dev); |
1646 | extern int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); | 1664 | int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); |
1647 | extern int pci_sriov_get_totalvfs(struct pci_dev *dev); | 1665 | int pci_sriov_get_totalvfs(struct pci_dev *dev); |
1648 | #else | 1666 | #else |
1649 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) | 1667 | static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) |
1650 | { | 1668 | { |
@@ -1672,8 +1690,8 @@ static inline int pci_sriov_get_totalvfs(struct pci_dev *dev) | |||
1672 | #endif | 1690 | #endif |
1673 | 1691 | ||
1674 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | 1692 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) |
1675 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | 1693 | void pci_hp_create_module_link(struct pci_slot *pci_slot); |
1676 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | 1694 | void pci_hp_remove_module_link(struct pci_slot *pci_slot); |
1677 | #endif | 1695 | #endif |
1678 | 1696 | ||
1679 | /** | 1697 | /** |
@@ -1817,13 +1835,13 @@ int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off, | |||
1817 | /* PCI <-> OF binding helpers */ | 1835 | /* PCI <-> OF binding helpers */ |
1818 | #ifdef CONFIG_OF | 1836 | #ifdef CONFIG_OF |
1819 | struct device_node; | 1837 | struct device_node; |
1820 | extern void pci_set_of_node(struct pci_dev *dev); | 1838 | void pci_set_of_node(struct pci_dev *dev); |
1821 | extern void pci_release_of_node(struct pci_dev *dev); | 1839 | void pci_release_of_node(struct pci_dev *dev); |
1822 | extern void pci_set_bus_of_node(struct pci_bus *bus); | 1840 | void pci_set_bus_of_node(struct pci_bus *bus); |
1823 | extern void pci_release_bus_of_node(struct pci_bus *bus); | 1841 | void pci_release_bus_of_node(struct pci_bus *bus); |
1824 | 1842 | ||
1825 | /* Arch may override this (weak) */ | 1843 | /* Arch may override this (weak) */ |
1826 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); | 1844 | struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus); |
1827 | 1845 | ||
1828 | static inline struct device_node * | 1846 | static inline struct device_node * |
1829 | pci_device_to_OF_node(const struct pci_dev *pdev) | 1847 | pci_device_to_OF_node(const struct pci_dev *pdev) |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 45fc162cbdc0..8db71dcd6337 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -125,12 +125,12 @@ static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) | |||
125 | return pci_slot_name(slot->pci_slot); | 125 | return pci_slot_name(slot->pci_slot); |
126 | } | 126 | } |
127 | 127 | ||
128 | extern int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, | 128 | int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, int nr, |
129 | int nr, const char *name, | 129 | const char *name, struct module *owner, |
130 | struct module *owner, const char *mod_name); | 130 | const char *mod_name); |
131 | extern int pci_hp_deregister(struct hotplug_slot *slot); | 131 | int pci_hp_deregister(struct hotplug_slot *slot); |
132 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 132 | int __must_check pci_hp_change_slot_info(struct hotplug_slot *slot, |
133 | struct hotplug_slot_info *info); | 133 | struct hotplug_slot_info *info); |
134 | 134 | ||
135 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ | 135 | /* use a define to avoid include chaining to get THIS_MODULE & friends */ |
136 | #define pci_hp_register(slot, pbus, devnr, name) \ | 136 | #define pci_hp_register(slot, pbus, devnr, name) \ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f11c1c2609d5..a80f9e6ce9e5 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1604,6 +1604,7 @@ | |||
1604 | #define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 | 1604 | #define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 |
1605 | 1605 | ||
1606 | #define PCI_VENDOR_ID_MARVELL 0x11ab | 1606 | #define PCI_VENDOR_ID_MARVELL 0x11ab |
1607 | #define PCI_VENDOR_ID_MARVELL_EXT 0x1b4b | ||
1607 | #define PCI_DEVICE_ID_MARVELL_GT64111 0x4146 | 1608 | #define PCI_DEVICE_ID_MARVELL_GT64111 0x4146 |
1608 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 | 1609 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 |
1609 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 | 1610 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 |
diff --git a/include/linux/pcieport_if.h b/include/linux/pcieport_if.h index e6f91b1406d8..9572669eea97 100644 --- a/include/linux/pcieport_if.h +++ b/include/linux/pcieport_if.h | |||
@@ -62,7 +62,7 @@ struct pcie_port_service_driver { | |||
62 | #define to_service_driver(d) \ | 62 | #define to_service_driver(d) \ |
63 | container_of(d, struct pcie_port_service_driver, driver) | 63 | container_of(d, struct pcie_port_service_driver, driver) |
64 | 64 | ||
65 | extern int pcie_port_service_register(struct pcie_port_service_driver *new); | 65 | int pcie_port_service_register(struct pcie_port_service_driver *new); |
66 | extern void pcie_port_service_unregister(struct pcie_port_service_driver *new); | 66 | void pcie_port_service_unregister(struct pcie_port_service_driver *new); |
67 | 67 | ||
68 | #endif /* _PCIEPORT_IF_H_ */ | 68 | #endif /* _PCIEPORT_IF_H_ */ |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 0140830225e2..f463a46424e2 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -21,7 +21,6 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #ifdef CONFIG_PERF_EVENTS | 23 | #ifdef CONFIG_PERF_EVENTS |
24 | # include <linux/cgroup.h> | ||
25 | # include <asm/perf_event.h> | 24 | # include <asm/perf_event.h> |
26 | # include <asm/local64.h> | 25 | # include <asm/local64.h> |
27 | #endif | 26 | #endif |
@@ -128,6 +127,7 @@ struct hw_perf_event { | |||
128 | int event_base_rdpmc; | 127 | int event_base_rdpmc; |
129 | int idx; | 128 | int idx; |
130 | int last_cpu; | 129 | int last_cpu; |
130 | int flags; | ||
131 | 131 | ||
132 | struct hw_perf_event_extra extra_reg; | 132 | struct hw_perf_event_extra extra_reg; |
133 | struct hw_perf_event_extra branch_reg; | 133 | struct hw_perf_event_extra branch_reg; |
@@ -299,22 +299,7 @@ struct swevent_hlist { | |||
299 | #define PERF_ATTACH_GROUP 0x02 | 299 | #define PERF_ATTACH_GROUP 0x02 |
300 | #define PERF_ATTACH_TASK 0x04 | 300 | #define PERF_ATTACH_TASK 0x04 |
301 | 301 | ||
302 | #ifdef CONFIG_CGROUP_PERF | 302 | struct perf_cgroup; |
303 | /* | ||
304 | * perf_cgroup_info keeps track of time_enabled for a cgroup. | ||
305 | * This is a per-cpu dynamically allocated data structure. | ||
306 | */ | ||
307 | struct perf_cgroup_info { | ||
308 | u64 time; | ||
309 | u64 timestamp; | ||
310 | }; | ||
311 | |||
312 | struct perf_cgroup { | ||
313 | struct cgroup_subsys_state css; | ||
314 | struct perf_cgroup_info *info; /* timing info, one per cpu */ | ||
315 | }; | ||
316 | #endif | ||
317 | |||
318 | struct ring_buffer; | 303 | struct ring_buffer; |
319 | 304 | ||
320 | /** | 305 | /** |
@@ -583,11 +568,13 @@ struct perf_sample_data { | |||
583 | u32 reserved; | 568 | u32 reserved; |
584 | } cpu_entry; | 569 | } cpu_entry; |
585 | u64 period; | 570 | u64 period; |
571 | union perf_mem_data_src data_src; | ||
586 | struct perf_callchain_entry *callchain; | 572 | struct perf_callchain_entry *callchain; |
587 | struct perf_raw_record *raw; | 573 | struct perf_raw_record *raw; |
588 | struct perf_branch_stack *br_stack; | 574 | struct perf_branch_stack *br_stack; |
589 | struct perf_regs_user regs_user; | 575 | struct perf_regs_user regs_user; |
590 | u64 stack_user_size; | 576 | u64 stack_user_size; |
577 | u64 weight; | ||
591 | }; | 578 | }; |
592 | 579 | ||
593 | static inline void perf_sample_data_init(struct perf_sample_data *data, | 580 | static inline void perf_sample_data_init(struct perf_sample_data *data, |
@@ -601,6 +588,8 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, | |||
601 | data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; | 588 | data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; |
602 | data->regs_user.regs = NULL; | 589 | data->regs_user.regs = NULL; |
603 | data->stack_user_size = 0; | 590 | data->stack_user_size = 0; |
591 | data->weight = 0; | ||
592 | data->data_src.val = 0; | ||
604 | } | 593 | } |
605 | 594 | ||
606 | extern void perf_output_sample(struct perf_output_handle *handle, | 595 | extern void perf_output_sample(struct perf_output_handle *handle, |
@@ -805,6 +794,12 @@ extern bool perf_event_can_stop_tick(void); | |||
805 | static inline bool perf_event_can_stop_tick(void) { return true; } | 794 | static inline bool perf_event_can_stop_tick(void) { return true; } |
806 | #endif | 795 | #endif |
807 | 796 | ||
797 | #if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_CPU_SUP_INTEL) | ||
798 | extern void perf_restore_debug_store(void); | ||
799 | #else | ||
800 | static inline void perf_restore_debug_store(void) { } | ||
801 | #endif | ||
802 | |||
808 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) | 803 | #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x)) |
809 | 804 | ||
810 | /* | 805 | /* |
@@ -831,6 +826,7 @@ do { \ | |||
831 | struct perf_pmu_events_attr { | 826 | struct perf_pmu_events_attr { |
832 | struct device_attribute attr; | 827 | struct device_attribute attr; |
833 | u64 id; | 828 | u64 id; |
829 | const char *event_str; | ||
834 | }; | 830 | }; |
835 | 831 | ||
836 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ | 832 | #define PMU_EVENT_ATTR(_name, _var, _id, _show) \ |
diff --git a/include/linux/pinctrl/pinconf.h b/include/linux/pinctrl/pinconf.h index e7a720104a47..1ad4f31ef6b8 100644 --- a/include/linux/pinctrl/pinconf.h +++ b/include/linux/pinctrl/pinconf.h | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | #ifdef CONFIG_PINCONF | 15 | #ifdef CONFIG_PINCONF |
16 | 16 | ||
17 | #include <linux/pinctrl/machine.h> | ||
18 | |||
17 | struct pinctrl_dev; | 19 | struct pinctrl_dev; |
18 | struct seq_file; | 20 | struct seq_file; |
19 | 21 | ||
@@ -28,6 +30,7 @@ struct seq_file; | |||
28 | * @pin_config_set: configure an individual pin | 30 | * @pin_config_set: configure an individual pin |
29 | * @pin_config_group_get: get configurations for an entire pin group | 31 | * @pin_config_group_get: get configurations for an entire pin group |
30 | * @pin_config_group_set: configure all pins in a group | 32 | * @pin_config_group_set: configure all pins in a group |
33 | * @pin_config_group_dbg_set: optional debugfs to modify a pin configuration | ||
31 | * @pin_config_dbg_show: optional debugfs display hook that will provide | 34 | * @pin_config_dbg_show: optional debugfs display hook that will provide |
32 | * per-device info for a certain pin in debugfs | 35 | * per-device info for a certain pin in debugfs |
33 | * @pin_config_group_dbg_show: optional debugfs display hook that will provide | 36 | * @pin_config_group_dbg_show: optional debugfs display hook that will provide |
@@ -51,6 +54,9 @@ struct pinconf_ops { | |||
51 | int (*pin_config_group_set) (struct pinctrl_dev *pctldev, | 54 | int (*pin_config_group_set) (struct pinctrl_dev *pctldev, |
52 | unsigned selector, | 55 | unsigned selector, |
53 | unsigned long config); | 56 | unsigned long config); |
57 | int (*pin_config_dbg_parse_modify) (struct pinctrl_dev *pctldev, | ||
58 | const char *arg, | ||
59 | unsigned long *config); | ||
54 | void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, | 60 | void (*pin_config_dbg_show) (struct pinctrl_dev *pctldev, |
55 | struct seq_file *s, | 61 | struct seq_file *s, |
56 | unsigned offset); | 62 | unsigned offset); |
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h index 778804df293f..2c2a9e8d8578 100644 --- a/include/linux/pinctrl/pinctrl.h +++ b/include/linux/pinctrl/pinctrl.h | |||
@@ -118,9 +118,9 @@ struct pinctrl_desc { | |||
118 | const char *name; | 118 | const char *name; |
119 | struct pinctrl_pin_desc const *pins; | 119 | struct pinctrl_pin_desc const *pins; |
120 | unsigned int npins; | 120 | unsigned int npins; |
121 | struct pinctrl_ops *pctlops; | 121 | const struct pinctrl_ops *pctlops; |
122 | struct pinmux_ops *pmxops; | 122 | const struct pinmux_ops *pmxops; |
123 | struct pinconf_ops *confops; | 123 | const struct pinconf_ops *confops; |
124 | struct module *owner; | 124 | struct module *owner; |
125 | }; | 125 | }; |
126 | 126 | ||
diff --git a/include/linux/platform_data/coda.h b/include/linux/platform_data/coda.h new file mode 100644 index 000000000000..6ad4410d9e20 --- /dev/null +++ b/include/linux/platform_data/coda.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Philipp Zabel, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef PLATFORM_CODA_H | ||
10 | #define PLATFORM_CODA_H | ||
11 | |||
12 | struct device; | ||
13 | |||
14 | struct coda_platform_data { | ||
15 | struct device *iram_dev; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/platform_data/dwc3-omap.h b/include/linux/platform_data/dwc3-omap.h index ada401244e0b..1d36ca874cc8 100644 --- a/include/linux/platform_data/dwc3-omap.h +++ b/include/linux/platform_data/dwc3-omap.h | |||
@@ -41,7 +41,3 @@ enum dwc3_omap_utmi_mode { | |||
41 | DWC3_OMAP_UTMI_MODE_HW, | 41 | DWC3_OMAP_UTMI_MODE_HW, |
42 | DWC3_OMAP_UTMI_MODE_SW, | 42 | DWC3_OMAP_UTMI_MODE_SW, |
43 | }; | 43 | }; |
44 | |||
45 | struct dwc3_omap_data { | ||
46 | enum dwc3_omap_utmi_mode utmi_mode; | ||
47 | }; | ||
diff --git a/include/linux/platform_data/emif_plat.h b/include/linux/platform_data/emif_plat.h index 03378ca84061..5c19a2a647c4 100644 --- a/include/linux/platform_data/emif_plat.h +++ b/include/linux/platform_data/emif_plat.h | |||
@@ -40,6 +40,7 @@ | |||
40 | /* Custom config requests */ | 40 | /* Custom config requests */ |
41 | #define EMIF_CUSTOM_CONFIG_LPMODE 0x00000001 | 41 | #define EMIF_CUSTOM_CONFIG_LPMODE 0x00000001 |
42 | #define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002 | 42 | #define EMIF_CUSTOM_CONFIG_TEMP_ALERT_POLL_INTERVAL 0x00000002 |
43 | #define EMIF_CUSTOM_CONFIG_EXTENDED_TEMP_PART 0x00000004 | ||
43 | 44 | ||
44 | #ifndef __ASSEMBLY__ | 45 | #ifndef __ASSEMBLY__ |
45 | /** | 46 | /** |
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h index 20ee8b221dbd..ea3200527dd3 100644 --- a/include/linux/platform_data/lp855x.h +++ b/include/linux/platform_data/lp855x.h | |||
@@ -69,11 +69,6 @@ enum lp855x_chip_id { | |||
69 | LP8557, | 69 | LP8557, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | enum lp855x_brightness_ctrl_mode { | ||
73 | PWM_BASED = 1, | ||
74 | REGISTER_BASED, | ||
75 | }; | ||
76 | |||
77 | enum lp8550_brighntess_source { | 72 | enum lp8550_brighntess_source { |
78 | LP8550_PWM_ONLY, | 73 | LP8550_PWM_ONLY, |
79 | LP8550_I2C_ONLY = 2, | 74 | LP8550_I2C_ONLY = 2, |
@@ -116,24 +111,18 @@ struct lp855x_rom_data { | |||
116 | /** | 111 | /** |
117 | * struct lp855x_platform_data | 112 | * struct lp855x_platform_data |
118 | * @name : Backlight driver name. If it is not defined, default name is set. | 113 | * @name : Backlight driver name. If it is not defined, default name is set. |
119 | * @mode : brightness control by pwm or lp855x register | ||
120 | * @device_control : value of DEVICE CONTROL register | 114 | * @device_control : value of DEVICE CONTROL register |
121 | * @initial_brightness : initial value of backlight brightness | 115 | * @initial_brightness : initial value of backlight brightness |
122 | * @period_ns : platform specific pwm period value. unit is nano. | 116 | * @period_ns : platform specific pwm period value. unit is nano. |
123 | Only valid when mode is PWM_BASED. | 117 | Only valid when mode is PWM_BASED. |
124 | * @load_new_rom_data : | ||
125 | 0 : use default configuration data | ||
126 | 1 : update values of eeprom or eprom registers on loading driver | ||
127 | * @size_program : total size of lp855x_rom_data | 118 | * @size_program : total size of lp855x_rom_data |
128 | * @rom_data : list of new eeprom/eprom registers | 119 | * @rom_data : list of new eeprom/eprom registers |
129 | */ | 120 | */ |
130 | struct lp855x_platform_data { | 121 | struct lp855x_platform_data { |
131 | char *name; | 122 | const char *name; |
132 | enum lp855x_brightness_ctrl_mode mode; | ||
133 | u8 device_control; | 123 | u8 device_control; |
134 | int initial_brightness; | 124 | u8 initial_brightness; |
135 | unsigned int period_ns; | 125 | unsigned int period_ns; |
136 | u8 load_new_rom_data; | ||
137 | int size_program; | 126 | int size_program; |
138 | struct lp855x_rom_data *rom_data; | 127 | struct lp855x_rom_data *rom_data; |
139 | }; | 128 | }; |
diff --git a/include/linux/platform_data/mv_usb.h b/include/linux/platform_data/mv_usb.h index 944b01dd103e..98b7925f1a2d 100644 --- a/include/linux/platform_data/mv_usb.h +++ b/include/linux/platform_data/mv_usb.h | |||
@@ -34,8 +34,6 @@ struct mv_usb_addon_irq { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct mv_usb_platform_data { | 36 | struct mv_usb_platform_data { |
37 | unsigned int clknum; | ||
38 | char **clkname; | ||
39 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ | 37 | struct mv_usb_addon_irq *id; /* Only valid for OTG. ID pin change*/ |
40 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ | 38 | struct mv_usb_addon_irq *vbus; /* valid for OTG/UDC. VBUS change*/ |
41 | 39 | ||
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h index 88734e871e3a..c7285b575462 100644 --- a/include/linux/platform_data/ntc_thermistor.h +++ b/include/linux/platform_data/ntc_thermistor.h | |||
@@ -21,6 +21,8 @@ | |||
21 | #ifndef _LINUX_NTC_H | 21 | #ifndef _LINUX_NTC_H |
22 | #define _LINUX_NTC_H | 22 | #define _LINUX_NTC_H |
23 | 23 | ||
24 | struct iio_channel; | ||
25 | |||
24 | enum ntc_thermistor_type { | 26 | enum ntc_thermistor_type { |
25 | TYPE_NCPXXWB473, | 27 | TYPE_NCPXXWB473, |
26 | TYPE_NCPXXWL333, | 28 | TYPE_NCPXXWL333, |
@@ -39,13 +41,17 @@ struct ntc_thermistor_platform_data { | |||
39 | * described at Documentation/hwmon/ntc_thermistor | 41 | * described at Documentation/hwmon/ntc_thermistor |
40 | * | 42 | * |
41 | * pullup/down_ohm: 0 for infinite / not-connected | 43 | * pullup/down_ohm: 0 for infinite / not-connected |
44 | * | ||
45 | * chan: iio_channel pointer to communicate with the ADC which the | ||
46 | * thermistor is using for conversion of the analog values. | ||
42 | */ | 47 | */ |
43 | int (*read_uV)(void); | 48 | int (*read_uv)(struct ntc_thermistor_platform_data *); |
44 | unsigned int pullup_uV; | 49 | unsigned int pullup_uv; |
45 | 50 | ||
46 | unsigned int pullup_ohm; | 51 | unsigned int pullup_ohm; |
47 | unsigned int pulldown_ohm; | 52 | unsigned int pulldown_ohm; |
48 | enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect; | 53 | enum { NTC_CONNECTED_POSITIVE, NTC_CONNECTED_GROUND } connect; |
54 | struct iio_channel *chan; | ||
49 | 55 | ||
50 | int (*read_ohm)(void); | 56 | int (*read_ohm)(void); |
51 | }; | 57 | }; |
diff --git a/include/linux/platform_data/serial-sccnxp.h b/include/linux/platform_data/serial-sccnxp.h index 215574d1e81d..bdc510d03245 100644 --- a/include/linux/platform_data/serial-sccnxp.h +++ b/include/linux/platform_data/serial-sccnxp.h | |||
@@ -86,10 +86,6 @@ struct sccnxp_pdata { | |||
86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; | 86 | const u32 mctrl_cfg[SCCNXP_MAX_UARTS]; |
87 | /* Timer value for polling mode (usecs) */ | 87 | /* Timer value for polling mode (usecs) */ |
88 | const unsigned int poll_time_us; | 88 | const unsigned int poll_time_us; |
89 | /* Called during startup */ | ||
90 | void (*init)(void); | ||
91 | /* Called before finish */ | ||
92 | void (*exit)(void); | ||
93 | }; | 89 | }; |
94 | 90 | ||
95 | #endif | 91 | #endif |
diff --git a/include/linux/platform_data/si5351.h b/include/linux/platform_data/si5351.h new file mode 100644 index 000000000000..92dabcaf6499 --- /dev/null +++ b/include/linux/platform_data/si5351.h | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | * Si5351A/B/C programmable clock generator platform_data. | ||
3 | */ | ||
4 | |||
5 | #ifndef __LINUX_PLATFORM_DATA_SI5351_H__ | ||
6 | #define __LINUX_PLATFORM_DATA_SI5351_H__ | ||
7 | |||
8 | struct clk; | ||
9 | |||
10 | /** | ||
11 | * enum si5351_variant - SiLabs Si5351 chip variant | ||
12 | * @SI5351_VARIANT_A: Si5351A (8 output clocks, XTAL input) | ||
13 | * @SI5351_VARIANT_A3: Si5351A MSOP10 (3 output clocks, XTAL input) | ||
14 | * @SI5351_VARIANT_B: Si5351B (8 output clocks, XTAL/VXCO input) | ||
15 | * @SI5351_VARIANT_C: Si5351C (8 output clocks, XTAL/CLKIN input) | ||
16 | */ | ||
17 | enum si5351_variant { | ||
18 | SI5351_VARIANT_A = 1, | ||
19 | SI5351_VARIANT_A3 = 2, | ||
20 | SI5351_VARIANT_B = 3, | ||
21 | SI5351_VARIANT_C = 4, | ||
22 | }; | ||
23 | |||
24 | /** | ||
25 | * enum si5351_pll_src - Si5351 pll clock source | ||
26 | * @SI5351_PLL_SRC_DEFAULT: default, do not change eeprom config | ||
27 | * @SI5351_PLL_SRC_XTAL: pll source clock is XTAL input | ||
28 | * @SI5351_PLL_SRC_CLKIN: pll source clock is CLKIN input (Si5351C only) | ||
29 | */ | ||
30 | enum si5351_pll_src { | ||
31 | SI5351_PLL_SRC_DEFAULT = 0, | ||
32 | SI5351_PLL_SRC_XTAL = 1, | ||
33 | SI5351_PLL_SRC_CLKIN = 2, | ||
34 | }; | ||
35 | |||
36 | /** | ||
37 | * enum si5351_multisynth_src - Si5351 multisynth clock source | ||
38 | * @SI5351_MULTISYNTH_SRC_DEFAULT: default, do not change eeprom config | ||
39 | * @SI5351_MULTISYNTH_SRC_VCO0: multisynth source clock is VCO0 | ||
40 | * @SI5351_MULTISYNTH_SRC_VCO1: multisynth source clock is VCO1/VXCO | ||
41 | */ | ||
42 | enum si5351_multisynth_src { | ||
43 | SI5351_MULTISYNTH_SRC_DEFAULT = 0, | ||
44 | SI5351_MULTISYNTH_SRC_VCO0 = 1, | ||
45 | SI5351_MULTISYNTH_SRC_VCO1 = 2, | ||
46 | }; | ||
47 | |||
48 | /** | ||
49 | * enum si5351_clkout_src - Si5351 clock output clock source | ||
50 | * @SI5351_CLKOUT_SRC_DEFAULT: default, do not change eeprom config | ||
51 | * @SI5351_CLKOUT_SRC_MSYNTH_N: clkout N source clock is multisynth N | ||
52 | * @SI5351_CLKOUT_SRC_MSYNTH_0_4: clkout N source clock is multisynth 0 (N<4) | ||
53 | * or 4 (N>=4) | ||
54 | * @SI5351_CLKOUT_SRC_XTAL: clkout N source clock is XTAL | ||
55 | * @SI5351_CLKOUT_SRC_CLKIN: clkout N source clock is CLKIN (Si5351C only) | ||
56 | */ | ||
57 | enum si5351_clkout_src { | ||
58 | SI5351_CLKOUT_SRC_DEFAULT = 0, | ||
59 | SI5351_CLKOUT_SRC_MSYNTH_N = 1, | ||
60 | SI5351_CLKOUT_SRC_MSYNTH_0_4 = 2, | ||
61 | SI5351_CLKOUT_SRC_XTAL = 3, | ||
62 | SI5351_CLKOUT_SRC_CLKIN = 4, | ||
63 | }; | ||
64 | |||
65 | /** | ||
66 | * enum si5351_drive_strength - Si5351 clock output drive strength | ||
67 | * @SI5351_DRIVE_DEFAULT: default, do not change eeprom config | ||
68 | * @SI5351_DRIVE_2MA: 2mA clock output drive strength | ||
69 | * @SI5351_DRIVE_4MA: 4mA clock output drive strength | ||
70 | * @SI5351_DRIVE_6MA: 6mA clock output drive strength | ||
71 | * @SI5351_DRIVE_8MA: 8mA clock output drive strength | ||
72 | */ | ||
73 | enum si5351_drive_strength { | ||
74 | SI5351_DRIVE_DEFAULT = 0, | ||
75 | SI5351_DRIVE_2MA = 2, | ||
76 | SI5351_DRIVE_4MA = 4, | ||
77 | SI5351_DRIVE_6MA = 6, | ||
78 | SI5351_DRIVE_8MA = 8, | ||
79 | }; | ||
80 | |||
81 | /** | ||
82 | * struct si5351_clkout_config - Si5351 clock output configuration | ||
83 | * @clkout: clkout number | ||
84 | * @multisynth_src: multisynth source clock | ||
85 | * @clkout_src: clkout source clock | ||
86 | * @pll_master: if true, clkout can also change pll rate | ||
87 | * @drive: output drive strength | ||
88 | * @rate: initial clkout rate, or default if 0 | ||
89 | */ | ||
90 | struct si5351_clkout_config { | ||
91 | enum si5351_multisynth_src multisynth_src; | ||
92 | enum si5351_clkout_src clkout_src; | ||
93 | enum si5351_drive_strength drive; | ||
94 | bool pll_master; | ||
95 | unsigned long rate; | ||
96 | }; | ||
97 | |||
98 | /** | ||
99 | * struct si5351_platform_data - Platform data for the Si5351 clock driver | ||
100 | * @variant: Si5351 chip variant | ||
101 | * @clk_xtal: xtal input clock | ||
102 | * @clk_clkin: clkin input clock | ||
103 | * @pll_src: array of pll source clock setting | ||
104 | * @clkout: array of clkout configuration | ||
105 | */ | ||
106 | struct si5351_platform_data { | ||
107 | enum si5351_variant variant; | ||
108 | struct clk *clk_xtal; | ||
109 | struct clk *clk_clkin; | ||
110 | enum si5351_pll_src pll_src[2]; | ||
111 | struct si5351_clkout_config clkout[8]; | ||
112 | }; | ||
113 | |||
114 | #endif | ||
diff --git a/include/linux/platform_data/spi-s3c64xx.h b/include/linux/platform_data/spi-s3c64xx.h index ceba18d23a5a..8447f634c7f5 100644 --- a/include/linux/platform_data/spi-s3c64xx.h +++ b/include/linux/platform_data/spi-s3c64xx.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __S3C64XX_PLAT_SPI_H | 11 | #ifndef __S3C64XX_PLAT_SPI_H |
12 | #define __S3C64XX_PLAT_SPI_H | 12 | #define __S3C64XX_PLAT_SPI_H |
13 | 13 | ||
14 | #include <linux/dmaengine.h> | ||
15 | |||
14 | struct platform_device; | 16 | struct platform_device; |
15 | 17 | ||
16 | /** | 18 | /** |
@@ -38,6 +40,7 @@ struct s3c64xx_spi_info { | |||
38 | int src_clk_nr; | 40 | int src_clk_nr; |
39 | int num_cs; | 41 | int num_cs; |
40 | int (*cfg_gpio)(void); | 42 | int (*cfg_gpio)(void); |
43 | dma_filter_fn filter; | ||
41 | }; | 44 | }; |
42 | 45 | ||
43 | /** | 46 | /** |
diff --git a/include/linux/platform_data/video-vt8500lcdfb.h b/include/linux/platform_data/video-vt8500lcdfb.h deleted file mode 100644 index 7f399c370fe0..000000000000 --- a/include/linux/platform_data/video-vt8500lcdfb.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * VT8500/WM8505 Frame Buffer platform data definitions | ||
3 | * | ||
4 | * Copyright (C) 2010 Ed Spiridonov <edo.rus@gmail.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef _VT8500FB_H | ||
17 | #define _VT8500FB_H | ||
18 | |||
19 | #include <linux/fb.h> | ||
20 | |||
21 | struct vt8500fb_platform_data { | ||
22 | struct fb_videomode mode; | ||
23 | u32 xres_virtual; | ||
24 | u32 yres_virtual; | ||
25 | u32 bpp; | ||
26 | unsigned long video_mem_phys; | ||
27 | void *video_mem_virt; | ||
28 | unsigned long video_mem_len; | ||
29 | }; | ||
30 | |||
31 | #endif /* _VT8500FB_H */ | ||
diff --git a/include/linux/platform_data/video_s3c.h b/include/linux/platform_data/video_s3c.h new file mode 100644 index 000000000000..48883995f47f --- /dev/null +++ b/include/linux/platform_data/video_s3c.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef __PLATFORM_DATA_VIDEO_S3C | ||
2 | #define __PLATFORM_DATA_VIDEO_S3C | ||
3 | |||
4 | /* S3C_FB_MAX_WIN | ||
5 | * Set to the maximum number of windows that any of the supported hardware | ||
6 | * can use. Since the platform data uses this for an array size, having it | ||
7 | * set to the maximum of any version of the hardware can do is safe. | ||
8 | */ | ||
9 | #define S3C_FB_MAX_WIN (5) | ||
10 | |||
11 | /** | ||
12 | * struct s3c_fb_pd_win - per window setup data | ||
13 | * @xres : The window X size. | ||
14 | * @yres : The window Y size. | ||
15 | * @virtual_x: The virtual X size. | ||
16 | * @virtual_y: The virtual Y size. | ||
17 | */ | ||
18 | struct s3c_fb_pd_win { | ||
19 | unsigned short default_bpp; | ||
20 | unsigned short max_bpp; | ||
21 | unsigned short xres; | ||
22 | unsigned short yres; | ||
23 | unsigned short virtual_x; | ||
24 | unsigned short virtual_y; | ||
25 | }; | ||
26 | |||
27 | /** | ||
28 | * struct s3c_fb_platdata - S3C driver platform specific information | ||
29 | * @setup_gpio: Setup the external GPIO pins to the right state to transfer | ||
30 | * the data from the display system to the connected display | ||
31 | * device. | ||
32 | * @vidcon0: The base vidcon0 values to control the panel data format. | ||
33 | * @vidcon1: The base vidcon1 values to control the panel data output. | ||
34 | * @vtiming: Video timing when connected to a RGB type panel. | ||
35 | * @win: The setup data for each hardware window, or NULL for unused. | ||
36 | * @display_mode: The LCD output display mode. | ||
37 | * | ||
38 | * The platform data supplies the video driver with all the information | ||
39 | * it requires to work with the display(s) attached to the machine. It | ||
40 | * controls the initial mode, the number of display windows (0 is always | ||
41 | * the base framebuffer) that are initialised etc. | ||
42 | * | ||
43 | */ | ||
44 | struct s3c_fb_platdata { | ||
45 | void (*setup_gpio)(void); | ||
46 | |||
47 | struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; | ||
48 | struct fb_videomode *vtiming; | ||
49 | |||
50 | u32 vidcon0; | ||
51 | u32 vidcon1; | ||
52 | }; | ||
53 | |||
54 | #endif | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index c082c71f7225..9abf1db6aea6 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -20,12 +20,12 @@ | |||
20 | struct mfd_cell; | 20 | struct mfd_cell; |
21 | 21 | ||
22 | struct platform_device { | 22 | struct platform_device { |
23 | const char * name; | 23 | const char *name; |
24 | int id; | 24 | int id; |
25 | bool id_auto; | 25 | bool id_auto; |
26 | struct device dev; | 26 | struct device dev; |
27 | u32 num_resources; | 27 | u32 num_resources; |
28 | struct resource * resource; | 28 | struct resource *resource; |
29 | 29 | ||
30 | const struct platform_device_id *id_entry; | 30 | const struct platform_device_id *id_entry; |
31 | 31 | ||
@@ -47,9 +47,12 @@ extern struct bus_type platform_bus_type; | |||
47 | extern struct device platform_bus; | 47 | extern struct device platform_bus; |
48 | 48 | ||
49 | extern void arch_setup_pdev_archdata(struct platform_device *); | 49 | extern void arch_setup_pdev_archdata(struct platform_device *); |
50 | extern struct resource *platform_get_resource(struct platform_device *, unsigned int, unsigned int); | 50 | extern struct resource *platform_get_resource(struct platform_device *, |
51 | unsigned int, unsigned int); | ||
51 | extern int platform_get_irq(struct platform_device *, unsigned int); | 52 | extern int platform_get_irq(struct platform_device *, unsigned int); |
52 | extern struct resource *platform_get_resource_byname(struct platform_device *, unsigned int, const char *); | 53 | extern struct resource *platform_get_resource_byname(struct platform_device *, |
54 | unsigned int, | ||
55 | const char *); | ||
53 | extern int platform_get_irq_byname(struct platform_device *, const char *); | 56 | extern int platform_get_irq_byname(struct platform_device *, const char *); |
54 | extern int platform_add_devices(struct platform_device **, int); | 57 | extern int platform_add_devices(struct platform_device **, int); |
55 | 58 | ||
@@ -161,7 +164,8 @@ extern struct platform_device *platform_device_alloc(const char *name, int id); | |||
161 | extern int platform_device_add_resources(struct platform_device *pdev, | 164 | extern int platform_device_add_resources(struct platform_device *pdev, |
162 | const struct resource *res, | 165 | const struct resource *res, |
163 | unsigned int num); | 166 | unsigned int num); |
164 | extern int platform_device_add_data(struct platform_device *pdev, const void *data, size_t size); | 167 | extern int platform_device_add_data(struct platform_device *pdev, |
168 | const void *data, size_t size); | ||
165 | extern int platform_device_add(struct platform_device *pdev); | 169 | extern int platform_device_add(struct platform_device *pdev); |
166 | extern void platform_device_del(struct platform_device *pdev); | 170 | extern void platform_device_del(struct platform_device *pdev); |
167 | extern void platform_device_put(struct platform_device *pdev); | 171 | extern void platform_device_put(struct platform_device *pdev); |
@@ -190,7 +194,8 @@ static inline void *platform_get_drvdata(const struct platform_device *pdev) | |||
190 | return dev_get_drvdata(&pdev->dev); | 194 | return dev_get_drvdata(&pdev->dev); |
191 | } | 195 | } |
192 | 196 | ||
193 | static inline void platform_set_drvdata(struct platform_device *pdev, void *data) | 197 | static inline void platform_set_drvdata(struct platform_device *pdev, |
198 | void *data) | ||
194 | { | 199 | { |
195 | dev_set_drvdata(&pdev->dev, data); | 200 | dev_set_drvdata(&pdev->dev, data); |
196 | } | 201 | } |
@@ -222,10 +227,10 @@ static void __exit __platform_driver##_exit(void) \ | |||
222 | } \ | 227 | } \ |
223 | module_exit(__platform_driver##_exit); | 228 | module_exit(__platform_driver##_exit); |
224 | 229 | ||
225 | extern struct platform_device *platform_create_bundle(struct platform_driver *driver, | 230 | extern struct platform_device *platform_create_bundle( |
226 | int (*probe)(struct platform_device *), | 231 | struct platform_driver *driver, int (*probe)(struct platform_device *), |
227 | struct resource *res, unsigned int n_res, | 232 | struct resource *res, unsigned int n_res, |
228 | const void *data, size_t size); | 233 | const void *data, size_t size); |
229 | 234 | ||
230 | /* early platform driver interface */ | 235 | /* early platform driver interface */ |
231 | struct early_platform_driver { | 236 | struct early_platform_driver { |
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 5a710b9c578e..87a03c746f17 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -93,14 +93,20 @@ do { \ | |||
93 | 93 | ||
94 | #else /* !CONFIG_PREEMPT_COUNT */ | 94 | #else /* !CONFIG_PREEMPT_COUNT */ |
95 | 95 | ||
96 | #define preempt_disable() do { } while (0) | 96 | /* |
97 | #define sched_preempt_enable_no_resched() do { } while (0) | 97 | * Even if we don't have any preemption, we need preempt disable/enable |
98 | #define preempt_enable_no_resched() do { } while (0) | 98 | * to be barriers, so that we don't have things like get_user/put_user |
99 | #define preempt_enable() do { } while (0) | 99 | * that can cause faults and scheduling migrate into our preempt-protected |
100 | 100 | * region. | |
101 | #define preempt_disable_notrace() do { } while (0) | 101 | */ |
102 | #define preempt_enable_no_resched_notrace() do { } while (0) | 102 | #define preempt_disable() barrier() |
103 | #define preempt_enable_notrace() do { } while (0) | 103 | #define sched_preempt_enable_no_resched() barrier() |
104 | #define preempt_enable_no_resched() barrier() | ||
105 | #define preempt_enable() barrier() | ||
106 | |||
107 | #define preempt_disable_notrace() barrier() | ||
108 | #define preempt_enable_no_resched_notrace() barrier() | ||
109 | #define preempt_enable_notrace() barrier() | ||
104 | 110 | ||
105 | #endif /* CONFIG_PREEMPT_COUNT */ | 111 | #endif /* CONFIG_PREEMPT_COUNT */ |
106 | 112 | ||
diff --git a/include/linux/printk.h b/include/linux/printk.h index 1249a54d17e0..4890fe62c011 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __KERNEL_PRINTK__ | 1 | #ifndef __KERNEL_PRINTK__ |
2 | #define __KERNEL_PRINTK__ | 2 | #define __KERNEL_PRINTK__ |
3 | 3 | ||
4 | #include <stdarg.h> | ||
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/kern_levels.h> | 6 | #include <linux/kern_levels.h> |
6 | 7 | ||
@@ -95,8 +96,14 @@ int no_printk(const char *fmt, ...) | |||
95 | return 0; | 96 | return 0; |
96 | } | 97 | } |
97 | 98 | ||
99 | #ifdef CONFIG_EARLY_PRINTK | ||
98 | extern asmlinkage __printf(1, 2) | 100 | extern asmlinkage __printf(1, 2) |
99 | void early_printk(const char *fmt, ...); | 101 | void early_printk(const char *fmt, ...); |
102 | void early_vprintk(const char *fmt, va_list ap); | ||
103 | #else | ||
104 | static inline __printf(1, 2) __cold | ||
105 | void early_printk(const char *s, ...) { } | ||
106 | #endif | ||
100 | 107 | ||
101 | #ifdef CONFIG_PRINTK | 108 | #ifdef CONFIG_PRINTK |
102 | asmlinkage __printf(5, 0) | 109 | asmlinkage __printf(5, 0) |
@@ -134,6 +141,8 @@ extern int printk_delay_msec; | |||
134 | extern int dmesg_restrict; | 141 | extern int dmesg_restrict; |
135 | extern int kptr_restrict; | 142 | extern int kptr_restrict; |
136 | 143 | ||
144 | extern void wake_up_klogd(void); | ||
145 | |||
137 | void log_buf_kexec_setup(void); | 146 | void log_buf_kexec_setup(void); |
138 | void __init setup_log_buf(int early); | 147 | void __init setup_log_buf(int early); |
139 | #else | 148 | #else |
@@ -162,6 +171,10 @@ static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies, | |||
162 | return false; | 171 | return false; |
163 | } | 172 | } |
164 | 173 | ||
174 | static inline void wake_up_klogd(void) | ||
175 | { | ||
176 | } | ||
177 | |||
165 | static inline void log_buf_kexec_setup(void) | 178 | static inline void log_buf_kexec_setup(void) |
166 | { | 179 | { |
167 | } | 180 | } |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 8307f2f94d86..94dfb2aa5533 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -117,6 +117,7 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, | |||
117 | const struct file_operations *proc_fops, | 117 | const struct file_operations *proc_fops, |
118 | void *data); | 118 | void *data); |
119 | extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); | 119 | extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); |
120 | extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent); | ||
120 | 121 | ||
121 | struct pid_namespace; | 122 | struct pid_namespace; |
122 | 123 | ||
@@ -202,6 +203,7 @@ static inline struct proc_dir_entry *proc_create_data(const char *name, | |||
202 | return NULL; | 203 | return NULL; |
203 | } | 204 | } |
204 | #define remove_proc_entry(name, parent) do {} while (0) | 205 | #define remove_proc_entry(name, parent) do {} while (0) |
206 | #define remove_proc_subtree(name, parent) do {} while (0) | ||
205 | 207 | ||
206 | static inline struct proc_dir_entry *proc_symlink(const char *name, | 208 | static inline struct proc_dir_entry *proc_symlink(const char *name, |
207 | struct proc_dir_entry *parent,const char *dest) {return NULL;} | 209 | struct proc_dir_entry *parent,const char *dest) {return NULL;} |
diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index 5bf5500db83d..69e37c2d1ea5 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h | |||
@@ -6,7 +6,13 @@ struct inode *ramfs_get_inode(struct super_block *sb, const struct inode *dir, | |||
6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, | 6 | extern struct dentry *ramfs_mount(struct file_system_type *fs_type, |
7 | int flags, const char *dev_name, void *data); | 7 | int flags, const char *dev_name, void *data); |
8 | 8 | ||
9 | #ifndef CONFIG_MMU | 9 | #ifdef CONFIG_MMU |
10 | static inline int | ||
11 | ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) | ||
12 | { | ||
13 | return 0; | ||
14 | } | ||
15 | #else | ||
10 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); | 16 | extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); |
11 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, | 17 | extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, |
12 | unsigned long addr, | 18 | unsigned long addr, |
diff --git a/include/linux/rculist_bl.h b/include/linux/rculist_bl.h index cf1244fbf3b6..4f216c59e7db 100644 --- a/include/linux/rculist_bl.h +++ b/include/linux/rculist_bl.h | |||
@@ -20,7 +20,7 @@ static inline void hlist_bl_set_first_rcu(struct hlist_bl_head *h, | |||
20 | static inline struct hlist_bl_node *hlist_bl_first_rcu(struct hlist_bl_head *h) | 20 | static inline struct hlist_bl_node *hlist_bl_first_rcu(struct hlist_bl_head *h) |
21 | { | 21 | { |
22 | return (struct hlist_bl_node *) | 22 | return (struct hlist_bl_node *) |
23 | ((unsigned long)rcu_dereference(h->first) & ~LIST_BL_LOCKMASK); | 23 | ((unsigned long)rcu_dereference_check(h->first, hlist_bl_is_locked(h)) & ~LIST_BL_LOCKMASK); |
24 | } | 24 | } |
25 | 25 | ||
26 | /** | 26 | /** |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 8e0948c872fc..4ccd68e49b00 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -80,6 +80,7 @@ extern void do_trace_rcu_torture_read(char *rcutorturename, | |||
80 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) | 80 | #define UINT_CMP_LT(a, b) (UINT_MAX / 2 < (a) - (b)) |
81 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) | 81 | #define ULONG_CMP_GE(a, b) (ULONG_MAX / 2 >= (a) - (b)) |
82 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) | 82 | #define ULONG_CMP_LT(a, b) (ULONG_MAX / 2 < (a) - (b)) |
83 | #define ulong2long(a) (*(long *)(&(a))) | ||
83 | 84 | ||
84 | /* Exported common interfaces */ | 85 | /* Exported common interfaces */ |
85 | 86 | ||
diff --git a/include/linux/regmap.h b/include/linux/regmap.h index bf77dfdabef9..02d84e24b7c2 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h | |||
@@ -389,6 +389,7 @@ int regmap_update_bits_check(struct regmap *map, unsigned int reg, | |||
389 | bool *change); | 389 | bool *change); |
390 | int regmap_get_val_bytes(struct regmap *map); | 390 | int regmap_get_val_bytes(struct regmap *map); |
391 | int regmap_async_complete(struct regmap *map); | 391 | int regmap_async_complete(struct regmap *map); |
392 | bool regmap_can_raw_write(struct regmap *map); | ||
392 | 393 | ||
393 | int regcache_sync(struct regmap *map); | 394 | int regcache_sync(struct regmap *map); |
394 | int regcache_sync_region(struct regmap *map, unsigned int min, | 395 | int regcache_sync_region(struct regmap *map, unsigned int min, |
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h index 7bd73bbdfd1b..7c5ff0c55773 100644 --- a/include/linux/regulator/ab8500.h +++ b/include/linux/regulator/ab8500.h | |||
@@ -5,11 +5,14 @@ | |||
5 | * | 5 | * |
6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson | 6 | * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson |
7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson | 7 | * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson |
8 | * Daniel Willerud <daniel.willerud@stericsson.com> for ST-Ericsson | ||
8 | */ | 9 | */ |
9 | 10 | ||
10 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H | 11 | #ifndef __LINUX_MFD_AB8500_REGULATOR_H |
11 | #define __LINUX_MFD_AB8500_REGULATOR_H | 12 | #define __LINUX_MFD_AB8500_REGULATOR_H |
12 | 13 | ||
14 | #include <linux/platform_device.h> | ||
15 | |||
13 | /* AB8500 regulators */ | 16 | /* AB8500 regulators */ |
14 | enum ab8500_regulator_id { | 17 | enum ab8500_regulator_id { |
15 | AB8500_LDO_AUX1, | 18 | AB8500_LDO_AUX1, |
@@ -17,7 +20,6 @@ enum ab8500_regulator_id { | |||
17 | AB8500_LDO_AUX3, | 20 | AB8500_LDO_AUX3, |
18 | AB8500_LDO_INTCORE, | 21 | AB8500_LDO_INTCORE, |
19 | AB8500_LDO_TVOUT, | 22 | AB8500_LDO_TVOUT, |
20 | AB8500_LDO_USB, | ||
21 | AB8500_LDO_AUDIO, | 23 | AB8500_LDO_AUDIO, |
22 | AB8500_LDO_ANAMIC1, | 24 | AB8500_LDO_ANAMIC1, |
23 | AB8500_LDO_ANAMIC2, | 25 | AB8500_LDO_ANAMIC2, |
@@ -26,7 +28,28 @@ enum ab8500_regulator_id { | |||
26 | AB8500_NUM_REGULATORS, | 28 | AB8500_NUM_REGULATORS, |
27 | }; | 29 | }; |
28 | 30 | ||
29 | /* AB9450 regulators */ | 31 | /* AB8505 regulators */ |
32 | enum ab8505_regulator_id { | ||
33 | AB8505_LDO_AUX1, | ||
34 | AB8505_LDO_AUX2, | ||
35 | AB8505_LDO_AUX3, | ||
36 | AB8505_LDO_AUX4, | ||
37 | AB8505_LDO_AUX5, | ||
38 | AB8505_LDO_AUX6, | ||
39 | AB8505_LDO_INTCORE, | ||
40 | AB8505_LDO_ADC, | ||
41 | AB8505_LDO_USB, | ||
42 | AB8505_LDO_AUDIO, | ||
43 | AB8505_LDO_ANAMIC1, | ||
44 | AB8505_LDO_ANAMIC2, | ||
45 | AB8505_LDO_AUX8, | ||
46 | AB8505_LDO_ANA, | ||
47 | AB8505_SYSCLKREQ_2, | ||
48 | AB8505_SYSCLKREQ_4, | ||
49 | AB8505_NUM_REGULATORS, | ||
50 | }; | ||
51 | |||
52 | /* AB9540 regulators */ | ||
30 | enum ab9540_regulator_id { | 53 | enum ab9540_regulator_id { |
31 | AB9540_LDO_AUX1, | 54 | AB9540_LDO_AUX1, |
32 | AB9540_LDO_AUX2, | 55 | AB9540_LDO_AUX2, |
@@ -45,16 +68,39 @@ enum ab9540_regulator_id { | |||
45 | AB9540_NUM_REGULATORS, | 68 | AB9540_NUM_REGULATORS, |
46 | }; | 69 | }; |
47 | 70 | ||
48 | /* AB8500 and AB9540 register initialization */ | 71 | /* AB8540 regulators */ |
72 | enum ab8540_regulator_id { | ||
73 | AB8540_LDO_AUX1, | ||
74 | AB8540_LDO_AUX2, | ||
75 | AB8540_LDO_AUX3, | ||
76 | AB8540_LDO_AUX4, | ||
77 | AB8540_LDO_AUX5, | ||
78 | AB8540_LDO_AUX6, | ||
79 | AB8540_LDO_INTCORE, | ||
80 | AB8540_LDO_TVOUT, | ||
81 | AB8540_LDO_AUDIO, | ||
82 | AB8540_LDO_ANAMIC1, | ||
83 | AB8540_LDO_ANAMIC2, | ||
84 | AB8540_LDO_DMIC, | ||
85 | AB8540_LDO_ANA, | ||
86 | AB8540_LDO_SDIO, | ||
87 | AB8540_SYSCLKREQ_2, | ||
88 | AB8540_SYSCLKREQ_4, | ||
89 | AB8540_NUM_REGULATORS, | ||
90 | }; | ||
91 | |||
92 | /* AB8500, AB8505, and AB9540 register initialization */ | ||
49 | struct ab8500_regulator_reg_init { | 93 | struct ab8500_regulator_reg_init { |
50 | int id; | 94 | int id; |
95 | u8 mask; | ||
51 | u8 value; | 96 | u8 value; |
52 | }; | 97 | }; |
53 | 98 | ||
54 | #define INIT_REGULATOR_REGISTER(_id, _value) \ | 99 | #define INIT_REGULATOR_REGISTER(_id, _mask, _value) \ |
55 | { \ | 100 | { \ |
56 | .id = _id, \ | 101 | .id = _id, \ |
57 | .value = _value, \ | 102 | .mask = _mask, \ |
103 | .value = _value, \ | ||
58 | } | 104 | } |
59 | 105 | ||
60 | /* AB8500 registers */ | 106 | /* AB8500 registers */ |
@@ -86,10 +132,58 @@ enum ab8500_regulator_reg { | |||
86 | AB8500_REGUCTRL2SPARE, | 132 | AB8500_REGUCTRL2SPARE, |
87 | AB8500_REGUCTRLDISCH, | 133 | AB8500_REGUCTRLDISCH, |
88 | AB8500_REGUCTRLDISCH2, | 134 | AB8500_REGUCTRLDISCH2, |
89 | AB8500_VSMPS1SEL1, | ||
90 | AB8500_NUM_REGULATOR_REGISTERS, | 135 | AB8500_NUM_REGULATOR_REGISTERS, |
91 | }; | 136 | }; |
92 | 137 | ||
138 | /* AB8505 registers */ | ||
139 | enum ab8505_regulator_reg { | ||
140 | AB8505_REGUREQUESTCTRL1, | ||
141 | AB8505_REGUREQUESTCTRL2, | ||
142 | AB8505_REGUREQUESTCTRL3, | ||
143 | AB8505_REGUREQUESTCTRL4, | ||
144 | AB8505_REGUSYSCLKREQ1HPVALID1, | ||
145 | AB8505_REGUSYSCLKREQ1HPVALID2, | ||
146 | AB8505_REGUHWHPREQ1VALID1, | ||
147 | AB8505_REGUHWHPREQ1VALID2, | ||
148 | AB8505_REGUHWHPREQ2VALID1, | ||
149 | AB8505_REGUHWHPREQ2VALID2, | ||
150 | AB8505_REGUSWHPREQVALID1, | ||
151 | AB8505_REGUSWHPREQVALID2, | ||
152 | AB8505_REGUSYSCLKREQVALID1, | ||
153 | AB8505_REGUSYSCLKREQVALID2, | ||
154 | AB8505_REGUVAUX4REQVALID, | ||
155 | AB8505_REGUMISC1, | ||
156 | AB8505_VAUDIOSUPPLY, | ||
157 | AB8505_REGUCTRL1VAMIC, | ||
158 | AB8505_VSMPSAREGU, | ||
159 | AB8505_VSMPSBREGU, | ||
160 | AB8505_VSAFEREGU, /* NOTE! PRCMU register */ | ||
161 | AB8505_VPLLVANAREGU, | ||
162 | AB8505_EXTSUPPLYREGU, | ||
163 | AB8505_VAUX12REGU, | ||
164 | AB8505_VRF1VAUX3REGU, | ||
165 | AB8505_VSMPSASEL1, | ||
166 | AB8505_VSMPSASEL2, | ||
167 | AB8505_VSMPSASEL3, | ||
168 | AB8505_VSMPSBSEL1, | ||
169 | AB8505_VSMPSBSEL2, | ||
170 | AB8505_VSMPSBSEL3, | ||
171 | AB8505_VSAFESEL1, /* NOTE! PRCMU register */ | ||
172 | AB8505_VSAFESEL2, /* NOTE! PRCMU register */ | ||
173 | AB8505_VSAFESEL3, /* NOTE! PRCMU register */ | ||
174 | AB8505_VAUX1SEL, | ||
175 | AB8505_VAUX2SEL, | ||
176 | AB8505_VRF1VAUX3SEL, | ||
177 | AB8505_VAUX4REQCTRL, | ||
178 | AB8505_VAUX4REGU, | ||
179 | AB8505_VAUX4SEL, | ||
180 | AB8505_REGUCTRLDISCH, | ||
181 | AB8505_REGUCTRLDISCH2, | ||
182 | AB8505_REGUCTRLDISCH3, | ||
183 | AB8505_CTRLVAUX5, | ||
184 | AB8505_CTRLVAUX6, | ||
185 | AB8505_NUM_REGULATOR_REGISTERS, | ||
186 | }; | ||
93 | 187 | ||
94 | /* AB9540 registers */ | 188 | /* AB9540 registers */ |
95 | enum ab9540_regulator_reg { | 189 | enum ab9540_regulator_reg { |
@@ -139,4 +233,111 @@ enum ab9540_regulator_reg { | |||
139 | AB9540_NUM_REGULATOR_REGISTERS, | 233 | AB9540_NUM_REGULATOR_REGISTERS, |
140 | }; | 234 | }; |
141 | 235 | ||
236 | /* AB8540 registers */ | ||
237 | enum ab8540_regulator_reg { | ||
238 | AB8540_REGUREQUESTCTRL1, | ||
239 | AB8540_REGUREQUESTCTRL2, | ||
240 | AB8540_REGUREQUESTCTRL3, | ||
241 | AB8540_REGUREQUESTCTRL4, | ||
242 | AB8540_REGUSYSCLKREQ1HPVALID1, | ||
243 | AB8540_REGUSYSCLKREQ1HPVALID2, | ||
244 | AB8540_REGUHWHPREQ1VALID1, | ||
245 | AB8540_REGUHWHPREQ1VALID2, | ||
246 | AB8540_REGUHWHPREQ2VALID1, | ||
247 | AB8540_REGUHWHPREQ2VALID2, | ||
248 | AB8540_REGUSWHPREQVALID1, | ||
249 | AB8540_REGUSWHPREQVALID2, | ||
250 | AB8540_REGUSYSCLKREQVALID1, | ||
251 | AB8540_REGUSYSCLKREQVALID2, | ||
252 | AB8540_REGUVAUX4REQVALID, | ||
253 | AB8540_REGUVAUX5REQVALID, | ||
254 | AB8540_REGUVAUX6REQVALID, | ||
255 | AB8540_REGUVCLKBREQVALID, | ||
256 | AB8540_REGUVRF1REQVALID, | ||
257 | AB8540_REGUMISC1, | ||
258 | AB8540_VAUDIOSUPPLY, | ||
259 | AB8540_REGUCTRL1VAMIC, | ||
260 | AB8540_VHSIC, | ||
261 | AB8540_VSDIO, | ||
262 | AB8540_VSMPS1REGU, | ||
263 | AB8540_VSMPS2REGU, | ||
264 | AB8540_VSMPS3REGU, | ||
265 | AB8540_VPLLVANAREGU, | ||
266 | AB8540_EXTSUPPLYREGU, | ||
267 | AB8540_VAUX12REGU, | ||
268 | AB8540_VRF1VAUX3REGU, | ||
269 | AB8540_VSMPS1SEL1, | ||
270 | AB8540_VSMPS1SEL2, | ||
271 | AB8540_VSMPS1SEL3, | ||
272 | AB8540_VSMPS2SEL1, | ||
273 | AB8540_VSMPS2SEL2, | ||
274 | AB8540_VSMPS2SEL3, | ||
275 | AB8540_VSMPS3SEL1, | ||
276 | AB8540_VSMPS3SEL2, | ||
277 | AB8540_VAUX1SEL, | ||
278 | AB8540_VAUX2SEL, | ||
279 | AB8540_VRF1VAUX3SEL, | ||
280 | AB8540_REGUCTRL2SPARE, | ||
281 | AB8540_VAUX4REQCTRL, | ||
282 | AB8540_VAUX4REGU, | ||
283 | AB8540_VAUX4SEL, | ||
284 | AB8540_VAUX5REQCTRL, | ||
285 | AB8540_VAUX5REGU, | ||
286 | AB8540_VAUX5SEL, | ||
287 | AB8540_VAUX6REQCTRL, | ||
288 | AB8540_VAUX6REGU, | ||
289 | AB8540_VAUX6SEL, | ||
290 | AB8540_VCLKBREQCTRL, | ||
291 | AB8540_VCLKBREGU, | ||
292 | AB8540_VCLKBSEL, | ||
293 | AB8540_VRF1REQCTRL, | ||
294 | AB8540_REGUCTRLDISCH, | ||
295 | AB8540_REGUCTRLDISCH2, | ||
296 | AB8540_REGUCTRLDISCH3, | ||
297 | AB8540_REGUCTRLDISCH4, | ||
298 | AB8540_VSIMSYSCLKCTRL, | ||
299 | AB8540_VANAVPLLSEL, | ||
300 | AB8540_NUM_REGULATOR_REGISTERS, | ||
301 | }; | ||
302 | |||
303 | /* AB8500 external regulators */ | ||
304 | struct ab8500_ext_regulator_cfg { | ||
305 | bool hwreq; /* requires hw mode or high power mode */ | ||
306 | }; | ||
307 | |||
308 | enum ab8500_ext_regulator_id { | ||
309 | AB8500_EXT_SUPPLY1, | ||
310 | AB8500_EXT_SUPPLY2, | ||
311 | AB8500_EXT_SUPPLY3, | ||
312 | AB8500_NUM_EXT_REGULATORS, | ||
313 | }; | ||
314 | |||
315 | /* AB8500 regulator platform data */ | ||
316 | struct ab8500_regulator_platform_data { | ||
317 | int num_reg_init; | ||
318 | struct ab8500_regulator_reg_init *reg_init; | ||
319 | int num_regulator; | ||
320 | struct regulator_init_data *regulator; | ||
321 | int num_ext_regulator; | ||
322 | struct regulator_init_data *ext_regulator; | ||
323 | }; | ||
324 | |||
325 | #ifdef CONFIG_REGULATOR_AB8500_DEBUG | ||
326 | int ab8500_regulator_debug_init(struct platform_device *pdev); | ||
327 | int ab8500_regulator_debug_exit(struct platform_device *pdev); | ||
328 | #else | ||
329 | static inline int ab8500_regulator_debug_init(struct platform_device *pdev) | ||
330 | { | ||
331 | return 0; | ||
332 | } | ||
333 | static inline int ab8500_regulator_debug_exit(struct platform_device *pdev) | ||
334 | { | ||
335 | return 0; | ||
336 | } | ||
337 | #endif | ||
338 | |||
339 | /* AB8500 external regulator functions. */ | ||
340 | int ab8500_ext_regulator_init(struct platform_device *pdev); | ||
341 | void ab8500_ext_regulator_exit(struct platform_device *pdev); | ||
342 | |||
142 | #endif | 343 | #endif |
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 7bc732ce6e50..145022a83085 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -141,18 +141,18 @@ void regulator_put(struct regulator *regulator); | |||
141 | void devm_regulator_put(struct regulator *regulator); | 141 | void devm_regulator_put(struct regulator *regulator); |
142 | 142 | ||
143 | /* regulator output control and status */ | 143 | /* regulator output control and status */ |
144 | int regulator_enable(struct regulator *regulator); | 144 | int __must_check regulator_enable(struct regulator *regulator); |
145 | int regulator_disable(struct regulator *regulator); | 145 | int regulator_disable(struct regulator *regulator); |
146 | int regulator_force_disable(struct regulator *regulator); | 146 | int regulator_force_disable(struct regulator *regulator); |
147 | int regulator_is_enabled(struct regulator *regulator); | 147 | int regulator_is_enabled(struct regulator *regulator); |
148 | int regulator_disable_deferred(struct regulator *regulator, int ms); | 148 | int regulator_disable_deferred(struct regulator *regulator, int ms); |
149 | 149 | ||
150 | int regulator_bulk_get(struct device *dev, int num_consumers, | 150 | int __must_check regulator_bulk_get(struct device *dev, int num_consumers, |
151 | struct regulator_bulk_data *consumers); | 151 | struct regulator_bulk_data *consumers); |
152 | int devm_regulator_bulk_get(struct device *dev, int num_consumers, | 152 | int __must_check devm_regulator_bulk_get(struct device *dev, int num_consumers, |
153 | struct regulator_bulk_data *consumers); | 153 | struct regulator_bulk_data *consumers); |
154 | int regulator_bulk_enable(int num_consumers, | 154 | int __must_check regulator_bulk_enable(int num_consumers, |
155 | struct regulator_bulk_data *consumers); | 155 | struct regulator_bulk_data *consumers); |
156 | int regulator_bulk_disable(int num_consumers, | 156 | int regulator_bulk_disable(int num_consumers, |
157 | struct regulator_bulk_data *consumers); | 157 | struct regulator_bulk_data *consumers); |
158 | int regulator_bulk_force_disable(int num_consumers, | 158 | int regulator_bulk_force_disable(int num_consumers, |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 23070fd83872..6700cc94bdd1 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -22,6 +22,7 @@ | |||
22 | struct regmap; | 22 | struct regmap; |
23 | struct regulator_dev; | 23 | struct regulator_dev; |
24 | struct regulator_init_data; | 24 | struct regulator_init_data; |
25 | struct regulator_enable_gpio; | ||
25 | 26 | ||
26 | enum regulator_status { | 27 | enum regulator_status { |
27 | REGULATOR_STATUS_OFF, | 28 | REGULATOR_STATUS_OFF, |
@@ -199,6 +200,10 @@ enum regulator_type { | |||
199 | * output when using regulator_set_voltage_sel_regmap | 200 | * output when using regulator_set_voltage_sel_regmap |
200 | * @enable_reg: Register for control when using regmap enable/disable ops | 201 | * @enable_reg: Register for control when using regmap enable/disable ops |
201 | * @enable_mask: Mask for control when using regmap enable/disable ops | 202 | * @enable_mask: Mask for control when using regmap enable/disable ops |
203 | * @enable_is_inverted: A flag to indicate set enable_mask bits to disable | ||
204 | * when using regulator_enable_regmap and friends APIs. | ||
205 | * @bypass_reg: Register for control when using regmap set_bypass | ||
206 | * @bypass_mask: Mask for control when using regmap set_bypass | ||
202 | * | 207 | * |
203 | * @enable_time: Time taken for initial enable of regulator (in uS). | 208 | * @enable_time: Time taken for initial enable of regulator (in uS). |
204 | */ | 209 | */ |
@@ -226,6 +231,7 @@ struct regulator_desc { | |||
226 | unsigned int apply_bit; | 231 | unsigned int apply_bit; |
227 | unsigned int enable_reg; | 232 | unsigned int enable_reg; |
228 | unsigned int enable_mask; | 233 | unsigned int enable_mask; |
234 | bool enable_is_inverted; | ||
229 | unsigned int bypass_reg; | 235 | unsigned int bypass_reg; |
230 | unsigned int bypass_mask; | 236 | unsigned int bypass_mask; |
231 | 237 | ||
@@ -300,8 +306,7 @@ struct regulator_dev { | |||
300 | 306 | ||
301 | struct dentry *debugfs; | 307 | struct dentry *debugfs; |
302 | 308 | ||
303 | int ena_gpio; | 309 | struct regulator_enable_gpio *ena_pin; |
304 | unsigned int ena_gpio_invert:1; | ||
305 | unsigned int ena_gpio_state:1; | 310 | unsigned int ena_gpio_state:1; |
306 | }; | 311 | }; |
307 | 312 | ||
@@ -327,6 +332,8 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev, | |||
327 | int min_uV, int max_uV); | 332 | int min_uV, int max_uV); |
328 | int regulator_map_voltage_iterate(struct regulator_dev *rdev, | 333 | int regulator_map_voltage_iterate(struct regulator_dev *rdev, |
329 | int min_uV, int max_uV); | 334 | int min_uV, int max_uV); |
335 | int regulator_map_voltage_ascend(struct regulator_dev *rdev, | ||
336 | int min_uV, int max_uV); | ||
330 | int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev); | 337 | int regulator_get_voltage_sel_regmap(struct regulator_dev *rdev); |
331 | int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); | 338 | int regulator_set_voltage_sel_regmap(struct regulator_dev *rdev, unsigned sel); |
332 | int regulator_is_enabled_regmap(struct regulator_dev *rdev); | 339 | int regulator_is_enabled_regmap(struct regulator_dev *rdev); |
diff --git a/include/linux/regulator/max8952.h b/include/linux/regulator/max8952.h index 45e42855ad05..4dbb63a1d4ab 100644 --- a/include/linux/regulator/max8952.h +++ b/include/linux/regulator/max8952.h | |||
@@ -122,13 +122,13 @@ struct max8952_platform_data { | |||
122 | int gpio_vid1; | 122 | int gpio_vid1; |
123 | int gpio_en; | 123 | int gpio_en; |
124 | 124 | ||
125 | u8 default_mode; | 125 | u32 default_mode; |
126 | u8 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ | 126 | u32 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ |
127 | 127 | ||
128 | u8 sync_freq; | 128 | u32 sync_freq; |
129 | u8 ramp_speed; | 129 | u32 ramp_speed; |
130 | 130 | ||
131 | struct regulator_init_data reg_data; | 131 | struct regulator_init_data *reg_data; |
132 | }; | 132 | }; |
133 | 133 | ||
134 | 134 | ||
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h index 5ae8456d9670..96a509b6be04 100644 --- a/include/linux/res_counter.h +++ b/include/linux/res_counter.h | |||
@@ -13,7 +13,8 @@ | |||
13 | * info about what this counter is. | 13 | * info about what this counter is. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/cgroup.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/errno.h> | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * The core object. the cgroup that wishes to account for some | 20 | * The core object. the cgroup that wishes to account for some |
diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index 1342e69542f3..d69cf637a15a 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/kmemcheck.h> | 4 | #include <linux/kmemcheck.h> |
5 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
6 | #include <linux/seq_file.h> | 6 | #include <linux/seq_file.h> |
7 | #include <linux/poll.h> | ||
7 | 8 | ||
8 | struct ring_buffer; | 9 | struct ring_buffer; |
9 | struct ring_buffer_iter; | 10 | struct ring_buffer_iter; |
@@ -96,6 +97,11 @@ __ring_buffer_alloc(unsigned long size, unsigned flags, struct lock_class_key *k | |||
96 | __ring_buffer_alloc((size), (flags), &__key); \ | 97 | __ring_buffer_alloc((size), (flags), &__key); \ |
97 | }) | 98 | }) |
98 | 99 | ||
100 | void ring_buffer_wait(struct ring_buffer *buffer, int cpu); | ||
101 | int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, | ||
102 | struct file *filp, poll_table *poll_table); | ||
103 | |||
104 | |||
99 | #define RING_BUFFER_ALL_CPUS -1 | 105 | #define RING_BUFFER_ALL_CPUS -1 |
100 | 106 | ||
101 | void ring_buffer_free(struct ring_buffer *buffer); | 107 | void ring_buffer_free(struct ring_buffer *buffer); |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 580b24c8b8ca..c2c28975293c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -133,7 +133,13 @@ extern struct rtc_device *rtc_device_register(const char *name, | |||
133 | struct device *dev, | 133 | struct device *dev, |
134 | const struct rtc_class_ops *ops, | 134 | const struct rtc_class_ops *ops, |
135 | struct module *owner); | 135 | struct module *owner); |
136 | extern struct rtc_device *devm_rtc_device_register(struct device *dev, | ||
137 | const char *name, | ||
138 | const struct rtc_class_ops *ops, | ||
139 | struct module *owner); | ||
136 | extern void rtc_device_unregister(struct rtc_device *rtc); | 140 | extern void rtc_device_unregister(struct rtc_device *rtc); |
141 | extern void devm_rtc_device_unregister(struct device *dev, | ||
142 | struct rtc_device *rtc); | ||
137 | 143 | ||
138 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 144 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
139 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 145 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
diff --git a/include/linux/sched.h b/include/linux/sched.h index a74adedcdd10..ebf7095158a9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -151,9 +151,10 @@ print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); | |||
151 | #define TASK_DEAD 64 | 151 | #define TASK_DEAD 64 |
152 | #define TASK_WAKEKILL 128 | 152 | #define TASK_WAKEKILL 128 |
153 | #define TASK_WAKING 256 | 153 | #define TASK_WAKING 256 |
154 | #define TASK_STATE_MAX 512 | 154 | #define TASK_PARKED 512 |
155 | #define TASK_STATE_MAX 1024 | ||
155 | 156 | ||
156 | #define TASK_STATE_TO_CHAR_STR "RSDTtZXxKW" | 157 | #define TASK_STATE_TO_CHAR_STR "RSDTtZXxKWP" |
157 | 158 | ||
158 | extern char ___assert_task_state[1 - 2*!!( | 159 | extern char ___assert_task_state[1 - 2*!!( |
159 | sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; | 160 | sizeof(TASK_STATE_TO_CHAR_STR)-1 != ilog2(TASK_STATE_MAX)+1)]; |
@@ -308,7 +309,6 @@ extern signed long schedule_timeout_killable(signed long timeout); | |||
308 | extern signed long schedule_timeout_uninterruptible(signed long timeout); | 309 | extern signed long schedule_timeout_uninterruptible(signed long timeout); |
309 | asmlinkage void schedule(void); | 310 | asmlinkage void schedule(void); |
310 | extern void schedule_preempt_disabled(void); | 311 | extern void schedule_preempt_disabled(void); |
311 | extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); | ||
312 | 312 | ||
313 | struct nsproxy; | 313 | struct nsproxy; |
314 | struct user_namespace; | 314 | struct user_namespace; |
@@ -808,6 +808,8 @@ struct sched_domain { | |||
808 | unsigned int wake_idx; | 808 | unsigned int wake_idx; |
809 | unsigned int forkexec_idx; | 809 | unsigned int forkexec_idx; |
810 | unsigned int smt_gain; | 810 | unsigned int smt_gain; |
811 | |||
812 | int nohz_idle; /* NOHZ IDLE status */ | ||
811 | int flags; /* See SD_* */ | 813 | int flags; /* See SD_* */ |
812 | int level; | 814 | int level; |
813 | 815 | ||
@@ -1105,8 +1107,10 @@ struct task_struct { | |||
1105 | int exit_code, exit_signal; | 1107 | int exit_code, exit_signal; |
1106 | int pdeath_signal; /* The signal sent when the parent dies */ | 1108 | int pdeath_signal; /* The signal sent when the parent dies */ |
1107 | unsigned int jobctl; /* JOBCTL_*, siglock protected */ | 1109 | unsigned int jobctl; /* JOBCTL_*, siglock protected */ |
1108 | /* ??? */ | 1110 | |
1111 | /* Used for emulating ABI behavior of previous Linux versions */ | ||
1109 | unsigned int personality; | 1112 | unsigned int personality; |
1113 | |||
1110 | unsigned did_exec:1; | 1114 | unsigned did_exec:1; |
1111 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an | 1115 | unsigned in_execve:1; /* Tell the LSMs that the process is doing an |
1112 | * execve */ | 1116 | * execve */ |
@@ -1624,7 +1628,7 @@ extern void thread_group_cputime_adjusted(struct task_struct *p, cputime_t *ut, | |||
1624 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ | 1628 | #define PF_SWAPWRITE 0x00800000 /* Allowed to write to swap */ |
1625 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 1629 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
1626 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 1630 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
1627 | #define PF_THREAD_BOUND 0x04000000 /* Thread bound to specific cpu */ | 1631 | #define PF_NO_SETAFFINITY 0x04000000 /* Userland is not allowed to meddle with cpus_allowed */ |
1628 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ | 1632 | #define PF_MCE_EARLY 0x08000000 /* Early kill for mce process policy */ |
1629 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 1633 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
1630 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | 1634 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ |
@@ -2459,6 +2463,47 @@ static inline int spin_needbreak(spinlock_t *lock) | |||
2459 | } | 2463 | } |
2460 | 2464 | ||
2461 | /* | 2465 | /* |
2466 | * Idle thread specific functions to determine the need_resched | ||
2467 | * polling state. We have two versions, one based on TS_POLLING in | ||
2468 | * thread_info.status and one based on TIF_POLLING_NRFLAG in | ||
2469 | * thread_info.flags | ||
2470 | */ | ||
2471 | #ifdef TS_POLLING | ||
2472 | static inline int tsk_is_polling(struct task_struct *p) | ||
2473 | { | ||
2474 | return task_thread_info(p)->status & TS_POLLING; | ||
2475 | } | ||
2476 | static inline void current_set_polling(void) | ||
2477 | { | ||
2478 | current_thread_info()->status |= TS_POLLING; | ||
2479 | } | ||
2480 | |||
2481 | static inline void current_clr_polling(void) | ||
2482 | { | ||
2483 | current_thread_info()->status &= ~TS_POLLING; | ||
2484 | smp_mb__after_clear_bit(); | ||
2485 | } | ||
2486 | #elif defined(TIF_POLLING_NRFLAG) | ||
2487 | static inline int tsk_is_polling(struct task_struct *p) | ||
2488 | { | ||
2489 | return test_tsk_thread_flag(p, TIF_POLLING_NRFLAG); | ||
2490 | } | ||
2491 | static inline void current_set_polling(void) | ||
2492 | { | ||
2493 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
2494 | } | ||
2495 | |||
2496 | static inline void current_clr_polling(void) | ||
2497 | { | ||
2498 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
2499 | } | ||
2500 | #else | ||
2501 | static inline int tsk_is_polling(struct task_struct *p) { return 0; } | ||
2502 | static inline void current_set_polling(void) { } | ||
2503 | static inline void current_clr_polling(void) { } | ||
2504 | #endif | ||
2505 | |||
2506 | /* | ||
2462 | * Thread group CPU time accounting. | 2507 | * Thread group CPU time accounting. |
2463 | */ | 2508 | */ |
2464 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); | 2509 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); |
diff --git a/include/linux/security.h b/include/linux/security.h index eee7478cda70..032c366ef1c6 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1012,6 +1012,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
1012 | * This hook can be used by the module to update any security state | 1012 | * This hook can be used by the module to update any security state |
1013 | * associated with the TUN device's security structure. | 1013 | * associated with the TUN device's security structure. |
1014 | * @security pointer to the TUN devices's security structure. | 1014 | * @security pointer to the TUN devices's security structure. |
1015 | * @skb_owned_by: | ||
1016 | * This hook sets the packet's owning sock. | ||
1017 | * @skb is the packet. | ||
1018 | * @sk the sock which owns the packet. | ||
1015 | * | 1019 | * |
1016 | * Security hooks for XFRM operations. | 1020 | * Security hooks for XFRM operations. |
1017 | * | 1021 | * |
@@ -1638,6 +1642,7 @@ struct security_operations { | |||
1638 | int (*tun_dev_attach_queue) (void *security); | 1642 | int (*tun_dev_attach_queue) (void *security); |
1639 | int (*tun_dev_attach) (struct sock *sk, void *security); | 1643 | int (*tun_dev_attach) (struct sock *sk, void *security); |
1640 | int (*tun_dev_open) (void *security); | 1644 | int (*tun_dev_open) (void *security); |
1645 | void (*skb_owned_by) (struct sk_buff *skb, struct sock *sk); | ||
1641 | #endif /* CONFIG_SECURITY_NETWORK */ | 1646 | #endif /* CONFIG_SECURITY_NETWORK */ |
1642 | 1647 | ||
1643 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1648 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
@@ -2588,6 +2593,8 @@ int security_tun_dev_attach_queue(void *security); | |||
2588 | int security_tun_dev_attach(struct sock *sk, void *security); | 2593 | int security_tun_dev_attach(struct sock *sk, void *security); |
2589 | int security_tun_dev_open(void *security); | 2594 | int security_tun_dev_open(void *security); |
2590 | 2595 | ||
2596 | void security_skb_owned_by(struct sk_buff *skb, struct sock *sk); | ||
2597 | |||
2591 | #else /* CONFIG_SECURITY_NETWORK */ | 2598 | #else /* CONFIG_SECURITY_NETWORK */ |
2592 | static inline int security_unix_stream_connect(struct sock *sock, | 2599 | static inline int security_unix_stream_connect(struct sock *sock, |
2593 | struct sock *other, | 2600 | struct sock *other, |
@@ -2779,6 +2786,11 @@ static inline int security_tun_dev_open(void *security) | |||
2779 | { | 2786 | { |
2780 | return 0; | 2787 | return 0; |
2781 | } | 2788 | } |
2789 | |||
2790 | static inline void security_skb_owned_by(struct sk_buff *skb, struct sock *sk) | ||
2791 | { | ||
2792 | } | ||
2793 | |||
2782 | #endif /* CONFIG_SECURITY_NETWORK */ | 2794 | #endif /* CONFIG_SECURITY_NETWORK */ |
2783 | 2795 | ||
2784 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 2796 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
diff --git a/include/linux/serial_s3c.h b/include/linux/serial_s3c.h new file mode 100644 index 000000000000..907d9d1d56cf --- /dev/null +++ b/include/linux/serial_s3c.h | |||
@@ -0,0 +1,260 @@ | |||
1 | /* | ||
2 | * Internal header file for Samsung S3C2410 serial ports (UART0-2) | ||
3 | * | ||
4 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
5 | * | ||
6 | * Additional defines, Copyright 2003 Simtec Electronics (linux@simtec.co.uk) | ||
7 | * | ||
8 | * Adapted from: | ||
9 | * | ||
10 | * Internal header file for MX1ADS serial ports (UART1 & 2) | ||
11 | * | ||
12 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | */ | ||
28 | |||
29 | #ifndef __ASM_ARM_REGS_SERIAL_H | ||
30 | #define __ASM_ARM_REGS_SERIAL_H | ||
31 | |||
32 | #define S3C2410_URXH (0x24) | ||
33 | #define S3C2410_UTXH (0x20) | ||
34 | #define S3C2410_ULCON (0x00) | ||
35 | #define S3C2410_UCON (0x04) | ||
36 | #define S3C2410_UFCON (0x08) | ||
37 | #define S3C2410_UMCON (0x0C) | ||
38 | #define S3C2410_UBRDIV (0x28) | ||
39 | #define S3C2410_UTRSTAT (0x10) | ||
40 | #define S3C2410_UERSTAT (0x14) | ||
41 | #define S3C2410_UFSTAT (0x18) | ||
42 | #define S3C2410_UMSTAT (0x1C) | ||
43 | |||
44 | #define S3C2410_LCON_CFGMASK ((0xF<<3)|(0x3)) | ||
45 | |||
46 | #define S3C2410_LCON_CS5 (0x0) | ||
47 | #define S3C2410_LCON_CS6 (0x1) | ||
48 | #define S3C2410_LCON_CS7 (0x2) | ||
49 | #define S3C2410_LCON_CS8 (0x3) | ||
50 | #define S3C2410_LCON_CSMASK (0x3) | ||
51 | |||
52 | #define S3C2410_LCON_PNONE (0x0) | ||
53 | #define S3C2410_LCON_PEVEN (0x5 << 3) | ||
54 | #define S3C2410_LCON_PODD (0x4 << 3) | ||
55 | #define S3C2410_LCON_PMASK (0x7 << 3) | ||
56 | |||
57 | #define S3C2410_LCON_STOPB (1<<2) | ||
58 | #define S3C2410_LCON_IRM (1<<6) | ||
59 | |||
60 | #define S3C2440_UCON_CLKMASK (3<<10) | ||
61 | #define S3C2440_UCON_CLKSHIFT (10) | ||
62 | #define S3C2440_UCON_PCLK (0<<10) | ||
63 | #define S3C2440_UCON_UCLK (1<<10) | ||
64 | #define S3C2440_UCON_PCLK2 (2<<10) | ||
65 | #define S3C2440_UCON_FCLK (3<<10) | ||
66 | #define S3C2443_UCON_EPLL (3<<10) | ||
67 | |||
68 | #define S3C6400_UCON_CLKMASK (3<<10) | ||
69 | #define S3C6400_UCON_CLKSHIFT (10) | ||
70 | #define S3C6400_UCON_PCLK (0<<10) | ||
71 | #define S3C6400_UCON_PCLK2 (2<<10) | ||
72 | #define S3C6400_UCON_UCLK0 (1<<10) | ||
73 | #define S3C6400_UCON_UCLK1 (3<<10) | ||
74 | |||
75 | #define S3C2440_UCON2_FCLK_EN (1<<15) | ||
76 | #define S3C2440_UCON0_DIVMASK (15 << 12) | ||
77 | #define S3C2440_UCON1_DIVMASK (15 << 12) | ||
78 | #define S3C2440_UCON2_DIVMASK (7 << 12) | ||
79 | #define S3C2440_UCON_DIVSHIFT (12) | ||
80 | |||
81 | #define S3C2412_UCON_CLKMASK (3<<10) | ||
82 | #define S3C2412_UCON_CLKSHIFT (10) | ||
83 | #define S3C2412_UCON_UCLK (1<<10) | ||
84 | #define S3C2412_UCON_USYSCLK (3<<10) | ||
85 | #define S3C2412_UCON_PCLK (0<<10) | ||
86 | #define S3C2412_UCON_PCLK2 (2<<10) | ||
87 | |||
88 | #define S3C2410_UCON_CLKMASK (1 << 10) | ||
89 | #define S3C2410_UCON_CLKSHIFT (10) | ||
90 | #define S3C2410_UCON_UCLK (1<<10) | ||
91 | #define S3C2410_UCON_SBREAK (1<<4) | ||
92 | |||
93 | #define S3C2410_UCON_TXILEVEL (1<<9) | ||
94 | #define S3C2410_UCON_RXILEVEL (1<<8) | ||
95 | #define S3C2410_UCON_TXIRQMODE (1<<2) | ||
96 | #define S3C2410_UCON_RXIRQMODE (1<<0) | ||
97 | #define S3C2410_UCON_RXFIFO_TOI (1<<7) | ||
98 | #define S3C2443_UCON_RXERR_IRQEN (1<<6) | ||
99 | #define S3C2443_UCON_LOOPBACK (1<<5) | ||
100 | |||
101 | #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
102 | S3C2410_UCON_RXILEVEL | \ | ||
103 | S3C2410_UCON_TXIRQMODE | \ | ||
104 | S3C2410_UCON_RXIRQMODE | \ | ||
105 | S3C2410_UCON_RXFIFO_TOI) | ||
106 | |||
107 | #define S3C2410_UFCON_FIFOMODE (1<<0) | ||
108 | #define S3C2410_UFCON_TXTRIG0 (0<<6) | ||
109 | #define S3C2410_UFCON_RXTRIG8 (1<<4) | ||
110 | #define S3C2410_UFCON_RXTRIG12 (2<<4) | ||
111 | |||
112 | /* S3C2440 FIFO trigger levels */ | ||
113 | #define S3C2440_UFCON_RXTRIG1 (0<<4) | ||
114 | #define S3C2440_UFCON_RXTRIG8 (1<<4) | ||
115 | #define S3C2440_UFCON_RXTRIG16 (2<<4) | ||
116 | #define S3C2440_UFCON_RXTRIG32 (3<<4) | ||
117 | |||
118 | #define S3C2440_UFCON_TXTRIG0 (0<<6) | ||
119 | #define S3C2440_UFCON_TXTRIG16 (1<<6) | ||
120 | #define S3C2440_UFCON_TXTRIG32 (2<<6) | ||
121 | #define S3C2440_UFCON_TXTRIG48 (3<<6) | ||
122 | |||
123 | #define S3C2410_UFCON_RESETBOTH (3<<1) | ||
124 | #define S3C2410_UFCON_RESETTX (1<<2) | ||
125 | #define S3C2410_UFCON_RESETRX (1<<1) | ||
126 | |||
127 | #define S3C2410_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
128 | S3C2410_UFCON_TXTRIG0 | \ | ||
129 | S3C2410_UFCON_RXTRIG8 ) | ||
130 | |||
131 | #define S3C2410_UMCOM_AFC (1<<4) | ||
132 | #define S3C2410_UMCOM_RTS_LOW (1<<0) | ||
133 | |||
134 | #define S3C2412_UMCON_AFC_63 (0<<5) /* same as s3c2443 */ | ||
135 | #define S3C2412_UMCON_AFC_56 (1<<5) | ||
136 | #define S3C2412_UMCON_AFC_48 (2<<5) | ||
137 | #define S3C2412_UMCON_AFC_40 (3<<5) | ||
138 | #define S3C2412_UMCON_AFC_32 (4<<5) | ||
139 | #define S3C2412_UMCON_AFC_24 (5<<5) | ||
140 | #define S3C2412_UMCON_AFC_16 (6<<5) | ||
141 | #define S3C2412_UMCON_AFC_8 (7<<5) | ||
142 | |||
143 | #define S3C2410_UFSTAT_TXFULL (1<<9) | ||
144 | #define S3C2410_UFSTAT_RXFULL (1<<8) | ||
145 | #define S3C2410_UFSTAT_TXMASK (15<<4) | ||
146 | #define S3C2410_UFSTAT_TXSHIFT (4) | ||
147 | #define S3C2410_UFSTAT_RXMASK (15<<0) | ||
148 | #define S3C2410_UFSTAT_RXSHIFT (0) | ||
149 | |||
150 | /* UFSTAT S3C2443 same as S3C2440 */ | ||
151 | #define S3C2440_UFSTAT_TXFULL (1<<14) | ||
152 | #define S3C2440_UFSTAT_RXFULL (1<<6) | ||
153 | #define S3C2440_UFSTAT_TXSHIFT (8) | ||
154 | #define S3C2440_UFSTAT_RXSHIFT (0) | ||
155 | #define S3C2440_UFSTAT_TXMASK (63<<8) | ||
156 | #define S3C2440_UFSTAT_RXMASK (63) | ||
157 | |||
158 | #define S3C2410_UTRSTAT_TXE (1<<2) | ||
159 | #define S3C2410_UTRSTAT_TXFE (1<<1) | ||
160 | #define S3C2410_UTRSTAT_RXDR (1<<0) | ||
161 | |||
162 | #define S3C2410_UERSTAT_OVERRUN (1<<0) | ||
163 | #define S3C2410_UERSTAT_FRAME (1<<2) | ||
164 | #define S3C2410_UERSTAT_BREAK (1<<3) | ||
165 | #define S3C2443_UERSTAT_PARITY (1<<1) | ||
166 | |||
167 | #define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ | ||
168 | S3C2410_UERSTAT_FRAME | \ | ||
169 | S3C2410_UERSTAT_BREAK) | ||
170 | |||
171 | #define S3C2410_UMSTAT_CTS (1<<0) | ||
172 | #define S3C2410_UMSTAT_DeltaCTS (1<<2) | ||
173 | |||
174 | #define S3C2443_DIVSLOT (0x2C) | ||
175 | |||
176 | /* S3C64XX interrupt registers. */ | ||
177 | #define S3C64XX_UINTP 0x30 | ||
178 | #define S3C64XX_UINTSP 0x34 | ||
179 | #define S3C64XX_UINTM 0x38 | ||
180 | |||
181 | #define S3C64XX_UINTM_RXD (0) | ||
182 | #define S3C64XX_UINTM_TXD (2) | ||
183 | #define S3C64XX_UINTM_RXD_MSK (1 << S3C64XX_UINTM_RXD) | ||
184 | #define S3C64XX_UINTM_TXD_MSK (1 << S3C64XX_UINTM_TXD) | ||
185 | |||
186 | /* Following are specific to S5PV210 */ | ||
187 | #define S5PV210_UCON_CLKMASK (1<<10) | ||
188 | #define S5PV210_UCON_CLKSHIFT (10) | ||
189 | #define S5PV210_UCON_PCLK (0<<10) | ||
190 | #define S5PV210_UCON_UCLK (1<<10) | ||
191 | |||
192 | #define S5PV210_UFCON_TXTRIG0 (0<<8) | ||
193 | #define S5PV210_UFCON_TXTRIG4 (1<<8) | ||
194 | #define S5PV210_UFCON_TXTRIG8 (2<<8) | ||
195 | #define S5PV210_UFCON_TXTRIG16 (3<<8) | ||
196 | #define S5PV210_UFCON_TXTRIG32 (4<<8) | ||
197 | #define S5PV210_UFCON_TXTRIG64 (5<<8) | ||
198 | #define S5PV210_UFCON_TXTRIG128 (6<<8) | ||
199 | #define S5PV210_UFCON_TXTRIG256 (7<<8) | ||
200 | |||
201 | #define S5PV210_UFCON_RXTRIG1 (0<<4) | ||
202 | #define S5PV210_UFCON_RXTRIG4 (1<<4) | ||
203 | #define S5PV210_UFCON_RXTRIG8 (2<<4) | ||
204 | #define S5PV210_UFCON_RXTRIG16 (3<<4) | ||
205 | #define S5PV210_UFCON_RXTRIG32 (4<<4) | ||
206 | #define S5PV210_UFCON_RXTRIG64 (5<<4) | ||
207 | #define S5PV210_UFCON_RXTRIG128 (6<<4) | ||
208 | #define S5PV210_UFCON_RXTRIG256 (7<<4) | ||
209 | |||
210 | #define S5PV210_UFSTAT_TXFULL (1<<24) | ||
211 | #define S5PV210_UFSTAT_RXFULL (1<<8) | ||
212 | #define S5PV210_UFSTAT_TXMASK (255<<16) | ||
213 | #define S5PV210_UFSTAT_TXSHIFT (16) | ||
214 | #define S5PV210_UFSTAT_RXMASK (255<<0) | ||
215 | #define S5PV210_UFSTAT_RXSHIFT (0) | ||
216 | |||
217 | #define S3C2410_UCON_CLKSEL0 (1 << 0) | ||
218 | #define S3C2410_UCON_CLKSEL1 (1 << 1) | ||
219 | #define S3C2410_UCON_CLKSEL2 (1 << 2) | ||
220 | #define S3C2410_UCON_CLKSEL3 (1 << 3) | ||
221 | |||
222 | /* Default values for s5pv210 UCON and UFCON uart registers */ | ||
223 | #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
224 | S3C2410_UCON_RXILEVEL | \ | ||
225 | S3C2410_UCON_TXIRQMODE | \ | ||
226 | S3C2410_UCON_RXIRQMODE | \ | ||
227 | S3C2410_UCON_RXFIFO_TOI | \ | ||
228 | S3C2443_UCON_RXERR_IRQEN) | ||
229 | |||
230 | #define S5PV210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
231 | S5PV210_UFCON_TXTRIG4 | \ | ||
232 | S5PV210_UFCON_RXTRIG4) | ||
233 | |||
234 | #ifndef __ASSEMBLY__ | ||
235 | |||
236 | /* configuration structure for per-machine configurations for the | ||
237 | * serial port | ||
238 | * | ||
239 | * the pointer is setup by the machine specific initialisation from the | ||
240 | * arch/arm/mach-s3c2410/ directory. | ||
241 | */ | ||
242 | |||
243 | struct s3c2410_uartcfg { | ||
244 | unsigned char hwport; /* hardware port number */ | ||
245 | unsigned char unused; | ||
246 | unsigned short flags; | ||
247 | upf_t uart_flags; /* default uart flags */ | ||
248 | unsigned int clk_sel; | ||
249 | |||
250 | unsigned int has_fracval; | ||
251 | |||
252 | unsigned long ucon; /* value of ucon for port */ | ||
253 | unsigned long ulcon; /* value of ulcon for port */ | ||
254 | unsigned long ufcon; /* value of ufcon for port */ | ||
255 | }; | ||
256 | |||
257 | #endif /* __ASSEMBLY__ */ | ||
258 | |||
259 | #endif /* __ASM_ARM_REGS_SERIAL_H */ | ||
260 | |||
diff --git a/include/linux/signal.h b/include/linux/signal.h index a2dcb94ea49d..9475c5cb28bc 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -250,11 +250,11 @@ extern int show_unhandled_signals; | |||
250 | extern int sigsuspend(sigset_t *); | 250 | extern int sigsuspend(sigset_t *); |
251 | 251 | ||
252 | struct sigaction { | 252 | struct sigaction { |
253 | #ifndef __ARCH_HAS_ODD_SIGACTION | 253 | #ifndef __ARCH_HAS_IRIX_SIGACTION |
254 | __sighandler_t sa_handler; | 254 | __sighandler_t sa_handler; |
255 | unsigned long sa_flags; | 255 | unsigned long sa_flags; |
256 | #else | 256 | #else |
257 | unsigned long sa_flags; | 257 | unsigned int sa_flags; |
258 | __sighandler_t sa_handler; | 258 | __sighandler_t sa_handler; |
259 | #endif | 259 | #endif |
260 | #ifdef __ARCH_HAS_SA_RESTORER | 260 | #ifdef __ARCH_HAS_SA_RESTORER |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 821c7f45d2a7..b8292d8cc9fa 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -500,7 +500,7 @@ struct sk_buff { | |||
500 | union { | 500 | union { |
501 | __u32 mark; | 501 | __u32 mark; |
502 | __u32 dropcount; | 502 | __u32 dropcount; |
503 | __u32 avail_size; | 503 | __u32 reserved_tailroom; |
504 | }; | 504 | }; |
505 | 505 | ||
506 | sk_buff_data_t inner_transport_header; | 506 | sk_buff_data_t inner_transport_header; |
@@ -1288,11 +1288,13 @@ static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, | |||
1288 | * do not lose pfmemalloc information as the pages would not be | 1288 | * do not lose pfmemalloc information as the pages would not be |
1289 | * allocated using __GFP_MEMALLOC. | 1289 | * allocated using __GFP_MEMALLOC. |
1290 | */ | 1290 | */ |
1291 | if (page->pfmemalloc && !page->mapping) | ||
1292 | skb->pfmemalloc = true; | ||
1293 | frag->page.p = page; | 1291 | frag->page.p = page; |
1294 | frag->page_offset = off; | 1292 | frag->page_offset = off; |
1295 | skb_frag_size_set(frag, size); | 1293 | skb_frag_size_set(frag, size); |
1294 | |||
1295 | page = compound_head(page); | ||
1296 | if (page->pfmemalloc && !page->mapping) | ||
1297 | skb->pfmemalloc = true; | ||
1296 | } | 1298 | } |
1297 | 1299 | ||
1298 | /** | 1300 | /** |
@@ -1447,7 +1449,10 @@ static inline int skb_tailroom(const struct sk_buff *skb) | |||
1447 | */ | 1449 | */ |
1448 | static inline int skb_availroom(const struct sk_buff *skb) | 1450 | static inline int skb_availroom(const struct sk_buff *skb) |
1449 | { | 1451 | { |
1450 | return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len; | 1452 | if (skb_is_nonlinear(skb)) |
1453 | return 0; | ||
1454 | |||
1455 | return skb->end - skb->tail - skb->reserved_tailroom; | ||
1451 | } | 1456 | } |
1452 | 1457 | ||
1453 | /** | 1458 | /** |
@@ -2638,6 +2643,13 @@ static inline void nf_reset(struct sk_buff *skb) | |||
2638 | #endif | 2643 | #endif |
2639 | } | 2644 | } |
2640 | 2645 | ||
2646 | static inline void nf_reset_trace(struct sk_buff *skb) | ||
2647 | { | ||
2648 | #if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) | ||
2649 | skb->nf_trace = 0; | ||
2650 | #endif | ||
2651 | } | ||
2652 | |||
2641 | /* Note: This doesn't put any conntrack and bridge info in dst. */ | 2653 | /* Note: This doesn't put any conntrack and bridge info in dst. */ |
2642 | static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) | 2654 | static inline void __nf_copy(struct sk_buff *dst, const struct sk_buff *src) |
2643 | { | 2655 | { |
diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h index c65dee059913..13e929679550 100644 --- a/include/linux/smpboot.h +++ b/include/linux/smpboot.h | |||
@@ -24,6 +24,9 @@ struct smpboot_thread_data; | |||
24 | * parked (cpu offline) | 24 | * parked (cpu offline) |
25 | * @unpark: Optional unpark function, called when the thread is | 25 | * @unpark: Optional unpark function, called when the thread is |
26 | * unparked (cpu online) | 26 | * unparked (cpu online) |
27 | * @pre_unpark: Optional unpark function, called before the thread is | ||
28 | * unparked (cpu online). This is not guaranteed to be | ||
29 | * called on the target cpu of the thread. Careful! | ||
27 | * @selfparking: Thread is not parked by the park function. | 30 | * @selfparking: Thread is not parked by the park function. |
28 | * @thread_comm: The base name of the thread | 31 | * @thread_comm: The base name of the thread |
29 | */ | 32 | */ |
@@ -37,6 +40,7 @@ struct smp_hotplug_thread { | |||
37 | void (*cleanup)(unsigned int cpu, bool online); | 40 | void (*cleanup)(unsigned int cpu, bool online); |
38 | void (*park)(unsigned int cpu); | 41 | void (*park)(unsigned int cpu); |
39 | void (*unpark)(unsigned int cpu); | 42 | void (*unpark)(unsigned int cpu); |
43 | void (*pre_unpark)(unsigned int cpu); | ||
40 | bool selfparking; | 44 | bool selfparking; |
41 | const char *thread_comm; | 45 | const char *thread_comm; |
42 | }; | 46 | }; |
diff --git a/include/linux/spi/spi-tegra.h b/include/linux/spi/spi-tegra.h deleted file mode 100644 index 786932c62edb..000000000000 --- a/include/linux/spi/spi-tegra.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * spi-tegra.h: SPI interface for Nvidia Tegra20 SLINK controller. | ||
3 | * | ||
4 | * Copyright (C) 2011 NVIDIA Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _LINUX_SPI_TEGRA_H | ||
22 | #define _LINUX_SPI_TEGRA_H | ||
23 | |||
24 | struct tegra_spi_platform_data { | ||
25 | int dma_req_sel; | ||
26 | unsigned int spi_max_frequency; | ||
27 | }; | ||
28 | |||
29 | /* | ||
30 | * Controller data from device to pass some info like | ||
31 | * hw based chip select can be used or not and if yes | ||
32 | * then CS hold and setup time. | ||
33 | */ | ||
34 | struct tegra_spi_device_controller_data { | ||
35 | bool is_hw_based_cs; | ||
36 | int cs_setup_clk_count; | ||
37 | int cs_hold_clk_count; | ||
38 | }; | ||
39 | |||
40 | #endif /* _LINUX_SPI_TEGRA_H */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 38c2b925923d..733eb5ee31c5 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -228,6 +228,11 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
228 | * every chipselect is connected to a slave. | 228 | * every chipselect is connected to a slave. |
229 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. | 229 | * @dma_alignment: SPI controller constraint on DMA buffers alignment. |
230 | * @mode_bits: flags understood by this controller driver | 230 | * @mode_bits: flags understood by this controller driver |
231 | * @bits_per_word_mask: A mask indicating which values of bits_per_word are | ||
232 | * supported by the driver. Bit n indicates that a bits_per_word n+1 is | ||
233 | * suported. If set, the SPI core will reject any transfer with an | ||
234 | * unsupported bits_per_word. If not set, this value is simply ignored, | ||
235 | * and it's up to the individual driver to perform any validation. | ||
231 | * @flags: other constraints relevant to this driver | 236 | * @flags: other constraints relevant to this driver |
232 | * @bus_lock_spinlock: spinlock for SPI bus locking | 237 | * @bus_lock_spinlock: spinlock for SPI bus locking |
233 | * @bus_lock_mutex: mutex for SPI bus locking | 238 | * @bus_lock_mutex: mutex for SPI bus locking |
@@ -301,6 +306,9 @@ struct spi_master { | |||
301 | /* spi_device.mode flags understood by this controller driver */ | 306 | /* spi_device.mode flags understood by this controller driver */ |
302 | u16 mode_bits; | 307 | u16 mode_bits; |
303 | 308 | ||
309 | /* bitmask of supported bits_per_word for transfers */ | ||
310 | u32 bits_per_word_mask; | ||
311 | |||
304 | /* other constraints relevant to this driver */ | 312 | /* other constraints relevant to this driver */ |
305 | u16 flags; | 313 | u16 flags; |
306 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ | 314 | #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */ |
diff --git a/include/linux/spinlock_up.h b/include/linux/spinlock_up.h index a26e2fb604e6..e2369c167dbd 100644 --- a/include/linux/spinlock_up.h +++ b/include/linux/spinlock_up.h | |||
@@ -16,7 +16,10 @@ | |||
16 | * In the debug case, 1 means unlocked, 0 means locked. (the values | 16 | * In the debug case, 1 means unlocked, 0 means locked. (the values |
17 | * are inverted, to catch initialization bugs) | 17 | * are inverted, to catch initialization bugs) |
18 | * | 18 | * |
19 | * No atomicity anywhere, we are on UP. | 19 | * No atomicity anywhere, we are on UP. However, we still need |
20 | * the compiler barriers, because we do not want the compiler to | ||
21 | * move potentially faulting instructions (notably user accesses) | ||
22 | * into the locked sequence, resulting in non-atomic execution. | ||
20 | */ | 23 | */ |
21 | 24 | ||
22 | #ifdef CONFIG_DEBUG_SPINLOCK | 25 | #ifdef CONFIG_DEBUG_SPINLOCK |
@@ -25,6 +28,7 @@ | |||
25 | static inline void arch_spin_lock(arch_spinlock_t *lock) | 28 | static inline void arch_spin_lock(arch_spinlock_t *lock) |
26 | { | 29 | { |
27 | lock->slock = 0; | 30 | lock->slock = 0; |
31 | barrier(); | ||
28 | } | 32 | } |
29 | 33 | ||
30 | static inline void | 34 | static inline void |
@@ -32,6 +36,7 @@ arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) | |||
32 | { | 36 | { |
33 | local_irq_save(flags); | 37 | local_irq_save(flags); |
34 | lock->slock = 0; | 38 | lock->slock = 0; |
39 | barrier(); | ||
35 | } | 40 | } |
36 | 41 | ||
37 | static inline int arch_spin_trylock(arch_spinlock_t *lock) | 42 | static inline int arch_spin_trylock(arch_spinlock_t *lock) |
@@ -39,32 +44,34 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock) | |||
39 | char oldval = lock->slock; | 44 | char oldval = lock->slock; |
40 | 45 | ||
41 | lock->slock = 0; | 46 | lock->slock = 0; |
47 | barrier(); | ||
42 | 48 | ||
43 | return oldval > 0; | 49 | return oldval > 0; |
44 | } | 50 | } |
45 | 51 | ||
46 | static inline void arch_spin_unlock(arch_spinlock_t *lock) | 52 | static inline void arch_spin_unlock(arch_spinlock_t *lock) |
47 | { | 53 | { |
54 | barrier(); | ||
48 | lock->slock = 1; | 55 | lock->slock = 1; |
49 | } | 56 | } |
50 | 57 | ||
51 | /* | 58 | /* |
52 | * Read-write spinlocks. No debug version. | 59 | * Read-write spinlocks. No debug version. |
53 | */ | 60 | */ |
54 | #define arch_read_lock(lock) do { (void)(lock); } while (0) | 61 | #define arch_read_lock(lock) do { barrier(); (void)(lock); } while (0) |
55 | #define arch_write_lock(lock) do { (void)(lock); } while (0) | 62 | #define arch_write_lock(lock) do { barrier(); (void)(lock); } while (0) |
56 | #define arch_read_trylock(lock) ({ (void)(lock); 1; }) | 63 | #define arch_read_trylock(lock) ({ barrier(); (void)(lock); 1; }) |
57 | #define arch_write_trylock(lock) ({ (void)(lock); 1; }) | 64 | #define arch_write_trylock(lock) ({ barrier(); (void)(lock); 1; }) |
58 | #define arch_read_unlock(lock) do { (void)(lock); } while (0) | 65 | #define arch_read_unlock(lock) do { barrier(); (void)(lock); } while (0) |
59 | #define arch_write_unlock(lock) do { (void)(lock); } while (0) | 66 | #define arch_write_unlock(lock) do { barrier(); (void)(lock); } while (0) |
60 | 67 | ||
61 | #else /* DEBUG_SPINLOCK */ | 68 | #else /* DEBUG_SPINLOCK */ |
62 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | 69 | #define arch_spin_is_locked(lock) ((void)(lock), 0) |
63 | /* for sched.c and kernel_lock.c: */ | 70 | /* for sched.c and kernel_lock.c: */ |
64 | # define arch_spin_lock(lock) do { (void)(lock); } while (0) | 71 | # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) |
65 | # define arch_spin_lock_flags(lock, flags) do { (void)(lock); } while (0) | 72 | # define arch_spin_lock_flags(lock, flags) do { barrier(); (void)(lock); } while (0) |
66 | # define arch_spin_unlock(lock) do { (void)(lock); } while (0) | 73 | # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0) |
67 | # define arch_spin_trylock(lock) ({ (void)(lock); 1; }) | 74 | # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) |
68 | #endif /* DEBUG_SPINLOCK */ | 75 | #endif /* DEBUG_SPINLOCK */ |
69 | 76 | ||
70 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | 77 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 9e492be5244b..6fcfe99bd999 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
@@ -219,6 +219,7 @@ | |||
219 | #define SSB_CHIPCO_PMU_CTL 0x0600 /* PMU control */ | 219 | #define SSB_CHIPCO_PMU_CTL 0x0600 /* PMU control */ |
220 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | 220 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ |
221 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV_SHIFT 16 | 221 | #define SSB_CHIPCO_PMU_CTL_ILP_DIV_SHIFT 16 |
222 | #define SSB_CHIPCO_PMU_CTL_PLL_UPD 0x00000400 | ||
222 | #define SSB_CHIPCO_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | 223 | #define SSB_CHIPCO_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ |
223 | #define SSB_CHIPCO_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | 224 | #define SSB_CHIPCO_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ |
224 | #define SSB_CHIPCO_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | 225 | #define SSB_CHIPCO_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ |
@@ -667,5 +668,6 @@ enum ssb_pmu_ldo_volt_id { | |||
667 | void ssb_pmu_set_ldo_voltage(struct ssb_chipcommon *cc, | 668 | void ssb_pmu_set_ldo_voltage(struct ssb_chipcommon *cc, |
668 | enum ssb_pmu_ldo_volt_id id, u32 voltage); | 669 | enum ssb_pmu_ldo_volt_id id, u32 voltage); |
669 | void ssb_pmu_set_ldo_paref(struct ssb_chipcommon *cc, bool on); | 670 | void ssb_pmu_set_ldo_paref(struct ssb_chipcommon *cc, bool on); |
671 | void ssb_pmu_spuravoid_pllupdate(struct ssb_chipcommon *cc, int spuravoid); | ||
670 | 672 | ||
671 | #endif /* LINUX_SSB_CHIPCO_H_ */ | 673 | #endif /* LINUX_SSB_CHIPCO_H_ */ |
diff --git a/include/linux/ssbi.h b/include/linux/ssbi.h new file mode 100644 index 000000000000..44ef5da21470 --- /dev/null +++ b/include/linux/ssbi.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* Copyright (C) 2010 Google, Inc. | ||
2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | ||
3 | * Author: Dima Zavin <dima@android.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 and | ||
7 | * only version 2 as published by the Free Software Foundation. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef _LINUX_SSBI_H | ||
16 | #define _LINUX_SSBI_H | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
20 | struct ssbi_slave_info { | ||
21 | const char *name; | ||
22 | void *platform_data; | ||
23 | }; | ||
24 | |||
25 | enum ssbi_controller_type { | ||
26 | MSM_SBI_CTRL_SSBI = 0, | ||
27 | MSM_SBI_CTRL_SSBI2, | ||
28 | MSM_SBI_CTRL_PMIC_ARBITER, | ||
29 | }; | ||
30 | |||
31 | struct ssbi_platform_data { | ||
32 | struct ssbi_slave_info slave; | ||
33 | enum ssbi_controller_type controller_type; | ||
34 | }; | ||
35 | |||
36 | int ssbi_write(struct device *dev, u16 addr, u8 *buf, int len); | ||
37 | int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len); | ||
38 | #endif | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 2818a123f3ea..1701ce4be746 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -236,7 +236,7 @@ extern unsigned long nr_free_pagecache_pages(void); | |||
236 | extern void __lru_cache_add(struct page *, enum lru_list lru); | 236 | extern void __lru_cache_add(struct page *, enum lru_list lru); |
237 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); | 237 | extern void lru_cache_add_lru(struct page *, enum lru_list lru); |
238 | extern void lru_add_page_tail(struct page *page, struct page *page_tail, | 238 | extern void lru_add_page_tail(struct page *page, struct page *page_tail, |
239 | struct lruvec *lruvec); | 239 | struct lruvec *lruvec, struct list_head *head); |
240 | extern void activate_page(struct page *); | 240 | extern void activate_page(struct page *); |
241 | extern void mark_page_accessed(struct page *); | 241 | extern void mark_page_accessed(struct page *); |
242 | extern void lru_add_drain(void); | 242 | extern void lru_add_drain(void); |
@@ -330,6 +330,9 @@ static inline void mem_cgroup_uncharge_swap(swp_entry_t ent) | |||
330 | /* linux/mm/page_io.c */ | 330 | /* linux/mm/page_io.c */ |
331 | extern int swap_readpage(struct page *); | 331 | extern int swap_readpage(struct page *); |
332 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); | 332 | extern int swap_writepage(struct page *page, struct writeback_control *wbc); |
333 | extern void end_swap_bio_write(struct bio *bio, int err); | ||
334 | extern int __swap_writepage(struct page *page, struct writeback_control *wbc, | ||
335 | void (*end_write_func)(struct bio *, int)); | ||
333 | extern int swap_set_page_dirty(struct page *page); | 336 | extern int swap_set_page_dirty(struct page *page); |
334 | extern void end_swap_bio_read(struct bio *bio, int err); | 337 | extern void end_swap_bio_read(struct bio *bio, int err); |
335 | 338 | ||
@@ -343,8 +346,9 @@ extern struct address_space swapper_spaces[]; | |||
343 | #define swap_address_space(entry) (&swapper_spaces[swp_type(entry)]) | 346 | #define swap_address_space(entry) (&swapper_spaces[swp_type(entry)]) |
344 | extern unsigned long total_swapcache_pages(void); | 347 | extern unsigned long total_swapcache_pages(void); |
345 | extern void show_swap_cache_info(void); | 348 | extern void show_swap_cache_info(void); |
346 | extern int add_to_swap(struct page *); | 349 | extern int add_to_swap(struct page *, struct list_head *list); |
347 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); | 350 | extern int add_to_swap_cache(struct page *, swp_entry_t, gfp_t); |
351 | extern int __add_to_swap_cache(struct page *page, swp_entry_t entry); | ||
348 | extern void __delete_from_swap_cache(struct page *); | 352 | extern void __delete_from_swap_cache(struct page *); |
349 | extern void delete_from_swap_cache(struct page *); | 353 | extern void delete_from_swap_cache(struct page *); |
350 | extern void free_page_and_swap_cache(struct page *); | 354 | extern void free_page_and_swap_cache(struct page *); |
@@ -461,7 +465,7 @@ static inline struct page *lookup_swap_cache(swp_entry_t swp) | |||
461 | return NULL; | 465 | return NULL; |
462 | } | 466 | } |
463 | 467 | ||
464 | static inline int add_to_swap(struct page *page) | 468 | static inline int add_to_swap(struct page *page, struct list_head *list) |
465 | { | 469 | { |
466 | return 0; | 470 | return 0; |
467 | } | 471 | } |
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 2de42f9401d2..a5ffd32642fd 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h | |||
@@ -25,6 +25,7 @@ extern int swiotlb_force; | |||
25 | extern void swiotlb_init(int verbose); | 25 | extern void swiotlb_init(int verbose); |
26 | int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); | 26 | int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); |
27 | extern unsigned long swiotlb_nr_tbl(void); | 27 | extern unsigned long swiotlb_nr_tbl(void); |
28 | unsigned long swiotlb_size_or_default(void); | ||
28 | extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); | 29 | extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); |
29 | 30 | ||
30 | /* | 31 | /* |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index f0bd7f90a90d..e3c0ae9bb1fa 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -44,7 +44,7 @@ | |||
44 | /* Adding event notification support elements */ | 44 | /* Adding event notification support elements */ |
45 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | 45 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" |
46 | #define THERMAL_GENL_VERSION 0x01 | 46 | #define THERMAL_GENL_VERSION 0x01 |
47 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group" | 47 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_grp" |
48 | 48 | ||
49 | /* Default Thermal Governor */ | 49 | /* Default Thermal Governor */ |
50 | #if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) | 50 | #if defined(CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE) |
diff --git a/include/linux/trace_clock.h b/include/linux/trace_clock.h index d563f37e1a1d..1d7ca2739272 100644 --- a/include/linux/trace_clock.h +++ b/include/linux/trace_clock.h | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | extern u64 notrace trace_clock_local(void); | 17 | extern u64 notrace trace_clock_local(void); |
18 | extern u64 notrace trace_clock(void); | 18 | extern u64 notrace trace_clock(void); |
19 | extern u64 notrace trace_clock_jiffies(void); | ||
19 | extern u64 notrace trace_clock_global(void); | 20 | extern u64 notrace trace_clock_global(void); |
20 | extern u64 notrace trace_clock_counter(void); | 21 | extern u64 notrace trace_clock_counter(void); |
21 | 22 | ||
diff --git a/include/linux/tty.h b/include/linux/tty.h index c75d886b0307..367a9dfc4ea2 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -255,9 +255,9 @@ struct tty_struct { | |||
255 | int count; | 255 | int count; |
256 | struct winsize winsize; /* termios mutex */ | 256 | struct winsize winsize; /* termios mutex */ |
257 | unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; | 257 | unsigned char stopped:1, hw_stopped:1, flow_stopped:1, packet:1; |
258 | unsigned char warned:1; | ||
259 | unsigned char ctrl_status; /* ctrl_lock */ | 258 | unsigned char ctrl_status; /* ctrl_lock */ |
260 | unsigned int receive_room; /* Bytes free for queue */ | 259 | unsigned int receive_room; /* Bytes free for queue */ |
260 | int flow_change; | ||
261 | 261 | ||
262 | struct tty_struct *link; | 262 | struct tty_struct *link; |
263 | struct fasync_struct *fasync; | 263 | struct fasync_struct *fasync; |
@@ -315,9 +315,25 @@ struct tty_file_private { | |||
315 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ | 315 | #define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ |
316 | #define TTY_HUPPED 18 /* Post driver->hangup() */ | 316 | #define TTY_HUPPED 18 /* Post driver->hangup() */ |
317 | #define TTY_HUPPING 21 /* ->hangup() in progress */ | 317 | #define TTY_HUPPING 21 /* ->hangup() in progress */ |
318 | #define TTY_LDISC_HALTED 22 /* Line discipline is halted */ | ||
318 | 319 | ||
319 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) | 320 | #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) |
320 | 321 | ||
322 | /* Values for tty->flow_change */ | ||
323 | #define TTY_THROTTLE_SAFE 1 | ||
324 | #define TTY_UNTHROTTLE_SAFE 2 | ||
325 | |||
326 | static inline void __tty_set_flow_change(struct tty_struct *tty, int val) | ||
327 | { | ||
328 | tty->flow_change = val; | ||
329 | } | ||
330 | |||
331 | static inline void tty_set_flow_change(struct tty_struct *tty, int val) | ||
332 | { | ||
333 | tty->flow_change = val; | ||
334 | smp_mb(); | ||
335 | } | ||
336 | |||
321 | #ifdef CONFIG_TTY | 337 | #ifdef CONFIG_TTY |
322 | extern void console_init(void); | 338 | extern void console_init(void); |
323 | extern void tty_kref_put(struct tty_struct *tty); | 339 | extern void tty_kref_put(struct tty_struct *tty); |
@@ -400,6 +416,8 @@ extern int tty_write_room(struct tty_struct *tty); | |||
400 | extern void tty_driver_flush_buffer(struct tty_struct *tty); | 416 | extern void tty_driver_flush_buffer(struct tty_struct *tty); |
401 | extern void tty_throttle(struct tty_struct *tty); | 417 | extern void tty_throttle(struct tty_struct *tty); |
402 | extern void tty_unthrottle(struct tty_struct *tty); | 418 | extern void tty_unthrottle(struct tty_struct *tty); |
419 | extern int tty_throttle_safe(struct tty_struct *tty); | ||
420 | extern int tty_unthrottle_safe(struct tty_struct *tty); | ||
403 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); | 421 | extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); |
404 | extern void tty_driver_remove_tty(struct tty_driver *driver, | 422 | extern void tty_driver_remove_tty(struct tty_driver *driver, |
405 | struct tty_struct *tty); | 423 | struct tty_struct *tty); |
@@ -419,13 +437,28 @@ extern void tty_flush_to_ldisc(struct tty_struct *tty); | |||
419 | extern void tty_buffer_free_all(struct tty_port *port); | 437 | extern void tty_buffer_free_all(struct tty_port *port); |
420 | extern void tty_buffer_flush(struct tty_struct *tty); | 438 | extern void tty_buffer_flush(struct tty_struct *tty); |
421 | extern void tty_buffer_init(struct tty_port *port); | 439 | extern void tty_buffer_init(struct tty_port *port); |
422 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | ||
423 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 440 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
424 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 441 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
425 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, | 442 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, |
426 | speed_t ibaud, speed_t obaud); | 443 | speed_t ibaud, speed_t obaud); |
427 | extern void tty_encode_baud_rate(struct tty_struct *tty, | 444 | extern void tty_encode_baud_rate(struct tty_struct *tty, |
428 | speed_t ibaud, speed_t obaud); | 445 | speed_t ibaud, speed_t obaud); |
446 | |||
447 | /** | ||
448 | * tty_get_baud_rate - get tty bit rates | ||
449 | * @tty: tty to query | ||
450 | * | ||
451 | * Returns the baud rate as an integer for this terminal. The | ||
452 | * termios lock must be held by the caller and the terminal bit | ||
453 | * flags may be updated. | ||
454 | * | ||
455 | * Locking: none | ||
456 | */ | ||
457 | static inline speed_t tty_get_baud_rate(struct tty_struct *tty) | ||
458 | { | ||
459 | return tty_termios_baud_rate(&tty->termios); | ||
460 | } | ||
461 | |||
429 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 462 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
430 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | 463 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); |
431 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); | 464 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); |
@@ -502,6 +535,8 @@ extern int tty_port_carrier_raised(struct tty_port *port); | |||
502 | extern void tty_port_raise_dtr_rts(struct tty_port *port); | 535 | extern void tty_port_raise_dtr_rts(struct tty_port *port); |
503 | extern void tty_port_lower_dtr_rts(struct tty_port *port); | 536 | extern void tty_port_lower_dtr_rts(struct tty_port *port); |
504 | extern void tty_port_hangup(struct tty_port *port); | 537 | extern void tty_port_hangup(struct tty_port *port); |
538 | extern void tty_port_tty_hangup(struct tty_port *port, bool check_clocal); | ||
539 | extern void tty_port_tty_wakeup(struct tty_port *port); | ||
505 | extern int tty_port_block_til_ready(struct tty_port *port, | 540 | extern int tty_port_block_til_ready(struct tty_port *port, |
506 | struct tty_struct *tty, struct file *filp); | 541 | struct tty_struct *tty, struct file *filp); |
507 | extern int tty_port_close_start(struct tty_port *port, | 542 | extern int tty_port_close_start(struct tty_port *port, |
@@ -526,8 +561,6 @@ extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); | |||
526 | extern void tty_ldisc_init(struct tty_struct *tty); | 561 | extern void tty_ldisc_init(struct tty_struct *tty); |
527 | extern void tty_ldisc_deinit(struct tty_struct *tty); | 562 | extern void tty_ldisc_deinit(struct tty_struct *tty); |
528 | extern void tty_ldisc_begin(void); | 563 | extern void tty_ldisc_begin(void); |
529 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ | ||
530 | extern void tty_ldisc_enable(struct tty_struct *tty); | ||
531 | 564 | ||
532 | 565 | ||
533 | /* n_tty.c */ | 566 | /* n_tty.c */ |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index 455a0d7bf220..58390c73df8b 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
@@ -9,89 +9,89 @@ | |||
9 | * | 9 | * |
10 | * int (*open)(struct tty_struct *); | 10 | * int (*open)(struct tty_struct *); |
11 | * | 11 | * |
12 | * This function is called when the line discipline is associated | 12 | * This function is called when the line discipline is associated |
13 | * with the tty. The line discipline can use this as an | 13 | * with the tty. The line discipline can use this as an |
14 | * opportunity to initialize any state needed by the ldisc routines. | 14 | * opportunity to initialize any state needed by the ldisc routines. |
15 | * | 15 | * |
16 | * void (*close)(struct tty_struct *); | 16 | * void (*close)(struct tty_struct *); |
17 | * | 17 | * |
18 | * This function is called when the line discipline is being | 18 | * This function is called when the line discipline is being |
19 | * shutdown, either because the tty is being closed or because | 19 | * shutdown, either because the tty is being closed or because |
20 | * the tty is being changed to use a new line discipline | 20 | * the tty is being changed to use a new line discipline |
21 | * | 21 | * |
22 | * void (*flush_buffer)(struct tty_struct *tty); | 22 | * void (*flush_buffer)(struct tty_struct *tty); |
23 | * | 23 | * |
24 | * This function instructs the line discipline to clear its | 24 | * This function instructs the line discipline to clear its |
25 | * buffers of any input characters it may have queued to be | 25 | * buffers of any input characters it may have queued to be |
26 | * delivered to the user mode process. | 26 | * delivered to the user mode process. |
27 | * | 27 | * |
28 | * ssize_t (*chars_in_buffer)(struct tty_struct *tty); | 28 | * ssize_t (*chars_in_buffer)(struct tty_struct *tty); |
29 | * | 29 | * |
30 | * This function returns the number of input characters the line | 30 | * This function returns the number of input characters the line |
31 | * discipline may have queued up to be delivered to the user mode | 31 | * discipline may have queued up to be delivered to the user mode |
32 | * process. | 32 | * process. |
33 | * | 33 | * |
34 | * ssize_t (*read)(struct tty_struct * tty, struct file * file, | 34 | * ssize_t (*read)(struct tty_struct * tty, struct file * file, |
35 | * unsigned char * buf, size_t nr); | 35 | * unsigned char * buf, size_t nr); |
36 | * | 36 | * |
37 | * This function is called when the user requests to read from | 37 | * This function is called when the user requests to read from |
38 | * the tty. The line discipline will return whatever characters | 38 | * the tty. The line discipline will return whatever characters |
39 | * it has buffered up for the user. If this function is not | 39 | * it has buffered up for the user. If this function is not |
40 | * defined, the user will receive an EIO error. | 40 | * defined, the user will receive an EIO error. |
41 | * | 41 | * |
42 | * ssize_t (*write)(struct tty_struct * tty, struct file * file, | 42 | * ssize_t (*write)(struct tty_struct * tty, struct file * file, |
43 | * const unsigned char * buf, size_t nr); | 43 | * const unsigned char * buf, size_t nr); |
44 | * | 44 | * |
45 | * This function is called when the user requests to write to the | 45 | * This function is called when the user requests to write to the |
46 | * tty. The line discipline will deliver the characters to the | 46 | * tty. The line discipline will deliver the characters to the |
47 | * low-level tty device for transmission, optionally performing | 47 | * low-level tty device for transmission, optionally performing |
48 | * some processing on the characters first. If this function is | 48 | * some processing on the characters first. If this function is |
49 | * not defined, the user will receive an EIO error. | 49 | * not defined, the user will receive an EIO error. |
50 | * | 50 | * |
51 | * int (*ioctl)(struct tty_struct * tty, struct file * file, | 51 | * int (*ioctl)(struct tty_struct * tty, struct file * file, |
52 | * unsigned int cmd, unsigned long arg); | 52 | * unsigned int cmd, unsigned long arg); |
53 | * | 53 | * |
54 | * This function is called when the user requests an ioctl which | 54 | * This function is called when the user requests an ioctl which |
55 | * is not handled by the tty layer or the low-level tty driver. | 55 | * is not handled by the tty layer or the low-level tty driver. |
56 | * It is intended for ioctls which affect line discpline | 56 | * It is intended for ioctls which affect line discpline |
57 | * operation. Note that the search order for ioctls is (1) tty | 57 | * operation. Note that the search order for ioctls is (1) tty |
58 | * layer, (2) tty low-level driver, (3) line discpline. So a | 58 | * layer, (2) tty low-level driver, (3) line discpline. So a |
59 | * low-level driver can "grab" an ioctl request before the line | 59 | * low-level driver can "grab" an ioctl request before the line |
60 | * discpline has a chance to see it. | 60 | * discpline has a chance to see it. |
61 | * | 61 | * |
62 | * long (*compat_ioctl)(struct tty_struct * tty, struct file * file, | 62 | * long (*compat_ioctl)(struct tty_struct * tty, struct file * file, |
63 | * unsigned int cmd, unsigned long arg); | 63 | * unsigned int cmd, unsigned long arg); |
64 | * | 64 | * |
65 | * Process ioctl calls from 32-bit process on 64-bit system | 65 | * Process ioctl calls from 32-bit process on 64-bit system |
66 | * | 66 | * |
67 | * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); | 67 | * void (*set_termios)(struct tty_struct *tty, struct ktermios * old); |
68 | * | 68 | * |
69 | * This function notifies the line discpline that a change has | 69 | * This function notifies the line discpline that a change has |
70 | * been made to the termios structure. | 70 | * been made to the termios structure. |
71 | * | 71 | * |
72 | * int (*poll)(struct tty_struct * tty, struct file * file, | 72 | * int (*poll)(struct tty_struct * tty, struct file * file, |
73 | * poll_table *wait); | 73 | * poll_table *wait); |
74 | * | 74 | * |
75 | * This function is called when a user attempts to select/poll on a | 75 | * This function is called when a user attempts to select/poll on a |
76 | * tty device. It is solely the responsibility of the line | 76 | * tty device. It is solely the responsibility of the line |
77 | * discipline to handle poll requests. | 77 | * discipline to handle poll requests. |
78 | * | 78 | * |
79 | * void (*receive_buf)(struct tty_struct *, const unsigned char *cp, | 79 | * void (*receive_buf)(struct tty_struct *, const unsigned char *cp, |
80 | * char *fp, int count); | 80 | * char *fp, int count); |
81 | * | 81 | * |
82 | * This function is called by the low-level tty driver to send | 82 | * This function is called by the low-level tty driver to send |
83 | * characters received by the hardware to the line discpline for | 83 | * characters received by the hardware to the line discpline for |
84 | * processing. <cp> is a pointer to the buffer of input | 84 | * processing. <cp> is a pointer to the buffer of input |
85 | * character received by the device. <fp> is a pointer to a | 85 | * character received by the device. <fp> is a pointer to a |
86 | * pointer of flag bytes which indicate whether a character was | 86 | * pointer of flag bytes which indicate whether a character was |
87 | * received with a parity error, etc. | 87 | * received with a parity error, etc. |
88 | * | 88 | * |
89 | * void (*write_wakeup)(struct tty_struct *); | 89 | * void (*write_wakeup)(struct tty_struct *); |
90 | * | 90 | * |
91 | * This function is called by the low-level tty driver to signal | 91 | * This function is called by the low-level tty driver to signal |
92 | * that line discpline should try to send more characters to the | 92 | * that line discpline should try to send more characters to the |
93 | * low-level driver for transmission. If the line discpline does | 93 | * low-level driver for transmission. If the line discpline does |
94 | * not have any more data to send, it can just return. | 94 | * not have any more data to send, it can just return. |
95 | * | 95 | * |
96 | * int (*hangup)(struct tty_struct *) | 96 | * int (*hangup)(struct tty_struct *) |
97 | * | 97 | * |
@@ -115,7 +115,7 @@ struct tty_ldisc_ops { | |||
115 | char *name; | 115 | char *name; |
116 | int num; | 116 | int num; |
117 | int flags; | 117 | int flags; |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * The following routines are called from above. | 120 | * The following routines are called from above. |
121 | */ | 121 | */ |
@@ -123,19 +123,19 @@ struct tty_ldisc_ops { | |||
123 | void (*close)(struct tty_struct *); | 123 | void (*close)(struct tty_struct *); |
124 | void (*flush_buffer)(struct tty_struct *tty); | 124 | void (*flush_buffer)(struct tty_struct *tty); |
125 | ssize_t (*chars_in_buffer)(struct tty_struct *tty); | 125 | ssize_t (*chars_in_buffer)(struct tty_struct *tty); |
126 | ssize_t (*read)(struct tty_struct * tty, struct file * file, | 126 | ssize_t (*read)(struct tty_struct *tty, struct file *file, |
127 | unsigned char __user * buf, size_t nr); | 127 | unsigned char __user *buf, size_t nr); |
128 | ssize_t (*write)(struct tty_struct * tty, struct file * file, | 128 | ssize_t (*write)(struct tty_struct *tty, struct file *file, |
129 | const unsigned char * buf, size_t nr); | 129 | const unsigned char *buf, size_t nr); |
130 | int (*ioctl)(struct tty_struct * tty, struct file * file, | 130 | int (*ioctl)(struct tty_struct *tty, struct file *file, |
131 | unsigned int cmd, unsigned long arg); | 131 | unsigned int cmd, unsigned long arg); |
132 | long (*compat_ioctl)(struct tty_struct * tty, struct file * file, | 132 | long (*compat_ioctl)(struct tty_struct *tty, struct file *file, |
133 | unsigned int cmd, unsigned long arg); | 133 | unsigned int cmd, unsigned long arg); |
134 | void (*set_termios)(struct tty_struct *tty, struct ktermios * old); | 134 | void (*set_termios)(struct tty_struct *tty, struct ktermios *old); |
135 | unsigned int (*poll)(struct tty_struct *, struct file *, | 135 | unsigned int (*poll)(struct tty_struct *, struct file *, |
136 | struct poll_table_struct *); | 136 | struct poll_table_struct *); |
137 | int (*hangup)(struct tty_struct *tty); | 137 | int (*hangup)(struct tty_struct *tty); |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * The following routines are called from below. | 140 | * The following routines are called from below. |
141 | */ | 141 | */ |
@@ -145,7 +145,7 @@ struct tty_ldisc_ops { | |||
145 | void (*dcd_change)(struct tty_struct *, unsigned int); | 145 | void (*dcd_change)(struct tty_struct *, unsigned int); |
146 | 146 | ||
147 | struct module *owner; | 147 | struct module *owner; |
148 | 148 | ||
149 | int refcount; | 149 | int refcount; |
150 | }; | 150 | }; |
151 | 151 | ||
diff --git a/include/linux/ucs2_string.h b/include/linux/ucs2_string.h new file mode 100644 index 000000000000..cbb20afdbc01 --- /dev/null +++ b/include/linux/ucs2_string.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _LINUX_UCS2_STRING_H_ | ||
2 | #define _LINUX_UCS2_STRING_H_ | ||
3 | |||
4 | #include <linux/types.h> /* for size_t */ | ||
5 | #include <linux/stddef.h> /* for NULL */ | ||
6 | |||
7 | typedef u16 ucs2_char_t; | ||
8 | |||
9 | unsigned long ucs2_strnlen(const ucs2_char_t *s, size_t maxlength); | ||
10 | unsigned long ucs2_strlen(const ucs2_char_t *s); | ||
11 | unsigned long ucs2_strsize(const ucs2_char_t *data, unsigned long maxlength); | ||
12 | int ucs2_strncmp(const ucs2_char_t *a, const ucs2_char_t *b, size_t len); | ||
13 | |||
14 | #endif /* _LINUX_UCS2_STRING_H_ */ | ||
diff --git a/include/linux/udp.h b/include/linux/udp.h index 9d81de123c90..42278bbf7a88 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h | |||
@@ -68,6 +68,7 @@ struct udp_sock { | |||
68 | * For encapsulation sockets. | 68 | * For encapsulation sockets. |
69 | */ | 69 | */ |
70 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); | 70 | int (*encap_rcv)(struct sock *sk, struct sk_buff *skb); |
71 | void (*encap_destroy)(struct sock *sk); | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | static inline struct udp_sock *udp_sk(const struct sock *sk) | 74 | static inline struct udp_sock *udp_sk(const struct sock *sk) |
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 02b83db8e2c5..06f28beed7c2 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
@@ -38,6 +38,8 @@ struct inode; | |||
38 | #define UPROBE_HANDLER_REMOVE 1 | 38 | #define UPROBE_HANDLER_REMOVE 1 |
39 | #define UPROBE_HANDLER_MASK 1 | 39 | #define UPROBE_HANDLER_MASK 1 |
40 | 40 | ||
41 | #define MAX_URETPROBE_DEPTH 64 | ||
42 | |||
41 | enum uprobe_filter_ctx { | 43 | enum uprobe_filter_ctx { |
42 | UPROBE_FILTER_REGISTER, | 44 | UPROBE_FILTER_REGISTER, |
43 | UPROBE_FILTER_UNREGISTER, | 45 | UPROBE_FILTER_UNREGISTER, |
@@ -46,6 +48,9 @@ enum uprobe_filter_ctx { | |||
46 | 48 | ||
47 | struct uprobe_consumer { | 49 | struct uprobe_consumer { |
48 | int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); | 50 | int (*handler)(struct uprobe_consumer *self, struct pt_regs *regs); |
51 | int (*ret_handler)(struct uprobe_consumer *self, | ||
52 | unsigned long func, | ||
53 | struct pt_regs *regs); | ||
49 | bool (*filter)(struct uprobe_consumer *self, | 54 | bool (*filter)(struct uprobe_consumer *self, |
50 | enum uprobe_filter_ctx ctx, | 55 | enum uprobe_filter_ctx ctx, |
51 | struct mm_struct *mm); | 56 | struct mm_struct *mm); |
@@ -68,6 +73,8 @@ struct uprobe_task { | |||
68 | enum uprobe_task_state state; | 73 | enum uprobe_task_state state; |
69 | struct arch_uprobe_task autask; | 74 | struct arch_uprobe_task autask; |
70 | 75 | ||
76 | struct return_instance *return_instances; | ||
77 | unsigned int depth; | ||
71 | struct uprobe *active_uprobe; | 78 | struct uprobe *active_uprobe; |
72 | 79 | ||
73 | unsigned long xol_vaddr; | 80 | unsigned long xol_vaddr; |
@@ -100,6 +107,7 @@ struct uprobes_state { | |||
100 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 107 | extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
101 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); | 108 | extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr); |
102 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); | 109 | extern bool __weak is_swbp_insn(uprobe_opcode_t *insn); |
110 | extern bool __weak is_trap_insn(uprobe_opcode_t *insn); | ||
103 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 111 | extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
104 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); | 112 | extern int uprobe_apply(struct inode *inode, loff_t offset, struct uprobe_consumer *uc, bool); |
105 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); | 113 | extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 4d22d0f6167a..a0bee5a28d1a 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -469,14 +469,12 @@ struct usb3_lpm_parameters { | |||
469 | * @lpm_capable: device supports LPM | 469 | * @lpm_capable: device supports LPM |
470 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM | 470 | * @usb2_hw_lpm_capable: device can perform USB2 hardware LPM |
471 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled | 471 | * @usb2_hw_lpm_enabled: USB2 hardware LPM enabled |
472 | * @usb3_lpm_enabled: USB3 hardware LPM enabled | ||
472 | * @string_langid: language ID for strings | 473 | * @string_langid: language ID for strings |
473 | * @product: iProduct string, if present (static) | 474 | * @product: iProduct string, if present (static) |
474 | * @manufacturer: iManufacturer string, if present (static) | 475 | * @manufacturer: iManufacturer string, if present (static) |
475 | * @serial: iSerialNumber string, if present (static) | 476 | * @serial: iSerialNumber string, if present (static) |
476 | * @filelist: usbfs files that are open to this device | 477 | * @filelist: usbfs files that are open to this device |
477 | * @usb_classdev: USB class device that was created for usbfs device | ||
478 | * access from userspace | ||
479 | * @usbfs_dentry: usbfs dentry entry for the device | ||
480 | * @maxchild: number of ports if hub | 478 | * @maxchild: number of ports if hub |
481 | * @quirks: quirks of the whole device | 479 | * @quirks: quirks of the whole device |
482 | * @urbnum: number of URBs submitted for the whole device | 480 | * @urbnum: number of URBs submitted for the whole device |
@@ -619,7 +617,7 @@ static inline bool usb_acpi_power_manageable(struct usb_device *hdev, int index) | |||
619 | #endif | 617 | #endif |
620 | 618 | ||
621 | /* USB autosuspend and autoresume */ | 619 | /* USB autosuspend and autoresume */ |
622 | #ifdef CONFIG_USB_SUSPEND | 620 | #ifdef CONFIG_PM_RUNTIME |
623 | extern void usb_enable_autosuspend(struct usb_device *udev); | 621 | extern void usb_enable_autosuspend(struct usb_device *udev); |
624 | extern void usb_disable_autosuspend(struct usb_device *udev); | 622 | extern void usb_disable_autosuspend(struct usb_device *udev); |
625 | 623 | ||
@@ -978,7 +976,12 @@ struct usbdrv_wrap { | |||
978 | * the "usbfs" filesystem. This lets devices provide ways to | 976 | * the "usbfs" filesystem. This lets devices provide ways to |
979 | * expose information to user space regardless of where they | 977 | * expose information to user space regardless of where they |
980 | * do (or don't) show up otherwise in the filesystem. | 978 | * do (or don't) show up otherwise in the filesystem. |
981 | * @suspend: Called when the device is going to be suspended by the system. | 979 | * @suspend: Called when the device is going to be suspended by the |
980 | * system either from system sleep or runtime suspend context. The | ||
981 | * return value will be ignored in system sleep context, so do NOT | ||
982 | * try to continue using the device if suspend fails in this case. | ||
983 | * Instead, let the resume or reset-resume routine recover from | ||
984 | * the failure. | ||
982 | * @resume: Called when the device is being resumed by the system. | 985 | * @resume: Called when the device is being resumed by the system. |
983 | * @reset_resume: Called when the suspended device has been reset instead | 986 | * @reset_resume: Called when the suspended device has been reset instead |
984 | * of being resumed. | 987 | * of being resumed. |
diff --git a/include/linux/usb/cdc-wdm.h b/include/linux/usb/cdc-wdm.h index 719c332620fa..0b3f4295c025 100644 --- a/include/linux/usb/cdc-wdm.h +++ b/include/linux/usb/cdc-wdm.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __LINUX_USB_CDC_WDM_H | 11 | #ifndef __LINUX_USB_CDC_WDM_H |
12 | #define __LINUX_USB_CDC_WDM_H | 12 | #define __LINUX_USB_CDC_WDM_H |
13 | 13 | ||
14 | #include <uapi/linux/usb/cdc-wdm.h> | ||
15 | |||
14 | extern struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, | 16 | extern struct usb_driver *usb_cdc_wdm_register(struct usb_interface *intf, |
15 | struct usb_endpoint_descriptor *ep, | 17 | struct usb_endpoint_descriptor *ep, |
16 | int bufsize, | 18 | int bufsize, |
diff --git a/include/linux/usb/cdc_ncm.h b/include/linux/usb/cdc_ncm.h index 3b8f9d4fc3fe..cc25b70af33c 100644 --- a/include/linux/usb/cdc_ncm.h +++ b/include/linux/usb/cdc_ncm.h | |||
@@ -127,6 +127,7 @@ struct cdc_ncm_ctx { | |||
127 | u16 connected; | 127 | u16 connected; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | extern u8 cdc_ncm_select_altsetting(struct usbnet *dev, struct usb_interface *intf); | ||
130 | extern int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); | 131 | extern int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); |
131 | extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); | 132 | extern void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf); |
132 | extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign); | 133 | extern struct sk_buff *cdc_ncm_fill_tx_frame(struct cdc_ncm_ctx *ctx, struct sk_buff *skb, __le32 sign); |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index 9c210f2283df..27603bcbb9b9 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -43,4 +43,13 @@ | |||
43 | */ | 43 | */ |
44 | extern const char *usb_speed_string(enum usb_device_speed speed); | 44 | extern const char *usb_speed_string(enum usb_device_speed speed); |
45 | 45 | ||
46 | |||
47 | /** | ||
48 | * usb_state_string - Returns human readable name for the state. | ||
49 | * @state: The state to return a human-readable name for. If it's not | ||
50 | * any of the states devices in usb_device_state_string enum, | ||
51 | * the string UNKNOWN will be returned. | ||
52 | */ | ||
53 | extern const char *usb_state_string(enum usb_device_state state); | ||
54 | |||
46 | #endif /* __LINUX_USB_CH9_H */ | 55 | #endif /* __LINUX_USB_CH9_H */ |
diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 3c671c1b37f6..5e61589fc166 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/usb/ch9.h> | 39 | #include <linux/usb/ch9.h> |
40 | #include <linux/usb/gadget.h> | 40 | #include <linux/usb/gadget.h> |
41 | #include <linux/log2.h> | 41 | #include <linux/log2.h> |
42 | #include <linux/configfs.h> | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they | 45 | * USB function drivers should return USB_GADGET_DELAYED_STATUS if they |
@@ -60,7 +61,7 @@ struct usb_configuration; | |||
60 | * @name: For diagnostics, identifies the function. | 61 | * @name: For diagnostics, identifies the function. |
61 | * @strings: tables of strings, keyed by identifiers assigned during bind() | 62 | * @strings: tables of strings, keyed by identifiers assigned during bind() |
62 | * and by language IDs provided in control requests | 63 | * and by language IDs provided in control requests |
63 | * @descriptors: Table of full (or low) speed descriptors, using interface and | 64 | * @fs_descriptors: Table of full (or low) speed descriptors, using interface and |
64 | * string identifiers assigned during @bind(). If this pointer is null, | 65 | * string identifiers assigned during @bind(). If this pointer is null, |
65 | * the function will not be available at full speed (or at low speed). | 66 | * the function will not be available at full speed (or at low speed). |
66 | * @hs_descriptors: Table of high speed descriptors, using interface and | 67 | * @hs_descriptors: Table of high speed descriptors, using interface and |
@@ -290,6 +291,7 @@ enum { | |||
290 | * after function notifications | 291 | * after function notifications |
291 | * @resume: Notifies configuration when the host restarts USB traffic, | 292 | * @resume: Notifies configuration when the host restarts USB traffic, |
292 | * before function notifications | 293 | * before function notifications |
294 | * @gadget_driver: Gadget driver controlling this driver | ||
293 | * | 295 | * |
294 | * Devices default to reporting self powered operation. Devices which rely | 296 | * Devices default to reporting self powered operation. Devices which rely |
295 | * on bus powered operation should report this in their @bind method. | 297 | * on bus powered operation should report this in their @bind method. |
@@ -463,6 +465,8 @@ struct usb_function_driver { | |||
463 | }; | 465 | }; |
464 | 466 | ||
465 | struct usb_function_instance { | 467 | struct usb_function_instance { |
468 | struct config_group group; | ||
469 | struct list_head cfs_list; | ||
466 | struct usb_function_driver *fd; | 470 | struct usb_function_driver *fd; |
467 | void (*free_func_inst)(struct usb_function_instance *inst); | 471 | void (*free_func_inst)(struct usb_function_instance *inst); |
468 | }; | 472 | }; |
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h index 51eae14477f7..5615f4d82724 100644 --- a/include/linux/usb/dwc3-omap.h +++ b/include/linux/usb/dwc3-omap.h | |||
@@ -19,11 +19,11 @@ enum omap_dwc3_vbus_id_status { | |||
19 | }; | 19 | }; |
20 | 20 | ||
21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) | 21 | #if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE)) |
22 | extern void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); | 22 | extern int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status); |
23 | #else | 23 | #else |
24 | static inline void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) | 24 | static inline int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status) |
25 | { | 25 | { |
26 | return; | 26 | return -ENODEV; |
27 | } | 27 | } |
28 | #endif | 28 | #endif |
29 | 29 | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 2e297e80d59a..c454a88abf2e 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -482,6 +482,7 @@ struct usb_gadget_ops { | |||
482 | * @speed: Speed of current connection to USB host. | 482 | * @speed: Speed of current connection to USB host. |
483 | * @max_speed: Maximal speed the UDC can handle. UDC must support this | 483 | * @max_speed: Maximal speed the UDC can handle. UDC must support this |
484 | * and all slower speeds. | 484 | * and all slower speeds. |
485 | * @state: the state we are now (attached, suspended, configured, etc) | ||
485 | * @sg_supported: true if we can handle scatter-gather | 486 | * @sg_supported: true if we can handle scatter-gather |
486 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the | 487 | * @is_otg: True if the USB device port uses a Mini-AB jack, so that the |
487 | * gadget driver must provide a USB OTG descriptor. | 488 | * gadget driver must provide a USB OTG descriptor. |
@@ -525,6 +526,7 @@ struct usb_gadget { | |||
525 | struct list_head ep_list; /* of usb_ep */ | 526 | struct list_head ep_list; /* of usb_ep */ |
526 | enum usb_device_speed speed; | 527 | enum usb_device_speed speed; |
527 | enum usb_device_speed max_speed; | 528 | enum usb_device_speed max_speed; |
529 | enum usb_device_state state; | ||
528 | unsigned sg_supported:1; | 530 | unsigned sg_supported:1; |
529 | unsigned is_otg:1; | 531 | unsigned is_otg:1; |
530 | unsigned is_a_peripheral:1; | 532 | unsigned is_a_peripheral:1; |
@@ -872,6 +874,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver); | |||
872 | */ | 874 | */ |
873 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); | 875 | int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); |
874 | 876 | ||
877 | extern int usb_add_gadget_udc_release(struct device *parent, | ||
878 | struct usb_gadget *gadget, void (*release)(struct device *dev)); | ||
875 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); | 879 | extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget); |
876 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); | 880 | extern void usb_del_gadget_udc(struct usb_gadget *gadget); |
877 | extern int udc_attach_driver(const char *name, | 881 | extern int udc_attach_driver(const char *name, |
@@ -959,6 +963,13 @@ extern void usb_gadget_unmap_request(struct usb_gadget *gadget, | |||
959 | 963 | ||
960 | /*-------------------------------------------------------------------------*/ | 964 | /*-------------------------------------------------------------------------*/ |
961 | 965 | ||
966 | /* utility to set gadget state properly */ | ||
967 | |||
968 | extern void usb_gadget_set_state(struct usb_gadget *gadget, | ||
969 | enum usb_device_state state); | ||
970 | |||
971 | /*-------------------------------------------------------------------------*/ | ||
972 | |||
962 | /* utility wrapping a simple endpoint selection policy */ | 973 | /* utility wrapping a simple endpoint selection policy */ |
963 | 974 | ||
964 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | 975 | extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, |
diff --git a/include/linux/usb/gadget_configfs.h b/include/linux/usb/gadget_configfs.h new file mode 100644 index 000000000000..d74c0ae989d5 --- /dev/null +++ b/include/linux/usb/gadget_configfs.h | |||
@@ -0,0 +1,110 @@ | |||
1 | #ifndef __GADGET_CONFIGFS__ | ||
2 | #define __GADGET_CONFIGFS__ | ||
3 | |||
4 | #include <linux/configfs.h> | ||
5 | |||
6 | int check_user_usb_string(const char *name, | ||
7 | struct usb_gadget_strings *stringtab_dev); | ||
8 | |||
9 | #define GS_STRINGS_W(__struct, __name) \ | ||
10 | static ssize_t __struct##_##__name##_store(struct __struct *gs, \ | ||
11 | const char *page, size_t len) \ | ||
12 | { \ | ||
13 | int ret; \ | ||
14 | \ | ||
15 | ret = usb_string_copy(page, &gs->__name); \ | ||
16 | if (ret) \ | ||
17 | return ret; \ | ||
18 | return len; \ | ||
19 | } | ||
20 | |||
21 | #define GS_STRINGS_R(__struct, __name) \ | ||
22 | static ssize_t __struct##_##__name##_show(struct __struct *gs, \ | ||
23 | char *page) \ | ||
24 | { \ | ||
25 | return sprintf(page, "%s\n", gs->__name ?: ""); \ | ||
26 | } | ||
27 | |||
28 | #define GS_STRING_ITEM_ATTR(struct_name, name) \ | ||
29 | static struct struct_name##_attribute struct_name##_##name = \ | ||
30 | __CONFIGFS_ATTR(name, S_IRUGO | S_IWUSR, \ | ||
31 | struct_name##_##name##_show, \ | ||
32 | struct_name##_##name##_store) | ||
33 | |||
34 | #define GS_STRINGS_RW(struct_name, _name) \ | ||
35 | GS_STRINGS_R(struct_name, _name) \ | ||
36 | GS_STRINGS_W(struct_name, _name) \ | ||
37 | GS_STRING_ITEM_ATTR(struct_name, _name) | ||
38 | |||
39 | #define USB_CONFIG_STRING_RW_OPS(struct_in) \ | ||
40 | CONFIGFS_ATTR_OPS(struct_in); \ | ||
41 | \ | ||
42 | static struct configfs_item_operations struct_in##_langid_item_ops = { \ | ||
43 | .release = struct_in##_attr_release, \ | ||
44 | .show_attribute = struct_in##_attr_show, \ | ||
45 | .store_attribute = struct_in##_attr_store, \ | ||
46 | }; \ | ||
47 | \ | ||
48 | static struct config_item_type struct_in##_langid_type = { \ | ||
49 | .ct_item_ops = &struct_in##_langid_item_ops, \ | ||
50 | .ct_attrs = struct_in##_langid_attrs, \ | ||
51 | .ct_owner = THIS_MODULE, \ | ||
52 | } | ||
53 | |||
54 | #define USB_CONFIG_STRINGS_LANG(struct_in, struct_member) \ | ||
55 | static struct config_group *struct_in##_strings_make( \ | ||
56 | struct config_group *group, \ | ||
57 | const char *name) \ | ||
58 | { \ | ||
59 | struct struct_member *gi; \ | ||
60 | struct struct_in *gs; \ | ||
61 | struct struct_in *new; \ | ||
62 | int langs = 0; \ | ||
63 | int ret; \ | ||
64 | \ | ||
65 | new = kzalloc(sizeof(*new), GFP_KERNEL); \ | ||
66 | if (!new) \ | ||
67 | return ERR_PTR(-ENOMEM); \ | ||
68 | \ | ||
69 | ret = check_user_usb_string(name, &new->stringtab_dev); \ | ||
70 | if (ret) \ | ||
71 | goto err; \ | ||
72 | config_group_init_type_name(&new->group, name, \ | ||
73 | &struct_in##_langid_type); \ | ||
74 | \ | ||
75 | gi = container_of(group, struct struct_member, strings_group); \ | ||
76 | ret = -EEXIST; \ | ||
77 | list_for_each_entry(gs, &gi->string_list, list) { \ | ||
78 | if (gs->stringtab_dev.language == new->stringtab_dev.language) \ | ||
79 | goto err; \ | ||
80 | langs++; \ | ||
81 | } \ | ||
82 | ret = -EOVERFLOW; \ | ||
83 | if (langs >= MAX_USB_STRING_LANGS) \ | ||
84 | goto err; \ | ||
85 | \ | ||
86 | list_add_tail(&new->list, &gi->string_list); \ | ||
87 | return &new->group; \ | ||
88 | err: \ | ||
89 | kfree(new); \ | ||
90 | return ERR_PTR(ret); \ | ||
91 | } \ | ||
92 | \ | ||
93 | static void struct_in##_strings_drop( \ | ||
94 | struct config_group *group, \ | ||
95 | struct config_item *item) \ | ||
96 | { \ | ||
97 | config_item_put(item); \ | ||
98 | } \ | ||
99 | \ | ||
100 | static struct configfs_group_operations struct_in##_strings_ops = { \ | ||
101 | .make_group = &struct_in##_strings_make, \ | ||
102 | .drop_item = &struct_in##_strings_drop, \ | ||
103 | }; \ | ||
104 | \ | ||
105 | static struct config_item_type struct_in##_strings_type = { \ | ||
106 | .ct_group_ops = &struct_in##_strings_ops, \ | ||
107 | .ct_owner = THIS_MODULE, \ | ||
108 | } | ||
109 | |||
110 | #endif | ||
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 0a78df5f6cfd..f5f5c7dfda90 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -84,7 +84,7 @@ struct usb_hcd { | |||
84 | 84 | ||
85 | struct timer_list rh_timer; /* drives root-hub polling */ | 85 | struct timer_list rh_timer; /* drives root-hub polling */ |
86 | struct urb *status_urb; /* the current status urb */ | 86 | struct urb *status_urb; /* the current status urb */ |
87 | #ifdef CONFIG_USB_SUSPEND | 87 | #ifdef CONFIG_PM_RUNTIME |
88 | struct work_struct wakeup_work; /* for remote wakeup */ | 88 | struct work_struct wakeup_work; /* for remote wakeup */ |
89 | #endif | 89 | #endif |
90 | 90 | ||
@@ -357,6 +357,7 @@ struct hc_driver { | |||
357 | */ | 357 | */ |
358 | int (*disable_usb3_lpm_timeout)(struct usb_hcd *, | 358 | int (*disable_usb3_lpm_timeout)(struct usb_hcd *, |
359 | struct usb_device *, enum usb3_link_state state); | 359 | struct usb_device *, enum usb3_link_state state); |
360 | int (*find_raw_port_number)(struct usb_hcd *, int); | ||
360 | }; | 361 | }; |
361 | 362 | ||
362 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); | 363 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
@@ -396,6 +397,7 @@ extern int usb_hcd_is_primary_hcd(struct usb_hcd *hcd); | |||
396 | extern int usb_add_hcd(struct usb_hcd *hcd, | 397 | extern int usb_add_hcd(struct usb_hcd *hcd, |
397 | unsigned int irqnum, unsigned long irqflags); | 398 | unsigned int irqnum, unsigned long irqflags); |
398 | extern void usb_remove_hcd(struct usb_hcd *hcd); | 399 | extern void usb_remove_hcd(struct usb_hcd *hcd); |
400 | extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1); | ||
399 | 401 | ||
400 | struct platform_device; | 402 | struct platform_device; |
401 | extern void usb_hcd_platform_shutdown(struct platform_device *dev); | 403 | extern void usb_hcd_platform_shutdown(struct platform_device *dev); |
@@ -591,14 +593,14 @@ extern int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg); | |||
591 | extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg); | 593 | extern int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg); |
592 | #endif /* CONFIG_PM */ | 594 | #endif /* CONFIG_PM */ |
593 | 595 | ||
594 | #ifdef CONFIG_USB_SUSPEND | 596 | #ifdef CONFIG_PM_RUNTIME |
595 | extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd); | 597 | extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd); |
596 | #else | 598 | #else |
597 | static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) | 599 | static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) |
598 | { | 600 | { |
599 | return; | 601 | return; |
600 | } | 602 | } |
601 | #endif /* CONFIG_USB_SUSPEND */ | 603 | #endif /* CONFIG_PM_RUNTIME */ |
602 | 604 | ||
603 | /*-------------------------------------------------------------------------*/ | 605 | /*-------------------------------------------------------------------------*/ |
604 | 606 | ||
diff --git a/include/linux/usb/musb-ux500.h b/include/linux/usb/musb-ux500.h new file mode 100644 index 000000000000..1e2c7130f6e1 --- /dev/null +++ b/include/linux/usb/musb-ux500.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 ST-Ericsson AB | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | */ | ||
14 | |||
15 | #ifndef __MUSB_UX500_H__ | ||
16 | #define __MUSB_UX500_H__ | ||
17 | |||
18 | enum ux500_musb_vbus_id_status { | ||
19 | UX500_MUSB_NONE = 0, | ||
20 | UX500_MUSB_VBUS, | ||
21 | UX500_MUSB_ID, | ||
22 | UX500_MUSB_CHARGER, | ||
23 | UX500_MUSB_ENUMERATED, | ||
24 | UX500_MUSB_RIDA, | ||
25 | UX500_MUSB_RIDB, | ||
26 | UX500_MUSB_RIDC, | ||
27 | UX500_MUSB_PREPARE, | ||
28 | UX500_MUSB_CLEAN, | ||
29 | }; | ||
30 | |||
31 | #endif /* __MUSB_UX500_H__ */ | ||
diff --git a/include/linux/usb/nop-usb-xceiv.h b/include/linux/usb/nop-usb-xceiv.h index 28884c717411..148d35171aac 100644 --- a/include/linux/usb/nop-usb-xceiv.h +++ b/include/linux/usb/nop-usb-xceiv.h | |||
@@ -5,6 +5,11 @@ | |||
5 | 5 | ||
6 | struct nop_usb_xceiv_platform_data { | 6 | struct nop_usb_xceiv_platform_data { |
7 | enum usb_phy_type type; | 7 | enum usb_phy_type type; |
8 | unsigned long clk_rate; | ||
9 | |||
10 | /* if set fails with -EPROBE_DEFER if can't get regulator */ | ||
11 | unsigned int needs_vcc:1; | ||
12 | unsigned int needs_reset:1; | ||
8 | }; | 13 | }; |
9 | 14 | ||
10 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) | 15 | #if defined(CONFIG_NOP_USB_XCEIV) || (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE)) |
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index e8a5fe87c6bd..291e01ba32e5 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -36,14 +36,7 @@ struct usb_otg { | |||
36 | 36 | ||
37 | }; | 37 | }; |
38 | 38 | ||
39 | #ifdef CONFIG_USB_OTG_UTILS | 39 | extern const char *usb_otg_state_string(enum usb_otg_state state); |
40 | extern const char *otg_state_string(enum usb_otg_state state); | ||
41 | #else | ||
42 | static inline const char *otg_state_string(enum usb_otg_state state) | ||
43 | { | ||
44 | return NULL; | ||
45 | } | ||
46 | #endif | ||
47 | 40 | ||
48 | /* Context: can sleep */ | 41 | /* Context: can sleep */ |
49 | static inline int | 42 | static inline int |
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 15847cbdb512..6b5978f57633 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h | |||
@@ -91,6 +91,9 @@ struct usb_phy { | |||
91 | int (*init)(struct usb_phy *x); | 91 | int (*init)(struct usb_phy *x); |
92 | void (*shutdown)(struct usb_phy *x); | 92 | void (*shutdown)(struct usb_phy *x); |
93 | 93 | ||
94 | /* enable/disable VBUS */ | ||
95 | int (*set_vbus)(struct usb_phy *x, int on); | ||
96 | |||
94 | /* effective for B devices, ignored for A-peripheral */ | 97 | /* effective for B devices, ignored for A-peripheral */ |
95 | int (*set_power)(struct usb_phy *x, | 98 | int (*set_power)(struct usb_phy *x, |
96 | unsigned mA); | 99 | unsigned mA); |
@@ -160,8 +163,26 @@ usb_phy_shutdown(struct usb_phy *x) | |||
160 | x->shutdown(x); | 163 | x->shutdown(x); |
161 | } | 164 | } |
162 | 165 | ||
166 | static inline int | ||
167 | usb_phy_vbus_on(struct usb_phy *x) | ||
168 | { | ||
169 | if (!x->set_vbus) | ||
170 | return 0; | ||
171 | |||
172 | return x->set_vbus(x, true); | ||
173 | } | ||
174 | |||
175 | static inline int | ||
176 | usb_phy_vbus_off(struct usb_phy *x) | ||
177 | { | ||
178 | if (!x->set_vbus) | ||
179 | return 0; | ||
180 | |||
181 | return x->set_vbus(x, false); | ||
182 | } | ||
183 | |||
163 | /* for usb host and peripheral controller drivers */ | 184 | /* for usb host and peripheral controller drivers */ |
164 | #ifdef CONFIG_USB_OTG_UTILS | 185 | #if IS_ENABLED(CONFIG_USB_PHY) |
165 | extern struct usb_phy *usb_get_phy(enum usb_phy_type type); | 186 | extern struct usb_phy *usb_get_phy(enum usb_phy_type type); |
166 | extern struct usb_phy *devm_usb_get_phy(struct device *dev, | 187 | extern struct usb_phy *devm_usb_get_phy(struct device *dev, |
167 | enum usb_phy_type type); | 188 | enum usb_phy_type type); |
@@ -176,29 +197,29 @@ extern int usb_bind_phy(const char *dev_name, u8 index, | |||
176 | #else | 197 | #else |
177 | static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) | 198 | static inline struct usb_phy *usb_get_phy(enum usb_phy_type type) |
178 | { | 199 | { |
179 | return NULL; | 200 | return ERR_PTR(-ENXIO); |
180 | } | 201 | } |
181 | 202 | ||
182 | static inline struct usb_phy *devm_usb_get_phy(struct device *dev, | 203 | static inline struct usb_phy *devm_usb_get_phy(struct device *dev, |
183 | enum usb_phy_type type) | 204 | enum usb_phy_type type) |
184 | { | 205 | { |
185 | return NULL; | 206 | return ERR_PTR(-ENXIO); |
186 | } | 207 | } |
187 | 208 | ||
188 | static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) | 209 | static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index) |
189 | { | 210 | { |
190 | return NULL; | 211 | return ERR_PTR(-ENXIO); |
191 | } | 212 | } |
192 | 213 | ||
193 | static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index) | 214 | static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index) |
194 | { | 215 | { |
195 | return NULL; | 216 | return ERR_PTR(-ENXIO); |
196 | } | 217 | } |
197 | 218 | ||
198 | static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, | 219 | static inline struct usb_phy *devm_usb_get_phy_by_phandle(struct device *dev, |
199 | const char *phandle, u8 index) | 220 | const char *phandle, u8 index) |
200 | { | 221 | { |
201 | return NULL; | 222 | return ERR_PTR(-ENXIO); |
202 | } | 223 | } |
203 | 224 | ||
204 | static inline void usb_put_phy(struct usb_phy *x) | 225 | static inline void usb_put_phy(struct usb_phy *x) |
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h index c5d36c65c33b..e452ba6ec6bd 100644 --- a/include/linux/usb/renesas_usbhs.h +++ b/include/linux/usb/renesas_usbhs.h | |||
@@ -62,14 +62,14 @@ struct renesas_usbhs_platform_callback { | |||
62 | * Hardware exit function for platform. | 62 | * Hardware exit function for platform. |
63 | * it is called when driver was removed | 63 | * it is called when driver was removed |
64 | */ | 64 | */ |
65 | void (*hardware_exit)(struct platform_device *pdev); | 65 | int (*hardware_exit)(struct platform_device *pdev); |
66 | 66 | ||
67 | /* | 67 | /* |
68 | * option: | 68 | * option: |
69 | * | 69 | * |
70 | * for board specific clock control | 70 | * for board specific clock control |
71 | */ | 71 | */ |
72 | void (*power_ctrl)(struct platform_device *pdev, | 72 | int (*power_ctrl)(struct platform_device *pdev, |
73 | void __iomem *base, int enable); | 73 | void __iomem *base, int enable); |
74 | 74 | ||
75 | /* | 75 | /* |
@@ -77,7 +77,7 @@ struct renesas_usbhs_platform_callback { | |||
77 | * | 77 | * |
78 | * Phy reset for platform | 78 | * Phy reset for platform |
79 | */ | 79 | */ |
80 | void (*phy_reset)(struct platform_device *pdev); | 80 | int (*phy_reset)(struct platform_device *pdev); |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * get USB ID function | 83 | * get USB ID function |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index ef9be7e1e190..b9b0f7b4e43b 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/kref.h> | 16 | #include <linux/kref.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/serial.h> | ||
18 | #include <linux/sysrq.h> | 19 | #include <linux/sysrq.h> |
19 | #include <linux/kfifo.h> | 20 | #include <linux/kfifo.h> |
20 | 21 | ||
@@ -61,6 +62,7 @@ | |||
61 | * @bulk_out_buffers: pointers to the bulk out buffers for this port | 62 | * @bulk_out_buffers: pointers to the bulk out buffers for this port |
62 | * @write_urbs: pointers to the bulk out urbs for this port | 63 | * @write_urbs: pointers to the bulk out urbs for this port |
63 | * @write_urbs_free: status bitmap the for bulk out urbs | 64 | * @write_urbs_free: status bitmap the for bulk out urbs |
65 | * @icount: interrupt counters | ||
64 | * @tx_bytes: number of bytes currently in host stack queues | 66 | * @tx_bytes: number of bytes currently in host stack queues |
65 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this | 67 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this |
66 | * port. | 68 | * port. |
@@ -108,6 +110,7 @@ struct usb_serial_port { | |||
108 | unsigned long write_urbs_free; | 110 | unsigned long write_urbs_free; |
109 | __u8 bulk_out_endpointAddress; | 111 | __u8 bulk_out_endpointAddress; |
110 | 112 | ||
113 | struct async_icount icount; | ||
111 | int tx_bytes; | 114 | int tx_bytes; |
112 | 115 | ||
113 | unsigned long flags; | 116 | unsigned long flags; |
@@ -270,6 +273,7 @@ struct usb_serial_driver { | |||
270 | int (*tiocmget)(struct tty_struct *tty); | 273 | int (*tiocmget)(struct tty_struct *tty); |
271 | int (*tiocmset)(struct tty_struct *tty, | 274 | int (*tiocmset)(struct tty_struct *tty, |
272 | unsigned int set, unsigned int clear); | 275 | unsigned int set, unsigned int clear); |
276 | int (*tiocmiwait)(struct tty_struct *tty, unsigned long arg); | ||
273 | int (*get_icount)(struct tty_struct *tty, | 277 | int (*get_icount)(struct tty_struct *tty, |
274 | struct serial_icounter_struct *icount); | 278 | struct serial_icounter_struct *icount); |
275 | /* Called by the tty layer for port level work. There may or may not | 279 | /* Called by the tty layer for port level work. There may or may not |
@@ -327,8 +331,10 @@ extern void usb_serial_generic_read_bulk_callback(struct urb *urb); | |||
327 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); | 331 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); |
328 | extern void usb_serial_generic_throttle(struct tty_struct *tty); | 332 | extern void usb_serial_generic_throttle(struct tty_struct *tty); |
329 | extern void usb_serial_generic_unthrottle(struct tty_struct *tty); | 333 | extern void usb_serial_generic_unthrottle(struct tty_struct *tty); |
330 | extern void usb_serial_generic_disconnect(struct usb_serial *serial); | 334 | extern int usb_serial_generic_tiocmiwait(struct tty_struct *tty, |
331 | extern void usb_serial_generic_release(struct usb_serial *serial); | 335 | unsigned long arg); |
336 | extern int usb_serial_generic_get_icount(struct tty_struct *tty, | ||
337 | struct serial_icounter_struct *icount); | ||
332 | extern int usb_serial_generic_register(void); | 338 | extern int usb_serial_generic_register(void); |
333 | extern void usb_serial_generic_deregister(void); | 339 | extern void usb_serial_generic_deregister(void); |
334 | extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, | 340 | extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port, |
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h index 9ebebe906925..1b7519a8c0bf 100644 --- a/include/linux/usb/tegra_usb_phy.h +++ b/include/linux/usb/tegra_usb_phy.h | |||
@@ -61,10 +61,14 @@ struct tegra_usb_phy { | |||
61 | struct device *dev; | 61 | struct device *dev; |
62 | bool is_legacy_phy; | 62 | bool is_legacy_phy; |
63 | bool is_ulpi_phy; | 63 | bool is_ulpi_phy; |
64 | void (*set_pts)(struct usb_phy *x, u8 pts_val); | ||
65 | void (*set_phcd)(struct usb_phy *x, bool enable); | ||
64 | }; | 66 | }; |
65 | 67 | ||
66 | struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, | 68 | struct tegra_usb_phy *tegra_usb_phy_open(struct device *dev, int instance, |
67 | void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode); | 69 | void __iomem *regs, void *config, enum tegra_usb_phy_mode phy_mode, |
70 | void (*set_pts)(struct usb_phy *x, u8 pts_val), | ||
71 | void (*set_phcd)(struct usb_phy *x, bool enable)); | ||
68 | 72 | ||
69 | void tegra_usb_phy_preresume(struct usb_phy *phy); | 73 | void tegra_usb_phy_preresume(struct usb_phy *phy); |
70 | 74 | ||
@@ -75,8 +79,4 @@ void tegra_ehci_phy_restore_start(struct usb_phy *phy, | |||
75 | 79 | ||
76 | void tegra_ehci_phy_restore_end(struct usb_phy *phy); | 80 | void tegra_ehci_phy_restore_end(struct usb_phy *phy); |
77 | 81 | ||
78 | void tegra_ehci_set_pts(struct usb_phy *x, u8 pts_val); | ||
79 | |||
80 | void tegra_ehci_set_phcd(struct usb_phy *x, bool enable); | ||
81 | |||
82 | #endif /* __TEGRA_USB_PHY_H */ | 82 | #endif /* __TEGRA_USB_PHY_H */ |
diff --git a/include/linux/usb/ulpi.h b/include/linux/usb/ulpi.h index 6f033a415ecb..5c295c26ad37 100644 --- a/include/linux/usb/ulpi.h +++ b/include/linux/usb/ulpi.h | |||
@@ -181,8 +181,16 @@ | |||
181 | 181 | ||
182 | /*-------------------------------------------------------------------------*/ | 182 | /*-------------------------------------------------------------------------*/ |
183 | 183 | ||
184 | #if IS_ENABLED(CONFIG_USB_ULPI) | ||
184 | struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, | 185 | struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, |
185 | unsigned int flags); | 186 | unsigned int flags); |
187 | #else | ||
188 | static inline struct usb_phy *otg_ulpi_create(struct usb_phy_io_ops *ops, | ||
189 | unsigned int flags) | ||
190 | { | ||
191 | return NULL; | ||
192 | } | ||
193 | #endif | ||
186 | 194 | ||
187 | #ifdef CONFIG_USB_ULPI_VIEWPORT | 195 | #ifdef CONFIG_USB_ULPI_VIEWPORT |
188 | /* access ops for controllers with a viewport register */ | 196 | /* access ops for controllers with a viewport register */ |
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 4ce009324933..b6b215f13b45 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h | |||
@@ -26,6 +26,8 @@ struct user_namespace { | |||
26 | kuid_t owner; | 26 | kuid_t owner; |
27 | kgid_t group; | 27 | kgid_t group; |
28 | unsigned int proc_inum; | 28 | unsigned int proc_inum; |
29 | bool may_mount_sysfs; | ||
30 | bool may_mount_proc; | ||
29 | }; | 31 | }; |
30 | 32 | ||
31 | extern struct user_namespace init_user_ns; | 33 | extern struct user_namespace init_user_ns; |
@@ -82,4 +84,6 @@ static inline void put_user_ns(struct user_namespace *ns) | |||
82 | 84 | ||
83 | #endif | 85 | #endif |
84 | 86 | ||
87 | void update_mnt_policy(struct user_namespace *userns); | ||
88 | |||
85 | #endif /* _LINUX_USER_H */ | 89 | #endif /* _LINUX_USER_H */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6071e911c7f4..7d5773a99f20 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -3,7 +3,9 @@ | |||
3 | 3 | ||
4 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
5 | #include <linux/init.h> | 5 | #include <linux/init.h> |
6 | #include <linux/list.h> | ||
6 | #include <asm/page.h> /* pgprot_t */ | 7 | #include <asm/page.h> /* pgprot_t */ |
8 | #include <linux/rbtree.h> | ||
7 | 9 | ||
8 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 10 | struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
9 | 11 | ||
@@ -35,6 +37,17 @@ struct vm_struct { | |||
35 | const void *caller; | 37 | const void *caller; |
36 | }; | 38 | }; |
37 | 39 | ||
40 | struct vmap_area { | ||
41 | unsigned long va_start; | ||
42 | unsigned long va_end; | ||
43 | unsigned long flags; | ||
44 | struct rb_node rb_node; /* address sorted rbtree */ | ||
45 | struct list_head list; /* address sorted list */ | ||
46 | struct list_head purge_list; /* "lazy purge" list */ | ||
47 | struct vm_struct *vm; | ||
48 | struct rcu_head rcu_head; | ||
49 | }; | ||
50 | |||
38 | /* | 51 | /* |
39 | * Highlevel APIs for driver use | 52 | * Highlevel APIs for driver use |
40 | */ | 53 | */ |
@@ -130,8 +143,7 @@ extern long vwrite(char *buf, char *addr, unsigned long count); | |||
130 | /* | 143 | /* |
131 | * Internals. Dont't use.. | 144 | * Internals. Dont't use.. |
132 | */ | 145 | */ |
133 | extern rwlock_t vmlist_lock; | 146 | extern struct list_head vmap_area_list; |
134 | extern struct vm_struct *vmlist; | ||
135 | extern __init void vm_area_add_early(struct vm_struct *vm); | 147 | extern __init void vm_area_add_early(struct vm_struct *vm); |
136 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | 148 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); |
137 | 149 | ||
@@ -158,4 +170,22 @@ pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms) | |||
158 | # endif | 170 | # endif |
159 | #endif | 171 | #endif |
160 | 172 | ||
173 | struct vmalloc_info { | ||
174 | unsigned long used; | ||
175 | unsigned long largest_chunk; | ||
176 | }; | ||
177 | |||
178 | #ifdef CONFIG_MMU | ||
179 | #define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START) | ||
180 | extern void get_vmalloc_info(struct vmalloc_info *vmi); | ||
181 | #else | ||
182 | |||
183 | #define VMALLOC_TOTAL 0UL | ||
184 | #define get_vmalloc_info(vmi) \ | ||
185 | do { \ | ||
186 | (vmi)->used = 0; \ | ||
187 | (vmi)->largest_chunk = 0; \ | ||
188 | } while (0) | ||
189 | #endif | ||
190 | |||
161 | #endif /* _LINUX_VMALLOC_H */ | 191 | #endif /* _LINUX_VMALLOC_H */ |
diff --git a/include/linux/vmpressure.h b/include/linux/vmpressure.h new file mode 100644 index 000000000000..76be077340ea --- /dev/null +++ b/include/linux/vmpressure.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef __LINUX_VMPRESSURE_H | ||
2 | #define __LINUX_VMPRESSURE_H | ||
3 | |||
4 | #include <linux/mutex.h> | ||
5 | #include <linux/list.h> | ||
6 | #include <linux/workqueue.h> | ||
7 | #include <linux/gfp.h> | ||
8 | #include <linux/types.h> | ||
9 | #include <linux/cgroup.h> | ||
10 | |||
11 | struct vmpressure { | ||
12 | unsigned long scanned; | ||
13 | unsigned long reclaimed; | ||
14 | /* The lock is used to keep the scanned/reclaimed above in sync. */ | ||
15 | struct mutex sr_lock; | ||
16 | |||
17 | /* The list of vmpressure_event structs. */ | ||
18 | struct list_head events; | ||
19 | /* Have to grab the lock on events traversal or modifications. */ | ||
20 | struct mutex events_lock; | ||
21 | |||
22 | struct work_struct work; | ||
23 | }; | ||
24 | |||
25 | struct mem_cgroup; | ||
26 | |||
27 | #ifdef CONFIG_MEMCG | ||
28 | extern void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, | ||
29 | unsigned long scanned, unsigned long reclaimed); | ||
30 | extern void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, int prio); | ||
31 | |||
32 | extern void vmpressure_init(struct vmpressure *vmpr); | ||
33 | extern struct vmpressure *memcg_to_vmpressure(struct mem_cgroup *memcg); | ||
34 | extern struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr); | ||
35 | extern struct vmpressure *css_to_vmpressure(struct cgroup_subsys_state *css); | ||
36 | extern int vmpressure_register_event(struct cgroup *cg, struct cftype *cft, | ||
37 | struct eventfd_ctx *eventfd, | ||
38 | const char *args); | ||
39 | extern void vmpressure_unregister_event(struct cgroup *cg, struct cftype *cft, | ||
40 | struct eventfd_ctx *eventfd); | ||
41 | #else | ||
42 | static inline void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, | ||
43 | unsigned long scanned, unsigned long reclaimed) {} | ||
44 | static inline void vmpressure_prio(gfp_t gfp, struct mem_cgroup *memcg, | ||
45 | int prio) {} | ||
46 | #endif /* CONFIG_MEMCG */ | ||
47 | #endif /* __LINUX_VMPRESSURE_H */ | ||
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5fd71a7d0dfd..c586679b6fef 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -48,13 +48,8 @@ static inline void count_vm_events(enum vm_event_item item, long delta) | |||
48 | } | 48 | } |
49 | 49 | ||
50 | extern void all_vm_events(unsigned long *); | 50 | extern void all_vm_events(unsigned long *); |
51 | #ifdef CONFIG_HOTPLUG | 51 | |
52 | extern void vm_events_fold_cpu(int cpu); | 52 | extern void vm_events_fold_cpu(int cpu); |
53 | #else | ||
54 | static inline void vm_events_fold_cpu(int cpu) | ||
55 | { | ||
56 | } | ||
57 | #endif | ||
58 | 53 | ||
59 | #else | 54 | #else |
60 | 55 | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 8afab27cdbc2..717975639378 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/lockdep.h> | 11 | #include <linux/lockdep.h> |
12 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
13 | #include <linux/atomic.h> | 13 | #include <linux/atomic.h> |
14 | #include <linux/cpumask.h> | ||
14 | 15 | ||
15 | struct workqueue_struct; | 16 | struct workqueue_struct; |
16 | 17 | ||
@@ -68,7 +69,7 @@ enum { | |||
68 | WORK_STRUCT_COLOR_BITS, | 69 | WORK_STRUCT_COLOR_BITS, |
69 | 70 | ||
70 | /* data contains off-queue information when !WORK_STRUCT_PWQ */ | 71 | /* data contains off-queue information when !WORK_STRUCT_PWQ */ |
71 | WORK_OFFQ_FLAG_BASE = WORK_STRUCT_FLAG_BITS, | 72 | WORK_OFFQ_FLAG_BASE = WORK_STRUCT_COLOR_SHIFT, |
72 | 73 | ||
73 | WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), | 74 | WORK_OFFQ_CANCELING = (1 << WORK_OFFQ_FLAG_BASE), |
74 | 75 | ||
@@ -115,6 +116,20 @@ struct delayed_work { | |||
115 | int cpu; | 116 | int cpu; |
116 | }; | 117 | }; |
117 | 118 | ||
119 | /* | ||
120 | * A struct for workqueue attributes. This can be used to change | ||
121 | * attributes of an unbound workqueue. | ||
122 | * | ||
123 | * Unlike other fields, ->no_numa isn't a property of a worker_pool. It | ||
124 | * only modifies how apply_workqueue_attrs() select pools and thus doesn't | ||
125 | * participate in pool hash calculations or equality comparisons. | ||
126 | */ | ||
127 | struct workqueue_attrs { | ||
128 | int nice; /* nice level */ | ||
129 | cpumask_var_t cpumask; /* allowed CPUs */ | ||
130 | bool no_numa; /* disable NUMA affinity */ | ||
131 | }; | ||
132 | |||
118 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) | 133 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) |
119 | { | 134 | { |
120 | return container_of(work, struct delayed_work, work); | 135 | return container_of(work, struct delayed_work, work); |
@@ -283,9 +298,10 @@ enum { | |||
283 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 298 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
284 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 299 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
285 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 300 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
301 | WQ_SYSFS = 1 << 6, /* visible in sysfs, see wq_sysfs_register() */ | ||
286 | 302 | ||
287 | WQ_DRAINING = 1 << 6, /* internal: workqueue is draining */ | 303 | __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ |
288 | WQ_RESCUER = 1 << 7, /* internal: workqueue has rescuer */ | 304 | __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ |
289 | 305 | ||
290 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ | 306 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ |
291 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ | 307 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ |
@@ -388,7 +404,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
388 | * Pointer to the allocated workqueue on success, %NULL on failure. | 404 | * Pointer to the allocated workqueue on success, %NULL on failure. |
389 | */ | 405 | */ |
390 | #define alloc_ordered_workqueue(fmt, flags, args...) \ | 406 | #define alloc_ordered_workqueue(fmt, flags, args...) \ |
391 | alloc_workqueue(fmt, WQ_UNBOUND | (flags), 1, ##args) | 407 | alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) |
392 | 408 | ||
393 | #define create_workqueue(name) \ | 409 | #define create_workqueue(name) \ |
394 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 410 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) |
@@ -399,30 +415,23 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active, | |||
399 | 415 | ||
400 | extern void destroy_workqueue(struct workqueue_struct *wq); | 416 | extern void destroy_workqueue(struct workqueue_struct *wq); |
401 | 417 | ||
418 | struct workqueue_attrs *alloc_workqueue_attrs(gfp_t gfp_mask); | ||
419 | void free_workqueue_attrs(struct workqueue_attrs *attrs); | ||
420 | int apply_workqueue_attrs(struct workqueue_struct *wq, | ||
421 | const struct workqueue_attrs *attrs); | ||
422 | |||
402 | extern bool queue_work_on(int cpu, struct workqueue_struct *wq, | 423 | extern bool queue_work_on(int cpu, struct workqueue_struct *wq, |
403 | struct work_struct *work); | 424 | struct work_struct *work); |
404 | extern bool queue_work(struct workqueue_struct *wq, struct work_struct *work); | ||
405 | extern bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 425 | extern bool queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
406 | struct delayed_work *work, unsigned long delay); | 426 | struct delayed_work *work, unsigned long delay); |
407 | extern bool queue_delayed_work(struct workqueue_struct *wq, | ||
408 | struct delayed_work *work, unsigned long delay); | ||
409 | extern bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq, | 427 | extern bool mod_delayed_work_on(int cpu, struct workqueue_struct *wq, |
410 | struct delayed_work *dwork, unsigned long delay); | 428 | struct delayed_work *dwork, unsigned long delay); |
411 | extern bool mod_delayed_work(struct workqueue_struct *wq, | ||
412 | struct delayed_work *dwork, unsigned long delay); | ||
413 | 429 | ||
414 | extern void flush_workqueue(struct workqueue_struct *wq); | 430 | extern void flush_workqueue(struct workqueue_struct *wq); |
415 | extern void drain_workqueue(struct workqueue_struct *wq); | 431 | extern void drain_workqueue(struct workqueue_struct *wq); |
416 | extern void flush_scheduled_work(void); | 432 | extern void flush_scheduled_work(void); |
417 | 433 | ||
418 | extern bool schedule_work_on(int cpu, struct work_struct *work); | ||
419 | extern bool schedule_work(struct work_struct *work); | ||
420 | extern bool schedule_delayed_work_on(int cpu, struct delayed_work *work, | ||
421 | unsigned long delay); | ||
422 | extern bool schedule_delayed_work(struct delayed_work *work, | ||
423 | unsigned long delay); | ||
424 | extern int schedule_on_each_cpu(work_func_t func); | 434 | extern int schedule_on_each_cpu(work_func_t func); |
425 | extern int keventd_up(void); | ||
426 | 435 | ||
427 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 436 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
428 | 437 | ||
@@ -435,9 +444,121 @@ extern bool cancel_delayed_work_sync(struct delayed_work *dwork); | |||
435 | 444 | ||
436 | extern void workqueue_set_max_active(struct workqueue_struct *wq, | 445 | extern void workqueue_set_max_active(struct workqueue_struct *wq, |
437 | int max_active); | 446 | int max_active); |
438 | extern bool workqueue_congested(unsigned int cpu, struct workqueue_struct *wq); | 447 | extern bool current_is_workqueue_rescuer(void); |
448 | extern bool workqueue_congested(int cpu, struct workqueue_struct *wq); | ||
439 | extern unsigned int work_busy(struct work_struct *work); | 449 | extern unsigned int work_busy(struct work_struct *work); |
440 | 450 | ||
451 | /** | ||
452 | * queue_work - queue work on a workqueue | ||
453 | * @wq: workqueue to use | ||
454 | * @work: work to queue | ||
455 | * | ||
456 | * Returns %false if @work was already on a queue, %true otherwise. | ||
457 | * | ||
458 | * We queue the work to the CPU on which it was submitted, but if the CPU dies | ||
459 | * it can be processed by another CPU. | ||
460 | */ | ||
461 | static inline bool queue_work(struct workqueue_struct *wq, | ||
462 | struct work_struct *work) | ||
463 | { | ||
464 | return queue_work_on(WORK_CPU_UNBOUND, wq, work); | ||
465 | } | ||
466 | |||
467 | /** | ||
468 | * queue_delayed_work - queue work on a workqueue after delay | ||
469 | * @wq: workqueue to use | ||
470 | * @dwork: delayable work to queue | ||
471 | * @delay: number of jiffies to wait before queueing | ||
472 | * | ||
473 | * Equivalent to queue_delayed_work_on() but tries to use the local CPU. | ||
474 | */ | ||
475 | static inline bool queue_delayed_work(struct workqueue_struct *wq, | ||
476 | struct delayed_work *dwork, | ||
477 | unsigned long delay) | ||
478 | { | ||
479 | return queue_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); | ||
480 | } | ||
481 | |||
482 | /** | ||
483 | * mod_delayed_work - modify delay of or queue a delayed work | ||
484 | * @wq: workqueue to use | ||
485 | * @dwork: work to queue | ||
486 | * @delay: number of jiffies to wait before queueing | ||
487 | * | ||
488 | * mod_delayed_work_on() on local CPU. | ||
489 | */ | ||
490 | static inline bool mod_delayed_work(struct workqueue_struct *wq, | ||
491 | struct delayed_work *dwork, | ||
492 | unsigned long delay) | ||
493 | { | ||
494 | return mod_delayed_work_on(WORK_CPU_UNBOUND, wq, dwork, delay); | ||
495 | } | ||
496 | |||
497 | /** | ||
498 | * schedule_work_on - put work task on a specific cpu | ||
499 | * @cpu: cpu to put the work task on | ||
500 | * @work: job to be done | ||
501 | * | ||
502 | * This puts a job on a specific cpu | ||
503 | */ | ||
504 | static inline bool schedule_work_on(int cpu, struct work_struct *work) | ||
505 | { | ||
506 | return queue_work_on(cpu, system_wq, work); | ||
507 | } | ||
508 | |||
509 | /** | ||
510 | * schedule_work - put work task in global workqueue | ||
511 | * @work: job to be done | ||
512 | * | ||
513 | * Returns %false if @work was already on the kernel-global workqueue and | ||
514 | * %true otherwise. | ||
515 | * | ||
516 | * This puts a job in the kernel-global workqueue if it was not already | ||
517 | * queued and leaves it in the same position on the kernel-global | ||
518 | * workqueue otherwise. | ||
519 | */ | ||
520 | static inline bool schedule_work(struct work_struct *work) | ||
521 | { | ||
522 | return queue_work(system_wq, work); | ||
523 | } | ||
524 | |||
525 | /** | ||
526 | * schedule_delayed_work_on - queue work in global workqueue on CPU after delay | ||
527 | * @cpu: cpu to use | ||
528 | * @dwork: job to be done | ||
529 | * @delay: number of jiffies to wait | ||
530 | * | ||
531 | * After waiting for a given time this puts a job in the kernel-global | ||
532 | * workqueue on the specified CPU. | ||
533 | */ | ||
534 | static inline bool schedule_delayed_work_on(int cpu, struct delayed_work *dwork, | ||
535 | unsigned long delay) | ||
536 | { | ||
537 | return queue_delayed_work_on(cpu, system_wq, dwork, delay); | ||
538 | } | ||
539 | |||
540 | /** | ||
541 | * schedule_delayed_work - put work task in global workqueue after delay | ||
542 | * @dwork: job to be done | ||
543 | * @delay: number of jiffies to wait or 0 for immediate execution | ||
544 | * | ||
545 | * After waiting for a given time this puts a job in the kernel-global | ||
546 | * workqueue. | ||
547 | */ | ||
548 | static inline bool schedule_delayed_work(struct delayed_work *dwork, | ||
549 | unsigned long delay) | ||
550 | { | ||
551 | return queue_delayed_work(system_wq, dwork, delay); | ||
552 | } | ||
553 | |||
554 | /** | ||
555 | * keventd_up - is workqueue initialized yet? | ||
556 | */ | ||
557 | static inline bool keventd_up(void) | ||
558 | { | ||
559 | return system_wq != NULL; | ||
560 | } | ||
561 | |||
441 | /* | 562 | /* |
442 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | 563 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, |
443 | * if it returns 0 the timer function may be running and the queueing is in | 564 | * if it returns 0 the timer function may be running and the queueing is in |
@@ -466,12 +587,12 @@ static inline bool __deprecated flush_delayed_work_sync(struct delayed_work *dwo | |||
466 | } | 587 | } |
467 | 588 | ||
468 | #ifndef CONFIG_SMP | 589 | #ifndef CONFIG_SMP |
469 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) | 590 | static inline long work_on_cpu(int cpu, long (*fn)(void *), void *arg) |
470 | { | 591 | { |
471 | return fn(arg); | 592 | return fn(arg); |
472 | } | 593 | } |
473 | #else | 594 | #else |
474 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); | 595 | long work_on_cpu(int cpu, long (*fn)(void *), void *arg); |
475 | #endif /* CONFIG_SMP */ | 596 | #endif /* CONFIG_SMP */ |
476 | 597 | ||
477 | #ifdef CONFIG_FREEZER | 598 | #ifdef CONFIG_FREEZER |
@@ -480,4 +601,11 @@ extern bool freeze_workqueues_busy(void); | |||
480 | extern void thaw_workqueues(void); | 601 | extern void thaw_workqueues(void); |
481 | #endif /* CONFIG_FREEZER */ | 602 | #endif /* CONFIG_FREEZER */ |
482 | 603 | ||
604 | #ifdef CONFIG_SYSFS | ||
605 | int workqueue_sysfs_register(struct workqueue_struct *wq); | ||
606 | #else /* CONFIG_SYSFS */ | ||
607 | static inline int workqueue_sysfs_register(struct workqueue_struct *wq) | ||
608 | { return 0; } | ||
609 | #endif /* CONFIG_SYSFS */ | ||
610 | |||
483 | #endif | 611 | #endif |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 40be2a0d8ae1..84a6440f1f19 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -199,6 +199,7 @@ extern bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev, | |||
199 | /* Device notifier */ | 199 | /* Device notifier */ |
200 | extern int register_inet6addr_notifier(struct notifier_block *nb); | 200 | extern int register_inet6addr_notifier(struct notifier_block *nb); |
201 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); | 201 | extern int unregister_inet6addr_notifier(struct notifier_block *nb); |
202 | extern int inet6addr_notifier_call_chain(unsigned long val, void *v); | ||
202 | 203 | ||
203 | extern void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, | 204 | extern void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, |
204 | struct ipv6_devconf *devconf); | 205 | struct ipv6_devconf *devconf); |
diff --git a/include/net/dst.h b/include/net/dst.h index 853cda11e518..1f8fd109e225 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -413,13 +413,15 @@ static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n, | |||
413 | 413 | ||
414 | static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) | 414 | static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) |
415 | { | 415 | { |
416 | return dst->ops->neigh_lookup(dst, NULL, daddr); | 416 | struct neighbour *n = dst->ops->neigh_lookup(dst, NULL, daddr); |
417 | return IS_ERR(n) ? NULL : n; | ||
417 | } | 418 | } |
418 | 419 | ||
419 | static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst, | 420 | static inline struct neighbour *dst_neigh_lookup_skb(const struct dst_entry *dst, |
420 | struct sk_buff *skb) | 421 | struct sk_buff *skb) |
421 | { | 422 | { |
422 | return dst->ops->neigh_lookup(dst, skb, NULL); | 423 | struct neighbour *n = dst->ops->neigh_lookup(dst, skb, NULL); |
424 | return IS_ERR(n) ? NULL : n; | ||
423 | } | 425 | } |
424 | 426 | ||
425 | static inline void dst_link_failure(struct sk_buff *skb) | 427 | static inline void dst_link_failure(struct sk_buff *skb) |
diff --git a/include/net/flow_keys.h b/include/net/flow_keys.h index 80461c1ae9ef..bb8271d487b7 100644 --- a/include/net/flow_keys.h +++ b/include/net/flow_keys.h | |||
@@ -9,6 +9,7 @@ struct flow_keys { | |||
9 | __be32 ports; | 9 | __be32 ports; |
10 | __be16 port16[2]; | 10 | __be16 port16[2]; |
11 | }; | 11 | }; |
12 | u16 thoff; | ||
12 | u8 ip_proto; | 13 | u8 ip_proto; |
13 | }; | 14 | }; |
14 | 15 | ||
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index 76c3fe5ecc2e..0a1dcc2fa2f5 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h | |||
@@ -43,6 +43,13 @@ struct inet_frag_queue { | |||
43 | 43 | ||
44 | #define INETFRAGS_HASHSZ 64 | 44 | #define INETFRAGS_HASHSZ 64 |
45 | 45 | ||
46 | /* averaged: | ||
47 | * max_depth = default ipfrag_high_thresh / INETFRAGS_HASHSZ / | ||
48 | * rounded up (SKB_TRUELEN(0) + sizeof(struct ipq or | ||
49 | * struct frag_queue)) | ||
50 | */ | ||
51 | #define INETFRAGS_MAXDEPTH 128 | ||
52 | |||
46 | struct inet_frags { | 53 | struct inet_frags { |
47 | struct hlist_head hash[INETFRAGS_HASHSZ]; | 54 | struct hlist_head hash[INETFRAGS_HASHSZ]; |
48 | /* This rwlock is a global lock (seperate per IPv4, IPv6 and | 55 | /* This rwlock is a global lock (seperate per IPv4, IPv6 and |
@@ -76,6 +83,8 @@ int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force); | |||
76 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, | 83 | struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, |
77 | struct inet_frags *f, void *key, unsigned int hash) | 84 | struct inet_frags *f, void *key, unsigned int hash) |
78 | __releases(&f->lock); | 85 | __releases(&f->lock); |
86 | void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, | ||
87 | const char *prefix); | ||
79 | 88 | ||
80 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) | 89 | static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f) |
81 | { | 90 | { |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 9497be1ad4c0..e49db91593a9 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -152,18 +152,16 @@ struct fib_result_nl { | |||
152 | }; | 152 | }; |
153 | 153 | ||
154 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 154 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
155 | |||
156 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) | 155 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) |
157 | |||
158 | #define FIB_TABLE_HASHSZ 2 | ||
159 | |||
160 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ | 156 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ |
161 | |||
162 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) | 157 | #define FIB_RES_NH(res) ((res).fi->fib_nh[0]) |
158 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | ||
163 | 159 | ||
160 | #ifdef CONFIG_IP_MULTIPLE_TABLES | ||
164 | #define FIB_TABLE_HASHSZ 256 | 161 | #define FIB_TABLE_HASHSZ 256 |
165 | 162 | #else | |
166 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | 163 | #define FIB_TABLE_HASHSZ 2 |
164 | #endif | ||
167 | 165 | ||
168 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); | 166 | extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); |
169 | 167 | ||
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 68c69d54d392..fce8e6b66d55 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -976,6 +976,7 @@ struct netns_ipvs { | |||
976 | int sysctl_sync_retries; | 976 | int sysctl_sync_retries; |
977 | int sysctl_nat_icmp_send; | 977 | int sysctl_nat_icmp_send; |
978 | int sysctl_pmtu_disc; | 978 | int sysctl_pmtu_disc; |
979 | int sysctl_backup_only; | ||
979 | 980 | ||
980 | /* ip_vs_lblc */ | 981 | /* ip_vs_lblc */ |
981 | int sysctl_lblc_expiration; | 982 | int sysctl_lblc_expiration; |
@@ -1067,6 +1068,12 @@ static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs) | |||
1067 | return ipvs->sysctl_pmtu_disc; | 1068 | return ipvs->sysctl_pmtu_disc; |
1068 | } | 1069 | } |
1069 | 1070 | ||
1071 | static inline int sysctl_backup_only(struct netns_ipvs *ipvs) | ||
1072 | { | ||
1073 | return ipvs->sync_state & IP_VS_STATE_BACKUP && | ||
1074 | ipvs->sysctl_backup_only; | ||
1075 | } | ||
1076 | |||
1070 | #else | 1077 | #else |
1071 | 1078 | ||
1072 | static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs) | 1079 | static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs) |
@@ -1114,6 +1121,11 @@ static inline int sysctl_pmtu_disc(struct netns_ipvs *ipvs) | |||
1114 | return 1; | 1121 | return 1; |
1115 | } | 1122 | } |
1116 | 1123 | ||
1124 | static inline int sysctl_backup_only(struct netns_ipvs *ipvs) | ||
1125 | { | ||
1126 | return 0; | ||
1127 | } | ||
1128 | |||
1117 | #endif | 1129 | #endif |
1118 | 1130 | ||
1119 | /* | 1131 | /* |
diff --git a/include/net/ipip.h b/include/net/ipip.h index fd19625ff99d..982141c15200 100644 --- a/include/net/ipip.h +++ b/include/net/ipip.h | |||
@@ -77,15 +77,11 @@ static inline void tunnel_ip_select_ident(struct sk_buff *skb, | |||
77 | { | 77 | { |
78 | struct iphdr *iph = ip_hdr(skb); | 78 | struct iphdr *iph = ip_hdr(skb); |
79 | 79 | ||
80 | if (iph->frag_off & htons(IP_DF)) | 80 | /* Use inner packet iph-id if possible. */ |
81 | iph->id = 0; | 81 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) |
82 | else { | 82 | iph->id = old_iph->id; |
83 | /* Use inner packet iph-id if possible. */ | 83 | else |
84 | if (skb->protocol == htons(ETH_P_IP) && old_iph->id) | 84 | __ip_select_ident(iph, dst, |
85 | iph->id = old_iph->id; | 85 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); |
86 | else | ||
87 | __ip_select_ident(iph, dst, | ||
88 | (skb_shinfo(skb)->gso_segs ?: 1) - 1); | ||
89 | } | ||
90 | } | 86 | } |
91 | #endif | 87 | #endif |
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h index f74109144d3f..f132924cc9da 100644 --- a/include/net/irda/irlmp.h +++ b/include/net/irda/irlmp.h | |||
@@ -256,7 +256,8 @@ static inline __u32 irlmp_get_daddr(const struct lsap_cb *self) | |||
256 | return (self && self->lap) ? self->lap->daddr : 0; | 256 | return (self && self->lap) ? self->lap->daddr : 0; |
257 | } | 257 | } |
258 | 258 | ||
259 | extern const char *irlmp_reasons[]; | 259 | const char *irlmp_reason_str(LM_REASON reason); |
260 | |||
260 | extern int sysctl_discovery_timeout; | 261 | extern int sysctl_discovery_timeout; |
261 | extern int sysctl_discovery_slots; | 262 | extern int sysctl_discovery_slots; |
262 | extern int sysctl_discovery; | 263 | extern int sysctl_discovery; |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index cc7c19732389..714cc9a54a4c 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
@@ -130,6 +130,14 @@ struct iucv_sock { | |||
130 | enum iucv_tx_notify n); | 130 | enum iucv_tx_notify n); |
131 | }; | 131 | }; |
132 | 132 | ||
133 | struct iucv_skb_cb { | ||
134 | u32 class; /* target class of message */ | ||
135 | u32 tag; /* tag associated with message */ | ||
136 | u32 offset; /* offset for skb receival */ | ||
137 | }; | ||
138 | |||
139 | #define IUCV_SKB_CB(__skb) ((struct iucv_skb_cb *)&((__skb)->cb[0])) | ||
140 | |||
133 | /* iucv socket options (SOL_IUCV) */ | 141 | /* iucv socket options (SOL_IUCV) */ |
134 | #define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */ | 142 | #define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */ |
135 | #define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */ | 143 | #define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */ |
diff --git a/include/net/scm.h b/include/net/scm.h index 975cca01048b..b11708105681 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -56,8 +56,8 @@ static __inline__ void scm_set_cred(struct scm_cookie *scm, | |||
56 | scm->pid = get_pid(pid); | 56 | scm->pid = get_pid(pid); |
57 | scm->cred = cred ? get_cred(cred) : NULL; | 57 | scm->cred = cred ? get_cred(cred) : NULL; |
58 | scm->creds.pid = pid_vnr(pid); | 58 | scm->creds.pid = pid_vnr(pid); |
59 | scm->creds.uid = cred ? cred->euid : INVALID_UID; | 59 | scm->creds.uid = cred ? cred->uid : INVALID_UID; |
60 | scm->creds.gid = cred ? cred->egid : INVALID_GID; | 60 | scm->creds.gid = cred ? cred->gid : INVALID_GID; |
61 | } | 61 | } |
62 | 62 | ||
63 | static __inline__ void scm_destroy_cred(struct scm_cookie *scm) | 63 | static __inline__ void scm_destroy_cred(struct scm_cookie *scm) |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 23f2e98d4b65..cf0694d4ad60 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1045,6 +1045,10 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
1045 | if (sysctl_tcp_low_latency || !tp->ucopy.task) | 1045 | if (sysctl_tcp_low_latency || !tp->ucopy.task) |
1046 | return false; | 1046 | return false; |
1047 | 1047 | ||
1048 | if (skb->len <= tcp_hdrlen(skb) && | ||
1049 | skb_queue_len(&tp->ucopy.prequeue) == 0) | ||
1050 | return false; | ||
1051 | |||
1048 | __skb_queue_tail(&tp->ucopy.prequeue, skb); | 1052 | __skb_queue_tail(&tp->ucopy.prequeue, skb); |
1049 | tp->ucopy.memory += skb->truesize; | 1053 | tp->ucopy.memory += skb->truesize; |
1050 | if (tp->ucopy.memory > sk->sk_rcvbuf) { | 1054 | if (tp->ucopy.memory > sk->sk_rcvbuf) { |
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index 3bbbd78e1439..2d56e428506c 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h | |||
@@ -65,6 +65,18 @@ struct pcmcia_driver { | |||
65 | int pcmcia_register_driver(struct pcmcia_driver *driver); | 65 | int pcmcia_register_driver(struct pcmcia_driver *driver); |
66 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); | 66 | void pcmcia_unregister_driver(struct pcmcia_driver *driver); |
67 | 67 | ||
68 | /** | ||
69 | * module_pcmcia_driver() - Helper macro for registering a pcmcia driver | ||
70 | * @__pcmcia_driver: pcmcia_driver struct | ||
71 | * | ||
72 | * Helper macro for pcmcia drivers which do not do anything special in module | ||
73 | * init/exit. This eliminates a lot of boilerplate. Each module may only use | ||
74 | * this macro once, and calling it replaces module_init() and module_exit(). | ||
75 | */ | ||
76 | #define module_pcmcia_driver(__pcmcia_driver) \ | ||
77 | module_driver(__pcmcia_driver, pcmcia_register_driver, \ | ||
78 | pcmcia_unregister_driver) | ||
79 | |||
68 | /* for struct resource * array embedded in struct pcmcia_device */ | 80 | /* for struct resource * array embedded in struct pcmcia_device */ |
69 | enum { | 81 | enum { |
70 | PCMCIA_IOPORT_0, | 82 | PCMCIA_IOPORT_0, |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 399162b50a8d..e1379b4e8faf 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -1074,7 +1074,8 @@ void fc_rport_terminate_io(struct fc_rport *); | |||
1074 | /* | 1074 | /* |
1075 | * DISCOVERY LAYER | 1075 | * DISCOVERY LAYER |
1076 | *****************************/ | 1076 | *****************************/ |
1077 | int fc_disc_init(struct fc_lport *); | 1077 | void fc_disc_init(struct fc_lport *); |
1078 | void fc_disc_config(struct fc_lport *, void *); | ||
1078 | 1079 | ||
1079 | static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) | 1080 | static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) |
1080 | { | 1081 | { |
diff --git a/include/sound/max98090.h b/include/sound/max98090.h index 95efb13f8478..95efb13f8478 100755..100644 --- a/include/sound/max98090.h +++ b/include/sound/max98090.h | |||
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e1ef63d4a5c4..44a30b108683 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -488,6 +488,7 @@ struct snd_soc_dapm_path { | |||
488 | /* status */ | 488 | /* status */ |
489 | u32 connect:1; /* source and sink widgets are connected */ | 489 | u32 connect:1; /* source and sink widgets are connected */ |
490 | u32 walked:1; /* path has been walked */ | 490 | u32 walked:1; /* path has been walked */ |
491 | u32 walking:1; /* path is in the process of being walked */ | ||
491 | u32 weak:1; /* path ignored for power management */ | 492 | u32 weak:1; /* path ignored for power management */ |
492 | 493 | ||
493 | int (*connected)(struct snd_soc_dapm_widget *source, | 494 | int (*connected)(struct snd_soc_dapm_widget *source, |
diff --git a/include/trace/events/block.h b/include/trace/events/block.h index 9961726523d0..9c1467357b03 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h | |||
@@ -257,6 +257,7 @@ TRACE_EVENT(block_bio_bounce, | |||
257 | 257 | ||
258 | /** | 258 | /** |
259 | * block_bio_complete - completed all work on the block operation | 259 | * block_bio_complete - completed all work on the block operation |
260 | * @q: queue holding the block operation | ||
260 | * @bio: block operation completed | 261 | * @bio: block operation completed |
261 | * @error: io error value | 262 | * @error: io error value |
262 | * | 263 | * |
@@ -265,9 +266,9 @@ TRACE_EVENT(block_bio_bounce, | |||
265 | */ | 266 | */ |
266 | TRACE_EVENT(block_bio_complete, | 267 | TRACE_EVENT(block_bio_complete, |
267 | 268 | ||
268 | TP_PROTO(struct bio *bio, int error), | 269 | TP_PROTO(struct request_queue *q, struct bio *bio, int error), |
269 | 270 | ||
270 | TP_ARGS(bio, error), | 271 | TP_ARGS(q, bio, error), |
271 | 272 | ||
272 | TP_STRUCT__entry( | 273 | TP_STRUCT__entry( |
273 | __field( dev_t, dev ) | 274 | __field( dev_t, dev ) |
@@ -278,8 +279,7 @@ TRACE_EVENT(block_bio_complete, | |||
278 | ), | 279 | ), |
279 | 280 | ||
280 | TP_fast_assign( | 281 | TP_fast_assign( |
281 | __entry->dev = bio->bi_bdev ? | 282 | __entry->dev = bio->bi_bdev->bd_dev; |
282 | bio->bi_bdev->bd_dev : 0; | ||
283 | __entry->sector = bio->bi_sector; | 283 | __entry->sector = bio->bi_sector; |
284 | __entry->nr_sector = bio->bi_size >> 9; | 284 | __entry->nr_sector = bio->bi_size >> 9; |
285 | __entry->error = error; | 285 | __entry->error = error; |
diff --git a/include/trace/events/filemap.h b/include/trace/events/filemap.h new file mode 100644 index 000000000000..0421f49a20f7 --- /dev/null +++ b/include/trace/events/filemap.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM filemap | ||
3 | |||
4 | #if !defined(_TRACE_FILEMAP_H) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define _TRACE_FILEMAP_H | ||
6 | |||
7 | #include <linux/types.h> | ||
8 | #include <linux/tracepoint.h> | ||
9 | #include <linux/mm.h> | ||
10 | #include <linux/memcontrol.h> | ||
11 | #include <linux/device.h> | ||
12 | #include <linux/kdev_t.h> | ||
13 | |||
14 | DECLARE_EVENT_CLASS(mm_filemap_op_page_cache, | ||
15 | |||
16 | TP_PROTO(struct page *page), | ||
17 | |||
18 | TP_ARGS(page), | ||
19 | |||
20 | TP_STRUCT__entry( | ||
21 | __field(struct page *, page) | ||
22 | __field(unsigned long, i_ino) | ||
23 | __field(unsigned long, index) | ||
24 | __field(dev_t, s_dev) | ||
25 | ), | ||
26 | |||
27 | TP_fast_assign( | ||
28 | __entry->page = page; | ||
29 | __entry->i_ino = page->mapping->host->i_ino; | ||
30 | __entry->index = page->index; | ||
31 | if (page->mapping->host->i_sb) | ||
32 | __entry->s_dev = page->mapping->host->i_sb->s_dev; | ||
33 | else | ||
34 | __entry->s_dev = page->mapping->host->i_rdev; | ||
35 | ), | ||
36 | |||
37 | TP_printk("dev %d:%d ino %lx page=%p pfn=%lu ofs=%lu", | ||
38 | MAJOR(__entry->s_dev), MINOR(__entry->s_dev), | ||
39 | __entry->i_ino, | ||
40 | __entry->page, | ||
41 | page_to_pfn(__entry->page), | ||
42 | __entry->index << PAGE_SHIFT) | ||
43 | ); | ||
44 | |||
45 | DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_delete_from_page_cache, | ||
46 | TP_PROTO(struct page *page), | ||
47 | TP_ARGS(page) | ||
48 | ); | ||
49 | |||
50 | DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_add_to_page_cache, | ||
51 | TP_PROTO(struct page *page), | ||
52 | TP_ARGS(page) | ||
53 | ); | ||
54 | |||
55 | #endif /* _TRACE_FILEMAP_H */ | ||
56 | |||
57 | /* This part must be outside protection */ | ||
58 | #include <trace/define_trace.h> | ||
diff --git a/include/trace/events/printk.h b/include/trace/events/printk.h index 94ec79cc011a..c008bc99f9fa 100644 --- a/include/trace/events/printk.h +++ b/include/trace/events/printk.h | |||
@@ -6,31 +6,18 @@ | |||
6 | 6 | ||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | 8 | ||
9 | TRACE_EVENT_CONDITION(console, | 9 | TRACE_EVENT(console, |
10 | TP_PROTO(const char *log_buf, unsigned start, unsigned end, | 10 | TP_PROTO(const char *text, size_t len), |
11 | unsigned log_buf_len), | ||
12 | 11 | ||
13 | TP_ARGS(log_buf, start, end, log_buf_len), | 12 | TP_ARGS(text, len), |
14 | |||
15 | TP_CONDITION(start != end), | ||
16 | 13 | ||
17 | TP_STRUCT__entry( | 14 | TP_STRUCT__entry( |
18 | __dynamic_array(char, msg, end - start + 1) | 15 | __dynamic_array(char, msg, len + 1) |
19 | ), | 16 | ), |
20 | 17 | ||
21 | TP_fast_assign( | 18 | TP_fast_assign( |
22 | if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) { | 19 | memcpy(__get_dynamic_array(msg), text, len); |
23 | memcpy(__get_dynamic_array(msg), | 20 | ((char *)__get_dynamic_array(msg))[len] = 0; |
24 | log_buf + (start & (log_buf_len - 1)), | ||
25 | log_buf_len - (start & (log_buf_len - 1))); | ||
26 | memcpy((char *)__get_dynamic_array(msg) + | ||
27 | log_buf_len - (start & (log_buf_len - 1)), | ||
28 | log_buf, end & (log_buf_len - 1)); | ||
29 | } else | ||
30 | memcpy(__get_dynamic_array(msg), | ||
31 | log_buf + (start & (log_buf_len - 1)), | ||
32 | end - start); | ||
33 | ((char *)__get_dynamic_array(msg))[end - start] = 0; | ||
34 | ), | 21 | ), |
35 | 22 | ||
36 | TP_printk("%s", __get_str(msg)) | 23 | TP_printk("%s", __get_str(msg)) |
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 1918e832da4f..59ebcc89f148 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h | |||
@@ -72,6 +72,58 @@ TRACE_EVENT(rcu_grace_period, | |||
72 | ); | 72 | ); |
73 | 73 | ||
74 | /* | 74 | /* |
75 | * Tracepoint for future grace-period events, including those for no-callbacks | ||
76 | * CPUs. The caller should pull the data from the rcu_node structure, | ||
77 | * other than rcuname, which comes from the rcu_state structure, and event, | ||
78 | * which is one of the following: | ||
79 | * | ||
80 | * "Startleaf": Request a nocb grace period based on leaf-node data. | ||
81 | * "Startedleaf": Leaf-node start proved sufficient. | ||
82 | * "Startedleafroot": Leaf-node start proved sufficient after checking root. | ||
83 | * "Startedroot": Requested a nocb grace period based on root-node data. | ||
84 | * "StartWait": Start waiting for the requested grace period. | ||
85 | * "ResumeWait": Resume waiting after signal. | ||
86 | * "EndWait": Complete wait. | ||
87 | * "Cleanup": Clean up rcu_node structure after previous GP. | ||
88 | * "CleanupMore": Clean up, and another no-CB GP is needed. | ||
89 | */ | ||
90 | TRACE_EVENT(rcu_future_grace_period, | ||
91 | |||
92 | TP_PROTO(char *rcuname, unsigned long gpnum, unsigned long completed, | ||
93 | unsigned long c, u8 level, int grplo, int grphi, | ||
94 | char *gpevent), | ||
95 | |||
96 | TP_ARGS(rcuname, gpnum, completed, c, level, grplo, grphi, gpevent), | ||
97 | |||
98 | TP_STRUCT__entry( | ||
99 | __field(char *, rcuname) | ||
100 | __field(unsigned long, gpnum) | ||
101 | __field(unsigned long, completed) | ||
102 | __field(unsigned long, c) | ||
103 | __field(u8, level) | ||
104 | __field(int, grplo) | ||
105 | __field(int, grphi) | ||
106 | __field(char *, gpevent) | ||
107 | ), | ||
108 | |||
109 | TP_fast_assign( | ||
110 | __entry->rcuname = rcuname; | ||
111 | __entry->gpnum = gpnum; | ||
112 | __entry->completed = completed; | ||
113 | __entry->c = c; | ||
114 | __entry->level = level; | ||
115 | __entry->grplo = grplo; | ||
116 | __entry->grphi = grphi; | ||
117 | __entry->gpevent = gpevent; | ||
118 | ), | ||
119 | |||
120 | TP_printk("%s %lu %lu %lu %u %d %d %s", | ||
121 | __entry->rcuname, __entry->gpnum, __entry->completed, | ||
122 | __entry->c, __entry->level, __entry->grplo, __entry->grphi, | ||
123 | __entry->gpevent) | ||
124 | ); | ||
125 | |||
126 | /* | ||
75 | * Tracepoint for grace-period-initialization events. These are | 127 | * Tracepoint for grace-period-initialization events. These are |
76 | * distinguished by the type of RCU, the new grace-period number, the | 128 | * distinguished by the type of RCU, the new grace-period number, the |
77 | * rcu_node structure level, the starting and ending CPU covered by the | 129 | * rcu_node structure level, the starting and ending CPU covered by the |
@@ -601,6 +653,9 @@ TRACE_EVENT(rcu_barrier, | |||
601 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) | 653 | #define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) |
602 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ | 654 | #define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ |
603 | qsmask) do { } while (0) | 655 | qsmask) do { } while (0) |
656 | #define trace_rcu_future_grace_period(rcuname, gpnum, completed, c, \ | ||
657 | level, grplo, grphi, event) \ | ||
658 | do { } while (0) | ||
604 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) | 659 | #define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) |
605 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) | 660 | #define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) |
606 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ | 661 | #define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ |
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h index 41a7dbd570e2..a43a2f67bd8e 100644 --- a/include/trace/events/regmap.h +++ b/include/trace/events/regmap.h | |||
@@ -175,6 +175,54 @@ DEFINE_EVENT(regmap_bool, regmap_cache_bypass, | |||
175 | 175 | ||
176 | ); | 176 | ); |
177 | 177 | ||
178 | DECLARE_EVENT_CLASS(regmap_async, | ||
179 | |||
180 | TP_PROTO(struct device *dev), | ||
181 | |||
182 | TP_ARGS(dev), | ||
183 | |||
184 | TP_STRUCT__entry( | ||
185 | __string( name, dev_name(dev) ) | ||
186 | ), | ||
187 | |||
188 | TP_fast_assign( | ||
189 | __assign_str(name, dev_name(dev)); | ||
190 | ), | ||
191 | |||
192 | TP_printk("%s", __get_str(name)) | ||
193 | ); | ||
194 | |||
195 | DEFINE_EVENT(regmap_block, regmap_async_write_start, | ||
196 | |||
197 | TP_PROTO(struct device *dev, unsigned int reg, int count), | ||
198 | |||
199 | TP_ARGS(dev, reg, count) | ||
200 | ); | ||
201 | |||
202 | DEFINE_EVENT(regmap_async, regmap_async_io_complete, | ||
203 | |||
204 | TP_PROTO(struct device *dev), | ||
205 | |||
206 | TP_ARGS(dev) | ||
207 | |||
208 | ); | ||
209 | |||
210 | DEFINE_EVENT(regmap_async, regmap_async_complete_start, | ||
211 | |||
212 | TP_PROTO(struct device *dev), | ||
213 | |||
214 | TP_ARGS(dev) | ||
215 | |||
216 | ); | ||
217 | |||
218 | DEFINE_EVENT(regmap_async, regmap_async_complete_done, | ||
219 | |||
220 | TP_PROTO(struct device *dev), | ||
221 | |||
222 | TP_ARGS(dev) | ||
223 | |||
224 | ); | ||
225 | |||
178 | #endif /* _TRACE_REGMAP_H */ | 226 | #endif /* _TRACE_REGMAP_H */ |
179 | 227 | ||
180 | /* This part must be outside protection */ | 228 | /* This part must be outside protection */ |
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 5a8671e8a67f..e5586caff67a 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h | |||
@@ -147,7 +147,7 @@ TRACE_EVENT(sched_switch, | |||
147 | __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|", | 147 | __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|", |
148 | { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, | 148 | { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, |
149 | { 16, "Z" }, { 32, "X" }, { 64, "x" }, | 149 | { 16, "Z" }, { 32, "X" }, { 64, "x" }, |
150 | { 128, "W" }) : "R", | 150 | { 128, "K" }, { 256, "W" }, { 512, "P" }) : "R", |
151 | __entry->prev_state & TASK_STATE_MAX ? "+" : "", | 151 | __entry->prev_state & TASK_STATE_MAX ? "+" : "", |
152 | __entry->next_comm, __entry->next_pid, __entry->next_prio) | 152 | __entry->next_comm, __entry->next_pid, __entry->next_prio) |
153 | ); | 153 | ); |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 40dc5e8fe340..19edd7facaa1 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -227,29 +227,18 @@ static notrace enum print_line_t \ | |||
227 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ | 227 | ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ |
228 | struct trace_event *trace_event) \ | 228 | struct trace_event *trace_event) \ |
229 | { \ | 229 | { \ |
230 | struct ftrace_event_call *event; \ | ||
231 | struct trace_seq *s = &iter->seq; \ | 230 | struct trace_seq *s = &iter->seq; \ |
231 | struct trace_seq __maybe_unused *p = &iter->tmp_seq; \ | ||
232 | struct ftrace_raw_##call *field; \ | 232 | struct ftrace_raw_##call *field; \ |
233 | struct trace_entry *entry; \ | ||
234 | struct trace_seq *p = &iter->tmp_seq; \ | ||
235 | int ret; \ | 233 | int ret; \ |
236 | \ | 234 | \ |
237 | event = container_of(trace_event, struct ftrace_event_call, \ | 235 | field = (typeof(field))iter->ent; \ |
238 | event); \ | ||
239 | \ | ||
240 | entry = iter->ent; \ | ||
241 | \ | ||
242 | if (entry->type != event->event.type) { \ | ||
243 | WARN_ON_ONCE(1); \ | ||
244 | return TRACE_TYPE_UNHANDLED; \ | ||
245 | } \ | ||
246 | \ | ||
247 | field = (typeof(field))entry; \ | ||
248 | \ | 236 | \ |
249 | trace_seq_init(p); \ | 237 | ret = ftrace_raw_output_prep(iter, trace_event); \ |
250 | ret = trace_seq_printf(s, "%s: ", event->name); \ | ||
251 | if (ret) \ | 238 | if (ret) \ |
252 | ret = trace_seq_printf(s, print); \ | 239 | return ret; \ |
240 | \ | ||
241 | ret = trace_seq_printf(s, print); \ | ||
253 | if (!ret) \ | 242 | if (!ret) \ |
254 | return TRACE_TYPE_PARTIAL_LINE; \ | 243 | return TRACE_TYPE_PARTIAL_LINE; \ |
255 | \ | 244 | \ |
@@ -335,7 +324,7 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ | |||
335 | 324 | ||
336 | #undef DECLARE_EVENT_CLASS | 325 | #undef DECLARE_EVENT_CLASS |
337 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ | 326 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \ |
338 | static int notrace \ | 327 | static int notrace __init \ |
339 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ | 328 | ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ |
340 | { \ | 329 | { \ |
341 | struct ftrace_raw_##call field; \ | 330 | struct ftrace_raw_##call field; \ |
@@ -414,7 +403,8 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
414 | * | 403 | * |
415 | * static void ftrace_raw_event_<call>(void *__data, proto) | 404 | * static void ftrace_raw_event_<call>(void *__data, proto) |
416 | * { | 405 | * { |
417 | * struct ftrace_event_call *event_call = __data; | 406 | * struct ftrace_event_file *ftrace_file = __data; |
407 | * struct ftrace_event_call *event_call = ftrace_file->event_call; | ||
418 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; | 408 | * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; |
419 | * struct ring_buffer_event *event; | 409 | * struct ring_buffer_event *event; |
420 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 | 410 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 |
@@ -423,12 +413,16 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
423 | * int __data_size; | 413 | * int __data_size; |
424 | * int pc; | 414 | * int pc; |
425 | * | 415 | * |
416 | * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, | ||
417 | * &ftrace_file->flags)) | ||
418 | * return; | ||
419 | * | ||
426 | * local_save_flags(irq_flags); | 420 | * local_save_flags(irq_flags); |
427 | * pc = preempt_count(); | 421 | * pc = preempt_count(); |
428 | * | 422 | * |
429 | * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); | 423 | * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); |
430 | * | 424 | * |
431 | * event = trace_current_buffer_lock_reserve(&buffer, | 425 | * event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, |
432 | * event_<call>->event.type, | 426 | * event_<call>->event.type, |
433 | * sizeof(*entry) + __data_size, | 427 | * sizeof(*entry) + __data_size, |
434 | * irq_flags, pc); | 428 | * irq_flags, pc); |
@@ -440,7 +434,7 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
440 | * __array macros. | 434 | * __array macros. |
441 | * | 435 | * |
442 | * if (!filter_current_check_discard(buffer, event_call, entry, event)) | 436 | * if (!filter_current_check_discard(buffer, event_call, entry, event)) |
443 | * trace_current_buffer_unlock_commit(buffer, | 437 | * trace_nowake_buffer_unlock_commit(buffer, |
444 | * event, irq_flags, pc); | 438 | * event, irq_flags, pc); |
445 | * } | 439 | * } |
446 | * | 440 | * |
@@ -518,7 +512,8 @@ static inline notrace int ftrace_get_offsets_##call( \ | |||
518 | static notrace void \ | 512 | static notrace void \ |
519 | ftrace_raw_event_##call(void *__data, proto) \ | 513 | ftrace_raw_event_##call(void *__data, proto) \ |
520 | { \ | 514 | { \ |
521 | struct ftrace_event_call *event_call = __data; \ | 515 | struct ftrace_event_file *ftrace_file = __data; \ |
516 | struct ftrace_event_call *event_call = ftrace_file->event_call; \ | ||
522 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ | 517 | struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ |
523 | struct ring_buffer_event *event; \ | 518 | struct ring_buffer_event *event; \ |
524 | struct ftrace_raw_##call *entry; \ | 519 | struct ftrace_raw_##call *entry; \ |
@@ -527,12 +522,16 @@ ftrace_raw_event_##call(void *__data, proto) \ | |||
527 | int __data_size; \ | 522 | int __data_size; \ |
528 | int pc; \ | 523 | int pc; \ |
529 | \ | 524 | \ |
525 | if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, \ | ||
526 | &ftrace_file->flags)) \ | ||
527 | return; \ | ||
528 | \ | ||
530 | local_save_flags(irq_flags); \ | 529 | local_save_flags(irq_flags); \ |
531 | pc = preempt_count(); \ | 530 | pc = preempt_count(); \ |
532 | \ | 531 | \ |
533 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ | 532 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ |
534 | \ | 533 | \ |
535 | event = trace_current_buffer_lock_reserve(&buffer, \ | 534 | event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, \ |
536 | event_call->event.type, \ | 535 | event_call->event.type, \ |
537 | sizeof(*entry) + __data_size, \ | 536 | sizeof(*entry) + __data_size, \ |
538 | irq_flags, pc); \ | 537 | irq_flags, pc); \ |
@@ -581,7 +580,7 @@ static inline void ftrace_test_probe_##call(void) \ | |||
581 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ | 580 | #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ |
582 | _TRACE_PERF_PROTO(call, PARAMS(proto)); \ | 581 | _TRACE_PERF_PROTO(call, PARAMS(proto)); \ |
583 | static const char print_fmt_##call[] = print; \ | 582 | static const char print_fmt_##call[] = print; \ |
584 | static struct ftrace_event_class __used event_class_##call = { \ | 583 | static struct ftrace_event_class __used __refdata event_class_##call = { \ |
585 | .system = __stringify(TRACE_SYSTEM), \ | 584 | .system = __stringify(TRACE_SYSTEM), \ |
586 | .define_fields = ftrace_define_fields_##call, \ | 585 | .define_fields = ftrace_define_fields_##call, \ |
587 | .fields = LIST_HEAD_INIT(event_class_##call.fields),\ | 586 | .fields = LIST_HEAD_INIT(event_class_##call.fields),\ |
@@ -705,5 +704,3 @@ static inline void perf_test_probe_##call(void) \ | |||
705 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | 704 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) |
706 | #endif /* CONFIG_PERF_EVENTS */ | 705 | #endif /* CONFIG_PERF_EVENTS */ |
707 | 706 | ||
708 | #undef _TRACE_PROFILE_INIT | ||
709 | |||
diff --git a/include/uapi/linux/acct.h b/include/uapi/linux/acct.h index 11b6ca3e0873..df2f9a0bba6a 100644 --- a/include/uapi/linux/acct.h +++ b/include/uapi/linux/acct.h | |||
@@ -107,10 +107,12 @@ struct acct_v3 | |||
107 | #define ACORE 0x08 /* ... dumped core */ | 107 | #define ACORE 0x08 /* ... dumped core */ |
108 | #define AXSIG 0x10 /* ... was killed by a signal */ | 108 | #define AXSIG 0x10 /* ... was killed by a signal */ |
109 | 109 | ||
110 | #ifdef __BIG_ENDIAN | 110 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ | 111 | #define ACCT_BYTEORDER 0x80 /* accounting file is big endian */ |
112 | #else | 112 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ | 113 | #define ACCT_BYTEORDER 0x00 /* accounting file is little endian */ |
114 | #else | ||
115 | #error unspecified endianness | ||
114 | #endif | 116 | #endif |
115 | 117 | ||
116 | #ifndef __KERNEL__ | 118 | #ifndef __KERNEL__ |
diff --git a/include/uapi/linux/aio_abi.h b/include/uapi/linux/aio_abi.h index 86fa7a71336a..bb2554f7fbd1 100644 --- a/include/uapi/linux/aio_abi.h +++ b/include/uapi/linux/aio_abi.h | |||
@@ -62,9 +62,9 @@ struct io_event { | |||
62 | __s64 res2; /* secondary result */ | 62 | __s64 res2; /* secondary result */ |
63 | }; | 63 | }; |
64 | 64 | ||
65 | #if defined(__LITTLE_ENDIAN) | 65 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
66 | #define PADDED(x,y) x, y | 66 | #define PADDED(x,y) x, y |
67 | #elif defined(__BIG_ENDIAN) | 67 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
68 | #define PADDED(x,y) y, x | 68 | #define PADDED(x,y) y, x |
69 | #else | 69 | #else |
70 | #error edit for your odd byteorder. | 70 | #error edit for your odd byteorder. |
diff --git a/include/uapi/linux/connector.h b/include/uapi/linux/connector.h index 8761a0349c74..4cb283505e45 100644 --- a/include/uapi/linux/connector.h +++ b/include/uapi/linux/connector.h | |||
@@ -44,8 +44,11 @@ | |||
44 | #define CN_VAL_DRBD 0x1 | 44 | #define CN_VAL_DRBD 0x1 |
45 | #define CN_KVP_IDX 0x9 /* HyperV KVP */ | 45 | #define CN_KVP_IDX 0x9 /* HyperV KVP */ |
46 | #define CN_KVP_VAL 0x1 /* queries from the kernel */ | 46 | #define CN_KVP_VAL 0x1 /* queries from the kernel */ |
47 | #define CN_VSS_IDX 0xA /* HyperV VSS */ | ||
48 | #define CN_VSS_VAL 0x1 /* queries from the kernel */ | ||
47 | 49 | ||
48 | #define CN_NETLINK_USERS 10 /* Highest index + 1 */ | 50 | |
51 | #define CN_NETLINK_USERS 11 /* Highest index + 1 */ | ||
49 | 52 | ||
50 | /* | 53 | /* |
51 | * Maximum connector's message size. | 54 | * Maximum connector's message size. |
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index c7fc1e6517c3..a4ed56cf0eac 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
@@ -88,7 +88,6 @@ struct inodes_stat_t { | |||
88 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ | 88 | #define MS_STRICTATIME (1<<24) /* Always perform atime updates */ |
89 | 89 | ||
90 | /* These sb flags are internal to the kernel */ | 90 | /* These sb flags are internal to the kernel */ |
91 | #define MS_SNAP_STABLE (1<<27) /* Snapshot pages during writeback, if needed */ | ||
92 | #define MS_NOSEC (1<<28) | 91 | #define MS_NOSEC (1<<28) |
93 | #define MS_BORN (1<<29) | 92 | #define MS_BORN (1<<29) |
94 | #define MS_ACTIVE (1<<30) | 93 | #define MS_ACTIVE (1<<30) |
diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index 4c43b4448792..706d035fa748 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h | |||
@@ -95,15 +95,10 @@ | |||
95 | #ifndef _LINUX_FUSE_H | 95 | #ifndef _LINUX_FUSE_H |
96 | #define _LINUX_FUSE_H | 96 | #define _LINUX_FUSE_H |
97 | 97 | ||
98 | #ifdef __linux__ | 98 | #ifdef __KERNEL__ |
99 | #include <linux/types.h> | 99 | #include <linux/types.h> |
100 | #else | 100 | #else |
101 | #include <stdint.h> | 101 | #include <stdint.h> |
102 | #define __u64 uint64_t | ||
103 | #define __s64 int64_t | ||
104 | #define __u32 uint32_t | ||
105 | #define __s32 int32_t | ||
106 | #define __u16 uint16_t | ||
107 | #endif | 102 | #endif |
108 | 103 | ||
109 | /* | 104 | /* |
@@ -139,42 +134,42 @@ | |||
139 | userspace works under 64bit kernels */ | 134 | userspace works under 64bit kernels */ |
140 | 135 | ||
141 | struct fuse_attr { | 136 | struct fuse_attr { |
142 | __u64 ino; | 137 | uint64_t ino; |
143 | __u64 size; | 138 | uint64_t size; |
144 | __u64 blocks; | 139 | uint64_t blocks; |
145 | __u64 atime; | 140 | uint64_t atime; |
146 | __u64 mtime; | 141 | uint64_t mtime; |
147 | __u64 ctime; | 142 | uint64_t ctime; |
148 | __u32 atimensec; | 143 | uint32_t atimensec; |
149 | __u32 mtimensec; | 144 | uint32_t mtimensec; |
150 | __u32 ctimensec; | 145 | uint32_t ctimensec; |
151 | __u32 mode; | 146 | uint32_t mode; |
152 | __u32 nlink; | 147 | uint32_t nlink; |
153 | __u32 uid; | 148 | uint32_t uid; |
154 | __u32 gid; | 149 | uint32_t gid; |
155 | __u32 rdev; | 150 | uint32_t rdev; |
156 | __u32 blksize; | 151 | uint32_t blksize; |
157 | __u32 padding; | 152 | uint32_t padding; |
158 | }; | 153 | }; |
159 | 154 | ||
160 | struct fuse_kstatfs { | 155 | struct fuse_kstatfs { |
161 | __u64 blocks; | 156 | uint64_t blocks; |
162 | __u64 bfree; | 157 | uint64_t bfree; |
163 | __u64 bavail; | 158 | uint64_t bavail; |
164 | __u64 files; | 159 | uint64_t files; |
165 | __u64 ffree; | 160 | uint64_t ffree; |
166 | __u32 bsize; | 161 | uint32_t bsize; |
167 | __u32 namelen; | 162 | uint32_t namelen; |
168 | __u32 frsize; | 163 | uint32_t frsize; |
169 | __u32 padding; | 164 | uint32_t padding; |
170 | __u32 spare[6]; | 165 | uint32_t spare[6]; |
171 | }; | 166 | }; |
172 | 167 | ||
173 | struct fuse_file_lock { | 168 | struct fuse_file_lock { |
174 | __u64 start; | 169 | uint64_t start; |
175 | __u64 end; | 170 | uint64_t end; |
176 | __u32 type; | 171 | uint32_t type; |
177 | __u32 pid; /* tgid */ | 172 | uint32_t pid; /* tgid */ |
178 | }; | 173 | }; |
179 | 174 | ||
180 | /** | 175 | /** |
@@ -364,143 +359,143 @@ enum fuse_notify_code { | |||
364 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 | 359 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 |
365 | 360 | ||
366 | struct fuse_entry_out { | 361 | struct fuse_entry_out { |
367 | __u64 nodeid; /* Inode ID */ | 362 | uint64_t nodeid; /* Inode ID */ |
368 | __u64 generation; /* Inode generation: nodeid:gen must | 363 | uint64_t generation; /* Inode generation: nodeid:gen must |
369 | be unique for the fs's lifetime */ | 364 | be unique for the fs's lifetime */ |
370 | __u64 entry_valid; /* Cache timeout for the name */ | 365 | uint64_t entry_valid; /* Cache timeout for the name */ |
371 | __u64 attr_valid; /* Cache timeout for the attributes */ | 366 | uint64_t attr_valid; /* Cache timeout for the attributes */ |
372 | __u32 entry_valid_nsec; | 367 | uint32_t entry_valid_nsec; |
373 | __u32 attr_valid_nsec; | 368 | uint32_t attr_valid_nsec; |
374 | struct fuse_attr attr; | 369 | struct fuse_attr attr; |
375 | }; | 370 | }; |
376 | 371 | ||
377 | struct fuse_forget_in { | 372 | struct fuse_forget_in { |
378 | __u64 nlookup; | 373 | uint64_t nlookup; |
379 | }; | 374 | }; |
380 | 375 | ||
381 | struct fuse_forget_one { | 376 | struct fuse_forget_one { |
382 | __u64 nodeid; | 377 | uint64_t nodeid; |
383 | __u64 nlookup; | 378 | uint64_t nlookup; |
384 | }; | 379 | }; |
385 | 380 | ||
386 | struct fuse_batch_forget_in { | 381 | struct fuse_batch_forget_in { |
387 | __u32 count; | 382 | uint32_t count; |
388 | __u32 dummy; | 383 | uint32_t dummy; |
389 | }; | 384 | }; |
390 | 385 | ||
391 | struct fuse_getattr_in { | 386 | struct fuse_getattr_in { |
392 | __u32 getattr_flags; | 387 | uint32_t getattr_flags; |
393 | __u32 dummy; | 388 | uint32_t dummy; |
394 | __u64 fh; | 389 | uint64_t fh; |
395 | }; | 390 | }; |
396 | 391 | ||
397 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 | 392 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 |
398 | 393 | ||
399 | struct fuse_attr_out { | 394 | struct fuse_attr_out { |
400 | __u64 attr_valid; /* Cache timeout for the attributes */ | 395 | uint64_t attr_valid; /* Cache timeout for the attributes */ |
401 | __u32 attr_valid_nsec; | 396 | uint32_t attr_valid_nsec; |
402 | __u32 dummy; | 397 | uint32_t dummy; |
403 | struct fuse_attr attr; | 398 | struct fuse_attr attr; |
404 | }; | 399 | }; |
405 | 400 | ||
406 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 | 401 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 |
407 | 402 | ||
408 | struct fuse_mknod_in { | 403 | struct fuse_mknod_in { |
409 | __u32 mode; | 404 | uint32_t mode; |
410 | __u32 rdev; | 405 | uint32_t rdev; |
411 | __u32 umask; | 406 | uint32_t umask; |
412 | __u32 padding; | 407 | uint32_t padding; |
413 | }; | 408 | }; |
414 | 409 | ||
415 | struct fuse_mkdir_in { | 410 | struct fuse_mkdir_in { |
416 | __u32 mode; | 411 | uint32_t mode; |
417 | __u32 umask; | 412 | uint32_t umask; |
418 | }; | 413 | }; |
419 | 414 | ||
420 | struct fuse_rename_in { | 415 | struct fuse_rename_in { |
421 | __u64 newdir; | 416 | uint64_t newdir; |
422 | }; | 417 | }; |
423 | 418 | ||
424 | struct fuse_link_in { | 419 | struct fuse_link_in { |
425 | __u64 oldnodeid; | 420 | uint64_t oldnodeid; |
426 | }; | 421 | }; |
427 | 422 | ||
428 | struct fuse_setattr_in { | 423 | struct fuse_setattr_in { |
429 | __u32 valid; | 424 | uint32_t valid; |
430 | __u32 padding; | 425 | uint32_t padding; |
431 | __u64 fh; | 426 | uint64_t fh; |
432 | __u64 size; | 427 | uint64_t size; |
433 | __u64 lock_owner; | 428 | uint64_t lock_owner; |
434 | __u64 atime; | 429 | uint64_t atime; |
435 | __u64 mtime; | 430 | uint64_t mtime; |
436 | __u64 unused2; | 431 | uint64_t unused2; |
437 | __u32 atimensec; | 432 | uint32_t atimensec; |
438 | __u32 mtimensec; | 433 | uint32_t mtimensec; |
439 | __u32 unused3; | 434 | uint32_t unused3; |
440 | __u32 mode; | 435 | uint32_t mode; |
441 | __u32 unused4; | 436 | uint32_t unused4; |
442 | __u32 uid; | 437 | uint32_t uid; |
443 | __u32 gid; | 438 | uint32_t gid; |
444 | __u32 unused5; | 439 | uint32_t unused5; |
445 | }; | 440 | }; |
446 | 441 | ||
447 | struct fuse_open_in { | 442 | struct fuse_open_in { |
448 | __u32 flags; | 443 | uint32_t flags; |
449 | __u32 unused; | 444 | uint32_t unused; |
450 | }; | 445 | }; |
451 | 446 | ||
452 | struct fuse_create_in { | 447 | struct fuse_create_in { |
453 | __u32 flags; | 448 | uint32_t flags; |
454 | __u32 mode; | 449 | uint32_t mode; |
455 | __u32 umask; | 450 | uint32_t umask; |
456 | __u32 padding; | 451 | uint32_t padding; |
457 | }; | 452 | }; |
458 | 453 | ||
459 | struct fuse_open_out { | 454 | struct fuse_open_out { |
460 | __u64 fh; | 455 | uint64_t fh; |
461 | __u32 open_flags; | 456 | uint32_t open_flags; |
462 | __u32 padding; | 457 | uint32_t padding; |
463 | }; | 458 | }; |
464 | 459 | ||
465 | struct fuse_release_in { | 460 | struct fuse_release_in { |
466 | __u64 fh; | 461 | uint64_t fh; |
467 | __u32 flags; | 462 | uint32_t flags; |
468 | __u32 release_flags; | 463 | uint32_t release_flags; |
469 | __u64 lock_owner; | 464 | uint64_t lock_owner; |
470 | }; | 465 | }; |
471 | 466 | ||
472 | struct fuse_flush_in { | 467 | struct fuse_flush_in { |
473 | __u64 fh; | 468 | uint64_t fh; |
474 | __u32 unused; | 469 | uint32_t unused; |
475 | __u32 padding; | 470 | uint32_t padding; |
476 | __u64 lock_owner; | 471 | uint64_t lock_owner; |
477 | }; | 472 | }; |
478 | 473 | ||
479 | struct fuse_read_in { | 474 | struct fuse_read_in { |
480 | __u64 fh; | 475 | uint64_t fh; |
481 | __u64 offset; | 476 | uint64_t offset; |
482 | __u32 size; | 477 | uint32_t size; |
483 | __u32 read_flags; | 478 | uint32_t read_flags; |
484 | __u64 lock_owner; | 479 | uint64_t lock_owner; |
485 | __u32 flags; | 480 | uint32_t flags; |
486 | __u32 padding; | 481 | uint32_t padding; |
487 | }; | 482 | }; |
488 | 483 | ||
489 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 | 484 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 |
490 | 485 | ||
491 | struct fuse_write_in { | 486 | struct fuse_write_in { |
492 | __u64 fh; | 487 | uint64_t fh; |
493 | __u64 offset; | 488 | uint64_t offset; |
494 | __u32 size; | 489 | uint32_t size; |
495 | __u32 write_flags; | 490 | uint32_t write_flags; |
496 | __u64 lock_owner; | 491 | uint64_t lock_owner; |
497 | __u32 flags; | 492 | uint32_t flags; |
498 | __u32 padding; | 493 | uint32_t padding; |
499 | }; | 494 | }; |
500 | 495 | ||
501 | struct fuse_write_out { | 496 | struct fuse_write_out { |
502 | __u32 size; | 497 | uint32_t size; |
503 | __u32 padding; | 498 | uint32_t padding; |
504 | }; | 499 | }; |
505 | 500 | ||
506 | #define FUSE_COMPAT_STATFS_SIZE 48 | 501 | #define FUSE_COMPAT_STATFS_SIZE 48 |
@@ -510,32 +505,32 @@ struct fuse_statfs_out { | |||
510 | }; | 505 | }; |
511 | 506 | ||
512 | struct fuse_fsync_in { | 507 | struct fuse_fsync_in { |
513 | __u64 fh; | 508 | uint64_t fh; |
514 | __u32 fsync_flags; | 509 | uint32_t fsync_flags; |
515 | __u32 padding; | 510 | uint32_t padding; |
516 | }; | 511 | }; |
517 | 512 | ||
518 | struct fuse_setxattr_in { | 513 | struct fuse_setxattr_in { |
519 | __u32 size; | 514 | uint32_t size; |
520 | __u32 flags; | 515 | uint32_t flags; |
521 | }; | 516 | }; |
522 | 517 | ||
523 | struct fuse_getxattr_in { | 518 | struct fuse_getxattr_in { |
524 | __u32 size; | 519 | uint32_t size; |
525 | __u32 padding; | 520 | uint32_t padding; |
526 | }; | 521 | }; |
527 | 522 | ||
528 | struct fuse_getxattr_out { | 523 | struct fuse_getxattr_out { |
529 | __u32 size; | 524 | uint32_t size; |
530 | __u32 padding; | 525 | uint32_t padding; |
531 | }; | 526 | }; |
532 | 527 | ||
533 | struct fuse_lk_in { | 528 | struct fuse_lk_in { |
534 | __u64 fh; | 529 | uint64_t fh; |
535 | __u64 owner; | 530 | uint64_t owner; |
536 | struct fuse_file_lock lk; | 531 | struct fuse_file_lock lk; |
537 | __u32 lk_flags; | 532 | uint32_t lk_flags; |
538 | __u32 padding; | 533 | uint32_t padding; |
539 | }; | 534 | }; |
540 | 535 | ||
541 | struct fuse_lk_out { | 536 | struct fuse_lk_out { |
@@ -543,134 +538,135 @@ struct fuse_lk_out { | |||
543 | }; | 538 | }; |
544 | 539 | ||
545 | struct fuse_access_in { | 540 | struct fuse_access_in { |
546 | __u32 mask; | 541 | uint32_t mask; |
547 | __u32 padding; | 542 | uint32_t padding; |
548 | }; | 543 | }; |
549 | 544 | ||
550 | struct fuse_init_in { | 545 | struct fuse_init_in { |
551 | __u32 major; | 546 | uint32_t major; |
552 | __u32 minor; | 547 | uint32_t minor; |
553 | __u32 max_readahead; | 548 | uint32_t max_readahead; |
554 | __u32 flags; | 549 | uint32_t flags; |
555 | }; | 550 | }; |
556 | 551 | ||
557 | struct fuse_init_out { | 552 | struct fuse_init_out { |
558 | __u32 major; | 553 | uint32_t major; |
559 | __u32 minor; | 554 | uint32_t minor; |
560 | __u32 max_readahead; | 555 | uint32_t max_readahead; |
561 | __u32 flags; | 556 | uint32_t flags; |
562 | __u16 max_background; | 557 | uint16_t max_background; |
563 | __u16 congestion_threshold; | 558 | uint16_t congestion_threshold; |
564 | __u32 max_write; | 559 | uint32_t max_write; |
565 | }; | 560 | }; |
566 | 561 | ||
567 | #define CUSE_INIT_INFO_MAX 4096 | 562 | #define CUSE_INIT_INFO_MAX 4096 |
568 | 563 | ||
569 | struct cuse_init_in { | 564 | struct cuse_init_in { |
570 | __u32 major; | 565 | uint32_t major; |
571 | __u32 minor; | 566 | uint32_t minor; |
572 | __u32 unused; | 567 | uint32_t unused; |
573 | __u32 flags; | 568 | uint32_t flags; |
574 | }; | 569 | }; |
575 | 570 | ||
576 | struct cuse_init_out { | 571 | struct cuse_init_out { |
577 | __u32 major; | 572 | uint32_t major; |
578 | __u32 minor; | 573 | uint32_t minor; |
579 | __u32 unused; | 574 | uint32_t unused; |
580 | __u32 flags; | 575 | uint32_t flags; |
581 | __u32 max_read; | 576 | uint32_t max_read; |
582 | __u32 max_write; | 577 | uint32_t max_write; |
583 | __u32 dev_major; /* chardev major */ | 578 | uint32_t dev_major; /* chardev major */ |
584 | __u32 dev_minor; /* chardev minor */ | 579 | uint32_t dev_minor; /* chardev minor */ |
585 | __u32 spare[10]; | 580 | uint32_t spare[10]; |
586 | }; | 581 | }; |
587 | 582 | ||
588 | struct fuse_interrupt_in { | 583 | struct fuse_interrupt_in { |
589 | __u64 unique; | 584 | uint64_t unique; |
590 | }; | 585 | }; |
591 | 586 | ||
592 | struct fuse_bmap_in { | 587 | struct fuse_bmap_in { |
593 | __u64 block; | 588 | uint64_t block; |
594 | __u32 blocksize; | 589 | uint32_t blocksize; |
595 | __u32 padding; | 590 | uint32_t padding; |
596 | }; | 591 | }; |
597 | 592 | ||
598 | struct fuse_bmap_out { | 593 | struct fuse_bmap_out { |
599 | __u64 block; | 594 | uint64_t block; |
600 | }; | 595 | }; |
601 | 596 | ||
602 | struct fuse_ioctl_in { | 597 | struct fuse_ioctl_in { |
603 | __u64 fh; | 598 | uint64_t fh; |
604 | __u32 flags; | 599 | uint32_t flags; |
605 | __u32 cmd; | 600 | uint32_t cmd; |
606 | __u64 arg; | 601 | uint64_t arg; |
607 | __u32 in_size; | 602 | uint32_t in_size; |
608 | __u32 out_size; | 603 | uint32_t out_size; |
609 | }; | 604 | }; |
610 | 605 | ||
611 | struct fuse_ioctl_iovec { | 606 | struct fuse_ioctl_iovec { |
612 | __u64 base; | 607 | uint64_t base; |
613 | __u64 len; | 608 | uint64_t len; |
614 | }; | 609 | }; |
615 | 610 | ||
616 | struct fuse_ioctl_out { | 611 | struct fuse_ioctl_out { |
617 | __s32 result; | 612 | int32_t result; |
618 | __u32 flags; | 613 | uint32_t flags; |
619 | __u32 in_iovs; | 614 | uint32_t in_iovs; |
620 | __u32 out_iovs; | 615 | uint32_t out_iovs; |
621 | }; | 616 | }; |
622 | 617 | ||
623 | struct fuse_poll_in { | 618 | struct fuse_poll_in { |
624 | __u64 fh; | 619 | uint64_t fh; |
625 | __u64 kh; | 620 | uint64_t kh; |
626 | __u32 flags; | 621 | uint32_t flags; |
627 | __u32 events; | 622 | uint32_t events; |
628 | }; | 623 | }; |
629 | 624 | ||
630 | struct fuse_poll_out { | 625 | struct fuse_poll_out { |
631 | __u32 revents; | 626 | uint32_t revents; |
632 | __u32 padding; | 627 | uint32_t padding; |
633 | }; | 628 | }; |
634 | 629 | ||
635 | struct fuse_notify_poll_wakeup_out { | 630 | struct fuse_notify_poll_wakeup_out { |
636 | __u64 kh; | 631 | uint64_t kh; |
637 | }; | 632 | }; |
638 | 633 | ||
639 | struct fuse_fallocate_in { | 634 | struct fuse_fallocate_in { |
640 | __u64 fh; | 635 | uint64_t fh; |
641 | __u64 offset; | 636 | uint64_t offset; |
642 | __u64 length; | 637 | uint64_t length; |
643 | __u32 mode; | 638 | uint32_t mode; |
644 | __u32 padding; | 639 | uint32_t padding; |
645 | }; | 640 | }; |
646 | 641 | ||
647 | struct fuse_in_header { | 642 | struct fuse_in_header { |
648 | __u32 len; | 643 | uint32_t len; |
649 | __u32 opcode; | 644 | uint32_t opcode; |
650 | __u64 unique; | 645 | uint64_t unique; |
651 | __u64 nodeid; | 646 | uint64_t nodeid; |
652 | __u32 uid; | 647 | uint32_t uid; |
653 | __u32 gid; | 648 | uint32_t gid; |
654 | __u32 pid; | 649 | uint32_t pid; |
655 | __u32 padding; | 650 | uint32_t padding; |
656 | }; | 651 | }; |
657 | 652 | ||
658 | struct fuse_out_header { | 653 | struct fuse_out_header { |
659 | __u32 len; | 654 | uint32_t len; |
660 | __s32 error; | 655 | int32_t error; |
661 | __u64 unique; | 656 | uint64_t unique; |
662 | }; | 657 | }; |
663 | 658 | ||
664 | struct fuse_dirent { | 659 | struct fuse_dirent { |
665 | __u64 ino; | 660 | uint64_t ino; |
666 | __u64 off; | 661 | uint64_t off; |
667 | __u32 namelen; | 662 | uint32_t namelen; |
668 | __u32 type; | 663 | uint32_t type; |
669 | char name[]; | 664 | char name[]; |
670 | }; | 665 | }; |
671 | 666 | ||
672 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) | 667 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
673 | #define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1)) | 668 | #define FUSE_DIRENT_ALIGN(x) \ |
669 | (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) | ||
674 | #define FUSE_DIRENT_SIZE(d) \ | 670 | #define FUSE_DIRENT_SIZE(d) \ |
675 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) | 671 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
676 | 672 | ||
@@ -685,47 +681,47 @@ struct fuse_direntplus { | |||
685 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) | 681 | FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) |
686 | 682 | ||
687 | struct fuse_notify_inval_inode_out { | 683 | struct fuse_notify_inval_inode_out { |
688 | __u64 ino; | 684 | uint64_t ino; |
689 | __s64 off; | 685 | int64_t off; |
690 | __s64 len; | 686 | int64_t len; |
691 | }; | 687 | }; |
692 | 688 | ||
693 | struct fuse_notify_inval_entry_out { | 689 | struct fuse_notify_inval_entry_out { |
694 | __u64 parent; | 690 | uint64_t parent; |
695 | __u32 namelen; | 691 | uint32_t namelen; |
696 | __u32 padding; | 692 | uint32_t padding; |
697 | }; | 693 | }; |
698 | 694 | ||
699 | struct fuse_notify_delete_out { | 695 | struct fuse_notify_delete_out { |
700 | __u64 parent; | 696 | uint64_t parent; |
701 | __u64 child; | 697 | uint64_t child; |
702 | __u32 namelen; | 698 | uint32_t namelen; |
703 | __u32 padding; | 699 | uint32_t padding; |
704 | }; | 700 | }; |
705 | 701 | ||
706 | struct fuse_notify_store_out { | 702 | struct fuse_notify_store_out { |
707 | __u64 nodeid; | 703 | uint64_t nodeid; |
708 | __u64 offset; | 704 | uint64_t offset; |
709 | __u32 size; | 705 | uint32_t size; |
710 | __u32 padding; | 706 | uint32_t padding; |
711 | }; | 707 | }; |
712 | 708 | ||
713 | struct fuse_notify_retrieve_out { | 709 | struct fuse_notify_retrieve_out { |
714 | __u64 notify_unique; | 710 | uint64_t notify_unique; |
715 | __u64 nodeid; | 711 | uint64_t nodeid; |
716 | __u64 offset; | 712 | uint64_t offset; |
717 | __u32 size; | 713 | uint32_t size; |
718 | __u32 padding; | 714 | uint32_t padding; |
719 | }; | 715 | }; |
720 | 716 | ||
721 | /* Matches the size of fuse_write_in */ | 717 | /* Matches the size of fuse_write_in */ |
722 | struct fuse_notify_retrieve_in { | 718 | struct fuse_notify_retrieve_in { |
723 | __u64 dummy1; | 719 | uint64_t dummy1; |
724 | __u64 offset; | 720 | uint64_t offset; |
725 | __u32 size; | 721 | uint32_t size; |
726 | __u32 dummy2; | 722 | uint32_t dummy2; |
727 | __u64 dummy3; | 723 | uint64_t dummy3; |
728 | __u64 dummy4; | 724 | uint64_t dummy4; |
729 | }; | 725 | }; |
730 | 726 | ||
731 | #endif /* _LINUX_FUSE_H */ | 727 | #endif /* _LINUX_FUSE_H */ |
diff --git a/include/uapi/linux/packet_diag.h b/include/uapi/linux/packet_diag.h index 93f5fa94a431..afafd703ad92 100644 --- a/include/uapi/linux/packet_diag.h +++ b/include/uapi/linux/packet_diag.h | |||
@@ -33,9 +33,11 @@ enum { | |||
33 | PACKET_DIAG_TX_RING, | 33 | PACKET_DIAG_TX_RING, |
34 | PACKET_DIAG_FANOUT, | 34 | PACKET_DIAG_FANOUT, |
35 | 35 | ||
36 | PACKET_DIAG_MAX, | 36 | __PACKET_DIAG_MAX, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1) | ||
40 | |||
39 | struct packet_diag_info { | 41 | struct packet_diag_info { |
40 | __u32 pdi_index; | 42 | __u32 pdi_index; |
41 | __u32 pdi_version; | 43 | __u32 pdi_version; |
diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index ebfadc56d1b4..864e324da80d 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h | |||
@@ -292,12 +292,12 @@ | |||
292 | 292 | ||
293 | /* Message Signalled Interrupts registers */ | 293 | /* Message Signalled Interrupts registers */ |
294 | 294 | ||
295 | #define PCI_MSI_FLAGS 2 /* Various flags */ | 295 | #define PCI_MSI_FLAGS 2 /* Message Control */ |
296 | #define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ | 296 | #define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */ |
297 | #define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ | 297 | #define PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */ |
298 | #define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ | 298 | #define PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */ |
299 | #define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ | 299 | #define PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */ |
300 | #define PCI_MSI_FLAGS_MASKBIT 0x100 /* 64-bit mask bits allowed */ | 300 | #define PCI_MSI_FLAGS_MASKBIT 0x0100 /* Per-vector masking capable */ |
301 | #define PCI_MSI_RFU 3 /* Rest of capability flags */ | 301 | #define PCI_MSI_RFU 3 /* Rest of capability flags */ |
302 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ | 302 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ |
303 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ | 303 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ |
@@ -309,13 +309,17 @@ | |||
309 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ | 309 | #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ |
310 | 310 | ||
311 | /* MSI-X registers */ | 311 | /* MSI-X registers */ |
312 | #define PCI_MSIX_FLAGS 2 | 312 | #define PCI_MSIX_FLAGS 2 /* Message Control */ |
313 | #define PCI_MSIX_FLAGS_QSIZE 0x7FF | 313 | #define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */ |
314 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | 314 | #define PCI_MSIX_FLAGS_MASKALL 0x4000 /* Mask all vectors for this function */ |
315 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) | 315 | #define PCI_MSIX_FLAGS_ENABLE 0x8000 /* MSI-X enable */ |
316 | #define PCI_MSIX_TABLE 4 | 316 | #define PCI_MSIX_TABLE 4 /* Table offset */ |
317 | #define PCI_MSIX_PBA 8 | 317 | #define PCI_MSIX_TABLE_BIR 0x00000007 /* BAR index */ |
318 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 318 | #define PCI_MSIX_TABLE_OFFSET 0xfffffff8 /* Offset into specified BAR */ |
319 | #define PCI_MSIX_PBA 8 /* Pending Bit Array offset */ | ||
320 | #define PCI_MSIX_PBA_BIR 0x00000007 /* BAR index */ | ||
321 | #define PCI_MSIX_PBA_OFFSET 0xfffffff8 /* Offset into specified BAR */ | ||
322 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) /* deprecated */ | ||
319 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ | 323 | #define PCI_CAP_MSIX_SIZEOF 12 /* size of MSIX registers */ |
320 | 324 | ||
321 | /* MSI-X entry's format */ | 325 | /* MSI-X entry's format */ |
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9fa9c622a7f4..fb104e51496e 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
@@ -132,8 +132,10 @@ enum perf_event_sample_format { | |||
132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, | 132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, |
133 | PERF_SAMPLE_REGS_USER = 1U << 12, | 133 | PERF_SAMPLE_REGS_USER = 1U << 12, |
134 | PERF_SAMPLE_STACK_USER = 1U << 13, | 134 | PERF_SAMPLE_STACK_USER = 1U << 13, |
135 | PERF_SAMPLE_WEIGHT = 1U << 14, | ||
136 | PERF_SAMPLE_DATA_SRC = 1U << 15, | ||
135 | 137 | ||
136 | PERF_SAMPLE_MAX = 1U << 14, /* non-ABI */ | 138 | PERF_SAMPLE_MAX = 1U << 16, /* non-ABI */ |
137 | }; | 139 | }; |
138 | 140 | ||
139 | /* | 141 | /* |
@@ -443,6 +445,7 @@ struct perf_event_mmap_page { | |||
443 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) | 445 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) |
444 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) | 446 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) |
445 | 447 | ||
448 | #define PERF_RECORD_MISC_MMAP_DATA (1 << 13) | ||
446 | /* | 449 | /* |
447 | * Indicates that the content of PERF_SAMPLE_IP points to | 450 | * Indicates that the content of PERF_SAMPLE_IP points to |
448 | * the actual instruction that triggered the event. See also | 451 | * the actual instruction that triggered the event. See also |
@@ -588,6 +591,9 @@ enum perf_event_type { | |||
588 | * { u64 size; | 591 | * { u64 size; |
589 | * char data[size]; | 592 | * char data[size]; |
590 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER | 593 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER |
594 | * | ||
595 | * { u64 weight; } && PERF_SAMPLE_WEIGHT | ||
596 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | ||
591 | * }; | 597 | * }; |
592 | */ | 598 | */ |
593 | PERF_RECORD_SAMPLE = 9, | 599 | PERF_RECORD_SAMPLE = 9, |
@@ -613,4 +619,67 @@ enum perf_callchain_context { | |||
613 | #define PERF_FLAG_FD_OUTPUT (1U << 1) | 619 | #define PERF_FLAG_FD_OUTPUT (1U << 1) |
614 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ | 620 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ |
615 | 621 | ||
622 | union perf_mem_data_src { | ||
623 | __u64 val; | ||
624 | struct { | ||
625 | __u64 mem_op:5, /* type of opcode */ | ||
626 | mem_lvl:14, /* memory hierarchy level */ | ||
627 | mem_snoop:5, /* snoop mode */ | ||
628 | mem_lock:2, /* lock instr */ | ||
629 | mem_dtlb:7, /* tlb access */ | ||
630 | mem_rsvd:31; | ||
631 | }; | ||
632 | }; | ||
633 | |||
634 | /* type of opcode (load/store/prefetch,code) */ | ||
635 | #define PERF_MEM_OP_NA 0x01 /* not available */ | ||
636 | #define PERF_MEM_OP_LOAD 0x02 /* load instruction */ | ||
637 | #define PERF_MEM_OP_STORE 0x04 /* store instruction */ | ||
638 | #define PERF_MEM_OP_PFETCH 0x08 /* prefetch */ | ||
639 | #define PERF_MEM_OP_EXEC 0x10 /* code (execution) */ | ||
640 | #define PERF_MEM_OP_SHIFT 0 | ||
641 | |||
642 | /* memory hierarchy (memory level, hit or miss) */ | ||
643 | #define PERF_MEM_LVL_NA 0x01 /* not available */ | ||
644 | #define PERF_MEM_LVL_HIT 0x02 /* hit level */ | ||
645 | #define PERF_MEM_LVL_MISS 0x04 /* miss level */ | ||
646 | #define PERF_MEM_LVL_L1 0x08 /* L1 */ | ||
647 | #define PERF_MEM_LVL_LFB 0x10 /* Line Fill Buffer */ | ||
648 | #define PERF_MEM_LVL_L2 0x20 /* L2 */ | ||
649 | #define PERF_MEM_LVL_L3 0x40 /* L3 */ | ||
650 | #define PERF_MEM_LVL_LOC_RAM 0x80 /* Local DRAM */ | ||
651 | #define PERF_MEM_LVL_REM_RAM1 0x100 /* Remote DRAM (1 hop) */ | ||
652 | #define PERF_MEM_LVL_REM_RAM2 0x200 /* Remote DRAM (2 hops) */ | ||
653 | #define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop) */ | ||
654 | #define PERF_MEM_LVL_REM_CCE2 0x800 /* Remote Cache (2 hops) */ | ||
655 | #define PERF_MEM_LVL_IO 0x1000 /* I/O memory */ | ||
656 | #define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ | ||
657 | #define PERF_MEM_LVL_SHIFT 5 | ||
658 | |||
659 | /* snoop mode */ | ||
660 | #define PERF_MEM_SNOOP_NA 0x01 /* not available */ | ||
661 | #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ | ||
662 | #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ | ||
663 | #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ | ||
664 | #define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ | ||
665 | #define PERF_MEM_SNOOP_SHIFT 19 | ||
666 | |||
667 | /* locked instruction */ | ||
668 | #define PERF_MEM_LOCK_NA 0x01 /* not available */ | ||
669 | #define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ | ||
670 | #define PERF_MEM_LOCK_SHIFT 24 | ||
671 | |||
672 | /* TLB access */ | ||
673 | #define PERF_MEM_TLB_NA 0x01 /* not available */ | ||
674 | #define PERF_MEM_TLB_HIT 0x02 /* hit level */ | ||
675 | #define PERF_MEM_TLB_MISS 0x04 /* miss level */ | ||
676 | #define PERF_MEM_TLB_L1 0x08 /* L1 */ | ||
677 | #define PERF_MEM_TLB_L2 0x10 /* L2 */ | ||
678 | #define PERF_MEM_TLB_WK 0x20 /* Hardware Walker*/ | ||
679 | #define PERF_MEM_TLB_OS 0x40 /* OS fault handler */ | ||
680 | #define PERF_MEM_TLB_SHIFT 26 | ||
681 | |||
682 | #define PERF_MEM_S(a, s) \ | ||
683 | (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) | ||
684 | |||
616 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ | 685 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ |
diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h index ee753536ab70..fe1a5406d4d9 100644 --- a/include/uapi/linux/raid/md_p.h +++ b/include/uapi/linux/raid/md_p.h | |||
@@ -145,16 +145,18 @@ typedef struct mdp_superblock_s { | |||
145 | __u32 failed_disks; /* 4 Number of failed disks */ | 145 | __u32 failed_disks; /* 4 Number of failed disks */ |
146 | __u32 spare_disks; /* 5 Number of spare disks */ | 146 | __u32 spare_disks; /* 5 Number of spare disks */ |
147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ | 147 | __u32 sb_csum; /* 6 checksum of the whole superblock */ |
148 | #ifdef __BIG_ENDIAN | 148 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
149 | __u32 events_hi; /* 7 high-order of superblock update count */ | 149 | __u32 events_hi; /* 7 high-order of superblock update count */ |
150 | __u32 events_lo; /* 8 low-order of superblock update count */ | 150 | __u32 events_lo; /* 8 low-order of superblock update count */ |
151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ | 151 | __u32 cp_events_hi; /* 9 high-order of checkpoint update count */ |
152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ | 152 | __u32 cp_events_lo; /* 10 low-order of checkpoint update count */ |
153 | #else | 153 | #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) |
154 | __u32 events_lo; /* 7 low-order of superblock update count */ | 154 | __u32 events_lo; /* 7 low-order of superblock update count */ |
155 | __u32 events_hi; /* 8 high-order of superblock update count */ | 155 | __u32 events_hi; /* 8 high-order of superblock update count */ |
156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ | 156 | __u32 cp_events_lo; /* 9 low-order of checkpoint update count */ |
157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ | 157 | __u32 cp_events_hi; /* 10 high-order of checkpoint update count */ |
158 | #else | ||
159 | #error unspecified endianness | ||
158 | #endif | 160 | #endif |
159 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ | 161 | __u32 recovery_cp; /* 11 recovery checkpoint sector count */ |
160 | /* There are only valid for minor_version > 90 */ | 162 | /* There are only valid for minor_version > 90 */ |
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index b6a23a483d74..74c2bf7211f8 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h | |||
@@ -51,7 +51,10 @@ | |||
51 | #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ | 51 | #define PORT_8250_CIR 23 /* CIR infrared port, has its own driver */ |
52 | #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ | 52 | #define PORT_XR17V35X 24 /* Exar XR17V35x UARTs */ |
53 | #define PORT_BRCM_TRUMANAGE 25 | 53 | #define PORT_BRCM_TRUMANAGE 25 |
54 | #define PORT_MAX_8250 25 /* max port ID */ | 54 | #define PORT_ALTR_16550_F32 26 /* Altera 16550 UART with 32 FIFOs */ |
55 | #define PORT_ALTR_16550_F64 27 /* Altera 16550 UART with 64 FIFOs */ | ||
56 | #define PORT_ALTR_16550_F128 28 /* Altera 16550 UART with 128 FIFOs */ | ||
57 | #define PORT_MAX_8250 28 /* max port ID */ | ||
55 | 58 | ||
56 | /* | 59 | /* |
57 | * ARM specific type numbers. These are not currently guaranteed | 60 | * ARM specific type numbers. These are not currently guaranteed |
diff --git a/include/uapi/linux/unix_diag.h b/include/uapi/linux/unix_diag.h index b8a24941db21..b9e2a6a7446f 100644 --- a/include/uapi/linux/unix_diag.h +++ b/include/uapi/linux/unix_diag.h | |||
@@ -39,9 +39,11 @@ enum { | |||
39 | UNIX_DIAG_MEMINFO, | 39 | UNIX_DIAG_MEMINFO, |
40 | UNIX_DIAG_SHUTDOWN, | 40 | UNIX_DIAG_SHUTDOWN, |
41 | 41 | ||
42 | UNIX_DIAG_MAX, | 42 | __UNIX_DIAG_MAX, |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #define UNIX_DIAG_MAX (__UNIX_DIAG_MAX - 1) | ||
46 | |||
45 | struct unix_diag_vfs { | 47 | struct unix_diag_vfs { |
46 | __u32 udiag_vfs_ino; | 48 | __u32 udiag_vfs_ino; |
47 | __u32 udiag_vfs_dev; | 49 | __u32 udiag_vfs_dev; |
diff --git a/include/uapi/linux/usb/cdc-wdm.h b/include/uapi/linux/usb/cdc-wdm.h new file mode 100644 index 000000000000..f03134feebd6 --- /dev/null +++ b/include/uapi/linux/usb/cdc-wdm.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * USB CDC Device Management userspace API definitions | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * version 2 as published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef _UAPI__LINUX_USB_CDC_WDM_H | ||
10 | #define _UAPI__LINUX_USB_CDC_WDM_H | ||
11 | |||
12 | /* | ||
13 | * This IOCTL is used to retrieve the wMaxCommand for the device, | ||
14 | * defining the message limit for both reading and writing. | ||
15 | * | ||
16 | * For CDC WDM functions this will be the wMaxCommand field of the | ||
17 | * Device Management Functional Descriptor. | ||
18 | */ | ||
19 | #define IOCTL_WDM_MAX_COMMAND _IOR('H', 0xA0, __u16) | ||
20 | |||
21 | #endif /* _UAPI__LINUX_USB_CDC_WDM_H */ | ||
diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index f738e25377ff..aa33fd1b2d4f 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h | |||
@@ -138,7 +138,7 @@ | |||
138 | 138 | ||
139 | /* | 139 | /* |
140 | * New Feature Selectors as added by USB 3.0 | 140 | * New Feature Selectors as added by USB 3.0 |
141 | * See USB 3.0 spec Table 9-6 | 141 | * See USB 3.0 spec Table 9-7 |
142 | */ | 142 | */ |
143 | #define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */ | 143 | #define USB_DEVICE_U1_ENABLE 48 /* dev may initiate U1 transition */ |
144 | #define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */ | 144 | #define USB_DEVICE_U2_ENABLE 49 /* dev may initiate U2 transition */ |
@@ -147,7 +147,7 @@ | |||
147 | 147 | ||
148 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 | 148 | #define USB_INTR_FUNC_SUSPEND_OPT_MASK 0xFF00 |
149 | /* | 149 | /* |
150 | * Suspend Options, Table 9-7 USB 3.0 spec | 150 | * Suspend Options, Table 9-8 USB 3.0 spec |
151 | */ | 151 | */ |
152 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) | 152 | #define USB_INTRF_FUNC_SUSPEND_LP (1 << (8 + 0)) |
153 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) | 153 | #define USB_INTRF_FUNC_SUSPEND_RW (1 << (8 + 1)) |
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h index 28447f1594fa..8deb22672ada 100644 --- a/include/video/atmel_lcdc.h +++ b/include/video/atmel_lcdc.h | |||
@@ -30,7 +30,6 @@ | |||
30 | */ | 30 | */ |
31 | #define ATMEL_LCDC_WIRING_BGR 0 | 31 | #define ATMEL_LCDC_WIRING_BGR 0 |
32 | #define ATMEL_LCDC_WIRING_RGB 1 | 32 | #define ATMEL_LCDC_WIRING_RGB 1 |
33 | #define ATMEL_LCDC_WIRING_RGB555 2 | ||
34 | 33 | ||
35 | 34 | ||
36 | /* LCD Controller info data structure, stored in device platform_data */ | 35 | /* LCD Controller info data structure, stored in device platform_data */ |
@@ -62,6 +61,7 @@ struct atmel_lcdfb_info { | |||
62 | void (*atmel_lcdfb_power_control)(int on); | 61 | void (*atmel_lcdfb_power_control)(int on); |
63 | struct fb_monspecs *default_monspecs; | 62 | struct fb_monspecs *default_monspecs; |
64 | u32 pseudo_palette[16]; | 63 | u32 pseudo_palette[16]; |
64 | bool have_intensity_bit; | ||
65 | }; | 65 | }; |
66 | 66 | ||
67 | #define ATMEL_LCDC_DMABADDR1 0x00 | 67 | #define ATMEL_LCDC_DMABADDR1 0x00 |
diff --git a/include/video/auo_k190xfb.h b/include/video/auo_k190xfb.h index 609efe8c686e..ac329ee1d753 100644 --- a/include/video/auo_k190xfb.h +++ b/include/video/auo_k190xfb.h | |||
@@ -22,6 +22,8 @@ | |||
22 | */ | 22 | */ |
23 | #define AUOK190X_RESOLUTION_800_600 0 | 23 | #define AUOK190X_RESOLUTION_800_600 0 |
24 | #define AUOK190X_RESOLUTION_1024_768 1 | 24 | #define AUOK190X_RESOLUTION_1024_768 1 |
25 | #define AUOK190X_RESOLUTION_600_800 4 | ||
26 | #define AUOK190X_RESOLUTION_768_1024 5 | ||
25 | 27 | ||
26 | /* | 28 | /* |
27 | * struct used by auok190x. board specific stuff comes from *board | 29 | * struct used by auok190x. board specific stuff comes from *board |
@@ -98,7 +100,6 @@ struct auok190x_board { | |||
98 | int gpio_nbusy; | 100 | int gpio_nbusy; |
99 | 101 | ||
100 | int resolution; | 102 | int resolution; |
101 | int rotation; | ||
102 | int quirks; | 103 | int quirks; |
103 | int fps; | 104 | int fps; |
104 | }; | 105 | }; |
diff --git a/include/video/display_timing.h b/include/video/display_timing.h index 71e9a383a981..5d0259b08e01 100644 --- a/include/video/display_timing.h +++ b/include/video/display_timing.h | |||
@@ -12,19 +12,22 @@ | |||
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | /* VESA display monitor timing parameters */ | 15 | enum display_flags { |
16 | #define VESA_DMT_HSYNC_LOW BIT(0) | 16 | DISPLAY_FLAGS_HSYNC_LOW = BIT(0), |
17 | #define VESA_DMT_HSYNC_HIGH BIT(1) | 17 | DISPLAY_FLAGS_HSYNC_HIGH = BIT(1), |
18 | #define VESA_DMT_VSYNC_LOW BIT(2) | 18 | DISPLAY_FLAGS_VSYNC_LOW = BIT(2), |
19 | #define VESA_DMT_VSYNC_HIGH BIT(3) | 19 | DISPLAY_FLAGS_VSYNC_HIGH = BIT(3), |
20 | 20 | ||
21 | /* display specific flags */ | 21 | /* data enable flag */ |
22 | #define DISPLAY_FLAGS_DE_LOW BIT(0) /* data enable flag */ | 22 | DISPLAY_FLAGS_DE_LOW = BIT(4), |
23 | #define DISPLAY_FLAGS_DE_HIGH BIT(1) | 23 | DISPLAY_FLAGS_DE_HIGH = BIT(5), |
24 | #define DISPLAY_FLAGS_PIXDATA_POSEDGE BIT(2) /* drive data on pos. edge */ | 24 | /* drive data on pos. edge */ |
25 | #define DISPLAY_FLAGS_PIXDATA_NEGEDGE BIT(3) /* drive data on neg. edge */ | 25 | DISPLAY_FLAGS_PIXDATA_POSEDGE = BIT(6), |
26 | #define DISPLAY_FLAGS_INTERLACED BIT(4) | 26 | /* drive data on neg. edge */ |
27 | #define DISPLAY_FLAGS_DOUBLESCAN BIT(5) | 27 | DISPLAY_FLAGS_PIXDATA_NEGEDGE = BIT(7), |
28 | DISPLAY_FLAGS_INTERLACED = BIT(8), | ||
29 | DISPLAY_FLAGS_DOUBLESCAN = BIT(9), | ||
30 | }; | ||
28 | 31 | ||
29 | /* | 32 | /* |
30 | * A single signal can be specified via a range of minimal and maximal values | 33 | * A single signal can be specified via a range of minimal and maximal values |
@@ -36,12 +39,6 @@ struct timing_entry { | |||
36 | u32 max; | 39 | u32 max; |
37 | }; | 40 | }; |
38 | 41 | ||
39 | enum timing_entry_index { | ||
40 | TE_MIN = 0, | ||
41 | TE_TYP = 1, | ||
42 | TE_MAX = 2, | ||
43 | }; | ||
44 | |||
45 | /* | 42 | /* |
46 | * Single "mode" entry. This describes one set of signal timings a display can | 43 | * Single "mode" entry. This describes one set of signal timings a display can |
47 | * have in one setting. This struct can later be converted to struct videomode | 44 | * have in one setting. This struct can later be converted to struct videomode |
@@ -72,8 +69,7 @@ struct display_timing { | |||
72 | struct timing_entry vback_porch; /* ver. back porch */ | 69 | struct timing_entry vback_porch; /* ver. back porch */ |
73 | struct timing_entry vsync_len; /* ver. sync len */ | 70 | struct timing_entry vsync_len; /* ver. sync len */ |
74 | 71 | ||
75 | unsigned int dmt_flags; /* VESA DMT flags */ | 72 | enum display_flags flags; /* display flags */ |
76 | unsigned int data_flags; /* video data flags */ | ||
77 | }; | 73 | }; |
78 | 74 | ||
79 | /* | 75 | /* |
@@ -89,25 +85,6 @@ struct display_timings { | |||
89 | struct display_timing **timings; | 85 | struct display_timing **timings; |
90 | }; | 86 | }; |
91 | 87 | ||
92 | /* get value specified by index from struct timing_entry */ | ||
93 | static inline u32 display_timing_get_value(const struct timing_entry *te, | ||
94 | enum timing_entry_index index) | ||
95 | { | ||
96 | switch (index) { | ||
97 | case TE_MIN: | ||
98 | return te->min; | ||
99 | break; | ||
100 | case TE_TYP: | ||
101 | return te->typ; | ||
102 | break; | ||
103 | case TE_MAX: | ||
104 | return te->max; | ||
105 | break; | ||
106 | default: | ||
107 | return te->typ; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | /* get one entry from struct display_timings */ | 88 | /* get one entry from struct display_timings */ |
112 | static inline struct display_timing *display_timings_get(const struct | 89 | static inline struct display_timing *display_timings_get(const struct |
113 | display_timings *disp, | 90 | display_timings *disp, |
diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h index ad3bdfe743b2..23864b284147 100644 --- a/include/video/platform_lcd.h +++ b/include/video/platform_lcd.h | |||
@@ -15,6 +15,7 @@ struct plat_lcd_data; | |||
15 | struct fb_info; | 15 | struct fb_info; |
16 | 16 | ||
17 | struct plat_lcd_data { | 17 | struct plat_lcd_data { |
18 | int (*probe)(struct plat_lcd_data *); | ||
18 | void (*set_power)(struct plat_lcd_data *, unsigned int power); | 19 | void (*set_power)(struct plat_lcd_data *, unsigned int power); |
19 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); | 20 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); |
20 | }; | 21 | }; |
diff --git a/include/video/videomode.h b/include/video/videomode.h index a42156234dd4..3f1049d870d5 100644 --- a/include/video/videomode.h +++ b/include/video/videomode.h | |||
@@ -29,20 +29,30 @@ struct videomode { | |||
29 | u32 vback_porch; | 29 | u32 vback_porch; |
30 | u32 vsync_len; | 30 | u32 vsync_len; |
31 | 31 | ||
32 | unsigned int dmt_flags; /* VESA DMT flags */ | 32 | enum display_flags flags; /* display flags */ |
33 | unsigned int data_flags; /* video data flags */ | ||
34 | }; | 33 | }; |
35 | 34 | ||
36 | /** | 35 | /** |
37 | * videomode_from_timing - convert display timing to videomode | 36 | * videomode_from_timing - convert display timing to videomode |
37 | * @dt: display_timing structure | ||
38 | * @vm: return value | ||
39 | * | ||
40 | * DESCRIPTION: | ||
41 | * This function converts a struct display_timing to a struct videomode. | ||
42 | */ | ||
43 | void videomode_from_timing(const struct display_timing *dt, | ||
44 | struct videomode *vm); | ||
45 | |||
46 | /** | ||
47 | * videomode_from_timings - convert one display timings entry to videomode | ||
38 | * @disp: structure with all possible timing entries | 48 | * @disp: structure with all possible timing entries |
39 | * @vm: return value | 49 | * @vm: return value |
40 | * @index: index into the list of display timings in devicetree | 50 | * @index: index into the list of display timings in devicetree |
41 | * | 51 | * |
42 | * DESCRIPTION: | 52 | * DESCRIPTION: |
43 | * This function converts a struct display_timing to a struct videomode. | 53 | * This function converts one struct display_timing entry to a struct videomode. |
44 | */ | 54 | */ |
45 | int videomode_from_timing(const struct display_timings *disp, | 55 | int videomode_from_timings(const struct display_timings *disp, |
46 | struct videomode *vm, unsigned int index); | 56 | struct videomode *vm, unsigned int index); |
47 | 57 | ||
48 | #endif | 58 | #endif |
diff --git a/include/xen/events.h b/include/xen/events.h index c6bfe01acf6b..b2b27c6a0f7b 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -90,8 +90,7 @@ int xen_bind_pirq_gsi_to_irq(unsigned gsi, | |||
90 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); | 90 | int xen_allocate_pirq_msi(struct pci_dev *dev, struct msi_desc *msidesc); |
91 | /* Bind an PSI pirq to an irq. */ | 91 | /* Bind an PSI pirq to an irq. */ |
92 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, | 92 | int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc, |
93 | int pirq, int vector, const char *name, | 93 | int pirq, const char *name, domid_t domid); |
94 | domid_t domid); | ||
95 | #endif | 94 | #endif |
96 | 95 | ||
97 | /* De-allocates the above mentioned physical interrupt. */ | 96 | /* De-allocates the above mentioned physical interrupt. */ |
diff --git a/include/xen/interface/io/blkif.h b/include/xen/interface/io/blkif.h index 01c3d62436ef..ffd4652de91c 100644 --- a/include/xen/interface/io/blkif.h +++ b/include/xen/interface/io/blkif.h | |||
@@ -138,11 +138,21 @@ struct blkif_request_discard { | |||
138 | uint8_t _pad3; | 138 | uint8_t _pad3; |
139 | } __attribute__((__packed__)); | 139 | } __attribute__((__packed__)); |
140 | 140 | ||
141 | struct blkif_request_other { | ||
142 | uint8_t _pad1; | ||
143 | blkif_vdev_t _pad2; /* only for read/write requests */ | ||
144 | #ifdef CONFIG_X86_64 | ||
145 | uint32_t _pad3; /* offsetof(blkif_req..,u.other.id)==8*/ | ||
146 | #endif | ||
147 | uint64_t id; /* private guest value, echoed in resp */ | ||
148 | } __attribute__((__packed__)); | ||
149 | |||
141 | struct blkif_request { | 150 | struct blkif_request { |
142 | uint8_t operation; /* BLKIF_OP_??? */ | 151 | uint8_t operation; /* BLKIF_OP_??? */ |
143 | union { | 152 | union { |
144 | struct blkif_request_rw rw; | 153 | struct blkif_request_rw rw; |
145 | struct blkif_request_discard discard; | 154 | struct blkif_request_discard discard; |
155 | struct blkif_request_other other; | ||
146 | } u; | 156 | } u; |
147 | } __attribute__((__packed__)); | 157 | } __attribute__((__packed__)); |
148 | 158 | ||
diff --git a/include/xen/interface/physdev.h b/include/xen/interface/physdev.h index 1844d31f4552..7000bb1f6e96 100644 --- a/include/xen/interface/physdev.h +++ b/include/xen/interface/physdev.h | |||
@@ -251,6 +251,12 @@ struct physdev_pci_device_add { | |||
251 | 251 | ||
252 | #define PHYSDEVOP_pci_device_remove 26 | 252 | #define PHYSDEVOP_pci_device_remove 26 |
253 | #define PHYSDEVOP_restore_msi_ext 27 | 253 | #define PHYSDEVOP_restore_msi_ext 27 |
254 | /* | ||
255 | * Dom0 should use these two to announce MMIO resources assigned to | ||
256 | * MSI-X capable devices won't (prepare) or may (release) change. | ||
257 | */ | ||
258 | #define PHYSDEVOP_prepare_msix 30 | ||
259 | #define PHYSDEVOP_release_msix 31 | ||
254 | struct physdev_pci_device { | 260 | struct physdev_pci_device { |
255 | /* IN */ | 261 | /* IN */ |
256 | uint16_t seg; | 262 | uint16_t seg; |